feat(v0.3.0): LSP salsa, verify assertions, AADL v2.3, diff, SARIF#73
Merged
feat(v0.3.0): LSP salsa, verify assertions, AADL v2.3, diff, SARIF#73
Conversation
Add a mini expression language that queries the AADL instance model
directly, complementing the existing requirement checks (which filter
analysis diagnostics). Assertions are declared as [[assertion]] sections
in the TOML file alongside [[requirement]] entries.
Expression language supports:
- components/analysis('name') sources
- .where(), .all(), .any(), .none(), .count(), .features, .diagnostics
- category/kind/direction/severity equality, has('prop'), connected
- Boolean combinators: and, or, not, parenthesized grouping
- message.contains('text') for diagnostic filtering
76 tests pass (38 new assertion + 38 existing).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ching Replace the LSP server's hand-rolled HashMap<String, String> document store and HashMap<String, Arc<ItemTree>> cache with salsa's RootDatabase and SourceFile inputs. File text changes now flow through file.set_text(&mut db).to(new_text), and all parsing goes through the memoized parse_file(&db, file) query. This means unchanged files are never re-parsed, and downstream GlobalScope rebuilds benefit from salsa's automatic invalidation tracking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Part 1 — AADL v2.3 parser extensions:
- Abstract features with classifier constraint: `feature f: classifier(Pkg::Type);`
- Annex file references: `annex Name {** file("path") **};`
- `interface` contextual keyword for feature group types
- New SyntaxKind variants: INTERFACE_KW, FILE_KW, FILE_REFERENCE
- 11 new parser tests for v2.3 constructs + v2.2 regression test
Part 2 — Git-aware diff (`spar diff`):
- Compare models from git refs (--base/--head) or directories (--old/--new)
- Structural comparison: added/removed/modified components, connections
- Analysis impact: diagnostic counts per analysis, base vs head
- Regression detection: new errors/warnings not present in base
- Output formats: text (default), json, sarif
Part 3 — SARIF output (`--format sarif`):
- SARIF v2.1.0 compliant JSON for GitHub Code Scanning integration
- Available on both `spar analyze` and `spar diff` commands
- Maps analysis name to ruleId, severity to level, path to logical location
- Rule deduplication, artifact tracking, physical+logical locations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ache Convert the assertion expression engine from a char-based parser with enum Expr/BoolExpr/Method AST to a proper rowan-based infrastructure: - syntax.rs: ExprSyntaxKind enum, ExprLanguage impl, SyntaxNode type alias - lexer.rs: tokenizer producing (ExprSyntaxKind, String) pairs - parser.rs: recursive descent building rowan::GreenNode via GreenNodeBuilder - eval.rs: evaluator walking SyntaxNode/SyntaxToken instead of enum variants - mod.rs: public API, TOML schema, thread-local parse cache (stopgap for salsa) All 93 tests pass (38+ original assertion tests + lexer/parser unit tests). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # Cargo.lock
# Conflicts: # crates/spar-cli/src/main.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…e_acronyms) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
avrabe
added a commit
that referenced
this pull request
Mar 21, 2026
Version: 0.2.4 → 0.3.0 Implemented requirements: - REQ-RTA-001, REQ-BUS-001, REQ-MEMBUD-001, REQ-WEIGHTPOWER-001 (PR #70) - REQ-PARSER-001, REQ-VERIFY-001, REQ-DIFF-001, REQ-DIFF-002 (PR #73) - REQ-SOLVER-001, REQ-SOLVER-002, REQ-SOLVER-003, REQ-SOLVER-007 (PR #74) Implemented architecture decisions: - ARCH-ANALYSIS-001, ARCH-DIFF-001, ARCH-VERIFY-001 (PR #73) - ARCH-SOLVER-002, ARCH-SOLVER-003, ARCH-SOLVER-004, ARCH-SOLVER-005 (PR #74) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HashMapcaching withRootDatabase+SourceFilesalsa inputs — unchanged files are never re-parsed, all 10 handlers route through memoizedparse_filequeriesspar verifyassertion language with rowan CST (lexer, parser,GreenNode), thread-local parse cache —components.where(category == 'thread').all(has('Timing_Properties::Period'))etc.spar diff: Git-aware structural + analysis comparison (--base/--head/--old/--new), regression detection, text/json/sarif outputspar analyze --format sariffor GitHub Code Scanning integration — SARIF v2.1.0 conformantTest plan
🤖 Generated with Claude Code