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

@@ -96,6 +96,13 @@ theorem analyze_correct {ρ : Env} (hrun : EvalStmt [] prog.rootStmt ρ) :
(stepTraceState (prog.trace hrun) (stateInterp prog).init) :=
Forward.analyze_correct_state (DefSet prog) prog hrun
theorem analyze_correct_at {ρf : Env} (hrun : EvalStmt [] prog.rootStmt ρf)
{s : prog.State} {ρin ρout : Env} {stin : Run prog} {stout : Run prog}
(hr : Reaches (prog.trace hrun) (stateInterp prog).init s ρin ρout stin stout) :
joinForKey s (result (DefSet prog) prog) ρin stin
variablesAt s (result (DefSet prog) prog) ρout stout :=
Forward.analyze_correct_at (DefSet prog) prog hrun hr
end ReachingAnalysis
end Spa