# HG changeset patch # User wenzelm # Date 1267572782 -3600 # Node ID 8758fe1fc9f8b7b1e5cdd13237b77f0ea37c7ab7 # Parent df2862dc23a828d6d5773c2f93b3ffd7d044815a cleanup type translations; diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/AxSem.thy --- a/src/HOL/Bali/AxSem.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/AxSem.thy Wed Mar 03 00:33:02 2010 +0100 @@ -58,10 +58,9 @@ "\Vals:v. b" == "(\v. b) \ CONST the_In3" --{* relation on result values, state and auxiliary variables *} -types 'a assn = "res \ state \ 'a \ bool" +types 'a assn = "res \ state \ 'a \ bool" translations - "res" <= (type) "AxSem.res" - "a assn" <= (type) "vals \ state \ a \ bool" + (type) "'a assn" <= (type) "vals \ state \ 'a \ bool" definition assn_imp :: "'a assn \ 'a assn \ bool" (infixr "\" 25) where "P \ Q \ \Y s Z. P Y s Z \ Q Y s Z" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/Basis.thy --- a/src/HOL/Bali/Basis.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/Basis.thy Wed Mar 03 00:33:02 2010 +0100 @@ -213,11 +213,6 @@ *} (* e.g. lemmas is_stmt_rews = is_stmt_def [of "In1l x", simplified] *) -translations - "option"<= (type) "Option.option" - "list" <= (type) "List.list" - "sum3" <= (type) "Basis.sum3" - section "quantifiers for option type" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/Decl.thy --- a/src/HOL/Bali/Decl.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/Decl.thy Wed Mar 03 00:33:02 2010 +0100 @@ -149,24 +149,24 @@ access :: acc_modi translations - "decl" <= (type) "\access::acc_modi\" - "decl" <= (type) "\access::acc_modi,\::'a\" + (type) "decl" <= (type) "\access::acc_modi\" + (type) "decl" <= (type) "\access::acc_modi,\::'a\" subsection {* Member (field or method)*} record member = decl + static :: stat_modi translations - "member" <= (type) "\access::acc_modi,static::bool\" - "member" <= (type) "\access::acc_modi,static::bool,\::'a\" + (type) "member" <= (type) "\access::acc_modi,static::bool\" + (type) "member" <= (type) "\access::acc_modi,static::bool,\::'a\" subsection {* Field *} record field = member + type :: ty translations - "field" <= (type) "\access::acc_modi, static::bool, type::ty\" - "field" <= (type) "\access::acc_modi, static::bool, type::ty,\::'a\" + (type) "field" <= (type) "\access::acc_modi, static::bool, type::ty\" + (type) "field" <= (type) "\access::acc_modi, static::bool, type::ty,\::'a\" types fdecl (* field declaration, cf. 8.3 *) @@ -174,7 +174,7 @@ translations - "fdecl" <= (type) "vname \ field" + (type) "fdecl" <= (type) "vname \ field" subsection {* Method *} @@ -193,17 +193,17 @@ translations - "mhead" <= (type) "\access::acc_modi, static::bool, + (type) "mhead" <= (type) "\access::acc_modi, static::bool, pars::vname list, resT::ty\" - "mhead" <= (type) "\access::acc_modi, static::bool, + (type) "mhead" <= (type) "\access::acc_modi, static::bool, pars::vname list, resT::ty,\::'a\" - "mbody" <= (type) "\lcls::(vname \ ty) list,stmt::stmt\" - "mbody" <= (type) "\lcls::(vname \ ty) list,stmt::stmt,\::'a\" - "methd" <= (type) "\access::acc_modi, static::bool, + (type) "mbody" <= (type) "\lcls::(vname \ ty) list,stmt::stmt\" + (type) "mbody" <= (type) "\lcls::(vname \ ty) list,stmt::stmt,\::'a\" + (type) "methd" <= (type) "\access::acc_modi, static::bool, pars::vname list, resT::ty,mbody::mbody\" - "methd" <= (type) "\access::acc_modi, static::bool, + (type) "methd" <= (type) "\access::acc_modi, static::bool, pars::vname list, resT::ty,mbody::mbody,\::'a\" - "mdecl" <= (type) "sig \ methd" + (type) "mdecl" <= (type) "sig \ methd" definition mhead :: "methd \ mhead" where @@ -306,13 +306,13 @@ = "qtname \ iface" translations - "ibody" <= (type) "\access::acc_modi,imethods::(sig \ mhead) list\" - "ibody" <= (type) "\access::acc_modi,imethods::(sig \ mhead) list,\::'a\" - "iface" <= (type) "\access::acc_modi,imethods::(sig \ mhead) list, + (type) "ibody" <= (type) "\access::acc_modi,imethods::(sig \ mhead) list\" + (type) "ibody" <= (type) "\access::acc_modi,imethods::(sig \ mhead) list,\::'a\" + (type) "iface" <= (type) "\access::acc_modi,imethods::(sig \ mhead) list, isuperIfs::qtname list\" - "iface" <= (type) "\access::acc_modi,imethods::(sig \ mhead) list, + (type) "iface" <= (type) "\access::acc_modi,imethods::(sig \ mhead) list, isuperIfs::qtname list,\::'a\" - "idecl" <= (type) "qtname \ iface" + (type) "idecl" <= (type) "qtname \ iface" definition ibody :: "iface \ ibody" where "ibody i \ \access=access i,imethods=imethods i\" @@ -337,17 +337,17 @@ = "qtname \ class" translations - "cbody" <= (type) "\access::acc_modi,cfields::fdecl list, + (type) "cbody" <= (type) "\access::acc_modi,cfields::fdecl list, methods::mdecl list,init::stmt\" - "cbody" <= (type) "\access::acc_modi,cfields::fdecl list, + (type) "cbody" <= (type) "\access::acc_modi,cfields::fdecl list, methods::mdecl list,init::stmt,\::'a\" - "class" <= (type) "\access::acc_modi,cfields::fdecl list, + (type) "class" <= (type) "\access::acc_modi,cfields::fdecl list, methods::mdecl list,init::stmt, super::qtname,superIfs::qtname list\" - "class" <= (type) "\access::acc_modi,cfields::fdecl list, + (type) "class" <= (type) "\access::acc_modi,cfields::fdecl list, methods::mdecl list,init::stmt, super::qtname,superIfs::qtname list,\::'a\" - "cdecl" <= (type) "qtname \ class" + (type) "cdecl" <= (type) "qtname \ class" definition cbody :: "class \ cbody" where "cbody c \ \access=access c, cfields=cfields c,methods=methods c,init=init c\" @@ -404,8 +404,8 @@ "classes"::"cdecl list" translations - "prog"<= (type) "\ifaces::idecl list,classes::cdecl list\" - "prog"<= (type) "\ifaces::idecl list,classes::cdecl list,\::'a\" + (type) "prog" <= (type) "\ifaces::idecl list,classes::cdecl list\" + (type) "prog" <= (type) "\ifaces::idecl list,classes::cdecl list,\::'a\" abbreviation iface :: "prog \ (qtname, iface) table" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/DeclConcepts.thy --- a/src/HOL/Bali/DeclConcepts.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/DeclConcepts.thy Wed Mar 03 00:33:02 2010 +0100 @@ -1377,7 +1377,7 @@ fspec = "vname \ qtname" translations - "fspec" <= (type) "vname \ qtname" + (type) "fspec" <= (type) "vname \ qtname" definition imethds :: "prog \ qtname \ (sig,qtname \ mhead) tables" where "imethds G I diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/Eval.thy --- a/src/HOL/Bali/Eval.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/Eval.thy Wed Mar 03 00:33:02 2010 +0100 @@ -99,8 +99,8 @@ types vvar = "val \ (val \ state \ state)" vals = "(val, vvar, val list) sum3" translations - "vvar" <= (type) "val \ (val \ state \ state)" - "vals" <= (type)"(val, vvar, val list) sum3" + (type) "vvar" <= (type) "val \ (val \ state \ state)" + (type) "vals" <= (type) "(val, vvar, val list) sum3" text {* To avoid redundancy and to reduce the number of rules, there is only one evaluation rule for each syntactic term. This is also true for variables diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/Name.thy --- a/src/HOL/Bali/Name.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/Name.thy Wed Mar 03 00:33:02 2010 +0100 @@ -78,11 +78,7 @@ qtname_qtname_def: "qtname (q::'a qtname_ext_type) \ q" translations - "mname" <= "Name.mname" - "xname" <= "Name.xname" - "tname" <= "Name.tname" - "ename" <= "Name.ename" - "qtname" <= (type) "\pid::pname,tid::tname\" + (type) "qtname" <= (type) "\pid::pname,tid::tname\" (type) "'a qtname_scheme" <= (type) "\pid::pname,tid::tname,\::'a\" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/State.thy --- a/src/HOL/Bali/State.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/State.thy Wed Mar 03 00:33:02 2010 +0100 @@ -33,10 +33,10 @@ "values" :: "(vn, val) table" translations - "fspec" <= (type) "vname \ qtname" - "vn" <= (type) "fspec + int" - "obj" <= (type) "\tag::obj_tag, values::vn \ val option\" - "obj" <= (type) "\tag::obj_tag, values::vn \ val option,\::'a\" + (type) "fspec" <= (type) "vname \ qtname" + (type) "vn" <= (type) "fspec + int" + (type) "obj" <= (type) "\tag::obj_tag, values::vn \ val option\" + (type) "obj" <= (type) "\tag::obj_tag, values::vn \ val option,\::'a\" definition the_Arr :: "obj option \ ty \ int \ (vn, val) table" where "the_Arr obj \ SOME (T,k,t). obj = Some \tag=Arr T k,values=t\" @@ -134,7 +134,7 @@ translations "Heap" => "CONST Inl" "Stat" => "CONST Inr" - "oref" <= (type) "loc + qtname" + (type) "oref" <= (type) "loc + qtname" definition fields_table :: "prog \ qtname \ (fspec \ field \ bool) \ (fspec, ty) table" where "fields_table G C P @@ -213,9 +213,9 @@ = "(lname, val) table" *) (* defined in Value.thy local variables *) translations - "globs" <= (type) "(oref , obj) table" - "heap" <= (type) "(loc , obj) table" -(* "locals" <= (type) "(lname, val) table" *) + (type) "globs" <= (type) "(oref , obj) table" + (type) "heap" <= (type) "(loc , obj) table" +(* (type) "locals" <= (type) "(lname, val) table" *) datatype st = (* pure state, i.e. contents of all variables *) st globs locals @@ -567,10 +567,8 @@ state = "abopt \ st" --{* state including abruption information *} translations - "abopt" <= (type) "State.abrupt option" - "abopt" <= (type) "abrupt option" - "state" <= (type) "abopt \ State.st" - "state" <= (type) "abopt \ st" + (type) "abopt" <= (type) "abrupt option" + (type) "state" <= (type) "abopt \ st" abbreviation Norm :: "st \ state" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/Table.thy --- a/src/HOL/Bali/Table.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/Table.thy Wed Mar 03 00:33:02 2010 +0100 @@ -42,8 +42,7 @@ where "table_of \ map_of" translations - (type)"'a \ 'b" <= (type)"'a \ 'b Datatype.option" - (type)"('a, 'b) table" <= (type)"'a \ 'b" + (type) "('a, 'b) table" <= (type) "'a \ 'b" (* ### To map *) lemma map_add_find_left[simp]: diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/Term.thy --- a/src/HOL/Bali/Term.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/Term.thy Wed Mar 03 00:33:02 2010 +0100 @@ -88,7 +88,7 @@ statement *} translations - "locals" <= (type) "(lname, val) table" + (type) "locals" <= (type) "(lname, val) table" datatype inv_mode --{* invocation mode for method calls *} = Static --{* static *} @@ -100,8 +100,8 @@ parTs::"ty list" translations - "sig" <= (type) "\name::mname,parTs::ty list\" - "sig" <= (type) "\name::mname,parTs::ty list,\::'a\" + (type) "sig" <= (type) "\name::mname,parTs::ty list\" + (type) "sig" <= (type) "\name::mname,parTs::ty list,\::'a\" --{* function codes for unary operations *} datatype unop = UPlus -- {*{\tt +} unary plus*} @@ -237,11 +237,8 @@ types "term" = "(expr+stmt,var,expr list) sum3" translations - "sig" <= (type) "mname \ ty list" - "var" <= (type) "Term.var" - "expr" <= (type) "Term.expr" - "stmt" <= (type) "Term.stmt" - "term" <= (type) "(expr+stmt,var,expr list) sum3" + (type) "sig" <= (type) "mname \ ty list" + (type) "term" <= (type) "(expr+stmt,var,expr list) sum3" abbreviation this :: expr where "this == Acc (LVar This)" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/Type.thy --- a/src/HOL/Bali/Type.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/Type.thy Wed Mar 03 00:33:02 2010 +0100 @@ -30,11 +30,6 @@ = PrimT prim_ty --{* primitive type *} | RefT ref_ty --{* reference type *} -translations - "prim_ty" <= (type) "Type.prim_ty" - "ref_ty" <= (type) "Type.ref_ty" - "ty" <= (type) "Type.ty" - abbreviation "NT == RefT NullT" abbreviation "Iface I == RefT (IfaceT I)" abbreviation "Class C == RefT (ClassT C)" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/Value.thy --- a/src/HOL/Bali/Value.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/Value.thy Wed Mar 03 00:33:02 2010 +0100 @@ -17,9 +17,6 @@ | Addr loc --{* addresses, i.e. locations of objects *} -translations "val" <= (type) "Term.val" - "loc" <= (type) "Term.loc" - consts the_Bool :: "val \ bool" primrec "the_Bool (Bool b) = b" consts the_Intg :: "val \ int" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Bali/WellType.thy --- a/src/HOL/Bali/WellType.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Bali/WellType.thy Wed Mar 03 00:33:02 2010 +0100 @@ -37,10 +37,10 @@ lcl:: "lenv" --{* local environment *} translations - "lenv" <= (type) "(lname, ty) table" - "lenv" <= (type) "lname \ ty option" - "env" <= (type) "\prg::prog,cls::qtname,lcl::lenv\" - "env" <= (type) "\prg::prog,cls::qtname,lcl::lenv,\::'a\" + (type) "lenv" <= (type) "(lname, ty) table" + (type) "lenv" <= (type) "lname \ ty option" + (type) "env" <= (type) "\prg::prog,cls::qtname,lcl::lenv\" + (type) "env" <= (type) "\prg::prog,cls::qtname,lcl::lenv,\::'a\" abbreviation @@ -238,9 +238,9 @@ section "Typing for terms" -types tys = "ty + ty list" +types tys = "ty + ty list" translations - "tys" <= (type) "ty + ty list" + (type) "tys" <= (type) "ty + ty list" inductive diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/IMPP/Hoare.thy --- a/src/HOL/IMPP/Hoare.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/IMPP/Hoare.thy Wed Mar 03 00:33:02 2010 +0100 @@ -18,7 +18,7 @@ types 'a assn = "'a => state => bool" translations - "a assn" <= (type)"a => state => bool" + (type) "'a assn" <= (type) "'a => state => bool" definition state_not_singleton :: bool where diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/Library/Numeral_Type.thy --- a/src/HOL/Library/Numeral_Type.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/Library/Numeral_Type.thy Wed Mar 03 00:33:02 2010 +0100 @@ -32,7 +32,7 @@ syntax "_type_card" :: "type => nat" ("(1CARD/(1'(_')))") -translations "CARD(t)" => "CONST card (CONST UNIV \ t set)" +translations "CARD('t)" => "CONST card (CONST UNIV \ 't set)" typed_print_translation {* let diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/MicroJava/J/Decl.thy --- a/src/HOL/MicroJava/J/Decl.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/MicroJava/J/Decl.thy Wed Mar 03 00:33:02 2010 +0100 @@ -23,12 +23,12 @@ translations - "fdecl" <= (type) "vname \ ty" - "sig" <= (type) "mname \ ty list" - "mdecl c" <= (type) "sig \ ty \ c" - "class c" <= (type) "cname \ fdecl list \ (c mdecl) list" - "cdecl c" <= (type) "cname \ (c class)" - "prog c" <= (type) "(c cdecl) list" + (type) "fdecl" <= (type) "vname \ ty" + (type) "sig" <= (type) "mname \ ty list" + (type) "'c mdecl" <= (type) "sig \ ty \ 'c" + (type) "'c class" <= (type) "cname \ fdecl list \ ('c mdecl) list" + (type) "'c cdecl" <= (type) "cname \ ('c class)" + (type) "'c prog" <= (type) "('c cdecl) list" definition "class" :: "'c prog => (cname \ 'c class)" where diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/NanoJava/AxSem.thy --- a/src/HOL/NanoJava/AxSem.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/NanoJava/AxSem.thy Wed Mar 03 00:33:02 2010 +0100 @@ -13,10 +13,10 @@ triple = "assn \ stmt \ assn" etriple = "assn \ expr \ vassn" translations - "assn" \ (type)"state => bool" - "vassn" \ (type)"val => assn" - "triple" \ (type)"assn \ stmt \ assn" - "etriple" \ (type)"assn \ expr \ vassn" + (type) "assn" \ (type) "state => bool" + (type) "vassn" \ (type) "val => assn" + (type) "triple" \ (type) "assn \ stmt \ assn" + (type) "etriple" \ (type) "assn \ expr \ vassn" subsection "Hoare Logic Rules" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/NanoJava/Decl.thy --- a/src/HOL/NanoJava/Decl.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/NanoJava/Decl.thy Wed Mar 03 00:33:02 2010 +0100 @@ -38,11 +38,11 @@ = "cdecl list" translations - "fdecl" \ (type)"fname \ ty" - "mdecl" \ (type)"mname \ ty \ ty \ stmt" - "class" \ (type)"cname \ fdecl list \ mdecl list" - "cdecl" \ (type)"cname \ class" - "prog " \ (type)"cdecl list" + (type) "fdecl" \ (type) "fname \ ty" + (type) "mdecl" \ (type) "mname \ ty \ ty \ stmt" + (type) "class" \ (type) "cname \ fdecl list \ mdecl list" + (type) "cdecl" \ (type) "cname \ class" + (type) "prog " \ (type) "cdecl list" consts diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOL/NanoJava/State.thy --- a/src/HOL/NanoJava/State.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOL/NanoJava/State.thy Wed Mar 03 00:33:02 2010 +0100 @@ -23,9 +23,8 @@ obj = "cname \ fields" translations - - "fields" \ (type)"fname => val option" - "obj" \ (type)"cname \ fields" + (type) "fields" \ (type) "fname => val option" + (type) "obj" \ (type) "cname \ fields" definition init_vars :: "('a \ 'b) => ('a \ val)" where "init_vars m == Option.map (\T. Null) o m" @@ -40,10 +39,9 @@ locals :: locals translations - - "heap" \ (type)"loc => obj option" - "locals" \ (type)"vname => val option" - "state" \ (type)"(|heap :: heap, locals :: locals|)" + (type) "heap" \ (type) "loc => obj option" + (type) "locals" \ (type) "vname => val option" + (type) "state" \ (type) "(|heap :: heap, locals :: locals|)" definition del_locs :: "state => state" where "del_locs s \ s (| locals := empty |)" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOLCF/One.thy --- a/src/HOLCF/One.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOLCF/One.thy Wed Mar 03 00:33:02 2010 +0100 @@ -10,7 +10,7 @@ types one = "unit lift" translations - "one" <= (type) "unit lift" + (type) "one" <= (type) "unit lift" definition ONE :: "one" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOLCF/Representable.thy --- a/src/HOLCF/Representable.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOLCF/Representable.thy Wed Mar 03 00:33:02 2010 +0100 @@ -49,7 +49,7 @@ text "A TypeRep is an algebraic deflation over the universe of values." types TypeRep = "udom alg_defl" -translations "TypeRep" \ (type) "udom alg_defl" +translations (type) "TypeRep" \ (type) "udom alg_defl" definition Rep_of :: "'a::rep itself \ TypeRep" @@ -59,7 +59,7 @@ (emb oo (approx i :: 'a \ 'a) oo prj)))" syntax "_REP" :: "type \ TypeRep" ("(1REP/(1'(_')))") -translations "REP(t)" \ "CONST Rep_of TYPE(t)" +translations "REP('t)" \ "CONST Rep_of TYPE('t)" lemma cast_REP: "cast\REP('a::rep) = (emb::'a \ udom) oo (prj::udom \ 'a)" diff -r df2862dc23a8 -r 8758fe1fc9f8 src/HOLCF/Tr.thy --- a/src/HOLCF/Tr.thy Wed Mar 03 00:32:14 2010 +0100 +++ b/src/HOLCF/Tr.thy Wed Mar 03 00:33:02 2010 +0100 @@ -14,7 +14,7 @@ tr = "bool lift" translations - "tr" <= (type) "bool lift" + (type) "tr" <= (type) "bool lift" definition TT :: "tr" where