You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(codegen): Kani harnesses for generated-code AADL contract preservation
Add three #[kani::proof] harnesses in crates/spar-codegen/tests/kani_contracts.rs
that prove each codegen pass preserves the AADL source contract (spar's
Logika-equivalent strategy: machine-checked proofs on the generated-code path).
- prove_thread_period_preserved: for any Period p in (0, 1_000_000_000] ns,
the emitted dispatch-metadata string round-trips back to exactly p (no
truncation, no off-by-one)
- prove_port_direction_preserved: Out→In connections produce complementary
WIT setter+getter pairs; same-direction connections never produce a
complementary pair (AADL §9 directionality contract)
- prove_access_right_preserved: Access_Rights = Read_Only never produces
&mut in the generated access shim; Read_Write always does (type-level
read-only enforcement)
Wire-up: add kani-harnesses feature flag to spar-codegen/Cargo.toml; extend
CI Kani job to run each harness explicitly; add REQ-KANI-CODEGEN-001 +
TEST-KANI-CODEGEN to artifacts YAML.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments