2011 · 53 citations · 22 references
ComputingComputer ScienceProgramming LanguagesSoftware EngineeringSystems ProgrammingAbstract Syntax TreesApplication Programming InterfacesLogic ProgrammingPredicate LogicQuery ProcessingPredicate AnalysisSource Code Analysis
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.
22
The Semantics of Predicate Logic as a Programming Language
M. H. van Emden, Robert Kowalski · Journal of the ACM · 1976 · 1.5K citations · Full text
Humanities, Computer Science, Logic +16
Raja Vallée-Rai, Phong Co, Étienne Gagnon et al. · 2010 · 939 citations
Michael Hind · 2001 · 583 citations