Team Jacquard

Members
Overall Objectives
Scientific Foundations
Application Domains
Software
New Results
Contracts and Grants with Industry
Other Grants and Activities
Dissemination
Bibliography

Section: Software

Keywords : Program transformation.

Spoon

Participants : Carlos Francisco Noguera Garcia, Renaud Pawlak [ correspondant ] , Nicolas Petitprez.

Spoon [17] , [50] is a project that started in March 2005 and was officially hosted by INRIA Gforge in September 2005. The goal of Spoon is to provide a core API and associated tools for static analysis and generative programming within the Java 5+ environment. Spoon must be seen as a basis to ensure Software Quality through code validation and generation. It can be used in the software development process during the validation phases, as well as for engineering or re-engineering software.

The first key point of Spoon is to provide a well-typed and comprehensive AST API which is designed to facilitate analysis and transformation work for programmers. Scanners and processors allow the programmer to implement various program traversal strategies on the Java program. Also, the program representation is built with a well known and well tested open source Java compiler: The Eclipse JDT compiler, which ensures the support of the latest Java features.

The second key point of Spoon is to provide a pure Java API to specify program transformations using a well-typed generative programming technique (called Spoon Templates). By using well-typed templates, Spoon makes programming of transformations easier and safer for the end-user programmers.

Finally, the third key point of Spoon is that it provides an Eclipse plugin (SpoonJDT) that allows the programmers to package validations and transformations into compilation components called Spoonlets. These components can be deployed in the Eclipse plugin to enhance the Java compiler in a seamless and well-integrated way. For example, thanks to Eclipse's incremental compilation, errors and warnings coming from Spoonlets are reported as regular compilation mistakes, along with the typing of the program. The fact that Spoonlet-defined errors can be reported as the programmer types in the code (exactly like spelling or grammar mistakes are reported real-time by modern text editors) is of primary importance to produce high-quality code. Indeed, it is a recognized fact that the exact moment a programmer introduces a defect in the program is also the best time to fix it - because it is the moment when the programmer has the best understanding of what has just been written.

Many projects and experiments have been conducted around Spoon in the Jacquard project, but also in other INRIA projects and outside of INRIA, by independent developers. A non-exhaustive list follows:

Spoon is open source software available at http://spoon.gforge.inria.fr


previous
next

Logo Inria