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

E⟦z⟧(σ)
=
z
E⟦A⟧(σ)
=
σ0(A)
E⟦ig(ie1,…,ien)⟧(σ)
=
g(E⟦ie1⟧(σ),…,E⟦ien⟧(σ))
E⟦ A⟧(σ)
=
σ1(A)
if |σ| > 0
choose-any-from(ℤ)
otherwise
E⟦fin A⟧(σ)
=
σ|σ|(A)
E⟦b⟧(σ)
=
b
E⟦Q⟧(σ)
=
σ0(Q)
E⟦bg(be1,…,ben)⟧(σ)
=
bg(E⟦be1⟧(σ),…,E⟦ben⟧(σ))
E⟦ Q⟧(σ)
=
σ1(Q)
if |σ| > 0
choose-any-from(Bool)
otherwise
E⟦fin Q⟧(σ)
=
σ|σ|(Q)

Example of semantics [Slide 160]

Example 50.  

E⟦Account⟧(σ) = σ0(Account)
 
E⟦Account −Out⟧(σ) =
E⟦Account⟧(σ)−E⟦Out⟧(σ) =
σ0(Account)−σ0(Out)

2024-08-02
Contact | Home | ITL home | Course | Proofs | Algebra | FL
© 1996-2024