Code and example subdirectories

Files will be added to the zip-files as they are made available. Updated 2002-04-29 (added Java runtime code generation examples 2002-05-14).

DirectoryFileContents LectureZip-file
.General tools
Env.sig, Env.smlEnvironment implementation  top.zip
Naivestore.sig, Naivestore.smlNaive store implementation
Sto.sig, Sto.smlStore implementation
cont/ Continuation-passing style
fun.sml Continuation-passing interpreter for a functional language 8 cont.zip
imp.sml Continuation-passing interpreter for an imperative language
Factorial.java Continuation-passing style factorial function in Java
expr/ A simple expression language
grammar.txt Informal grammar description 2, 3 expr.zip
Absyn.sml Abstract syntax
Exprlex.lex Lexer specification
Exprpar.grm Parser specification
parse.sml Definition of parse functions
expr.sml Expression interpreter (eval) and compilers
Stack.java Abstract stack machine for expression evaluation
ex1.ex Well-formed expression for parser testing
bad1.ex-bad8.ex Ill-formed expressions for parser testing
fun/ A first-order and a higher-order functional language
grammar.txt Informal grammar description 4, 5 fun.zip
Absyn.sml Abstract syntax
Funlex.lex Lexer specification
Funpar.grm Parser specification
parse.sml Definition of parse functions
fun.sml First-order functional language interpreter
tychk.sml Definition of an explicitly typed functional language, and its type checker
hofun.sml Higher-order functional language interpreter
tyinf.sml Type inference for the hofun language
imp/ Micro-C, an imperative language
grammar.txt Informal grammar description 6, 7,
9, 10
imp.zip
Absyn.sml Abstract syntax
Clex.lex Lexer specification
Cpar.grm Parser specification
parse.sml Definition of parse functions
c.sml Micro-C interpreter
Machine.sml Definition of abstract machine code, used by comp.sml and contcomp.sml
comp.sml Compiler from micro-C to stack machine
Machine.java Abstract stack machine for micro-C code execution
contcomp.sml Continuation-based compiler from micro-C to stack machine
jvmcomp.sml Continuation-based compiler from micro-C to Java bytecode
ex1.c-ex20.cExample programs in micro-C
ex13.javaExample program in Java
InOut.javaLibrary for running micro-C programs as Java programs
ex13.csExample program in C#
oo/ Micro-Java, a small subset of Java
grammar.txt Informal grammar description 11 oo.zip
Absyn.sml Abstract syntax
Oolex.lex Lexer specification
Oopar.grm Parser specification
parse.sml Definition of parse functions
oo.sml Interpreter for micro-Java
Util.java Used for running micro-Java programs as Java programs
ex1.java-ex4.javaExample programs in micro-Java
rtcg/ Reflection and runtime code generation
Reflect0.cs-Reflect2.csReflection in C# 12 rtcg.zip
Reflect0.java-Reflect4.javaReflection in Java
RTCG1.cs-RTCG6.csRuntime code generation in C#
RTCG2.java-RTCG4.javaRuntime code generation in Java
usql/ Micro-SQL, a small subset of SQL
grammar.txt Informal grammar description 3 usql.zip
Absyn.sml Abstract syntax
Sqllex.lex Lexer specification
Sqlpar.grm Parser specification
parse.sml Definition of parse functions


Peter Sestoft (sestoft@dina.kvl.dk) 2002-03-17