src/Tools/isac/BaseDefinitions/method-def.sml
author wneuper <Walther.Neuper@jku.at>
Mon, 01 Jan 2024 11:31:16 +0100
changeset 60789 8fa678b678e8
parent 60589 151511356d54
permissions -rw-r--r--
Doc/Specify_Phase 4: start use antiquotations from isar-ref
     1 (* Title:  BaseDefstart_refineions/method-def.sml
     2    Author: Walther Neuper
     3    (c) due to copyright terms
     4 
     5 Here is a minimum of code required for Know_Store.thy.
     6 For main code see structure MethodC.
     7 *)
     8 signature METHOD_DEFINITION =
     9 sig
    10   type id = References_Def.id;
    11   val id_empty: id
    12   val id_to_string: id -> string
    13 
    14   type T
    15   val empty: T
    16 
    17   type store
    18   val empty_store: T Store.node
    19 
    20   val check_unique: Check_Unique.id -> T Store.T -> unit
    21 end
    22 
    23 (**)
    24 structure Meth_Def(**): METHOD_DEFINITION(**) =
    25 struct
    26 (**)
    27 
    28 type id = References_Def.id;
    29 val id_empty = References_Def.empty_meth_id;
    30 val id_to_string = References_Def.id_to_string;
    31 
    32 (* data for methods stored in 'methods'-database *)
    33 type T =                            (* TODO WN200620: review ---------------------vvvvv         *)
    34   {guh: Check_Unique.id,            (* unique within Isac_Knowledge, for html-presentation      *)
    35   mathauthors: string list,         (* copyright                                                *)
    36   start_refine: References_Def.id,  (* DEL: WN060721 pblID introduced mistakenly                *)
    37   rew_ord: Rewrite_Ord.id,          (* for ordered rewriting by Tactic.Rewrite                  *)
    38   rew_rls: Rule_Set.T,              (* for rewriting by Tactic.Rewrite                          *)
    39   asm_rls: Rule_Set.T,              (* for conditions in rewriting by Tactic.Rewrite            *)
    40 
    41   program: Rule.program,            (* filled in MethodC.prep_input                             *)
    42   prog_rls: Rule_Set.T,             (* for evaluating Prog_Expr                                 *)
    43   calc: Rule_Def.eval_ml_from_prog list,(* Eval.ml_from_prog filled in Auto_Prog, also in rls   *)
    44 
    45   model: Model_Pattern.T,           (* contains "#Given", "#Find", "#Relate"
    46                                        for constraints on identifiers see "O_Model.copy_name"   *)
    47   where_: term list,                (* ? DEL, as soon as they are input interactively ?         *)
    48   where_rls: Rule_Set.T,            (* for evaluation of preconditions in "#Where" on "#Given"  *)
    49   errpats: Error_Pattern_Def.T list (* error patterns expected in this method                   *)
    50 	};
    51 val empty = {guh = "met_empty", mathauthors = [], start_refine = id_empty, rew_ord = Rewrite_Ord.id_empty,
    52 	asm_rls = Rule_Set.empty, prog_rls = Rule_Set.empty, where_rls = Rule_Set.empty, calc = [], (*crls = Rule_Set.empty,*)
    53 	errpats = [], rew_rls = Rule_Set.empty, model = [], where_ = [], program = Rule.Empty_Prog};
    54 val empty_store = Store.Node ("empty_meth_id", [empty],[]);
    55 
    56 type store = (T Store.node) list;
    57 
    58 val check_unique =
    59   Check_Unique.message (Check_Unique.collect (#guh: T -> Check_Unique.id));
    60 
    61 (**)end(**)