Program queries can answer important software engineering questions that range from "which expressions are cast to this type?" over "does my program attempt to read from a closed file?" to "does my code follow the prescribed design?". In this paper, we present a comprehensive tool suite for querying Java programs. It consists of the logic program query language SOUL, the CAVA library of predicates for quantifying over an Eclipse workspace and the Eclipse plugin BARISTA for launching queries and inspecting their results. BARISTA allows other Eclipse plugins to peruse program query results which is facilitated by the symbiosis of SOUL with Java -setting SOUL apart from other program query languages. This symbiosis enables the CAVA library to forego the predominant transcription to logic facts of the queried program. Instead, the library queries the actual AST nodes used by Eclipse itself, making it trivial for any Eclipse plugin to find the AST nodes that correspond to a query result. Moreover, such plugins do not have to worry about having queried stale program information. We illustrate the extensibility of our suite by implementing a tool for co-evolving source code and annotations using program queries.
These constraints are expressed using the logic program query language SOUL REF .
The SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
PPPJ
Computer Science