Giter Club home page Giter Club logo

simpl's Introduction

This code supports the Programming Language Implementation course It contains a bunch of APIs for computing various semantics described in the course. Examples for using these APIs are in the corresponding test packages.

In this tutorial, we will be practicing -- find the free variables of SimPL code -- type inference of SimPL programs -- the Denotational Semantics of SimPL (to generate the virtual machine code). To finish this tutorial, you need to:

  1. compiler all the code and run all the test cases. Upon cloning the project, simply do
sbt test

Alternatively, you may import the code into IntelliJ as an Scala sbt. Make sure that you have the Scala and Antlr plugins loaded before doing that. Then you can just run the tests (methods in classes whose names have the suffix 'Test') individually. Each test is an example of how the language APIs can be used.

  1. fill up all the pattern matching blanks in 3 files:
  1. src/main/scala/edu/nus/comp/pli/simpl/util/FreeVariables.scala
  2. src/main/scala/edu/nus/comp/pli/simpl/util/TypeInfer.scala
  3. src/main/scala/edu/nus/comp/pli/simpl/util/SimplEplDenotationalSemantics.scala

(You are highly suggested to fill the file in the order of 1, 2, 3)

To ease your work, all the blanks are marked with comment "// add you code here"

  1. after programming, all the test cases are expected to be passed.

(Note: the AST of SimPL is defined in src/main/antlr4/simpl/SimplParser.g4 all the test cases are stored in src/test/resources/simpl/)

---------------------------------------------------------------- * Origin repository: https://github.com/razvanvoicu/pli Revised by: Yahui Song ([email protected]) Date: 9/3/2019 Purpose: Tutorial for CS4215 (2018/2019 sem2) ---------------------------------------------------------------- * Submission: please submit a compressed folder which is renamed with: "Lab06__" eg. Lab05_A12345678_Yahui.zip

Deadline: 29/03/2019 23:59pm

simpl's People

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.