Prove that analysis results apply to all states, not just the final one

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 14:24:46 -05:00
parent 319fa272ac
commit 778e974dfb
5 changed files with 94 additions and 11 deletions

View File

@@ -137,6 +137,13 @@ theorem analyze_correct {ρ : Env} (hrun : EvalStmt [] prog.rootStmt ρ) :
variablesAt prog.finalState (result ConstLattice prog) ρ () :=
Forward.analyze_correct ConstLattice prog hrun
theorem analyze_correct_at {ρf : Env} (hrun : EvalStmt [] prog.rootStmt ρf)
{s : prog.State} {ρin ρout : Env} {stin stout : PUnit}
(hr : Reaches (L := ConstLattice) (prog.trace hrun) PUnit.unit s ρin ρout stin stout) :
joinForKey s (result ConstLattice prog) ρin stin
variablesAt s (result ConstLattice prog) ρout stout :=
Forward.analyze_correct_at ConstLattice prog hrun hr
end ConstAnalysis
end Spa