(* Title: HOL/IMPP/Com.thy Author: David von Oheimb (based on a theory by Tobias Nipkow et al), TUM
*)
section‹Semantics of arithmetic and boolean expressions, Syntax of commands›
theory Com imports Main begin
type_synonym val = nat (* for the meta theory, this may be anything, but types cannot be refined later *)
typedecl glb typedecl loc
axiomatization
Arg :: loc and
Res :: loc
datatype vname = Glb glb | Loc loc type_synonym globs = "glb => val" type_synonym locals = "loc => val" datatype state = st globs locals (* for the meta theory, the following would be sufficient: typedecl state consts st :: "[globs , locals] => state"
*) type_synonym aexp = "state => val" type_synonym bexp = "state => bool"
typedecl pname
datatype com
= SKIP
| Ass vname aexp (‹_:==_› [65, 65 ] 60)
| Local loc aexp com (‹LOCAL _:=_ IN _› [65, 0, 61] 60)
| Semi com com (‹_;; _› [59, 60 ] 59)
| Cond bexp com com (‹IF _ THEN _ ELSE _› [65, 60, 61] 60)
| While bexp com (‹WHILE _ DO _› [65, 61] 60)
| BODY pname
| Call vname pname aexp (‹_:=CALL _'(_')› [65, 65, 0] 60)
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 und die Messung sind noch experimentell.