src/Tools/isac/Knowledge/Test_Build_Thydata.thy
author Walther Neuper <wneuper@ist.tugraz.at>
Tue, 03 Apr 2018 17:29:54 +0200
changeset 59427 d7a39d815afa
parent 59416 229e5c9cf78b
child 59428 ba408e905cce
permissions -rw-r--r--
clean theory dependencies, partially
wneuper@59344
     1
(* Minimal Thydata for test/../thy-hierarchy *)
neuper@55408
     2
neuper@55408
     3
theory Test_Build_Thydata
neuper@55408
     4
imports "~~/src/Tools/isac/ProgLang/ProgLang"
neuper@55408
     5
begin
wneuper@59427
     6
neuper@55408
     7
ML {*
wneuper@59427
     8
open Rule
wneuper@59416
     9
fun termlessI (_: Rule.subst) uv = Term_Ord.termless uv;
neuper@55408
    10
*}
neuper@55408
    11
axiomatization where
neuper@55408
    12
  thm111: "thm111 = thm111 + (111::int)" and
neuper@55408
    13
  thm222: "thm222 = thm222 + (222::int)"
neuper@55408
    14
neuper@55408
    15
ML {*
wneuper@59416
    16
val rls111 = Rule.Rls {id = "rls111", 
wneuper@59416
    17
	preconds = [], rew_ord = ("termlessI", termlessI), erls = Rule.e_rls, 
wneuper@59416
    18
	srls = Rule.Erls, calc = [], errpatts = [],
wneuper@59416
    19
	rules = [Rule.Thm ("thm111", @{thm thm111}), Rule.Thm ("refl", @{thm refl})],
wneuper@59416
    20
	scr = Rule.EmptyScr};
neuper@55408
    21
wneuper@59416
    22
val rls222 = Rule.Rls {id = "rls222", 
wneuper@59416
    23
	preconds = [], rew_ord = ("termlessI", termlessI), erls = Rule.e_rls, 
wneuper@59416
    24
	srls = Rule.Erls, calc = [], errpatts = [],
wneuper@59416
    25
	rules = [Rule.Thm ("sym_thm111", @{thm thm111} RS @{thm sym}), Rule.Thm ("o_def", @{thm o_def})],
wneuper@59416
    26
	scr = Rule.EmptyScr};
s1210629013@55444
    27
wneuper@59427
    28
val prep_rls' = LTool.prep_rls @{theory ProgLang};
neuper@55408
    29
*}
neuper@55408
    30
neuper@55408
    31
setup {* KEStore_Elems.add_rlss 
wneuper@59427
    32
  [("rls111", (Context.theory_name @{theory ProgLang}, prep_rls' rls111)),
wneuper@59427
    33
   ("rls222", (Context.theory_name @{theory ProgLang}, prep_rls' rls222))] *}
neuper@55408
    34
neuper@55408
    35
ML {*
neuper@55408
    36
  @{thm refl};
neuper@55408
    37
  @{thm o_def};
wneuper@59427
    38
wneuper@59427
    39
val [aaa, bbb, ccc, ddd, eee] = KEStore_Elems.get_rlss @{theory};
wneuper@59427
    40
wneuper@59427
    41
case aaa of ("list_rls", _) => () | _ => error "test/../thy-hierarchy CHANGED 1";
wneuper@59427
    42
case bbb of ("e_rls", _) => () | _ => error "test/../thy-hierarchy CHANGED 2";
wneuper@59427
    43
case ccc of ("e_rrls", _) => () | _ => error "test/../thy-hierarchy CHANGED 3";
wneuper@59427
    44
case ddd of
wneuper@59427
    45
  ("rls111",
wneuper@59427
    46
    ("ProgLang",
wneuper@59427
    47
     Rls {calc = [], erls =
wneuper@59427
    48
          Rls {calc = [], erls = Erls, errpatts = [], id = "e_rls", preconds = [], rew_ord =
wneuper@59427
    49
               ("dummy_ord", _), rules = [], scr = EmptyScr, srls = Erls},
wneuper@59427
    50
          errpatts = [], id = "rls111", preconds = [], rew_ord = ("termlessI", _), rules =
wneuper@59427
    51
          [Thm ("thm111", _), Thm ("refl", _)], scr =
wneuper@59427
    52
          Prog (Const ("Script.Stepwise", _) $ Free ("t_t", _) $ _),
wneuper@59427
    53
          srls = Erls})) => ()
wneuper@59427
    54
| _ => error "test/../thy-hierarchy CHANGED 4";
wneuper@59427
    55
case eee of
wneuper@59427
    56
  ("rls222",
wneuper@59427
    57
    ("ProgLang",
wneuper@59427
    58
     Rls {calc = [], erls =
wneuper@59427
    59
          Rls {calc = [], erls = Erls, errpatts = [], id = "e_rls", preconds = [], rew_ord =
wneuper@59427
    60
               ("dummy_ord", _), rules = [], scr = EmptyScr, srls = Erls},
wneuper@59427
    61
          errpatts = [], id = "rls222", preconds = [], rew_ord = ("termlessI", _), rules =
wneuper@59427
    62
          [Thm ("sym_thm111", _), Thm ("o_def", _)],
wneuper@59427
    63
          scr =
wneuper@59427
    64
          Prog (Const ("Script.Stepwise", _) $ Free ("t_t", _) $ _),
wneuper@59427
    65
          srls = Erls})) => ()
wneuper@59427
    66
| _ => error "test/../thy-hierarchy CHANGED 5";
neuper@55408
    67
*}
neuper@55408
    68
wneuper@59427
    69
ML {*
wneuper@59427
    70
*} ML {*
wneuper@59427
    71
*}
neuper@55408
    72
end