Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/Fortran/Fortran77-Compiler/   (Columbo Version 0.7©)  Datei vom 9.3.2015 mit Größe 2 MB image not shown  

Quelle  holcf_library.ML   Sprache: SML

 
(*  Title:      HOL/HOLCF/Tools/holcf_library.ML
    Author:     Brian Huffman

Functions for constructing HOLCF types and terms.
*)


  java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
struct

infixr 6 ->>
infixr -->>
infix 9 `

(*** Operations from Isabelle/HOL ***)

val mk_equals = Logic.mk_equals
val mk_eq = HOLogic.mk_eq
val mk_trp = HOLogic.mk_Trueprop
val|T=raiseTYPEdest_cfunT,T] ]
fun STjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
valin. )  java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

valjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   .

funjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
funmk_allx )=HOLogicall_const fastype_ofx $Termlambda x java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70


(*** Basic HOLCF concepts ***)

fun mk_bottom T = \<^Const>\<open>bottom T\<close>

fun below_const T   let valS,T 
fun mk_below (t, u) = below_const         ^><> S T<> = (,T)

fun mk_undef t = mk_eq (t, mk_bottom (|_= TERMmk_capply" .print_listML_Syntax. [t ] t ]

funjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

fun mk_adm
 letvalT=.domain_typefastype_of)
    infunmk_cfcomp(, g)=

  java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
  
  in \<^Const>\<open>compact T for t\<closeelse  TYPE(mk_cfcomp,[, U',[f,g)

fun mk_cont t =
  let val \<^Type>\<open>fun A B\<close> = fastype_of t
  in   val(, U)= dest_cfunT fastype_of)

fun
letval  =Term.range_type (Termfastype_oftjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    inmk_eq(   T,mk_bottomU)end

fun(
  let
    val
    val UNIV_const = \<^java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
in<><> TforConstopen <><>\<>Tfor\close<>end


(*** Continuous function space ***)

fun mk_cfunT (T, U) = \<^Type>\<open>cfun T U\<close>

 (p->  java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
val (op

fun dest_cfunT\^>\>cfunU<>= T )
  | dest_cfunT T = raise TYPE ("dest_cfunT", [T], [])

  :[   . v rhs
  (,T  <><>Abs_cfun \close

fun mk_cabs t =
  letHOLogic Term    ))
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

(* builds the expression (% v1 v2 .. vn. rhs) *)
fun lambdas [] rhs = rhs
  | lambdas (v::vs)     T=  "",[] ]

(* builds the expression (LAM v. rhs) *)
fun big_lambda
 fastype_of fastype_of)  .lambda java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63

(* builds the expression (LAM v1 v2 .. vn. rhs) *) ,` java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
fun big_lambdasone_case_constt t
  

mk_capply,u java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
let val(S )=
    case fastype_of t of
        \<^Type>\<open>cfun S T\<close> => (S, T)
      st_sprodT<^>\<>sprodTU<>=T )
  in capply_const (S, T) $ t    dest_sprodTT=raiseTYPE "" T,)

