Intentional Programming
Program-Transformation.Org: The Program Transformation Wiki
Description
Intentional programming developed at Microsoft Research [Ait98]
is a method for extending a language with new constructs or
intentions. The meaning of intentions is defined by means of
transformation rules. A rule transforms an intention into an
expression built of more primitive intentions.
The method is supported by a C library for tree manipulation that can
be used to express transformation rules. Rules have to explicitly
deconstruct and reconstruct trees with awareness of pointers. No
support for pattern matching seems to be provided. A detailed
knowledge of the implementation details of the abstract syntax seems
to be required to be able to write or understand transformation rules.
An ordering of application of rules (strategy) is derived from
dependencies between rules.
From [Ait98] it is not clear at what level intentions are
defined. Does the programmer extend a program with new intentions that
are used in the same program? Or are intentions defined at the
meta-level of the language definition, which is thus made extensible?
Remarks by
OegeDeMoor on July 13, 2001.
The intentions are defined at the meta-level of language definition.
The first two references below describe obsolete designs. More up-to-date descriptions are provided by the latter two. The talk for the British Computer Society is aimed at a general audience.
References 3. and 4. make it clear that
modular language design is a key point of intentional programming.
Several of the aims of and techniques used in intentional programming are very similar to those of the
ASFandSDFMetaEnvironment.
An original goal was to have one description of a generic while statement, for example, which would be reusable for different languages (e.g., C, Pascal, and Cobol). This way of modularization, however, turned out to be not feasible, due to the differences in existing languages.
I believe the modular design aspects of intentional programming are not so much in describing
existing languages, but in having "intentions" (language features) that are reusable across different domains, so IP may be successful in this respect.
I think some interesting related approaches include the Jargons of Lucent by Nakatani and the work on interactive language design by Uwe Karstens (for both, see the
DSLAnnotatedBibliography).
Also related is the (newer) work on language design assistants by
JanHeering.
--
ArieVanDeursen - 13 Aug 2001
References
- Chapter 11 of GenerativeProgramming
- [Ait98] William Aitken, Brian Dickens, Paul Kwiatkowski, Oege de Moor, David Richter, Charles Simonyi, "Transformation in Intentional Programming," In Proceedings of the 5th Int. Conf. on SoftwareReuse, IEEE, 1998. See http://research.microsoft.com/copyright/accept.asp?path=/ip/overview/TrafoInIP.pdf&pub=IEEE (describes a now obsolete design)
- OegeDeMoor. Intentional Programming. Lecture for the British Computer Society. See http://web.comlab.ox.ac.uk/oucl/work/oege.demoor/talks/ip.pdf.gz
- OegeDeMoor, GaneshSittampalam and Eric van Wyk. Intentional Programming: a host of language features. Technical report, Oxford University Computing Laboratory. See http://web.comlab.ox.ac.uk/oucl/work/eric.van.wyk/Papers/ip.ps
See Also
CategorySystem | Contributions by
OegeDeMoor,
ArieVanDeursen,
EelcoVisser