src/Pure/isac/Scripts/Tools.thy
author Walther Neuper <neuper@ist.tugraz.at>
Wed, 21 Jul 2010 13:53:39 +0200
branchisac-from-Isabelle2009-2
changeset 37871 875b6efa7ced
child 37883 44bd7bdfdb33
permissions -rw-r--r--
added isac-hook in Pure/thm and isac-code
neuper@37871
     1
(* auxiliary functions used in scripts
neuper@37871
     2
   author: Walther Neuper 000301
neuper@37871
     3
   WN0509 shift into Atools ?!? (because used also in where of models !)
neuper@37871
     4
neuper@37871
     5
   (c) copyright due to lincense terms.
neuper@37871
     6
neuper@37871
     7
remove_thy"Tools";
neuper@37871
     8
use_thy"Scripts/Tools";
neuper@37871
     9
*)
neuper@37871
    10
neuper@37871
    11
theory Tools
neuper@37871
    12
imports ListG
neuper@37871
    13
begin
neuper@37871
    14
neuper@37871
    15
(*belongs to theory ListG*)
neuper@37871
    16
ML {*
neuper@37871
    17
val first_isac_thy = @{theory ListG}
neuper@37871
    18
*}
neuper@37871
    19
neuper@37871
    20
(*for Descript.thy*)
neuper@37871
    21
neuper@37871
    22
  (***********************************************************************)
neuper@37871
    23
  (* 'fun is_dsc' in Scripts/scrtools.smlMUST contain ALL these types !!!*)
neuper@37871
    24
  (***********************************************************************)
neuper@37871
    25
typedecl nam     (* named variables                                             *)
neuper@37871
    26
typedecl  una     (* unnamed variables                                           *)
neuper@37871
    27
typedecl  unl     (* unnamed variables of type list, elementwise input prohibited*)
neuper@37871
    28
typedecl  str     (* structured variables                                        *)
neuper@37871
    29
typedecl  toreal  (* var with undef real value: forces typing                    *)
neuper@37871
    30
typedecl  toreall (* var with undef real list value: forces typing               *)
neuper@37871
    31
typedecl  tobooll (* var with undef bool list value: forces typing               *)
neuper@37871
    32
typedecl  unknow  (* input without dsc in fmz=[]                                 *)
neuper@37871
    33
typedecl  cpy     (* UNUSED: copy-named variables
neuper@37871
    34
             identified by .._0, .._i .._' in pbt                        *)
neuper@37871
    35
  (***********************************************************************)
neuper@37871
    36
  (* 'fun is_dsc' in Scripts/scrtools.smlMUST contain ALL these types !!!*)
neuper@37871
    37
  (***********************************************************************)
neuper@37871
    38
  
neuper@37871
    39
consts
neuper@37871
    40
neuper@37871
    41
  UniversalList   :: "bool list"
neuper@37871
    42
neuper@37871
    43
  lhs             :: "bool => real"           (*of an equality*)
neuper@37871
    44
  rhs             :: "bool => real"           (*of an equality*)
neuper@37871
    45
  Vars            :: "'a => real list"        (*get the variables of a term *)
neuper@37871
    46
  matches         :: "['a, 'a] => bool"
neuper@37871
    47
  matchsub        :: "['a, 'a] => bool"
neuper@37871
    48
neuper@37871
    49
constdefs
neuper@37871
    50
  
neuper@37871
    51
  Testvar   :: "[real, 'a] => bool"  (*is a variable in a term: unused 6.5.03*)
neuper@37871
    52
 "Testvar v t == v mem (Vars t)"     (*by rewriting only,no Calcunused 6.5.03*)
neuper@37871
    53
neuper@37871
    54
end