Index

IMP

IMP is a very simple imperative language. The basic entities are:

We will use generic names to represent the classes of entities as follows:

We'll also use op for an operation that may be Boolean or integer.

The phrase classes of IMP are:

Phrase classGeneric namePhrase forms
Integer expressionsex
n
e1 iop e2
Boolean expressionsbtrue
false
b1 bop b2
Programspnull
x:=e
p1;p2
if b then p1 else p2
while b do p

References

R. Burstall. Language Semantics and Implementation. Course Notes. 1994.

Index