instance proof (standard, goal_cases) case1show ?caseby (rule less_ivl_def) next case2show ?caseby transfer (simp add: le_rep_def split: prod.splits) next case3thus ?caseby transfer (auto simp: le_rep_def split: if_splits) next case4thus ?caseby transfer (auto simp: le_rep_def eq_ivl_iff split: if_splits) next case5thus ?caseby transfer (auto simp add: le_rep_def sup_rep_def is_empty_min_max) next case6thus ?caseby transfer (auto simp add: le_rep_def sup_rep_def is_empty_min_max) next case7thus ?caseby transfer (auto simp add: le_rep_def sup_rep_def) next case8show ?caseby transfer (simp add: le_rep_def is_empty_rep_def) qed
end
text‹Implement (naive) executable equality:› instantiation ivl :: equal begin
lemma plus_ivl_nice: "[l1,h1] + [l2,h2] = (if [l1,h1] = ⊥∨ [l2,h2] = ⊥ then ⊥ else [l1+l2 , h1+h2])" unfolding bot_ivl_def by transfer (auto simp: plus_rep_def eq_ivl_empty)
lemma uminus_eq_Minf[simp]: "-x = Minf ⟷ x = Pinf" by(cases x) auto lemma uminus_eq_Pinf[simp]: "-x = Pinf ⟷ x = Minf" by(cases x) auto
lemma uminus_le_Fin_iff: "- x ≤ Fin(-y) ⟷ Fin y ≤ (x::'a::ordered_ab_group_add extended)" by(cases x) auto lemma Fin_uminus_le_iff: "Fin(-y) ≤ -x ⟷ x ≤ ((Fin y)::'a::ordered_ab_group_add extended)" by(cases x) auto
instantiation ivl :: uminus begin
definition uminus_rep :: "eint2 ==> eint2"where "uminus_rep p = (let (l,h) = p in (-h, -l))"
lemma γ_uminus_rep: "i ∈ γ_rep p ==> -i ∈ γ_rep(uminus_rep p)" by(auto simp: uminus_rep_def γ_rep_def image_def uminus_le_Fin_iff Fin_uminus_le_iff
split: prod.split)
lemma γ_aboveI: "i ∈ γ_ivl iv ==> i ≤ j ==> j ∈ γ_ivl(above iv)" by transfer
(auto simp add: above_rep_def γ_rep_cases is_empty_rep_def
split: extended.splits)
lemma γ_belowI: "i ∈ γ_ivl iv ==> j ≤ i ==> j ∈ γ_ivl(below iv)" by transfer
(auto simp add: below_rep_def γ_rep_cases is_empty_rep_def
split: extended.splits)
global_interpretation Val_semilattice where γ = γ_ivl and num' = num_ivl and plus' = "(+)" proof (standard, goal_cases) case1thus ?caseby transfer (simp add: le_iff_subset) next case2show ?caseby transfer (simp add: γ_rep_def) next case3show ?caseby transfer (simp add: γ_rep_def) next case4thus ?case apply transfer apply(auto simp: γ_rep_def plus_rep_def add_mono_le_Fin add_mono_Fin_le) by(auto simp: empty_rep_def is_empty_rep_def) qed
global_interpretation Val_lattice_gamma where γ = γ_ivl and num' = num_ivl and plus' = "(+)" defines aval_ivl = aval' proof (standard, goal_cases) case1show ?caseby(simp add: γ_inf) next case2show ?caseunfolding bot_ivl_def by transfer simp qed
global_interpretation Val_inv where γ = γ_ivl and num' = num_ivl and plus' = "(+)" and test_num' = in_ivl and inv_plus' = inv_plus_ivl and inv_less' = inv_less_ivl proof (standard, goal_cases) case1thus ?caseby transfer (auto simp: γ_rep_def) next case (2 _ _ _ _ _ i1 i2) thus ?case unfolding inv_plus_ivl_def minus_ivl_def apply(clarsimp simp add: γ_inf) using gamma_plus'[of "i1+i2" _ "-i1"] gamma_plus'[of "i1+i2" _ "-i2"] by(simp add: γ_uminus) next case (3 i1 i2) thus ?case unfolding inv_less_ivl_def minus_ivl_def one_extended_def apply(clarsimp simp add: γ_inf split: if_splits) using gamma_plus'[of "i1+1" _ "-1"] gamma_plus'[of "i2 - 1" _ "1"] apply(simp add: γ_belowI[of i2] γ_aboveI[of i1]
uminus_ivl.abs_eq uminus_rep_def γ_ivl_nice) apply(simp add: γ_aboveI[of i2] γ_belowI[of i1]) done qed
global_interpretation Abs_Int_inv where γ = γ_ivl and num' = num_ivl and plus' = "(+)" and test_num' = in_ivl and inv_plus' = inv_plus_ivl and inv_less' = inv_less_ivl defines inv_aval_ivl = inv_aval' and inv_bval_ivl = inv_bval' and step_ivl = step' and AI_ivl = AI and aval_ivl' = aval''
..
text‹Takes as many iterations as the actual execution. Would diverge if
did not terminate. Worse still, as the following example shows: even if
actual execution terminates, the analysis may not. The value of y keeps
as the analysis is iterated, no matter how long:›
value"show_acom (steps test4_ivl 50)"
text‹Relationships between variables are NOT captured:› value"show_acom_opt (AI_ivl test5_ivl)"
text‹Again, the analysis would not terminate:› value"show_acom (steps test6_ivl 50)"
end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.