Syntactic Categories I in Ident (identifiers) L in Lexp (l-expressions) E in Exp (expressions) C in Comm (commands) P in Prog (full programs) Syntax BNF L ::= I E ::= 0 | 1 | I | !L | (E1 + E2) | let I = E1 in E2 end C ::= C1 ; C2 | if E then C1 else C2 | do_all_true E1: C1 , E2: C2 , ... En: Cn end | new I := E in C end | L := E P ::= program (I) ; C end .This language has variables and an assignment statement, but expressions do not have side effects when they are evaluated. Only commands affect the storage locations. We will assume that programs compute integer functions.
Develop a full denotational definition for this language. That means adding to the syntax information above these parts: value domains, semantic functions, and semantic equations.
Much of this will be modification/combination of the examples we did in class, but you will have to create for yourself some believable denotational definition for the do_all_true loop, using these informal semantics :
(Just a side note... we could imagine other related semantics... perhaps a "do_one_true" loop that might pick at random one of the true Ci parts to execute until all Ei are false... or perhaps a "do_each_true" loop that executes each true Ei part it finds, but delays evaluation of Ei until it gets to that point in the body... or perhaps other variations.)