This repo is for a dialect of Scheme implemented in K.
K Framework Tools 5.0
Check https://github.com/kframework/k for details
Compile:
kompile --backend java ./src/scheme.k -d
Run:
krun filename.scm
Some features of our Scheme dialect are:
- Use
[]instead of()for indicating functions - Use
eofas 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 letcompletes the job of bothletandletrecin original Scheme- For
define,letandlet*, 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/.
Wenhao Su, Qihang Ren, Junkai Cheng, Patrick Meredith, Grigore Rosu