src/Tools/isac/BaseDefinitions/method-def.sml
author wneuper <Walther.Neuper@jku.at>
Thu, 04 Aug 2022 12:48:37 +0200
changeset 60509 2e0b7ca391dc
parent 60475 4efa686417f0
child 60514 19bd2f740479
permissions -rw-r--r--
polish naming in Rewrite_Order
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@59919
     5
Here is a minimum of code required for Know_Store.thy.
walther@60154
     6
For main code see structure MethodC.
walther@59892
     7
*)
walther@59893
     8
signature METHOD_DEFINITION =
walther@59882
     9
sig
walther@59985
    10
  type id = References_Def.id;
walther@59903
    11
  val id_empty: id
walther@59903
    12
  val id_to_string: id -> string
walther@59903
    13
walther@59895
    14
  type T
walther@59895
    15
(*type met*)
walther@59895
    16
  val empty: T
walther@59895
    17
(*val e_met: T*)
walther@59895
    18
  type store
walther@59895
    19
(*type mets*)
walther@59897
    20
  val empty_store: T Store.node
walther@59897
    21
(*val e_Mets: T Store.node*)
walther@59904
    22
  val check_unique: Check_Unique.id -> T Store.T -> unit
walther@59904
    23
(*val check_metguh_unique: Check_Unique.id -> T Store.T -> unit*)
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@59985
    31
type id = References_Def.id;
walther@59985
    32
val id_empty = References_Def.empty_meth_id;
walther@59985
    33
val id_to_string = References_Def.id_to_string;
walther@59903
    34
walther@60022
    35
(* data for methods stored in 'methods'-database *)
walther@60022
    36
type T =                          (* TODO WN200620: review ---------------------vvvvv         *)
walther@60022
    37
  {guh       : Check_Unique.id,   (* unique within Isac_Knowledge, for html-presentation      *)
walther@60022
    38
  mathauthors: string list,       (* copyright                                                *)
walther@60022
    39
  init       : References_Def.id, (* DEL: WN060721 pblID introduced mistakenly                *)
Walther@60509
    40
  rew_ord'   : Rewrite_Ord.id,    (* for ordered rewriting by Tactic.Rewrite                  *)
walther@60022
    41
  erls       : Rule_Set.T,        (* for conditions in rewriting by Tactic.Rewrite            *)
walther@60022
    42
  srls       : Rule_Set.T,        (* for evaluating Prog_Expr                                 *)
walther@60022
    43
  crls       : Rule_Set.T,        (* DEL: for check_elementwise                               *)
walther@60022
    44
  nrls       : Rule_Set.T,        (* for rewriting by Tactic.Rewrite                          *)
walther@60022
    45
  errpats    : Error_Pattern_Def.T list, (* error patterns expected in this method            *)
walther@60022
    46
  calc       : Rule_Def.calc list,(* ?DEL                                                     *)
Walther@60469
    47
  scr        : Rule.program,      (* filled in MethodC.prep_input                             *)
walther@60022
    48
  prls       : Rule_Set.T,        (* for evaluation of preconditions in "#Where" on "#Given"  *)
walther@60022
    49
  ppc        : Model_Pattern.T,   (* contains "#Given", "#Where", "#Find", "#Relate"
Walther@60475
    50
                                     for constraints on identifiers see "O_Model.copy_name"   *)
walther@60022
    51
  pre        : term list          (* ? DEL, as soon as they are input interactively ?         *)
walther@60022
    52
	};
Walther@60509
    53
val empty = {guh = "met_empty", mathauthors = [], init = id_empty, rew_ord' = Rewrite_Ord.id_empty,
walther@59884
    54
	erls = Rule_Set.empty, srls = Rule_Set.empty, prls = Rule_Set.empty, calc = [], crls = Rule_Set.empty,
walther@59884
    55
	errpats = [], nrls = Rule_Set.empty, ppc = [], pre = [], scr = Rule.Empty_Prog};
walther@59903
    56
val empty_store = Store.Node ("empty_meth_id", [empty],[]);
walther@59884
    57
walther@59897
    58
type store = (T Store.node) list;
walther@59882
    59
walther@59895
    60
val check_unique =
walther@59904
    61
  Check_Unique.message (Check_Unique.collect (#guh: T -> Check_Unique.id));
walther@59892
    62
walther@59882
    63
(**)end(**)