{"id":47115438,"url":"https://github.com/pulseengine/spar","last_synced_at":"2026-04-30T21:01:02.433Z","repository":{"id":342964207,"uuid":"1175787458","full_name":"pulseengine/spar","owner":"pulseengine","description":"AADL v2.2 toolchain in Rust — parser, analysis, and WASM component integration","archived":false,"fork":false,"pushed_at":"2026-04-02T02:13:16.000Z","size":6586,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T02:34:28.191Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pulseengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-08T06:57:00.000Z","updated_at":"2026-03-29T15:12:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"bf8457e9-711b-4e40-9c03-61a5a1fc9a9a","html_url":"https://github.com/pulseengine/spar","commit_stats":null,"previous_names":["pulseengine/spar"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/pulseengine/spar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Fspar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Fspar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Fspar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Fspar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pulseengine","download_url":"https://codeload.github.com/pulseengine/spar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Fspar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31479006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T14:34:32.243Z","status":"ssl_error","status_checked_at":"2026-04-06T14:34:31.723Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-12T18:58:24.165Z","updated_at":"2026-04-30T21:01:02.426Z","avatar_url":"https://github.com/pulseengine.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Spar\n\n\u003csup\u003eAADL v2.3 toolchain + deployment solver\u003c/sup\u003e\n\n\u0026nbsp;\n\n![Rust](https://img.shields.io/badge/Rust-CE422B?style=flat-square\u0026logo=rust\u0026logoColor=white\u0026labelColor=1a1b27)\n![WebAssembly](https://img.shields.io/badge/WebAssembly-654FF0?style=flat-square\u0026logo=webassembly\u0026logoColor=white\u0026labelColor=1a1b27)\n![AADL](https://img.shields.io/badge/AADL_v2.3-AS5506D-654FF0?style=flat-square\u0026labelColor=1a1b27)\n![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=flat-square\u0026labelColor=1a1b27)\n\n[![CI](https://github.com/pulseengine/spar/actions/workflows/ci.yml/badge.svg)](https://github.com/pulseengine/spar/actions/workflows/ci.yml)\n[![Lean Proofs](https://github.com/pulseengine/spar/actions/workflows/proofs.yml/badge.svg)](https://github.com/pulseengine/spar/actions/workflows/proofs.yml)\n[![Rivet validate](https://img.shields.io/github/actions/workflow/status/pulseengine/spar/ci.yml?branch=main\u0026label=rivet%20validate\u0026logo=githubactions\u0026logoColor=white)](https://github.com/pulseengine/spar/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/pulseengine/spar/graph/badge.svg)](https://codecov.io/gh/pulseengine/spar)\n\n\u0026nbsp;\n\n\u003ch6\u003e\n  \u003ca href=\"https://github.com/pulseengine/meld\"\u003eMeld\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://github.com/pulseengine/loom\"\u003eLoom\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://github.com/pulseengine/synth\"\u003eSynth\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://github.com/pulseengine/kiln\"\u003eKiln\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://github.com/pulseengine/sigil\"\u003eSigil\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://github.com/pulseengine/spar\"\u003eSpar\u003c/a\u003e\n\u003c/h6\u003e\n\n\u003c/div\u003e\n\n\u0026nbsp;\n\nA Rust implementation of a complete AADL (Architecture Analysis and Design Language) toolchain. Parses, validates, analyzes, transforms, and visualizes system architectures per SAE AS5506D. Includes a deployment solver for automated thread-to-processor allocation. Designed for safety-critical systems modeling -- avionics, vehicle software, WASM component architectures, and AI agent workflows.\n\nSpar replaces the Eclipse/Java-based OSATE2 toolchain with a fast, embeddable, WASM-compilable alternative built on rust-analyzer's proven architecture patterns.\n\n## Installation\n\n```bash\n# From source\ncargo install --git https://github.com/pulseengine/spar\n\n# Or download a pre-built binary from releases\n# https://github.com/pulseengine/spar/releases\n```\n\n## Quick Start\n\n```bash\n# Parse an AADL model and show the syntax tree\nspar parse vehicle.aadl --tree\n\n# List all declared items\nspar items vehicle.aadl\n\n# Instantiate a system hierarchy\nspar instance --root Pkg::System.Impl vehicle.aadl test-data/sensor_lib.aadl\n\n# Run all analysis passes\nspar analyze --root Pkg::System.Impl vehicle.aadl test-data/sensor_lib.aadl\n\n# Allocate threads to processors (deployment solver)\nspar allocate --root Pkg::System.Impl vehicle.aadl test-data/sensor_lib.aadl\n\n# Render the architecture as SVG\nspar render --root Pkg::System.Impl -o arch.svg vehicle.aadl test-data/sensor_lib.aadl\n\n# Run verification assertions\nspar verify --root Pkg::System.Impl --rules rules.toml vehicle.aadl\n```\n\n## CLI Commands\n\n| Command    | Description                                                  |\n|------------|--------------------------------------------------------------|\n| `parse`    | Parse AADL files and show syntax tree or errors              |\n| `items`    | List declared packages, types, implementations               |\n| `instance` | Build the system instance hierarchy                          |\n| `analyze`  | Run all analysis passes (SARIF/JSON/text output)             |\n| `allocate` | Solve thread-to-processor deployment bindings                |\n| `diff`     | Compare two model versions for structural/diagnostic changes |\n| `modes`    | List operational modes and mode transitions                  |\n| `render`   | Generate SVG/HTML architecture diagrams                      |\n| `verify`   | Evaluate verification assertions against the model           |\n| `lsp`      | Start the Language Server Protocol server                    |\n\n## Architecture\n\n20 crates, layered from low-level parsing to high-level analysis:\n\n```\nspar-syntax        Lossless CST (rowan red-green trees)\nspar-parser        Recursive descent parser with error recovery\nspar-annex         AADL annex sublanguage parsing (EMV2, BLESS, BA)\nspar-base-db       Salsa database for incremental computation\nspar-hir-def       HIR definitions -- item tree, instance model, arenas\nspar-hir           Public semantic facade (name resolution, properties)\nspar-analysis      30 pluggable analysis passes\nspar-transform     Format transforms (AADL \u003c-\u003e WIT, WAC, Rust crates, wRPC)\nspar-solver        Deployment solver (thread-to-processor allocation)\nspar-render        SVG architecture diagrams (compound Sugiyama layout)\nspar-network       Network topology and WCTT analysis support\nspar-variants      Product-line variant selection and HIR filtering\nspar-verify        Requirements verification engine\nspar-verify-macros Procedural macros for verification rules\nspar-codegen       Rust + WIT code generation from instance models\nspar-insight       Discrepancy assistant (compare CTF traces vs expected)\nspar-sysml2        SysML v2 / KerML extraction and generation\nspar-mcp           Model Context Protocol server (read-only oracles)\nspar-cli           Command-line interface\nspar-wasm          WebAssembly component (WASI P2)\n```\n\n## Key Features\n\n- **30 analysis passes** -- scheduling, latency, connectivity, resource budgets, ARINC 653, EMV2 fault trees, bus bandwidth, weight/power, mode reachability, and more\n- **Assertion engine** -- declarative verification rules in TOML (`spar verify`)\n- **Deployment solver** -- automated thread-to-processor allocation with constraint satisfaction\n- **SARIF output** -- analysis results in SARIF format for CI integration\n- **VS Code extension** -- live AADL rendering and diagnostics via LSP\n- **WASM component** -- compiles to a 1.3 MB wasm32-wasip2 component\n- **Incremental** -- salsa-based memoization for fast re-analysis\n- **Lossless parsing** -- every byte preserved in the syntax tree\n\n## Editor support\n\nA first-party VS Code extension lives in [`vscode-spar/`](vscode-spar/). It pairs the `spar lsp` server (diagnostics, hover, go-to-definition, completion, rename, inlay hints) with a live architecture-diagram webview that re-renders on save. See [`vscode-spar/README.md`](vscode-spar/README.md) for install + setup.\n\n## Documentation\n\n- [Quickstart](docs/quickstart.md) -- build spar, parse + analyze the sample model in ~30 minutes\n- [`spar moves` reference](docs/cli/moves.md) -- hypothetical-rebinding oracle (verify + enumerate)\n- [WASM-as-architecture design](docs/plans/2026-03-10-wasm-as-architecture-design.md) -- WIT/WAC/wRPC transforms\n- [VS Code extension design](docs/plans/2026-03-18-vscode-extension-design.md) -- editor integration\n- [Deployment solver plan](docs/plans/2026-03-21-deployment-solver-plan.md) -- allocation algorithm\n\n## Safety\n\nFull STPA (System-Theoretic Process Analysis) safety analysis:\n\n- [STPA analysis](safety/stpa/analysis.yaml) -- losses, hazards, UCAs, loss scenarios\n- [Safety requirements](safety/stpa/requirements.yaml) -- 23 STPA-derived requirements\n- [Rivet artifacts](artifacts/) -- requirements, architecture decisions, verification records\n\n## License\n\nMIT License -- see [LICENSE](LICENSE).\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n\u003csub\u003ePart of \u003ca href=\"https://github.com/pulseengine\"\u003ePulseEngine\u003c/a\u003e -- formally verified WebAssembly toolchain for safety-critical systems\u003c/sub\u003e\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulseengine%2Fspar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpulseengine%2Fspar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulseengine%2Fspar/lists"}