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