Extempore is an open-source (MIT Licence) programming language and runtime environment designed to support live programming---a human programmer operating as an active agent in a real-time distributed network of environmentally aware systems. The programmer interacts with the distributed real-time system by modifying code on-the-fly.
Extempore provides a completely hot-swappable runtime environment with a strong temporal semantics, a flexible concurrency architecture, builtin support for distributed computing, and aims to provide flexible compiler-as-a-service functionality. Extempore makes extensive use of LLVM project to JIT-compile efficient native code in real-time.
Live programming with scientific simulation codes
Running codes in batch mode is the norm in scientific computing, with good reason---pity the poor grad student who would otherwise have to stay awake all night interactively triggering simulation runs during a parameter sweep! However, this workflow also has disadvantages, especially in the early stages of developing new codes or tackling new problem domains. This project would involve using Extempore to interact with running scientific simulation codes---inserting debugging code, tuning parameters and hot-swapping subroutines---to better understand what the codes are doing (or not doing) and to give new insights into the underlying science.
Extempore has already been used for interactive steering of particle-in-cell (PIC) plasma physics simulation codes. This project provides an opportunity to continue this work, working with both live programmers and physicists at the ANU and overseas to harness and profile plasma physics PIC codes in this live programming workflow.
This project will apply a modern live-coding tools & techniques to a common problem in the scientific simulation community---how to "breathe life" into legacy simulation codes. Often these codes are used for many years (or decades!) after they were first developed. They are often used by experimental scientists to model experiments which are quite different from those existing when the simulations were first developed. In the absence of the original programmers, there is a need to bring these simulations back to life and to return them to the experimentalists with modern user interfaces and functionality.
This project would involve: - prototyping simulations on parallel computers under real-time control in Extempore - implementing library/tooling support in Extempore to provide a programmer with appropriate feedback and control of a simulation - evaluating the opportunities and challenges of live steering in this context (e.g. what safeguards must the tooling provide, what timescales and algorithmic "granularity" provides the most fruitful domain for live steering) - working with domain expert physicists to understand & interpret the results of the computation
- programming skills (especially C, but some Lisp knowledge would be helpful too)
- experience with scientific and numerical computation
- parallel programming
Benefit for the Student
- the chance to work with real computational physicists, doing real science
- design, build and evaluate programming tools & interfaces in Extempore which will be used by other scientists
Benefit for the Project
Extempore has been used for interactive scientific simulation in the past, but mostly in an ad-hoc manner. This project would allow a student to take a big-picture view of the libraries & other infrastructure to help more scientists incorporate some live interactivity into their simulation workflow. The libraries developed in the project could then be extended in the future for working with other simulation codes.
A self-hosting xtlang compiler
The compiler for Extempore's native language, xtlang, is currently written in Scheme. It is desirable for Extempore to eventually become self-hosting, i.e. for the xtlang compiler to be written in xtlang.
- Scheme (the current compiler is written in Scheme
- algorithms & data structures
- familiarity with LLVM a bonus
Benefit for the Student
- learn about compilers, type inference, in a dynamic and interactive environment (in Extempore, even the compiler is runtime hot-swappable!)
- work on the guts of Extempore, getting to know the system in-depth
Benefit for the Project
The current Scheme implementation of the xtlang compiler works well, but is slow, especially when working with generic functions, which xtlang supports. Re-implementing the compiler in xtlang would make compilations times (several?) orders of magnitude faster in some cases, which is especially important in a programming environment designed for interactive computation.