Version 196 (modified by benl, 7 years ago) (diff) |
---|
The Disciplined Disciple Compiler (DDC)
Disciple is a dialect of Haskell that uses strict evaluation as the default and supports destructive update of arbitrary data structures. Disciple includes region, effect and closure typing, and this extra information provides a handle on the operational behaviour of code that isn't available in other languages. Programs can be written in either a pure/functional or effectful/imperative style, and one of our goals is to provide both styles coherently in the same language. The two styles can be mixed safely, for example: when using laziness the type system guarantees that computations with visible side effects are not suspended. Many Haskell programs are also Disciple programs, or will run with minor changes. Our target applications are the ones that you always find yourself writing C programs for, because existing functional languages are too slow, use too much memory, or don't let you update the data that you need to.
State of Play
DDC is being rewritten to use a cleaned-up core language similar to what GHC now uses. The original (alpha) version of the compiler is still available in the source repository, but work on it has ceased.
The new DDC is currently at a stage where it will parse and type-check core programs, and compile recursive functions over lists. There is also an interpreter that we use to experiment with the language design. Example Code
This section summarises the main changes to the repository over the last month.
- 13/08/2012 Tran: added Distinct witnesses to track aliasing properties of regions.
- 13/08/2012 Amos: build/fold fusion via rewrite rules now works.
- 13/08/2012 Ben: got enough LLVM code generation working to write first-order functions over lists with the new core language.
Language
- Language Overview (for the alpha compiler)
- Source Language Definition? (for the alpha compiler)
Current Release
The current release is DDC 0.2.1.2 (October 2012). It consists of the following packages:
- ddci-core An iterative interpreter. This is the user interface for the other packages.
- ddc-core Defines the abstract syntax, type checker, and substitution operators.
- ddc-core-eval Provides a single step evaluator (interpreter). It is a direct implementation of the operational semantics.
- ddc-core-simpl Implements simplifying code transformations (optimisations).
- ddc-base This package re-exports the main external dependencies of the Disciplined Disciple Compiler project.
See the tutorial Getting Started with Disciple Core? for help getting started.
Development
- Disciple Development Blog (benl23)
- Erik's DDC Blog (m3ga)
- Get the source?
- Build the compiler and libraries?
- Running tests and demos
- Development Builds
- Build Bots and Servers
- Building the Code documentation
- Syntax Highlighting?
- Coding Conventions
- Using Darcs?
- Debugging Help
- Memory and CPU Usage Profiling?
- Making Patches
- Fixing Newbie Bugs
- Installing the full compiler?
How you can help
- Download the compiler, write programs, and file bug reports!
How to get help
- Send mail to disciple-cafe at Google Groups.
- Ask in the #disciplined channel on the freenode IRC network.
Further Reading
- Ben's academic webpage
- Type Inference and Optimisation for an Impure World, ANU 2010 (PhD thesis)
- Witnessing Mutability, Purity and Aliasing for Program Optimisation, (DRAFT)
- Witnessing Purity, Constancy and Mutability, slides, APLAS 2009