1 (* Minimal Thydata for test/../thy-hierarchy *)
3 theory Test_Build_Thydata
4 imports "~~/src/Tools/isac/ProgLang/ProgLang"
9 fun termlessI (_: Rule.subst) uv = LibraryC.termless uv;
12 thm111: "thm111 = thm111 + (111::int)" and
13 thm222: "thm222 = thm222 + (222::int)"
16 val rls111 = Rule.Rls {id = "rls111",
17 preconds = [], rew_ord = ("termlessI", termlessI), erls = Rule.e_rls,
18 srls = Rule.Erls, calc = [], errpatts = [],
19 rules = [Rule.Thm ("thm111", @{thm thm111}), Rule.Thm ("refl", @{thm refl})],
22 val rls222 = Rule.Rls {id = "rls222",
23 preconds = [], rew_ord = ("termlessI", termlessI), erls = Rule.e_rls,
24 srls = Rule.Erls, calc = [], errpatts = [],
25 rules = [Rule.Thm ("sym_thm111", @{thm thm111} RS @{thm sym}), Rule.Thm ("o_def", @{thm o_def})],
28 val prep_rls' = LTool.prep_rls @{theory};
31 setup \<open>KEStore_Elems.add_rlss
32 [("rls111", (Context.theory_name @{theory}, prep_rls' rls111)),
33 ("rls222", (Context.theory_name @{theory}, prep_rls' rls222))]\<close>
40 val [aaa, bbb, ccc, ddd, eee] = KEStore_Elems.get_rlss @{theory};
43 case aaa of ("list_rls", _) => () | _ => error "test/../thy-hierarchy CHANGED 1";
44 case bbb of ("e_rls", _) => () | _ => error "test/../thy-hierarchy CHANGED 2";
45 case ccc of ("e_rrls", _) => () | _ => error "test/../thy-hierarchy CHANGED 3";
49 ("Test_Build_Thydata",
50 Rls {calc = [], erls =
51 Rls {calc = [], erls = Erls, errpatts = [], id = "e_rls", preconds = [], rew_ord =
52 ("dummy_ord", _), rules = [], scr = EmptyScr, srls = Erls},
53 errpatts = [], id = "rls111", preconds = [], rew_ord = ("termlessI", _), rules =
54 [Thm ("thm111", _), Thm ("refl", _)], scr =
55 Prog (Const ("HOL.eq", _) $ (Const ("Atools.auto_generated", _) $ Free ("t_t", _)) $ _),
57 | _ => error "test/../thy-hierarchy CHANGED 4";
61 ("Test_Build_Thydata",
62 Rls {calc = [], erls =
63 Rls {calc = [], erls = Erls, errpatts = [], id = "e_rls", preconds = [], rew_ord =
64 ("dummy_ord", _), rules = [], scr = EmptyScr, srls = Erls},
65 errpatts = [], id = "rls222", preconds = [], rew_ord = ("termlessI", _), rules =
66 [Thm ("sym_thm111", _), Thm ("o_def", _)],
68 Prog (Const ("HOL.eq", _) $ (Const ("Atools.auto_generated", _) $ Free ("t_t", _)) $ _),
70 | _ => error "test/../thy-hierarchy CHANGED 5";