Skip to content

wenhaosu/scheme-semantics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Semantics of Scheme in K

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •