views:

658

answers:

4

I am struck by the ambition and creativity of Charles Simonyi's efforts to establish the field of Intentional Programming, first at Microsoft and then with his own company.

http://stackoverflow.com/questions/201386/what-exactly-is-intentional-programming

http://en.wikipedia.org/wiki/Intentional_programming

In this approach to software, a programmer first builds a toolbox specific to a given problem domain (such as life insurance). Domain experts, aided by the programmer, then describe the program's intended behavior in a What You See Is What You Get (WYSIWYG)-like manner. An automated system uses the program description and the toolbox to generate the final program. Successive changes are only done at the WYSIWYG level.

It seems to be such a useful and practical approach to programming, potentially circumventing many of the problems with current approaches to software development.

Essentially it seems to facilitate the creation of domain-specific languages by non-programmers (business/systems analysts) but at a stage much closer to real-life implementation than UML could provide. He says it will be completed eventually but that it is not there yet (almost 15 years later).

DSLs run the gamut from simple 5-line rule engines to complex applications like Ruby on Rails. So I imagine the delay in releasing his product has to do with the fact that he is dealing with simplifying a much higher level of abstraction because he has to essentially allow for the encapsulation of all domain languages at once.

So, my question is

(a) whether Antlr could be an alternative to Intentional Programming - although perhaps a less user-friendly alternative which requires the intervention of programmers rather than permitting business analysts to generate the DSL? Could you use Antlr to generate a DSL like Ruby on Rails (assuming it supported Ruby as an output - which I think it does not)? What can it not do? Also, I don't understand why it's called a "language parser" rather than a "language generator" - since the latter describes what it is used for while the former describes how it achieves its end result.

and

(b) if Antlr is different from Intentional Programming, is there anything similar to Intentional Programming?

+1  A: 

I am not an expert on this, so treat with a large pinch of salt. However...

ANTLR itself is not a DSL generator, though it can be used to create code that interprets DSLs. It is a parser generator - but the DSL generator would have to create what ANTLR generates a parser from.

Jonathan Leffler
+2  A: 

ANTLR is just a parser generator. In any non-trivial DSL, writing the parser is less than 50% of the effort expended in implementing the DSL. The evaluator/rule engine/code generator/schedule or whatever else your DSL does, probably requires more work and can't be generated like a parser.

Wouter Lievens
A: 

In answer to part b), three systems that work in a similar space are:

Each of these products has different strengths and weaknesses, but all of them fall into the category of Language Workbenches. Intentional Software's Intentional Workbench is possibly the most ambitious product in this category to date, but is also not generally available.

MPS and xText are free, open-source products. MetaCase is the most mature, and is a commercial product. All of them have a steep learning curve.

David Sykes
A: 

And I would like to add to the rest of the answers that Ruby on Rails is not a DSL :) just wanted to clarify this misconception.

Hady A.