CS 641 meeting -*- Outline -*- * Semantics Overview ** Semantic description techniques 3 basic kinds: axiomatic, denotational, operational Q: what does a denotational semantics tell you about a statement? mathematical model (state transformation as a function) Q: an operational semantics? how to compute the next state from given state (algorithm or rewrite rule) Q: an axiomatic semantics? property satisfied by that statement (pair of predicates, true of pre and post states) --------------------- { x >= 3 } x := x + 1 { x > 3 } --------------------- or how to transform a property of the post-state into a property of the pre-state --------------------- (x >= 3) = wp.(x := x+1).(x > 3) --------------------- ** remark about models, presentations, and theories def: a model is mathematical entity usually an abstraction of syntactic aspects, capturing essentials, leaving out inessentials e.g., the naturals as model of arithmetic (peano axioms) note that the axioms themselves are not a model, but a presentation of the theory def: a presentation is a syntactic description of something true e.g., peano axioms for naturals def: a theory is the set of all facts true about a theory e.g., all theorems of arithmetic all axioms and inference rules are true in a model, hence also all theorems most theories have lots of models... Q: What's the theory that a denotational semantics constructs a model for? one answer is the language, another the axiomatic semantics... Because of the underlying mathematics, there's a deep connection between models and theories, which sometimes blurs the distinction between them. Also, the various kinds of semantics are really closer to each other than it might appear. All want to be: - compositional, modular - abstract, high-level - useful in programming and for tools, - ...