Here is an incomplete list of suggestions for four-week projects or
Master's theses in programming language, in random order:
- Compile the internal language of Axapta (Microsoft Business
Solutions, formerly Navision, Vedbæk) to C# or Microsoft .Net
bytecode. Master's thesis project.
- Use runtime code generation (in C# or Java) to generate fast
specialized serialization/deserialization methods: methods for writing
objects to XML or binary format, and for readin object from such
formats. The general serialization/deserialization methods appear to
use reflection intensively and therefore are rather slow when working
on large amounts of data.
- Compile a subset of Tony Hoare's CSP (Communicating Sequential
Processes), or another process calculus, to JVM bytecode. Each CSP
process must execute in a separate JVM thread, and each CSP channel is
a zero-capacity buffer: it must delay sender as well as receiver until
both are ready to communicate.
- Develop a compiler from a subset of C (e.g. micro-C) to the
Hitachi H8 embedded processor, and determine experimentally the energy
cost of different ways to compile the same source code. For embedded
software in battery-driven devices, energy cost is just as important
as program speed.
language), describe how it realizes inheritance, and implement some
examples. modsætning til Java).
- Implement type checking for micro-C.
- The language Icon permits so-called goal-directed evaluation.
Write a small Icon implementation using continuations in Standard ML
or Java, including assignable variables. See D A Gudeman:
Denotational semantics of a goal-directed language. ACM TOPLAS 14, 1
- Study the Cyclone
programming language, a statically safe dialect of C. Implement some
programs in Cyclone, or reimplement C programs in Cyclone by adding
- Study Microsoft's C# programming language, describe differences
and similarities to Java, and implement pedagogical examples that
highlight the differences. The latter could be done in the style of a
phrasebook: if you would write this in Java, you must write so and so
in C#; or this construct in C# means so and so in Java.
- Microsoft's Common Language Runtime has support for runtime code
generation (in the System.Reflection.Emit namespace). Use runtime
code generation to speed up a parametrized algorithm, e.g. to generate
specialized code for multiplication of NxN matrices for given N, or to
generate a specialized regular expression matcher for a given regular
expression. Evaluate the efficiency and speed-ups. See also Morten
- Study Microsoft Intermediate Language MSIL and formalize (part of)
it, by writing an interpreter or using inference rules in the style of
Peter Bertelsen's dynamic defensive semantics for the Java Virtual
- Generate CIL/CLR code (as text, in CIL/CLR assembly format, and
compile with ilasm) from a simple functional, imperative, or
- Generate stack-oriented x86 machine code instead of our homemade
stack machine code from micro-C. The assembly code can be generated
as input to the GNU assembler gas, or perhaps even more simply, as inline asm instructions in C code for GNU gcc to compile.
- Implement Java exceptions and the try-catch-finally statement in
the micro-Java interpreter. See e.g. Bart Jacobs: A Formalisation of
Java's Exception Mechanism, ESOP 2001, for details.
- Implement Danvy and Filinski's conversion to continuation-passing
style for a small functional language.
- Implement a lazy functional language using the machine model from
Sestoft: Deriving a Lazy Abstract Machine (1997).
- Write a compiler (in SML or Java) for Martin Richards's language
Simple Programming Language). You may compile to JVM. Unfortunately,
VSPL isn't that simple after all, and may be too much work for a
- Study the tool Extended Static Checking for Java (ESC/Java),
available for download at http://research.compaq.com/SRC/esc/.
Download and install also the JDK spec files from the ESC/Java Web
site. Take some existing non-trivial Java programs, annotate them,
and apply the ESC/Java tool to them. Report on your experience: How
hard is it to write annotations to satisfy the checker? Did you find
any errors in the process? If possible, compare with other tools for
Java, C#, C, or C++. Especially Spec# for C# by Rustan Leino and
others from Microsoft Research, and JML for Java. A somewhat related
tool is FindBugs, by Hovemeyer and Pugh.
- Develop a language for formalizing study plan constraints such as
`any SWU student must pass at least two courses within each of the
categories Process-oriented Courses and Technical Courses, and must do
at least one Program Construction Project'. Design a grammar, lexer
and parser specifications, an abstract syntax, and a checker that for
any given student can check that the constraints are satisfied. It
would be useful to be able to pretty-print the constraints also in
(almost) natural language, for general comprehensibility. Inspiration
can be gotten from Niels Hallenberg, IT-C, and Michael Schwartzbach,
- Suggested by Lars
Birkedal: Implement a generational garbage collector for the ML Kit implementation of
Standard ML. This requires some familiarity with the C programming
language. This project is large enough for a Master's thesis; it
should include a study of the various kinds of garbage collectors,
design, implementation and experimental evaluation. It is a good idea
to start with a four week project to familiarize oneself with the area.
- Implement an XML-parser and other XML tools in Standard ML. For
instance, given a representation of a Document Type Definition (DTD)
or an XML Schema, validate XML documents.
- Compile micro-C to Parrot, the forthcoming Perl Abstract Machine; see
This is not a stack-based abstract machine, so you will need to learn
about register allocation (e.g. from Torben Mogensen's Basics of
Peter Sestoft (email@example.com) 2002, 2004-01-23