SLIDE 1
This course Why semantics?
- precise specification of software and
hardware
- facilitate reasoning about systems:
testing may reveal errors but not their absense
- form the basis for prototype imple-
mentations, e.g. interpreters and com- pilers Why functional programming?
- based on mathematical notation, not
- n the von Neuman architecture
- excelent for prototype definitions
I.1
Operational Semantics y := 1;
while ¬(x = 1) do (y := x ∗ y; x := x − 1)
First we assign 1 to y, then we test whether x is 1 or not. If it is then we stop and
- therwise we update y to be the product of
x and the previous value of y and then we decrement x by one. Now we test whether the new value of x is 1 or not · · · Two kinds of operational semantics:
- Natural Semantics
- Structural Operational Semantics