JunGL: A scripting language for refactoring

Mathieu Verbaere, Ran Ettinger, Oege De Moor

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

75 Scopus citations

Abstract

Refactorings are behaviour-preserving program transformations, typically for improving the structure of existing code. A few of these transformations have been mechanised in interactive development environments. Many more refactorings have been proposed, and it would be desirable for programmers to script their own refactorings. Implementing such source-to-source transformations, however, is quite complex: even the most sophisticated development environments contain significant bugs in their refactoring tools. We present a domain-specific language for refactoring, named JunGL. It manipulates a graph representation of the program: all information about the program, including ASTs for its compilation units, variable binding, control flow and so on is represented in a uniform graph format. The language is a hybrid of a functional language (in the style of ML) and a logic query language (akin to Datalog). JunGL furthermore has a notion of demand-driven evaluation for constructing computed information in the graph, such as control flow edges. Borrowing from earlier work on the specification of compiler optimisations, JunGL uses socalled 'path queries' to express dataflow properties. We motivate the design of JunGL via a number of nontrivial refactorings, and describe its implementation on the .NET platform.

Original languageEnglish
Title of host publicationProceeding of the 28th International Conference on Software Engineering 2006, ICSE '06
Pages172-181
Number of pages10
StatePublished - 1 Dec 2006
Externally publishedYes
Event28th International Conference on Software Engineering 2006, ICSE '06 - Shanghai, China
Duration: 20 May 200628 May 2006

Publication series

NameProceedings - International Conference on Software Engineering
Volume2006
ISSN (Print)0270-5257

Conference

Conference28th International Conference on Software Engineering 2006, ICSE '06
Country/TerritoryChina
CityShanghai
Period20/05/0628/05/06

Keywords

  • Language workbenches
  • Refactoring
  • Scripting language
  • Source code transformation

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'JunGL: A scripting language for refactoring'. Together they form a unique fingerprint.

Cite this