Theory Term
section ‹Expressions and Statements›
theory Term imports Value begin
datatype binop = Eq | Add
datatype expr
= NewC cname
| Cast cname expr
| Lit val
| BinOp binop expr expr
| LAcc vname
| LAss vname expr ("_::=_" [90,90]90)
| FAcc cname expr vname ("{_}_.._" [10,90,99]90)
| FAss cname expr vname
expr ("{_}_.._:=_" [10,90,99,90]90)
| Call cname expr mname
"ty list" "expr list" ("{_}_.._'( {_}_')" [10,90,99,10,10] 90)
datatype_compat expr
datatype stmt
= Skip
| Expr expr
| Comp stmt stmt ("_;; _" [61,60]60)
| Cond expr stmt stmt ("If '(_') _ Else _" [80,79,79]70)
| Loop expr stmt ("While '(_') _" [80,79]70)
end