src/Tools/isac/BaseDefinitions/method-def.sml
author Walther Neuper <walther.neuper@jku.at>
Tue, 21 Apr 2020 10:53:04 +0200
changeset 59895 454fad8ab67a
parent 59893 3479b100fbcc
child 59897 8cba439d0454
permissions -rw-r--r--
derive Method.T from Meth_Def.T, drop funs and types used by Know_Store
     1 (* Title:  BaseDefinitions/method-def.sml
     2    Author: Walther Neuper
     3    (c) due to copyright terms
     4 
     5 Will be enhanced by Method later.
     6 *)
     7 signature METHOD_DEFINITION =
     8 sig
     9   type T
    10 (*type met*)
    11   val empty: T
    12 (*val e_met: T*)
    13   type store
    14 (*type mets*)
    15   val empty_store: T Store.ptyp
    16 (*val e_Mets: T Store.ptyp*)
    17   val check_unique: Check_Unique.guh -> T Store.ptyp list -> unit
    18 (*val check_metguh_unique: Check_Unique.guh -> T Store.ptyp list -> unit*)
    19 (* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
    20   (*NONE*)
    21 (*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
    22   (*NONE*)
    23 ( *\--- ! aktivate for Test_Isac END ----------------------------------------------------------/*)
    24 end
    25 
    26 (**)
    27 structure Meth_Def(**): METHOD_DEFINITION(**) =
    28 struct
    29 (**)
    30 
    31 (* data for methods stored in 'methods'-database*)
    32 type T = 
    33      {guh        : Check_Unique.guh,             (* unique within this isac-knowledge             *)
    34       mathauthors: string list,     (* copyright                                     *)
    35       init       : Spec.pblID,           (* WN060721 introduced mistakenly--TODO.REMOVE!  *)
    36       rew_ord'   : Rule_Def.rew_ord',  (* for rules in Detail                           
    37 			                                 TODO.WN0509 store fun itself, see 'type pbt'  *)
    38       erls       : Rule_Set.T,        (* the eval_rls for cond. in rules FIXME "rls'   
    39 				                               instead erls in "fun prep_met"                *)
    40       srls       : Rule_Set.T,        (* for evaluating list expressions in scr        *)
    41       crls       : Rule_Set.T,        (* for check_elementwise, ie. formulae in calc.  *)
    42       nrls       : Rule_Set.T,        (* canonical simplifier specific for this met    *)
    43       errpats    : Error_Fill_Def.errpat list,(* error patterns expected in this method        *)
    44       calc       : Rule_Def.calc list, (* Theory_Data in fun prep_met                   *)
    45       (*branch   : TransitiveB set in append_problem at generation ob pblobj         *)
    46       scr        : Rule.program,    (* progam, empty as @{thm refl} or Rfuns         *)
    47 (*TODO: abstract to ?pre_model?...*)
    48       prls       : Rule_Set.T,        (* for evaluating predicates in modelpattern     *)
    49       ppc        : Celem4.pat list,        (* items in given, find, relate;
    50 	      items (in "#Find") which need not occur in the arg-list of a SubProblem
    51         are 'copy-named' with an identifier "*'.'".
    52         copy-named items are 'generating' if they are NOT "*'''" ?WN120516??
    53         see ME/calchead.sml 'fun is_copy_named'.                                     *)
    54       pre        : term list        (* preconditions in where                        *)
    55 	   };
    56 val empty = {guh = "met_empty", mathauthors = [], init = Spec.e_metID, rew_ord' = Rewrite_Ord.e_rew_ord',
    57 	erls = Rule_Set.empty, srls = Rule_Set.empty, prls = Rule_Set.empty, calc = [], crls = Rule_Set.empty,
    58 	errpats = [], nrls = Rule_Set.empty, ppc = [], pre = [], scr = Rule.Empty_Prog};
    59 val empty_store = Store.Ptyp ("e_metID", [empty],[]);
    60 
    61 type store = (T Store.ptyp) list;
    62 (*\------- to Celem6 -------/*)
    63 
    64 val check_unique =
    65   Check_Unique.message (Check_Unique.collect (#guh: T -> Check_Unique.guh));
    66 
    67 (**)end(**)