0. Design a simple expression language with integer, real, boolean and unit types as the elementary types,
and cartesian products as constructed types.
The language should have variables, and constants from the base types, as well as the usual arithmetic and boolean operators.
It should have an if-then-else construct to deconstruct booleans.
Extend you langauge to include simple, sequential, parallel and local definitions, and
a let expression (qualified by a definition).
You should represent your language as terms in the language Prolog.
1. Encode in Prolog the static semantics (type checking) rules to admit only well-typed expressions/definitions.
Choose a suitable data structure for Type Assumptions and methods/predicates for looking up the types of variables.
2. Encode in Prolog the big-step operational semantics of this language, after choosing an appropriate data structure for Tables. (both the Calculates and Elaborates relations need to be encoded).
3. For the expression language *without let expressions* , encode the non-deterministic one-step reduction relation,
and show different reduction paths possible.
4. For the complete language, encode the stack machine (in which already-computed sub-expressions are on the stack), and implement (in Prolog) the compile function, with suitably invented op-codes. For suitably chosen examples, show the working of the compiler (output sequence of op-codes), and execute this compiled code a given number of steps (or indefinitely) on the stack machine.