diff -r f075640b8868 -r 3abf6a722518 src/HOL/MicroJava/J/WellType.thy --- a/src/HOL/MicroJava/J/WellType.thy Tue Jan 16 09:12:16 2018 +0100 +++ b/src/HOL/MicroJava/J/WellType.thy Tue Jan 16 09:30:00 2018 +0100 @@ -38,14 +38,14 @@ list_all2 (\T T'. G\T\T') pTs pTs'" definition appl_methds :: "'c prog \ cname \ sig \ ((ty \ ty) \ ty list) set" - \ "applicable methods, cf. 15.11.2.1" + \ \applicable methods, cf. 15.11.2.1\ where "appl_methds G C == \(mn, pTs). {((Class md,rT),pTs') |md rT mb pTs'. method (G,C) (mn, pTs') = Some (md,rT,mb) \ list_all2 (\T T'. G\T\T') pTs pTs'}" definition max_spec :: "'c prog \ cname \ sig \ ((ty \ ty) \ ty list) set" - \ "maximally specific methods, cf. 15.11.2.2" + \ \maximally specific methods, cf. 15.11.2.2\ where "max_spec G C sig == {m. m \appl_methds G C sig \ (\m'\appl_methds G C sig. more_spec G m' m --> m' = m)}" @@ -96,8 +96,8 @@ type_synonym java_mb = "vname list \ (vname \ ty) list \ stmt \ expr" -\ "method body with parameter names, local variables, block, result expression." -\ "local variables might include This, which is hidden anyway" +\ \method body with parameter names, local variables, block, result expression.\ +\ \local variables might include This, which is hidden anyway\ inductive ty_expr :: "'c env => expr => ty => bool" ("_ \ _ :: _" [51, 51, 51] 50) @@ -106,19 +106,19 @@ where NewC: "[| is_class (prg E) C |] ==> - E\NewC C::Class C" \ "cf. 15.8" + E\NewC C::Class C" \ \cf. 15.8\ - \ "cf. 15.15" + \ \cf. 15.15\ | Cast: "[| E\e::C; is_class (prg E) D; prg E\C\? Class D |] ==> E\Cast D e:: Class D" - \ "cf. 15.7.1" + \ \cf. 15.7.1\ | Lit: "[| typeof (\v. None) x = Some T |] ==> E\Lit x::T" - \ "cf. 15.13.1" + \ \cf. 15.13.1\ | LAcc: "[| localT E v = Some T; is_type (prg E) T |] ==> E\LAcc v::T" @@ -128,42 +128,42 @@ else T' = T \ T = PrimT Integer|] ==> E\BinOp bop e1 e2::T'" - \ "cf. 15.25, 15.25.1" + \ \cf. 15.25, 15.25.1\ | LAss: "[| v ~= This; E\LAcc v::T; E\e::T'; prg E\T'\T |] ==> E\v::=e::T'" - \ "cf. 15.10.1" + \ \cf. 15.10.1\ | FAcc: "[| E\a::Class C; field (prg E,C) fn = Some (fd,fT) |] ==> E\{fd}a..fn::fT" - \ "cf. 15.25, 15.25.1" + \ \cf. 15.25, 15.25.1\ | FAss: "[| E\{fd}a..fn::T; E\v ::T'; prg E\T'\T |] ==> E\{fd}a..fn:=v::T'" - \ "cf. 15.11.1, 15.11.2, 15.11.3" + \ \cf. 15.11.1, 15.11.2, 15.11.3\ | Call: "[| E\a::Class C; E\ps[::]pTs; max_spec (prg E) C (mn, pTs) = {((md,rT),pTs')} |] ==> E\{C}a..mn({pTs'}ps)::rT" -\ "well-typed expression lists" +\ \well-typed expression lists\ - \ "cf. 15.11.???" + \ \cf. 15.11.???\ | Nil: "E\[][::][]" - \ "cf. 15.11.???" + \ \cf. 15.11.???\ | Cons:"[| E\e::T; E\es[::]Ts |] ==> E\e#es[::]T#Ts" -\ "well-typed statements" +\ \well-typed statements\ | Skip:"E\Skip\" @@ -174,13 +174,13 @@ E\s2\ |] ==> E\s1;; s2\" - \ "cf. 14.8" + \ \cf. 14.8\ | Cond:"[| E\e::PrimT Boolean; E\s1\; E\s2\ |] ==> E\If(e) s1 Else s2\" - \ "cf. 14.10" + \ \cf. 14.10\ | Loop:"[| E\e::PrimT Boolean; E\s\ |] ==> E\While(e) s\"