Code querying by UML
Carlos Noguera, Coen De Roover, Andy Kellens, Viviane Jonckers · 2012
The need to identify source code that exhibits particular characteristics is essential to program comprehension. In this paper we introduce Arabica, a tool for querying Java code using UML class and sequence diagrams. Our use of UML diagrams avoids the need for developers to familiarize themselves with yet another language. In contrast to tools that rely on dedicated query languages, Arabica encodes querying semantics in a dedicated, minimal UML profile. Stereotyped class and sequence diagrams, characterizing structural and behavioral properties respectively, are translated into logic program queries. Using examples from the JHotDraw framework, we illustrate the utility of Arabica in validating design invariants, finding design pattern implementations and exploring extension points. We present a pre/post-test quasi experiment as a preliminary assessment of our approach.