Question: Given the following why is ( d ) rorrert please explain the green answer to d ? ? in the image ( b ) Write

Given the following why is (d)rorrert please explain the green answer to d?? in the image
(b) Write a variant for the alstract syntax of this language.
(c) Formally define the big step semantics of this language.
vinZv!tv Num
E11-t1(x,t3,E2),E11-t2v1,E2[xv1]+t32E1+t1t2v2 CALL.
E1-t1||v1,E-t12E-t1+t2v1+t2ADD
E:-t1v1EP-t1v2B-t1-t2v1-v2 SUB
(d) Write an evaluator for this language based on your big step semantics.
defun eval Et
match t with
case m(n)n
case Var(x)E(x)
case FuncExpr(v,t)(FuncExpr(v,t),E)
case BopExpr(x,b,y)
let
xlarrevalEx
ylarrevalEy
in
match b with
case Add x+y
case Sub x-y
case lx**y
case Div xy
case CallExpr(f,x)
match , eval Ex with
case ((FuncExpr(v,t),E),x)
eval E[v|x]t
otherwise ERROR
 Given the following why is (d)rorrert please explain the green answer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!