Metamaya is a fancy name for a software project whose goal is to design and develop an open compiler architecture for the Java Virtual Machine.
What is an open compiler?
An open compiler is a compiler that has some extension points. It can be extended with new syntax units, semantic units and optimization passes. So it is not a compiler for language X anymore but it is a metacompiler. This concept is not novel but I haven’t met any viable implementation for a mainstream platform. Also I envision a tool that would be robust enough for everyday application development and not only for demonstration.
Which are the characteristics of such a compiler?
- syntactic and semantic extensions are written as separate modules
- a simple extension can be expressed simply (requires little knowledge about compiler intrinsics)
- you can derive your own extensions based on existing ones
- multiple extensions can be used together (composability)
- each application module declares which extensions (or which language) it uses
- custom languages and extensions reduce to a common semantic model
Who may be interested in this project?
You may be interested if you:
- look for an embedded expression/code snippet compiler
- could use domain specific languages (DSLs) in your projects
- think about implementing a programming language for JVM
- have recognized the power of code generation/transformation
- look for a tool to extract information from code – or to turn information into code
- wonder if there is something like the DLR for Java
- were always dreaming of a freely extendable computer language…
Who are the contributors to this project?
There is only me at the time. As the project will evolve (and it may take a year or two based on my current schedule…) I’d like to involve more contributors. The most zealous one first.
Have you got supporters?
The project is not bound to any company or university. I am a professional developer but this is my personal project. I am open for a partnership that would allow for faster progression while keeping sources open for the public.
What is the status of the project?
There are years of experimenting behind me. Source code was refactored and partly rewritten several times using different approaches. For now its main structure has been stabilised. In July 2012 it comprises approx. 150 classes and far from complete. Currently I’m working on the compiler engine. It will serve as a bootstrap compiler for the next iteration however it would also be suitabel as an embedded compiler for Java projects with code generation demands.
Is there any source code available?
I haven’t published source code yet but I’ve declared that Metamaya is an open source project so after some clean up I will definitely make it available.
What platforms do you plan to support?
Current implementation targets the Java platform however the principle is not tied to it. I settled upon Java because it is widely accepted and the JVM provides features that I can immediately build upon like garbage collection, runtime class loading and extensive libraries. It could be just as easily implemented on top of CLR or other virtual machine but currently I don’t plan to do it.
What type of license will be applied?
I’m going to choose an LGPL-like licence that would allow for commercial usage as well.
Is this website alive?
Yes, and it will wake up gradually as I make progress with my project. If you are eager to know more or would like to encourage me, send me an email.