Diderot Formal Semantics =============================== variable ::= string id ::= integer Arithmetic expression (Aexp) e ::= n for n ∈ R or n ∈ Z | x for x = variable | e1 + e2 for e1,e2 ∈ Aexp, Aexp | e1 - e2 for e1,e2 ∈ Aexp, Aexp | e1 * e2 for e1,e2 ∈ Aexp, Aexp | e1 / e2 for e1,e2 ∈ Aexp, Aexp Relational expression (Rexp) b ::= true | false | e1 == e2 for e1,e2 ∈ Aexp, Aexp | e1 < e2 for e1,e2 ∈ Aexp, Aexp | e1 > e2 for e1,e2 ∈ Aexp, Aexp | e1 <= e2 for e1,e2 ∈ Aexp, Aexp | e1 >= e2 for e1,e2 ∈ Aexp, Aexp Commands (Comm) c ::= x := e for x = variable, e ∈ Aexp | c1; c2 for c1,c2 ∈ Comm | if b then c1 else c2 for c1,c2 ∈ Comm and b ∈ Rexp Values v := Num(n) | Bool(b) | String(s) | tensor...?? Strand_Status := Active | Dead | Stablized env = variable → value Strand_Env = Strand_Status * id * commands * env Update: Strand_Env -> Strand_Env Rules: (1) ------------------------------------------------------------- Update() ⇓ (2) (Doubt this will ever happen...?) ------------------------------------------------------------- Update() ⇓ Update() ⇓ v (3) ------------------------------------------------------------- Update() ⇓ env[x:=v]
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: -------------------------------------------------- Update(<Active,_,x:=e,env>) ⇓ env[x:=v]