previous up next
Go backward to Command Semantics
Go up to Top
Go forward to Example
RISC-Linz logo

Expression Semantics

[[.: _exp]]: Store -> (Int union Bool) [[N: intexp]](s) = [[N: int]]
[[@L: intexp]](s) = lookup([[L: intloc]], s)
[[not E: boolexp]](s) = not([[E: boolexp]](s))
[[E1+E2: intexp]](s) =
    plus([[E1: intexp]](s), [[E2: intexp]](s))
[[E1=E2: boolexp]](s) =
    equalbool([[E1: boolexp]](s), [[E2: boolexp]](s))
[[E1=E2: boolexp]](s) =
    equalint([[E1: intexp]](s), [[E2: intexp]](s)) [[.: intloc]]: Location [[loci: intloc]] = loci [[.: int]]: Int [[n: int]] = n The meaning of an expression is a function from Store to Int or Bool.


Author: Wolfgang Schreiner
Last Modification: March 26, 1998

previous up next