1 (* Minimal Thydata for test/../thy-hierarchy *)
3 theory Test_Build_Thydata
4 imports "Specify.ProgLang"
9 fun termlessI (_: subst) uv = LibraryC.termless uv;
12 thm111: "thm111 = thm111 + (111::int)" and
13 thm222: "thm222 = thm222 + (222::int)"
16 val rls111 = Rule_Def.Repeat {id = "rls111",
17 preconds = [], rew_ord = ("termlessI", termlessI), erls = Rule_Set.empty,
18 srls = Rule_Set.Empty, calc = [], errpatts = [],
19 rules = [Rule.Thm ("thm111", @{thm thm111}), Rule.Thm ("refl", @{thm refl})],
20 scr = Rule.Empty_Prog};
22 val rls222 = Rule_Def.Repeat {id = "rls222",
23 preconds = [], rew_ord = ("termlessI", termlessI), erls = Rule_Set.empty,
24 srls = Rule_Set.Empty, calc = [], errpatts = [],
25 rules = [Rule.Thm ("sym_thm111", @{thm thm111} RS @{thm sym}), Rule.Thm ("o_def", @{thm o_def})],
26 scr = Rule.Empty_Prog};
28 val prep_rls' = Auto_Prog.prep_rls @{theory};
32 rls111 = \<open>prep_rls' rls111\<close> and
33 rls222 = \<open>prep_rls' rls222\<close>
40 val [aaa, bbb, ccc, ddd, eee] = KEStore_Elems.get_rlss @{theory};
42 if eq_set op = (map fst [aaa, bbb, ccc], ["e_rrls", "empty", "prog_expr"]) then ()
43 else raise ERROR "test/../thy-hierarchy CHANGED"
47 ("Test_Build_Thydata",
48 Rule_Def.Repeat {calc = [], erls =
49 Rule_Def.Repeat {calc = [], erls = Rule_Set.Empty, errpatts = [], id = "empty", preconds = [], rew_ord =
50 ("dummy_ord", _), rules = [], scr = Empty_Prog, srls = Rule_Set.Empty},
51 errpatts = [], id = "rls111", preconds = [], rew_ord = ("termlessI", _), rules =
52 [Thm ("thm111", _), Thm ("refl", _)], scr = Empty_Prog, srls = Rule_Set.Empty})) => ()
53 | _ => raise ERROR "test/../thy-hierarchy CHANGED 4";
57 ("Test_Build_Thydata",
58 Rule_Def.Repeat {calc = [], erls =
59 Rule_Def.Repeat {calc = [], erls = Rule_Set.Empty, errpatts = [], id = "empty", preconds = [], rew_ord =
60 ("dummy_ord", _), rules = [], scr = Empty_Prog, srls = Rule_Set.Empty},
61 errpatts = [], id = "rls222", preconds = [], rew_ord = ("termlessI", _), rules =
62 [Thm ("sym_thm111", _), Thm ("o_def", _)], scr = Empty_Prog, srls = Rule_Set.Empty})) => ()
63 | _ => raise ERROR "test/../thy-hierarchy CHANGED 5";