src/Tools/isac/BaseDefinitions/method-def.sml
author Walther Neuper <walther.neuper@jku.at>
Mon, 29 Jun 2020 15:43:35 +0200
changeset 60022 979ecb48e909
parent 59985 9aaeab7d38b6
child 60154 2ab0d1523731
permissions -rw-r--r--
code polishing
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@59919
     6
For main code see structure Method.
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
(* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *)
walther@59882
    25
  (*NONE*)
walther@59886
    26
(*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* )
walther@59882
    27
  (*NONE*)
walther@59886
    28
( *\--- ! aktivate for Test_Isac END ----------------------------------------------------------/*)
walther@59882
    29
end
walther@59882
    30
walther@59882
    31
(**)
walther@59893
    32
structure Meth_Def(**): METHOD_DEFINITION(**) =
walther@59882
    33
struct
walther@59882
    34
(**)
walther@59882
    35
walther@59985
    36
type id = References_Def.id;
walther@59985
    37
val id_empty = References_Def.empty_meth_id;
walther@59985
    38
val id_to_string = References_Def.id_to_string;
walther@59903
    39
walther@60022
    40
(* data for methods stored in 'methods'-database *)
walther@60022
    41
type T =                          (* TODO WN200620: review ---------------------vvvvv         *)
walther@60022
    42
  {guh       : Check_Unique.id,   (* unique within Isac_Knowledge, for html-presentation      *)
walther@60022
    43
  mathauthors: string list,       (* copyright                                                *)
walther@60022
    44
  init       : References_Def.id, (* DEL: WN060721 pblID introduced mistakenly                *)
walther@60022
    45
  rew_ord'   : Rule_Def.rew_ord', (* for ordered rewriting by Tactic.Rewrite                  *)
walther@60022
    46
  erls       : Rule_Set.T,        (* for conditions in rewriting by Tactic.Rewrite            *)
walther@60022
    47
  srls       : Rule_Set.T,        (* for evaluating Prog_Expr                                 *)
walther@60022
    48
  crls       : Rule_Set.T,        (* DEL: for check_elementwise                               *)
walther@60022
    49
  nrls       : Rule_Set.T,        (* for rewriting by Tactic.Rewrite                          *)
walther@60022
    50
  errpats    : Error_Pattern_Def.T list, (* error patterns expected in this method            *)
walther@60022
    51
  calc       : Rule_Def.calc list,(* ?DEL                                                     *)
walther@60022
    52
  scr        : Rule.program,      (* filled in Method.prep_input                              *)
walther@60022
    53
  prls       : Rule_Set.T,        (* for evaluation of preconditions in "#Where" on "#Given"  *)
walther@60022
    54
  ppc        : Model_Pattern.T,   (* contains "#Given", "#Where", "#Find", "#Relate"
walther@60022
    55
                                     for constraints on identifiers see "O_Model.cpy_nam"     *)
walther@60022
    56
  pre        : term list          (* ? DEL, as soon as they are input interactively ?         *)
walther@60022
    57
	};
walther@59903
    58
val empty = {guh = "met_empty", mathauthors = [], init = id_empty, rew_ord' = Rewrite_Ord.e_rew_ord',
walther@59884
    59
	erls = Rule_Set.empty, srls = Rule_Set.empty, prls = Rule_Set.empty, calc = [], crls = Rule_Set.empty,
walther@59884
    60
	errpats = [], nrls = Rule_Set.empty, ppc = [], pre = [], scr = Rule.Empty_Prog};
walther@59903
    61
val empty_store = Store.Node ("empty_meth_id", [empty],[]);
walther@59884
    62
walther@59897
    63
type store = (T Store.node) list;
walther@59882
    64
walther@59895
    65
val check_unique =
walther@59904
    66
  Check_Unique.message (Check_Unique.collect (#guh: T -> Check_Unique.id));
walther@59892
    67
walther@59882
    68
(**)end(**)