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)
     1 (* Title: "Specify/input-descript.sml"
     2    Author: Walther Neuper 060605
     3    (c) due to copyright terms
     4 *)
     5 "----------------------------------------------------------------------------------------------";
     6 "table of contents ----------------------------------------------------------------------------";
     7 "----------------------------------------------------------------------------------------------";
     8 "-------- distinguish input to Model ----------------------------------------------------------";
     9 "----------------------------------------------------------------------------------------------";
    10 "----------------------------------------------------------------------------------------------";
    11 "----------------------------------------------------------------------------------------------";
    12 
    13 
    14 "-------- distinguish input to Model ----------------------------------------------------------";
    15 "-------- distinguish input to Model ----------------------------------------------------------";
    16 "-------- distinguish input to Model ----------------------------------------------------------";
    17 "----- fun Input_Descript.for_bool_list -----";
    18 val t as Const ("Input_Descript.relations", 
    19   Type ("fun", [Type ("List.list", [Type ("HOL.bool",[])]), 
    20     Type ("Input_Descript.una", [])])) = @{term "relations"};
    21 atomtyp (type_of t);
    22 if Input_Descript.for_bool_list t then () else error "Input_Descript.for_bool_list changed";
    23 "----- fun Input_Descript.for_real -----";
    24 if not (Input_Descript.for_real t) then () else error "Input_Descript.for_real changed";
    25 
    26 "----- fun is_list_dsc -----";
    27 val t = @{term "someList"};
    28 if is_list_dsc t then () else error "is_list_dsc changed 1";
    29 
    30 val t = @{term "additionalRels [a=b,c=(d::real)]"};
    31 if is_list_dsc t then () else error "is_list_dsc changed 2";
    32 if is_list_dsc (head_of t) then () else error "is_list_dsc changed 3";
    33 
    34 "----- fun is_list_dsc -----";
    35 val t = @{term "maximum"};
    36 if Input_Descript.is_a t then () else error "Input_Descript.is_a changed 1";
    37 
    38 val t = head_of @{term "maximum A"};
    39 if Input_Descript.is_a t then () else error "Input_Descript.is_a changed 2";
    40 
    41 val t = head_of @{term "fixedValues [R=(R::real)]"};
    42 if Input_Descript.is_a t then () else error "Input_Descript.is_a changed 3";
    43