Contact People Projects Teaching Papers Intranet

The Scala Compiler Corner:
    A collection of resources contributed by the Scala user community

(Think of this collaborative effort as each blind man describing a fragment of the elephant)

The Scala Compiler Corner

Code walkthroughs of compilation phases of the Scala compiler


I've moved to Lausanne,
for a post-doc at LAMP,
with a focus on Scala.

The Reloaded version of this website.

These write-ups have been typeset with LaTeX, using this template. There are many good editors for LaTeX out there. The Eclipse-based TeXlipse, although not the most feature-rich, has worked for me.

Further information on compilation phases

Information from the source

Master theses with a compiler-plugin as prototype

Project ideas

Looming on the horizon

For verification (and automated testing) fans

State Exploration of Scala Actor Programs Automated Testing of (Java) refactoring engines   (2)
On Static Analysis for Expressive Pattern Matching   source code   slides First cut at code coverage for Scala
Static checking of transfer of ownership of references across method invocations
(using capabilities rather than an ownership system). Paper and source code
Static checking of transfer of access permissions across threads to avoid data races
(program verifier implemented in Scala). Paper and source code (look for the Chalice folder)
Pluggable type systems COMFUSY: COMplete FUnctional SYnthesis, website, tech report

Blog entries covering aspects of the compiler

Decompiling Hello World Mirko Stocker on refactoring: blog, website The Autoproxy plugin Public getter and private setter A research-friendly compiler
FindBugs on compiled bytecode (1) Compare ASTs across phases Step by step Compiler plug-in Tree-shaking generated classes Benchmarking iteration performance
Virtual Classes: a paper, the ticket,
discussion, search in Trac, source
Navigating the surface syntax, slides
announcement, source, examples
-Xprint-types and -Ytyper-debug
to the rescue (1) (2) (3)
How Scala ASTs are handled in NetBeans
(with extensible Rats! lexer for Scala)
Java modifiers generated from AST symbol
def javaFlags(sym: Symbol): Int
-Xprint-icode Patching scalac in NetBeans "something like the GHC Commentary" LiftCode compilation phase Constant folding (bonus: some theory)
Fast Java Bytecode Generator AST navigation wish list (2) (3) (4) scalap vs. javap Debugging ASTs (1) Optimize "simple" loops
IDE-based debugging of
compiler plugins (Eclipse) (IntelliJ)
Scaladoc's design Refactoring FP TODO TODO

Compiler descriptions for other languages (only that, these descriptions are self-contained!)

Other open-source VM-compilers for languages with a functional flavor

Clojure: website and video OCaml-Java SML.NET Fortress X10 The Hacker's Guide to javac (1) (2) (3) and the javac group

Not a language shootout, but cross-pollination

Scala LiftCode and F# quotations Units of measure: as Scala plugin vs. built-in feature (papers) and (video) Rx Reactive Framework vs. Joins and Actors libraries

Last updated: 2010-03-24, Miguel Garcia