Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following why is ( c ) correct please explain the green answer to c ( b ) Write a variant for the abstract

Given the following why is (c) correct please explain the green answer to c
(b) Write a variant for the abstract syntax of this language.
type bop larr
I Add
I Sub
| Mul
I Div
type expr larr
| Num of number
| Var of string
FuncExpr of string expr
| CallExpr of expr expr
I BopExpr of expr bop expr
(c) Formally define the big step semantics of this language.
vinZvvM
?E+xE(x) VAR
?E|--x*tdarr(x*t,E)FuNC
E1|--t1(x*t3,E2),E1|--t2v1,E2[x|v1]|--t3v2E1|--t1,t2v2 CALL
E|--t1v1,E|--t1v2E|--t1+t2v1+v2ADD
E|---t1v1,E|---t1v2E|---t1-t2v1-v2SUB
E|---t1v1,E|---t1v2E|--t1**t2v1**v2?MUL
E|---t1v1,E|--t1v2E|--t1t2v1v2 DIV
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions