Theory Exec_Backward
theory Exec_Backward
imports "Voblint_Exec.Default_St_Reachability" "Voblint_Domain.Backward_Domain_Mono"
begin
unbundle default_st_syntax
section ‹Generic executable mirror of backward filtering›
text ‹
Every interpretation of @{locale sound_refinement} gets an executable
@{typ "'a default_st"} mirror of its @{text afilter} / @{text bfilter}
for free, parameterized by an explicit location classifier ‹𝒢›:
‹afilter_st› / ‹bfilter_st› and their commutation with the abstract
filters through @{const default_st_to_fun}, proved once here so no
domain needs to repeat the induction by hand. Each concrete domain names its
specialization through its existing ‹sound_refinement› interpretation; Sign,
Interval, Congruence, and Int all reuse the same correspondence.
›
subsection ‹Standalone executable recursion, outside the semantic locale›
text ‹
‹afilter_st_lift›/‹bfilter_st_lift› below are proved *inside*
\<^locale>‹sound_refinement›, so once exported their ‹.simps› each carry that
locale's own soundness assumptions as a hypothesis -- a fact code generation
cannot discharge, so a recursive ‹fun› defined that way has no usable code
equation, no matter how it is later aliased. ‹refine_ops› packages
the same raw operations directly, and ‹afilter_st_lift_with›/
‹bfilter_st_lift_with› recurse over an explicit ‹'a::executable_domain›
value instead of interpreting the soundness locale, so their equations carry
no such premise. The \<^locale>‹sound_refinement› context below builds an
‹ops› value from its own fixed operations and proves the two recursions
agree; ‹branch_st› calls the standalone form directly.
›