Skip to content

MarsMan13/interpreter_built_with_ocaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Introduction

This project was given by Prof. JS Choi.
After studying PL, I made a toy interpreter by using Ocaml.

What is this project for?

  • To study Ocaml
  • To understand functional programming
  • To understand PL and interpreting process
  • To get ready for Static Analysis

Interpreter Spec

Syntax

Exp ->
| UNIT
| TRUE
| FALSE
| CONST of int
| VAR of var
| ADD of exp * exp
| SUB of exp * exp
| MUL of exp * exp
| EQUAL of exp * exp
| LESS of exp * exp
| IF of exp * exp * exp
| LET of var * exp * exp
| LETREC of var * var * exp * exp
| PROC of var * exp
| CALL of exp * exp

Semantics

(skip)

Variable Set

Var = string

Value Set

Value = Unit + Int of int + Bool of bool + Procedure of var * exp * env + RecProcedure of var * var * exp * env

Environment

Env = var -> val

About

After studying PL, I made a toy interpreter made of ocaml

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published