1 theory Thy_3 imports Thy_2 Thy_2b begin
3 ML \<open>val test_list_rls =
4 Rule_Set.append_rules "test_list_rls" Rule_Set.empty [\<^rule_thm>\<open>not_def\<close>]\<close>
6 setup \<open>Test_KEStore_Elems.add_rlss (*already added in Thy_1.thy and Thy_2.thy*)
7 [("test_list_rls", (Context.theory_name @{theory}, test_list_rls))]\<close>
10 if length (Test_KEStore_Elems.get_rlss @{theory}) = 1 (*stored in 3 different theories*)
11 then () else error "rls identified by string-identifier, not by theory: changed"
13 (*test_ruleset' := overwritelthy @{theory} (! test_ruleset', [("test_list_rls",
14 Rule_Set.append_rules "test_list_rls" test_list_rls [Eval ("test_function", e_evalfn)])])*)
16 (*if length (Test_KEStore_Elems.get_rlss @{theory}) = length (! test_ruleset')
17 then () else error "Test_KEStore_Elems.get_rlss = test_ruleset': changed"*)
19 val SOME (_, Rule_Set.Repeat {rules, ...}) =
20 AList.lookup op= (Test_KEStore_Elems.get_rlss @{theory}) "test_list_rls"
23 [Rule.Thm ("not_def", _)] => ()
24 | _ => error "union rls_eq changed: 1st argument is NOT overwritten anymore"
25 (* merge rules of rls with the same Rule_Set.id must be done one level higher:
26 Test_KEStore_Elems.add_rlss does *add* or *overwrite* *)