JunGL: a Scripting Language for Refactoring
The previously blogged Czarnecki paper referenced the JunGL project at Oxford.
JunGL is a domain-specific language for refactoring. The ICSE paper describes C# refactorings.
They point out that development environments implementations of refactorings are often quite buggy. I’ve noticed this myself. They’ve compiled a list of such bugs.
They also point out that authoring refactorings with existing IDE’s is “extremely rudimentary”.
In the first section:
In this paper, we wish to suggest that the techniques which have proven successful in specifying compiler optmisations form an appropriate basis for scripting refactoring transformations — with the important difference that in refactoring one transforms source code, and not some convenient intermediate representation.
Well put. Most of the material I’ve seen in the field of programming languages is about these convenient intermediate representations. I always wondered where the source code transforming versions of those algorithms were, but now that I think about it, it’s not a problem that people have taken seriously until recently.
They define their language and give many examples in the paper. The two most interesting aspects of the language, imo, are:
1) Streams. Demand-driven evaluation. “The use of streams often allows us to specify a search problem in a nice, compositional way: generate a stream of successes, and pick the first one.” Inefficient searching was definitely a problem with the refactorings in Eclipse that I was looking at a few years ago.
2) Lazy Edges: which allow them to add control flow edges (which comes up a lot in refactoring) without “laboriously contruct[ing] all the auxiliary information on new nodes.”
Posted by Adam Pingel @ May 30th, 2007 under Software Engineering.
Comments: none






Write a comment