A New Runtime for the EC Erlang Compiler

Dr Lawrie Brown
School of Computer Science, Australian Defence Force Academy, Canberra, Australia
Email: Lawrie.Brown@adfa.edu.au

Last updated: 12 Mar 2003


This seminar will discuss the new runtime being developed for the EC Erlang Compiler, which is intended to be both the core compiler technology for the Magnus massively scaleable computing platform, as well as a means to generate standalone executables of Erlang programs. It has also been used to implement some previously identified safety extensions to improve the safety of Erlang when used for mobile code applications amongst others. These include using capabilities for all critical resources (processes, open files, network connections, references etc), as well as a hierarchy of nodes within an Erlang system.

The seminar will start with a brief overview of the Erlang language, which is a functional language designed to support robust, reliable, distributed, near real-time applications, developed by the Ericsson CS labs. Then I will describe the proposed language safety extensions, and provide a brief overview of the Magnus architecture. The latter half of the seminar will discuss my work on the new runtime for EC. This includes the use of detached system pthreads to implement Erlang processes, the use of the dlopen library to implement dynamic module loading, memory allocation for Erlang terms and the consequences for garbage collection, and some open issues on the implementation of capabilities and the use of their rights in the system.


  1. A New Runtime for the EC Erlang Compiler
  2. Introduction


  1. Erlang - Functional
  2. Erlang - Concurrent
  3. Erlang - Distributed
  4. Erlang Language Features
  5. Why Erlang?
  6. Limitations in Erlang now
  7. Safer Execution in Erlang
  8. Safe Erlang - Capabilities
  9. Safe Erlang - Nodes
  10. Safe Erlang - Remote Code Execution


  1. EC - A Compiler for Erlang
  2. Open Source Erlang
  3. Other Erlang Implementations
  4. EC Structure
  5. EC Status
  6. Magnus
  7. Magnus Architecture
  8. Magnus WDM Switch


  1. ECRT - A New Runtime for EC
  2. ECRT - Basic Data Types
  3. ECRT - Capability (Pidportref) Type
  4. ECRT - Capability - Issues
  5. ECRT - Concurrency
  6. ECRT - Concurrency - Issues
  7. ECRT - Dynamic Code Loading
  8. ECRT - Dynamic Code Loading - Issues
  9. ECRT - Garbage Collection
  10. ECRT - Other Issues


  1. Conclusion
  2. Questions
  3. References
    Talk Outline:
    "A garbage collector for C and C++", Boehm, H., HP, http://www.hpl.hp.com/personal/Hans_Boehm/gc/.
    Boehm, H. and Weisner, M., "Garbage Collection in an Uncooperative Environment", Software Practice & Experience, pp 807-820, Sept 1988.
    Boehm, H., "Space Efficient Conservative Garbage Collection", SIGPLAN Notices, Vol 28, ACM, No 6, pp 197-206, June 1993. http://www.hpl.hp.com/personal/Hans_Boehm/gc/papers/pldi93.ps.Z.
    L. Brown, D. Sahlin, "Extending Erlang for Safe Mobile Code Execution", V. Varadharajan, Y. Mu, in Information and Communication Security, Lecture Notes in Computer Science, Vol 1726, Springer-Verlag, pp 39-53, Nov 1999. http://lpb.canb.auug.org.au/adfa/research/sserl/icics99.html.
    L. Brown, "SSErl - Prototype of a Safer Erlang", School of Computer Science, Australian Defence Force Academy, Canberra, Australia, Technical Report, No CS04/97, Nov 1997. http://lpb.canb.auug.org.au/adfa/papers/tr9704.html.
    Maurice Castro, "EC: an Erlang Compiler", Software Engineering Research Centre, RMIT, Melbourne, Australia, Technical Report, No SERC-0128, Jul 2001. http://www.serc.rmit.edu.au/~ec/docs/SERC-0128.pdf.
    Maurice Castro, "EC: an Erlang Compiler", in Seventh International Erlang/OTP User Conference, Erlang Systems, Stockholm, Sweden, Sep 2001. http://www.erlang.se/euc/01/castro2001.ps.
    M. Castro, L. Brown, "EC: an Erlang Compiler", SECR RMIT and CS ADFA, 2003. http://www.cs.adfa.edu.au/~ec/.

Lawrie.Brown@adfa.edu.au / 12 Mar 2003