ECC – Fun Writing Compilers

By Erlang Central | Published: March 21, 2011

This is the story of ECC.

ECC is a compiler toolkit built with the following components:

– A C pre-processor and parser
– A type checker and program normalizer
– A back-end target code generator which generates
LLVM-assembler code
– A Constraint Solver (Gecode)

Erlang is used to transform C to LLVM-assembler.  LLVM is used to optimize the code and produce code for common targets. Constraint logic programming techniques and Gecode are used for instruction scheduling and code optimization.

ECC is intended for writing C compilers for unusual architectures, for implementing domain specific languages and for experiments with JIT compilation.

The current compiler now in its fourth rewrite performs normalization of C programs producing typed data flow graphs. Joe will talk about the evolution of this program, and the mistakes that lead to it being rewritten [1] four times.

[1] At the time of writing the abstract 🙂

Download Presentation Download


  • Joe Armstrong

    Father of Erlang
    Ericsson AB

    Joe Armstrong is a co-inventor of Erlang. When at the Ericsson computer science lab in 1986, he was part of the team who designed and implemented the first version of Erlang. He has written several Erlang books including Programming Erlang Software for a Concurrent World. Joe held the first ever Erlang course and has taught Erlang to hundreds of programmers and held many lectures and keynotes describing the technology.

    Joe has a PhD in computer science from the Royal Institute of Technology in Stockholm, Sweden and is an expert in the construction of fault tolerant systems. Joe was the chief software architect of the project which produced the Erlang OTP system. He has worked as an entrepreneur in one of the first Erlang startups (Bluetail) and has worked for 30 years in industry and research.

    Joe's book

    Joe Armstrong

Follow Erlang Central:

Have an Erlang Question?

Reach out to the Erlang community