Skip to content

feat: Wave 2 — HashMap determinism, safety-case GSN, ISLE rule verification (#50)#77

Merged
avrabe merged 1 commit intomainfrom
feat/wave2-determinism-safety-case-isle-verification
Apr 13, 2026
Merged

feat: Wave 2 — HashMap determinism, safety-case GSN, ISLE rule verification (#50)#77
avrabe merged 1 commit intomainfrom
feat/wave2-determinism-safety-case-isle-verification

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 13, 2026

Summary

  • HashMap determinism (REQ-14): Replace 5 iteration-order-sensitive HashMaps with BTreeMap in lib.rscoloring, local_info, last_sets/block_sets/loop_sets/then_sets, color_types, old_idx_to_type, global_constants. Ensures identical inputs always produce identical outputs.
  • Safety-case GSN artifacts: 6 safety goals (SG-1 to SG-6) covering all 20 hazards, 2 strategies, 5 solutions (evidence), 1 context. stpa-hazards-have-safety-goals goes from 0% to 100%.
  • ISLE rule verification (ISLE rule verification (Crocus-style) #50): Z3-based verification of 6 constant folding rules (i32/i64 add/sub/mul). Proves correctness for all 2^N inputs via SMT. 8 new tests.

Depends on

Test plan

  • cargo build --release — passes
  • cargo test --release — 395 tests pass, 0 failures (8 new rule verification tests)
  • All pre-commit hooks pass (fmt, clippy, test, build, rivet)
  • rivet list --type safety-goal — 6 goals detected
  • CI checks

🤖 Generated with Claude Code

…cation (#50)

HashMap determinism (REQ-14):
- Replace 5 iteration-order-sensitive HashMaps with BTreeMap in lib.rs:
  coloring, local_info, last_sets/block_sets/loop_sets/then_sets,
  color_types, old_idx_to_type, global_constants
- Ensures identical inputs always produce identical outputs

Safety-case GSN artifacts:
- 6 safety goals (SG-1 to SG-6) covering all 20 hazards
- 2 safety strategies (SS-1, SS-2)
- 5 safety solutions (SOL-1 to SOL-5) as evidence
- 1 safety context (SC-CTXT-1)
- stpa-hazards-have-safety-goals: 0% → 100%

ISLE rule verification groundwork (#50):
- Z3-based verification of constant folding rules
- Proves i32/i64 add/sub/mul rules correct for all 2^N inputs
- 8 new tests: per-rule verification + integration suite

Trace: REQ-14, REQ-6, SG-1, SG-2
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit da1720f into main Apr 13, 2026
22 checks passed
@avrabe avrabe deleted the feat/wave2-determinism-safety-case-isle-verification branch April 13, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant