Building development tools interactively using the EKEKO meta-programming library

EKEKO is a Clojure library for applicative logic meta-programming against an Eclipse workspace. EKEKO has been applied successfully to answering program queries (e.g., “does this bug pattern occur in my code?”), to analyzing project corpora (e.g., “how often does this API usage pattern occur in this corpus?”), and to transforming programs (e.g., “change occurrences of this pattern as follows”) in a declarative manner. These applications rely on a seamless embedding of logic queries in applicative expressions. While the former identify source code of interest, the latter associate error markers with, compute statistics about, or rewrite the identified source code snippets. In this paper, we detail the logic and applicative aspects of the EKEKO library. We also highlight key choices in their implementation. In particular, we demonstrate how a causal connection with the Eclipse infrastructure enables building development tools interactively on the Clojure read-eval-print loop.

[1]  William E. Byrd,et al.  Relational programming in minikanren: techniques, applications, and implementations , 2009 .

[2]  Elnar Hajiyev,et al.  codeQuest: Scalable Source Code Queries with Datalog , 2006, ECOOP.

[3]  Coen De Roover,et al.  Aspectual source code analysis with GASR , 2013, 2013 IEEE 13th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[4]  Coen De Roover,et al.  A History Querying Tool and Its Application to Detect Multi-version Refactorings , 2013, 2013 17th European Conference on Software Maintenance and Reengineering.

[5]  Andy Kellens,et al.  The SOUL tool suite for querying programs in symbiosis with Eclipse , 2011, PPPJ.

[6]  Laurie J. Hendren,et al.  Enabling static analysis for partial java programs , 2008, OOPSLA.

[7]  Ondrej Lhoták,et al.  The Soot framework for Java program analysis: a retrospective , 2011 .

[8]  Benjamin Livshits,et al.  Finding application errors and security flaws using PQL: a program query language , 2005, OOPSLA '05.

[9]  Andy Kellens,et al.  Program querying with a SOUL: The BARISTA tool suite , 2011, 2011 27th IEEE International Conference on Software Maintenance (ICSM).