ASTcentric logo

History

At the ECOOP 2001 conference in Budapest I listened to a keynote from Charles Simonyi about Intentional Programming, a system he is developing at Microsoft Research. This was a fascinating talk about a new programming paradigm but it seemed to be far ahead in the future.

At the conference I also bought the book from Czarnecki and Eisenecker: Generative Programming which has a chapter about Intentional Programming. Over the years I didn't heard much about Intentional Programming. Hence I was curious how the idea has been developed. I googled in the Web but I didn't found anything useful:

I wrote for myself a text where I discussed some of the drawbacks of the current way of developing software even with high-sophisticated IDEs like Eclipse or IntelliJ IDEA. I proposed AST-centric programming for curing some of these drawbacks. I started with Study 1. I entered 'new programming paradigm' into Google which leads me to the article Language Oriented Programming: The Next Programming Paradigm from Sergey Dimitriev CEO of JetBrains published November 2004. He introduced Meta-Programming System (MPS) which combines Language Oriented Programming with AST-centric programming. Also MPS is inspired by Simonyi's Intentional Programming. MPS was announced to be a plugin for IntelliJ IDEA but it wasn't available in April 2005. The Study 1 prototype reached a level of saturation to start writing 'real-life' programs. I wrote such programs in order to get a feeling of the difference between AST-centric programming versus text-centric programming.

The prototype revealed some buggy behavior which are difficult to solve based on the design of Study 1. This design flaws also prevent to develop complex AST transformations. Therefore I decided to stop developing Study 1. The last feature has been implemented on June 12. My colleague Rahel Luethy told me that JetBrains MPS is out. She also mentioned the article Language Workbenches: The Killer-App for Domain Specific Languages? from Martin Fowler published June 12, 2005.

I tried MPS and found out that rendering of the AST nodes are not very flexible. There is a lot of improvements necessary in order to become as sophisticated as the ASTcentric Study 1 prototype. I talked four hours with Markus Degen, a friend and software developer, about AST-centric programming. I showed him the ASTcentric Study 1 Prototype and MPS. He encouraged me to publish this prototype even though it is only a proof of concepts. I registered ASTcentric project at SourceForge. It has been approved at the same day. Release of ASTcentric Study 1 Prototype. I started from the scratch with a new framework because I got problems with the prototype concerning references between nodes. The aim of the new development was to allow that a node can refer a node from another AST. For that reason I had to think about unique node and AST identifiers. For the AST identifier I took an approach similiar to the concept of unique Java class names. For the new development I concentrated on the general AST structure, on AST renderering (including a sophisticated algorithm for wrapping long lines), AST rendering language based on an AST, Swing viewer, and Eclipse viewing plugin. At the end of October I realized, that it is not a good idea to use the AST name also as an AST identifier. I started my third approach again from the scratch. Some of the code developed in the second half of 2005 has been reused. First, I developed a concept for a unique AST identifier and its mapping onto file names. For the third approach I concentrated first on the AST structure and the basic classes building them. Also saving to the filesystem and reading from them were developed very early. Later on I started developing a language for specifing valid AST structures. This was the first application of the concepts. In May 2006 I started developing an editor. Initially it was only a console-based editor. In June, development for a Swing-based editor as well as an Eclipse plugin started. Here I could reuse code from the second approach. The aim was to develop something similar to XML, XML Schema, and a schema-aware XML editor. The current state of the project is as follows:

  • The AST structure (and base classes) are pretty stable.
  • The Validation Language is in an advanced state but not finished. The main open question is, how elaborate should it be? Should it be possible to check an AST only syntactically (like XML Schema for XML) or also semantically like a compiler when parsing source code?
  • The graphical editors (for Swing and Eclipse) are in a useful alpha- or beta-state including validation and something like "code completion" based on the Validation Language.
I have started with the documentation of the current codebase. First release of ASTcentric Framework with plain AST Editor (Swing version only). First release of ASTcentric Pugin for Eclipse. Case Study: Properties finished.