test/Tools/isac/Specify/input-descript.sml
author wneuper <Walther.Neuper@jku.at>
Wed, 11 Jan 2023 11:38:01 +0100
changeset 60650 06ec8abfd3bc
parent 60373 9e906a2b3496
permissions -rw-r--r--
eliminate use of Thy_Info 12: TermC partially
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
"----------------------------------------------------------------------------------------------";
walther@59959
     8
"-------- distinguish input to I_Model --------------------------------------------------------";
wneuper@59596
     9
"----------------------------------------------------------------------------------------------";
wneuper@59596
    10
"----------------------------------------------------------------------------------------------";
wneuper@59596
    11
"----------------------------------------------------------------------------------------------";
wneuper@59596
    12
wneuper@59596
    13
walther@59959
    14
"-------- distinguish input to I_Model --------------------------------------------------------";
walther@59959
    15
"-------- distinguish input to I_Model --------------------------------------------------------";
walther@59959
    16
"-------- distinguish input to I_Model --------------------------------------------------------";
walther@59953
    17
"----- fun Input_Descript.for_bool_list -----";
walther@60336
    18
val t as Const (\<^const_name>\<open>Input_Descript.relations\<close>, 
wenzelm@60309
    19
  Type (\<^type_name>\<open>fun\<close>, [Type (\<^type_name>\<open>list\<close>, [Type (\<^type_name>\<open>bool\<close>,[])]), 
walther@60373
    20
    Type e(\<^type_name>\<open>una\<close>, [])])) = @{term "relations"};
Walther@60650
    21
TermC.atom_typ @{context} (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