CS代写 Disc 9 – OpSem and Lambda Calculus

Disc 9 – OpSem and Lambda Calculus
Thursday, November 4, 2021 11:09 AM
Operational Semantics
5) Recall last week we went over lexing and parsing:

Copyright By PowCoder代写 加微信 powcoder

type expr =
| Int of int
| Plus of expr * expr
Implement an expression evaluator, that takes an environment closure and an expression, and returns a value after evaluating it.
Key Notes (Taken from OpSem rules, which will be given on the project)
– Integers evaluate to themselves
– Plus works on integers (throw a TypeError otherwise)
let rec eval_expr env e =
Lambda Calculus
Quick Notes Page 1

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com