test/Tools/isac/Specify/input-descript.sml
author Walther Neuper <walther.neuper@jku.at>
Sat, 09 May 2020 11:55:51 +0200
changeset 59953 933211a252f2
parent 59596 2d99bdf0fdaf
child 59959 0f0718c61f68
permissions -rw-r--r--
shift code to Input_Descript, rename identifiers (+ keep old)
wneuper@59596
     1
(* Title: "Specify/input-descript.sml"
wneuper@59596
     2
   Author: Walther Neuper 060605
wneuper@59596
     3
   (c) due to copyright terms
wneuper@59596
     4
*)
wneuper@59596
     5
"----------------------------------------------------------------------------------------------";
wneuper@59596
     6
"table of contents ----------------------------------------------------------------------------";
wneuper@59596
     7
"----------------------------------------------------------------------------------------------";
wneuper@59596
     8
"-------- distinguish input to Model ----------------------------------------------------------";
wneuper@59596
     9
"----------------------------------------------------------------------------------------------";
wneuper@59596
    10
"----------------------------------------------------------------------------------------------";
wneuper@59596
    11
"----------------------------------------------------------------------------------------------";
wneuper@59596
    12
wneuper@59596
    13
wneuper@59596
    14
"-------- distinguish input to Model ----------------------------------------------------------";
wneuper@59596
    15
"-------- distinguish input to Model ----------------------------------------------------------";
wneuper@59596
    16
"-------- distinguish input to Model ----------------------------------------------------------";
walther@59953
    17
"----- fun Input_Descript.for_bool_list -----";
wneuper@59596
    18
val t as Const ("Input_Descript.relations", 
wneuper@59596
    19
  Type ("fun", [Type ("List.list", [Type ("HOL.bool",[])]), 
wneuper@59596
    20
    Type ("Input_Descript.una", [])])) = @{term "relations"};
wneuper@59596
    21
atomtyp (type_of t);
walther@59953
    22
if Input_Descript.for_bool_list t then () else error "Input_Descript.for_bool_list changed";
walther@59953
    23
"----- fun Input_Descript.for_real -----";
walther@59953
    24
if not (Input_Descript.for_real t) then () else error "Input_Descript.for_real changed";
wneuper@59596
    25
wneuper@59596
    26
"----- fun is_list_dsc -----";
wneuper@59596
    27
val t = @{term "someList"};
wneuper@59596
    28
if is_list_dsc t then () else error "is_list_dsc changed 1";
wneuper@59596
    29
wneuper@59596
    30
val t = @{term "additionalRels [a=b,c=(d::real)]"};
wneuper@59596
    31
if is_list_dsc t then () else error "is_list_dsc changed 2";
wneuper@59596
    32
if is_list_dsc (head_of t) then () else error "is_list_dsc changed 3";
wneuper@59596
    33
wneuper@59596
    34
"----- fun is_list_dsc -----";
wneuper@59596
    35
val t = @{term "maximum"};
walther@59953
    36
if Input_Descript.is_a t then () else error "Input_Descript.is_a changed 1";
wneuper@59596
    37
wneuper@59596
    38
val t = head_of @{term "maximum A"};
walther@59953
    39
if Input_Descript.is_a t then () else error "Input_Descript.is_a changed 2";
wneuper@59596
    40
wneuper@59596
    41
val t = head_of @{term "fixedValues [R=(R::real)]"};
walther@59953
    42
if Input_Descript.is_a t then () else error "Input_Descript.is_a changed 3";
wneuper@59596
    43