diff -r c0a775618258 -r dbdcfd4dccb3 test/Tools/isac/ProgLang/evaluate.sml --- a/test/Tools/isac/ProgLang/evaluate.sml Sun Sep 11 14:31:15 2022 +0200 +++ b/test/Tools/isac/ProgLang/evaluate.sml Mon Sep 12 17:46:32 2022 +0200 @@ -35,7 +35,8 @@ "----------- check return value of adhoc_thm ----"; "----------- check return value of adhoc_thm ----"; val thy = @{theory "Poly"}; -val cal = snd (assoc_calc' thy "is_polyexp"); +val ctxt = Proof_Context.init_global thy; +val cal = snd (get_calc ctxt "is_polyexp"); val t = @{term "(x / x) is_polyexp"}; val SOME (thmID, thm) = adhoc_thm ctxt cal t; (HOLogic.dest_Trueprop (Thm.prop_of thm); writeln "all thms wrapped by Trueprop") @@ -318,7 +319,7 @@ "----------- get_pair with 3 args --------------------------------"; val (thy, op_, ef, arg) = (thy, "EqSystem.occur_exactly_in", - assoc_calc' (@{theory "EqSystem"}) "occur_exactly_in" |> snd |> snd, + get_calc (@{theory "EqSystem"} |> Proof_Context.init_global) "occur_exactly_in" |> snd |> snd, TermC.str2term "[] from [c, c_2, c_3, c_4] occur_exactly_in - 1 * (q_0 * L \ 2) / 2" ); @@ -345,6 +346,7 @@ "----------- fun get_pair: examples ------------------------------------------------------------"; "----------- fun get_pair: examples ------------------------------------------------------------"; val thy = @{theory}; +val ctxt = @{context}; val SOME (isa_str, eval_fn) = LibraryC.assoc (KEStore_Elems.get_calcs @{theory}, "PLUS"); if isa_str = "Groups.plus_class.plus" then () else error "eval_fn PLUS changed"; @@ -392,7 +394,7 @@ if str = "#is_num_9_" andalso ThmC_Def.string_of_thm thm = "(9 is_num) = True" then () else error "adhoc_thm 9 is_num changed"; -case assoc_calc thy \<^const_name>\less\ of +case get_calc_prog_id ctxt \<^const_name>\less\ of "le" => () | _ => error "Orderings.ord_class.less <-> le changed"; val SOME (isa_str, eval_fn) = LibraryC.assoc (KEStore_Elems.get_calcs @{theory}, "le"); if isa_str = "Orderings.ord_class.less" then () else error "adhoc_thm (4 < 4) = False CHANGED"; @@ -418,7 +420,7 @@ if str = "#divide_e6_~8" andalso ThmC_Def.string_of_thm thm = "6 / - 8 = - 3 / 4" then () else error "adhoc_thm 6 / -8 = - 3 / 4 changed"; -case assoc_calc thy "Prog_Expr.ident" of +case get_calc_prog_id ctxt "Prog_Expr.ident" of "ident" => () | _ => error "Prog_Expr.ident <-> ident changed"; val SOME (isa_str, eval_fn) = LibraryC.assoc (KEStore_Elems.get_calcs @{theory}, "ident");