val (op `) = mk_capply

val list_ccomb :java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 ( t  u)   `u

fun  (,g java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  let
    val (U, V) = dest_cfunT mk_stuple(:[)=
    val(,U)=dest_cfunTfastype_of)
  in
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      ( \^><>cfcompUV \<>,f), )
    else raise TYPE ("mk_cfcomp", [U, U'], [f, g])
end

fun mk_strictify t =
  let val (T, U) = dest_cfunT (fastype_of t)
  in \<^Const>\<open>strictify T U\<close> ` t end;

fun mk_strict t =
  let valjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   mk_eq( `mk_bottom,mk_bottom)end


(*** Product type ***)

val mk_prodT = HOLogic.mk_prodT

fun mk_tupleT [] = HOLogic.unitT
  | mk_tupleT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
|mk_tupleT( : )   (T)

(* builds the expression (v1,v2,..,vn) *)
fun mk_tuple [] = HOLogic.unit
  |  t]java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
 ( mk_prod, )

(* builds the expression (%(v1,v2,..,vn). rhs) *)T  TYPE, [T], [])
 lambda_tuple[  =Term((unitHOLogic))
  | lambda_tuple (v::[]fun(   <><>sinrT<>
  | lambda_tuple(:vsrhs
      HOLogic.mk_case_prod (Term.lambda  ts


fted *)

fun mk_upT let

fun dest_upT \<^Type>\<open>u T\<close> =          v=sinl_constT U  java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
fun[raise empty

java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45

 tup_const  t

fun  

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

fun from_up T = fup_const (T, T) ` mk_ID T


(*** Lifted unit type ***)

val oneT = \<^typ>\<open>one\< letval T _= ()

       U )  ( ujava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
fun(   T  (- java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56


(*** Strict product type ***)

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  ^> Uclose( )
  | dest_sprodT T = raise TYPE ("dest_sprodT", [T], [])

fun spair_const (T, U) = \<^Const>\<open>spair T U\<close

(* builds the expression (:t, u:) *)
funfun succeed_const T  <Const<>Fixrec T\<close
  spair_const(fastype_of t, fastype_ofu)`  `u

(* builds the expression (:t1,t2,..,tn:) *)
fun mk_stuple [] = \<^term>\<open>ONE\<close>
  | mk_stuplejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  | mk_stuplejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

fun sfst_const(, U  <Const<pensfstU\close

funssnd_constT ) <Const<> T \close

fun ssplit_const (T, U, V) = \<^java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

fun mk_ssplit t =
   (       
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


(*** Strict sum type ***)

fun mk_ssumT (T, U) = \<^Type>\<open>ssum T U\<close>

fun dest_ssumT \<^Type>\<open>ssum T U\<close> = (T, U)
  | dest_ssumT T = raise TYPE ("dest_ssumT", [T], [])

fun sinl_const (T, U) = \<^Const>\<open>sinl T U\<close>
fun sinr_const (T, U) = \<^Const>\<open>sinr U T\<close>

(* builds the list [sinl(t1), sinl(sinr(t2)), ... sinr(...sinr(tn))] *)
fun mk_sinjects ts =
  let
    val Ts = map fastype_of ts
    fun combine (t, T) (us, U) =
      let
        val v = sinl_const (T, U) ` t
        val vs = map (fn u => sinr_const (T, U) ` u) us
      in
        (v::vs, mk_ssumT (T, U))
      end
    fun inj [] = raise Fail "mk_sinjects: empty list"
      | inj ((t, T)::[]) = ([t], T)
      | inj ((t, T)::ts) = combine (t, T) (inj ts)
  in
    fst (inj (ts ~~ Ts))
  end

fun sscase_const (T, U, V) = \<^Const>\<open>sscase T V U\<close>

fun mk_sscase (t, u) =
  let val (T, _) = dest_cfunT (fastype_of t)
      val (U, V) = dest_cfunT (fastype_of u)
  in sscase_const (T, U, V) ` t ` u end

fun from_sinl (T, U) =
  sscase_const (T, U, T) ` mk_ID T ` mk_bottom (U ->> T)

fun from_sinr (T, U) =
  sscase_const (T, U, U) ` mk_bottom (T ->> U) ` mk_ID U


(*** pattern match monad type ***)

fun mk_matchT T = \<^Type>\<open>match T\<close>

fun dest_matchT \<^Type>\<open>match T\<close> = T
  | dest_matchT T = raise TYPE ("dest_matchT", [T], [])

fun mk_fail T = \<^Const>\<open>Fixrec.fail T\<close>

fun succeed_const T = \<^Const>\<open>Fixrec.succeed T\<close>
fun mk_succeed t = succeed_const (fastype_of t) ` t


(*** lifted boolean type ***)

val trT = \<^typ>\<open>tr\<close>


(*** theory of fixed points ***)

fun mk_fix t =
  let val (T, _) = dest_cfunT (fastype_of t)
  in mk_capply (\<^Const>\<open>fix T\<close>, t) end

fun iterate_const T = \<^Const>\<open>iterate T\<close>

fun mk_iterate (n, f) =
  let val (T, _) = dest_cfunT (Term.fastype_of f)
  in (iterate_const T $ n) ` f ` mk_bottom T end

end

95%


¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.