neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A formalism-first SHACL validation and SHACL-AF inference engine written in Rust, grounded in the algebraic treatment of Common Foundations for SHACL, ShEx, and PG-Schema (arXiv:2502.01295). Available as a command-line tool, Python bindings (pyshifty), a C++17 static-library SDK, and a WebAssembly module that runs in the browser.
See the archive-first-attempt branch for an older attempt, which was published as shifty 0.0.7
Disclosure: This project was nearly 100% "vibe coded" with Claude Opus 4.8, Sonnet 4.6, and ChatGPT 5.5README 전문 보기 ↗Shifty validates RDF graphs against SHACL shapes and runs SHACL-AF rules to a fixed point. It compiles shapes into a path and shape algebra before evaluating data. The engine is available through a command-line tool, Python package, C++17 SDK, Rust crates, and WebAssembly module.
Documentation · Feature support · Changelog
Install the Python package and its optional rdflib dependency when you want a
W3C sh:ValidationReport graph:
pip install "pyshifty[rdflib]"
import shifty
shapes = """
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix ex: <http://example.org/> .
ex:PersonShape a sh:NodeShape ;
sh:targetClass ex:Person ;
sh:property [ sh:path ex:name ; sh:minCount 1 ] .
"""
data = """
@prefix ex: <http://example.org/> .
ex:alice a ex:Person ; ex:name "Alice" .
ex:bob a ex:Person .
"""
result = shifty.validate_algebra(data, shapes)
assert not result.conforms
assert len(result.violations) == 1
conforms, report_graph, results_text = shifty.validate(data, shapes)
assert not conforms
validate_algebra() returns structured violations. validate() returns the
W3C report as an rdflib.Graph. The Python reference
lists their options and the other graph input forms.
For the CLI, clone this repository and install the binary with Rust:
cargo install --path crates/shifty-cli
shifty validate --shapes shapes.ttl --data data.ttl
shifty infer --shapes rules.ttl --data data.ttl
The CLI's default validation output groups failures by finding and lists the
affected focus nodes. --report emits a W3C report in Turtle. See the
CLI reference for flags and output
formats.
| Interface | Use |
|---|---|
| Python | Validation, inference, evidence, shape maps, and prepared schemas. |
| CLI | Validation and inference from files or URLs. |
| C++17 | Static library with prepared validation and typed results. |
| Rust | Engine crates and reusable sessions. |
| WebAssembly | Local browser validation and inference; try the playground. |
SHACL Core and much of SHACL-AF are supported. JavaScript constraints and functions are unsupported; some calls to SHACL functions from SPARQL have limited graph access. Check the feature matrix before relying on an advanced feature. Symbolic repair is experimental.
The contribution guide has build and
quality checks. Python development uses the locked uv environment in python/:
cd python
uv sync --dev --frozen --reinstall-package pyshifty
uv run ruff check .
uv run ruff format --check .
uv run ty check shifty
uv run pytest -q
Reinstall the editable package after changing Rust sources so tests use the
newly compiled extension. For performance measurements and implementation
comparisons, see benchmark/README.md and
scripts/compare_implementations.py.
The archive-first-attempt branch preserves the older implementation published
as Shifty 0.0.7. The current project was developed predominantly with coding
assistants, including Claude Opus 4.8, Sonnet 4.6, and ChatGPT 5.5.
BSD-3-Clause.