replace Celem. with new struct.s in BaseDefinitions/
Note: the remaining code in calcelems.sml shall be destributed to respective struct.s
1.1 --- a/src/Tools/isac/BaseDefinitions/calcelems.sml Tue Apr 21 12:26:08 2020 +0200
1.2 +++ b/src/Tools/isac/BaseDefinitions/calcelems.sml Tue Apr 21 15:42:50 2020 +0200
1.3 @@ -10,20 +10,20 @@
1.4
1.5 signature CALC_ELEMENT =
1.6 sig
1.7 -(*/------- to Celem7 -------\*)
1.8 +(*/------- to Celem7 -------\* )
1.9 type cas_elem
1.10 val cas_eq: cas_elem * cas_elem -> bool
1.11 -(*\------- to Celem7 -------/*)
1.12 +( *\------- to Celem7 -------/*)
1.13
1.14 -(*/------- to Celem5 -------\*)
1.15 +(*/------- to Celem5 -------\* )
1.16 type pbt = Probl_Def.T
1.17 val e_pbt: pbt;
1.18 val e_Ptyp: pbt Store.node
1.19 type ptyps = Probl_Def.store
1.20 val pbts2str: pbt list -> string
1.21 -(*\------- to Celem5 -------/*)
1.22 +( *\------- to Celem5 -------/*)
1.23
1.24 -(*/------- to Spec -------\*)
1.25 +(*/------- to Spec -------\* )
1.26 type metID
1.27 type pblID
1.28 type spec
1.29 @@ -33,22 +33,22 @@
1.30 val e_metID: metID
1.31 val empty_spec: spec
1.32 val e_spec: spec
1.33 -(*\------- to Spec -------/*)
1.34 +( *\------- to Spec -------/*)
1.35
1.36 -(*/------- to Store -------\*)
1.37 +(*/------- to Store -------\* )
1.38 (*datatype 'a ptyp = Ptyp of string * 'a list * 'a ptyp list\*)
1.39 val merge_ptyps: 'a Store.T * 'a Store.T -> 'a Store.T
1.40 - val insrt: pblID -> 'a -> string list -> 'a Store.T -> 'a Store.T
1.41 - val get_py: 'a Store.T -> pblID -> string list -> 'a
1.42 + val insrt: Spec.pblID -> 'a -> string list -> 'a Store.T -> 'a Store.T
1.43 + val get_py: 'a Store.T -> Spec.pblID -> string list -> 'a
1.44 val update_ptyps: string list -> string list -> 'a -> 'a Store.T -> 'a Store.T
1.45 - val app_py: 'a Store.T -> ('a Store.node -> 'b) -> pblID -> string list -> 'b
1.46 -(*\------- to Store -------/*)
1.47 + val app_py: 'a Store.T -> ('a Store.node -> 'b) -> Spec.pblID -> string list -> 'b
1.48 +( *\------- to Store -------/*)
1.49
1.50 -(*/------- to Celem2 -------\*)
1.51 +(*/------- to Celem2 -------\* )
1.52 type guh
1.53 -(*\------- to Celem2 -------/*)
1.54 +( *\------- to Celem2 -------/*)
1.55
1.56 -(*/------- to Celem8 -------\*)
1.57 +(*/------- to Celem8 -------\* )
1.58 type authors = Thy_Html.authors
1.59 datatype thydata = datatype Thy_Html.thydata
1.60 type theID = Thy_Html.theID
1.61 @@ -57,32 +57,32 @@
1.62 val thes2str: thydata list -> string
1.63 val theID2thyID: theID -> ThyC.id
1.64
1.65 - val part2guh: theID -> guh
1.66 - val thy2guh: theID -> guh
1.67 - val thypart2guh: theID -> guh
1.68 - val thm2guh: string * ThyC.id -> ThmC_Def.id -> guh
1.69 - val rls2guh: string * ThyC.id -> Rule_Set.id -> guh
1.70 - val cal2guh: string * ThyC.id -> string -> guh
1.71 + val part2guh: theID -> Check_Unique.guh
1.72 + val thy2guh: theID -> Check_Unique.guh
1.73 + val thypart2guh: theID -> Check_Unique.guh
1.74 + val thm2guh: string * ThyC.id -> ThmC_Def.id -> Check_Unique.guh
1.75 + val rls2guh: string * ThyC.id -> Rule_Set.id -> Check_Unique.guh
1.76 + val cal2guh: string * ThyC.id -> string -> Check_Unique.guh
1.77 val ord2guh: string * ThyC.id -> string -> string
1.78 - val theID2guh: theID -> guh
1.79 + val theID2guh: theID -> Check_Unique.guh
1.80
1.81 val add_thydata: string list * string list -> thydata -> thydata Store.T -> thydata Store.T
1.82 val update_hthm: thydata -> Error_Fill_Def.fillpat list -> thydata
1.83 -(*\------- to Celem8 -------/*)
1.84 +( *\------- to Celem8 -------/*)
1.85
1.86 -(*/------- to Celem6 -------\*)
1.87 +(*/------- to Celem6 -------\* )
1.88 type met = Meth_Def.T
1.89 type mets = Meth_Def.store
1.90 val e_Mets: met Store.node
1.91 -(*\------- to Celem6 -------/*)
1.92 +( *\------- to Celem6 -------/*)
1.93
1.94 -(*/------- to Celem91 -------\*)
1.95 +(*/------- to Celem91 -------\* )
1.96 val check_guhs_unique: bool Unsynchronized.ref
1.97 - val coll_pblguhs: pbt Store.T -> guh list
1.98 - val check_pblguh_unique: guh -> pbt Store.T -> unit
1.99 - val coll_metguhs: met Store.T -> guh list
1.100 - val check_metguh_unique: guh -> met Store.T -> unit
1.101 -(*\------- to Celem91 -------/*)
1.102 + val coll_pblguhs: Probl_Def.T Store.T -> Check_Unique.guh list
1.103 + val check_pblguh_unique: Check_Unique.guh -> Probl_Def.T Store.T -> unit
1.104 + val coll_metguhs: Meth_Def.T Store.T -> Check_Unique.guh list
1.105 + val check_metguh_unique: Check_Unique.guh -> Meth_Def.T Store.T -> unit
1.106 +( *\------- to Celem91 -------/*)
1.107
1.108 val linefeed: string -> string
1.109 val trace_calc: bool Unsynchronized.ref
1.110 @@ -91,10 +91,13 @@
1.111 datatype ketype = Exp_ | Met_ | Pbl_ | Thy_
1.112 type kestoreID
1.113 val ketype2str: ketype -> string
1.114 -(*/------- to Celem4 -------\*)
1.115 +
1.116 +(*/------- to Celem4 -------\* )
1.117 type pat = Celem4.pat
1.118 val pats2str: pat list -> string
1.119 -(*\------- to Celem4 -------/*)
1.120 + val pats2str' : Celem4.pat list -> string
1.121 +( *\------- to Celem4 -------/*)
1.122 +
1.123 val maxthy: theory -> theory -> theory
1.124 eqtype filename
1.125 val lim_deriv: int Unsynchronized.ref
1.126 @@ -105,18 +108,17 @@
1.127 val ketype2str': ketype -> string
1.128 val str2ketype': string -> ketype
1.129 eqtype filepath
1.130 - val update_hrls: thydata -> Error_Fill_Def.errpatID list -> thydata
1.131 + val update_hrls: Thy_Html.thydata -> Error_Fill_Def.errpatID list -> Thy_Html.thydata
1.132 eqtype iterID
1.133 eqtype calcID
1.134
1.135 (* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
1.136 - val pats2str' : pat list -> string
1.137 - val insert_fillpats: thydata Store.T -> (pblID * Error_Fill_Def.fillpat list) list -> thydata Store.T ->
1.138 - thydata Store.T
1.139 + val insert_fillpats: Thy_Html.thydata Store.T -> (Spec.pblID * Error_Fill_Def.fillpat list) list -> Thy_Html.thydata Store.T ->
1.140 + Thy_Html.thydata Store.T
1.141 (*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
1.142 val knowthys: unit -> theory list
1.143 (*/------- to Celem6 -------\*)
1.144 - val e_met: met
1.145 + val e_met: Meth_Def.T
1.146 (*\------- to Celem6 -------/*)
1.147 ( *\--- ! aktivate for Test_Isac END ----------------------------------------------------------/*)
1.148
2.1 --- a/src/Tools/isac/BridgeLibisabelle/datatypes.sml Tue Apr 21 12:26:08 2020 +0200
2.2 +++ b/src/Tools/isac/BridgeLibisabelle/datatypes.sml Tue Apr 21 15:42:50 2020 +0200
2.3 @@ -38,10 +38,10 @@
2.4 val precond2xml : int -> bool * Term.term -> Celem.xml
2.5 val preconds2xml : int -> (bool * Term.term) list -> Celem.xml
2.6 val rls2xml : int -> ThyC.id * Rule_Set.T -> Celem.xml
2.7 - val rule2xml : int -> Celem.guh -> Rule.rule -> Celem.xml
2.8 - val rules2xml : int -> Celem.guh -> Rule.rule list -> Celem.xml
2.9 + val rule2xml : int -> Check_Unique.guh -> Rule.rule -> Celem.xml
2.10 + val rules2xml : int -> Check_Unique.guh -> Rule.rule list -> Celem.xml
2.11 val scr2xml : int -> Program.T -> Celem.xml
2.12 - val spec2xml : int -> Celem.spec -> Celem.xml
2.13 + val spec2xml : int -> Spec.spec -> Celem.xml
2.14 val sub2xml : int -> Term.term * Term.term -> Celem.xml
2.15 val subs2xml : int -> Selem.subs -> Celem.xml
2.16 val subst2xml : int -> UnparseC.subst -> Celem.xml
2.17 @@ -79,7 +79,7 @@
2.18 fun calc2xml j (thyID, (scrop, (rewop, _))) =
2.19 indt j ^ "<CALC>\n" ^
2.20 indt (j+i) ^ "<STRING>\n" ^ scrop ^ "</STRING>\n" ^
2.21 - indt (j+i) ^ "<GUH>\n" ^ Celem.cal2guh ("IsacKnowledge",
2.22 + indt (j+i) ^ "<GUH>\n" ^ Thy_Html.cal2guh ("IsacKnowledge",
2.23 thyID) scrop ^ "</GUH>\n" ^
2.24 indt (j+i) ^ "<TERMOP>\n" ^ rewop ^ "</TERMOP>\n" ^
2.25 indt j ^ "</CALC>\n";
2.26 @@ -98,7 +98,7 @@
2.27 indt (j+i) ^ "<TAG> Theorem </TAG>\n" ^
2.28 indt (j+i) ^ "<STRING> " ^ ThmC.cut_id thmDeriv ^ " </STRING>\n" ^
2.29 indt (j+i) ^ "<GUH> " ^
2.30 - Celem.thm2guh (Rtools.thy_containing_thm thmDeriv) (ThmC.cut_id thmDeriv) ^ " </GUH>\n" ^
2.31 + Thy_Html.thm2guh (Rtools.thy_containing_thm thmDeriv) (ThmC.cut_id thmDeriv) ^ " </GUH>\n" ^
2.32 indt j ^ "</RULE>\n"
2.33 | rule2xml _ _ (Rule.Eval (_(*termop*), _)) = ""
2.34 (*FIXXXXXXXME.WN060714 in rls make Eval : calc -> rule [add scriptop!]
2.35 @@ -116,7 +116,7 @@
2.36 indt j ^ "<RULE>\n" ^
2.37 indt (j+i) ^ "<TAG> Ruleset </TAG>\n" ^
2.38 indt (j+i) ^ "<STRING> " ^ rls' ^ " </STRING>\n" ^
2.39 - indt (j+i) ^ "<GUH> " ^ Celem.rls2guh (Rtools.thy_containing_rls thyID rls') rls' ^ " </GUH>\n" ^
2.40 + indt (j+i) ^ "<GUH> " ^ Thy_Html.rls2guh (Rtools.thy_containing_rls thyID rls') rls' ^ " </GUH>\n" ^
2.41 indt j ^ "</RULE>\n"
2.42 end;
2.43 fun rules2xml _ _ [] = ""
2.44 @@ -161,7 +161,7 @@
2.45 indt (j+i) ^ "<URL> " ^ url ^ " </URL>\n" ^
2.46 indt j ^ "</EXTREF>\n";
2.47 fun theref2xml j thyID typ xstring =
2.48 - let val guh = Celem.theID2guh ["IsacKnowledge", thyID, typ, xstring]
2.49 + let val guh = Thy_Html.theID2guh ["IsacKnowledge", thyID, typ, xstring]
2.50 val typ' = (implode o (drop_last_n 1) o Symbol.explode) typ
2.51 in indt j ^ "<KESTOREREF>\n" ^
2.52 indt (j+i) ^ "<TAG> " ^ typ' ^ " </TAG>\n" ^
2.53 @@ -204,7 +204,7 @@
2.54 fun calcref2xml j (thyID, (scrop, (_(*rewop*), _))) =
2.55 indt j ^ "<CALCREF>\n" ^
2.56 indt (j+i) ^ "<STRING> " ^ scrop ^ "</STRING>\n" ^
2.57 - indt (j+i) ^ "<GUH> " ^ Celem.cal2guh ("IsacKnowledge",
2.58 + indt (j+i) ^ "<GUH> " ^ Thy_Html.cal2guh ("IsacKnowledge",
2.59 thyID) scrop ^ " </GUH>\n" ^
2.60 indt j ^ "</CALCREF>\n";
2.61 fun calcrefs2xml _ (_,[]) = ""
2.62 @@ -244,13 +244,13 @@
2.63 indt (j+i) ^"<ERLS>\n" ^
2.64 indt (j+2*i) ^ "<TAG> Ruleset </TAG>\n" ^
2.65 indt (j+2*i) ^ "<STRING> " ^ Rule_Set.id erls ^ " </STRING>\n" ^
2.66 - indt (j+2*i) ^ "<GUH> " ^ Celem.rls2guh ("IsacKnowledge", thyID)
2.67 + indt (j+2*i) ^ "<GUH> " ^ Thy_Html.rls2guh ("IsacKnowledge", thyID)
2.68 (Rule_Set.id erls) ^ " </GUH>\n" ^
2.69 indt (j+i) ^"</ERLS>\n" ^
2.70 indt (j+i) ^"<SRLS>\n" ^
2.71 indt (j+2*i) ^ "<TAG> Ruleset </TAG>\n" ^
2.72 indt (j+2*i) ^ "<STRING> " ^ Rule_Set.id erls ^ " </STRING>\n" ^
2.73 - indt (j+2*i) ^ "<GUH> " ^ Celem.rls2guh ("IsacKnowledge", thyID)
2.74 + indt (j+2*i) ^ "<GUH> " ^ Thy_Html.rls2guh ("IsacKnowledge", thyID)
2.75 (Rule_Set.id srls) ^ " </GUH>\n" ^
2.76 indt (j+i) ^"</SRLS>\n" ^
2.77 calcrefs2xml (j+i) (thyID, calc) ^
2.78 @@ -275,7 +275,7 @@
2.79 indt (j+i) ^"<ERLS> " ^
2.80 indt (j+2*i) ^ "<TAG> Ruleset </TAG>\n" ^
2.81 indt (j+2*i) ^ "<STRING> " ^ Rule_Set.id erls ^ " </STRING>\n" ^
2.82 - indt (j+2*i) ^ "<GUH> " ^ Celem.rls2guh ("IsacKnowledge", thyID) (Rule_Set.id erls) ^ " </GUH>\n" ^
2.83 + indt (j+2*i) ^ "<GUH> " ^ Thy_Html.rls2guh ("IsacKnowledge", thyID) (Rule_Set.id erls) ^ " </GUH>\n" ^
2.84 indt (j+i) ^"</ERLS>\n" ^
2.85 calcrefs2xml (j+i) (thyID, calc) ^
2.86 indt (j+i) ^"<SCRIPT>\n"^
2.87 @@ -641,7 +641,7 @@
2.88 | xml_to_tac x = raise ERROR ("xml_to_tac: not impl. for " ^ xmlstr 0 x);
2.89
2.90 val e_pblterm = (Thm.term_of o the o (TermC.parse @{theory Prog_Tac}))
2.91 - ("Problem (" ^ ThyC.id_empty ^ "," ^ strs2str' Celem.e_pblID ^ ")");
2.92 + ("Problem (" ^ ThyC.id_empty ^ "," ^ strs2str' Spec.e_pblID ^ ")");
2.93
2.94 (*WN051224 minimal adaption to exporting Formulae _only_ by getFormulaeFromTo*)
2.95 fun xml_of_posterm (p, t, _) =
2.96 @@ -665,7 +665,7 @@
2.97 (i+i, snd (thy_containing_rls thy' prls'), "Rulesets", prls');
2.98 *)
2.99 fun theref2xml j thyID typ xstring =
2.100 - let val guh = Celem.theID2guh ["IsacKnowledge", thyID, typ, xstring]
2.101 + let val guh = Thy_Html.theID2guh ["IsacKnowledge", thyID, typ, xstring]
2.102 val typ' = (implode o (drop_last_n 1) o Symbol.explode) typ
2.103 in indt j ^ "<KESTOREREF>\n" ^
2.104 indt (j+i) ^ "<TAG> " ^ typ' ^ " </TAG>\n" ^
2.105 @@ -675,7 +675,7 @@
2.106 end;
2.107 fun xml_of_theref thyid typ xstring =
2.108 let
2.109 - val guh = Celem.theID2guh ["IsacKnowledge", thyid, typ, xstring]
2.110 + val guh = Thy_Html.theID2guh ["IsacKnowledge", thyid, typ, xstring]
2.111 val typ' = (implode o (drop_last_n 1) o Symbol.explode) typ
2.112 in
2.113 XML.Elem (("KESTOREREF", []),[
3.1 --- a/src/Tools/isac/BridgeLibisabelle/interface.sml Tue Apr 21 12:26:08 2020 +0200
3.2 +++ b/src/Tools/isac/BridgeLibisabelle/interface.sml Tue Apr 21 15:42:50 2020 +0200
3.3 @@ -15,7 +15,7 @@
3.4 val autoCalculate : Celem.calcID -> Solve.auto -> XML.tree (*unit future*)
3.5 val applyTactic : Celem.calcID -> Pos.pos' -> Tactic.input -> XML.tree
3.6 val CalcTree : Selem.fmz list -> XML.tree
3.7 - val checkContext : Celem.calcID -> Pos.pos' -> Celem.guh -> XML.tree
3.8 + val checkContext : Celem.calcID -> Pos.pos' -> Check_Unique.guh -> XML.tree
3.9 val DEconstrCalcTree : Celem.calcID -> XML.tree
3.10 val fetchApplicableTactics : Celem.calcID -> int -> Pos.pos' -> XML.tree
3.11 val fetchProposedTactic : Celem.calcID -> XML.tree
3.12 @@ -47,14 +47,14 @@
3.13 val moveRoot : Celem.calcID -> XML.tree
3.14 val moveUp : Celem.calcID -> Pos.pos' -> XML.tree
3.15 val refFormula : Celem.calcID -> Pos.pos' -> XML.tree
3.16 - val refineProblem : Celem.calcID -> Pos.pos' -> Celem.guh -> XML.tree
3.17 + val refineProblem : Celem.calcID -> Pos.pos' -> Check_Unique.guh -> XML.tree
3.18 val replaceFormula : Celem.calcID -> TermC.as_string -> XML.tree
3.19 val requestFillformula : Celem.calcID -> Error_Fill_Def.errpatID * Error_Fill_Def.fillpatID -> XML.tree
3.20 val resetCalcHead : Celem.calcID -> XML.tree
3.21 - val setContext : Celem.calcID -> Pos.pos' -> Celem.guh -> XML.tree
3.22 - val setMethod : Celem.calcID -> Celem.metID -> XML.tree
3.23 + val setContext : Celem.calcID -> Pos.pos' -> Check_Unique.guh -> XML.tree
3.24 + val setMethod : Celem.calcID -> Spec.metID -> XML.tree
3.25 val setNextTactic : Celem.calcID -> Tactic.input -> XML.tree
3.26 - val setProblem : Celem.calcID -> Celem.pblID -> XML.tree
3.27 + val setProblem : Celem.calcID -> Spec.pblID -> XML.tree
3.28 val setTheory : Celem.calcID -> ThyC.id -> XML.tree
3.29 (*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
3.30 (* NONE *)
4.1 --- a/src/Tools/isac/BridgeLibisabelle/pbl-met-hierarchy.sml Tue Apr 21 12:26:08 2020 +0200
4.2 +++ b/src/Tools/isac/BridgeLibisabelle/pbl-met-hierarchy.sml Tue Apr 21 15:42:50 2020 +0200
4.3 @@ -115,7 +115,7 @@
4.4 val i = indentation;
4.5
4.6 (* new version with <KESTOREREF>s -- not used *)
4.7 -fun pbl2xml (id:(*pblRD*)Celem.pblID) ({guh,mathauthors,init,cas,met,ppc,prls,
4.8 +fun pbl2xml (id:(*pblRD*)Spec.pblID) ({guh,mathauthors,init,cas,met,ppc,prls,
4.9 thy,where_}:Problem.T) =
4.10 let val thy' = Context.theory_name thy
4.11 val prls' = (#id o Rule_Set.rep) prls
4.12 @@ -149,7 +149,7 @@
4.13 "</NODECONTENT>" : Celem.xml
4.14 end;
4.15 (* old version with 'dead' strings for rls, calc, ....* *)
4.16 -fun pbl2xml (id:(*pblRD*)Celem.pblID) ({guh,mathauthors,init,cas,met,ppc,prls,
4.17 +fun pbl2xml (id:(*pblRD*)Spec.pblID) ({guh,mathauthors,init,cas,met,ppc,prls,
4.18 thy,where_}:Problem.T) =
4.19 "<NODECONTENT>\n" ^
4.20 indt i ^ "<GUH> " ^ guh ^ " </GUH>\n" ^
4.21 @@ -181,7 +181,7 @@
4.22
4.23
4.24 (**. write pbls from hierarchy to files.**)
4.25 -fun pbl2file (path: Celem.filepath) (pos: Pos.pos) (id:Celem.metID) (pbl as {guh,...}) =
4.26 +fun pbl2file (path: Celem.filepath) (pos: Pos.pos) (id:Spec.metID) (pbl as {guh,...}) =
4.27 (writeln ("### pbl2file: id = " ^ strs2str id ^ ", pos = " ^ Pos.pos2str pos);
4.28 ((str2file (path ^ Rtools.guh2filename guh)) o (pbl2xml id)) pbl
4.29 );
4.30 @@ -191,7 +191,7 @@
4.31 new version with <KESTOREREF>s -- not used because linking
4.32 requires elements (rls, calc, ...) to be reorganized.*)
4.33 (*######## ATTENTION: THIS IS not THE ACTUAL VERSION ################*)
4.34 -fun met2xml (id: Celem.metID) ({guh,mathauthors,init,ppc,pre,scr,calc,
4.35 +fun met2xml (id: Spec.metID) ({guh,mathauthors,init,ppc,pre,scr,calc,
4.36 crls,erls,errpats,nrls,prls,srls,rew_ord'}: Method.T) =
4.37 let val thy' = "Isac_Knowledge" (*FIXME.WN0607 get thy from met ?!?*)
4.38 val crls' = (#id o Rule_Set.rep) crls
4.39 @@ -229,7 +229,7 @@
4.40 end;
4.41 (*.format a method in xml for presentation on the method browser;
4.42 old version with 'dead' strings for rls, calc, ....*)
4.43 -fun met2xml (id: Celem.metID) ({guh,mathauthors,init,ppc,pre,scr,calc,
4.44 +fun met2xml (id: Spec.metID) ({guh,mathauthors,init,ppc,pre,scr,calc,
4.45 crls,erls,errpats,nrls,prls,srls,rew_ord'}: Method.T) =
4.46 "<NODECONTENT>\n" ^
4.47 indt i ^ "<GUH> " ^ guh ^ " </GUH>\n" ^
4.48 @@ -254,12 +254,12 @@
4.49 *)
4.50
4.51 (*.write the files using an int-key (pos') as filename.*)
4.52 -fun met2file (path: Celem.filepath) (pos: Pos.pos) (id: Celem.metID) met =
4.53 +fun met2file (path: Celem.filepath) (pos: Pos.pos) (id: Spec.metID) met =
4.54 (writeln ("### met2file: id = " ^ strs2str id);
4.55 ((str2file (path ^ "met" ^ pos2filename pos)) o (met2xml id)) met);
4.56
4.57 (*.write the files using the guh as filename.*)
4.58 -fun met2file (path: Celem.filepath) (pos: Pos.pos) (id: Celem.metID) (met as {guh,...}) =
4.59 +fun met2file (path: Celem.filepath) (pos: Pos.pos) (id: Spec.metID) (met as {guh,...}) =
4.60 (writeln ("### met2file: id = " ^ strs2str id);
4.61 ((str2file (path ^ Rtools.guh2filename guh)) o (met2xml id)) met);
4.62
5.1 --- a/src/Tools/isac/BridgeLibisabelle/thy-hierarchy.sml Tue Apr 21 12:26:08 2020 +0200
5.2 +++ b/src/Tools/isac/BridgeLibisabelle/thy-hierarchy.sml Tue Apr 21 15:42:50 2020 +0200
5.3 @@ -6,32 +6,32 @@
5.4
5.5 signature THEORY_HIERARCHY =
5.6 sig
5.7 - val collect_cals: string * ThyC.id -> (Celem.theID * Celem.thydata) list
5.8 - val collect_isab: string -> string * thm -> Celem.theID * Celem.thydata
5.9 - val collect_ords: 'a * ThyC.id -> (Celem.theID * Celem.thydata) list
5.10 - val collect_part: string -> theory -> theory list -> (Celem.theID * Celem.thydata) list
5.11 + val collect_cals: string * ThyC.id -> (Thy_Html.theID * Thy_Html.thydata) list
5.12 + val collect_isab: string -> string * thm -> Thy_Html.theID * Thy_Html.thydata
5.13 + val collect_ords: 'a * ThyC.id -> (Thy_Html.theID * Thy_Html.thydata) list
5.14 + val collect_part: string -> theory -> theory list -> (Thy_Html.theID * Thy_Html.thydata) list
5.15 val collect_rlss: string -> (Rule_Set.id * (ThyC.id * Rule_Set.T)) list -> theory list ->
5.16 - (Celem.theID * Celem.thydata) list
5.17 - val collect_thms: string -> theory -> (Celem.theID * Celem.thydata) list
5.18 + (Thy_Html.theID * Thy_Html.thydata) list
5.19 + val collect_thms: string -> theory -> (Thy_Html.theID * Thy_Html.thydata) list
5.20
5.21 val hierarchy_guh: 'a Store.T -> string
5.22 - val insert_errpatIDs: 'a -> Celem.theID -> Error_Fill_Def.errpatID list ->
5.23 - Celem.thydata * Celem.theID
5.24 + val insert_errpatIDs: 'a -> Thy_Html.theID -> Error_Fill_Def.errpatID list ->
5.25 + Thy_Html.thydata * Thy_Html.theID
5.26
5.27 - val makeHcal: string * ThyC.id -> string * Rule_Def.calc -> Celem.theID * Celem.thydata
5.28 + val makeHcal: string * ThyC.id -> string * Rule_Def.calc -> Thy_Html.theID * Thy_Html.thydata
5.29 val makeHord: string * ThyC.id -> string * ((term * term) list -> term * term -> bool) ->
5.30 - Celem.theID * Celem.thydata
5.31 + Thy_Html.theID * Thy_Html.thydata
5.32 val makeHrls: string -> Rule_Set.id * (ThyC.id * Rule_Def.rule_set) ->
5.33 - Celem.theID * Celem.thydata
5.34 - val makeHthm: string * ThyC.id -> thm -> Celem.theID * Celem.thydata
5.35 - val make_cal: theory -> Rule_Def.calc -> Celem.authors -> Celem.thydata * Celem.theID
5.36 - val make_isa: theory -> ThyC.id * ThyC.id -> Celem.authors ->
5.37 - Celem.thydata * Celem.theID
5.38 - val make_ord: theory -> ((term * term) list -> term * term -> bool) -> Celem.authors ->
5.39 - Celem.thydata * Celem.theID
5.40 - val make_rls: theory -> Rule_Def.rule_set -> Celem.authors -> Celem.thydata * Celem.theID
5.41 - val make_thm: theory -> string -> string * thm -> Celem.authors -> Celem.thydata * Celem.theID
5.42 - val make_thy: theory -> Celem.authors -> Celem.thydata * Celem.theID
5.43 + Thy_Html.theID * Thy_Html.thydata
5.44 + val makeHthm: string * ThyC.id -> thm -> Thy_Html.theID * Thy_Html.thydata
5.45 + val make_cal: theory -> Rule_Def.calc -> Thy_Html.authors -> Thy_Html.thydata * Thy_Html.theID
5.46 + val make_isa: theory -> ThyC.id * ThyC.id -> Thy_Html.authors ->
5.47 + Thy_Html.thydata * Thy_Html.theID
5.48 + val make_ord: theory -> ((term * term) list -> term * term -> bool) -> Thy_Html.authors ->
5.49 + Thy_Html.thydata * Thy_Html.theID
5.50 + val make_rls: theory -> Rule_Def.rule_set -> Thy_Html.authors -> Thy_Html.thydata * Thy_Html.theID
5.51 + val make_thm: theory -> string -> string * thm -> Thy_Html.authors -> Thy_Html.thydata * Thy_Html.theID
5.52 + val make_thy: theory -> Thy_Html.authors -> Thy_Html.thydata * Thy_Html.theID
5.53
5.54 val show_thes: unit -> unit
5.55
5.56 @@ -40,8 +40,8 @@
5.57 val thms_of_rlss: theory -> (Rule_Set.id * (ThyC.id * Rule_Def.rule_set)) list ->
5.58 (string * thm) list
5.59 val thy_hierarchy2file: Celem.filepath -> unit
5.60 - val thydata2file: Celem.filepath -> Pos.pos -> Celem.theID -> Celem.thydata -> unit
5.61 - val thydata2xml: Celem.theID * Celem.thydata -> Celem.xml
5.62 + val thydata2file: Celem.filepath -> Pos.pos -> Thy_Html.theID -> Thy_Html.thydata -> unit
5.63 + val thydata2xml: Thy_Html.theID * Thy_Html.thydata -> Celem.xml
5.64 (* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
5.65 (*NONE*)
5.66 (*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
5.67 @@ -73,23 +73,23 @@
5.68 (* wrap theory-data into the uniform type thydata *)
5.69
5.70 fun makeHthm (part : string, thyID : ThyC.id) (thm : thm) =
5.71 - let val theID = [part, thyID, "Theorems"] @ [ThmC.id_of_thm thm] : Celem.theID
5.72 - in (theID, Celem.Hthm {guh = Celem.theID2guh theID, coursedesign = [],
5.73 + let val theID = [part, thyID, "Theorems"] @ [ThmC.id_of_thm thm] : Thy_Html.theID
5.74 + in (theID, Thy_Html.Hthm {guh = Thy_Html.theID2guh theID, coursedesign = [],
5.75 mathauthors = ["isac-team"], fillpats = [], thm = thm})
5.76 end;
5.77 fun makeHrls (part : string) (rls' : Rule_Set.id, thy_rls as (thyID, rls): ThyC.id * Rule_Set.T) =
5.78 - let val theID = [part, thyID,"Rulesets"] @ [rls'] : Celem.theID
5.79 - in (theID, Celem.Hrls {guh = Celem.theID2guh theID, coursedesign = [],
5.80 + let val theID = [part, thyID,"Rulesets"] @ [rls'] : Thy_Html.theID
5.81 + in (theID, Thy_Html.Hrls {guh = Thy_Html.theID2guh theID, coursedesign = [],
5.82 mathauthors = ["isac-team"], thy_rls = thy_rls})
5.83 end;
5.84 fun makeHcal (part : string, thyID : ThyC.id) (calID, cal) =
5.85 - let val theID = [part, thyID,"Operations"] @ [calID] : Celem.theID
5.86 - in (theID, Celem.Hcal {guh = Celem.theID2guh theID, coursedesign=[],
5.87 + let val theID = [part, thyID,"Operations"] @ [calID] : Thy_Html.theID
5.88 + in (theID, Thy_Html.Hcal {guh = Thy_Html.theID2guh theID, coursedesign=[],
5.89 mathauthors = ["isac-team"], calc = cal})
5.90 end;
5.91 fun makeHord (part : string, thyID : ThyC.id) (ordID, ord) =
5.92 - let val theID = [part, thyID,"TODO-Orders"] @ [ordID] : Celem.theID
5.93 - in (theID, Celem.Hord {guh = Celem.theID2guh theID, coursedesign=[],
5.94 + let val theID = [part, thyID,"TODO-Orders"] @ [ordID] : Thy_Html.theID
5.95 + in (theID, Thy_Html.Hord {guh = Thy_Html.theID2guh theID, coursedesign=[],
5.96 mathauthors = ["isac-team"], ord = ord})
5.97 end;
5.98
5.99 @@ -114,7 +114,7 @@
5.100 in map (makeHcal (part, thy')) cals end;
5.101 fun collect_ords (part, thy') =
5.102 let val thy = ThyC.get_theory thy'
5.103 - in [(*TODO.WN060120 rew_ord, Eval*)]:(Celem.theID * Celem.thydata) list end;
5.104 + in [(*TODO.WN060120 rew_ord, Eval*)]:(Thy_Html.theID * Thy_Html.thydata) list end;
5.105
5.106 (* parts are: Isabelle | IsacKnowledge | IsacScripts, see Know_Store.thy *)
5.107 fun collect_part part parent thys =
5.108 @@ -127,7 +127,7 @@
5.109 let val theID =
5.110 [isa, ThyC.cut_id thmDeriv, "Theorems", ThmC.cut_id thmDeriv]
5.111 in
5.112 - (theID: Celem.theID, Celem.Hthm {guh = Celem.theID2guh theID,
5.113 + (theID: Thy_Html.theID, Thy_Html.Hthm {guh = Thy_Html.theID2guh theID,
5.114 mathauthors = ["Isabelle team, TU Munich"],
5.115 coursedesign = [],
5.116 fillpats = [],
5.117 @@ -153,7 +153,7 @@
5.118 (indt i) ^ "<NODE>\n" ^
5.119 (indt (i+j)) ^ "<ID> " ^ id ^ " </ID>\n" ^
5.120 (indt (i+j)) ^ "<NO> " (*on this level*) ^ (string_of_int o last_elem) p' ^ " </NO>\n" ^
5.121 - (indt (i+j)) ^ "<CONTENTREF> " ^ Celem.theID2guh theID' ^ " </CONTENTREF>\n" ^
5.122 + (indt (i+j)) ^ "<CONTENTREF> " ^ Thy_Html.theID2guh theID' ^ " </CONTENTREF>\n" ^
5.123 (nodes (i+j) (Pos.lev_dn p') theID' ns) ^
5.124 (indt i) ^ "</NODE>\n"
5.125 end
5.126 @@ -173,7 +173,7 @@
5.127 (* create the xml-files for the thydata in the hierarchy *)
5.128 val i = indentation;
5.129 (* analoguous to 'fun met2xml' *)
5.130 -fun thydata2xml (theID: Celem.theID, Celem.Html {guh, coursedesign, mathauthors, html}) =
5.131 +fun thydata2xml (theID: Thy_Html.theID, Thy_Html.Html {guh, coursedesign, mathauthors, html}) =
5.132 "<HTMLDATA>\n" ^
5.133 indt i ^ "<GUH> "^ guh ^" </GUH>\n" ^
5.134 id2xml i theID ^
5.135 @@ -181,7 +181,7 @@
5.136 authors2xml i "MATHAUTHORS" mathauthors ^
5.137 authors2xml i "COURSEDESIGNS" coursedesign ^
5.138 "</HTMLDATA>\n" : Celem.xml
5.139 - | thydata2xml (theID, Celem.Hthm {guh, coursedesign, mathauthors, fillpats(*TODO?*), thm}) =
5.140 + | thydata2xml (theID, Thy_Html.Hthm {guh, coursedesign, mathauthors, fillpats(*TODO?*), thm}) =
5.141 "<THEOREMDATA>\n" ^
5.142 indt i ^ "<GUH> "^ guh ^" </GUH>\n" ^
5.143 id2xml i theID ^
5.144 @@ -195,7 +195,7 @@
5.145 authors2xml i "MATHAUTHORS" mathauthors ^
5.146 authors2xml i "COURSEDESIGNS" coursedesign ^
5.147 "</THEOREMDATA>\n"
5.148 - | thydata2xml (theID, Celem.Hrls {guh, coursedesign, mathauthors, thy_rls}) =
5.149 + | thydata2xml (theID, Thy_Html.Hrls {guh, coursedesign, mathauthors, thy_rls}) =
5.150 "<RULESETDATA>\n" ^
5.151 indt i ^ "<GUH> "^ guh ^" </GUH>\n" ^
5.152 id2xml i theID ^
5.153 @@ -204,11 +204,11 @@
5.154 authors2xml i "MATHAUTHORS" mathauthors ^
5.155 authors2xml i "COURSEDESIGNS" coursedesign ^
5.156 "</RULESETDATA>\n"
5.157 - | thydata2xml (theID, Celem.Hcal {guh, coursedesign, mathauthors, calc}) =
5.158 + | thydata2xml (theID, Thy_Html.Hcal {guh, coursedesign, mathauthors, calc}) =
5.159 "<RULESETDATA>\n" ^
5.160 indt i ^ "<GUH> "^ guh ^" </GUH>\n" ^
5.161 id2xml i theID ^
5.162 - calc2xml i (Celem.theID2thyID theID, calc) ^
5.163 + calc2xml i (Thy_Html.theID2thyID theID, calc) ^
5.164 indt i ^ "<EXPLANATIONS> </EXPLANATIONS>\n" ^
5.165 authors2xml i "MATHAUTHORS" mathauthors ^
5.166 authors2xml i "COURSEDESIGNS" coursedesign ^
5.167 @@ -217,7 +217,7 @@
5.168 error ("thydata2xml: not implemented for "^ strs2str' theID);
5.169
5.170 (* analoguous to 'fun met2file' *)
5.171 -fun thydata2file (path : Celem.filepath) (pos : Pos.pos) (theID : Celem.theID) thydata =
5.172 +fun thydata2file (path : Celem.filepath) (pos : Pos.pos) (theID : Thy_Html.theID) thydata =
5.173 (writeln ("### thes2file: id = " ^ strs2str theID);
5.174 str2file (path ^ Rtools.theID2filename theID) (thydata2xml (theID, thydata)));
5.175
5.176 @@ -236,52 +236,52 @@
5.177 (***.store a single theory element in the hierarchy.***)
5.178
5.179 (*.for mathauthors only, other html is added to xml exported from here.*)
5.180 -fun make_isa thy (part, thypart) (mathauthors : Celem.authors) =
5.181 +fun make_isa thy (part, thypart) (mathauthors : Thy_Html.authors) =
5.182 let
5.183 val theID = [part, Context.theory_name thy, thypart]
5.184 val guh = case theID of
5.185 - [part] => Celem.part2guh theID
5.186 - | [part, thyID, thypart] => Celem.thypart2guh theID
5.187 + [part] => Thy_Html.part2guh theID
5.188 + | [part, thyID, thypart] => Thy_Html.thypart2guh theID
5.189 val theID = Rtools.guh2theID guh
5.190 - val the = Celem.Html {guh = guh, coursedesign = [], mathauthors = mathauthors, html = ""}
5.191 + val the = Thy_Html.Html {guh = guh, coursedesign = [], mathauthors = mathauthors, html = ""}
5.192 in (the, theID) end
5.193
5.194 -fun make_thy thy (mathauthors : Celem.authors) =
5.195 +fun make_thy thy (mathauthors : Thy_Html.authors) =
5.196 let
5.197 - val guh = Celem.thy2guh ["IsacKnowledge", Context.theory_name thy]
5.198 + val guh = Thy_Html.thy2guh ["IsacKnowledge", Context.theory_name thy]
5.199 val theID = Rtools.guh2theID guh
5.200 - val the = Celem.Html {guh = guh, coursedesign = [], mathauthors = mathauthors, html = ""}
5.201 + val the = Thy_Html.Html {guh = guh, coursedesign = [], mathauthors = mathauthors, html = ""}
5.202 in (the, theID) end
5.203
5.204 -fun make_thm thy part (thmID : ThmC.id, thm) (mathauthors : Celem.authors) =
5.205 +fun make_thm thy part (thmID : ThmC.id, thm) (mathauthors : Thy_Html.authors) =
5.206 let
5.207 - val guh = Celem.thm2guh (part, Context.theory_name thy) thmID
5.208 + val guh = Thy_Html.thm2guh (part, Context.theory_name thy) thmID
5.209 val theID = Rtools.guh2theID guh
5.210 - val the = Celem.Hthm {guh = guh, coursedesign = [(*inserted in xml after export*)],
5.211 + val the = Thy_Html.Hthm {guh = guh, coursedesign = [(*inserted in xml after export*)],
5.212 mathauthors = mathauthors, fillpats = [], thm = thm}
5.213 in (the, theID) end
5.214
5.215 -fun make_rls thy rls (mathauthors : Celem.authors) =
5.216 +fun make_rls thy rls (mathauthors : Thy_Html.authors) =
5.217 let
5.218 - val guh = Celem.rls2guh ("IsacKnowledge", Context.theory_name thy) ((#id o Rule_Set.rep) rls)
5.219 + val guh = Thy_Html.rls2guh ("IsacKnowledge", Context.theory_name thy) ((#id o Rule_Set.rep) rls)
5.220 val theID = Rtools.guh2theID guh
5.221 - val the = Celem.Hrls {guh = guh, coursedesign = [], mathauthors = mathauthors,
5.222 + val the = Thy_Html.Hrls {guh = guh, coursedesign = [], mathauthors = mathauthors,
5.223 thy_rls = (Context.theory_name thy, rls)}
5.224 (*needs no (!check_guhs_unique) because guh is generated automatically*)
5.225 in (the, theID) end
5.226
5.227 -fun make_cal thy cal (mathauthors : Celem.authors) =
5.228 +fun make_cal thy cal (mathauthors : Thy_Html.authors) =
5.229 let
5.230 - val guh = Celem.cal2guh ("IsacKnowledge", Context.theory_name thy) ("TODO store_cal")
5.231 + val guh = Thy_Html.cal2guh ("IsacKnowledge", Context.theory_name thy) ("TODO store_cal")
5.232 val theID = Rtools.guh2theID guh
5.233 - val the = Celem.Hcal {guh = guh, coursedesign = [], mathauthors = mathauthors, calc = cal}
5.234 + val the = Thy_Html.Hcal {guh = guh, coursedesign = [], mathauthors = mathauthors, calc = cal}
5.235 in (the, theID) end
5.236
5.237 -fun make_ord thy ord (mathauthors : Celem.authors) =
5.238 +fun make_ord thy ord (mathauthors : Thy_Html.authors) =
5.239 let
5.240 - val guh = Celem.ord2guh ("IsacKnowledge", Context.theory_name thy) ("TODO store_ord")
5.241 + val guh = Thy_Html.ord2guh ("IsacKnowledge", Context.theory_name thy) ("TODO store_ord")
5.242 val theID = Rtools.guh2theID guh
5.243 - val the = Celem.Hord {guh = guh, coursedesign = [], mathauthors = mathauthors, ord = ord}
5.244 + val the = Thy_Html.Hord {guh = guh, coursedesign = [], mathauthors = mathauthors, ord = ord}
5.245 in (the, theID) end
5.246
5.247 fun insert_errpatIDs thy theID errpatIDs = (* TODO: redo like insert_fillpatts *)
6.1 --- a/src/Tools/isac/Interpret/error-fill-pattern.sml Tue Apr 21 12:26:08 2020 +0200
6.2 +++ b/src/Tools/isac/Interpret/error-fill-pattern.sml Tue Apr 21 15:42:50 2020 +0200
6.3 @@ -155,7 +155,7 @@
6.4 val (part, thyID) = Rtools.thy_containing_thm thmDeriv
6.5 val theID = [part, thyID, "Theorems", ThmC.cut_id thmDeriv]
6.6 val fillpats = case Specify.get_the theID of
6.7 - Celem.Hthm {fillpats, ...} => fillpats
6.8 + Thy_Html.Hthm {fillpats, ...} => fillpats
6.9 | _ => error "get_fillpats: uncovered case of get_the"
6.10 val some = map (get_fillform subst (thm, form) errpatID) fillpats
6.11 in some |> filter is_some |> map the end
6.12 @@ -210,7 +210,7 @@
6.13 | _ => "empty"
6.14 val (part, thyID) = Rtools.thy_containing_rls "Isac_Knowledge" rlsID;
6.15 val rls = case Specify.get_the [part, thyID, "Rulesets", rlsID] of
6.16 - Celem.Hrls {thy_rls = (_, rls), ...} => rls
6.17 + Thy_Html.Hrls {thy_rls = (_, rls), ...} => rls
6.18 | _ => error "fetchErrorpatterns: uncovered case of get_the"
6.19 in case rls of
6.20 Rule_Def.Repeat {errpatts, ...} => errpatts
7.1 --- a/src/Tools/isac/Interpret/li-tool.sml Tue Apr 21 12:26:08 2020 +0200
7.2 +++ b/src/Tools/isac/Interpret/li-tool.sml Tue Apr 21 15:42:50 2020 +0200
7.3 @@ -14,7 +14,7 @@
7.4 val associate: Ctree.ctree -> Proof.context -> (Tactic.T * term (*..Prog_Tac*)) -> ass
7.5
7.6 val implicit_take : Program.T -> (term * term) list -> term option
7.7 - val init_pstate : Rule_Set.T -> Proof.context -> Model.itm list -> Celem.metID ->
7.8 + val init_pstate : Rule_Set.T -> Proof.context -> Model.itm list -> Spec.metID ->
7.9 Istate.T * Proof.context * Program.T
7.10
7.11 val get_simplifier : Calc.T -> Rule_Set.T
7.12 @@ -27,7 +27,7 @@
7.13 (* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
7.14 (*NONE*)
7.15 (*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
7.16 - val arguments_from_model : Celem.metID -> Model.itm list -> term list
7.17 + val arguments_from_model : Spec.metID -> Model.itm list -> term list
7.18 ( *\--- ! aktivate for Test_Isac END ----------------------------------------------------------/*)
7.19 end
7.20
7.21 @@ -239,14 +239,14 @@
7.22 val errmsg = "ERROR: found no actual arguments for prog. of "
7.23 fun msg_miss sc metID caller f formals actuals =
7.24 "ERROR in creating the environment from formal args. of partial_function \"" ^ fst (Program.get_fun_id sc) ^ "\"\n" ^
7.25 - "and the actual args., ie. items of the guard of \"" ^ Celem.metID2str metID ^ "\" by \"" ^ caller ^ "\":\n" ^
7.26 + "and the actual args., ie. items of the guard of \"" ^ Spec.metID2str metID ^ "\" by \"" ^ caller ^ "\":\n" ^
7.27 "formal arg \"" ^ UnparseC.term f ^ "\" doesn't mach an actual arg.\n" ^
7.28 "with:\n" ^
7.29 (string_of_int o length) formals ^ " formal args: " ^ UnparseC.terms formals ^ "\n" ^
7.30 (string_of_int o length) actuals ^ " actual args: " ^ UnparseC.terms actuals
7.31 fun msg_miss_type sc metID f formals actuals =
7.32 "ERROR in creating the environment from formal args. of partial_function \"" ^ fst (Program.get_fun_id sc) ^ "\"\n" ^
7.33 - "and the actual args., ie. items of the guard of \"" ^ Celem.metID2str metID ^ "\" by \"assoc_by_type\":\n" ^
7.34 + "and the actual args., ie. items of the guard of \"" ^ Spec.metID2str metID ^ "\" by \"assoc_by_type\":\n" ^
7.35 "formal arg \"" ^ UnparseC.term f ^ "\" of type \"" ^ UnparseC.typ (type_of f) ^
7.36 "\" doesn't mach an actual arg.\nwith:\n" ^
7.37 (string_of_int o length) formals ^ " formal args: " ^ UnparseC.terms formals ^ "\n" ^
7.38 @@ -254,7 +254,7 @@
7.39 " with types: " ^ (strs2str o (map (UnparseC.typ o type_of))) actuals
7.40 fun msg_ambiguous sc metID f aas formals actuals =
7.41 "AMBIGUITY in creating the environment from formal args. of partial_function \"" ^ fst (Program.get_fun_id sc) ^ "\"\n" ^
7.42 - "and the actual args., ie. items of the guard of \"" ^ Celem.metID2str metID ^ "\" by \"assoc_by_type\":\n" ^
7.43 + "and the actual args., ie. items of the guard of \"" ^ Spec.metID2str metID ^ "\" by \"assoc_by_type\":\n" ^
7.44 "formal arg. \"" ^ UnparseC.term f ^ "\" type-matches with several..." ^
7.45 "actual args. \"" ^ UnparseC.terms aas ^ "\"\n" ^
7.46 "selected \"" ^ UnparseC.term (hd aas) ^ "\"\n" ^
7.47 @@ -273,7 +273,7 @@
7.48 val _ = if actuals <> [] then () else raise ERROR (errmsg ^ strs2str' metID)
7.49 val (scr, sc) = (case (#scr o Specify.get_met) metID of
7.50 scr as Rule.Prog sc => (trace_init metID; (scr, sc))
7.51 - | _ => raise ERROR ("init_pstate with " ^ Celem.metID2str metID))
7.52 + | _ => raise ERROR ("init_pstate with " ^ Spec.metID2str metID))
7.53 val formals = Program.formal_args sc
7.54 fun assoc_by_type f aa =
7.55 case filter (curry (fn (f, a) => type_of f = type_of a) f) aa of
8.1 --- a/src/Tools/isac/Interpret/lucas-interpreter.sml Tue Apr 21 12:26:08 2020 +0200
8.2 +++ b/src/Tools/isac/Interpret/lucas-interpreter.sml Tue Apr 21 15:42:50 2020 +0200
8.3 @@ -588,7 +588,7 @@
8.4 end
8.5 (*find_next_step from program, by_tactic will update Ctree*)
8.6 and do_next (ptp as (pt, pos as (p, p_))) =
8.7 - if Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) then
8.8 + if Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) then
8.9 ("helpless", ([], [], (pt, (p, p_))))
8.10 else
8.11 let
9.1 --- a/src/Tools/isac/Interpret/rewtools.sml Tue Apr 21 12:26:08 2020 +0200
9.2 +++ b/src/Tools/isac/Interpret/rewtools.sml Tue Apr 21 15:42:50 2020 +0200
9.3 @@ -13,23 +13,23 @@
9.4 val thy_containing_rls : ThyC.id -> Rule_Set.id -> string * ThyC.id
9.5 val thy_containing_cal : ThyC.id -> Exec_Def.prog_calcID -> string * string
9.6 datatype contthy
9.7 - = ContNOrew of {applto: term, thm_rls: Celem.guh, thyID: ThyC.id}
9.8 - | ContNOrewInst of {applto: term, bdvs: UnparseC.subst, thm_rls: Celem.guh, thminst: term, thyID: ThyC.id}
9.9 - | ContRls of {applto: term, asms: term list, result: term, rls: Celem.guh, thyID: ThyC.id}
9.10 - | ContRlsInst of {applto: term, asms: term list, bdvs: UnparseC.subst, result: term, rls: Celem.guh, thyID: ThyC.id}
9.11 + = ContNOrew of {applto: term, thm_rls: Check_Unique.guh, thyID: ThyC.id}
9.12 + | ContNOrewInst of {applto: term, bdvs: UnparseC.subst, thm_rls: Check_Unique.guh, thminst: term, thyID: ThyC.id}
9.13 + | ContRls of {applto: term, asms: term list, result: term, rls: Check_Unique.guh, thyID: ThyC.id}
9.14 + | ContRlsInst of {applto: term, asms: term list, bdvs: UnparseC.subst, result: term, rls: Check_Unique.guh, thyID: ThyC.id}
9.15 | ContThm of {applat: term, applto: term, asmrls: Rule_Set.id, asms: (term * term) list,
9.16 lhs: term * term, resasms: term list, result: term, reword: Rewrite_Ord.rew_ord', rhs: term * term,
9.17 - thm: Celem.guh, thyID: ThyC.id}
9.18 + thm: Check_Unique.guh, thyID: ThyC.id}
9.19 | ContThmInst of {applat: term, applto: term, asmrls: Rule_Set.id, asms: (term * term) list,
9.20 bdvs: UnparseC.subst, lhs: term * term, resasms: term list, result: term, reword: Rewrite_Ord.rew_ord',
9.21 - rhs: term * term, thm: Celem.guh, thminst: term, thyID: ThyC.id}
9.22 + rhs: term * term, thm: Check_Unique.guh, thminst: term, thyID: ThyC.id}
9.23 | EContThy
9.24 - val guh2filename : Celem.guh -> Celem.filename
9.25 + val guh2filename : Check_Unique.guh -> Celem.filename
9.26 val thms_of_rls : Rule_Set.T -> Rule.rule list
9.27 - val theID2filename : Celem.theID -> Celem.filename
9.28 - val no_thycontext : Celem.guh -> bool
9.29 - val subs_from : Istate.T -> 'a -> Celem.guh -> Selem.subs
9.30 - val guh2rewtac : Celem.guh -> Selem.subs -> Tactic.input
9.31 + val theID2filename : Thy_Html.theID -> Celem.filename
9.32 + val no_thycontext : Check_Unique.guh -> bool
9.33 + val subs_from : Istate.T -> 'a -> Check_Unique.guh -> Selem.subs
9.34 + val guh2rewtac : Check_Unique.guh -> Selem.subs -> Tactic.input
9.35 val get_tac_checked : Ctree.ctree -> Pos.pos' -> Tactic.input
9.36 val context_thy : Calc.T -> Tactic.input -> contthy
9.37 val distinct_Thm : Rule.rule list -> Rule.rule list
9.38 @@ -40,7 +40,7 @@
9.39 term option -> term -> (Rule.rule * (term * term list)) list
9.40 val get_bdv_subst : term -> (term * term) list -> Selem.subs option * UnparseC.subst
9.41 val thy_containing_thm : string -> string * string
9.42 - val guh2theID : Celem.guh -> Celem.theID
9.43 + val guh2theID : Check_Unique.guh -> Thy_Html.theID
9.44 (* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
9.45 (* NONE *)
9.46 (*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
9.47 @@ -223,7 +223,7 @@
9.48 EContThy (* not from Know_Store ..............................*)
9.49 | ContThm of (* a theorem in contex ===========================*)
9.50 {thyID : ThyC.id, (* for *2guh in sub-elems here .*)
9.51 - thm : Celem.guh, (* theorem in the context .*)
9.52 + thm : Check_Unique.guh, (* theorem in the context .*)
9.53 applto : term, (* applied to formula ... .*)
9.54 applat : term, (* ... with lhs inserted .*)
9.55 reword : Rewrite_Ord.rew_ord', (* order used for rewrite .*)
9.56 @@ -239,7 +239,7 @@
9.57 }
9.58 | ContThmInst of (* a theorem with bdvs in contex ============ *)
9.59 {thyID : ThyC.id, (*for *2guh in sub-elems here .*)
9.60 - thm : Celem.guh, (*theorem in the context .*)
9.61 + thm : Check_Unique.guh, (*theorem in the context .*)
9.62 bdvs : UnparseC.subst, (*bound variables to modify... .*)
9.63 thminst : term, (*... theorem instantiated .*)
9.64 applto : term, (*applied to formula ... .*)
9.65 @@ -257,14 +257,14 @@
9.66 }
9.67 | ContRls of (* a rule set in contex ========================= *)
9.68 {thyID : ThyC.id, (*for *2guh in sub-elems here .*)
9.69 - rls : Celem.guh, (*rule set in the context .*)
9.70 + rls : Check_Unique.guh, (*rule set in the context .*)
9.71 applto : term, (*rewrite this formula .*)
9.72 result : term, (*resulting from the rewrite .*)
9.73 asms : term list (*... with asms stored .*)
9.74 }
9.75 | ContRlsInst of (* a rule set with bdvs in contex =========== *)
9.76 {thyID : ThyC.id, (*for *2guh in sub-elems here .*)
9.77 - rls : Celem.guh, (*rule set in the context .*)
9.78 + rls : Check_Unique.guh, (*rule set in the context .*)
9.79 bdvs : UnparseC.subst, (*for bound variables in thms .*)
9.80 applto : term, (*rewrite this formula .*)
9.81 result : term, (*resulting from the rewrite .*)
9.82 @@ -272,12 +272,12 @@
9.83 }
9.84 | ContNOrew of (* no rewrite for thm or rls ================== *)
9.85 {thyID : ThyC.id, (*for *2guh in sub-elems here .*)
9.86 - thm_rls : Celem.guh, (*thm or rls in the context .*)
9.87 + thm_rls : Check_Unique.guh, (*thm or rls in the context .*)
9.88 applto : term (*rewrite this formula .*)
9.89 }
9.90 | ContNOrewInst of (* no rewrite for some instantiation ====== *)
9.91 {thyID : ThyC.id, (*for *2guh in sub-elems here .*)
9.92 - thm_rls : Celem.guh, (*thm or rls in the context .*)
9.93 + thm_rls : Check_Unique.guh, (*thm or rls in the context .*)
9.94 bdvs : UnparseC.subst, (*for bound variables in thms .*)
9.95 thminst : term, (*... theorem instantiated .*)
9.96 applto : term (*rewrite this formula .*)
9.97 @@ -299,7 +299,7 @@
9.98 Applicable.Appl (Tactic.Rewrite' (thy', ord', erls, _, _, f, (res,asm))) =>
9.99 ContThm
9.100 {thyID = thy',
9.101 - thm = Celem.thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv),
9.102 + thm = Thy_Html.thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv),
9.103 applto = f, applat = TermC.empty, reword = ord',
9.104 asms = [](*asms ~~ asms'*), lhs = (TermC.empty, TermC.empty)(*(lhs, lhs')*), rhs = (TermC.empty, TermC.empty)(*(rhs, rhs')*),
9.105 result = res, resasms = asm, asmrls = Rule_Set.id erls}
9.106 @@ -315,7 +315,7 @@
9.107 ContNOrew
9.108 {thyID = thy',
9.109 thm_rls =
9.110 - Celem.thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv),
9.111 + Thy_Html.thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv),
9.112 applto = f}
9.113 end
9.114 | _ => error "context_thy..Rewrite: uncovered case 2")
9.115 @@ -332,7 +332,7 @@
9.116 ContThmInst
9.117 {thyID = thy',
9.118 thm =
9.119 - Celem.thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv),
9.120 + Thy_Html.thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv),
9.121 bdvs = subst, thminst = thminst, applto = f, applat = TermC.empty, reword = ord',
9.122 asms = [](*asms ~~ asms'*), lhs = (TermC.empty, TermC.empty)(*(lhs, lhs')*), rhs = (TermC.empty, TermC.empty)(*(rhs, rhs')*),
9.123 result = res, resasms = asm, asmrls = Rule_Set.id erls}
9.124 @@ -352,7 +352,7 @@
9.125 in
9.126 ContNOrewInst
9.127 {thyID = thy',
9.128 - thm_rls = Celem.thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv),
9.129 + thm_rls = Thy_Html.thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv),
9.130 bdvs = subst, thminst = thminst, applto = f}
9.131 end
9.132 | _ => error "context_thy..Rewrite_Inst: uncovered case 4")
9.133 @@ -362,7 +362,7 @@
9.134 Applicable.Appl (Tactic.Rewrite_Set' (thy', _, _(*rls*), f, (res,asm))) =>
9.135 ContRls
9.136 {thyID = thy',
9.137 - rls = Celem.rls2guh (thy_containing_rls thy' rls') rls',
9.138 + rls = Thy_Html.rls2guh (thy_containing_rls thy' rls') rls',
9.139 applto = f, result = res, asms = asm}
9.140 | _ => error ("context_thy Rewrite_Set: not for Applicable.Notappl"))
9.141 | context_thy (pt,p) (tac as Tactic.Rewrite_Set_Inst (_(*subs*), rls')) =
9.142 @@ -370,7 +370,7 @@
9.143 Applicable.Appl (Tactic.Rewrite_Set_Inst' (thy', _, subst, _, f, (res,asm))) =>
9.144 ContRlsInst
9.145 {thyID = thy',
9.146 - rls = Celem.rls2guh (thy_containing_rls thy' rls') rls',
9.147 + rls = Thy_Html.rls2guh (thy_containing_rls thy' rls') rls',
9.148 bdvs = subst, applto = f, result = res, asms = asm}
9.149 | _ => error ("context_thy Rewrite_Set_Inst: not for Applicable.Notappl"))
9.150 | context_thy (_, p) tac =
9.151 @@ -443,7 +443,7 @@
9.152 (tracing ("### atomic_appl_tacs: not impl. for tac = '" ^ Tactic.input_to_string tac ^ "'"); []);
9.153
9.154 (* filenames not only for thydata, but also for thy's etc *)
9.155 -fun theID2filename theID = Celem.theID2guh theID ^ ".xml"
9.156 +fun theID2filename theID = Thy_Html.theID2guh theID ^ ".xml"
9.157
9.158 fun guh2theID guh =
9.159 let
9.160 @@ -465,7 +465,7 @@
9.161 val thyID = takewhile [] (not o (curry op= "-")) rest
9.162 val rest' = dropuntil (curry op = "-") rest
9.163 in case implode rest' of
9.164 - "-part" => [chap] : Celem.theID
9.165 + "-part" => [chap] : Thy_Html.theID
9.166 | "" => [chap, implode thyID]
9.167 | "-Theorems" => [chap, implode thyID, "Theorems"]
9.168 | "-Rulesets" => [chap, implode thyID, "Rulesets"]
10.1 --- a/src/Tools/isac/Interpret/step-solve.sml Tue Apr 21 12:26:08 2020 +0200
10.2 +++ b/src/Tools/isac/Interpret/step-solve.sml Tue Apr 21 15:42:50 2020 +0200
10.3 @@ -24,7 +24,7 @@
10.4 | by_tactic (Tactic.Free_Solve') (pt, po as (p, _)) =
10.5 let
10.6 val p' = lev_dn_ (p, Res);
10.7 - val pt = update_metID pt (par_pblobj pt p) Celem.e_metID;
10.8 + val pt = update_metID pt (par_pblobj pt p) Spec.e_metID;
10.9 in
10.10 ("ok", ([(Tactic.Empty_Tac, Tactic.Empty_Tac_, (po, (Istate.Uistate, ContextC.empty)))], [], (pt,p')))
10.11 end
10.12 @@ -36,7 +36,7 @@
10.13 ("ok", ([(Tactic.End_Detail, Tactic.End_Detail' t , ((p, p_), get_loc pt (p, p_)))], [], (pt, pr)))
10.14 end
10.15 | by_tactic m (pt, po as (p, p_)) =
10.16 - if Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (*29.8.02: could be detail, too !!*)
10.17 + if Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*29.8.02: could be detail, too !!*)
10.18 then
10.19 let
10.20 val ctxt = get_ctxt pt po
11.1 --- a/src/Tools/isac/Knowledge/AlgEin.thy Tue Apr 21 12:26:08 2020 +0200
11.2 +++ b/src/Tools/isac/Knowledge/AlgEin.thy Tue Apr 21 15:42:50 2020 +0200
11.3 @@ -24,8 +24,8 @@
11.4 \<close>
11.5 (** problems **)
11.6 setup \<open>KEStore_Elems.add_pbts
11.7 - [(Specify.prep_pbt thy "pbl_algein" [] Celem.e_pblID (["Berechnung"], [], Rule_Set.empty, NONE, [])),
11.8 - (Specify.prep_pbt thy "pbl_algein_numsym" [] Celem.e_pblID
11.9 + [(Specify.prep_pbt thy "pbl_algein" [] Spec.e_pblID (["Berechnung"], [], Rule_Set.empty, NONE, [])),
11.10 + (Specify.prep_pbt thy "pbl_algein_numsym" [] Spec.e_pblID
11.11 (["numerischSymbolische", "Berechnung"],
11.12 [("#Given",
11.13 ["KantenLaenge k_k","Querschnitt q__q"(*q_ in Biegelinie.thy*), "KantenUnten u_u",
11.14 @@ -34,12 +34,12 @@
11.15 Rule_Set.empty, NONE, [["Berechnung", "erstNumerisch"], ["Berechnung", "erstSymbolisch"]]))]\<close>
11.16
11.17 setup \<open>KEStore_Elems.add_mets
11.18 - [Specify.prep_met thy "met_algein" [] Celem.e_metID
11.19 + [Specify.prep_met thy "met_algein" [] Spec.e_metID
11.20 (["Berechnung"], [],
11.21 {rew_ord'="tless_true", rls'= Rule_Set.Empty, calc = [], srls = Rule_Set.Empty, prls = Rule_Set.Empty, crls =Rule_Set.Empty,
11.22 errpats = [], nrls = Rule_Set.Empty},
11.23 @{thm refl}),
11.24 - Specify.prep_met thy "met_algein_numsym" [] Celem.e_metID
11.25 + Specify.prep_met thy "met_algein_numsym" [] Spec.e_metID
11.26 (["Berechnung","erstNumerisch"], [],
11.27 {rew_ord'="tless_true", rls'= Rule_Set.Empty, calc = [], srls = Rule_Set.Empty, prls = Rule_Set.Empty, crls =Rule_Set.Empty,
11.28 errpats = [], nrls = Rule_Set.Empty},
11.29 @@ -69,7 +69,7 @@
11.30 in
11.31 Try (Rewrite_Set ''norm_Poly'') t_t)"
11.32 setup \<open>KEStore_Elems.add_mets
11.33 - [Specify.prep_met thy "met_algein_numsym_1num" [] Celem.e_metID
11.34 + [Specify.prep_met thy "met_algein_numsym_1num" [] Spec.e_metID
11.35 (["Berechnung","erstNumerisch"],
11.36 [("#Given" ,["KantenLaenge k_k","Querschnitt q__q", "KantenUnten u_u",
11.37 "KantenSenkrecht s_s", "KantenOben o_o"]),
11.38 @@ -102,7 +102,7 @@
11.39 in
11.40 (Try (Rewrite_Set ''norm_Poly'')) t_t)"
11.41 setup \<open>KEStore_Elems.add_mets
11.42 - [Specify.prep_met thy "met_algein_symnum" [] Celem.e_metID
11.43 + [Specify.prep_met thy "met_algein_symnum" [] Spec.e_metID
11.44 (["Berechnung","erstSymbolisch"],
11.45 [("#Given" ,["KantenLaenge k_k","Querschnitt q__q", "KantenUnten u_u",
11.46 "KantenSenkrecht s_s", "KantenOben o_o"]),
12.1 --- a/src/Tools/isac/Knowledge/Biegelinie.thy Tue Apr 21 12:26:08 2020 +0200
12.2 +++ b/src/Tools/isac/Knowledge/Biegelinie.thy Tue Apr 21 15:42:50 2020 +0200
12.3 @@ -72,14 +72,14 @@
12.4
12.5 (** problems **)
12.6 setup \<open>KEStore_Elems.add_pbts
12.7 - [(Specify.prep_pbt @{theory} "pbl_bieg" [] Celem.e_pblID
12.8 + [(Specify.prep_pbt @{theory} "pbl_bieg" [] Spec.e_pblID
12.9 (["Biegelinien"],
12.10 [("#Given" ,["Traegerlaenge l_l", "Streckenlast q_q"]),
12.11 (*("#Where",["0 < l_l"]), ...wait for < and handling Arbfix*)
12.12 ("#Find" ,["Biegelinie b_b"]),
12.13 ("#Relate",["Randbedingungen r_b"])],
12.14 Rule_Set.append_rules "empty" Rule_Set.empty [], NONE, [["IntegrierenUndKonstanteBestimmen2"]])),
12.15 - (Specify.prep_pbt @{theory} "pbl_bieg_mom" [] Celem.e_pblID
12.16 + (Specify.prep_pbt @{theory} "pbl_bieg_mom" [] Spec.e_pblID
12.17 (["MomentBestimmte","Biegelinien"],
12.18 [("#Given" ,["Traegerlaenge l_l", "Streckenlast q_q"]),
12.19 (*("#Where",["0 < l_l"]), ...wait for < and handling Arbfix*)
12.20 @@ -87,26 +87,26 @@
12.21 ("#Relate",["RandbedingungenBiegung r_b","RandbedingungenMoment r_m"])
12.22 ],
12.23 Rule_Set.append_rules "empty" Rule_Set.empty [], NONE, [["IntegrierenUndKonstanteBestimmen"]])),
12.24 - (Specify.prep_pbt @{theory} "pbl_bieg_momg" [] Celem.e_pblID
12.25 + (Specify.prep_pbt @{theory} "pbl_bieg_momg" [] Spec.e_pblID
12.26 (["MomentGegebene","Biegelinien"], [], Rule_Set.append_rules "empty" Rule_Set.empty [], NONE,
12.27 [["IntegrierenUndKonstanteBestimmen","2xIntegrieren"]])),
12.28 - (Specify.prep_pbt @{theory} "pbl_bieg_einf" [] Celem.e_pblID
12.29 + (Specify.prep_pbt @{theory} "pbl_bieg_einf" [] Spec.e_pblID
12.30 (["einfache","Biegelinien"], [], Rule_Set.append_rules "empty" Rule_Set.empty [], NONE,
12.31 [["IntegrierenUndKonstanteBestimmen","4x4System"]])),
12.32 - (Specify.prep_pbt @{theory} "pbl_bieg_momquer" [] Celem.e_pblID
12.33 + (Specify.prep_pbt @{theory} "pbl_bieg_momquer" [] Spec.e_pblID
12.34 (["QuerkraftUndMomentBestimmte","Biegelinien"], [], Rule_Set.append_rules "empty" Rule_Set.empty [], NONE,
12.35 [["IntegrierenUndKonstanteBestimmen","1xIntegrieren"]])),
12.36 - (Specify.prep_pbt @{theory} "pbl_bieg_vonq" [] Celem.e_pblID
12.37 + (Specify.prep_pbt @{theory} "pbl_bieg_vonq" [] Spec.e_pblID
12.38 (["vonBelastungZu","Biegelinien"],
12.39 [("#Given" ,["Streckenlast q_q","FunktionsVariable v_v"]),
12.40 ("#Find" ,["Funktionen funs'''"])],
12.41 Rule_Set.append_rules "empty" Rule_Set.empty [], NONE, [["Biegelinien","ausBelastung"]])),
12.42 - (Specify.prep_pbt @{theory} "pbl_bieg_randbed" [] Celem.e_pblID
12.43 + (Specify.prep_pbt @{theory} "pbl_bieg_randbed" [] Spec.e_pblID
12.44 (["setzeRandbedingungen","Biegelinien"],
12.45 [("#Given" ,["Funktionen fun_s","Randbedingungen r_b"]),
12.46 ("#Find" ,["Gleichungen equs'''"])],
12.47 Rule_Set.append_rules "empty" Rule_Set.empty [], NONE, [["Biegelinien","setzeRandbedingungenEin"]])),
12.48 - (Specify.prep_pbt @{theory} "pbl_equ_fromfun" [] Celem.e_pblID
12.49 + (Specify.prep_pbt @{theory} "pbl_equ_fromfun" [] Spec.e_pblID
12.50 (["makeFunctionTo","equation"],
12.51 [("#Given" ,["functionEq fu_n","substitution su_b"]),
12.52 ("#Find" ,["equality equ'''"])],
12.53 @@ -163,7 +163,7 @@
12.54 section \<open>Methods\<close>
12.55 (* setup parent directory *)
12.56 setup \<open>KEStore_Elems.add_mets
12.57 - [Specify.prep_met @{theory} "met_biege" [] Celem.e_metID
12.58 + [Specify.prep_met @{theory} "met_biege" [] Spec.e_metID
12.59 (["IntegrierenUndKonstanteBestimmen"], [],
12.60 {rew_ord'="tless_true", rls'= Rule_Set.Empty, calc = [], srls = Rule_Set.Empty, prls = Rule_Set.Empty, crls =Rule_Set.Empty,
12.61 errpats = [], nrls = Rule_Set.Empty},
12.62 @@ -186,7 +186,7 @@
12.63 B = ((Substitute cons) #> (Rewrite_Set_Inst [(''bdv'', v)] ''make_ratpoly_in'')) B
12.64 in B)"
12.65 setup \<open>KEStore_Elems.add_mets
12.66 - [Specify.prep_met @{theory} "met_biege_2" [] Celem.e_metID
12.67 + [Specify.prep_met @{theory} "met_biege_2" [] Spec.e_metID
12.68 (["IntegrierenUndKonstanteBestimmen2"],
12.69 [("#Given" ,["Traegerlaenge l", "Streckenlast q",
12.70 "FunktionsVariable v", "GleichungsVariablen vs", "AbleitungBiegelinie id_abl"]),
12.71 @@ -209,22 +209,22 @@
12.72 @{thm biegelinie.simps})]
12.73 \<close>
12.74 setup \<open>KEStore_Elems.add_mets
12.75 - [Specify.prep_met @{theory} "met_biege_intconst_2" [] Celem.e_metID
12.76 + [Specify.prep_met @{theory} "met_biege_intconst_2" [] Spec.e_metID
12.77 (["IntegrierenUndKonstanteBestimmen","2xIntegrieren"], [],
12.78 {rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty, crls = Atools_erls,
12.79 errpats = [], nrls = Rule_Set.empty},
12.80 @{thm refl}),
12.81 - Specify.prep_met @{theory} "met_biege_intconst_4" [] Celem.e_metID
12.82 + Specify.prep_met @{theory} "met_biege_intconst_4" [] Spec.e_metID
12.83 (["IntegrierenUndKonstanteBestimmen","4x4System"], [],
12.84 {rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty, crls = Atools_erls,
12.85 errpats = [], nrls = Rule_Set.empty},
12.86 @{thm refl}),
12.87 - Specify.prep_met @{theory} "met_biege_intconst_1" [] Celem.e_metID
12.88 + Specify.prep_met @{theory} "met_biege_intconst_1" [] Spec.e_metID
12.89 (["IntegrierenUndKonstanteBestimmen","1xIntegrieren"], [],
12.90 {rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty, crls = Atools_erls,
12.91 errpats = [], nrls = Rule_Set.empty},
12.92 @{thm refl}),
12.93 - Specify.prep_met @{theory} "met_biege2" [] Celem.e_metID
12.94 + Specify.prep_met @{theory} "met_biege2" [] Spec.e_metID
12.95 (["Biegelinien"], [],
12.96 {rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty, crls = Atools_erls,
12.97 errpats = [], nrls = Rule_Set.empty},
12.98 @@ -254,7 +254,7 @@
12.99 in
12.100 [Q__Q, M__M, N__N, B__B])"
12.101 setup \<open>KEStore_Elems.add_mets
12.102 - [Specify.prep_met @{theory} "met_biege_ausbelast" [] Celem.e_metID
12.103 + [Specify.prep_met @{theory} "met_biege_ausbelast" [] Spec.e_metID
12.104 (["Biegelinien", "ausBelastung"],
12.105 [("#Given" ,["Streckenlast q__q", "FunktionsVariable v_v",
12.106 "Biegelinie id_fun", "AbleitungBiegelinie id_abl"]),
12.107 @@ -295,7 +295,7 @@
12.108 in
12.109 [e_1, e_2, e_3, e_4])"
12.110 setup \<open>KEStore_Elems.add_mets
12.111 - [Specify.prep_met @{theory} "met_biege_setzrand" [] Celem.e_metID
12.112 + [Specify.prep_met @{theory} "met_biege_setzrand" [] Spec.e_metID
12.113 (["Biegelinien", "setzeRandbedingungenEin"],
12.114 [("#Given" , ["Funktionen fun_s", "Randbedingungen r_b"]),
12.115 ("#Find" , ["Gleichungen equs'''"])],
12.116 @@ -319,7 +319,7 @@
12.117 in
12.118 (Rewrite_Set ''norm_Rational'') eq_u)"
12.119 setup \<open>KEStore_Elems.add_mets
12.120 - [Specify.prep_met @{theory} "met_equ_fromfun" [] Celem.e_metID
12.121 + [Specify.prep_met @{theory} "met_equ_fromfun" [] Spec.e_metID
12.122 (["Equation","fromFunction"],
12.123 [("#Given" ,["functionEq fu_n","substitution su_b"]),
12.124 ("#Find" ,["equality equ'''"])],
13.1 --- a/src/Tools/isac/Knowledge/Build_Thydata.thy Tue Apr 21 12:26:08 2020 +0200
13.2 +++ b/src/Tools/isac/Knowledge/Build_Thydata.thy Tue Apr 21 15:42:50 2020 +0200
13.3 @@ -77,7 +77,7 @@
13.4 collect_part "IsacKnowledge" knowledge_parent knowthys' @
13.5 (map (collect_isab "Isabelle") rlsthmsNOTisac) @
13.6 collect_part "IsacScripts" proglang_parent progthys'
13.7 -: (Celem.theID * Celem.thydata) list
13.8 +: (Thy_Html.theID * Thy_Html.thydata) list
13.9 \<close>
13.10 ML \<open>
13.11 map Context.theory_name knowthys'
14.1 --- a/src/Tools/isac/Knowledge/Diff.thy Tue Apr 21 12:26:08 2020 +0200
14.2 +++ b/src/Tools/isac/Knowledge/Diff.thy Tue Apr 21 15:42:50 2020 +0200
14.3 @@ -239,8 +239,8 @@
14.4
14.5 (** problem types **)
14.6 setup \<open>KEStore_Elems.add_pbts
14.7 - [(Specify.prep_pbt thy "pbl_fun" [] Celem.e_pblID (["function"], [], Rule_Set.empty, NONE, [])),
14.8 - (Specify.prep_pbt thy "pbl_fun_deriv" [] Celem.e_pblID
14.9 + [(Specify.prep_pbt thy "pbl_fun" [] Spec.e_pblID (["function"], [], Rule_Set.empty, NONE, [])),
14.10 + (Specify.prep_pbt thy "pbl_fun_deriv" [] Spec.e_pblID
14.11 (["derivative_of","function"],
14.12 [("#Given" ,["functionTerm f_f","differentiateFor v_v"]),
14.13 ("#Find" ,["derivative f_f'"])],
14.14 @@ -248,7 +248,7 @@
14.15 SOME "Diff (f_f, v_v)", [["diff","differentiate_on_R"],
14.16 ["diff","after_simplification"]])),
14.17 (*here "named" is used differently from Integration"*)
14.18 - (Specify.prep_pbt thy "pbl_fun_deriv_nam" [] Celem.e_pblID
14.19 + (Specify.prep_pbt thy "pbl_fun_deriv_nam" [] Spec.e_pblID
14.20 (["named","derivative_of","function"],
14.21 [("#Given" ,["functionEq f_f","differentiateFor v_v"]),
14.22 ("#Find" ,["derivativeEq f_f'"])],
14.23 @@ -272,7 +272,7 @@
14.24 | argl2dtss _ = error "Diff.ML: wrong argument for argl2dtss";
14.25 \<close>
14.26 setup \<open>KEStore_Elems.add_mets
14.27 - [Specify.prep_met thy "met_diff" [] Celem.e_metID
14.28 + [Specify.prep_met thy "met_diff" [] Spec.e_metID
14.29 (["diff"], [],
14.30 {rew_ord'="tless_true",rls'=Atools_erls,calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty,
14.31 crls = Atools_erls, errpats = [], nrls = norm_diff},
14.32 @@ -307,7 +307,7 @@
14.33 Try (Rewrite_Set_Inst [(''bdv'',v_v)] ''diff_sym_conv''))
14.34 ) f_f')"
14.35 setup \<open>KEStore_Elems.add_mets
14.36 - [Specify.prep_met thy "met_diff_onR" [] Celem.e_metID
14.37 + [Specify.prep_met thy "met_diff_onR" [] Spec.e_metID
14.38 (["diff","differentiate_on_R"],
14.39 [("#Given" ,["functionTerm f_f","differentiateFor v_v"]),
14.40 ("#Find" ,["derivative f_f'"])],
14.41 @@ -342,7 +342,7 @@
14.42 (Repeat (Rewrite_Set ''make_polynomial'')))
14.43 ) f_f')"
14.44 setup \<open>KEStore_Elems.add_mets
14.45 - [Specify.prep_met thy "met_diff_simpl" [] Celem.e_metID
14.46 + [Specify.prep_met thy "met_diff_simpl" [] Spec.e_metID
14.47 (["diff","diff_simpl"],
14.48 [("#Given", ["functionTerm f_f","differentiateFor v_v"]),
14.49 ("#Find" , ["derivative f_f'"])],
14.50 @@ -380,7 +380,7 @@
14.51 Try (Rewrite_Set_Inst [(''bdv'', v_v)] ''diff_sym_conv'' ))
14.52 ) f_f')"
14.53 setup \<open>KEStore_Elems.add_mets
14.54 - [Specify.prep_met thy "met_diff_equ" [] Celem.e_metID
14.55 + [Specify.prep_met thy "met_diff_equ" [] Spec.e_metID
14.56 (["diff","differentiate_equality"],
14.57 [("#Given" ,["functionEq f_f","differentiateFor v_v"]),
14.58 ("#Find" ,["derivativeEq f_f'"])],
14.59 @@ -403,7 +403,7 @@
14.60 ) term')"
14.61
14.62 setup \<open>KEStore_Elems.add_mets
14.63 - [Specify.prep_met thy "met_diff_after_simp" [] Celem.e_metID
14.64 + [Specify.prep_met thy "met_diff_after_simp" [] Spec.e_metID
14.65 (["diff","after_simplification"],
14.66 [("#Given" ,["functionTerm term","differentiateFor bound_variable"]),
14.67 ("#Find" ,["derivative term'"])],
15.1 --- a/src/Tools/isac/Knowledge/DiffApp-scrpbl.sml Tue Apr 21 12:26:08 2020 +0200
15.2 +++ b/src/Tools/isac/Knowledge/DiffApp-scrpbl.sml Tue Apr 21 15:42:50 2020 +0200
15.3 @@ -315,7 +315,7 @@
15.4 "additionalRels [A=#2*a*b - a^^^#2,(a//#2)^^^#2 + (b//#2)^^^#2 =R^^^#2]",
15.5 "additionalRels [A=#2*a*b - a^^^#2,a=#2*R*sin alpha, b=#2*R*cos alpha]"];
15.6 val (dI',pI',mI')=
15.7 - ("DiffAppl",["Program","maximum_of","function"],Celem.e_metID);
15.8 + ("DiffAppl",["Program","maximum_of","function"],Spec.e_metID);
15.9 val c = []:cid;
15.10
15.11 (*
15.12 @@ -416,7 +416,7 @@
15.13 "additionalRels [(a//#2)^^^#2 + (b//#2)^^^#2 =R^^^#2]",
15.14 "additionalRels [a=#2*R*sin alpha, b=#2*R*cos alpha]"];
15.15 val (dI',pI',mI')=
15.16 - ("DiffAppl",["DiffAppl","test_maximum"],Celem.e_metID);
15.17 + ("DiffAppl",["DiffAppl","test_maximum"],Spec.e_metID);
15.18 val p = e_pos'; val c = [];
15.19
15.20 val (mI,m) = ("Init_Proof",Init_Proof (cts, (dI',pI',mI')));
16.1 --- a/src/Tools/isac/Knowledge/DiffApp.thy Tue Apr 21 12:26:08 2020 +0200
16.2 +++ b/src/Tools/isac/Knowledge/DiffApp.thy Tue Apr 21 15:42:50 2020 +0200
16.3 @@ -63,37 +63,37 @@
16.4
16.5 (** problem types **)
16.6 setup \<open>KEStore_Elems.add_pbts
16.7 - [(Specify.prep_pbt thy "pbl_fun_max" [] Celem.e_pblID
16.8 + [(Specify.prep_pbt thy "pbl_fun_max" [] Spec.e_pblID
16.9 (["maximum_of","function"],
16.10 [("#Given" ,["fixedValues f_ix"]),
16.11 ("#Find" ,["maximum m_m","valuesFor v_s"]),
16.12 ("#Relate",["relations r_s"])],
16.13 Rule_Set.empty, NONE, [])),
16.14 - (Specify.prep_pbt thy "pbl_fun_make" [] Celem.e_pblID
16.15 + (Specify.prep_pbt thy "pbl_fun_make" [] Spec.e_pblID
16.16 (["make","function"],
16.17 [("#Given" ,["functionOf f_f","boundVariable v_v","equalities eqs"]),
16.18 ("#Find" ,["functionEq f_1"])],
16.19 Rule_Set.empty, NONE, [])),
16.20 - (Specify.prep_pbt thy "pbl_fun_max_expl" [] Celem.e_pblID
16.21 + (Specify.prep_pbt thy "pbl_fun_max_expl" [] Spec.e_pblID
16.22 (["by_explicit","make","function"],
16.23 [("#Given" ,["functionOf f_f","boundVariable v_v","equalities eqs"]),
16.24 ("#Find" ,["functionEq f_1"])],
16.25 Rule_Set.empty, NONE, [["DiffApp","make_fun_by_explicit"]])),
16.26 - (Specify.prep_pbt thy "pbl_fun_max_newvar" [] Celem.e_pblID
16.27 + (Specify.prep_pbt thy "pbl_fun_max_newvar" [] Spec.e_pblID
16.28 (["by_new_variable","make","function"],
16.29 [("#Given" ,["functionOf f_f","boundVariable v_v","equalities eqs"]),
16.30 (*WN.12.5.03: precond for distinction still missing*)
16.31 ("#Find" ,["functionEq f_1"])],
16.32 Rule_Set.empty, NONE, [["DiffApp","make_fun_by_new_variable"]])),
16.33 - (Specify.prep_pbt thy "pbl_fun_max_interv" [] Celem.e_pblID
16.34 + (Specify.prep_pbt thy "pbl_fun_max_interv" [] Spec.e_pblID
16.35 (["on_interval","maximum_of","function"],
16.36 [("#Given" ,["functionEq t_t","boundVariable v_v","interval i_tv"]),
16.37 (*WN.12.5.03: precond for distinction still missing*)
16.38 ("#Find" ,["maxArgument v_0"])],
16.39 Rule_Set.empty, NONE, [])),
16.40 - (Specify.prep_pbt thy "pbl_tool" [] Celem.e_pblID
16.41 + (Specify.prep_pbt thy "pbl_tool" [] Spec.e_pblID
16.42 (["tool"], [], Rule_Set.empty, NONE, [])),
16.43 - (Specify.prep_pbt thy "pbl_tool_findvals" [] Celem.e_pblID
16.44 + (Specify.prep_pbt thy "pbl_tool_findvals" [] Spec.e_pblID
16.45 (["find_values","tool"],
16.46 [("#Given" ,["maxArgument m_ax","functionEq f_f","boundVariable v_v"]),
16.47 ("#Find" ,["valuesFor v_ls"]),
16.48 @@ -103,7 +103,7 @@
16.49
16.50 (** methods, scripts not yet implemented **)
16.51 setup \<open>KEStore_Elems.add_mets
16.52 - [Specify.prep_met thy "met_diffapp" [] Celem.e_metID
16.53 + [Specify.prep_met thy "met_diffapp" [] Spec.e_metID
16.54 (["DiffApp"], [],
16.55 {rew_ord'="tless_true", rls'=Atools_erls,calc = [], srls = Rule_Set.empty, prls = Rule_Set.empty,
16.56 crls = Atools_erls, errpats = [], nrls = norm_Rational (*, asm_rls=[],asm_thm=[]*)},
16.57 @@ -125,7 +125,7 @@
16.58 in SubProblem (''DiffApp'',[''find_values'', ''tool''], [''Isac_Knowledge'', ''find_values''])
16.59 [REAL m_x, REAL (rhs t_t), REAL v_v, REAL m_m, BOOL_LIST (dropWhile (ident e_e) r_s)])"
16.60 setup \<open>KEStore_Elems.add_mets
16.61 - [Specify.prep_met thy "met_diffapp_max" [] Celem.e_metID
16.62 + [Specify.prep_met thy "met_diffapp_max" [] Spec.e_metID
16.63 (["DiffApp","max_by_calculus"],
16.64 [("#Given" ,["fixedValues f_ix","maximum m_m","relations r_s", "boundVariable v_v",
16.65 "interval i_tv","errorBound e_rr"]),
16.66 @@ -152,7 +152,7 @@
16.67 [BOOL e_2, REAL v_2]
16.68 in Substitute [(v_1 = (rhs o hd) s_1), (v_2 = (rhs o hd) s_2)] h_h)"
16.69 setup \<open>KEStore_Elems.add_mets
16.70 - [Specify.prep_met thy "met_diffapp_funnew" [] Celem.e_metID
16.71 + [Specify.prep_met thy "met_diffapp_funnew" [] Spec.e_metID
16.72 (["DiffApp","make_fun_by_new_variable"],
16.73 [("#Given" ,["functionOf f_f","boundVariable v_v","equalities eqs"]),
16.74 ("#Find" ,["functionEq f_1"])],
16.75 @@ -172,7 +172,7 @@
16.76 [BOOL e_1, REAL v_1]
16.77 in Substitute [(v_1 = (rhs o hd) s_1)] h_h) "
16.78 setup \<open>KEStore_Elems.add_mets
16.79 - [Specify.prep_met thy "met_diffapp_funexp" [] Celem.e_metID
16.80 + [Specify.prep_met thy "met_diffapp_funexp" [] Spec.e_metID
16.81 (["DiffApp","make_fun_by_explicit"],
16.82 [("#Given" ,["functionOf f_f","boundVariable v_v","equalities eqs"]),
16.83 ("#Find" ,["functionEq f_1"])],
16.84 @@ -181,14 +181,14 @@
16.85 @{thm make_fun_by_explicit.simps})]
16.86 \<close>
16.87 setup \<open>KEStore_Elems.add_mets
16.88 - [Specify.prep_met thy "met_diffapp_max_oninterval" [] Celem.e_metID
16.89 + [Specify.prep_met thy "met_diffapp_max_oninterval" [] Spec.e_metID
16.90 (["DiffApp","max_on_interval_by_calculus"],
16.91 [("#Given" ,["functionEq t_t","boundVariable v_v","interval i_tv"(*, "errorBound e_rr"*)]),
16.92 ("#Find" ,["maxArgument v_0"])],
16.93 {rew_ord'="tless_true",rls'=eval_rls,calc=[],srls = Rule_Set.empty,prls=Rule_Set.empty, crls = eval_rls,
16.94 errpats = [], nrls = norm_Rational (*, asm_rls=[],asm_thm=[]*)},
16.95 @{thm refl}),
16.96 - Specify.prep_met thy "met_diffapp_findvals" [] Celem.e_metID
16.97 + Specify.prep_met thy "met_diffapp_findvals" [] Spec.e_metID
16.98 (["DiffApp","find_values"], [],
16.99 {rew_ord'="tless_true",rls'=eval_rls,calc=[],srls = Rule_Set.empty,prls=Rule_Set.empty, crls = eval_rls,
16.100 errpats = [], nrls = norm_Rational(*, asm_rls = [], asm_thm = []*)},
17.1 --- a/src/Tools/isac/Knowledge/DiophantEq.thy Tue Apr 21 12:26:08 2020 +0200
17.2 +++ b/src/Tools/isac/Knowledge/DiophantEq.thy Tue Apr 21 15:42:50 2020 +0200
17.3 @@ -15,7 +15,7 @@
17.4
17.5 text \<open>problemclass for the usecase\<close>
17.6 setup \<open>KEStore_Elems.add_pbts
17.7 - [(Specify.prep_pbt thy "pbl_equ_dio" [] Celem.e_pblID
17.8 + [(Specify.prep_pbt thy "pbl_equ_dio" [] Spec.e_pblID
17.9 (["diophantine","equation"],
17.10 [("#Given" ,["boolTestGiven e_e","intTestGiven (v_v::int)"]),
17.11 (* TODO: drop ^^^^^*)
17.12 @@ -33,7 +33,7 @@
17.13 (Try (Calculate ''PLUS'')) #>
17.14 (Try (Calculate ''TIMES''))) e_e)"
17.15 setup \<open>KEStore_Elems.add_mets
17.16 - [Specify.prep_met thy "met_test_diophant" [] Celem.e_metID
17.17 + [Specify.prep_met thy "met_test_diophant" [] Spec.e_metID
17.18 (["Test","solve_diophant"],
17.19 [("#Given" ,["boolTestGiven e_e","intTestGiven (v_v::int)"]),
17.20 (* TODO: drop ^^^^^*)
18.1 --- a/src/Tools/isac/Knowledge/EqSystem.thy Tue Apr 21 12:26:08 2020 +0200
18.2 +++ b/src/Tools/isac/Knowledge/EqSystem.thy Tue Apr 21 15:42:50 2020 +0200
18.3 @@ -406,18 +406,18 @@
18.4
18.5 (** problems **)
18.6 setup \<open>KEStore_Elems.add_pbts
18.7 - [(Specify.prep_pbt thy "pbl_equsys" [] Celem.e_pblID
18.8 + [(Specify.prep_pbt thy "pbl_equsys" [] Spec.e_pblID
18.9 (["system"],
18.10 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.11 ("#Find" ,["solution ss'''"](*''' is copy-named*))],
18.12 Rule_Set.append_rules "empty" Rule_Set.empty [(*for preds in where_*)], SOME "solveSystem e_s v_s", [])),
18.13 - (Specify.prep_pbt thy "pbl_equsys_lin" [] Celem.e_pblID
18.14 + (Specify.prep_pbt thy "pbl_equsys_lin" [] Spec.e_pblID
18.15 (["LINEAR", "system"],
18.16 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.17 (*TODO.WN050929 check linearity*)
18.18 ("#Find" ,["solution ss'''"])],
18.19 Rule_Set.append_rules "empty" Rule_Set.empty [(*for preds in where_*)], SOME "solveSystem e_s v_s", [])),
18.20 - (Specify.prep_pbt thy "pbl_equsys_lin_2x2" [] Celem.e_pblID
18.21 + (Specify.prep_pbt thy "pbl_equsys_lin_2x2" [] Spec.e_pblID
18.22 (["2x2", "LINEAR", "system"],
18.23 (*~~~~~~~~~~~~~~~~~~~~~~~~~*)
18.24 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.25 @@ -429,7 +429,7 @@
18.26 Rule.Eval ("Groups.plus_class.plus", (**)eval_binop "#add_"),
18.27 Rule.Eval ("HOL.eq", Prog_Expr.eval_equal "#equal_")],
18.28 SOME "solveSystem e_s v_s", [])),
18.29 - (Specify.prep_pbt thy "pbl_equsys_lin_2x2_tri" [] Celem.e_pblID
18.30 + (Specify.prep_pbt thy "pbl_equsys_lin_2x2_tri" [] Spec.e_pblID
18.31 (["triangular", "2x2", "LINEAR", "system"],
18.32 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.33 ("#Where",
18.34 @@ -437,14 +437,14 @@
18.35 " v_s from v_s occur_exactly_in (NTH 2 (e_s::bool list))"]),
18.36 ("#Find" ,["solution ss'''"])],
18.37 prls_triangular, SOME "solveSystem e_s v_s", [["EqSystem","top_down_substitution","2x2"]])),
18.38 - (Specify.prep_pbt thy "pbl_equsys_lin_2x2_norm" [] Celem.e_pblID
18.39 + (Specify.prep_pbt thy "pbl_equsys_lin_2x2_norm" [] Spec.e_pblID
18.40 (["normalise", "2x2", "LINEAR", "system"],
18.41 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.42 ("#Find" ,["solution ss'''"])],
18.43 Rule_Set.append_rules "empty" Rule_Set.empty [(*for preds in where_*)],
18.44 SOME "solveSystem e_s v_s",
18.45 [["EqSystem","normalise","2x2"]])),
18.46 - (Specify.prep_pbt thy "pbl_equsys_lin_3x3" [] Celem.e_pblID
18.47 + (Specify.prep_pbt thy "pbl_equsys_lin_3x3" [] Spec.e_pblID
18.48 (["3x3", "LINEAR", "system"],
18.49 (*~~~~~~~~~~~~~~~~~~~~~~~~~*)
18.50 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.51 @@ -456,7 +456,7 @@
18.52 Rule.Eval ("Groups.plus_class.plus", (**)eval_binop "#add_"),
18.53 Rule.Eval ("HOL.eq", Prog_Expr.eval_equal "#equal_")],
18.54 SOME "solveSystem e_s v_s", [])),
18.55 - (Specify.prep_pbt thy "pbl_equsys_lin_4x4" [] Celem.e_pblID
18.56 + (Specify.prep_pbt thy "pbl_equsys_lin_4x4" [] Spec.e_pblID
18.57 (["4x4", "LINEAR", "system"],
18.58 (*~~~~~~~~~~~~~~~~~~~~~~~~~*)
18.59 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.60 @@ -468,7 +468,7 @@
18.61 Rule.Eval ("Groups.plus_class.plus", (**)eval_binop "#add_"),
18.62 Rule.Eval ("HOL.eq", Prog_Expr.eval_equal "#equal_")],
18.63 SOME "solveSystem e_s v_s", [])),
18.64 - (Specify.prep_pbt thy "pbl_equsys_lin_4x4_tri" [] Celem.e_pblID
18.65 + (Specify.prep_pbt thy "pbl_equsys_lin_4x4_tri" [] Spec.e_pblID
18.66 (["triangular", "4x4", "LINEAR", "system"],
18.67 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.68 ("#Where" , (*accepts missing variables up to diagional form*)
18.69 @@ -481,7 +481,7 @@
18.70 [Rule.Eval ("Prog_Expr.occurs'_in", Prog_Expr.eval_occurs_in "")],
18.71 SOME "solveSystem e_s v_s",
18.72 [["EqSystem","top_down_substitution","4x4"]])),
18.73 - (Specify.prep_pbt thy "pbl_equsys_lin_4x4_norm" [] Celem.e_pblID
18.74 + (Specify.prep_pbt thy "pbl_equsys_lin_4x4_norm" [] Spec.e_pblID
18.75 (["normalise", "4x4", "LINEAR", "system"],
18.76 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.77 (*LENGTH is checked 1 level above*)
18.78 @@ -510,12 +510,12 @@
18.79
18.80 (**methods**)
18.81 setup \<open>KEStore_Elems.add_mets
18.82 - [Specify.prep_met thy "met_eqsys" [] Celem.e_metID
18.83 + [Specify.prep_met thy "met_eqsys" [] Spec.e_metID
18.84 (["EqSystem"], [],
18.85 {rew_ord'="tless_true", rls' = Rule_Set.Empty, calc = [], srls = Rule_Set.Empty, prls = Rule_Set.Empty, crls = Rule_Set.Empty,
18.86 errpats = [], nrls = Rule_Set.Empty},
18.87 @{thm refl}),
18.88 - Specify.prep_met thy "met_eqsys_topdown" [] Celem.e_metID
18.89 + Specify.prep_met thy "met_eqsys_topdown" [] Spec.e_metID
18.90 (["EqSystem","top_down_substitution"], [],
18.91 {rew_ord'="tless_true", rls' = Rule_Set.Empty, calc = [], srls = Rule_Set.Empty, prls = Rule_Set.Empty, crls = Rule_Set.Empty,
18.92 errpats = [], nrls = Rule_Set.Empty},
18.93 @@ -542,7 +542,7 @@
18.94 in
18.95 Try (Rewrite_Set ''order_system'' ) e__s) "
18.96 setup \<open>KEStore_Elems.add_mets
18.97 - [Specify.prep_met thy "met_eqsys_topdown_2x2" [] Celem.e_metID
18.98 + [Specify.prep_met thy "met_eqsys_topdown_2x2" [] Spec.e_metID
18.99 (["EqSystem", "top_down_substitution", "2x2"],
18.100 [("#Given", ["equalities e_s", "solveForVars v_s"]),
18.101 ("#Where",
18.102 @@ -558,7 +558,7 @@
18.103 @{thm solve_system.simps})]
18.104 \<close>
18.105 setup \<open>KEStore_Elems.add_mets
18.106 - [Specify.prep_met thy "met_eqsys_norm" [] Celem.e_metID
18.107 + [Specify.prep_met thy "met_eqsys_norm" [] Spec.e_metID
18.108 (["EqSystem", "normalise"], [],
18.109 {rew_ord'="tless_true", rls' = Rule_Set.Empty, calc = [], srls = Rule_Set.Empty, prls = Rule_Set.Empty, crls = Rule_Set.Empty,
18.110 errpats = [], nrls = Rule_Set.Empty},
18.111 @@ -580,7 +580,7 @@
18.112 SubProblem (''EqSystem'', [''LINEAR'', ''system''], [''no_met''])
18.113 [BOOL_LIST e__s, REAL_LIST v_s])"
18.114 setup \<open>KEStore_Elems.add_mets
18.115 - [Specify.prep_met thy "met_eqsys_norm_2x2" [] Celem.e_metID
18.116 + [Specify.prep_met thy "met_eqsys_norm_2x2" [] Spec.e_metID
18.117 (["EqSystem","normalise","2x2"],
18.118 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.119 ("#Find" ,["solution ss'''"])],
18.120 @@ -612,7 +612,7 @@
18.121 SubProblem (''EqSystem'', [''LINEAR'', ''system''], [''no_met''])
18.122 [BOOL_LIST e__s, REAL_LIST v_s])"
18.123 setup \<open>KEStore_Elems.add_mets
18.124 - [Specify.prep_met thy "met_eqsys_norm_4x4" [] Celem.e_metID
18.125 + [Specify.prep_met thy "met_eqsys_norm_4x4" [] Spec.e_metID
18.126 (["EqSystem","normalise","4x4"],
18.127 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.128 ("#Find" ,["solution ss'''"])],
18.129 @@ -644,7 +644,7 @@
18.130 in
18.131 [e_1, e_2, NTH 3 e_s, NTH 4 e_s])"
18.132 setup \<open>KEStore_Elems.add_mets
18.133 - [Specify.prep_met thy "met_eqsys_topdown_4x4" [] Celem.e_metID
18.134 + [Specify.prep_met thy "met_eqsys_topdown_4x4" [] Spec.e_metID
18.135 (["EqSystem","top_down_substitution","4x4"],
18.136 [("#Given" ,["equalities e_s", "solveForVars v_s"]),
18.137 ("#Where" , (*accepts missing variables up to diagonal form*)
19.1 --- a/src/Tools/isac/Knowledge/Equation.thy Tue Apr 21 12:26:08 2020 +0200
19.2 +++ b/src/Tools/isac/Knowledge/Equation.thy Tue Apr 21 15:42:50 2020 +0200
19.3 @@ -43,14 +43,14 @@
19.4 setup \<open>KEStore_Elems.add_rlss [("univariate_equation_prls",
19.5 (Context.theory_name @{theory}, Auto_Prog.prep_rls @{theory} univariate_equation_prls))]\<close>
19.6 setup \<open>KEStore_Elems.add_pbts
19.7 - [(Specify.prep_pbt thy "pbl_equ" [] Celem.e_pblID
19.8 + [(Specify.prep_pbt thy "pbl_equ" [] Spec.e_pblID
19.9 (["equation"],
19.10 [("#Given" ,["equality e_e","solveFor v_v"]),
19.11 ("#Where" ,["matches (?a = ?b) e_e"]),
19.12 ("#Find" ,["solutions v_v'i'"])],
19.13 Rule_Set.append_rules "equation_prls" Rule_Set.empty [Rule.Eval ("Prog_Expr.matches", Prog_Expr.eval_matches "")],
19.14 SOME "solve (e_e::bool, v_v)", [])),
19.15 - (Specify.prep_pbt thy "pbl_equ_univ" [] Celem.e_pblID
19.16 + (Specify.prep_pbt thy "pbl_equ_univ" [] Spec.e_pblID
19.17 (["univariate","equation"],
19.18 [("#Given" ,["equality e_e","solveFor v_v"]),
19.19 ("#Where" ,["matches (?a = ?b) e_e"]),
19.20 @@ -81,7 +81,7 @@
19.21
19.22
19.23 setup \<open>KEStore_Elems.add_mets
19.24 - [Specify.prep_met thy "met_equ" [] Celem.e_metID
19.25 + [Specify.prep_met thy "met_equ" [] Spec.e_metID
19.26 (["Equation"], [],
19.27 {rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty, crls = Atools_erls,
19.28 errpats = [], nrls = Rule_Set.empty},
20.1 --- a/src/Tools/isac/Knowledge/InsSort.thy Tue Apr 21 12:26:08 2020 +0200
20.2 +++ b/src/Tools/isac/Knowledge/InsSort.thy Tue Apr 21 15:42:50 2020 +0200
20.3 @@ -72,11 +72,11 @@
20.4
20.5 section \<open>problems\<close>
20.6 setup \<open>KEStore_Elems.add_pbts
20.7 - [(Specify.prep_pbt @{theory} "pbl_Programming" [] Celem.e_pblID
20.8 + [(Specify.prep_pbt @{theory} "pbl_Programming" [] Spec.e_pblID
20.9 (["Programming"], [], Rule_Set.empty, NONE, [])),
20.10 - (Specify.prep_pbt @{theory} "pbl_Prog_sort" [] Celem.e_pblID
20.11 + (Specify.prep_pbt @{theory} "pbl_Prog_sort" [] Spec.e_pblID
20.12 (["SORT","Programming"], [], Rule_Set.empty, NONE, [])),
20.13 - (Specify.prep_pbt @{theory} "pbl_Prog_sort_ins" [] Celem.e_pblID
20.14 + (Specify.prep_pbt @{theory} "pbl_Prog_sort_ins" [] Spec.e_pblID
20.15 (["insertion","SORT","Programming"],
20.16 [("#Given", ["unsorted u_u"]), ("#Find", ["sorted s_s"])],
20.17 Rule_Set.empty,
20.18 @@ -85,11 +85,11 @@
20.19 section \<open>methods\<close>
20.20 (* TODO: implementation needs extra object-level lists ?!?*)
20.21 setup \<open>KEStore_Elems.add_mets
20.22 - [ Specify.prep_met @{theory} "met_Programming" [] Celem.e_metID
20.23 + [ Specify.prep_met @{theory} "met_Programming" [] Spec.e_metID
20.24 (["Programming"], [],
20.25 {rew_ord'="tless_true",rls' = Rule_Set.empty, calc = [], srls = Rule_Set.empty, prls = Rule_Set.empty,
20.26 crls = Rule_Set.empty, errpats = [], nrls = Rule_Set.empty}, @{thm refl}),
20.27 - Specify.prep_met @{theory} "met_Prog_sort" [] Celem.e_metID
20.28 + Specify.prep_met @{theory} "met_Prog_sort" [] Spec.e_metID
20.29 (["Programming","SORT"], [],
20.30 {rew_ord'="tless_true",rls' = Rule_Set.empty, calc = [], srls = Rule_Set.empty, prls = Rule_Set.empty,
20.31 crls = Rule_Set.empty, errpats = [], nrls = Rule_Set.empty},
20.32 @@ -104,7 +104,7 @@
20.33 in
20.34 (Rewrite_Set ''ins_sort'') uns)"
20.35 setup \<open>KEStore_Elems.add_mets
20.36 - [Specify.prep_met @{theory} "met_Prog_sort_ins" [] Celem.e_metID
20.37 + [Specify.prep_met @{theory} "met_Prog_sort_ins" [] Spec.e_metID
20.38 (["Programming","SORT","insertion"],
20.39 [("#Given", ["unsorted u_u"]), ("#Find", ["sorted s_s"])],
20.40 {rew_ord'="tless_true",rls' = Atools_erls, calc = [], srls = Rule_Set.empty, prls = Rule_Set.empty,
20.41 @@ -134,7 +134,7 @@
20.42 (Repeat (Rewrite ''if_False'')))
20.43 ) uns)"
20.44 setup \<open>KEStore_Elems.add_mets
20.45 - [Specify.prep_met @{theory} "met_Prog_sort_ins_steps" [] Celem.e_metID
20.46 + [Specify.prep_met @{theory} "met_Prog_sort_ins_steps" [] Spec.e_metID
20.47 (["Programming","SORT","insertion_steps"],
20.48 [("#Given", ["unsorted u_u"]), ("#Find", ["sorted s_s"])],
20.49 {rew_ord'="tless_true",rls' = Atools_erls, calc = [], srls = Rule_Set.empty, prls = Rule_Set.empty,
21.1 --- a/src/Tools/isac/Knowledge/Integrate.thy Tue Apr 21 12:26:08 2020 +0200
21.2 +++ b/src/Tools/isac/Knowledge/Integrate.thy Tue Apr 21 15:42:50 2020 +0200
21.3 @@ -331,7 +331,7 @@
21.4
21.5 (** problems **)
21.6 setup \<open>KEStore_Elems.add_pbts
21.7 - [(Specify.prep_pbt thy "pbl_fun_integ" [] Celem.e_pblID
21.8 + [(Specify.prep_pbt thy "pbl_fun_integ" [] Spec.e_pblID
21.9 (["integrate","function"],
21.10 [("#Given" ,["functionTerm f_f", "integrateBy v_v"]),
21.11 ("#Find" ,["antiDerivative F_F"])],
21.12 @@ -339,7 +339,7 @@
21.13 SOME "Integrate (f_f, v_v)",
21.14 [["diff","integration"]])),
21.15 (*here "named" is used differently from Differentiation"*)
21.16 - (Specify.prep_pbt thy "pbl_fun_integ_nam" [] Celem.e_pblID
21.17 + (Specify.prep_pbt thy "pbl_fun_integ_nam" [] Spec.e_pblID
21.18 (["named","integrate","function"],
21.19 [("#Given" ,["functionTerm f_f", "integrateBy v_v"]),
21.20 ("#Find" ,["antiDerivativeName F_F"])],
21.21 @@ -357,7 +357,7 @@
21.22 in
21.23 (Rewrite_Set_Inst [(''bdv'', v_v)] ''integration'') t_t)"
21.24 setup \<open>KEStore_Elems.add_mets
21.25 - [Specify.prep_met thy "met_diffint" [] Celem.e_metID
21.26 + [Specify.prep_met thy "met_diffint" [] Spec.e_metID
21.27 (["diff","integration"],
21.28 [("#Given" ,["functionTerm f_f", "integrateBy v_v"]), ("#Find" ,["antiDerivative F_F"])],
21.29 {rew_ord'="tless_true", rls'=Atools_erls, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty,
21.30 @@ -375,7 +375,7 @@
21.31 (Rewrite_Set_Inst [(''bdv'', v_v)] ''integration'')
21.32 ) t_t)"
21.33 setup \<open>KEStore_Elems.add_mets
21.34 - [Specify.prep_met thy "met_diffint_named" [] Celem.e_metID
21.35 + [Specify.prep_met thy "met_diffint_named" [] Spec.e_metID
21.36 (["diff","integration","named"],
21.37 [("#Given" ,["functionTerm f_f", "integrateBy v_v"]),
21.38 ("#Find" ,["antiDerivativeName F_F"])],
22.1 --- a/src/Tools/isac/Knowledge/Inverse_Z_Transform.thy Tue Apr 21 12:26:08 2020 +0200
22.2 +++ b/src/Tools/isac/Knowledge/Inverse_Z_Transform.thy Tue Apr 21 15:42:50 2020 +0200
22.3 @@ -46,10 +46,10 @@
22.4 val thy = @{theory};
22.5 \<close>
22.6 setup \<open>KEStore_Elems.add_pbts
22.7 - [(Specify.prep_pbt thy "pbl_SP" [] Celem.e_pblID (["SignalProcessing"], [], Rule_Set.empty, NONE, [])),
22.8 - (Specify.prep_pbt thy "pbl_SP_Ztrans" [] Celem.e_pblID
22.9 + [(Specify.prep_pbt thy "pbl_SP" [] Spec.e_pblID (["SignalProcessing"], [], Rule_Set.empty, NONE, [])),
22.10 + (Specify.prep_pbt thy "pbl_SP_Ztrans" [] Spec.e_pblID
22.11 (["Z_Transform","SignalProcessing"], [], Rule_Set.empty, NONE, [])),
22.12 - (Specify.prep_pbt thy "pbl_SP_Ztrans_inv" [] Celem.e_pblID
22.13 + (Specify.prep_pbt thy "pbl_SP_Ztrans_inv" [] Spec.e_pblID
22.14 (["Inverse", "Z_Transform", "SignalProcessing"],
22.15 [("#Given" , ["filterExpression X_eq"]),
22.16 ("#Find" ,["stepResponse n_eq"])], \<comment> \<open>TODO: unused, "u [n]" is introduced by rule1..6\<close>
22.17 @@ -59,11 +59,11 @@
22.18 subsection \<open>Setup Parent Nodes in Hierarchy of Method\<close>
22.19 ML \<open>val thy = @{theory}; (*latest version of thy required*)\<close>
22.20 setup \<open>KEStore_Elems.add_mets
22.21 - [Specify.prep_met thy "met_SP" [] Celem.e_metID
22.22 + [Specify.prep_met thy "met_SP" [] Spec.e_metID
22.23 (["SignalProcessing"], [],
22.24 {rew_ord'="tless_true", rls'= Rule_Set.empty, calc = [], srls = Rule_Set.empty, prls = Rule_Set.empty, crls = Rule_Set.empty,
22.25 errpats = [], nrls = Rule_Set.empty}, @{thm refl}),
22.26 - Specify.prep_met thy "met_SP_Ztrans" [] Celem.e_metID
22.27 + Specify.prep_met thy "met_SP_Ztrans" [] Spec.e_metID
22.28 (["SignalProcessing", "Z_Transform"], [],
22.29 {rew_ord'="tless_true", rls'= Rule_Set.empty, calc = [], srls = Rule_Set.empty, prls = Rule_Set.empty, crls = Rule_Set.empty,
22.30 errpats = [], nrls = Rule_Set.empty}, @{thm refl})]
22.31 @@ -87,7 +87,7 @@
22.32 [BOOL equ, REAL X_z]
22.33 in X) "
22.34 setup \<open>KEStore_Elems.add_mets
22.35 - [Specify.prep_met thy "met_SP_Ztrans_inv" [] Celem.e_metID
22.36 + [Specify.prep_met thy "met_SP_Ztrans_inv" [] Spec.e_metID
22.37 (["SignalProcessing", "Z_Transform", "Inverse"],
22.38 [("#Given" ,["filterExpression X_eq", "functionName X_z"]),
22.39 ("#Find" ,["stepResponse n_eq"])], \<comment> \<open>TODO: unused, "u [n]" is introduced by rule1..6\<close>
22.40 @@ -115,7 +115,7 @@
22.41 n_eq = (Rewrite_Set ''inverse_z'' ) X_zeq
22.42 in n_eq)"
22.43 setup \<open>KEStore_Elems.add_mets
22.44 - [Specify.prep_met thy "met_SP_Ztrans_inv_sub" [] Celem.e_metID
22.45 + [Specify.prep_met thy "met_SP_Ztrans_inv_sub" [] Spec.e_metID
22.46 (["SignalProcessing", "Z_Transform", "Inverse_sub"],
22.47 [("#Given" ,["filterExpression X_eq", "functionName X_z"]),
22.48 ("#Find" ,["stepResponse n_eq"])], \<comment> \<open>TODO: unused, "u [n]" is introduced by rule1..6\<close>
23.1 --- a/src/Tools/isac/Knowledge/LinEq.thy Tue Apr 21 12:26:08 2020 +0200
23.2 +++ b/src/Tools/isac/Knowledge/LinEq.thy Tue Apr 21 15:42:50 2020 +0200
23.3 @@ -114,7 +114,7 @@
23.4 (*----------------------------- problem types --------------------------------*)
23.5 (* ---------linear----------- *)
23.6 setup \<open>KEStore_Elems.add_pbts
23.7 - [(Specify.prep_pbt thy "pbl_equ_univ_lin" [] Celem.e_pblID
23.8 + [(Specify.prep_pbt thy "pbl_equ_univ_lin" [] Spec.e_pblID
23.9 (["LINEAR", "univariate", "equation"],
23.10 [("#Given" ,["equality e_e", "solveFor v_v"]),
23.11 ("#Where" ,["HOL.False", (*WN0509 just detected: this pbl can never be used?!?*)
23.12 @@ -127,7 +127,7 @@
23.13
23.14 (*-------------- methods------------------------------------------------------*)
23.15 setup \<open>KEStore_Elems.add_mets
23.16 - [Specify.prep_met thy "met_eqlin" [] Celem.e_metID
23.17 + [Specify.prep_met thy "met_eqlin" [] Spec.e_metID
23.18 (["LinEq"], [],
23.19 {rew_ord' = "tless_true",rls' = Atools_erls,calc = [], srls = Rule_Set.empty, prls = Rule_Set.empty,
23.20 crls = LinEq_crls, errpats = [], nrls = norm_Poly},
23.21 @@ -151,7 +151,7 @@
23.22 in
23.23 Or_to_List e_e)"
23.24 setup \<open>KEStore_Elems.add_mets
23.25 - [Specify.prep_met thy "met_eq_lin" [] Celem.e_metID
23.26 + [Specify.prep_met thy "met_eq_lin" [] Spec.e_metID
23.27 (["LinEq","solve_lineq_equation"],
23.28 [("#Given", ["equality e_e", "solveFor v_v"]),
23.29 ("#Where", ["Not ((lhs e_e) is_polyrat_in v_v)", "((lhs e_e) has_degree_in v_v) = 1"]),
24.1 --- a/src/Tools/isac/Knowledge/LogExp.thy Tue Apr 21 12:26:08 2020 +0200
24.2 +++ b/src/Tools/isac/Knowledge/LogExp.thy Tue Apr 21 15:42:50 2020 +0200
24.3 @@ -22,7 +22,7 @@
24.4 \<close>
24.5 (** problems **)
24.6 setup \<open>KEStore_Elems.add_pbts
24.7 - [(Specify.prep_pbt thy "pbl_test_equ_univ_log" [] Celem.e_pblID
24.8 + [(Specify.prep_pbt thy "pbl_test_equ_univ_log" [] Spec.e_pblID
24.9 (["logarithmic","univariate","equation"],
24.10 [("#Given",["equality e_e","solveFor v_v"]),
24.11 ("#Where",["matches ((?a log ?v_v) = ?b) e_e"]),
24.12 @@ -44,7 +44,7 @@
24.13 in
24.14 [e_e])"
24.15 setup \<open>KEStore_Elems.add_mets
24.16 - [Specify.prep_met thy "met_equ_log" [] Celem.e_metID
24.17 + [Specify.prep_met thy "met_equ_log" [] Spec.e_metID
24.18 (["Equation","solve_log"],
24.19 [("#Given" ,["equality e_e","solveFor v_v"]),
24.20 ("#Where" ,["matches ((?a log ?v_v) = ?b) e_e"]),
25.1 --- a/src/Tools/isac/Knowledge/Partial_Fractions.thy Tue Apr 21 12:26:08 2020 +0200
25.2 +++ b/src/Tools/isac/Knowledge/Partial_Fractions.thy Tue Apr 21 15:42:50 2020 +0200
25.3 @@ -148,7 +148,7 @@
25.4 Check_Unique.check_guhs_unique := false; (*WN120307 REMOVE after editing*)
25.5 \<close>
25.6 setup \<open>KEStore_Elems.add_pbts
25.7 - [(Specify.prep_pbt @{theory} "pbl_simp_rat_partfrac" [] Celem.e_pblID
25.8 + [(Specify.prep_pbt @{theory} "pbl_simp_rat_partfrac" [] Spec.e_pblID
25.9 (["partial_fraction", "rational", "simplification"],
25.10 [("#Given" ,["functionTerm t_t", "solveFor v_v"]),
25.11 (* TODO: call this sub-problem with appropriate functionTerm:
25.12 @@ -228,7 +228,7 @@
25.13 pbz = Substitute [AA = a, BB = b] pbz \<comment> \<open>([], Res), 4 / (z - 1 / 2) + -4 / (z - -1 / 4)\<close>
25.14 in pbz) "
25.15 setup \<open>KEStore_Elems.add_mets
25.16 - [Specify.prep_met @{theory} "met_partial_fraction" [] Celem.e_metID
25.17 + [Specify.prep_met @{theory} "met_partial_fraction" [] Spec.e_metID
25.18 (["simplification","of_rationals","to_partial_fraction"],
25.19 [("#Given" ,["functionTerm t_t", "solveFor v_v"]),
25.20 (*("#Where" ,["((get_numerator t_t) has_degree_in v_v) <
26.1 --- a/src/Tools/isac/Knowledge/Poly.thy Tue Apr 21 12:26:08 2020 +0200
26.2 +++ b/src/Tools/isac/Knowledge/Poly.thy Tue Apr 21 15:42:50 2020 +0200
26.3 @@ -1434,7 +1434,7 @@
26.4
26.5 subsection \<open>problems\<close>
26.6 setup \<open>KEStore_Elems.add_pbts
26.7 - [(Specify.prep_pbt thy "pbl_simp_poly" [] Celem.e_pblID
26.8 + [(Specify.prep_pbt thy "pbl_simp_poly" [] Spec.e_pblID
26.9 (["polynomial","simplification"],
26.10 [("#Given" ,["Term t_t"]),
26.11 ("#Where" ,["t_t is_polyexp"]),
26.12 @@ -1450,7 +1450,7 @@
26.13 where
26.14 "simplify term = ((Rewrite_Set ''norm_Poly'') term)"
26.15 setup \<open>KEStore_Elems.add_mets
26.16 - [Specify.prep_met thy "met_simp_poly" [] Celem.e_metID
26.17 + [Specify.prep_met thy "met_simp_poly" [] Spec.e_metID
26.18 (["simplification","for_polynomials"],
26.19 [("#Given" ,["Term t_t"]),
26.20 ("#Where" ,["t_t is_polyexp"]),
27.1 --- a/src/Tools/isac/Knowledge/PolyEq.thy Tue Apr 21 12:26:08 2020 +0200
27.2 +++ b/src/Tools/isac/Knowledge/PolyEq.thy Tue Apr 21 15:42:50 2020 +0200
27.3 @@ -778,7 +778,7 @@
27.4 *)
27.5 \<close>
27.6 setup \<open>KEStore_Elems.add_pbts
27.7 - [(Specify.prep_pbt thy "pbl_equ_univ_poly" [] Celem.e_pblID
27.8 + [(Specify.prep_pbt thy "pbl_equ_univ_poly" [] Spec.e_pblID
27.9 (["polynomial","univariate","equation"],
27.10 [("#Given" ,["equality e_e","solveFor v_v"]),
27.11 ("#Where" ,["~((e_e::bool) is_ratequation_in (v_v::real))",
27.12 @@ -787,7 +787,7 @@
27.13 ("#Find" ,["solutions v_v'i'"])],
27.14 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [])),
27.15 (*--- d0 ---*)
27.16 - (Specify.prep_pbt thy "pbl_equ_univ_poly_deg0" [] Celem.e_pblID
27.17 + (Specify.prep_pbt thy "pbl_equ_univ_poly_deg0" [] Spec.e_pblID
27.18 (["degree_0","polynomial","univariate","equation"],
27.19 [("#Given" ,["equality e_e","solveFor v_v"]),
27.20 ("#Where" ,["matches (?a = 0) e_e",
27.21 @@ -796,7 +796,7 @@
27.22 ("#Find" ,["solutions v_v'i'"])],
27.23 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [["PolyEq","solve_d0_polyeq_equation"]])),
27.24 (*--- d1 ---*)
27.25 - (Specify.prep_pbt thy "pbl_equ_univ_poly_deg1" [] Celem.e_pblID
27.26 + (Specify.prep_pbt thy "pbl_equ_univ_poly_deg1" [] Spec.e_pblID
27.27 (["degree_1","polynomial","univariate","equation"],
27.28 [("#Given" ,["equality e_e","solveFor v_v"]),
27.29 ("#Where" ,["matches (?a = 0) e_e",
27.30 @@ -805,7 +805,7 @@
27.31 ("#Find" ,["solutions v_v'i'"])],
27.32 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [["PolyEq","solve_d1_polyeq_equation"]])),
27.33 (*--- d2 ---*)
27.34 - (Specify.prep_pbt thy "pbl_equ_univ_poly_deg2" [] Celem.e_pblID
27.35 + (Specify.prep_pbt thy "pbl_equ_univ_poly_deg2" [] Spec.e_pblID
27.36 (["degree_2","polynomial","univariate","equation"],
27.37 [("#Given" ,["equality e_e","solveFor v_v"]),
27.38 ("#Where" ,["matches (?a = 0) e_e",
27.39 @@ -813,7 +813,7 @@
27.40 "((lhs e_e) has_degree_in v_v ) = 2"]),
27.41 ("#Find" ,["solutions v_v'i'"])],
27.42 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [["PolyEq","solve_d2_polyeq_equation"]])),
27.43 - (Specify.prep_pbt thy "pbl_equ_univ_poly_deg2_sqonly" [] Celem.e_pblID
27.44 + (Specify.prep_pbt thy "pbl_equ_univ_poly_deg2_sqonly" [] Spec.e_pblID
27.45 (["sq_only","degree_2","polynomial","univariate","equation"],
27.46 [("#Given" ,["equality e_e","solveFor v_v"]),
27.47 ("#Where" ,["matches ( ?a + ?v_^^^2 = 0) e_e | " ^
27.48 @@ -831,7 +831,7 @@
27.49 ("#Find" ,["solutions v_v'i'"])],
27.50 PolyEq_prls, SOME "solve (e_e::bool, v_v)",
27.51 [["PolyEq","solve_d2_polyeq_sqonly_equation"]])),
27.52 - (Specify.prep_pbt thy "pbl_equ_univ_poly_deg2_bdvonly" [] Celem.e_pblID
27.53 + (Specify.prep_pbt thy "pbl_equ_univ_poly_deg2_bdvonly" [] Spec.e_pblID
27.54 (["bdv_only","degree_2","polynomial","univariate","equation"],
27.55 [("#Given", ["equality e_e","solveFor v_v"]),
27.56 ("#Where", ["matches (?a*?v_ + ?v_^^^2 = 0) e_e | " ^
27.57 @@ -843,14 +843,14 @@
27.58 ("#Find", ["solutions v_v'i'"])],
27.59 PolyEq_prls, SOME "solve (e_e::bool, v_v)",
27.60 [["PolyEq","solve_d2_polyeq_bdvonly_equation"]])),
27.61 - (Specify.prep_pbt thy "pbl_equ_univ_poly_deg2_pq" [] Celem.e_pblID
27.62 + (Specify.prep_pbt thy "pbl_equ_univ_poly_deg2_pq" [] Spec.e_pblID
27.63 (["pqFormula","degree_2","polynomial","univariate","equation"],
27.64 [("#Given", ["equality e_e","solveFor v_v"]),
27.65 ("#Where", ["matches (?a + 1*?v_^^^2 = 0) e_e | " ^
27.66 "matches (?a + ?v_^^^2 = 0) e_e"]),
27.67 ("#Find", ["solutions v_v'i'"])],
27.68 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [["PolyEq","solve_d2_polyeq_pq_equation"]])),
27.69 - (Specify.prep_pbt thy "pbl_equ_univ_poly_deg2_abc" [] Celem.e_pblID
27.70 + (Specify.prep_pbt thy "pbl_equ_univ_poly_deg2_abc" [] Spec.e_pblID
27.71 (["abcFormula","degree_2","polynomial","univariate","equation"],
27.72 [("#Given", ["equality e_e","solveFor v_v"]),
27.73 ("#Where", ["matches (?a + ?v_^^^2 = 0) e_e | " ^
27.74 @@ -858,7 +858,7 @@
27.75 ("#Find", ["solutions v_v'i'"])],
27.76 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [["PolyEq","solve_d2_polyeq_abc_equation"]])),
27.77 (*--- d3 ---*)
27.78 - (Specify.prep_pbt thy "pbl_equ_univ_poly_deg3" [] Celem.e_pblID
27.79 + (Specify.prep_pbt thy "pbl_equ_univ_poly_deg3" [] Spec.e_pblID
27.80 (["degree_3","polynomial","univariate","equation"],
27.81 [("#Given", ["equality e_e","solveFor v_v"]),
27.82 ("#Where", ["matches (?a = 0) e_e",
27.83 @@ -867,7 +867,7 @@
27.84 ("#Find", ["solutions v_v'i'"])],
27.85 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [["PolyEq","solve_d3_polyeq_equation"]])),
27.86 (*--- d4 ---*)
27.87 - (Specify.prep_pbt thy "pbl_equ_univ_poly_deg4" [] Celem.e_pblID
27.88 + (Specify.prep_pbt thy "pbl_equ_univ_poly_deg4" [] Spec.e_pblID
27.89 (["degree_4","polynomial","univariate","equation"],
27.90 [("#Given", ["equality e_e","solveFor v_v"]),
27.91 ("#Where", ["matches (?a = 0) e_e",
27.92 @@ -876,7 +876,7 @@
27.93 ("#Find", ["solutions v_v'i'"])],
27.94 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [(*["PolyEq","solve_d4_polyeq_equation"]*)])),
27.95 (*--- normalise ---*)
27.96 - (Specify.prep_pbt thy "pbl_equ_univ_poly_norm" [] Celem.e_pblID
27.97 + (Specify.prep_pbt thy "pbl_equ_univ_poly_norm" [] Spec.e_pblID
27.98 (["normalise","polynomial","univariate","equation"],
27.99 [("#Given", ["equality e_e","solveFor v_v"]),
27.100 ("#Where", ["(Not((matches (?a = 0 ) e_e ))) |" ^
27.101 @@ -884,7 +884,7 @@
27.102 ("#Find", ["solutions v_v'i'"])],
27.103 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [["PolyEq", "normalise_poly"]])),
27.104 (*-------------------------expanded-----------------------*)
27.105 - (Specify.prep_pbt thy "pbl_equ_univ_expand" [] Celem.e_pblID
27.106 + (Specify.prep_pbt thy "pbl_equ_univ_expand" [] Spec.e_pblID
27.107 (["expanded","univariate","equation"],
27.108 [("#Given", ["equality e_e","solveFor v_v"]),
27.109 ("#Where", ["matches (?a = 0) e_e",
27.110 @@ -892,7 +892,7 @@
27.111 ("#Find", ["solutions v_v'i'"])],
27.112 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [])),
27.113 (*--- d2 ---*)
27.114 - (Specify.prep_pbt thy "pbl_equ_univ_expand_deg2" [] Celem.e_pblID
27.115 + (Specify.prep_pbt thy "pbl_equ_univ_expand_deg2" [] Spec.e_pblID
27.116 (["degree_2","expanded","univariate","equation"],
27.117 [("#Given", ["equality e_e","solveFor v_v"]),
27.118 ("#Where", ["((lhs e_e) has_degree_in v_v) = 2"]),
27.119 @@ -901,7 +901,7 @@
27.120
27.121 text \<open>"-------------------------methods-----------------------"\<close>
27.122 setup \<open>KEStore_Elems.add_mets
27.123 - [Specify.prep_met thy "met_polyeq" [] Celem.e_metID
27.124 + [Specify.prep_met thy "met_polyeq" [] Spec.e_metID
27.125 (["PolyEq"], [],
27.126 {rew_ord'="tless_true",rls'=Atools_erls,calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty,
27.127 crls=PolyEq_crls, errpats = [], nrls = norm_Rational},
27.128 @@ -922,7 +922,7 @@
27.129 SubProblem (''PolyEq'', [''polynomial'', ''univariate'', ''equation''], [''no_met''])
27.130 [BOOL e_e, REAL v_v])"
27.131 setup \<open>KEStore_Elems.add_mets
27.132 - [Specify.prep_met thy "met_polyeq_norm" [] Celem.e_metID
27.133 + [Specify.prep_met thy "met_polyeq_norm" [] Spec.e_metID
27.134 (["PolyEq", "normalise_poly"],
27.135 [("#Given" ,["equality e_e","solveFor v_v"]),
27.136 ("#Where" ,["(Not((matches (?a = 0 ) e_e ))) | (Not(((lhs e_e) is_poly_in v_v)))"]),
27.137 @@ -940,7 +940,7 @@
27.138 in
27.139 Or_to_List e_e)"
27.140 setup \<open>KEStore_Elems.add_mets
27.141 - [Specify.prep_met thy "met_polyeq_d0" [] Celem.e_metID
27.142 + [Specify.prep_met thy "met_polyeq_d0" [] Spec.e_metID
27.143 (["PolyEq","solve_d0_polyeq_equation"],
27.144 [("#Given" ,["equality e_e","solveFor v_v"]),
27.145 ("#Where" ,["(lhs e_e) is_poly_in v_v ", "((lhs e_e) has_degree_in v_v) = 0"]),
27.146 @@ -963,7 +963,7 @@
27.147 in
27.148 Check_elementwise L_L {(v_v::real). Assumptions})"
27.149 setup \<open>KEStore_Elems.add_mets
27.150 - [Specify.prep_met thy "met_polyeq_d1" [] Celem.e_metID
27.151 + [Specify.prep_met thy "met_polyeq_d1" [] Spec.e_metID
27.152 (["PolyEq","solve_d1_polyeq_equation"],
27.153 [("#Given" ,["equality e_e","solveFor v_v"]),
27.154 ("#Where" ,["(lhs e_e) is_poly_in v_v ", "((lhs e_e) has_degree_in v_v) = 1"]),
27.155 @@ -988,7 +988,7 @@
27.156 in
27.157 Check_elementwise L_L {(v_v::real). Assumptions})"
27.158 setup \<open>KEStore_Elems.add_mets
27.159 - [Specify.prep_met thy "met_polyeq_d22" [] Celem.e_metID
27.160 + [Specify.prep_met thy "met_polyeq_d22" [] Spec.e_metID
27.161 (["PolyEq","solve_d2_polyeq_equation"],
27.162 [("#Given" ,["equality e_e","solveFor v_v"]),
27.163 ("#Where" ,["(lhs e_e) is_poly_in v_v ", "((lhs e_e) has_degree_in v_v) = 2"]),
27.164 @@ -1013,7 +1013,7 @@
27.165 in
27.166 Check_elementwise L_L {(v_v::real). Assumptions})"
27.167 setup \<open>KEStore_Elems.add_mets
27.168 - [Specify.prep_met thy "met_polyeq_d2_bdvonly" [] Celem.e_metID
27.169 + [Specify.prep_met thy "met_polyeq_d2_bdvonly" [] Spec.e_metID
27.170 (["PolyEq","solve_d2_polyeq_bdvonly_equation"],
27.171 [("#Given" ,["equality e_e","solveFor v_v"]),
27.172 ("#Where" ,["(lhs e_e) is_poly_in v_v ", "((lhs e_e) has_degree_in v_v) = 2"]),
27.173 @@ -1036,7 +1036,7 @@
27.174 in
27.175 Check_elementwise L_L {(v_v::real). Assumptions})"
27.176 setup \<open>KEStore_Elems.add_mets
27.177 - [Specify.prep_met thy "met_polyeq_d2_sqonly" [] Celem.e_metID
27.178 + [Specify.prep_met thy "met_polyeq_d2_sqonly" [] Spec.e_metID
27.179 (["PolyEq","solve_d2_polyeq_sqonly_equation"],
27.180 [("#Given" ,["equality e_e","solveFor v_v"]),
27.181 ("#Where" ,["(lhs e_e) is_poly_in v_v ", "((lhs e_e) has_degree_in v_v) = 2"]),
27.182 @@ -1059,7 +1059,7 @@
27.183 in
27.184 Check_elementwise L_L {(v_v::real). Assumptions})"
27.185 setup \<open>KEStore_Elems.add_mets
27.186 - [Specify.prep_met thy "met_polyeq_d2_pq" [] Celem.e_metID
27.187 + [Specify.prep_met thy "met_polyeq_d2_pq" [] Spec.e_metID
27.188 (["PolyEq","solve_d2_polyeq_pq_equation"],
27.189 [("#Given" ,["equality e_e","solveFor v_v"]),
27.190 ("#Where" ,["(lhs e_e) is_poly_in v_v ", "((lhs e_e) has_degree_in v_v) = 2"]),
27.191 @@ -1081,7 +1081,7 @@
27.192 L_L = Or_to_List e_e
27.193 in Check_elementwise L_L {(v_v::real). Assumptions})"
27.194 setup \<open>KEStore_Elems.add_mets
27.195 - [Specify.prep_met thy "met_polyeq_d2_abc" [] Celem.e_metID
27.196 + [Specify.prep_met thy "met_polyeq_d2_abc" [] Spec.e_metID
27.197 (["PolyEq","solve_d2_polyeq_abc_equation"],
27.198 [("#Given" ,["equality e_e","solveFor v_v"]),
27.199 ("#Where" ,["(lhs e_e) is_poly_in v_v ", "((lhs e_e) has_degree_in v_v) = 2"]),
27.200 @@ -1108,7 +1108,7 @@
27.201 in
27.202 Check_elementwise L_L {(v_v::real). Assumptions})"
27.203 setup \<open>KEStore_Elems.add_mets
27.204 - [Specify.prep_met thy "met_polyeq_d3" [] Celem.e_metID
27.205 + [Specify.prep_met thy "met_polyeq_d3" [] Spec.e_metID
27.206 (["PolyEq","solve_d3_polyeq_equation"],
27.207 [("#Given" ,["equality e_e","solveFor v_v"]),
27.208 ("#Where" ,["(lhs e_e) is_poly_in v_v ", "((lhs e_e) has_degree_in v_v) = 3"]),
27.209 @@ -1138,7 +1138,7 @@
27.210 in
27.211 Or_to_List e_e)"
27.212 setup \<open>KEStore_Elems.add_mets
27.213 - [Specify.prep_met thy "met_polyeq_complsq" [] Celem.e_metID
27.214 + [Specify.prep_met thy "met_polyeq_complsq" [] Spec.e_metID
27.215 (["PolyEq","complete_square"],
27.216 [("#Given" ,["equality e_e","solveFor v_v"]),
27.217 ("#Where" ,["matches (?a = 0) e_e", "((lhs e_e) has_degree_in v_v) = 2"]),
28.1 --- a/src/Tools/isac/Knowledge/PolyMinus.thy Tue Apr 21 12:26:08 2020 +0200
28.2 +++ b/src/Tools/isac/Knowledge/PolyMinus.thy Tue Apr 21 15:42:50 2020 +0200
28.3 @@ -392,9 +392,9 @@
28.4
28.5 (** problems **)
28.6 setup \<open>KEStore_Elems.add_pbts
28.7 - [(Specify.prep_pbt thy "pbl_vereinf_poly" [] Celem.e_pblID
28.8 + [(Specify.prep_pbt thy "pbl_vereinf_poly" [] Spec.e_pblID
28.9 (["polynom","vereinfachen"], [], Rule_Set.Empty, NONE, [])),
28.10 - (Specify.prep_pbt thy "pbl_vereinf_poly_minus" [] Celem.e_pblID
28.11 + (Specify.prep_pbt thy "pbl_vereinf_poly_minus" [] Spec.e_pblID
28.12 (["plus_minus","polynom","vereinfachen"],
28.13 [("#Given", ["Term t_t"]),
28.14 ("#Where", ["t_t is_polyexp",
28.15 @@ -419,7 +419,7 @@
28.16 Rule.Thm ("not_false",ThmC.numerals_to_Free @{thm not_false})
28.17 (*"(~ False) = True"*)],
28.18 SOME "Vereinfache t_t", [["simplification","for_polynomials","with_minus"]])),
28.19 - (Specify.prep_pbt thy "pbl_vereinf_poly_klammer" [] Celem.e_pblID
28.20 + (Specify.prep_pbt thy "pbl_vereinf_poly_klammer" [] Spec.e_pblID
28.21 (["klammer","polynom","vereinfachen"],
28.22 [("#Given" ,["Term t_t"]),
28.23 ("#Where" ,["t_t is_polyexp",
28.24 @@ -441,7 +441,7 @@
28.25 (*"(~ False) = True"*)],
28.26 SOME "Vereinfache t_t",
28.27 [["simplification","for_polynomials","with_parentheses"]])),
28.28 - (Specify.prep_pbt thy "pbl_vereinf_poly_klammer_mal" [] Celem.e_pblID
28.29 + (Specify.prep_pbt thy "pbl_vereinf_poly_klammer_mal" [] Spec.e_pblID
28.30 (["binom_klammer","polynom","vereinfachen"],
28.31 [("#Given", ["Term t_t"]),
28.32 ("#Where", ["t_t is_polyexp"]),
28.33 @@ -450,8 +450,8 @@
28.34 Rule.Eval ("Poly.is'_polyexp", eval_is_polyexp "")],
28.35 SOME "Vereinfache t_t",
28.36 [["simplification","for_polynomials","with_parentheses_mult"]])),
28.37 - (Specify.prep_pbt thy "pbl_probe" [] Celem.e_pblID (["probe"], [], Rule_Set.Empty, NONE, [])),
28.38 - (Specify.prep_pbt thy "pbl_probe_poly" [] Celem.e_pblID
28.39 + (Specify.prep_pbt thy "pbl_probe" [] Spec.e_pblID (["probe"], [], Rule_Set.Empty, NONE, [])),
28.40 + (Specify.prep_pbt thy "pbl_probe_poly" [] Spec.e_pblID
28.41 (["polynom","probe"],
28.42 [("#Given", ["Pruefe e_e", "mitWert w_w"]),
28.43 ("#Where", ["e_e is_polyexp"]),
28.44 @@ -460,7 +460,7 @@
28.45 Rule.Eval ("Poly.is'_polyexp", eval_is_polyexp "")],
28.46 SOME "Probe e_e w_w",
28.47 [["probe","fuer_polynom"]])),
28.48 - (Specify.prep_pbt thy "pbl_probe_bruch" [] Celem.e_pblID
28.49 + (Specify.prep_pbt thy "pbl_probe_bruch" [] Spec.e_pblID
28.50 (["bruch","probe"],
28.51 [("#Given" ,["Pruefe e_e", "mitWert w_w"]),
28.52 ("#Where" ,["e_e is_ratpolyexp"]),
28.53 @@ -480,7 +480,7 @@
28.54 (Try (Rewrite_Set ''verschoenere'')))
28.55 ) t_t)"
28.56 setup \<open>KEStore_Elems.add_mets
28.57 - [Specify.prep_met thy "met_simp_poly_minus" [] Celem.e_metID
28.58 + [Specify.prep_met thy "met_simp_poly_minus" [] Spec.e_metID
28.59 (["simplification","for_polynomials","with_minus"],
28.60 [("#Given" ,["Term t_t"]),
28.61 ("#Where" ,["t_t is_polyexp",
28.62 @@ -515,7 +515,7 @@
28.63 (Try (Rewrite_Set ''verschoenere'')))
28.64 ) t_t)"
28.65 setup \<open>KEStore_Elems.add_mets
28.66 - [Specify.prep_met thy "met_simp_poly_parenth" [] Celem.e_metID
28.67 + [Specify.prep_met thy "met_simp_poly_parenth" [] Spec.e_metID
28.68 (["simplification","for_polynomials","with_parentheses"],
28.69 [("#Given" ,["Term t_t"]),
28.70 ("#Where" ,["t_t is_polyexp"]),
28.71 @@ -540,7 +540,7 @@
28.72 (Try (Rewrite_Set ''verschoenere'')))
28.73 ) t_t)"
28.74 setup \<open>KEStore_Elems.add_mets
28.75 - [Specify.prep_met thy "met_simp_poly_parenth_mult" [] Celem.e_metID
28.76 + [Specify.prep_met thy "met_simp_poly_parenth_mult" [] Spec.e_metID
28.77 (["simplification","for_polynomials","with_parentheses_mult"],
28.78 [("#Given" ,["Term t_t"]), ("#Where" ,["t_t is_polyexp"]), ("#Find" ,["normalform n_n"])],
28.79 {rew_ord'="tless_true", rls' = Rule_Set.empty, calc = [], srls = Rule_Set.empty,
28.80 @@ -550,7 +550,7 @@
28.81 @{thm simplify3.simps})]
28.82 \<close>
28.83 setup \<open>KEStore_Elems.add_mets
28.84 - [Specify.prep_met thy "met_probe" [] Celem.e_metID
28.85 + [Specify.prep_met thy "met_probe" [] Spec.e_metID
28.86 (["probe"], [],
28.87 {rew_ord'="tless_true", rls' = Rule_Set.empty, calc = [], srls = Rule_Set.empty, prls = Rule_Set.Empty, crls = Rule_Set.empty,
28.88 errpats = [], nrls = Rule_Set.Empty},
28.89 @@ -570,7 +570,7 @@
28.90 (Try (Repeat (Calculate ''MINUS''))))
28.91 ) e_e)"
28.92 setup \<open>KEStore_Elems.add_mets
28.93 - [Specify.prep_met thy "met_probe_poly" [] Celem.e_metID
28.94 + [Specify.prep_met thy "met_probe_poly" [] Spec.e_metID
28.95 (["probe","fuer_polynom"],
28.96 [("#Given" ,["Pruefe e_e", "mitWert w_w"]),
28.97 ("#Where" ,["e_e is_polyexp"]),
28.98 @@ -582,7 +582,7 @@
28.99 @{thm mache_probe.simps})]
28.100 \<close>
28.101 setup \<open>KEStore_Elems.add_mets
28.102 - [Specify.prep_met thy "met_probe_bruch" [] Celem.e_metID
28.103 + [Specify.prep_met thy "met_probe_bruch" [] Spec.e_metID
28.104 (["probe","fuer_bruch"],
28.105 [("#Given" ,["Pruefe e_e", "mitWert w_w"]),
28.106 ("#Where" ,["e_e is_ratpolyexp"]),
29.1 --- a/src/Tools/isac/Knowledge/RatEq.thy Tue Apr 21 12:26:08 2020 +0200
29.2 +++ b/src/Tools/isac/Knowledge/RatEq.thy Tue Apr 21 15:42:50 2020 +0200
29.3 @@ -161,7 +161,7 @@
29.4
29.5 subsection \<open>problems\<close>
29.6 setup \<open>KEStore_Elems.add_pbts
29.7 - [(Specify.prep_pbt thy "pbl_equ_univ_rat" [] Celem.e_pblID
29.8 + [(Specify.prep_pbt thy "pbl_equ_univ_rat" [] Spec.e_pblID
29.9 (["rational","univariate","equation"],
29.10 [("#Given", ["equality e_e","solveFor v_v"]),
29.11 ("#Where", ["(e_e::bool) is_ratequation_in (v_v::real)"]),
29.12 @@ -170,7 +170,7 @@
29.13
29.14 subsection \<open>methods\<close>
29.15 setup \<open>KEStore_Elems.add_mets
29.16 - [Specify.prep_met thy "met_rateq" [] Celem.e_metID
29.17 + [Specify.prep_met thy "met_rateq" [] Spec.e_metID
29.18 (["RatEq"], [],
29.19 {rew_ord'="tless_true",rls'=Atools_erls,calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty,
29.20 crls=RatEq_crls, errpats = [], nrls = norm_Rational}, @{thm refl})]\<close>
29.21 @@ -188,7 +188,7 @@
29.22 in
29.23 Check_elementwise L_L {(v_v::real). Assumptions})"
29.24 setup \<open>KEStore_Elems.add_mets
29.25 - [Specify.prep_met thy "met_rat_eq" [] Celem.e_metID
29.26 + [Specify.prep_met thy "met_rat_eq" [] Spec.e_metID
29.27 (["RatEq", "solve_rat_equation"],
29.28 [("#Given" ,["equality e_e","solveFor v_v"]),
29.29 ("#Where" ,["(e_e::bool) is_ratequation_in (v_v::real)"]),
30.1 --- a/src/Tools/isac/Knowledge/Rational.thy Tue Apr 21 12:26:08 2020 +0200
30.2 +++ b/src/Tools/isac/Knowledge/Rational.thy Tue Apr 21 15:42:50 2020 +0200
30.3 @@ -877,7 +877,7 @@
30.4
30.5 section \<open>A problem for simplification of rationals\<close>
30.6 setup \<open>KEStore_Elems.add_pbts
30.7 - [(Specify.prep_pbt thy "pbl_simp_rat" [] Celem.e_pblID
30.8 + [(Specify.prep_pbt thy "pbl_simp_rat" [] Spec.e_pblID
30.9 (["rational","simplification"],
30.10 [("#Given" ,["Term t_t"]),
30.11 ("#Where" ,["t_t is_ratpolyexp"]),
30.12 @@ -905,7 +905,7 @@
30.13 Try (Rewrite_Set ''discard_parentheses1''))
30.14 term)"
30.15 setup \<open>KEStore_Elems.add_mets
30.16 - [Specify.prep_met thy "met_simp_rat" [] Celem.e_metID
30.17 + [Specify.prep_met thy "met_simp_rat" [] Spec.e_metID
30.18 (["simplification","of_rationals"],
30.19 [("#Given" ,["Term t_t"]),
30.20 ("#Where" ,["t_t is_ratpolyexp"]),
31.1 --- a/src/Tools/isac/Knowledge/RootEq.thy Tue Apr 21 12:26:08 2020 +0200
31.2 +++ b/src/Tools/isac/Knowledge/RootEq.thy Tue Apr 21 15:42:50 2020 +0200
31.3 @@ -444,7 +444,7 @@
31.4 subsection \<open>problems\<close>
31.5 setup \<open>KEStore_Elems.add_pbts
31.6 (* ---------root----------- *)
31.7 - [(Specify.prep_pbt thy "pbl_equ_univ_root" [] Celem.e_pblID
31.8 + [(Specify.prep_pbt thy "pbl_equ_univ_root" [] Spec.e_pblID
31.9 (["rootX","univariate","equation"],
31.10 [("#Given" ,["equality e_e","solveFor v_v"]),
31.11 ("#Where" ,["(lhs e_e) is_rootTerm_in (v_v::real) | " ^
31.12 @@ -452,7 +452,7 @@
31.13 ("#Find" ,["solutions v_v'i'"])],
31.14 RootEq_prls, SOME "solve (e_e::bool, v_v)", [])),
31.15 (* ---------sqrt----------- *)
31.16 - (Specify.prep_pbt thy "pbl_equ_univ_root_sq" [] Celem.e_pblID
31.17 + (Specify.prep_pbt thy "pbl_equ_univ_root_sq" [] Spec.e_pblID
31.18 (["sq","rootX","univariate","equation"],
31.19 [("#Given" ,["equality e_e","solveFor v_v"]),
31.20 ("#Where" ,["( ((lhs e_e) is_sqrtTerm_in (v_v::real)) &" ^
31.21 @@ -462,7 +462,7 @@
31.22 ("#Find" ,["solutions v_v'i'"])],
31.23 RootEq_prls, SOME "solve (e_e::bool, v_v)", [["RootEq", "solve_sq_root_equation"]])),
31.24 (* ---------normalise----------- *)
31.25 - (Specify.prep_pbt thy "pbl_equ_univ_root_norm" [] Celem.e_pblID
31.26 + (Specify.prep_pbt thy "pbl_equ_univ_root_norm" [] Spec.e_pblID
31.27 (["normalise","rootX","univariate","equation"],
31.28 [("#Given" ,["equality e_e","solveFor v_v"]),
31.29 ("#Where" ,["( ((lhs e_e) is_sqrtTerm_in (v_v::real)) &" ^
31.30 @@ -474,7 +474,7 @@
31.31
31.32 subsection \<open>methods\<close>
31.33 setup \<open>KEStore_Elems.add_mets
31.34 - [Specify.prep_met thy "met_rooteq" [] Celem.e_metID
31.35 + [Specify.prep_met thy "met_rooteq" [] Spec.e_metID
31.36 (["RootEq"], [],
31.37 {rew_ord'="tless_true",rls'=Atools_erls,calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty,
31.38 crls=RootEq_crls, errpats = [], nrls = norm_Poly}, @{thm refl})]
31.39 @@ -495,7 +495,7 @@
31.40 SubProblem (''RootEq'', [''univariate'', ''equation''], [''no_met''])
31.41 [BOOL e_e, REAL v_v])"
31.42 setup \<open>KEStore_Elems.add_mets
31.43 - [Specify.prep_met thy "met_rooteq_norm" [] Celem.e_metID
31.44 + [Specify.prep_met thy "met_rooteq_norm" [] Spec.e_metID
31.45 (["RootEq","norm_sq_root_equation"],
31.46 [("#Given" ,["equality e_e","solveFor v_v"]),
31.47 ("#Where" ,["( ((lhs e_e) is_sqrtTerm_in (v_v::real)) &" ^
31.48 @@ -528,7 +528,7 @@
31.49 [BOOL e_e, REAL v_v])
31.50 in Check_elementwise L_L {(v_v::real). Assumptions})"
31.51 setup \<open>KEStore_Elems.add_mets
31.52 - [Specify.prep_met thy "met_rooteq_sq" [] Celem.e_metID
31.53 + [Specify.prep_met thy "met_rooteq_sq" [] Spec.e_metID
31.54 (["RootEq", "solve_sq_root_equation"],
31.55 [("#Given" ,["equality e_e", "solveFor v_v"]),
31.56 ("#Where" ,["(((lhs e_e) is_sqrtTerm_in (v_v::real)) & " ^
31.57 @@ -560,7 +560,7 @@
31.58 SubProblem (''RootEq'',[''univariate'', ''equation''], [''no_met''])
31.59 [BOOL e_e, REAL v_v])"
31.60 setup \<open>KEStore_Elems.add_mets
31.61 - [Specify.prep_met thy "met_rooteq_sq_right" [] Celem.e_metID
31.62 + [Specify.prep_met thy "met_rooteq_sq_right" [] Spec.e_metID
31.63 (["RootEq","solve_right_sq_root_equation"],
31.64 [("#Given" ,["equality e_e","solveFor v_v"]),
31.65 ("#Where" ,["(rhs e_e) is_sqrtTerm_in v_v"]),
31.66 @@ -589,7 +589,7 @@
31.67 SubProblem (''RootEq'',[''univariate'',''equation''], [''no_met''])
31.68 [BOOL e_e, REAL v_v])"
31.69 setup \<open>KEStore_Elems.add_mets
31.70 - [Specify.prep_met thy "met_rooteq_sq_left" [] Celem.e_metID
31.71 + [Specify.prep_met thy "met_rooteq_sq_left" [] Spec.e_metID
31.72 (["RootEq","solve_left_sq_root_equation"],
31.73 [("#Given" ,["equality e_e","solveFor v_v"]),
31.74 ("#Where" ,["(lhs e_e) is_sqrtTerm_in v_v"]),
32.1 --- a/src/Tools/isac/Knowledge/RootRatEq.thy Tue Apr 21 12:26:08 2020 +0200
32.2 +++ b/src/Tools/isac/Knowledge/RootRatEq.thy Tue Apr 21 15:42:50 2020 +0200
32.3 @@ -129,7 +129,7 @@
32.4 *)
32.5 \<close>
32.6 setup \<open>KEStore_Elems.add_pbts
32.7 - [(Specify.prep_pbt thy "pbl_equ_univ_root_sq_rat" [] Celem.e_pblID
32.8 + [(Specify.prep_pbt thy "pbl_equ_univ_root_sq_rat" [] Spec.e_pblID
32.9 (["rat","sq","rootX","univariate","equation"],
32.10 [("#Given" ,["equality e_e","solveFor v_v"]),
32.11 ("#Where" ,["( (lhs e_e) is_rootRatAddTerm_in (v_v::real) )| " ^
32.12 @@ -139,7 +139,7 @@
32.13
32.14 subsection \<open>methods\<close>
32.15 setup \<open>KEStore_Elems.add_mets
32.16 - [Specify.prep_met @{theory LinEq} "met_rootrateq" [] Celem.e_metID
32.17 + [Specify.prep_met @{theory LinEq} "met_rootrateq" [] Spec.e_metID
32.18 (["RootRatEq"], [],
32.19 {rew_ord'="tless_true",rls'=Atools_erls,calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty,
32.20 crls=Atools_erls, errpats = [], nrls = norm_Rational}, @{thm refl})]
32.21 @@ -157,7 +157,7 @@
32.22 (Try (Rewrite_Set_Inst [(''bdv'', v_v)] ''rootrat_solve'')) ) e_e
32.23 in SubProblem (''RootEq'', [''univariate'', ''equation''], [''no_met'']) [BOOL e_e, REAL v_v])"
32.24 setup \<open>KEStore_Elems.add_mets
32.25 - [Specify.prep_met thy "met_rootrateq_elim" [] Celem.e_metID
32.26 + [Specify.prep_met thy "met_rootrateq_elim" [] Spec.e_metID
32.27 (["RootRatEq","elim_rootrat_equation"],
32.28 [("#Given" ,["equality e_e","solveFor v_v"]),
32.29 ("#Where" ,["( (lhs e_e) is_rootRatAddTerm_in (v_v::real) ) | " ^
33.1 --- a/src/Tools/isac/Knowledge/Simplify.thy Tue Apr 21 12:26:08 2020 +0200
33.2 +++ b/src/Tools/isac/Knowledge/Simplify.thy Tue Apr 21 15:42:50 2020 +0200
33.3 @@ -25,12 +25,12 @@
33.4 \<close>
33.5 (** problems **)
33.6 setup \<open>KEStore_Elems.add_pbts
33.7 - [(Specify.prep_pbt thy "pbl_simp" [] Celem.e_pblID
33.8 + [(Specify.prep_pbt thy "pbl_simp" [] Spec.e_pblID
33.9 (["simplification"],
33.10 [("#Given" ,["Term t_t"]),
33.11 ("#Find" ,["normalform n_n"])],
33.12 Rule_Set.append_rules "empty" Rule_Set.empty [(*for preds in where_*)], SOME "Simplify t_t", [])),
33.13 - (Specify.prep_pbt thy "pbl_vereinfache" [] Celem.e_pblID
33.14 + (Specify.prep_pbt thy "pbl_vereinfache" [] Spec.e_pblID
33.15 (["vereinfachen"],
33.16 [("#Given", ["Term t_t"]),
33.17 ("#Find", ["normalform n_n"])],
33.18 @@ -38,7 +38,7 @@
33.19
33.20 (** methods **)
33.21 setup \<open>KEStore_Elems.add_mets
33.22 - [Specify.prep_met thy "met_tsimp" [] Celem.e_metID
33.23 + [Specify.prep_met thy "met_tsimp" [] Spec.e_metID
33.24 (["simplification"],
33.25 [("#Given" ,["Term t_t"]),
33.26 ("#Find" ,["normalform n_n"])],
34.1 --- a/src/Tools/isac/Knowledge/Test.thy Tue Apr 21 12:26:08 2020 +0200
34.2 +++ b/src/Tools/isac/Knowledge/Test.thy Tue Apr 21 15:42:50 2020 +0200
34.3 @@ -570,20 +570,20 @@
34.4 subsection \<open>problems\<close>
34.5 (** problem types **)
34.6 setup \<open>KEStore_Elems.add_pbts
34.7 - [(Specify.prep_pbt thy "pbl_test" [] Celem.e_pblID (["test"], [], Rule_Set.empty, NONE, [])),
34.8 - (Specify.prep_pbt thy "pbl_test_equ" [] Celem.e_pblID
34.9 + [(Specify.prep_pbt thy "pbl_test" [] Spec.e_pblID (["test"], [], Rule_Set.empty, NONE, [])),
34.10 + (Specify.prep_pbt thy "pbl_test_equ" [] Spec.e_pblID
34.11 (["equation","test"],
34.12 [("#Given" ,["equality e_e","solveFor v_v"]),
34.13 ("#Where" ,["matches (?a = ?b) e_e"]),
34.14 ("#Find" ,["solutions v_v'i'"])],
34.15 assoc_rls' @{theory} "matches", SOME "solve (e_e::bool, v_v)", [])),
34.16 - (Specify.prep_pbt thy "pbl_test_uni" [] Celem.e_pblID
34.17 + (Specify.prep_pbt thy "pbl_test_uni" [] Spec.e_pblID
34.18 (["univariate","equation","test"],
34.19 [("#Given" ,["equality e_e","solveFor v_v"]),
34.20 ("#Where" ,["matches (?a = ?b) e_e"]),
34.21 ("#Find" ,["solutions v_v'i'"])],
34.22 assoc_rls' @{theory} "matches", SOME "solve (e_e::bool, v_v)", [])),
34.23 - (Specify.prep_pbt thy "pbl_test_uni_lin" [] Celem.e_pblID
34.24 + (Specify.prep_pbt thy "pbl_test_uni_lin" [] Spec.e_pblID
34.25 (["LINEAR","univariate","equation","test"],
34.26 [("#Given" ,["equality e_e","solveFor v_v"]),
34.27 ("#Where" ,["(matches ( v_v = 0) e_e) | (matches ( ?b*v_v = 0) e_e) |" ^
34.28 @@ -772,7 +772,7 @@
34.29
34.30 section \<open>problems\<close>
34.31 setup \<open>KEStore_Elems.add_pbts
34.32 - [(Specify.prep_pbt thy "pbl_test_uni_plain2" [] Celem.e_pblID
34.33 + [(Specify.prep_pbt thy "pbl_test_uni_plain2" [] Spec.e_pblID
34.34 (["plain_square","univariate","equation","test"],
34.35 [("#Given" ,["equality e_e","solveFor v_v"]),
34.36 ("#Where" ,["(matches (?a + ?b*v_v ^^^2 = 0) e_e) |" ^
34.37 @@ -782,28 +782,28 @@
34.38 ("#Find" ,["solutions v_v'i'"])],
34.39 assoc_rls' @{theory} "matches",
34.40 SOME "solve (e_e::bool, v_v)", [["Test","solve_plain_square"]])),
34.41 - (Specify.prep_pbt thy "pbl_test_uni_poly" [] Celem.e_pblID
34.42 + (Specify.prep_pbt thy "pbl_test_uni_poly" [] Spec.e_pblID
34.43 (["polynomial","univariate","equation","test"],
34.44 [("#Given" ,["equality (v_v ^^^2 + p_p * v_v + q__q = 0)","solveFor v_v"]),
34.45 ("#Where" ,["HOL.False"]),
34.46 ("#Find" ,["solutions v_v'i'"])],
34.47 Rule_Set.empty, SOME "solve (e_e::bool, v_v)", [])),
34.48 - (Specify.prep_pbt thy "pbl_test_uni_poly_deg2" [] Celem.e_pblID
34.49 + (Specify.prep_pbt thy "pbl_test_uni_poly_deg2" [] Spec.e_pblID
34.50 (["degree_two","polynomial","univariate","equation","test"],
34.51 [("#Given" ,["equality (v_v ^^^2 + p_p * v_v + q__q = 0)","solveFor v_v"]),
34.52 ("#Find" ,["solutions v_v'i'"])],
34.53 Rule_Set.empty, SOME "solve (v_v ^^^2 + p_p * v_v + q__q = 0, v_v)", [])),
34.54 - (Specify.prep_pbt thy "pbl_test_uni_poly_deg2_pq" [] Celem.e_pblID
34.55 + (Specify.prep_pbt thy "pbl_test_uni_poly_deg2_pq" [] Spec.e_pblID
34.56 (["pq_formula","degree_two","polynomial","univariate","equation","test"],
34.57 [("#Given" ,["equality (v_v ^^^2 + p_p * v_v + q__q = 0)","solveFor v_v"]),
34.58 ("#Find" ,["solutions v_v'i'"])],
34.59 Rule_Set.empty, SOME "solve (v_v ^^^2 + p_p * v_v + q__q = 0, v_v)", [])),
34.60 - (Specify.prep_pbt thy "pbl_test_uni_poly_deg2_abc" [] Celem.e_pblID
34.61 + (Specify.prep_pbt thy "pbl_test_uni_poly_deg2_abc" [] Spec.e_pblID
34.62 (["abc_formula","degree_two","polynomial","univariate","equation","test"],
34.63 [("#Given" ,["equality (a_a * x ^^^2 + b_b * x + c_c = 0)","solveFor v_v"]),
34.64 ("#Find" ,["solutions v_v'i'"])],
34.65 Rule_Set.empty, SOME "solve (a_a * x ^^^2 + b_b * x + c_c = 0, v_v)", [])),
34.66 - (Specify.prep_pbt thy "pbl_test_uni_root" [] Celem.e_pblID
34.67 + (Specify.prep_pbt thy "pbl_test_uni_root" [] Spec.e_pblID
34.68 (["squareroot","univariate","equation","test"],
34.69 [("#Given" ,["equality e_e","solveFor v_v"]),
34.70 ("#Where" ,["precond_rootpbl v_v"]),
34.71 @@ -811,19 +811,19 @@
34.72 Rule_Set.append_rules "contains_root" Rule_Set.empty [Rule.Eval ("Test.contains'_root",
34.73 eval_contains_root "#contains_root_")],
34.74 SOME "solve (e_e::bool, v_v)", [["Test","square_equation"]])),
34.75 - (Specify.prep_pbt thy "pbl_test_uni_norm" [] Celem.e_pblID
34.76 + (Specify.prep_pbt thy "pbl_test_uni_norm" [] Spec.e_pblID
34.77 (["normalise","univariate","equation","test"],
34.78 [("#Given" ,["equality e_e","solveFor v_v"]),
34.79 ("#Where" ,[]),
34.80 ("#Find" ,["solutions v_v'i'"])],
34.81 Rule_Set.empty, SOME "solve (e_e::bool, v_v)", [["Test","norm_univar_equation"]])),
34.82 - (Specify.prep_pbt thy "pbl_test_uni_roottest" [] Celem.e_pblID
34.83 + (Specify.prep_pbt thy "pbl_test_uni_roottest" [] Spec.e_pblID
34.84 (["sqroot-test","univariate","equation","test"],
34.85 [("#Given" ,["equality e_e","solveFor v_v"]),
34.86 ("#Where" ,["precond_rootpbl v_v"]),
34.87 ("#Find" ,["solutions v_v'i'"])],
34.88 Rule_Set.empty, SOME "solve (e_e::bool, v_v)", [])),
34.89 - (Specify.prep_pbt thy "pbl_test_intsimp" [] Celem.e_pblID
34.90 + (Specify.prep_pbt thy "pbl_test_intsimp" [] Spec.e_pblID
34.91 (["inttype","test"],
34.92 [("#Given" ,["intTestGiven t_t"]),
34.93 ("#Where" ,[]),
34.94 @@ -833,7 +833,7 @@
34.95 section \<open>methods\<close>
34.96 subsection \<open>differentiate\<close>
34.97 setup \<open>KEStore_Elems.add_mets
34.98 - [Specify.prep_met @{theory "Diff"} "met_test" [] Celem.e_metID
34.99 + [Specify.prep_met @{theory "Diff"} "met_test" [] Spec.e_metID
34.100 (["Test"], [],
34.101 {rew_ord'="tless_true",rls'=Atools_erls,calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty,
34.102 crls=Atools_erls, errpats = [], nrls = Rule_Set.empty}, @{thm refl})]
34.103 @@ -849,7 +849,7 @@
34.104 in
34.105 [e_e])"
34.106 setup \<open>KEStore_Elems.add_mets
34.107 - [Specify.prep_met thy "met_test_solvelin" [] Celem.e_metID
34.108 + [Specify.prep_met thy "met_test_solvelin" [] Spec.e_metID
34.109 (["Test","solve_linear"],
34.110 [("#Given" ,["equality e_e","solveFor v_v"]),
34.111 ("#Where" ,["matches (?a = ?b) e_e"]),
34.112 @@ -880,7 +880,7 @@
34.113 in
34.114 [e_e])"
34.115 setup \<open>KEStore_Elems.add_mets
34.116 - [Specify.prep_met thy "met_test_sqrt" [] Celem.e_metID
34.117 + [Specify.prep_met thy "met_test_sqrt" [] Spec.e_metID
34.118 (*root-equation, version for tests before 8.01.01*)
34.119 (["Test","sqrt-equ-test"],
34.120 [("#Given" ,["equality e_e","solveFor v_v"]),
34.121 @@ -908,7 +908,7 @@
34.122 in
34.123 Check_elementwise L_L {(v_v::real). Assumptions})"
34.124 setup \<open>KEStore_Elems.add_mets
34.125 - [Specify.prep_met thy "met_test_squ_sub" [] Celem.e_metID
34.126 + [Specify.prep_met thy "met_test_squ_sub" [] Spec.e_metID
34.127 (*tests subproblem fixed linear*)
34.128 (["Test","squ-equ-test-subpbl1"],
34.129 [("#Given" ,["equality e_e","solveFor v_v"]),
34.130 @@ -940,7 +940,7 @@
34.131 in
34.132 Check_elementwise L_L {(v_v::real). Assumptions}) "
34.133 setup \<open>KEStore_Elems.add_mets
34.134 - [Specify.prep_met thy "met_test_eq1" [] Celem.e_metID
34.135 + [Specify.prep_met thy "met_test_eq1" [] Spec.e_metID
34.136 (*root-equation1:*)
34.137 (["Test","square_equation1"],
34.138 [("#Given" ,["equality e_e","solveFor v_v"]),
34.139 @@ -973,7 +973,7 @@
34.140 in
34.141 Check_elementwise L_L {(v_v::real). Assumptions})"
34.142 setup \<open>KEStore_Elems.add_mets
34.143 - [Specify.prep_met thy "met_test_squ2" [] Celem.e_metID
34.144 + [Specify.prep_met thy "met_test_squ2" [] Spec.e_metID
34.145 (*root-equation2*)
34.146 (["Test","square_equation2"],
34.147 [("#Given" ,["equality e_e","solveFor v_v"]),
34.148 @@ -1006,7 +1006,7 @@
34.149 in
34.150 Check_elementwise L_L {(v_v::real). Assumptions})"
34.151 setup \<open>KEStore_Elems.add_mets
34.152 - [Specify.prep_met thy "met_test_squeq" [] Celem.e_metID
34.153 + [Specify.prep_met thy "met_test_squeq" [] Spec.e_metID
34.154 (*root-equation*)
34.155 (["Test","square_equation"],
34.156 [("#Given" ,["equality e_e","solveFor v_v"]),
34.157 @@ -1032,7 +1032,7 @@
34.158 in
34.159 Or_to_List e_e)"
34.160 setup \<open>KEStore_Elems.add_mets
34.161 - [Specify.prep_met thy "met_test_eq_plain" [] Celem.e_metID
34.162 + [Specify.prep_met thy "met_test_eq_plain" [] Spec.e_metID
34.163 (*solve_plain_square*)
34.164 (["Test","solve_plain_square"],
34.165 [("#Given",["equality e_e","solveFor v_v"]),
34.166 @@ -1059,7 +1059,7 @@
34.167 SubProblem (''Test'', [''univariate'', ''equation'', ''test''],
34.168 [''no_met'']) [BOOL e_e, REAL v_v])"
34.169 setup \<open>KEStore_Elems.add_mets
34.170 - [Specify.prep_met thy "met_test_norm_univ" [] Celem.e_metID
34.171 + [Specify.prep_met thy "met_test_norm_univ" [] Spec.e_metID
34.172 (["Test","norm_univar_equation"],
34.173 [("#Given",["equality e_e","solveFor v_v"]),
34.174 ("#Where" ,[]),
34.175 @@ -1077,7 +1077,7 @@
34.176 (Try (Calculate ''PLUS'')) #>
34.177 (Try (Calculate ''TIMES''))) t_t)"
34.178 setup \<open>KEStore_Elems.add_mets
34.179 - [Specify.prep_met thy "met_test_intsimp" [] Celem.e_metID
34.180 + [Specify.prep_met thy "met_test_intsimp" [] Spec.e_metID
34.181 (["Test","intsimp"],
34.182 [("#Given" ,["intTestGiven t_t"]),
34.183 ("#Where" ,[]),
35.1 --- a/src/Tools/isac/MathEngBasic/ctree-access.sml Tue Apr 21 12:26:08 2020 +0200
35.2 +++ b/src/Tools/isac/MathEngBasic/ctree-access.sml Tue Apr 21 15:42:50 2020 +0200
35.3 @@ -10,22 +10,22 @@
35.4 val update_domID : CTbasic.ctree -> Pos.pos -> ThyC.id -> CTbasic.ctree
35.5 val update_met : CTbasic.ctree -> Pos.pos -> Model.itm list -> CTbasic.ctree (* =vvv= ? *)
35.6 val update_metppc : CTbasic.ctree -> Pos.pos -> Model.itm list -> CTbasic.ctree (* =^^^= ? *)
35.7 - val update_metID : CTbasic.ctree -> Pos.pos -> Celem.metID -> CTbasic.ctree
35.8 + val update_metID : CTbasic.ctree -> Pos.pos -> Spec.metID -> CTbasic.ctree
35.9 val update_pbl : CTbasic.ctree -> Pos.pos -> Model.itm list -> CTbasic.ctree (* =vvv= ? *)
35.10 val update_pblppc : CTbasic.ctree -> Pos.pos -> Model.itm list -> CTbasic.ctree (* =^^^= ? *)
35.11 - val update_pblID : CTbasic.ctree -> Pos.pos -> Celem.pblID -> CTbasic.ctree
35.12 + val update_pblID : CTbasic.ctree -> Pos.pos -> Spec.pblID -> CTbasic.ctree
35.13 val update_oris : CTbasic.ctree -> Pos.pos -> Model.ori list -> CTbasic.ctree
35.14 - val update_orispec : CTbasic.ctree -> Pos.pos -> Celem.spec -> CTbasic.ctree
35.15 - val update_spec : CTbasic.ctree -> Pos.pos -> Celem.spec -> CTbasic.ctree
35.16 + val update_orispec : CTbasic.ctree -> Pos.pos -> Spec.spec -> CTbasic.ctree
35.17 + val update_spec : CTbasic.ctree -> Pos.pos -> Spec.spec -> CTbasic.ctree
35.18 val update_tac : CTbasic.ctree -> Pos.pos -> Tactic.input -> CTbasic.ctree
35.19
35.20 (* original write access *)
35.21 val cappend_form : CTbasic.ctree -> Pos.pos -> Istate_Def.T * Proof.context -> term ->
35.22 CTbasic.ctree * Pos.pos' list
35.23 val cappend_problem : CTbasic.ctree -> Pos.pos -> Istate_Def.T * Proof.context ->
35.24 - Selem.fmz -> Model.ori list * Celem.spec * term * Proof.context
35.25 + Selem.fmz -> Model.ori list * Spec.spec * term * Proof.context
35.26 -> CTbasic.ctree * Pos.pos' list
35.27 - val cupdate_problem: CTbasic.ctree -> Pos.pos -> Celem.spec * Model.itm list * Model.itm list * Proof.context
35.28 + val cupdate_problem: CTbasic.ctree -> Pos.pos -> Spec.spec * Model.itm list * Model.itm list * Proof.context
35.29 -> CTbasic.ctree * Pos.pos' list
35.30 val append_atomic : (* for solve.sml *)
35.31 Pos.pos -> ((Istate_Def.T * Proof.context) option * (Istate_Def.T * Proof.context)) ->
35.32 @@ -42,8 +42,8 @@
35.33 (*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
35.34 val append_form: Pos.pos -> Istate_Def.T * Proof.context -> term -> CTbasic.ctree -> CTbasic.ctree
35.35 val append_problem : Pos.pos -> Istate_Def.T * Proof.context -> Selem.fmz ->
35.36 - Model.ori list * Celem.spec * term * Proof.context -> CTbasic.ctree -> CTbasic.ctree
35.37 - val update_problem: Pos.pos -> Celem.spec * Model.itm list * Model.itm list * Proof.context
35.38 + Model.ori list * Spec.spec * term * Proof.context -> CTbasic.ctree -> CTbasic.ctree
35.39 + val update_problem: Pos.pos -> Spec.spec * Model.itm list * Model.itm list * Proof.context
35.40 -> CTbasic.ctree -> CTbasic.ctree
35.41 ( *\--- ! aktivate for Test_Isac END ----------------------------------------------------------/*)
35.42 end
35.43 @@ -208,11 +208,11 @@
35.44
35.45 (* insert a new SubProblem' and create a new PblObj in the Ctree *)
35.46 fun append_problem [] l fmz (strs, spec, hdf, ctxt_specify) _ =
35.47 - (Nd (PblObj {origin = (strs, spec, hdf), fmz = fmz, spec = Celem.empty_spec,
35.48 + (Nd (PblObj {origin = (strs, spec, hdf), fmz = fmz, spec = Spec.empty_spec,
35.49 probl = [], meth = [], ctxt = ctxt_specify, loc = (SOME l, NONE),
35.50 branch = TransitiveB, result = (TermC.empty, []), ostate = Incomplete}, []))
35.51 | append_problem p l fmz (strs, spec, hdf, ctxt_specify) pt =
35.52 - insert_pt (PblObj {origin = (strs, spec, hdf), fmz = fmz, spec = Celem.empty_spec,
35.53 + insert_pt (PblObj {origin = (strs, spec, hdf), fmz = fmz, spec = Spec.empty_spec,
35.54 probl = [], meth = [], ctxt = ctxt_specify, loc = (SOME l, NONE),
35.55 branch = TransitiveB, result = (TermC.empty, []), ostate= Incomplete}) pt p;
35.56 fun cappend_problem _ [] loc fmz ori = (append_problem [] loc fmz ori EmptyPtree, [])
36.1 --- a/src/Tools/isac/MathEngBasic/ctree-basic.sml Tue Apr 21 12:26:08 2020 +0200
36.2 +++ b/src/Tools/isac/MathEngBasic/ctree-basic.sml Tue Apr 21 15:42:50 2020 +0200
36.3 @@ -24,10 +24,10 @@
36.4 result: Selem.result,
36.5
36.6 fmz: Selem.fmz,
36.7 - origin: Model.ori list * Celem.spec * term,
36.8 + origin: Model.ori list * Spec.spec * term,
36.9 probl: Model.itm list,
36.10 meth: Model.itm list,
36.11 - spec: Celem.spec,
36.12 + spec: Spec.spec,
36.13 ctxt: Proof.context}
36.14 | PrfObj of
36.15 {branch: branch,
36.16 @@ -49,23 +49,23 @@
36.17 val get_nd : ctree -> Pos.pos -> ctree (* for solve.sml *)
36.18 val just_created_ : ppobj -> bool (* for mathengine.sml *)
36.19 val just_created : state -> bool (* for mathengine.sml *)
36.20 - val e_origin : Model.ori list * Celem.spec * term (* for mathengine.sml *)
36.21 + val e_origin : Model.ori list * Spec.spec * term (* for mathengine.sml *)
36.22
36.23 val is_pblobj : ppobj -> bool
36.24 val is_pblobj' : ctree -> Pos.pos -> bool
36.25 val is_pblnd : ctree -> bool
36.26
36.27 - val g_spec : ppobj -> Celem.spec
36.28 + val g_spec : ppobj -> Spec.spec
36.29 val g_loc : ppobj -> (Istate_Def.T * Proof.context) option * (Istate_Def.T * Proof.context) option
36.30 val g_form : ppobj -> term
36.31 val g_pbl : ppobj -> Model.itm list
36.32 val g_met : ppobj -> Model.itm list
36.33 - val g_metID : ppobj -> Celem.metID
36.34 + val g_metID : ppobj -> Spec.metID
36.35 val g_result : ppobj -> Selem.result
36.36 val g_tac : ppobj -> Tactic.input
36.37 val g_domID : ppobj -> ThyC.id (* for appl.sml TODO: replace by thyID *)
36.38
36.39 - val g_origin : ppobj -> Model.ori list * Celem.spec * term (* for script.sml *)
36.40 + val g_origin : ppobj -> Model.ori list * Spec.spec * term (* for script.sml *)
36.41 val get_loc : ctree -> Pos.pos' -> Istate_Def.T * Proof.context (* for script.sml *)
36.42 val get_istate_LI : ctree -> Pos.pos' -> Istate_Def.T (* for script.sml *)
36.43 val get_ctxt_LI: ctree -> Pos.pos' -> Proof.context
36.44 @@ -77,9 +77,9 @@
36.45 val new_val : term -> Istate_Def.T -> Istate_Def.T
36.46 (* for calchead.sml *)
36.47 type cid = cellID list
36.48 - type ocalhd = bool * Pos.pos_ * term * Model.itm list * (bool * term) list * Celem.spec
36.49 + type ocalhd = bool * Pos.pos_ * term * Model.itm list * (bool * term) list * Spec.spec
36.50 datatype ptform = Form of term | ModSpec of ocalhd
36.51 - val get_somespec' : Celem.spec -> Celem.spec -> Celem.spec
36.52 + val get_somespec' : Spec.spec -> Spec.spec -> Spec.spec
36.53 exception PTREE of string;
36.54
36.55 val parent_node : ctree -> Pos.pos -> bool * Pos.pos * Rule_Set.T (* for appl.sml *)
36.56 @@ -206,9 +206,9 @@
36.57 | PblObj of (* a step serving a whole specification-phase *)
36.58 {fmz : Selem.fmz, (* from init:FIXME never use this spec;-drop *)
36.59 origin: (Model.ori list) *(* from fmz+pbt+met for efficiently adding items to probl, meth *)
36.60 - Celem.spec * (* updated by Refine_Tacitly *)
36.61 + Spec.spec * (* updated by Refine_Tacitly *)
36.62 term, (* headline of calc-head, as calculated initially(!) *)
36.63 - spec : Celem.spec, (* explicitly input *)
36.64 + spec : Spec.spec, (* explicitly input *)
36.65 probl : Model.itm list, (* itms explicitly input *)
36.66 meth : Model.itm list, (* itms automatically added to copy of probl *)
36.67 ctxt : Proof.context, (* used while specifying this SubProblem *)
36.68 @@ -343,9 +343,9 @@
36.69 (* in CalcTree/Subproblem an 'just_created_' model is created;
36.70 this is filled to 'untouched' by Model/Refine_Problem *)
36.71 fun just_created_ (PblObj {meth, probl, spec, ...}) =
36.72 - null meth andalso null probl andalso spec = Celem.e_spec
36.73 + null meth andalso null probl andalso spec = Spec.empty_spec
36.74 | just_created_ _ = raise PTREE "g_ostate': uncovered fun def.";
36.75 -val e_origin = ([], Celem.e_spec, TermC.empty);
36.76 +val e_origin = ([], Spec.empty_spec, TermC.empty);
36.77
36.78 fun just_created (pt, (p, _)) =
36.79 let val ppobj = get_obj I pt p
36.80 @@ -440,8 +440,8 @@
36.81 term * (* header: Problem ... or Cas FIXME.0312: item for marking syntaxerrors*)
36.82 Model.itm list * (* model: given, find, relate *)
36.83 ((bool * term) list) *(* model: preconds *)
36.84 - Celem.spec; (* specification *)
36.85 -val e_ocalhd = (false, Und, TermC.empty, [Model.e_itm], [(false, TermC.empty)], Celem.e_spec);
36.86 + Spec.spec; (* specification *)
36.87 +val e_ocalhd = (false, Und, TermC.empty, [Model.e_itm], [(false, TermC.empty)], Spec.empty_spec);
36.88
36.89 datatype ptform = Form of term | ModSpec of ocalhd;
36.90
36.91 @@ -485,8 +485,8 @@
36.92 fun get_somespec' (dI, pI, mI) (dI', pI', mI') =
36.93 let
36.94 val domID = if dI = ThyC.id_empty then dI' else dI
36.95 - val pblID = if pI = Celem.e_pblID then pI' else pI
36.96 - val metID = if mI = Celem.e_metID then mI' else mI
36.97 + val pblID = if pI = Spec.e_pblID then pI' else pI
36.98 + val metID = if mI = Spec.e_metID then mI' else mI
36.99 in (domID, pblID, metID) end;
36.100
36.101 (**.development for extracting an 'interval' from ptree.**)
36.102 @@ -546,7 +546,7 @@
36.103 fun ocalhd2str (b, p, hdf, itms, prec, spec) = (* for tests only *)
36.104 "(" ^ bool2str b ^ ", " ^ pos_2str p ^ ", " ^ UnparseC.term hdf ^
36.105 ", " ^ Model.itms2str_ (ThyC.id_to_ctxt "Isac_Knowledge") itms ^
36.106 - ", " ^ preconds2str prec ^ ", \n" ^ Celem.spec2str spec ^ " )";
36.107 + ", " ^ preconds2str prec ^ ", \n" ^ Spec.spec2str spec ^ " )";
36.108
36.109 fun is_pblnd (Nd (ppobj, _)) = is_pblobj ppobj
36.110 | is_pblnd _ = error "is_pblnd: uncovered fun def.";
37.1 --- a/src/Tools/isac/MathEngBasic/ctree.sml Tue Apr 21 12:26:08 2020 +0200
37.2 +++ b/src/Tools/isac/MathEngBasic/ctree.sml Tue Apr 21 15:42:50 2020 +0200
37.3 @@ -9,7 +9,7 @@
37.4 include CALC_TREE_NAVIGATION
37.5 include CALC_TREE_ACCESS
37.6
37.7 - val get_pblID : state -> Celem.pblID option
37.8 + val get_pblID : state -> Spec.pblID option
37.9 end
37.10
37.11 structure Ctree : CTREE =
37.12 @@ -23,10 +23,10 @@
37.13 val (_, pI, _) = get_obj g_spec pt p'
37.14 val (_, (_, oI, _), _) = get_obj g_origin pt p'
37.15 in
37.16 - if pI <> Celem.e_pblID
37.17 + if pI <> Spec.e_pblID
37.18 then SOME pI
37.19 else
37.20 - if oI <> Celem.e_pblID then SOME oI else NONE end;
37.21 + if oI <> Spec.e_pblID then SOME oI else NONE end;
37.22
37.23
37.24 end;
38.1 --- a/src/Tools/isac/MathEngBasic/mstools.sml Tue Apr 21 12:26:08 2020 +0200
38.2 +++ b/src/Tools/isac/MathEngBasic/mstools.sml Tue Apr 21 15:42:50 2020 +0200
38.3 @@ -12,20 +12,20 @@
38.4 val check_preconds : 'a -> Rule_Set.T -> term list -> Model.itm list -> (bool * term) list
38.5 val check_preconds' : Rule_Set.T -> term list -> Model.itm list -> 'a -> (bool * term) list
38.6
38.7 - datatype match_ = Match_ of Celem.pblID * (Model.itm list * (bool * term) list) | NoMatch_
38.8 + datatype match_ = Match_ of Spec.pblID * (Model.itm list * (bool * term) list) | NoMatch_
38.9 val refined_ : match_ list -> match_ option
38.10 - datatype match = Matches of Celem.pblID * Model.item Model.ppc | NoMatch of Celem.pblID * Model.item Model.ppc
38.11 + datatype match = Matches of Spec.pblID * Model.item Model.ppc | NoMatch of Spec.pblID * Model.item Model.ppc
38.12 val matchs2str : match list -> string
38.13 val common_subthy : theory * theory -> theory
38.14 (* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
38.15 val pres2str : (bool * term) list -> string
38.16 - val refined : match list -> Celem.pblID
38.17 + val refined : match list -> Spec.pblID
38.18 (*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
38.19 (*NONE*)
38.20 ( *\--- ! aktivate for Test_Isac END ----------------------------------------------------------/*)
38.21
38.22 (*----- unused code, kept as hints to design ideas ---------------------------------------------*)
38.23 - val pblID_of_match : match -> Celem.pblID
38.24 + val pblID_of_match : match -> Spec.pblID
38.25 val refined_IDitms : match list -> match option
38.26 end
38.27
38.28 @@ -33,8 +33,8 @@
38.29 struct
38.30
38.31 datatype match =
38.32 - Matches of Celem.pblID * Model.item Model.ppc
38.33 -| NoMatch of Celem.pblID * Model.item Model.ppc;
38.34 + Matches of Spec.pblID * Model.item Model.ppc
38.35 +| NoMatch of Spec.pblID * Model.item Model.ppc;
38.36 fun match2str (Matches (pI, ppc)) = "Matches (" ^ strs2str pI ^ ", " ^ Model.itemppc2str ppc ^ ")"
38.37 | match2str (NoMatch (pI, ppc)) = "NoMatch (" ^ strs2str pI ^ ", " ^ Model.itemppc2str ppc ^ ")";
38.38 fun matchs2str ms = (strs2str o (map match2str)) ms;
38.39 @@ -43,7 +43,7 @@
38.40
38.41 (* 10.03 for Refine_Problem *)
38.42 datatype match_ =
38.43 - Match_ of Celem.pblID * (( Model.itm list) * ((bool * term) list))
38.44 + Match_ of Spec.pblID * (( Model.itm list) * ((bool * term) list))
38.45 | NoMatch_;
38.46
38.47 (* the refined pbt is the last_element Matches in the list *)
39.1 --- a/src/Tools/isac/MathEngBasic/specification-elems.sml Tue Apr 21 12:26:08 2020 +0200
39.2 +++ b/src/Tools/isac/MathEngBasic/specification-elems.sml Tue Apr 21 15:42:50 2020 +0200
39.3 @@ -29,7 +29,7 @@
39.4 val subte2sube : term list -> TermC.as_string list
39.5
39.6 (* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
39.7 - val e_fmz : fmz_ * Celem.spec (* for datatypes.sml *)
39.8 + val e_fmz : fmz_ * Spec.spec (* for datatypes.sml *)
39.9 val e_sube : TermC.as_string list
39.10 val e_subs : string list
39.11 val subte2subst : term list -> (term * term) list
39.12 @@ -53,8 +53,8 @@
39.13 (* a formalization of an example contains data
39.14 sufficient for mechanically finding the solution for the example.
39.15 FIXME.WN051014: dont store fmz = (_,spec) in the PblObj, this is done in origin *)
39.16 -type fmz = fmz_ * Celem.spec;
39.17 -val e_fmz = ([], Celem.e_spec);
39.18 +type fmz = fmz_ * Spec.spec;
39.19 +val e_fmz = ([], Spec.empty_spec);
39.20
39.21 type result = term * term list
39.22 fun res2str (t, ts) = pair2str (UnparseC.term t, UnparseC.terms ts); (* for tests only *)
40.1 --- a/src/Tools/isac/MathEngBasic/tactic.sml Tue Apr 21 12:26:08 2020 +0200
40.2 +++ b/src/Tools/isac/MathEngBasic/tactic.sml Tue Apr 21 15:42:50 2020 +0200
40.3 @@ -12,7 +12,7 @@
40.4 datatype T =
40.5 Add_Find' of TermC.as_string * Model.itm list | Add_Given' of TermC.as_string * Model.itm list
40.6 | Add_Relation' of TermC.as_string * Model.itm list
40.7 - | Apply_Method' of Celem.metID * term option * Istate_Def.T * Proof.context
40.8 + | Apply_Method' of Spec.metID * term option * Istate_Def.T * Proof.context
40.9
40.10 | Begin_Sequ' | Begin_Trans' of term
40.11 | Split_And' of term | Split_Or' of term | Split_Intersect' of term
40.12 @@ -22,7 +22,7 @@
40.13
40.14 | CAScmd' of term
40.15 | Calculate' of ThyC.id * string * term * (term * ThmC.T)
40.16 - | Check_Postcond' of Celem.pblID * term
40.17 + | Check_Postcond' of Spec.pblID * term
40.18 | Check_elementwise' of term * TermC.as_string * Selem.result
40.19 | Del_Find' of TermC.as_string | Del_Given' of TermC.as_string | Del_Relation' of TermC.as_string
40.20
40.21 @@ -34,22 +34,22 @@
40.22 | Empty_Tac_
40.23 | Free_Solve'
40.24
40.25 - | Init_Proof' of TermC.as_string list * Celem.spec
40.26 - | Model_Problem' of Celem.pblID * Model.itm list * Model.itm list
40.27 + | Init_Proof' of TermC.as_string list * Spec.spec
40.28 + | Model_Problem' of Spec.pblID * Model.itm list * Model.itm list
40.29 | Or_to_List' of term * term
40.30 - | Refine_Problem' of Celem.pblID * (Model.itm list * (bool * term) list)
40.31 - | Refine_Tacitly' of Celem.pblID * Celem.pblID * ThyC.id * Celem.metID * Model.itm list
40.32 + | Refine_Problem' of Spec.pblID * (Model.itm list * (bool * term) list)
40.33 + | Refine_Tacitly' of Spec.pblID * Spec.pblID * ThyC.id * Spec.metID * Model.itm list
40.34
40.35 | Rewrite' of ThyC.id * Rewrite_Ord.rew_ord' * Rule_Set.T * bool * ThmC.T * term * Selem.result
40.36 | Rewrite_Inst' of ThyC.id * Rewrite_Ord.rew_ord' * Rule_Set.T * bool * UnparseC.subst * ThmC.T * term * Selem.result
40.37 | Rewrite_Set' of ThyC.id * bool * Rule_Set.T * term * Selem.result
40.38 | Rewrite_Set_Inst' of ThyC.id * bool * UnparseC.subst * Rule_Set.T * term * Selem.result
40.39
40.40 - | Specify_Method' of Celem.metID * Model.ori list * Model.itm list
40.41 - | Specify_Problem' of Celem.pblID * (bool * (Model.itm list * (bool * term) list))
40.42 + | Specify_Method' of Spec.metID * Model.ori list * Model.itm list
40.43 + | Specify_Problem' of Spec.pblID * (bool * (Model.itm list * (bool * term) list))
40.44 | Specify_Theory' of ThyC.id
40.45 | Subproblem' of
40.46 - Celem.spec * Model.ori list *
40.47 + Spec.spec * Model.ori list *
40.48 term * (* CAScmd, e.g. "solve (-1 + x = 0, x)" *)
40.49 Selem.fmz_ * (* either input to root-probl. or derived from prog. in ??? *)
40.50 (*Istate.T * ? *)
40.51 @@ -63,7 +63,7 @@
40.52 datatype input =
40.53 Add_Find of TermC.as_string | Add_Given of TermC.as_string | Add_Relation of TermC.as_string
40.54 | Apply_Assumption of TermC.as_string list
40.55 - | Apply_Method of Celem.metID
40.56 + | Apply_Method of Spec.metID
40.57 (*/--- TODO: re-design ? -----------------------------------------------------------------\*)
40.58 | Begin_Sequ | Begin_Trans
40.59 | Split_And | Split_Or | Split_Intersect
40.60 @@ -73,7 +73,7 @@
40.61 (*\--- TODO: re-design ? -----------------------------------------------------------------/*)
40.62 | CAScmd of TermC.as_string
40.63 | Calculate of string
40.64 - | Check_Postcond of Celem.pblID
40.65 + | Check_Postcond of Spec.pblID
40.66 | Check_elementwise of TermC.as_string
40.67 | Del_Find of TermC.as_string | Del_Given of TermC.as_string | Del_Relation of TermC.as_string
40.68
40.69 @@ -85,21 +85,21 @@
40.70 | Empty_Tac
40.71 | Free_Solve
40.72
40.73 - | Init_Proof of TermC.as_string list * Celem.spec
40.74 + | Init_Proof of TermC.as_string list * Spec.spec
40.75 | Model_Problem
40.76 | Or_to_List
40.77 - | Refine_Problem of Celem.pblID
40.78 - | Refine_Tacitly of Celem.pblID
40.79 + | Refine_Problem of Spec.pblID
40.80 + | Refine_Tacitly of Spec.pblID
40.81
40.82 | Rewrite of ThmC.T
40.83 | Rewrite_Inst of Selem.subs * ThmC.T
40.84 | Rewrite_Set of Rule_Set.id
40.85 | Rewrite_Set_Inst of Selem.subs * Rule_Set.id
40.86
40.87 - | Specify_Method of Celem.metID
40.88 - | Specify_Problem of Celem.pblID
40.89 + | Specify_Method of Spec.metID
40.90 + | Specify_Problem of Spec.pblID
40.91 | Specify_Theory of ThyC.id
40.92 - | Subproblem of ThyC.id * Celem.pblID
40.93 + | Subproblem of ThyC.id * Spec.pblID
40.94
40.95 | Substitute of Selem.sube
40.96 | Tac of string
40.97 @@ -146,7 +146,7 @@
40.98 datatype input =
40.99 Add_Find of TermC.as_string | Add_Given of TermC.as_string | Add_Relation of TermC.as_string
40.100 | Apply_Assumption of TermC.as_string list
40.101 - | Apply_Method of Celem.metID
40.102 + | Apply_Method of Spec.metID
40.103 (* creates an "istate" in PblObj.env; in case of "implicit_take"
40.104 creates a formula at ((lev_on o lev_dn) p, Frm) and in this "ppobj.loc"
40.105 a "SOME istate" at fst of "loc".
40.106 @@ -161,7 +161,7 @@
40.107 (*\--- TODO: re-design ? -----------------------------------------------------------------/*)
40.108 | CAScmd of TermC.as_string
40.109 | Calculate of string
40.110 - | Check_Postcond of Celem.pblID
40.111 + | Check_Postcond of Spec.pblID
40.112 | Check_elementwise of TermC.as_string
40.113 | Del_Find of TermC.as_string | Del_Given of TermC.as_string | Del_Relation of TermC.as_string
40.114
40.115 @@ -173,11 +173,11 @@
40.116 | Empty_Tac
40.117 | Free_Solve
40.118
40.119 - | Init_Proof of TermC.as_string list * Celem.spec
40.120 + | Init_Proof of TermC.as_string list * Spec.spec
40.121 | Model_Problem
40.122 | Or_to_List
40.123 - | Refine_Problem of Celem.pblID
40.124 - | Refine_Tacitly of Celem.pblID
40.125 + | Refine_Problem of Spec.pblID
40.126 + | Refine_Tacitly of Spec.pblID
40.127
40.128 (* rewrite-tactics can transport a (thmID, thm) to and (!) from the java-front-end
40.129 because there all the thms are present with both (thmID, thm)
40.130 @@ -188,10 +188,10 @@
40.131 | Rewrite_Set of Rule_Set.id
40.132 | Rewrite_Set_Inst of Selem.subs * Rule_Set.id
40.133
40.134 - | Specify_Method of Celem.metID
40.135 - | Specify_Problem of Celem.pblID
40.136 + | Specify_Method of Spec.metID
40.137 + | Specify_Problem of Spec.pblID
40.138 | Specify_Theory of ThyC.id
40.139 - | Subproblem of ThyC.id * Celem.pblID (* WN0509 drop *)
40.140 + | Subproblem of ThyC.id * Spec.pblID (* WN0509 drop *)
40.141
40.142 | Substitute of Selem.sube
40.143 | Tac of string (* WN0509 drop *)
40.144 @@ -199,7 +199,7 @@
40.145
40.146 fun input_to_string ma = case ma of
40.147 Init_Proof (ppc, spec) =>
40.148 - "Init_Proof "^(pair2str (strs2str ppc, Celem.spec2str spec))
40.149 + "Init_Proof "^(pair2str (strs2str ppc, Spec.spec2str spec))
40.150 | Model_Problem => "Model_Problem "
40.151 | Refine_Tacitly pblID => "Refine_Tacitly " ^ strs2str pblID
40.152 | Refine_Problem pblID => "Refine_Problem " ^ strs2str pblID
40.153 @@ -339,7 +339,7 @@
40.154 | Apply_Method' of (* creates the 1st step visible in a (sub-) comprising
40.155 * tactic Apply_Method metID
40.156 * formula term *)
40.157 - Celem.metID * (* key for Know_Store *)
40.158 + Spec.metID * (* key for Know_Store *)
40.159 term option * (* the first formula of Calc.T. TODO: rm option *)
40.160 Istate_Def.T * (* for the newly started program *)
40.161 Proof.context (* for the newly started program *)
40.162 @@ -352,7 +352,7 @@
40.163 (*\--- TODO: re-design ? -----------------------------------------------------------------/*)
40.164 | CAScmd' of term
40.165 | Calculate' of ThyC.id * string * term * (term * ThmC.T)
40.166 - | Check_Postcond' of Celem.pblID *
40.167 + | Check_Postcond' of Spec.pblID *
40.168 term (* returnvalue of program in solve *)
40.169 | Check_elementwise' of (* DEPRECATED, made idle for Calc.T in df00a2b5c4cc *)
40.170 term * (* (1) the current formula: [x=1,x=...] *)
40.171 @@ -368,32 +368,32 @@
40.172 | Empty_Tac_
40.173 | Free_Solve'
40.174
40.175 - | Init_Proof' of TermC.as_string list * Celem.spec
40.176 + | Init_Proof' of TermC.as_string list * Spec.spec
40.177 | Model_Problem' of (* first step in specifying *)
40.178 - Celem.pblID * (* key into Know_Store *)
40.179 + Spec.pblID * (* key into Know_Store *)
40.180 Model.itm list * (* the 'untouched' pbl *)
40.181 Model.itm list (* the casually completed met *)
40.182 | Or_to_List' of term * term
40.183 - | Refine_Problem' of Celem.pblID * (Model.itm list * (bool * term) list)
40.184 + | Refine_Problem' of Spec.pblID * (Model.itm list * (bool * term) list)
40.185 | Refine_Tacitly' of
40.186 - Celem.pblID * (* input *)
40.187 - Celem.pblID * (* the refined from applicable_in *)
40.188 + Spec.pblID * (* input *)
40.189 + Spec.pblID * (* the refined from applicable_in *)
40.190 ThyC.id * (* from new pbt?! filled in specify *)
40.191 - Celem.metID * (* from new pbt?! filled in specify *)
40.192 + Spec.metID * (* from new pbt?! filled in specify *)
40.193 Model.itm list (* drop ! 9.03: remains [] for Model_Problem recognizing its activation *)
40.194 | Rewrite' of ThyC.id * Rewrite_Ord.rew_ord' * Rule_Set.T * bool * ThmC.T * term * Selem.result
40.195 | Rewrite_Inst' of ThyC.id * Rewrite_Ord.rew_ord' * Rule_Set.T * bool * UnparseC.subst * ThmC.T * term * Selem.result
40.196 | Rewrite_Set' of ThyC.id * bool * Rule_Set.T * term * Selem.result
40.197 | Rewrite_Set_Inst' of ThyC.id * bool * UnparseC.subst * Rule_Set.T * term * Selem.result
40.198
40.199 - | Specify_Method' of Celem.metID * Model.ori list * Model.itm list
40.200 - | Specify_Problem' of Celem.pblID *
40.201 + | Specify_Method' of Spec.metID * Model.ori list * Model.itm list
40.202 + | Specify_Problem' of Spec.pblID *
40.203 (bool * (* matches *)
40.204 (Model.itm list * (* ppc *)
40.205 (bool * term) list)) (* preconditions marked true/false *)
40.206 | Specify_Theory' of ThyC.id
40.207 | Subproblem' of
40.208 - Celem.spec *
40.209 + Spec.spec *
40.210 (Model.ori list) * (* filled in associate Subproblem' *)
40.211 term * (* filled -"-, headline of calc-head *)
40.212 Selem.fmz_ * (* string list from arguments *)
40.213 @@ -409,7 +409,7 @@
40.214 | Take' of term
40.215
40.216 fun string_of ma = case ma of
40.217 - Init_Proof' (ppc, spec) => "Init_Proof' " ^ pair2str (strs2str ppc, Celem.spec2str spec)
40.218 + Init_Proof' (ppc, spec) => "Init_Proof' " ^ pair2str (strs2str ppc, Spec.spec2str spec)
40.219 | Model_Problem' (pblID, _, _) => "Model_Problem' " ^ strs2str pblID
40.220 | Refine_Tacitly'(p, prefin, domID, metID, _) => "Refine_Tacitly' (" ^ strs2str p ^ ", " ^
40.221 strs2str prefin ^ ", " ^ domID ^ ", " ^ strs2str metID ^ ", pbl-itms)"
40.222 @@ -425,7 +425,7 @@
40.223 | Specify_Problem' (pI, (ok, _)) => "Specify_Problem' " ^
40.224 spair2str (strs2str pI, spair2str (bool2str ok, spair2str ("itms2str_ itms", "items2str pre")))
40.225 | Specify_Method' (pI, oris, _) => "Specify_Method' (" ^
40.226 - Celem.metID2str pI ^ ", " ^ Model.oris2str oris ^ ", )"
40.227 + Spec.metID2str pI ^ ", " ^ Model.oris2str oris ^ ", )"
40.228
40.229 | Apply_Method' (metID, _, _, _) => "Apply_Method' " ^ strs2str metID
40.230 | Check_Postcond' (pblID, scval) => "Check_Postcond' " ^
41.1 --- a/src/Tools/isac/MathEngine/detail-step.sml Tue Apr 21 12:26:08 2020 +0200
41.2 +++ b/src/Tools/isac/MathEngine/detail-step.sml Tue Apr 21 15:42:50 2020 +0200
41.3 @@ -43,7 +43,7 @@
41.4 | _ =>
41.5 let
41.6 val is = Generate.init_istate tac t
41.7 - val tac_ = Tactic.Apply_Method' (Celem.e_metID(*WN0402: see generate1 !?!*), SOME t, is, ctxt)
41.8 + val tac_ = Tactic.Apply_Method' (Spec.e_metID(*WN0402: see generate1 !?!*), SOME t, is, ctxt)
41.9 val pos' = ((lev_on o lev_dn) p, Frm)
41.10 val (_, _, _, pt') = Generate.generate1 tac_ (is, ctxt) (pt, pos') (* implicit Take *)
41.11 val (_,_, (pt'', _)) = Solve.complete_solve Solve.CompleteSubpbl [] (pt', pos')
42.1 --- a/src/Tools/isac/MathEngine/fetch-tactics.sml Tue Apr 21 12:26:08 2020 +0200
42.2 +++ b/src/Tools/isac/MathEngine/fetch-tactics.sml Tue Apr 21 15:42:50 2020 +0200
42.3 @@ -30,7 +30,7 @@
42.4 val thy' = get_obj g_domID pt pp;
42.5 val thy = ThyC.get_theory thy';
42.6 val metID = get_obj g_metID pt pp;
42.7 - val metID' = if metID = Celem.e_metID then (thd3 o snd3) (get_obj g_origin pt pp) else metID
42.8 + val metID' = if metID = Spec.e_metID then (thd3 o snd3) (get_obj g_origin pt pp) else metID
42.9 val (sc, srls) = (case Specify.get_met metID' of
42.10 {scr = Rule.Prog sc, srls, ...} => (sc, srls) | _ => raise ERROR "from_prog 1")
42.11 val subst = get_istate_LI pt (p, p_) |> Istate.the_pstate |> Istate.get_subst
42.12 @@ -53,7 +53,7 @@
42.13 val thy = ThyC.get_theory thy'
42.14 val metID = get_obj g_metID pt pp
42.15 val metID' =
42.16 - if metID = Celem.e_metID
42.17 + if metID = Spec.e_metID
42.18 then (thd3 o snd3) (get_obj g_origin pt pp)
42.19 else metID
42.20 val (sc, srls, erls, ro) = (case Specify.get_met metID' of
43.1 --- a/src/Tools/isac/MathEngine/mathengine-stateless.sml Tue Apr 21 12:26:08 2020 +0200
43.2 +++ b/src/Tools/isac/MathEngine/mathengine-stateless.sml Tue Apr 21 15:42:50 2020 +0200
43.3 @@ -12,12 +12,12 @@
43.4
43.5 val initcontext_met : Ctree.ctree -> Pos.pos' -> bool * string list * Program.T * Model.itm list * (bool * term) list
43.6 val initcontext_pbl : Ctree.ctree -> Pos.pos' -> bool * string list * term * Model.itm list * (bool * term) list
43.7 - val context_met : Celem.metID -> Ctree.ctree -> Pos.pos -> bool * Celem.metID * Program.T * Model.itm list * (bool * term) list
43.8 - val context_pbl : Celem.pblID -> Ctree.ctree -> Pos.pos -> bool * Celem.pblID * term * Model.itm list * (bool * term) list
43.9 - val set_method : Celem.metID -> Calc.T -> Ctree.ctree * Ctree.ocalhd
43.10 - val set_problem : Celem.pblID -> Calc.T -> Ctree.ctree * Ctree.ocalhd
43.11 + val context_met : Spec.metID -> Ctree.ctree -> Pos.pos -> bool * Spec.metID * Program.T * Model.itm list * (bool * term) list
43.12 + val context_pbl : Spec.pblID -> Ctree.ctree -> Pos.pos -> bool * Spec.pblID * term * Model.itm list * (bool * term) list
43.13 + val set_method : Spec.metID -> Calc.T -> Ctree.ctree * Ctree.ocalhd
43.14 + val set_problem : Spec.pblID -> Calc.T -> Ctree.ctree * Ctree.ocalhd
43.15 val set_theory : ThyC.id -> Calc.T -> Ctree.ctree * Ctree.ocalhd
43.16 - val tryrefine : Celem.pblID -> Ctree.ctree -> Pos.pos' -> bool * Celem.pblID * term * Model.itm list * (bool * term) list
43.17 + val tryrefine : Spec.pblID -> Ctree.ctree -> Pos.pos' -> bool * Spec.pblID * term * Model.itm list * (bool * term) list
43.18 (* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
43.19 (*NONE*)
43.20 (*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
43.21 @@ -144,7 +144,7 @@
43.22 => (probl, os, pI, hdl, pI')
43.23 | Ctree.PrfObj _ => error "initcontext_pbl: uncovered case"
43.24 val pblID =
43.25 - if pI' = Celem.e_pblID
43.26 + if pI' = Spec.e_pblID
43.27 then (* TODO.WN051125 (#init o get_pbt) pI *) takelast (2, pI)
43.28 else pI'
43.29 val {ppc, where_, prls, ...} = Specify.get_pbt pblID
43.30 @@ -159,7 +159,7 @@
43.31 case Ctree.get_obj I pt p of
43.32 Ctree.PblObj {meth, origin = (os, (_, _, mI), _), spec=(_, _, mI'), ...} => (meth, os, mI, mI')
43.33 | Ctree.PrfObj _ => error "initcontext_met: uncovered case"
43.34 - val metID = if mI' = Celem.e_metID
43.35 + val metID = if mI' = Spec.e_metID
43.36 then (*TODO.WN051125 (#init o get_pbt) pI *) takelast (2, mI)
43.37 else mI'
43.38 val {ppc, pre, prls, scr, ...} = Specify.get_met metID
44.1 --- a/src/Tools/isac/ProgLang/Auto_Prog.thy Tue Apr 21 12:26:08 2020 +0200
44.2 +++ b/src/Tools/isac/ProgLang/Auto_Prog.thy Tue Apr 21 15:42:50 2020 +0200
44.3 @@ -28,7 +28,7 @@
44.4 val contain_bdv: Rule.rule list -> bool
44.5 val contains_bdv: thm -> bool
44.6 val subst_typs: term -> typ -> typ -> term
44.7 - val pblterm: ThyC.id -> Celem.pblID -> term
44.8 + val pblterm: ThyC.id -> Spec.pblID -> term
44.9 val subpbl: string -> string list -> term
44.10 val stacpbls: term -> term list
44.11 val op_of_calc: term -> string
45.1 --- a/src/Tools/isac/ProgLang/Prog_Tac.thy Tue Apr 21 12:26:08 2020 +0200
45.2 +++ b/src/Tools/isac/ProgLang/Prog_Tac.thy Tue Apr 21 15:42:50 2020 +0200
45.3 @@ -57,7 +57,7 @@
45.4 ML \<open>
45.5 signature PROGAM_TACTIC =
45.6 sig
45.7 - val dest_spec : term -> Celem.spec
45.8 + val dest_spec : term -> Spec.spec
45.9 val get_first_argument : term -> term option (*TODO rename get_first_argument*)
45.10 val eval_leaf: Env.T -> term option -> term -> term -> Program.leaf * term option
45.11 val is: term -> bool
45.12 @@ -76,7 +76,7 @@
45.13 fun dest_spec (Const ("Product_Type.Pair", _) $ d $ (Const ("Product_Type.Pair", _) $ p $ m)) =
45.14 (d |> HOLogic.dest_string,
45.15 p |> HOLogic.dest_list |> map HOLogic.dest_string,
45.16 - m |> HOLogic.dest_list |> map HOLogic.dest_string) : Celem.spec
45.17 + m |> HOLogic.dest_list |> map HOLogic.dest_string) : Spec.spec
45.18 | dest_spec t = raise TERM ("dest_spec: called with ", [t])
45.19
45.20 (* get argument of first Prog_Tac in a progam for implicit_take *)
46.1 --- a/src/Tools/isac/Specify/appl.sml Tue Apr 21 12:26:08 2020 +0200
46.2 +++ b/src/Tools/isac/Specify/appl.sml Tue Apr 21 15:42:50 2020 +0200
46.3 @@ -148,7 +148,7 @@
46.4 in
46.5 case Specify.refine_ori oris pI of
46.6 SOME pblID =>
46.7 - Appl (Tactic.Refine_Tacitly' (pI, pblID, ThyC.id_empty, Celem.e_metID, [](*filled in specify*)))
46.8 + Appl (Tactic.Refine_Tacitly' (pI, pblID, ThyC.id_empty, Spec.e_metID, [](*filled in specify*)))
46.9 | NONE => Notappl ((Tactic.input_to_string (Tactic.Refine_Tacitly pI)) ^ " not applicable")
46.10 end
46.11 | applicable_in (p, p_) pt (Tactic.Refine_Problem pI) =
46.12 @@ -210,7 +210,7 @@
46.13 | _ => error "applicable_in Specify_Problem: uncovered case get_obj"
46.14 val thy = ThyC.get_theory (if dI' = ThyC.id_empty then dI else dI');
46.15 val {ppc, where_, prls, ...} = Specify.get_pbt pID;
46.16 - val pbl = if pI' = Celem.e_pblID andalso pI = Celem.e_pblID
46.17 + val pbl = if pI' = Spec.e_pblID andalso pI = Spec.e_pblID
46.18 then (false, (Generate.init_pbl ppc, []))
46.19 else Specify.match_itms_oris thy itms (ppc, where_, prls) oris;
46.20 in
46.21 @@ -422,7 +422,7 @@
46.22 then
46.23 Notappl (Tactic.input_to_string m ^ " not for pos " ^ pos'2str (p, p_))
46.24 else (*some fields filled later in LI*)
46.25 - Appl (Tactic.Subproblem' ((domID, pblID, Celem.e_metID), [],
46.26 + Appl (Tactic.Subproblem' ((domID, pblID, Spec.e_metID), [],
46.27 TermC.empty, [], ContextC.empty, Auto_Prog.subpbl domID pblID))
46.28 | applicable_in _ _ (Tactic.End_Subproblem) =
46.29 error ("applicable_in: not impl. for " ^ Tactic.input_to_string Tactic.End_Subproblem)
47.1 --- a/src/Tools/isac/Specify/calchead.sml Tue Apr 21 12:26:08 2020 +0200
47.2 +++ b/src/Tools/isac/Specify/calchead.sml Tue Apr 21 15:42:50 2020 +0200
47.3 @@ -69,30 +69,30 @@
47.4 type calcstate
47.5 type calcstate'
47.6
47.7 - val nxt_spec : Pos.pos_ -> bool -> Model.ori list -> Celem.spec -> Model.itm list * Model.itm list ->
47.8 - (string * (term * 'a)) list * (string * (term * 'b)) list -> Celem.spec -> Pos.pos_ * Tactic.input
47.9 + val nxt_spec : Pos.pos_ -> bool -> Model.ori list -> Spec.spec -> Model.itm list * Model.itm list ->
47.10 + (string * (term * 'a)) list * (string * (term * 'b)) list -> Spec.spec -> Pos.pos_ * Tactic.input
47.11
47.12 val reset_calchead : Calc.T -> Calc.T
47.13 val get_ocalhd : Calc.T -> Ctree.ocalhd
47.14 - val ocalhd_complete : Model.itm list -> (bool * term) list -> ThyC.id * Celem.pblID * Celem.metID -> bool
47.15 + val ocalhd_complete : Model.itm list -> (bool * term) list -> ThyC.id * Spec.pblID * Spec.metID -> bool
47.16 val all_modspec : Calc.T -> Calc.T
47.17
47.18 - val complete_metitms : Model.ori list -> Model.itm list -> Model.itm list -> Celem.pat list -> Model.itm list
47.19 + val complete_metitms : Model.ori list -> Model.itm list -> Model.itm list -> Celem4.pat list -> Model.itm list
47.20 val insert_ppc' : Model.itm -> Model.itm list -> Model.itm list
47.21
47.22 val complete_mod : Calc.T -> Calc.T
47.23 val is_complete_mod : Calc.T -> bool
47.24 val complete_spec : Calc.T -> Calc.T
47.25 val is_complete_spec : Calc.T -> bool
47.26 - val some_spec : Celem.spec -> Celem.spec -> Celem.spec
47.27 + val some_spec : Spec.spec -> Spec.spec -> Spec.spec
47.28 (* these could go to Ctree ..*)
47.29 val show_pt : Ctree.ctree -> unit
47.30 val show_pt_tac : Ctree.ctree -> unit
47.31 val pt_extract : Calc.T -> Ctree.ptform * Tactic.input option * term list
47.32 val get_interval : Pos.pos' -> Pos.pos' -> int -> Ctree.ctree -> (Pos.pos' * term * Tactic.input option) list
47.33
47.34 - val match_ags : theory -> Celem.pat list -> term list -> Model.ori list
47.35 - val match_ags_msg : Celem.pblID -> term -> term list -> unit
47.36 + val match_ags : theory -> Celem4.pat list -> term list -> Model.ori list
47.37 + val match_ags_msg : Spec.pblID -> term -> term list -> unit
47.38 val oris2fmz_vals : Model.ori list -> string list * term list
47.39 val vars_of_pbl_' : ('a * ('b * term)) list -> term list
47.40 val is_known : Proof.context -> string -> Model.ori list -> term -> string * Model.ori * term list
47.41 @@ -117,10 +117,10 @@
47.42 val is_copy_named_generating_idstr : string -> bool
47.43 val is_copy_named_generating : 'a * ('b * term) -> bool
47.44 val is_copy_named : 'a * ('b * term) -> bool
47.45 - val ori2Coritm : Celem.pat list -> Model.ori -> Model.itm
47.46 + val ori2Coritm : Celem4.pat list -> Model.ori -> Model.itm
47.47 val matc : theory -> (string * (term * term)) list -> term list -> Model.preori list -> Model.preori list
47.48 - val mtc : theory -> Celem.pat -> term -> Model.preori option
47.49 - val cpy_nam : Celem.pat list -> Model.preori list -> Celem.pat -> Model.preori
47.50 + val mtc : theory -> Celem4.pat -> term -> Model.preori option
47.51 + val cpy_nam : Celem4.pat list -> Model.preori list -> Celem4.pat -> Model.preori
47.52 datatype additm = Add of Model.itm | Err of string
47.53 val appl_add: Proof.context -> string -> Model.ori list ->
47.54 Model.itm list -> (string * (term * term)) list -> TermC.as_string -> additm
47.55 @@ -185,7 +185,7 @@
47.56 fun ocalhd_complete its pre (dI, pI, mI) =
47.57 foldl and_ (true, map #3 (its: Model.itm list)) andalso
47.58 foldl and_ (true, map #1 (pre: (bool * term) list)) andalso
47.59 - dI <> ThyC.id_empty andalso pI <> Celem.e_pblID andalso mI <> Celem.e_metID
47.60 + dI <> ThyC.id_empty andalso pI <> Spec.e_pblID andalso mI <> Spec.e_metID
47.61
47.62 (* ["BOOL (1+x=2)","REAL x"] --match_ags--> oris
47.63 --oris2fmz_vals--> ["equality (1+x=2)","boundVariable x","solutions L"] *)
47.64 @@ -360,7 +360,7 @@
47.65 *)
47.66 fun nxt_spec Pbl preok oris (dI', pI', mI') (pbl, met) (pbt, mpc) (dI, pI, mI) =
47.67 (if dI' = ThyC.id_empty andalso dI = ThyC.id_empty then (Pbl, Tactic.Specify_Theory dI')
47.68 - else if pI' = Celem.e_pblID andalso pI = Celem.e_pblID then (Pbl, Tactic.Specify_Problem pI')
47.69 + else if pI' = Spec.e_pblID andalso pI = Spec.e_pblID then (Pbl, Tactic.Specify_Problem pI')
47.70 else
47.71 case find_first (is_error o #5) pbl of
47.72 SOME (_, _, _, fd, itm_) =>
47.73 @@ -371,8 +371,8 @@
47.74 | NONE => (*pbl-items complete*)
47.75 if not preok then (Pbl, Tactic.Refine_Problem pI')
47.76 else if dI = ThyC.id_empty then (Pbl, Tactic.Specify_Theory dI')
47.77 - else if pI = Celem.e_pblID then (Pbl, Tactic.Specify_Problem pI')
47.78 - else if mI = Celem.e_metID then (Pbl, Tactic.Specify_Method mI')
47.79 + else if pI = Spec.e_pblID then (Pbl, Tactic.Specify_Problem pI')
47.80 + else if mI = Spec.e_metID then (Pbl, Tactic.Specify_Method mI')
47.81 else
47.82 case find_first (is_error o #5) met of
47.83 SOME (_, _, _, fd, itm_) => (Met, mk_delete (ThyC.get_theory dI) fd itm_)
47.84 @@ -388,7 +388,7 @@
47.85 SOME (fd,ct') => (Met, mk_additem fd ct')
47.86 | NONE =>
47.87 (if dI = ThyC.id_empty then (Met, Tactic.Specify_Theory dI')
47.88 - else if pI = Celem.e_pblID then (Met, Tactic.Specify_Problem pI')
47.89 + else if pI = Spec.e_pblID then (Met, Tactic.Specify_Problem pI')
47.90 else if not preok then (Met, Tactic.Specify_Method mI)
47.91 else (Met, Tactic.Apply_Method mI)))
47.92 | nxt_spec p _ _ _ _ _ _ = error ("nxt_spec: uncovered case with " ^ pos_2str p)
47.93 @@ -584,7 +584,7 @@
47.94 fun matc _ [] _ oris = oris
47.95 | matc _ pbt [] _ =
47.96 (tracing (dashs 70);
47.97 - error ("actual arg(s) missing for '" ^ Celem.pats2str pbt ^ "' i.e. should be 'copy-named' by '*_._'"))
47.98 + error ("actual arg(s) missing for '" ^ Celem4.pats2str pbt ^ "' i.e. should be 'copy-named' by '*_._'"))
47.99 | matc thy ((p as (_, (_, t))) :: pbt) (a :: ags) oris =
47.100 (*del?..*)if (is_copy_named_idstr o TermC.free2str) t then oris
47.101 else(*..del?*)
47.102 @@ -633,7 +633,7 @@
47.103 val pats = (#ppc o Specify.get_pbt) pI
47.104 val msg = (dots 70 ^ "\n"
47.105 ^ "*** problem " ^ strs2str pI ^ " has the ...\n"
47.106 - ^ "*** model-pattern " ^ Celem.pats2str pats ^ "\n"
47.107 + ^ "*** model-pattern " ^ Celem4.pats2str pats ^ "\n"
47.108 ^ "*** stac '" ^ UnparseC.term stac ^ "' has the ...\n"
47.109 ^ "*** arg-list " ^ UnparseC.terms ags ^ "\n"
47.110 ^ dashs 70)
47.111 @@ -675,7 +675,7 @@
47.112
47.113 (* output the headline to a ppc *)
47.114 fun header p_ pI mI =
47.115 - case p_ of Pbl => Generate.Problem (if pI = Celem.e_pblID then [] else pI)
47.116 + case p_ of Pbl => Generate.Problem (if pI = Spec.e_pblID then [] else pI)
47.117 | Met => Generate.Method mI
47.118 | pos => error ("header called with "^ pos_2str pos)
47.119
47.120 @@ -686,8 +686,8 @@
47.121 => (met, oris, dI', pI', mI', pbl, dI ,pI, mI, ctxt)
47.122 | _ => error "specify_additem: uncovered case of get_obj I pt p"
47.123 val thy = if dI = ThyC.id_empty then ThyC.get_theory dI' else ThyC.get_theory dI
47.124 - val cpI = if pI = Celem.e_pblID then pI' else pI
47.125 - val cmI = if mI = Celem.e_metID then mI' else mI
47.126 + val cpI = if pI = Spec.e_pblID then pI' else pI
47.127 + val cmI = if mI = Spec.e_metID then mI' else mI
47.128 val {ppc, pre, prls, ...} = Specify.get_met cmI
47.129 in
47.130 case appl_add ctxt sel oris met ppc ct of
47.131 @@ -728,8 +728,8 @@
47.132 => (met, oris, dI', pI', mI', pbl, dI ,pI, mI, ctxt)
47.133 | _ => error "specify_additem Frm, Pbl: uncovered case of get_obj I pt p"
47.134 val thy = if dI = ThyC.id_empty then ThyC.get_theory dI' else ThyC.get_theory dI
47.135 - val cpI = if pI = Celem.e_pblID then pI' else pI
47.136 - val cmI = if mI = Celem.e_metID then mI' else mI
47.137 + val cpI = if pI = Spec.e_pblID then pI' else pI
47.138 + val cmI = if mI = Spec.e_metID then mI' else mI
47.139 val {ppc, where_, prls, ...} = Specify.get_pbt cpI
47.140 in
47.141 case appl_add ctxt sel oris pbl ppc ct of
47.142 @@ -774,7 +774,7 @@
47.143 (oris, dI', pI', dI, pI, pbl, ctxt)
47.144 | _ => error "specify (Specify_Theory': uncovered case get_obj"
47.145 val thy = if dI = ThyC.id_empty then ThyC.get_theory dI' else ThyC.get_theory dI;
47.146 - val cpI = if pI = Celem.e_pblID then pI' else pI;
47.147 + val cpI = if pI = Spec.e_pblID then pI' else pI;
47.148 in
47.149 case appl_add ctxt sel oris pbl ((#ppc o Specify.get_pbt) cpI) ct of
47.150 Add itm (*..union old input *) =>
47.151 @@ -804,7 +804,7 @@
47.152 (oris, dI', mI', dI, mI, met, ctxt)
47.153 | _ => error "nxt_specif_additem Met: uncovered case get_obj"
47.154 val thy = if dI = ThyC.id_empty then ThyC.get_theory dI' else ThyC.get_theory dI;
47.155 - val cmI = if mI = Celem.e_metID then mI' else mI;
47.156 + val cmI = if mI = Spec.e_metID then mI' else mI;
47.157 in
47.158 case appl_add ctxt sel oris met ((#ppc o Specify.get_met) cmI) ct of
47.159 Add itm (*..union old input *) =>
47.160 @@ -874,8 +874,8 @@
47.161
47.162 fun some_spec (odI, opI, omI) (dI, pI, mI) =
47.163 (if dI = ThyC.id_empty then odI else dI,
47.164 - if pI = Celem.e_pblID then opI else pI,
47.165 - if mI = Celem.e_metID then omI else mI)
47.166 + if pI = Spec.e_pblID then opI else pI,
47.167 + if mI = Spec.e_metID then omI else mI)
47.168
47.169 (* get the values from oris; handle the term list w.r.t. penv *)
47.170 fun vals_of_oris (oris: Model.ori list) =
47.171 @@ -976,7 +976,7 @@
47.172 then error ("is_complete_spec: called by PrfObj at "^pos'2str pos)
47.173 else
47.174 let val (dI,pI,mI) = get_obj g_spec pt p
47.175 - in dI <> ThyC.id_empty andalso pI <> Celem.e_pblID andalso mI <> Celem.e_metID end
47.176 + in dI <> ThyC.id_empty andalso pI <> Spec.e_pblID andalso mI <> Spec.e_metID end
47.177
47.178 (* complete empty items in specification from origin (pbl, met ev.refined);
47.179 assumes 'is_complete_mod' *)
47.180 @@ -995,7 +995,7 @@
47.181 fun pt_model (PblObj {meth, spec, origin = (_, spec', hdl), ...}) Met =
47.182 let
47.183 val (_, _, metID) = get_somespec' spec spec'
47.184 - val pre = if metID = Celem.e_metID then []
47.185 + val pre = if metID = Spec.e_metID then []
47.186 else
47.187 let
47.188 val {prls, pre= where_, ...} = Specify.get_met metID
47.189 @@ -1008,7 +1008,7 @@
47.190 | pt_model (PblObj {probl, spec, origin = (_, spec', hdl), ...}) _(*Frm,Pbl*) =
47.191 let
47.192 val (_, pI, _) = get_somespec' spec spec'
47.193 - val pre = if pI = Celem.e_pblID then []
47.194 + val pre = if pI = Spec.e_pblID then []
47.195 else
47.196 let
47.197 val {prls, where_, ...} = Specify.get_pbt pI
47.198 @@ -1056,7 +1056,7 @@
47.199 val pI = case get_obj I pt (lev_up p) of
47.200 PblObj{spec = (_, pI, _), ...} => pI
47.201 | _ => error "pt_extract last_onlev: uncovered case get_obj"
47.202 - in if pI = Celem.e_pblID then NONE else SOME (Tactic.Check_Postcond pI) end
47.203 + in if pI = Spec.e_pblID then NONE else SOME (Tactic.Check_Postcond pI) end
47.204 else SOME Tactic.End_Trans (* WN0502 TODO for other branches *)
47.205 else
47.206 let val p' = lev_on p
47.207 @@ -1199,7 +1199,7 @@
47.208 | _ => error "reset_calchead: uncovered case get_obj"
47.209 val pt = update_pbl pt p []
47.210 val pt = update_met pt p []
47.211 - val pt = update_spec pt p Celem.e_spec
47.212 + val pt = update_spec pt p Spec.empty_spec
47.213 in (pt, (p, Pbl) : pos') end
47.214
47.215 (**)end(**)
47.216 \ No newline at end of file
48.1 --- a/src/Tools/isac/Specify/generate.sml Tue Apr 21 12:26:08 2020 +0200
48.2 +++ b/src/Tools/isac/Specify/generate.sml Tue Apr 21 15:42:50 2020 +0200
48.3 @@ -7,13 +7,13 @@
48.4 sig
48.5 type taci
48.6 val e_taci : taci
48.7 - datatype pblmet = Method of Celem.metID | Problem of Celem.pblID | Upblmet
48.8 + datatype pblmet = Method of Spec.metID | Problem of Spec.pblID | Upblmet
48.9 datatype mout =
48.10 EmptyMout
48.11 | Error' of string
48.12 | FormKF of TermC.as_string
48.13 | PpcKF of pblmet * Model.item Model.ppc
48.14 - | RefinedKF of Celem.pblID * (Model.itm list * (bool * term) list)
48.15 + | RefinedKF of Spec.pblID * (Model.itm list * (bool * term) list)
48.16 val generate1 : Tactic.T -> Istate_Def.T * Proof.context -> Calc.T
48.17 -> Pos.pos' * Pos.pos' list * mout * Ctree.ctree
48.18 val init_istate : Tactic.input -> term -> Istate_Def.T
48.19 @@ -87,10 +87,10 @@
48.20
48.21 datatype pblmet = (*%^%*)
48.22 Upblmet (*undefined*)
48.23 -| Problem of Celem.pblID (*%^%*)
48.24 -| Method of Celem.metID; (*%^%*)
48.25 +| Problem of Spec.pblID (*%^%*)
48.26 +| Method of Spec.metID; (*%^%*)
48.27 fun pblmet2str (Problem pblID) = "Problem " ^ strs2str pblID (*%^%*)
48.28 - | pblmet2str (Method metID) = "Method " ^ Celem.metID2str metID (*%^%*)
48.29 + | pblmet2str (Method metID) = "Method " ^ Spec.metID2str metID (*%^%*)
48.30 | pblmet2str x = error ("pblmet2str: uncovered definition " ^ pblmet2str x)
48.31
48.32 (*3.5.00: TODO: foppFK eliminated in interface FE-KE !!!*)
48.33 @@ -121,7 +121,7 @@
48.34 | FormKF of cellID * edit * indent * nest * TermC.as_string (*<--*)
48.35 | PpcKF of cellID * edit * indent * nest * (pblmet * Model.item Model.ppc) (*<--*)
48.36 | RefineKF of Stool.match list (*<--*)
48.37 -| RefinedKF of (Celem.pblID * ((Model.itm list) * ((bool * term) list))) (*<--*)
48.38 +| RefinedKF of (Spec.pblID * ((Model.itm list) * ((bool * term) list))) (*<--*)
48.39
48.40 (*
48.41 datatype mout = EmptyMout | Error' of inout | Form' of inout | Problems of inout
48.42 @@ -129,7 +129,7 @@
48.43 datatype mout =
48.44 FormKF of TermC.as_string
48.45 | PpcKF of (pblmet * Model.item Model.ppc)
48.46 -| RefinedKF of Celem.pblID * (Model.itm list * (bool * term) list)
48.47 +| RefinedKF of Spec.pblID * (Model.itm list * (bool * term) list)
48.48 | Error' of string
48.49 | EmptyMout
48.50
48.51 @@ -274,7 +274,7 @@
48.52 val (pt, _) = cappend_form pt p (is, ctxt) f
48.53 val pt = update_branch pt p TransitiveB
48.54 val is = init_istate (Tactic.Rewrite_Set_Inst (Selem.subst2subs subs, Rule_Set.id rls)) f
48.55 - val tac_ = Tactic.Apply_Method' (Celem.e_metID, SOME TermC.empty (*t ..has not been declared*), is, ctxt)
48.56 + val tac_ = Tactic.Apply_Method' (Spec.e_metID, SOME TermC.empty (*t ..has not been declared*), is, ctxt)
48.57 val pos' = ((lev_on o lev_dn) p, Frm)
48.58 in
48.59 generate1 tac_ (is, ctxt) (pt, pos') (*implicit Take*)
48.60 @@ -292,7 +292,7 @@
48.61 val (pt, _) = cappend_form pt p (is, ctxt) f
48.62 val pt = update_branch pt p TransitiveB
48.63 val is = init_istate (Tactic.Rewrite_Set (Rule_Set.id rls)) f
48.64 - val tac_ = Tactic.Apply_Method' (Celem.e_metID, SOME TermC.empty (*t ..has not been declared*), is, ctxt)
48.65 + val tac_ = Tactic.Apply_Method' (Spec.e_metID, SOME TermC.empty (*t ..has not been declared*), is, ctxt)
48.66 val pos' = ((lev_on o lev_dn) p, Frm)
48.67 in
48.68 generate1 tac_ (is, ctxt) (pt, pos') (*implicit Take*)
49.1 --- a/src/Tools/isac/Specify/input-calchead.sml Tue Apr 21 12:26:08 2020 +0200
49.2 +++ b/src/Tools/isac/Specify/input-calchead.sml Tue Apr 21 15:42:50 2020 +0200
49.3 @@ -7,7 +7,7 @@
49.4 sig
49.5 datatype iitem = Find of TermC.as_string list | Given of TermC.as_string list | Relate of TermC.as_string list
49.6 type imodel = iitem list
49.7 - type icalhd = Pos.pos' * TermC.as_string * imodel * Pos.pos_ * Celem.spec
49.8 + type icalhd = Pos.pos' * TermC.as_string * imodel * Pos.pos_ * Spec.spec
49.9 val input_icalhd : Ctree.ctree -> icalhd -> Ctree.ctree * Ctree.ocalhd
49.10 val cas_input : term -> (Ctree.ctree * Ctree.ocalhd) option
49.11 (* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
49.12 @@ -38,7 +38,7 @@
49.13
49.14 fun flattup2 (a, (b ,c, d, e)) = (a, b, c, d, e)
49.15
49.16 -fun cas_input_ ((dI, pI, mI): Celem.spec) dtss = (*WN110515 reconsider thy..ctxt*)
49.17 +fun cas_input_ ((dI, pI, mI): Spec.spec) dtss = (*WN110515 reconsider thy..ctxt*)
49.18 let
49.19 val thy = ThyC.get_theory dI
49.20 val {ppc, ...} = Specify.get_pbt pI
49.21 @@ -74,7 +74,7 @@
49.22 val (pI, pits, mI, mits, pre, ctxt) = cas_input_ spec dtss
49.23 val spec = (dI, pI, mI)
49.24 val (pt,_) = Ctree.cappend_problem Ctree.e_ctree [] (Istate_Def.empty, ContextC.empty)
49.25 - ([], Celem.e_spec) ([], Celem.e_spec, hdt, ctxt)
49.26 + ([], Spec.empty_spec) ([], Spec.empty_spec, hdt, ctxt)
49.27 val pt = Ctree.update_spec pt [] spec
49.28 val pt = Ctree.update_pbl pt [] pits
49.29 val pt = Ctree.update_met pt [] mits
49.30 @@ -100,11 +100,11 @@
49.31 TermC.as_string * (*the headline*)
49.32 imodel * (*the model (without Find) of the calc-head*)
49.33 Pos.pos_ * (*model belongs to Pbl or Met*)
49.34 - Celem.spec; (*specification: domID, pblID, metID*)
49.35 -val e_icalhd = (Pos.e_pos', "", [Given [""]], Pos.Pbl, Celem.e_spec)
49.36 + Spec.spec; (*specification: domID, pblID, metID*)
49.37 +val e_icalhd = (Pos.e_pos', "", [Given [""]], Pos.Pbl, Spec.empty_spec)
49.38
49.39 fun is_casinput (hdf : TermC.as_string) ((fmz_, spec) : Selem.fmz) =
49.40 - hdf <> "" andalso fmz_ = [] andalso spec = Celem.e_spec
49.41 + hdf <> "" andalso fmz_ = [] andalso spec = Spec.empty_spec
49.42
49.43 (* re-parse itms with a new thy and prepare for checking with ori list *)
49.44 fun parsitm dI (itm as (i, v, _, f, Model.Cor ((d, ts), _))) =
50.1 --- a/src/Tools/isac/Specify/ptyps.sml Tue Apr 21 12:26:08 2020 +0200
50.2 +++ b/src/Tools/isac/Specify/ptyps.sml Tue Apr 21 15:42:50 2020 +0200
50.3 @@ -5,8 +5,8 @@
50.4
50.5 signature MODEL_SPECIFY =
50.6 sig
50.7 - val hack_until_review_Specify_1: Celem.metID -> Model.itm list -> Model.itm list
50.8 - val hack_until_review_Specify_2: Celem.metID -> Model.itm list -> Model.itm list
50.9 + val hack_until_review_Specify_1: Spec.metID -> Model.itm list -> Model.itm list
50.10 + val hack_until_review_Specify_2: Spec.metID -> Model.itm list -> Model.itm list
50.11
50.12 val get_fun_ids : theory -> (string * typ) list
50.13 type field
50.14 @@ -16,19 +16,19 @@
50.15 val add_field' : theory -> field list -> Model.ori list -> Model.ori list
50.16 val match_itms_oris : theory -> Model.itm list -> field list * term list * Rule_Set.T ->
50.17 Model.ori list -> bool * (Model.itm list * (bool * term) list)
50.18 - val refine_ori : Model.ori list -> Celem.pblID -> Celem.pblID option
50.19 - val refine_ori' : Model.ori list -> Celem.pblID -> Celem.pblID
50.20 - val refine_pbl : theory -> Celem.pblID -> Model.itm list ->
50.21 - (Celem.pblID * (Model.itm list * (bool * term) list)) option
50.22 + val refine_ori : Model.ori list -> Spec.pblID -> Spec.pblID option
50.23 + val refine_ori' : Model.ori list -> Spec.pblID -> Spec.pblID
50.24 + val refine_pbl : theory -> Spec.pblID -> Model.itm list ->
50.25 + (Spec.pblID * (Model.itm list * (bool * term) list)) option
50.26
50.27 val appc : ('a list -> 'b list) -> 'a Model.ppc -> 'b Model.ppc
50.28 val mappc : ('a -> 'b) -> 'a Model.ppc -> 'b Model.ppc
50.29 val itms2itemppc : theory -> Model.itm list -> (bool * term) list -> Model.item Model.ppc (* for generate.sml *)
50.30
50.31 - val get_pbt : Celem.pblID -> Problem.T
50.32 - val get_met : Celem.metID -> Method.T (* for generate.sml *)
50.33 - val get_met' : theory -> Celem.metID -> Method.T (* for pbl-met-hierarchy.sml *)
50.34 - val get_the : Celem.theID -> Celem.thydata (* for inform.sml *)
50.35 + val get_pbt : Spec.pblID -> Problem.T
50.36 + val get_met : Spec.metID -> Method.T (* for generate.sml *)
50.37 + val get_met' : theory -> Spec.metID -> Method.T (* for pbl-met-hierarchy.sml *)
50.38 + val get_the : Thy_Html.theID -> Thy_Html.thydata (* for inform.sml *)
50.39
50.40 type pblRD = string list (* for pbl-met-hierarchy.sml *)
50.41 val format_pblIDl : string list list -> string (* for thy-hierarchy.sml *)
50.42 @@ -36,30 +36,30 @@
50.43 val itm_out : theory -> Model.itm_ -> string
50.44 val dsc_unknown : term
50.45
50.46 - val pblID2guh : Celem.pblID -> Celem.guh (* for datatypes.sml *)
50.47 - val metID2guh : Celem.metID -> Celem.guh (* for datatypes.sml *)
50.48 - val kestoreID2guh : Celem.ketype -> Celem.kestoreID -> Celem.guh (* for datatypes.sml *)
50.49 - val guh2kestoreID : Celem.guh -> string list (* for interface.sml *)
50.50 + val pblID2guh : Spec.pblID -> Check_Unique.guh (* for datatypes.sml *)
50.51 + val metID2guh : Spec.metID -> Check_Unique.guh (* for datatypes.sml *)
50.52 + val kestoreID2guh : Celem.ketype -> Celem.kestoreID -> Check_Unique.guh (* for datatypes.sml *)
50.53 + val guh2kestoreID : Check_Unique.guh -> string list (* for interface.sml *)
50.54 (* for Knowledge/, if below at left margin *)
50.55 - val prep_pbt : theory -> Celem.guh -> string list -> Celem.pblID ->
50.56 - string list * (string * string list) list * Rule_Set.T * string option * Celem.metID list ->
50.57 - Problem.T * Celem.pblID
50.58 - val prep_met : theory -> string -> string list -> Celem.pblID ->
50.59 + val prep_pbt : theory -> Check_Unique.guh -> string list -> Spec.pblID ->
50.60 + string list * (string * string list) list * Rule_Set.T * string option * Spec.metID list ->
50.61 + Problem.T * Spec.pblID
50.62 + val prep_met : theory -> string -> string list -> Spec.pblID ->
50.63 string list * (string * string list) list *
50.64 {calc: 'a, crls: Rule_Set.T, errpats: Error_Fill_Def.errpat list, nrls: Rule_Set.T, prls: Rule_Set.T,
50.65 rew_ord': Rewrite_Ord.rew_ord', rls': Rule_Set.T, srls: Rule_Set.T} * thm ->
50.66 - Method.T * Celem.metID
50.67 + Method.T * Spec.metID
50.68 (* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
50.69 val show_ptyps : unit -> unit
50.70 val show_mets : unit -> unit
50.71 datatype match' = Matches' of Model.item Model.ppc | NoMatch' of Model.item Model.ppc
50.72 val match_pbl : Selem.fmz_ -> Problem.T -> match'
50.73 - val refine : Selem.fmz_ -> Celem.pblID -> Stool.match list
50.74 + val refine : Selem.fmz_ -> Spec.pblID -> Stool.match list
50.75 val e_errpat : Error_Fill_Def.errpat
50.76 val show_pblguhs : unit -> unit
50.77 val sort_pblguhs : unit -> unit
50.78 (*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
50.79 - val add_field : theory -> Celem.pat list -> term * 'b -> string * term * 'b
50.80 + val add_field : theory -> Celem4.pat list -> term * 'b -> string * term * 'b
50.81 val add_variants : ('a * ''b * 'c) list -> (int * ('a * ''b * 'c)) list
50.82 val coll_variants: ('a * ''b) list -> ('a list * ''b) list
50.83 val flattup: 'a * ('b * ('c * 'd * 'e)) -> 'a * 'b * 'c * 'd * 'e
50.84 @@ -282,18 +282,18 @@
50.85
50.86 (* pblID are reverted _on calling_ the retrieve-funs *)
50.87 type pblRD = (*e.g. ["equations","univariate","normalise"] for internal retrieval *)
50.88 - Celem.pblID; (*e.g. ["normalise","univariate","equations"] presented to student *)
50.89 + Spec.pblID; (*e.g. ["normalise","univariate","equations"] presented to student *)
50.90
50.91 (* apply a fun to a ptyps node *)
50.92 -fun app_ptyp x = Celem.app_py (get_ptyps ()) x;
50.93 +fun app_ptyp x = Store.apply (get_ptyps ()) x;
50.94
50.95 (* TODO: generalize search for subthy *)
50.96 -fun get_pbt (pblID: Celem.pblID) = Celem.get_py (get_ptyps ()) pblID (rev pblID)
50.97 +fun get_pbt (pblID: Spec.pblID) =Store.get (get_ptyps ()) pblID (rev pblID)
50.98
50.99 (* TODO: throws exn 'get_pbt not found: ' ... confusing !! take 'ketype' as an argument *)
50.100 -fun get_met metID = Celem.get_py (get_mets ()) metID metID;
50.101 -fun get_met' thy metID = Celem.get_py (KEStore_Elems.get_mets thy) metID metID;
50.102 -fun get_the theID = Celem.get_py (get_thes ()) theID theID;
50.103 +fun get_met metID =Store.get (get_mets ()) metID metID;
50.104 +fun get_met' thy metID =Store.get (KEStore_Elems.get_mets thy) metID metID;
50.105 +fun get_the theID =Store.get (get_thes ()) theID theID;
50.106
50.107 (* lookup a guh in hierarchy of problems / methods depending on fst 4 chars in guh *)
50.108 fun guh2kestoreID guh =
50.109 @@ -686,7 +686,7 @@
50.110 val opt = app_ptyp (refin ((rev o tl) pblID) oris) pblID (rev pblID);
50.111 in case opt of
50.112 SOME pblRD =>
50.113 - let val pblID': Celem.pblID = rev pblRD
50.114 + let val pblID': Spec.pblID = rev pblRD
50.115 in if pblID' = pblID then NONE else SOME pblID' end
50.116 | NONE => NONE
50.117 end;
50.118 @@ -718,13 +718,19 @@
50.119 error ("kestoreID2guh: \"" ^ Celem.ketype2str ketype ^ "\" not for \"" ^ strs2str' kestoreID ^ "\"");
50.120
50.121 fun show_pblguhs () = (* for tests *)
50.122 - (tracing o strs2str o (map Celem.linefeed)) (Celem.coll_pblguhs (get_ptyps ()))
50.123 + (tracing o strs2str o (map Celem.linefeed))
50.124 + (Check_Unique.collect (#guh : Probl_Def.T -> Check_Unique.guh) (get_ptyps ()))
50.125 fun sort_pblguhs () = (* for tests *)
50.126 - (tracing o strs2str o (map Celem.linefeed)) (((sort string_ord) o Celem.coll_pblguhs) (get_ptyps ()))
50.127 + (tracing o strs2str o (map Celem.linefeed))
50.128 + (((sort string_ord) o (Check_Unique.collect (#guh : Probl_Def.T -> Check_Unique.guh)))
50.129 + (get_ptyps ()))
50.130
50.131 fun show_metguhs () = (* for tests *)
50.132 - (tracing o strs2str o (map Celem.linefeed)) (Celem.coll_metguhs (get_mets ()))
50.133 + (tracing o strs2str o (map Celem.linefeed))
50.134 + (Check_Unique.collect (#guh : Meth_Def.T -> Check_Unique.guh) (get_mets ()))
50.135 fun sort_metguhs () = (* for tests *)
50.136 - (tracing o strs2str o (map Celem.linefeed)) (((sort string_ord) o Celem.coll_metguhs) (get_mets ()))
50.137 + (tracing o strs2str o (map Celem.linefeed))
50.138 + (((sort string_ord) o (Check_Unique.collect (#guh : Meth_Def.T -> Check_Unique.guh)))
50.139 + (get_mets ()))
50.140
50.141 end
51.1 --- a/src/Tools/isac/Specify/specify.sml Tue Apr 21 12:26:08 2020 +0200
51.2 +++ b/src/Tools/isac/Specify/specify.sml Tue Apr 21 15:42:50 2020 +0200
51.3 @@ -33,8 +33,8 @@
51.4 | _ => ("ok", (Pbl, Tactic.Model_Problem))
51.5 else
51.6 let
51.7 - val cpI = if pI = Celem.e_pblID then pI' else pI;
51.8 - val cmI = if mI = Celem.e_metID then mI' else mI;
51.9 + val cpI = if pI = Spec.e_pblID then pI' else pI;
51.10 + val cmI = if mI = Spec.e_metID then mI' else mI;
51.11 val {ppc = pbt, prls, where_, ...} = Specify.get_pbt cpI;
51.12 val pre = Stool.check_preconds "thy 100820" prls where_ pbl;
51.13 val preok = foldl and_ (true, map fst pre);
51.14 @@ -44,7 +44,7 @@
51.15 case p_ of
51.16 Pbl =>
51.17 (if dI' = ThyC.id_empty andalso dI = ThyC.id_empty then ("dummy", (Pbl, Tactic.Specify_Theory dI'))
51.18 - else if pI' = Celem.e_pblID andalso pI = Celem.e_pblID then ("dummy", (Pbl, Tactic.Specify_Problem pI'))
51.19 + else if pI' = Spec.e_pblID andalso pI = Spec.e_pblID then ("dummy", (Pbl, Tactic.Specify_Problem pI'))
51.20 else
51.21 case find_first (is_error o #5) pbl of
51.22 SOME (_, _, _, fd, itm_) =>
51.23 @@ -55,8 +55,8 @@
51.24 | NONE => (*pbl-items complete*)
51.25 if not preok then ("dummy", (Pbl, Tactic.Refine_Problem pI'))
51.26 else if dI = ThyC.id_empty then ("dummy", (Pbl, Tactic.Specify_Theory dI'))
51.27 - else if pI = Celem.e_pblID then ("dummy", (Pbl, Tactic.Specify_Problem pI'))
51.28 - else if mI = Celem.e_metID then ("dummy", (Pbl, Tactic.Specify_Method mI'))
51.29 + else if pI = Spec.e_pblID then ("dummy", (Pbl, Tactic.Specify_Problem pI'))
51.30 + else if mI = Spec.e_metID then ("dummy", (Pbl, Tactic.Specify_Method mI'))
51.31 else
51.32 case find_first (is_error o #5) met of
51.33 SOME (_, _, _, fd, itm_) => ("dummy", (Met, mk_delete (ThyC.get_theory dI) fd itm_))
51.34 @@ -72,7 +72,7 @@
51.35 SOME (fd,ct') => ("dummy", (Met, mk_additem fd ct'))
51.36 | NONE =>
51.37 (if dI = ThyC.id_empty then ("dummy", (Met, Tactic.Specify_Theory dI'))
51.38 - else if pI = Celem.e_pblID then ("dummy", (Met, Tactic.Specify_Problem pI'))
51.39 + else if pI = Spec.e_pblID then ("dummy", (Met, Tactic.Specify_Problem pI'))
51.40 else if not preok then ("dummy", (Met, Tactic.Specify_Method mI))
51.41 else ("dummy", (Met, Tactic.Apply_Method mI))))
51.42 | p_ => raise ERROR ("Specify.find_next_step called with " ^ Pos.pos_2str p_)
51.43 @@ -109,7 +109,7 @@
51.44 else (* new example, pepare for interactive modeling *)
51.45 let
51.46 val (pt, _) = cappend_problem e_ctree [] (Istate_Def.empty, ContextC.empty)
51.47 - ([], Celem.e_spec) ([], Celem.e_spec, TermC.empty, ContextC.empty)
51.48 + ([], Spec.empty_spec) ([], Spec.empty_spec, TermC.empty, ContextC.empty)
51.49 in ((pt, ([], Pbl)), []) end
51.50 | nxt_specify_init_calc (fmz, (dI, pI, mI)) =
51.51 let (* both """"""""""""""""""""""""" either empty or complete *)
52.1 --- a/src/Tools/isac/Specify/step-specify.sml Tue Apr 21 12:26:08 2020 +0200
52.2 +++ b/src/Tools/isac/Specify/step-specify.sml Tue Apr 21 15:42:50 2020 +0200
52.3 @@ -60,7 +60,7 @@
52.4 let
52.5 val {met, ...} = Specify.get_pbt pI'
52.6 (*val pt = update_pbl pt p pbl ..done by Model_Problem*)
52.7 - val mI = if length met = 0 then Celem.e_metID else hd met
52.8 + val mI = if length met = 0 then Spec.e_metID else hd met
52.9 val thy = ThyC.get_theory dI
52.10 val (pos, c, _, pt) =
52.11 Generate.generate1 (Tactic.Refine_Tacitly' (pI, pI', dI, mI,(*pbl*)[])) (Istate_Def.Uistate, ctxt) (pt, pos)
52.12 @@ -96,7 +96,7 @@
52.13 val thy = ThyC.get_theory (if dI' = ThyC.id_empty then dI else dI');
52.14 val {ppc,where_,prls,...} = Specify.get_pbt pI
52.15 val pbl =
52.16 - if pI' = Celem.e_pblID andalso pI = Celem.e_pblID
52.17 + if pI' = Spec.e_pblID andalso pI = Spec.e_pblID
52.18 then (false, (Generate.init_pbl ppc, []))
52.19 else Specify.match_itms_oris thy probl (ppc,where_,prls) oris
52.20 (*FIXXXME~~~~~~~~~~~~~~~: take pbl and compare with new pI WN.8.03*)
52.21 @@ -151,7 +151,7 @@
52.22 let (* either """"""""""""""" all empty or complete *)
52.23 val thy = ThyC.get_theory dI'
52.24 val (oris, ctxt) =
52.25 - if dI' = ThyC.id_empty orelse pI' = Celem.e_pblID (*andalso? WN110511*)
52.26 + if dI' = ThyC.id_empty orelse pI' = Spec.e_pblID (*andalso? WN110511*)
52.27 then ([], ContextC.empty)
52.28 else pI' |> #ppc o Specify.get_pbt |> Specify.prep_ori fmz thy
52.29 (* these are deprecated vvvvvvvvvvvvvvvvvvvvvvvvvv*)
52.30 @@ -189,7 +189,7 @@
52.31 PblObj {origin= (_, (dI', _, _), _), ctxt, ...} => (dI', ctxt)
52.32 | _ => error "Step_Solve.by_tactic (Refine_Tacitly': uncovered case get_obj"*)
52.33 val {met, thy,...} = Specify.get_pbt pIre
52.34 - val (domID, metID) = (Context.theory_name thy, if length met = 0 then Celem.e_metID else hd met)
52.35 + val (domID, metID) = (Context.theory_name thy, if length met = 0 then Spec.e_metID else hd met)
52.36 val ((p,_), _, _, pt) =
52.37 Generate.generate1 (Tactic.Refine_Tacitly' (pI, pIre, domID, metID, [(*pbl*)]))
52.38 (Istate_Def.Uistate, ContextC.empty) (pt, pos)
52.39 @@ -251,9 +251,9 @@
52.40 (oris, dI', pI', mI', dI, pI, mI, pbl, met, ctxt)
52.41 | _ => error "Step_Solve.by_tactic (Specify_Theory': uncovered case get_obj"
52.42 val _ = case p_ of Met => met | _ => pbl
52.43 - val cpI = if pI = Celem.e_pblID then pI' else pI
52.44 + val cpI = if pI = Spec.e_pblID then pI' else pI
52.45 val {prls = per, ppc, where_ = pwh, ...} = Specify.get_pbt cpI
52.46 - val cmI = if mI = Celem.e_metID then mI' else mI
52.47 + val cmI = if mI = Spec.e_metID then mI' else mI
52.48 val {prls = mer, ppc = mpc, pre= mwh, ...} = Specify.get_met cmI
52.49 val pre = case p_ of
52.50 Met => (Stool.check_preconds thy mer mwh met)
52.51 @@ -307,7 +307,7 @@
52.52 else (* new example, pepare for interactive modeling *)
52.53 let
52.54 val (pt, _) = cappend_problem e_ctree [] (Istate_Def.empty, ContextC.empty)
52.55 - ([], Celem.e_spec) ([], Celem.e_spec, TermC.empty, ContextC.empty)
52.56 + ([], Spec.empty_spec) ([], Spec.empty_spec, TermC.empty, ContextC.empty)
52.57 in ((pt, ([], Pbl)), []) end
52.58 | nxt_specify_init_calc (fmz, (dI, pI, mI)) =
52.59 let (* both """"""""""""""""""""""""" either empty or complete *)
53.1 --- a/src/Tools/isac/TODO.thy Tue Apr 21 12:26:08 2020 +0200
53.2 +++ b/src/Tools/isac/TODO.thy Tue Apr 21 15:42:50 2020 +0200
53.3 @@ -168,7 +168,7 @@
53.4 \end{itemize}
53.5 \item xxx
53.6 \item unify in signature LANGUAGE_TOOLS =\\
53.7 - val pblterm: ThyC.id -> Celem.pblID -> term vvv vvv\\
53.8 + val pblterm: ThyC.id -> Spec.pblID -> term vvv vvv\\
53.9 val subpbl: string -> string list -> term unify with ^^^
53.10 \item xxx
53.11 \item Telem.safe is questionable: has it been replaced by Safe_Step, Not_Derivable, Helpless, etc?
54.1 --- a/test/Tools/isac/BaseDefinitions/calcelems.sml Tue Apr 21 12:26:08 2020 +0200
54.2 +++ b/test/Tools/isac/BaseDefinitions/calcelems.sml Tue Apr 21 15:42:50 2020 +0200
54.3 @@ -133,7 +133,7 @@
54.4 (*update_ptyps ID ID 99999 pty; ERROR update_ptyps: [aaa] does not exist*)
54.5
54.6 val ID = ["ccc"];
54.7 -if update_ptyps ID ID 99999 pty =
54.8 +if Store.update ID ID 99999 pty =
54.9 [Store.Node ("aaa", [1], [Store.Node ("aaa-1", [11], [])]),
54.10 Store.Node ("bbb", [2], [Store.Node ("bbb-1", [21], []),
54.11 Store.Node ("bbb-2", [22], [Store.Node ("bbb-21", [221], []), Store.Node ("bbb-22", [222], [])])]),
54.12 @@ -144,7 +144,7 @@
54.13 (*update_ptyps ID ID 99999 pty; ERROR update_ptyps: [aaa] has descendants*)
54.14
54.15 val ID = ["bbb", "bbb-2", "bbb-21"];
54.16 -if update_ptyps ID ID 99999 pty =
54.17 +if Store.update ID ID 99999 pty =
54.18 [Store.Node ("aaa", [1], [Store.Node ("aaa-1", [11], [])]),
54.19 Store.Node ("bbb", [2], [Store.Node ("bbb-1", [21], []), Store.Node ("bbb-2", [22],
54.20 [Store.Node ("bbb-21", [99999], []), Store.Node ("bbb-22", [222], [])])]),
54.21 @@ -152,7 +152,7 @@
54.22 then () else error "update_ptyps has changed 2";
54.23
54.24 val ID = ["bbb", "bbb-2", "bbb-22"];
54.25 -if update_ptyps ID ID 99999 pty =
54.26 +if Store.update ID ID 99999 pty =
54.27 [Store.Node ("aaa", [1], [Store.Node ("aaa-1", [11], [])]),
54.28 Store.Node ("bbb", [2], [Store.Node ("bbb-1", [21], []),
54.29 Store.Node ("bbb-2", [22], [Store.Node ("bbb-21", [221], []), Store.Node ("bbb-22", [99999], [])])]),
55.1 --- a/test/Tools/isac/BaseDefinitions/check-unique.sml Tue Apr 21 12:26:08 2020 +0200
55.2 +++ b/test/Tools/isac/BaseDefinitions/check-unique.sml Tue Apr 21 15:42:50 2020 +0200
55.3 @@ -18,15 +18,15 @@
55.4 (*------- auxiliary format for fn*)
55.5 fun pbl_select_guh pbt =
55.6 let
55.7 - val {guh, ...} = (**)(pbt: pbt)(** )(pbt: met)( **)
55.8 + val {guh, ...} = (**)(pbt: Problem.T)(** )(pbt: met)( **)
55.9 in guh end;
55.10 -pbl_select_guh: pbt -> guh;(**)
55.11 +pbl_select_guh: Problem.T -> Check_Unique.guh;(**)
55.12
55.13 fun met_select_guh pbt =
55.14 let
55.15 - val {guh, ...} = (pbt: met)
55.16 + val {guh, ...} = (pbt: Method.T)
55.17 in guh end;
55.18 -met_select_guh: met -> guh;(**)
55.19 +met_select_guh: Method.T -> Check_Unique.guh;(**)
55.20
55.21 (*------- hint: build higher order functions be replacing the selector by a variable argument *)
55.22 (* collect*)
55.23 @@ -39,8 +39,8 @@
55.24 in nodes [] pbls end;
55.25
55.26 collect: ('a -> 'b) -> 'a Store.T -> 'b list;
55.27 -collect pbl_select_guh: pbt Store.T -> guh list;
55.28 -collect met_select_guh: met Store.T -> guh list;
55.29 +collect pbl_select_guh: Problem.T Store.T -> Check_Unique.guh list;
55.30 +collect met_select_guh: Method.T Store.T -> Check_Unique.guh list;
55.31
55.32 fun message select store guh =
55.33 if member op = (select store) guh
55.34 @@ -49,16 +49,16 @@
55.35 "consider setting \"Check_Unique.on := false\"")
55.36 else ();
55.37
55.38 - message: ('a -> guh list ) -> 'a -> guh -> unit;
55.39 -(message (collect pbl_select_guh)): pbt Store.T -> guh -> unit;
55.40 -(message (collect met_select_guh)): met Store.T -> guh -> unit;
55.41 + message: ('a -> Check_Unique.guh list ) -> 'a -> Check_Unique.guh -> unit;
55.42 +(message (collect pbl_select_guh)): Problem.T Store.T -> Check_Unique.guh -> unit;
55.43 +(message (collect met_select_guh)): Method.T Store.T -> Check_Unique.guh -> unit;
55.44
55.45 -(Check_Unique.collect (#guh : Probl_Def.T -> Check_Unique.guh)): pbt Store.T -> guh list;
55.46 -(Check_Unique.collect (#guh : Meth_Def.T -> Check_Unique.guh)): met Store.T -> guh list;
55.47 +(Check_Unique.collect (#guh : Probl_Def.T -> Check_Unique.guh)): Problem.T Store.T -> Check_Unique.guh list;
55.48 +(Check_Unique.collect (#guh : Meth_Def.T -> Check_Unique.guh)): Method.T Store.T -> Check_Unique.guh list;
55.49
55.50 val check_pblguh_unique = message (Check_Unique.collect (#guh : Probl_Def.T -> Check_Unique.guh));
55.51 -check_pblguh_unique: pbt Store.T -> guh -> unit
55.52 +check_pblguh_unique: Problem.T Store.T -> Check_Unique.guh -> unit
55.53 ;
55.54 val check_metguh_unique = message (Check_Unique.collect (#guh : Meth_Def.T -> Check_Unique.guh));
55.55 -check_metguh_unique: met Store.T -> guh -> unit
55.56 +check_metguh_unique: Meth_Def.T Store.T -> Check_Unique.guh -> unit
55.57 ;
55.58 \ No newline at end of file
56.1 --- a/test/Tools/isac/BaseDefinitions/termC.sml Tue Apr 21 12:26:08 2020 +0200
56.2 +++ b/test/Tools/isac/BaseDefinitions/termC.sml Tue Apr 21 15:42:50 2020 +0200
56.3 @@ -187,7 +187,7 @@
56.4 "\<not> ?bdv occurs_in ?a \<Longrightarrow>\n(?a + ?bdv = 0) = (?bdv = -1 * ?a)"
56.5 then ()
56.6 else error "termC.sml d1_isolate_add2";
56.7 - val subst = [(str2term "bdv", str2term "x")];
56.8 + val subst = [(TermC.str2term "bdv", TermC.str2term "x")];
56.9 val t = (norm o #prop o Thm.rep_thm) (ThmC.numerals_to_Free @{thm d1_isolate_add2});
56.10 val t' = inst_bdv subst t;
56.11 if UnparseC.term t' = "\<not> x occurs_in ?a \<Longrightarrow> (?a + x = 0) = (x = -1 * ?a)"
57.1 --- a/test/Tools/isac/BridgeLibisabelle/datatypes.sml Tue Apr 21 12:26:08 2020 +0200
57.2 +++ b/test/Tools/isac/BridgeLibisabelle/datatypes.sml Tue Apr 21 15:42:50 2020 +0200
57.3 @@ -85,7 +85,7 @@
57.4 Iterator 1;
57.5 moveActiveRoot 1; autoCalculate 1 CompleteCalc;
57.6 refineProblem 1 ([1],Res) "pbl_equ_univ";
57.7 -"~~~~~ fun refineProblem, args:"; val (cI, ((p,p_) : pos'), (guh : guh)) =
57.8 +"~~~~~ fun refineProblem, args:"; val (cI, ((p,p_) : pos'), (guh : Check_Unique.guh)) =
57.9 (1, ([1],Res), "pbl_equ_univ");
57.10 val pblID = guh2kestoreID guh
57.11 val ((pt,_),_) = get_calc cI
57.12 @@ -264,14 +264,14 @@
57.13 Model_Problem: Tactic.input;
57.14 Or_to_List: Tactic.input;
57.15
57.16 -Apply_Method: metID -> Tactic.input;
57.17 -Refine_Tacitly: pblID -> Tactic.input;
57.18 -Specify_Problem: pblID -> Tactic.input;
57.19 -Specify_Method: metID -> Tactic.input;
57.20 +Apply_Method: Spec.metID -> Tactic.input;
57.21 +Refine_Tacitly: Spec.pblID -> Tactic.input;
57.22 +Specify_Problem: Spec.pblID -> Tactic.input;
57.23 +Specify_Method: Spec.metID -> Tactic.input;
57.24 Substitute: sube -> Tactic.input;; (* Substitute: sube -> tac; e_sube: TermC.as_string list; UNCLEAR HOW TO INPUT *)
57.25 -Check_Postcond: pblID -> Tactic.input;
57.26 +Check_Postcond: Spec.pblID -> Tactic.input;
57.27
57.28 -Apply_Method: metID -> Tactic.input;
57.29 +Apply_Method: Spec.metID -> Tactic.input;
57.30 val tac = Apply_Method(["test", "equation", "simplify"]);
57.31 xml_of_tac tac;(*
57.32 <STRINGLISTTACTIC name="Apply_Method">
58.1 --- a/test/Tools/isac/BridgeLibisabelle/pbl-met-hierarchy.sml Tue Apr 21 12:26:08 2020 +0200
58.2 +++ b/test/Tools/isac/BridgeLibisabelle/pbl-met-hierarchy.sml Tue Apr 21 15:42:50 2020 +0200
58.3 @@ -127,12 +127,12 @@
58.4 "~~~~~ fun node, args:"; val (pa:filepath, ids, po, wfn, Store.Node (id,[n],ns)) = (pa, ids, po, wfn, n);
58.5 val po' = lev_on po;
58.6 wfn (*= pbl2file*)
58.7 -"~~~~~ fun pbl2file, args:"; val ((path:filepath), (pos:pos), (id:metID), (pbl as {guh,...})) =
58.8 +"~~~~~ fun pbl2file, args:"; val ((path:filepath), (pos:pos), (id: Spec.metID), (pbl as {guh,...})) =
58.9 (pa, po', (ids@[id]), n);
58.10 strs2str id = "[\"e_pblID\"]"; (*true*)
58.11 pos2str pos = "[1]"; (*true*)
58.12 path ^ guh2filename guh = "/tmp/pbl/pbl_empty.xml"; (*true*)
58.13 -"~~~~~ fun pbl2xml, args:"; val (id: pblID, {guh,mathauthors,init,cas,met,ppc,prls,thy,where_}) =
58.14 +"~~~~~ fun pbl2xml, args:"; val (id: Spec.pblID, {guh,mathauthors,init,cas,met,ppc,prls,thy,where_}) =
58.15 (id, pbl);
58.16 "~~~~~ fun pbl2term, args:"; val (thy, (pblRD:pblRD)) = (thy, id);
58.17 if ("Problem (" ^ Context.theory_name thy ^ "', " ^ (strs2str' o rev) pblRD ^ ")") =
59.1 --- a/test/Tools/isac/BridgeLibisabelle/thy-hierarchy.sml Tue Apr 21 12:26:08 2020 +0200
59.2 +++ b/test/Tools/isac/BridgeLibisabelle/thy-hierarchy.sml Tue Apr 21 15:42:50 2020 +0200
59.3 @@ -74,7 +74,7 @@
59.4 thydata2xml (theID, thydata) (*reported Exception- Match in question*);
59.5 val i = 2;
59.6 ;
59.7 -val (theID:theID, Hrls {guh, coursedesign, mathauthors, thy_rls}) = (theID, thydata);
59.8 +val (theID: Thy_Html.theID, Thy_Html.Hrls {guh, coursedesign, mathauthors, thy_rls}) = (theID, thydata);
59.9 rls2xml i thy_rls (*reported Exception- Match in question*);
59.10 ;
59.11 val (j, (thyID, Rule_Set.Sequence data)) = (i, thy_rls);
59.12 @@ -90,7 +90,7 @@
59.13 "----------- search for data error in thes2file ------------------";
59.14 "----------- search for data error in thes2file ------------------";
59.15 val TESTdump = Unsynchronized.ref
59.16 - ("path": filepath, ["ids"]: theID, []: pos, thydata2file, Store.Node ("xxx", [], []): thydata Store.node);
59.17 + ("path": filepath, ["ids"]: Thy_Html.theID, []: pos, thydata2file, Store.Node ("xxx", [], []): Thy_Html.thydata Store.node);
59.18
59.19 fun TESTthenode (pa:filepath) ids po wfn (Store.Node (id, [n], ns)) TESTids =
59.20 let val po' = lev_on po
59.21 @@ -122,10 +122,10 @@
59.22 (* /----- uncomment in case of "data error in thes2file" ----------------------------(*1*)-----\*)
59.23 val (pa, ids, po', wfn, (Store.Node (id, [n], ns))) = ! TESTdump;
59.24 ;
59.25 -"~~~~~ fun thydata2file, args:"; val ((xmldata:filepath), (pos:pos), (theID:theID), thydata) =
59.26 +"~~~~~ fun thydata2file, args:"; val ((xmldata:filepath), (pos:pos), (theID:Thy_Html.theID), thydata) =
59.27 (pa, po', (ids@[id]), n);
59.28 -"~~~~~ fun thydata2xml, args:"; val (theID, Hrls {guh, coursedesign, mathauthors, thy_rls}) =
59.29 - (theID:theID, thydata);
59.30 +"~~~~~ fun thydata2xml, args:"; val (theID, Thy_Html.Hrls {guh, coursedesign, mathauthors, thy_rls}) =
59.31 + (theID:Thy_Html.theID, thydata);
59.32 "~~~~~ fun rls2xml, args:"; val (j, (thyID, Rule_Set.Sequence data)) = (i, thy_rls);
59.33 "~~~~~ fun rls2xm, args:"; val (j, (thyID, seqrls, {id, preconds, rew_ord=(ord,_), erls,
59.34 srls, calc, errpatts, rules, scr})) = (j, (thyID, "Rule_Set.Sequence", data));
59.35 @@ -147,11 +147,11 @@
59.36 "----------- fun ThmC_Def.make_thm ------------------------------------";
59.37 "----------- fun ThmC_Def.make_thm ------------------------------------";
59.38 "----------- fun ThmC_Def.make_thm ------------------------------------";
59.39 -"~~~~~ fun ThmC_Def.make_thm, args:"; val (thy, part, (thmID : ThmC.id, thm), (mathauthors : authors)) =
59.40 +"~~~~~ fun ThmC_Def.make_thm, args:"; val (thy, part, (thmID : ThmC.id, thm), (mathauthors : Thy_Html.authors)) =
59.41 (@{theory "Biegelinie"}, "IsacKnowledge",
59.42 ("Belastung_Querkraft", Thm.prop_of @{thm Belastung_Querkraft}),
59.43 ["Walther Neuper 2005 supported by a grant from NMI Austria"]);
59.44 - val guh = thm2guh (part, Context.theory_name thy) thmID
59.45 + val guh = Thy_Html.thm2guh (part, Context.theory_name thy) thmID
59.46 val theID = guh2theID guh;
59.47 if guh = "thy_isac_Biegelinie-thm-Belastung_Querkraft" andalso
59.48 theID = ["IsacKnowledge", "Biegelinie", "Theorems", "Belastung_Querkraft"]
59.49 @@ -298,39 +298,39 @@
59.50 ;
59.51 case thydata_list of (*length = 8*)
59.52 [(["IsacKnowledge", "Test_Build_Thydata", "Theorems", "thm111"],
59.53 - Hthm {coursedesign = [], fillpats = [], guh = "thy_isac_Test_Build_Thydata-thm-thm111",
59.54 + Thy_Html.Hthm {coursedesign = [], fillpats = [], guh = "thy_isac_Test_Build_Thydata-thm-thm111",
59.55 mathauthors = ["isac-team"], thm = _}),
59.56 (["IsacKnowledge", "Test_Build_Thydata", "Theorems", "thm222"],
59.57 - Hthm {coursedesign = [], fillpats = [], guh = "thy_isac_Test_Build_Thydata-thm-thm222",
59.58 + Thy_Html.Hthm {coursedesign = [], fillpats = [], guh = "thy_isac_Test_Build_Thydata-thm-thm222",
59.59 mathauthors = ["isac-team"], thm = _}),
59.60 (["IsacKnowledge", "Test_Build_Thydata", "Rulesets", "rls111"],
59.61 - Hrls {coursedesign = [], guh = "thy_isac_Test_Build_Thydata-rls-rls111",
59.62 + Thy_Html.Hrls {coursedesign = [], guh = "thy_isac_Test_Build_Thydata-rls-rls111",
59.63 mathauthors = ["isac-team"], thy_rls = ("Test_Build_Thydata", Rule_Set.Repeat _)}),
59.64 (["IsacKnowledge", "Test_Build_Thydata", "Rulesets", "rls222"],
59.65 - Hrls {coursedesign = [], guh = "thy_isac_Test_Build_Thydata-rls-rls222",
59.66 + Thy_Html.Hrls {coursedesign = [], guh = "thy_isac_Test_Build_Thydata-rls-rls222",
59.67 mathauthors = ["isac-team"], thy_rls = ("Test_Build_Thydata", Rule_Set.Repeat _)}),
59.68 (["Isabelle", "HOL", "Theorems", "refl"],
59.69 - Hthm {coursedesign = [], fillpats = [], guh = "thy_isab_HOL-thm-refl",
59.70 + Thy_Html.Hthm {coursedesign = [], fillpats = [], guh = "thy_isab_HOL-thm-refl",
59.71 mathauthors = ["Isabelle team, TU Munich"], thm = _}),
59.72 - (["Isabelle", "Fun", "Theorems", "o_def"], Hthm {coursedesign = [], fillpats = [],
59.73 + (["Isabelle", "Fun", "Theorems", "o_def"], Thy_Html.Hthm {coursedesign = [], fillpats = [],
59.74 guh = "thy_isab_Fun-thm-o_def", mathauthors = ["Isabelle team, TU Munich"], thm = _}),
59.75 (["IsacScripts", "Test_Build_Thydata", "Theorems", "thm111"],
59.76 - Hthm {coursedesign = [], fillpats = [], guh = "thy_scri_Test_Build_Thydata-thm-thm111",
59.77 + Thy_Html.Hthm {coursedesign = [], fillpats = [], guh = "thy_scri_Test_Build_Thydata-thm-thm111",
59.78 mathauthors = ["isac-team"], thm = _}),
59.79 (["IsacScripts", "Test_Build_Thydata", "Theorems", "thm222"],
59.80 - Hthm {coursedesign = [], fillpats = [], guh = "thy_scri_Test_Build_Thydata-thm-thm222",
59.81 + Thy_Html.Hthm {coursedesign = [], fillpats = [], guh = "thy_scri_Test_Build_Thydata-thm-thm222",
59.82 mathauthors = ["isac-team"], thm = _})] => ()
59.83 | _ => error "collect thydata from Test_Build_Thydata changed";
59.84 ;
59.85 (* we store locally on MINIthehier instead on Know_Store, see Know_Store: *)
59.86 - fun add_the (thydata, theID) = add_thydata ([], theID) thydata;
59.87 + fun add_the (thydata, theID) = Thy_Html.add_thydata ([], theID) thydata;
59.88 val thes = map (fn (a, b) => (b, a)) thydata_list
59.89 val MINIthehier = (fold add_the thes) (KEStore_Elems.get_thes @{theory Test_Build_Thydata});
59.90
59.91 "----------- ..CONTINUED: we adapt some required MINIfunctions ---";
59.92 "----------- ..CONTINUED: we adapt some required MINIfunctions ---";
59.93 "----------- ..CONTINUED: we adapt some required MINIfunctions ---";
59.94 -fun MINIget_the (theID : theID) = get_py MINIthehier theID theID (*see ptyps.sml*)
59.95 +fun MINIget_the (theID : Thy_Html.theID) = Store.get MINIthehier theID theID (*see ptyps.sml*)
59.96 fun MINIthy_hierarchy2file (path:filepath) =
59.97 str2file (path ^ "thy_hierarchy.xml")
59.98 ("<NODE>\n" ^
59.99 @@ -345,7 +345,7 @@
59.100 "----------- ..CONTINUED: xml from Test_Build_Thydata.thy --------";
59.101 "----------- ..CONTINUED: xml from Test_Build_Thydata.thy --------";
59.102 case MINIget_the ["IsacScripts", "Test_Build_Thydata", "Theorems", "thm111"] of
59.103 - Hthm {guh = "thy_scri_Test_Build_Thydata-thm-thm111", ...} => ()
59.104 + Thy_Html.Hthm {guh = "thy_scri_Test_Build_Thydata-thm-thm111", ...} => ()
59.105 | _ => error "MINIget_the thm111 changed"
59.106 ;
59.107 val path = "/tmp/"
59.108 @@ -369,12 +369,12 @@
59.109 (* we take (theID, thydata) from thydata_list ABOVE: *)
59.110 case hd thydata_list of
59.111 (["IsacKnowledge", "Test_Build_Thydata", "Theorems", "thm111"],
59.112 - Hthm {guh = "thy_isac_Test_Build_Thydata-thm-thm111", mathauthors = ["isac-team"], ...}) => ()
59.113 + Thy_Html.Hthm {guh = "thy_isac_Test_Build_Thydata-thm-thm111", mathauthors = ["isac-team"], ...}) => ()
59.114 | _ => error "a change inhibits successful continuation of this test";
59.115 val (theID, thydata) = hd thydata_list;
59.116 -"~~~~~ fun thydata2file, args:"; val ((path : filepath), (pos : pos), (theID : theID), thydata) =
59.117 +"~~~~~ fun thydata2file, args:"; val ((path : filepath), (pos : pos), (theID : Thy_Html.theID), thydata) =
59.118 (pa, po', (*ids @ [id]*)theID, (*n*)thydata);
59.119 -"~~~~~ fun thydata2xml, args:"; val ((theID, Hthm {guh, coursedesign, mathauthors, fillpats, thm}))=
59.120 +"~~~~~ fun thydata2xml, args:"; val ((theID, Thy_Html.Hthm {guh, coursedesign, mathauthors, fillpats, thm}))=
59.121 ((theID, thydata));
59.122 "~~~~~ to str2file return val:"; val (xml) =
59.123 "<THEOREMDATA>\n" ^
60.1 --- a/test/Tools/isac/BridgeLibisabelle/use-cases.sml Tue Apr 21 12:26:08 2020 +0200
60.2 +++ b/test/Tools/isac/BridgeLibisabelle/use-cases.sml Tue Apr 21 15:42:50 2020 +0200
60.3 @@ -195,7 +195,7 @@
60.4
60.5 Step_Solve.by_tactic m (pt, p);
60.6 "~~~~~ fun by_tactic , args:"; val (m, (pt, po as (p, p_))) = (m, (pt, p));
60.7 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p); (*else*)
60.8 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p); (*else*)
60.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
60.10 val (is, sc) = LItool.resume_prog thy' (p,p_) pt;
60.11 val Safe_Step (istate, _, tac) =
60.12 @@ -987,7 +987,7 @@
60.13 Relate ["relations"]],
60.14 (*input (Arbfix will dissappear soon)*)
60.15 Pbl (*belongsto*),
60.16 - e_spec (*no input to the specification*));
60.17 + Spec.e_spec (*no input to the specification*));
60.18
60.19 (*the user does not know, what 'superfluous' for 'maximum b' may mean
60.20 and asks what to do next*)
60.21 @@ -1001,7 +1001,7 @@
60.22 [Given ["fixedValues [r=Arbfix]"],
60.23 Find ["maximum A", "valuesFor [a,b]"(*new input*)],
60.24 Relate ["relations [A=a*b, \
60.25 - \(a/2)^2 + (b/2)^2 = r^2]"]], Pbl, e_spec);
60.26 + \(a/2)^2 + (b/2)^2 = r^2]"]], Pbl, Spec.e_spec);
60.27
60.28 (*specification is not interesting and should be skipped by the dialogguide;
60.29 !!!!!!!!!!!!!!!!!!!! input of ONE part at a time !!!!!!!!!!!!!!!!!!!!!!*)
61.1 --- a/test/Tools/isac/Interpret/li-tool.sml Tue Apr 21 12:26:08 2020 +0200
61.2 +++ b/test/Tools/isac/Interpret/li-tool.sml Tue Apr 21 15:42:50 2020 +0200
61.3 @@ -71,7 +71,7 @@
61.4 "~~~~~ fun Step_Solve.by_tactic , args:"; val (m, (pt, po as (p,p_))) = (m, (pt, pos));
61.5 (*solve has still p_!!!!!!!!!!!!!!!!!!!!!!!!!*)
61.6
61.7 -e_metID = get_obj g_metID pt (par_pblobj pt p); (*false*)
61.8 +Spec.e_metID = get_obj g_metID pt (par_pblobj pt p); (*false*)
61.9 val ctxt = get_ctxt pt po;
61.10
61.11 (*generate1 m (Istate.empty, ctxt) (p,p_) pt;
61.12 @@ -203,7 +203,7 @@
61.13 val thy = ThyC.get_theory thy'
61.14 val metID = get_obj g_metID pt pp
61.15 val metID' =
61.16 - if metID = e_metID
61.17 + if metID = Spec.e_metID
61.18 then (thd3 o snd3) (get_obj g_origin pt pp)
61.19 else metID
61.20 val {scr=Prog sc,srls,erls,rew_ord'=ro,...} = get_met metID'
62.1 --- a/test/Tools/isac/Interpret/lucas-interpreter.sml Tue Apr 21 12:26:08 2020 +0200
62.2 +++ b/test/Tools/isac/Interpret/lucas-interpreter.sml Tue Apr 21 15:42:50 2020 +0200
62.3 @@ -118,7 +118,7 @@
62.4 Step_Solve.by_tactic m ptp;
62.5 "~~~~~ fun by_tactic , args:"; val (m, (pt, po as (p, p_))) = (m, ptp);
62.6 (*+*)val (pt'''''_', (p'''''_', p_'''''_')) = (pt, (p, p_));
62.7 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p); (*else*)
62.8 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p); (*else*)
62.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
62.10 val (is, sc) = LItool.resume_prog thy' (p,p_) pt;
62.11
62.12 @@ -272,7 +272,7 @@
62.13
62.14 Step_Solve.by_tactic m (pt, p);
62.15 "~~~~~ fun by_tactic , args:"; val (m, (pt, po as (p, p_))) = (m, (pt, p));
62.16 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
62.17 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
62.18 val thy' = get_obj g_domID pt (par_pblobj pt p);
62.19 val (is, sc) = LItool.resume_prog thy' (p,p_) pt;
62.20
62.21 @@ -367,7 +367,7 @@
62.22 val ("ok", ([(Rewrite_Set "norm_Poly", _, _)], _, (_, ([1], Res)))) =
62.23 Step_Solve.do_next (pt, ip);
62.24 "~~~~~ and do_next , args:"; val (ptp as (pt, pos as (p, p_))) = (pt, ip);
62.25 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
62.26 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
62.27 val thy' = get_obj g_domID pt (par_pblobj pt p);
62.28 val ((ist, ctxt), sc) = LItool.resume_prog thy' (p,p_) pt;
62.29
62.30 @@ -418,7 +418,7 @@
62.31 val ("ok", ([(Check_Postcond ["polynomial", "simplification"], _, _)], _, (_, ([], Res)))) =
62.32 Step_Solve.do_next (pt, ip);
62.33 "~~~~~ and do_next , args:"; val (ptp as (pt, pos as (p, p_))) = (pt, ip);
62.34 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
62.35 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
62.36 val thy' = get_obj g_domID pt (par_pblobj pt p);
62.37 val ((ist, ctxt), sc) = LItool.resume_prog thy' (p,p_) pt;
62.38
63.1 --- a/test/Tools/isac/Interpret/ptyps.thy Tue Apr 21 12:26:08 2020 +0200
63.2 +++ b/test/Tools/isac/Interpret/ptyps.thy Tue Apr 21 15:42:50 2020 +0200
63.3 @@ -13,30 +13,30 @@
63.4
63.5 section \<open>data for test "-ptyps.thy: store test-pbtyps by 'setup' ---"\<close>
63.6 setup \<open>KEStore_Elems.add_pbts
63.7 -[(Specify.prep_pbt thy "pbl_test_refine" [] Celem.e_pblID
63.8 +[(Specify.prep_pbt thy "pbl_test_refine" [] Spec.e_pblID
63.9 (["refine", "test"], [], Rule_Set.empty, NONE, [])),
63.10 -(Specify.prep_pbt @{theory DiffApp} "pbl_pbla" [] Celem.e_pblID
63.11 +(Specify.prep_pbt @{theory DiffApp} "pbl_pbla" [] Spec.e_pblID
63.12 (["pbla", "refine", "test"],
63.13 [("#Given", ["fixedValues a_a"])], Rule_Set.empty, NONE, [])),
63.14 -(Specify.prep_pbt @{theory DiffApp} "pbl_pbla1" [] Celem.e_pblID
63.15 +(Specify.prep_pbt @{theory DiffApp} "pbl_pbla1" [] Spec.e_pblID
63.16 (["pbla1","pbla", "refine", "test"],
63.17 [("#Given", ["fixedValues a_a","maximum a_1"])], Rule_Set.empty, NONE, [])),
63.18 -(Specify.prep_pbt @{theory DiffApp} "pbl_pbla2" [] Celem.e_pblID
63.19 +(Specify.prep_pbt @{theory DiffApp} "pbl_pbla2" [] Spec.e_pblID
63.20 (["pbla2","pbla", "refine", "test"],
63.21 [("#Given", ["fixedValues a_a","valuesFor a_2"])], Rule_Set.empty, NONE, [])),
63.22 -(Specify.prep_pbt @{theory DiffApp} "pbl_pbla2x" [] Celem.e_pblID
63.23 +(Specify.prep_pbt @{theory DiffApp} "pbl_pbla2x" [] Spec.e_pblID
63.24 (["pbla2x","pbla2","pbla", "refine", "test"],
63.25 [("#Given", ["fixedValues a_a","valuesFor a_2","functionOf a2_x"])],
63.26 Rule_Set.empty, NONE, [])),
63.27 -(Specify.prep_pbt @{theory DiffApp} "pbl_pbla2y" [] Celem.e_pblID
63.28 +(Specify.prep_pbt @{theory DiffApp} "pbl_pbla2y" [] Spec.e_pblID
63.29 (["pbla2y","pbla2","pbla", "refine", "test"],
63.30 [("#Given" ,["fixedValues a_a","valuesFor a_2","boundVariable a2_y"])],
63.31 Rule_Set.empty, NONE, [])),
63.32 -(Specify.prep_pbt @{theory DiffApp} "pbl_pbla2z" [] Celem.e_pblID
63.33 +(Specify.prep_pbt @{theory DiffApp} "pbl_pbla2z" [] Spec.e_pblID
63.34 (["pbla2z","pbla2","pbla", "refine", "test"],
63.35 [("#Given" ,["fixedValues a_a","valuesFor a_2","interval a2_z"])],
63.36 Rule_Set.empty, NONE, [])),
63.37 -(Specify.prep_pbt @{theory DiffApp} "pbl_pbla3" [] Celem.e_pblID
63.38 +(Specify.prep_pbt @{theory DiffApp} "pbl_pbla3" [] Spec.e_pblID
63.39 (["pbla3","pbla", "refine", "test"],
63.40 [("#Given" ,["fixedValues a_a","relations a_3"])],
63.41 Rule_Set.empty, NONE, []))]
64.1 --- a/test/Tools/isac/Interpret/rewtools.sml Tue Apr 21 12:26:08 2020 +0200
64.2 +++ b/test/Tools/isac/Interpret/rewtools.sml Tue Apr 21 15:42:50 2020 +0200
64.3 @@ -139,7 +139,7 @@
64.4 val thm = Global_Theory.get_thm (Isac ()(*WN141021 ThyC.get_theory thy' ERROR*)) thmID
64.5 val thm_deriv = Thm.get_name_hint thm;
64.6
64.7 -if thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv)
64.8 +if Thy_Html.thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv)
64.9 = "thy_isac_Test-thm-radd_left_commute" then ()
64.10 else error "context_thy mini-subpbl ([2,4], Res) changed";
64.11 (*~/proto3/kbase/thy$ ls -l thy_isac_Test-thm-radd_left_commute*
64.12 @@ -161,7 +161,7 @@
64.13 applicable_in pos pt tac
64.14 val thm = Global_Theory.get_thm (Isac ()(*WN141021 ThyC.get_theory thy' ERROR*)) thmID
64.15 val thm_deriv = Thm.get_name_hint thm;
64.16 -if thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv) =
64.17 +if Thy_Html.thm2guh (thy_containing_thm thm_deriv) (ThmC.cut_id thm_deriv) =
64.18 "thy_isac_Test-thm-risolate_bdv_add" then ()
64.19 else error "context_thy mini-subpbl ([3,1,1], Frm) changed";
64.20 (*~/proto3/kbase/thy$ ls -l thy_isac_Test-thm-risolate_bdv_add*
65.1 --- a/test/Tools/isac/Knowledge/biegelinie-4.sml Tue Apr 21 12:26:08 2020 +0200
65.2 +++ b/test/Tools/isac/Knowledge/biegelinie-4.sml Tue Apr 21 15:42:50 2020 +0200
65.3 @@ -238,7 +238,7 @@
65.4 val {ppc, pre, prls,...} = Specify.get_met mID
65.5 val thy = ThyC.get_theory dI
65.6 val dI'' = if dI = ThyC.id_empty then dI' else dI
65.7 - val pI'' = if pI = Celem.e_pblID then pI' else pI
65.8 + val pI'' = if pI = Spec.e_pblID then pI' else pI
65.9 ;
65.10 (*+*)writeln (oris2str oris); (*[
65.11 (1, ["1"], #Given,Streckenlast, ["q_0"]),
66.1 --- a/test/Tools/isac/Knowledge/eqsystem.sml Tue Apr 21 12:26:08 2020 +0200
66.2 +++ b/test/Tools/isac/Knowledge/eqsystem.sml Tue Apr 21 15:42:50 2020 +0200
66.3 @@ -282,10 +282,10 @@
66.4 "solveForVars [c, c_2]", "solution LL"];
66.5
66.6 (*WN120313 in "solution L" above "refine fmz ["LINEAR","system"]" caused an error...*)
66.7 -"~~~~~ fun refine, args:"; val ((fmz:fmz_), (pblID:pblID)) = (fmz, ["LINEAR","system"]);
66.8 -"~~~~~ fun refin', args:"; val ((pblRD: pblRD), fmz, pbls, ((Store.Node (pI, [py], [])): pbt Store.node)) =
66.9 +"~~~~~ fun refine, args:"; val ((fmz:fmz_), (pblID:Spec.pblID)) = (fmz, ["LINEAR","system"]);
66.10 +"~~~~~ fun refin', args:"; val ((pblRD: pblRD), fmz, pbls, ((Store.Node (pI, [py], [])): Problem.T Store.node)) =
66.11 ((rev o tl) pblID, fmz, [(*match list*)],
66.12 - ((Store.Node ("LINEAR", [get_pbt ["LINEAR","system"]], [])): pbt Store.node));
66.13 + ((Store.Node ("LINEAR", [get_pbt ["LINEAR","system"]], [])): Problem.T Store.node));
66.14 val {thy, ppc, where_, prls, ...} = py ;
66.15 "~~~~~ fun prep_ori, args:"; val (fmz, thy, pbt) = (fmz, thy, ppc);
66.16 val ctxt = Proof_Context.init_global thy;
67.1 --- a/test/Tools/isac/Knowledge/integrate.thy Tue Apr 21 12:26:08 2020 +0200
67.2 +++ b/test/Tools/isac/Knowledge/integrate.thy Tue Apr 21 15:42:50 2020 +0200
67.3 @@ -15,7 +15,7 @@
67.4 (Rewrite_Set_Inst [(''bdv'',v_v)] ''add_new_c'') #>
67.5 (Rewrite_Set_Inst [(''bdv'',v_v)] ''simplify_Integral'')) (f_f::real))"
67.6 setup \<open>KEStore_Elems.add_mets
67.7 - [Specify.prep_met @{theory "Isac_Knowledge"} "met_testint" [] Celem.e_metID
67.8 + [Specify.prep_met @{theory "Isac_Knowledge"} "met_testint" [] Spec.e_metID
67.9 (["diff","integration","test"],
67.10 [("#Given" ,["functionTerm f_f", "integrateBy v_v"]), ("#Find", ["antiDerivative F_F"])],
67.11 {rew_ord'="tless_true", rls'=Atools_erls, calc = [], srls = Rule_Set.empty, prls = Rule_Set.empty,
68.1 --- a/test/Tools/isac/Knowledge/polyeq-1.sml Tue Apr 21 12:26:08 2020 +0200
68.2 +++ b/test/Tools/isac/Knowledge/polyeq-1.sml Tue Apr 21 15:42:50 2020 +0200
68.3 @@ -371,7 +371,7 @@
68.4 (*solve m (pt, pos);
68.5 WAS: not-found-in-program: NotLocatable from Term_Val1 (Const ("List...*)
68.6 "~~~~~ fun Step_Solve.by_tactic , args:"; val (m, (pt, po as (p,p_))) = (m, (pt, pos));
68.7 -e_metID = get_obj g_metID pt (par_pblobj pt p) (*false*);
68.8 +Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*false*);
68.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
68.10 val (is, sc) = resume_prog thy' (p,p_) pt;
68.11 val d = Rule_Set.empty;
69.1 --- a/test/Tools/isac/Knowledge/rootrateq.sml Tue Apr 21 12:26:08 2020 +0200
69.2 +++ b/test/Tools/isac/Knowledge/rootrateq.sml Tue Apr 21 15:42:50 2020 +0200
69.3 @@ -336,7 +336,7 @@
69.4
69.5 LI.do_next (pt, input_pos);
69.6 "~~~~~ and do_next , args:"; val (ptp as (pt, pos as (p, p_))) = (pt, input_pos);
69.7 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
69.8 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
69.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
69.10
69.11 val (_, (ist, ctxt), sc) =
70.1 --- a/test/Tools/isac/MathEngBasic/ctree.sml Tue Apr 21 12:26:08 2020 +0200
70.2 +++ b/test/Tools/isac/MathEngBasic/ctree.sml Tue Apr 21 15:42:50 2020 +0200
70.3 @@ -66,7 +66,7 @@
70.4 handle _ => error "--- fun get_ctxt not even some ctxt found in PrfObj";
70.5
70.6 val pt = EmptyPtree;
70.7 -val pt = append_problem [] (Istate.empty, ContextC.empty) e_fmz ([(*oris*)], e_spec, TermC.empty, ContextC.empty) pt;
70.8 +val pt = append_problem [] (Istate.empty, ContextC.empty) e_fmz ([(*oris*)], Spec.e_spec, TermC.empty, ContextC.empty) pt;
70.9 val ctxt = get_obj g_ctxt pt [];
70.10 if ContextC.is_empty ctxt then () else error "--- fun update_ctxt, fun g_ctxt: append_problem changed";
70.11
71.1 --- a/test/Tools/isac/MathEngine/mathengine-stateless.sml Tue Apr 21 12:26:08 2020 +0200
71.2 +++ b/test/Tools/isac/MathEngine/mathengine-stateless.sml Tue Apr 21 15:42:50 2020 +0200
71.3 @@ -116,7 +116,7 @@
71.4 ip = p; (*false*)
71.5 member op = [Pbl,Met] p_; (*false*)
71.6 "~~~~~ fun do_next, args:"; val (ptp as (pt, pos as (p,p_))) = (pt,ip);
71.7 -e_metID = get_obj g_metID pt (par_pblobj pt p); (*false*)
71.8 +Spec.e_metID = get_obj g_metID pt (par_pblobj pt p); (*false*)
71.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
71.10 val ((ist, ctxt), sc) = resume_prog thy' (p,p_) pt;
71.11
71.12 @@ -204,7 +204,7 @@
71.13 val is = init_istate tac t
71.14 (*TODO.WN060602 Pstate (["(t_, Problem (Isac,[equation,univar]))"]
71.15 is wrong for simpl, but working ?!? *)
71.16 - val tac_ = Apply_Method' (e_metID(*WN0402: see generate1 !?!*), SOME t, is, ctxt)
71.17 + val tac_ = Apply_Method' (Spec.e_metID(*WN0402: see generate1 !?!*), SOME t, is, ctxt)
71.18 val pos' = ((lev_on o lev_dn) p, Frm)
71.19 val thy = ThyC.get_theory "Isac_Knowledge"
71.20 val (_,_,_,pt') = (*implicit Take*)generate1 tac_ (is, ctxt) (pt, pos');
71.21 @@ -220,7 +220,7 @@
71.22 (* in pt': tac = Rewrite ("rnorm_equation_add", "Test.rnorm_equation_add")},
71.23 ^^^^^^^^^^^^^^^^^^^^^^^^^^^*)
71.24 "~~~~~ fun do_next , args:"; val ((ptp as (pt, pos as (p,p_)))) = (ptp);
71.25 -e_metID = get_obj g_metID pt (par_pblobj pt p) = false;
71.26 +Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) = false;
71.27 val thy' = get_obj g_domID pt (par_pblobj pt p);
71.28 val ((ist, ctxt), sc) = resume_prog thy' (p,p_) pt;
71.29 val Next_Step (is, ctxt, tac_) = LI.find_next_step sc (pt,pos) ist ctxt;
72.1 --- a/test/Tools/isac/Minisubpbl/100-init-rootpbl.sml Tue Apr 21 12:26:08 2020 +0200
72.2 +++ b/test/Tools/isac/Minisubpbl/100-init-rootpbl.sml Tue Apr 21 15:42:50 2020 +0200
72.3 @@ -11,7 +11,7 @@
72.4 ("Isac_Knowledge", ["sqroot-test","univariate","equation","test"],
72.5 ["Test","squ-equ-test-subpbl1"]);
72.6 "~~~~~ fun CalcTreeTEST, args:"; val [(fmz, sp):fmz] = [(fmz, (dI',pI',mI'))];
72.7 -"~~~~~ fun nxt_specify_init_calc , args:"; val (fmz : fmz_, (dI, pI, mI) : spec) = (fmz, sp);
72.8 +"~~~~~ fun nxt_specify_init_calc , args:"; val (fmz : fmz_, (dI, pI, mI) : Spec.spec) = (fmz, sp);
72.9 val thy = ThyC.get_theory dI;
72.10 (*if*) mI = ["no_met"]; (*else*)
72.11 val (pI, (pors, pctxt), mI) = (pI, get_pbt pI |> #ppc |> prep_ori fmz thy, mI)
73.1 --- a/test/Tools/isac/Minisubpbl/150-add-given.sml Tue Apr 21 12:26:08 2020 +0200
73.2 +++ b/test/Tools/isac/Minisubpbl/150-add-given.sml Tue Apr 21 15:42:50 2020 +0200
73.3 @@ -32,8 +32,8 @@
73.4 val pblobj as (PblObj{meth,origin=origin as (oris,(dI',pI',mI'),_),
73.5 probl,spec=(dI,pI,mI), ...}) = get_obj I pt p;
73.6 just_created_ pblobj (*by Subproblem*) andalso origin <> e_origin; (* = false*)
73.7 - val cpI = if pI = e_pblID then pI' else pI;
73.8 - val cmI = if mI = e_metID then mI' else mI;
73.9 + val cpI = if pI = Spec.e_pblID then pI' else pI;
73.10 + val cmI = if mI = Spec.e_metID then mI' else mI;
73.11 val {ppc, prls, where_, ...} = get_pbt cpI;
73.12 val pre = check_preconds "thy 100820" prls where_ probl;
73.13 val pb = foldl and_ (true, map fst pre);
73.14 @@ -41,13 +41,13 @@
73.15 (* val (_,tac) = nxt_spec p_ pb oris (dI',pI',mI') (probl, meth)
73.16 (ppc, (#ppc o get_met) cmI) (dI, pI, mI);
73.17 ERROR: val tac = Add_Given "equality (<markup> + <markup> = <markup>)"*)
73.18 -"~~~~~ fun nxt_spec, args:"; val (Pbl, preok, (oris : ori list), ((dI', pI', mI') : spec),
73.19 - ((pbl : itm list), (met : itm list)), (pbt, mpc), ((dI, pI, mI) : spec)) =
73.20 +"~~~~~ fun nxt_spec, args:"; val (Pbl, preok, (oris : ori list), ((dI', pI', mI') : Spec.spec),
73.21 + ((pbl : itm list), (met : itm list)), (pbt, mpc), ((dI, pI, mI) : Spec.spec)) =
73.22 (p_, pb, oris, (dI',pI',mI'), (probl, meth),
73.23 (ppc, (#ppc o get_met) cmI), (dI, pI, mI));
73.24
73.25 dI' = ThyC.id_empty andalso dI = ThyC.id_empty; (* = false*)
73.26 -pI' = e_pblID andalso pI = e_pblID; (* = false*)
73.27 +pI' = Spec.e_pblID andalso pI = Spec.e_pblID; (* = false*)
73.28 find_first (is_error o #5) (pbl:itm list); (* = NONE*)
73.29
73.30 (* nxt_add (ThyC.get_theory (if dI = ThyC.id_empty then dI' else dI)) oris pbt pbl;
74.1 --- a/test/Tools/isac/Minisubpbl/200-start-method-NEXT_STEP.sml Tue Apr 21 12:26:08 2020 +0200
74.2 +++ b/test/Tools/isac/Minisubpbl/200-start-method-NEXT_STEP.sml Tue Apr 21 15:42:50 2020 +0200
74.3 @@ -42,8 +42,8 @@
74.4 probl, spec = (dI, pI, mI), ...}) => (pblobj, meth, origin, oris, dI', pI', mI', probl, dI, pI, mI)
74.5 | Ctree.PrfObj _ => error "nxt_specify_: not on PrfObj";
74.6 (*if*) Ctree.just_created_ pblobj (*by Subproblem*) andalso origin <> Ctree.e_origin (*else*);
74.7 - val cpI = if pI = Celem.e_pblID then pI' else pI;
74.8 - val cmI = if mI = Celem.e_metID then mI' else mI;
74.9 + val cpI = if pI = Spec.e_pblID then pI' else pI;
74.10 + val cmI = if mI = Spec.e_metID then mI' else mI;
74.11 val {ppc = pbt, prls, where_, ...} = Specify.get_pbt cpI;
74.12
74.13 (*+* )------- in f3cac3053e7b (Rule_Set.empty just renamed, NOT deleted) we had
75.1 --- a/test/Tools/isac/Minisubpbl/200-start-method.sml Tue Apr 21 12:26:08 2020 +0200
75.2 +++ b/test/Tools/isac/Minisubpbl/200-start-method.sml Tue Apr 21 15:42:50 2020 +0200
75.3 @@ -64,14 +64,14 @@
75.4 (*expects same sequence of (actual) args in itms and (formal) args in met*)
75.5 fun msg_miss sc metID caller f formals actuals =
75.6 "ERROR in creating the environment from formal args. of partial_function \"" ^ fst (Program.get_fun_id sc) ^ "\"\n" ^
75.7 - "and the actual args., ie. items of the guard of \"" ^ Celem.metID2str metID ^ "\" by \"" ^ caller ^ "\":\n" ^
75.8 + "and the actual args., ie. items of the guard of \"" ^ Spec.metID2str metID ^ "\" by \"" ^ caller ^ "\":\n" ^
75.9 "formal arg \"" ^ UnparseC.term f ^ "\" doesn't mach an actual arg.\n" ^
75.10 "with:\n" ^
75.11 (string_of_int o length) formals ^ " formal args: " ^ UnparseC.terms formals ^ "\n" ^
75.12 (string_of_int o length) actuals ^ " actual args: " ^ UnparseC.terms actuals
75.13 fun msg_ambiguous sc metID f aas formals actuals =
75.14 "AMBIGUITY in creating the environment from formal args. of partial_function \"" ^ fst (Program.get_fun_id sc) ^ "\"\n" ^
75.15 - "and the actual args., ie. items of the guard of \"" ^ Celem.metID2str metID ^ "\" by \"assoc_by_type\":\n" ^
75.16 + "and the actual args., ie. items of the guard of \"" ^ Spec.metID2str metID ^ "\" by \"assoc_by_type\":\n" ^
75.17 "formal arg. \"" ^ UnparseC.term f ^ "\" type-matches with several..." ^
75.18 "actual args. \"" ^ UnparseC.terms aas ^ "\"\n" ^
75.19 "selected \"" ^ UnparseC.term (hd aas) ^ "\"\n" ^
75.20 @@ -125,7 +125,7 @@
75.21 case pIopt of SOME _ => ();
75.22
75.23 "~~~~~ and do_next , args:"; val (ptp as (pt, pos as (p, p_))) = (pt,ip);
75.24 -Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (* = false*);
75.25 +Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (* = false*);
75.26 val thy' = get_obj g_domID pt (par_pblobj pt p);
75.27 val (is, sc) = LItool.resume_prog thy' (p,p_) pt;
75.28 "~~~~~ fun find_next_step , args:"; val ((ptp as(pt, (p, _))), (Rule.Prog prog), (Istate.Pstate ist, ctxt))
76.1 --- a/test/Tools/isac/Minisubpbl/250-Rewrite_Set-from-method.sml Tue Apr 21 12:26:08 2020 +0200
76.2 +++ b/test/Tools/isac/Minisubpbl/250-Rewrite_Set-from-method.sml Tue Apr 21 15:42:50 2020 +0200
76.3 @@ -41,7 +41,7 @@
76.4
76.5 Step_Solve.by_tactic m ptp;
76.6 "~~~~~ fun by_tactic , args:"; val (m, (pt, po as (p, p_))) = (m, (pt, pos));
76.7 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (* = else*);
76.8 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (* = else*);
76.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
76.10 val (is, sc) = LItool.resume_prog thy' (p,p_) pt;
76.11
76.12 @@ -96,8 +96,8 @@
76.13 (*if*) member op = [Pbl, Met] p_ = false;
76.14
76.15 "~~~~~ and do_next , args:"; val (ptp as (pt, pos as (p, p_))) = (pt, ip);
76.16 - e_metID = get_obj g_metID pt (par_pblobj pt p) = false;
76.17 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p)(*else*);
76.18 + Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) = false;
76.19 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p)(*else*);
76.20 val thy' = get_obj g_domID pt (par_pblobj pt p);
76.21 val ((ist, ctxt), sc) = LItool.resume_prog thy' (p,p_) pt;
76.22
76.23 @@ -150,7 +150,7 @@
76.24
76.25 Step_Solve.do_next (pt, ip);
76.26 "~~~~~ and do_next , args:"; val (ptp as (pt, pos as (p, p_))) = (pt, ip);
76.27 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
76.28 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
76.29 val thy' = get_obj g_domID pt (par_pblobj pt p);
76.30 val ((ist, ctxt), sc) = LItool.resume_prog thy' (p,p_) pt;
76.31
77.1 --- a/test/Tools/isac/Minisubpbl/300-init-subpbl-NEXT_STEP.sml Tue Apr 21 12:26:08 2020 +0200
77.2 +++ b/test/Tools/isac/Minisubpbl/300-init-subpbl-NEXT_STEP.sml Tue Apr 21 15:42:50 2020 +0200
77.3 @@ -35,8 +35,8 @@
77.4 | Ctree.PrfObj _ => error "nxt_specify_: not on PrfObj";
77.5
77.6 (*if*) Ctree.just_created_ pblobj (*by Subproblem*) andalso origin <> Ctree.e_origin (*else*);
77.7 - val cpI = if pI = Celem.e_pblID then pI' else pI;
77.8 - val cmI = if mI = Celem.e_metID then mI' else mI;
77.9 + val cpI = if pI = Spec.e_pblID then pI' else pI;
77.10 + val cmI = if mI = Spec.e_metID then mI' else mI;
77.11 val {ppc, prls, where_, ...} = Specify.get_pbt cpI;
77.12 val pre = Stool.check_preconds "thy 100820" prls where_ probl;
77.13 val pb = foldl and_ (true, map fst pre);
78.1 --- a/test/Tools/isac/Minisubpbl/300-init-subpbl.sml Tue Apr 21 12:26:08 2020 +0200
78.2 +++ b/test/Tools/isac/Minisubpbl/300-init-subpbl.sml Tue Apr 21 15:42:50 2020 +0200
78.3 @@ -37,7 +37,7 @@
78.4 (*val (msg, cs') =*)
78.5 Step_Solve.by_tactic m (pt, p);
78.6 "~~~~~ fun by_tactic , args:"; val (m, (pt, po as (p,p_))) = (m, (pt, p));
78.7 - (*if*) e_metID = get_obj g_metID pt (par_pblobj pt p) (*false*);
78.8 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*false*);
78.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
78.10 val (is, sc) = resume_prog thy' (p,p_) pt;
78.11
79.1 --- a/test/Tools/isac/Minisubpbl/470-Check_elementwise-NEXT_STEP.sml Tue Apr 21 12:26:08 2020 +0200
79.2 +++ b/test/Tools/isac/Minisubpbl/470-Check_elementwise-NEXT_STEP.sml Tue Apr 21 15:42:50 2020 +0200
79.3 @@ -52,7 +52,7 @@
79.4
79.5 LI.do_next (pt, ip);
79.6 "~~~~~ and do_next , args:"; val ((ptp as (pt, pos as (p, p_)))) = ((pt, ip));
79.7 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
79.8 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
79.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
79.10 val ((ist, ctxt), sc) = LItool.resume_prog thy' (p,p_) pt;
79.11
80.1 --- a/test/Tools/isac/Minisubpbl/490-nxt-Check_Postcond.sml Tue Apr 21 12:26:08 2020 +0200
80.2 +++ b/test/Tools/isac/Minisubpbl/490-nxt-Check_Postcond.sml Tue Apr 21 15:42:50 2020 +0200
80.3 @@ -44,7 +44,7 @@
80.4 (*if*) member op = [Pbl,Met] p_; (*= false*)
80.5
80.6 "~~~~~ and do_next , args:"; val (ptp as (pt, pos as (p, p_))) = (pt, ip);
80.7 -(*if*) e_metID = get_obj g_metID pt (par_pblobj pt p); (*false*)
80.8 +(*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p); (*false*)
80.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
80.10 val ((ist, ctxt), sc) = resume_prog thy' (p,p_) pt;
80.11
81.1 --- a/test/Tools/isac/Minisubpbl/530-error-Check_Elementwise.sml Tue Apr 21 12:26:08 2020 +0200
81.2 +++ b/test/Tools/isac/Minisubpbl/530-error-Check_Elementwise.sml Tue Apr 21 15:42:50 2020 +0200
81.3 @@ -53,7 +53,7 @@
81.4 tacis; (*= []*)
81.5 member op = [Pbl,Met] p_; (*= false*)
81.6 "~~~~~ and do_next , args:"; val (ptp as (pt, pos as (p, p_))) = (pt, ip);
81.7 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
81.8 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
81.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
81.10 val ((ist, ctxt), sc) = LItool.resume_prog thy' (p,p_) pt;
81.11
82.1 --- a/test/Tools/isac/Minisubpbl/600-postcond-NEXT_STEP.sml Tue Apr 21 12:26:08 2020 +0200
82.2 +++ b/test/Tools/isac/Minisubpbl/600-postcond-NEXT_STEP.sml Tue Apr 21 15:42:50 2020 +0200
82.3 @@ -106,7 +106,7 @@
82.4
82.5 Step_Solve.do_next (pt, ip);
82.6 "~~~~~ and do_next , args:"; val (ptp as (pt, pos as (p, p_))) = (pt, ip);
82.7 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
82.8 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
82.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
82.10 val ((ist, ctxt), sc) = LItool.resume_prog thy' (p,p_) pt;
82.11
83.1 --- a/test/Tools/isac/Minisubpbl/700-interSteps.sml Tue Apr 21 12:26:08 2020 +0200
83.2 +++ b/test/Tools/isac/Minisubpbl/700-interSteps.sml Tue Apr 21 15:42:50 2020 +0200
83.3 @@ -91,7 +91,7 @@
83.4
83.5 (*+*)val Rule_Set.Repeat {scr = EmptyProg, ...} = rls; (*this prog is replaced by Auto_Prog.gen on the fly*)
83.6
83.7 - val tac_ = Tactic.Apply_Method' (Celem.e_metID(*WN0402: see generate1 !?!*), SOME t, is, ctxt)
83.8 + val tac_ = Tactic.Apply_Method' (Spec.e_metID(*WN0402: see generate1 !?!*), SOME t, is, ctxt)
83.9 val pos' = ((lev_on o lev_dn) p, Frm)
83.10 val thy = ThyC.get_theory "Isac_Knowledge"
83.11 val (_, _, _, pt') = Generate.generate1 tac_ (is, ctxt) (pt, pos') (* implicit Take *);
84.1 --- a/test/Tools/isac/Minisubpbl/800-append-on-Frm.sml Tue Apr 21 12:26:08 2020 +0200
84.2 +++ b/test/Tools/isac/Minisubpbl/800-append-on-Frm.sml Tue Apr 21 15:42:50 2020 +0200
84.3 @@ -49,7 +49,7 @@
84.4
84.5 LI.do_next (pt, input_pos);
84.6 "~~~~~ and do_next , args:"; val ((ptp as (pt, pos as (p, p_)))) = (pt, input_pos);
84.7 - (*if*) Celem.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
84.8 + (*if*) Spec.e_metID = get_obj g_metID pt (par_pblobj pt p) (*else*);
84.9 val thy' = get_obj g_domID pt (par_pblobj pt p);
84.10 val ((ist, ctxt), sc) = LItool.resume_prog thy' (p,p_) pt;
84.11
85.1 --- a/test/Tools/isac/ProgLang/calculate.thy Tue Apr 21 12:26:08 2020 +0200
85.2 +++ b/test/Tools/isac/ProgLang/calculate.thy Tue Apr 21 15:42:50 2020 +0200
85.3 @@ -18,8 +18,8 @@
85.4 \<close>
85.5
85.6 setup \<open>KEStore_Elems.add_pbts
85.7 - [Specify.prep_pbt @{theory "Test"} "pbl_ttest" [] Celem.e_pblID (["test"], [], Rule_Set.empty, NONE, []),
85.8 - Specify.prep_pbt @{theory "Test"} "pbl_ttest_calc" [] Celem.e_pblID
85.9 + [Specify.prep_pbt @{theory "Test"} "pbl_ttest" [] Spec.e_pblID (["test"], [], Rule_Set.empty, NONE, []),
85.10 + Specify.prep_pbt @{theory "Test"} "pbl_ttest_calc" [] Spec.e_pblID
85.11 (["calculate", "test"],
85.12 [("#Given", ["realTestGiven t_t"]),
85.13 ("#Find", ["realTestFind s_s"])],
85.14 @@ -34,7 +34,7 @@
85.15 (Try (Repeat (Calculate ''DIVIDE''))) #>
85.16 (Try (Repeat (Calculate ''POWER''))))) t_t"
85.17 setup \<open>KEStore_Elems.add_mets
85.18 - [Specify.prep_met (@{theory "Test"}) "met_testcal" [] Celem.e_metID
85.19 + [Specify.prep_met (@{theory "Test"}) "met_testcal" [] Spec.e_metID
85.20 (["Test","test_calculate"],
85.21 [("#Given" , ["realTestGiven t_t"]), ("#Find", ["realTestFind s_s"])],
85.22 {rew_ord'="sqrt_right",rls'=tval_rls,srls = Rule_Set.empty, prls = Rule_Set.empty,
86.1 --- a/test/Tools/isac/Specify/calchead.sml Tue Apr 21 12:26:08 2020 +0200
86.2 +++ b/test/Tools/isac/Specify/calchead.sml Tue Apr 21 15:42:50 2020 +0200
86.3 @@ -379,7 +379,7 @@
86.4 ============ inhibit exn AK110726 ==============================================*)
86.5 "-c1-----------------------------------------------------";
86.6 "--------------------------step through code match_ags---";
86.7 -val (thy, pbt:pat list, ags) = (@{theory "EqSystem"}, pats, ags);
86.8 +val (thy, pbt: Celem4.pat list, ags) = (@{theory "EqSystem"}, pats, ags);
86.9 fun flattup (i,(var,bool,str,itm_)) = (i,var,bool,str,itm_);
86.10 val pbt' = filter_out is_copy_named pbt; (*=equalities, solveForVars*)
86.11 val cy = filter is_copy_named pbt; (*=solution*)
86.12 @@ -394,7 +394,7 @@
86.13 val opt - mtc thy p a;
86.14 ============ inhibit exn AK110726 ==============================================*)
86.15 "--------------------------------step through code mtc---";
86.16 -val (thy, (str, (dsc, _)):pat, ty $ var) = (thy, p, a);
86.17 +val (thy, (str, (dsc, _)): Celem4.pat, ty $ var) = (thy, p, a);
86.18 Thm.global_cterm_of;
86.19 val ttt = (dsc $ var);
86.20 (*============ inhibit exn AK110726 ==============================================
86.21 @@ -470,7 +470,7 @@
86.22 -------------------------------------------------------------------*)
86.23 "-c1-----------------------------------------------------";
86.24 "--------------------------step through code match_ags---";
86.25 -val (thy, pbt:pat list, ags) = (@{theory "EqSystem"}, pats, ags);
86.26 +val (thy, pbt: Celem4.pat list, ags) = (@{theory "EqSystem"}, pats, ags);
86.27 fun flattup (i,(var,bool,str,itm_)) = (i,var,bool,str,itm_);
86.28 val pbt' = filter_out is_copy_named pbt; (*=equalities, solveForVars*)
86.29 val cy = filter is_copy_named pbt; (*=solution*)
86.30 @@ -485,7 +485,7 @@
86.31 val opt - mtc thy p a;
86.32 -------------------------------------------------------------------*)
86.33 "--------------------------------step through code mtc---";
86.34 -val (thy, (str, (dsc, _)):pat, ty $ var) = (thy, p, a);
86.35 +val (thy, (str, (dsc, _)): Celem4.pat, ty $ var) = (thy, p, a);
86.36 Thm.global_cterm_of;
86.37 val ttt = (dsc $ var);
86.38 (*============ inhibit exn AK110726 ==============================================
86.39 @@ -530,7 +530,7 @@
86.40 val PATS = (#ppc o get_pbt) pI;
86.41 "-d1-----------------------------------------------------";
86.42 "--------------------------step through code match_ags---";
86.43 -val (thy, pbt:pat list, ags) = (@{theory "Test"}, PATS, AGS);
86.44 +val (thy, pbt: Celem4.pat list, ags) = (@{theory "Test"}, PATS, AGS);
86.45 fun flattup (i,(var,bool,str,itm_)) = (i,var,bool,str,itm_);
86.46 val pbt' = filter_out is_copy_named pbt;
86.47 val cy = filter is_copy_named pbt;
86.48 @@ -541,7 +541,7 @@
86.49 "---if False:...";
86.50 val opt = mtc thy p a;
86.51 "--------------------------------step through code mtc---";
86.52 -val (thy, (str, (dsc, _)):pat, ty $ var) = (thy, p, a);
86.53 +val (thy, (str, (dsc, _)): Celem4.pat, ty $ var) = (thy, p, a);
86.54 val ttt = (dsc $ var);
86.55 Thm.global_cterm_of thy (dsc $ var);
86.56 val ori = ((([1], str, dsc, (*[var]*) split_dts' (dsc, var))): preori);
86.57 @@ -554,7 +554,7 @@
86.58 "---if False:...";
86.59 val opt = mtc thy p a;
86.60 "--------------------------------step through code mtc---";
86.61 -val (thy, (str, (dsc, _)):pat, ty $ var) = (thy, p, a);
86.62 +val (thy, (str, (dsc, _)):Celem4.pat, ty $ var) = (thy, p, a);
86.63 val ttt = (dsc $ var);
86.64 Thm.global_cterm_of thy (dsc $ var);
86.65 val ori = ((([1], str, dsc, (*[var]*) split_dts' (dsc, var))): preori);
86.66 @@ -563,7 +563,7 @@
86.67 "-----------------continue step through code match_ags---";
86.68 val oris' = oris @ [ori]; (*result 2 oris, cpy_nam added later*)
86.69 "--------------------------------step through cpy_nam----";
86.70 -val (pbt, oris, p as (field, (dsc, t)):pat) = (pbt', oris', hd cy);
86.71 +val (pbt, oris, p as (field, (dsc, t)):Celem4.pat) = (pbt', oris', hd cy);
86.72 (*t = "v_v'i'" : term OLD: t = "v_i_"*)
86.73 "--------------------------------------------------------";
86.74 fun is_copy_named_generating_idstr str =
87.1 --- a/test/Tools/isac/Specify/ptyps.sml Tue Apr 21 12:26:08 2020 +0200
87.2 +++ b/test/Tools/isac/Specify/ptyps.sml Tue Apr 21 15:42:50 2020 +0200
87.3 @@ -420,28 +420,28 @@
87.4 "----------- fun coll_guhs ---------------------------------------";
87.5 "----------- fun coll_guhs ---------------------------------------";
87.6 "----------- fun coll_guhs ---------------------------------------";
87.7 -val n = e_pbt;
87.8 -(#guh : pbt -> guh) e_pbt;
87.9 +val n = Probl_Def.empty;
87.10 +(#guh : Problem.T -> Check_Unique.guh) Probl_Def.empty;
87.11
87.12 fun XXXnode coll (Store.Node (_,[n],ns)) =
87.13 - [(#guh : pbt -> guh) n]
87.14 + [(#guh : Problem.T -> Check_Unique.guh) n]
87.15 and XXXnodes coll [] = coll
87.16 - | XXXnodes coll (n::ns : pbt Store.T) = (XXXnode coll n) @
87.17 + | XXXnodes coll (n::ns : Problem.T Store.T) = (XXXnode coll n) @
87.18 (XXXnodes coll ns);
87.19 (*^^^ this works, but not this ...
87.20 fun node coll (Store.Node (_,[n],ns)) =
87.21 - [(#guh : 'a -> guh) n]
87.22 + [(#guh : 'a -> Check_Unique.guh) n]
87.23 and nodes coll [] = coll
87.24 | nodes coll (n::ns : 'a Store.T) = (node coll n) @ (nodes coll ns);
87.25
87.26 Error:
87.27 Can't unify {guh: 'a, ...} with 'b (Cannot unify with explicit type variable)
87.28 - Found near #guh : 'a -> guh
87.29 + Found near #guh : 'a -> Check_Unique.guh
87.30
87.31 i.e. there is no common fun for pbls and mets ?!?*)
87.32
87.33 -coll_pblguhs (get_ptyps ());
87.34 -sort string_ord (coll_pblguhs (get_ptyps ()));
87.35 +((Check_Unique.collect (#guh : Probl_Def.T -> Check_Unique.guh))) (get_ptyps ());
87.36 +sort string_ord (((Check_Unique.collect (#guh : Probl_Def.T -> Check_Unique.guh))) (get_ptyps ()));
87.37 show_pblguhs ();
87.38 sort_pblguhs ();
87.39
87.40 @@ -450,19 +450,19 @@
87.41 "----------- fun guh2kestoreID -----------------------------------";
87.42 "----- we assumed the problem-hierarchy containing 3 elements on toplevel";
87.43 (* ERROR: Exception Bind raised *)
87.44 -val (Store.Node (id1,[n1 as {guh=guh1,...} : pbt], ns1)::
87.45 - Store.Node (id2,[n2 as {guh=guh2,...} : pbt], ns2):: _) = (get_ptyps ());
87.46 +val (Store.Node (id1,[n1 as {guh=guh1,...} : Problem.T], ns1)::
87.47 + Store.Node (id2,[n2 as {guh=guh2,...} : Problem.T], ns2):: _) = (get_ptyps ());
87.48
87.49 (*
87.50 nodes [] guh1 (get_ptyps ());
87.51 nodes [] guh2 (get_ptyps ());
87.52 *)
87.53 -val (Store.Node (id1,[n1 as {guh=guh1,...} : pbt], ns1)
87.54 +val (Store.Node (id1,[n1 as {guh=guh1,...} : Problem.T], ns1)
87.55 ::
87.56 - Store.Node (id2,[n2 as {guh=guh2,...} : pbt],
87.57 - (Store.Node (id21,[n21 as {guh=guh21,...} : pbt], ns21)) :: _ )
87.58 + Store.Node (id2,[n2 as {guh=guh2,...} : Problem.T],
87.59 + (Store.Node (id21,[n21 as {guh=guh21,...} : Problem.T], ns21)) :: _ )
87.60 ::
87.61 - Store.Node (id3,[n3 as {guh=guh3,...} : pbt], ns3)
87.62 + Store.Node (id3,[n3 as {guh=guh3,...} : Problem.T], ns3)
87.63 ::
87.64 _ ) = (get_ptyps ());
87.65 (*
88.1 --- a/test/Tools/isac/Specify/step-specify.sml Tue Apr 21 12:26:08 2020 +0200
88.2 +++ b/test/Tools/isac/Specify/step-specify.sml Tue Apr 21 15:42:50 2020 +0200
88.3 @@ -57,8 +57,8 @@
88.4 probl, spec = (dI, pI, mI), ...}) => (pblobj, meth, origin, oris, dI', pI', mI', probl, dI, pI, mI)
88.5 | Ctree.PrfObj _ => error "nxt_specify_: not on PrfObj";
88.6 (*if*) Ctree.just_created_ pblobj (*by Subproblem*) andalso origin <> Ctree.e_origin (*else*);
88.7 - val cpI = if pI = Celem.e_pblID then pI' else pI;
88.8 - val cmI = if mI = Celem.e_metID then mI' else mI;
88.9 + val cpI = if pI = Spec.e_pblID then pI' else pI;
88.10 + val cmI = if mI = Spec.e_metID then mI' else mI;
88.11 val {ppc, prls, where_, ...} = Specify.get_pbt cpI;
88.12 val pre = Stool.check_preconds "thy 100820" prls where_ probl;
88.13 val pb = foldl and_ (true, map fst pre);
88.14 @@ -69,7 +69,7 @@
88.15 (* vv----^^*)
88.16 = (p_, pb, oris, (dI', pI', mI'), (probl, meth), (ppc, (#ppc o Specify.get_met) cmI), (dI, pI, mI));
88.17 (*if*) dI' = ThyC.id_empty andalso dI = ThyC.id_empty (*else*);
88.18 - (*if*) pI' = Celem.e_pblID andalso pI = Celem.e_pblID (*else*);
88.19 + (*if*) pI' = Spec.e_pblID andalso pI = Spec.e_pblID (*else*);
88.20 val NONE = (*case*) find_first (is_error o #5) pbl (*of*);
88.21 val NONE = (*case*) nxt_add (ThyC.get_theory (if dI = ThyC.id_empty then dI' else dI)) oris pbt pbl (*of*);
88.22 (*if*) not preok (*else*);
89.1 --- a/test/Tools/isac/Test_Isac_Short.thy Tue Apr 21 12:26:08 2020 +0200
89.2 +++ b/test/Tools/isac/Test_Isac_Short.thy Tue Apr 21 15:42:50 2020 +0200
89.3 @@ -126,7 +126,7 @@
89.4 open Rewrite;
89.5 open Eval; get_pair;
89.6 open TermC; atomt;
89.7 - open Celem; e_pbt;
89.8 + open Celem;
89.9 open Rule;
89.10 open Rule_Set; Sequence;
89.11 open Exec_Def