This document offers more detailed description of the ideal metaprogramming framework. For an introduction, please read quickstart.
The directory structure of the codebase is as follows:
- ideal.i — root source file in the ideal notation
- library — core library interfaces
- runtime — implementation of the library
- showcase — simple ideal programs
- development — partially bootstrapped metaprogramming framework code
- machine — code that is handled by the target machine
- jsource/ideal
— source code in Java
- machine — JVM-specific runtime code
- development — main metaprogramming framework code
- experimental — experiments that are not essential part of the codebase
- documentation — documents from which the theideal.org site is generated
- bootstrapped — library, runtime, translated into Java
- testdata — input and ouput for regression tests
- bin — helper scripts
- thirdparty — software needed to build and run ideal
- build — directory for files created during the build process
- Makefile — targets to translate and run ideal using make
- LICENSE — new BSD license
- AUTHORS — list of authors for copyright purposes
- CONTRIBUTORS — list of developers
The grammar for the ideal notation can be found in this file (using Java CUP format.)
Building and running ideal is easy on a Unix-like system (tested on Mac OS X and Linux.) The dependencies are: JDK, JSR 305 annotations, Google Gson, JavaCUP. AppEngine SDK is needed if you want to build and run the Coach app.
Before running ideal, you need tp create and populate the thirdparty directory. To do that and fetch all the dependencies, run bin/setup-thirdparty.sh from the top-level directory. In addition, you'll need to create a symlink from thirdparty/jdk to the JDK home directory (such as /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home on Mac OS X.) It should be possible to invoke the Java compiler via thirdparty/jdk/bin/javac.
Make is currently used to build and run ideal. Default target builds the create tool, bootstraps ideal.library.elements, analyzes it and prints it out. Targets hello and circle execute respective code from showcase directive. 12 executes tests/12.i. The targets generate_library and generate_runtime generate Java source code from library and runtime, respectively. The targets test_library and test_runtime test that the code compiles. The targets bootstrap_library and bootstrap_runtime bootstrap the code by overwriting the files in bootstrapped directory.
For questions and feedback, here's how to communicate.