GithubHelp home page GithubHelp logo

scheme-semantics's Introduction

scheme-semantics

Introduction

This repo is for a dialect of Scheme implemented in K.

Prerequisite

K Framework Tools 5.0

Check https://github.com/kframework/k for details

How to Use

Compile:

kompile --backend java ./src/scheme.k -d 

Run:

krun filename.scm

Functionalities & Features

Some features of our Scheme dialect are:

  • Use [] instead of () for indicating functions
  • Use eof as the mark of the end of a function
  • Use , instead of . to describe pairs and lists
  • Use {} instead of () to hold pair and list items
  • Use //, /* and */ instead of ;, #| and |# to comment
  • let completes the job of both let and letrec in original Scheme
  • For define, let and let*, only letters are allowed (no special symbols, e.g. +, -)

Below is a list of the functionalities implemented so far:

  • Arithmetic expressions: +, -, x, ÷
  • Boolean expressions
  • Conditional expressions
  • Valuable assignment: define, set!
  • Lambda function: lambda
  • File I/O: read, display
  • Local Binding: let, let*
  • Procedure Expressions: lambda
  • Pair and List: list, cons, car, cdr
  • Continuation: call/cc
  • eqv?, boolean?, integer?, string?, list?, null?

For more details, please refer to the test cases provided in tests/.

Contributor

Wenhao Su, Qihang Ren, Junkai Cheng, Patrick Meredith, Grigore Rosu

scheme-semantics's People

Contributors

hbourne avatar junkaicheng avatar wenhaosu avatar

Watchers

 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.