COP 5021 Lecture -*- Outline -*- * Overview of Semantics (based on the book's section 2.2) The overall goal is to: - write a semantics for the programming language that is clearly correct, and - use it to prove that the analysis is correct As an example, this section uses structural operational semantics to show that the live variables analysis is correct. Q: Why are formal correctness proofs useful for program analysis? a way to find subtle errors and correct them ** kinds of semantics ------------------------------------------ KINDS OF SEMANTICS Axiomatic Semantics as declarative specifications - predicates + predicate transformers Denotational Semantics as functional program domains + meaning functions Operational Semantics as logic programming configurations + rewrite rules ------------------------------------------ These approaches can be prototyped: - axiomatic: in an automatic theorem prover, like Isabelle HOL or Coq - denotational: in a functional programming language, like Haskell - operational: in a logic programming language, like (lambda) Prolog