Type-theoretic functional semantics :

The language IMP

Arithmetic expressions:

a ::= n | X | a₀ + a₁ | a₀ - a₁ | a₀ * a₁

Boolean expressions:

b ::= true | false | a₀ = a₁ | a₀a₁ | ¬b | b₀b₁ | b₀b₁

Commands:

c ::= skip | X := a | c₀ ; c₁ | if b then c₀ else c₁ | while b do c