GithubHelp home page GithubHelp logo

gbmksquare / programminglanguages2016_hw4 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kupl/programminglanguages2016_hw4

0.0 2.0 0.0 142 KB

Makefile 6.87% OCaml 72.75% M 9.40% MATLAB 6.04% Mercury 4.88% Mathematica 0.06%

programminglanguages2016_hw4's Introduction

Programming Languages 2016 - Homework 4

Goal

The goal of this homework is to build an interpreter for the "letrec" language with implicit references. The syntax and semantics of the language are defined in "hw4.pdf" with some holes which should be completed by yourself.

Specification

  • Implement the eval function in the "m.ml".
  • Do not modify the types and names of items in the "m.ml" except for the eval function.
  • Use the OCaml's read_int function for implementing the read expression:
  • You can use the environment and memory implementation for the interpreter which are provided as built-in.
  • During execution, raise the exception UndefSemantics whenever the semantics is undefined.
    • e.g.) ADD expression with a value of Bool type, a conditional consists of a value of Int type
    • You should use the pre-defined exception that we provided.
    • You can raise the exception as follows: raise UndefSemantics

Compilation and Execution

Compile and execute the interpreter as follows:

  make                (* for compilation *)
  ./run test/proc1.m  (* running the interpreter *)

Make sure that you are on the top of the project directory where the file "m.ml" exists before compilation.

How to Submit

Submit the single file "m.ml" via Blackboard. Note that codes which are not compilable will be get zero point.

programminglanguages2016_hw4's People

Contributors

seongjoonh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.