COMP30151: Understanding Programming Languages (2009-2010)
Students taking this module should gain a deeper understanding of some of the standard programming language constructs and of the overall structure of a programming language and should develop an appreciation of the role of formal semantics in the design and precise definition of a programming language.
A student successfully completing this module will:
Be able to specify a simple imperative programming language using natural, structural operational, denotational, continuation, and axiomatic semantics.
Be able to show how two different specifications are related.
Be able to extend the specification of a simple imperative programming language to more complex constructions.
Assessment of Learning outcomesThere will be one exam question on each of: natural, structural operational, denotational, continuation, and axiomatic semantics.
One semantics for a procedural language will be given in an appendix to the exam paper. For this semantics students are expected to be able to extend the semantics for more complex constructions.
A major component of the other four exam questions will be to give a corresponding semantics to that of the appendix and show their relation. A minor part of each of the other four questions will be to show how they can be extended.
Contribution to Programme Learning OutcomesA1, B1, D6
Syntax and Semantics. BNF and abstract syntax; the meaning of expressions; approaches to semantics - operational/denotational/axiomatic.
Natural semantics for while; non-determinism; parallelism. Structural Operational Semantics: Structural operational semantics for while; non-determinism; parallelism. Equivalence.
Compiling to abstract machine code; executing abstract machine code; equivalence.
Direct-style semantics; fixpoints; equivalence; continuation semantics.
Direct use of Natural, Structural Operational and Denotational Semantics for Correctness. Assertions and inference. Soundness and completeness.