src/HOLCF/IOA/Modelcheck/MuIOA.thy
changeset 37678 0040bafffdef
parent 37391 476270a6c2dc
equal deleted inserted replaced
37677:c5a8b612e571 37678:0040bafffdef
    32 
    32 
    33 local
    33 local
    34 
    34 
    35 exception malformed;
    35 exception malformed;
    36 
    36 
    37 fun fst_type (Type(@{type_name "*"},[a,_])) = a |
    37 fun fst_type (Type(@{type_name prod},[a,_])) = a |
    38 fst_type _ = raise malformed; 
    38 fst_type _ = raise malformed; 
    39 fun snd_type (Type(@{type_name "*"},[_,a])) = a |
    39 fun snd_type (Type(@{type_name prod},[_,a])) = a |
    40 snd_type _ = raise malformed;
    40 snd_type _ = raise malformed;
    41 
    41 
    42 fun element_type (Type("set",[a])) = a |
    42 fun element_type (Type("set",[a])) = a |
    43 element_type t = raise malformed;
    43 element_type t = raise malformed;
    44 
    44 
   119                 then  (let val (_::_::_::s) = xs in delete_ul s end)
   119                 then  (let val (_::_::_::s) = xs in delete_ul s end)
   120                 else (x::delete_ul xs));
   120                 else (x::delete_ul xs));
   121 
   121 
   122 fun delete_ul_string s = implode(delete_ul (explode s));
   122 fun delete_ul_string s = implode(delete_ul (explode s));
   123 
   123 
   124 fun type_list_of sign (Type(@{type_name "*"},a::b::_)) = (type_list_of sign a) @ (type_list_of sign b) |
   124 fun type_list_of sign (Type(@{type_name prod},a::b::_)) = (type_list_of sign a) @ (type_list_of sign b) |
   125 type_list_of sign a = [(Syntax.string_of_typ_global sign a)];
   125 type_list_of sign a = [(Syntax.string_of_typ_global sign a)];
   126 
   126 
   127 fun structured_tuple l (Type(@{type_name "*"},s::t::_)) =
   127 fun structured_tuple l (Type(@{type_name prod},s::t::_)) =
   128 let
   128 let
   129 val (r,str) = structured_tuple l s;
   129 val (r,str) = structured_tuple l s;
   130 in
   130 in
   131 (fst(structured_tuple r t),"(" ^ str ^ "),(" ^ (snd(structured_tuple r t)) ^ ")")
   131 (fst(structured_tuple r t),"(" ^ str ^ "),(" ^ (snd(structured_tuple r t)) ^ ")")
   132 end |
   132 end |