V.6 Semantics of Expressions

Semantics of expressions [Slide 159]

Let E() be the “meaning” (semantic) function from Expressions × Σ+ to Val and let σ = σ0σ1 be an interval then

Ez(σ)
=
z
EA(σ)
=
σ0(A)
Eig(ie1,…,ien)(σ)
=
g(Eie1(σ),…,Eien(σ))
E A(σ)
=
σ1(A)
if |σ| > 0
choose-any-from()
otherwise
Efin A(σ)
=
σ|σ|(A)
Eb(σ)
=
b
EQ(σ)
=
σ0(Q)
Ebg(be1,…,ben)(σ)
=
bg(Ebe1(σ),…,Eben(σ))
E Q(σ)
=
σ1(Q)
if |σ| > 0
choose-any-from(Bool)
otherwise
Efin Q(σ)
=
σ|σ|(Q)

Example of semantics [Slide 160]

Example 50.  

EAccount(σ) = σ0(Account)
 
EAccount Out(σ) =
EAccount(σ)EOut(σ) =
σ0(Account)σ0(Out)

2023-09-12
Contact | Home | ITL home | Course | Proofs | Algebra | FL
© 1996-2023