damp.ekeko.plugin
Ekeko enables querying and manipulating an Eclipse workspace using applicative logic programs.
Its libraries provide support for answering program queries (e.g., "is my code bug free?" or "does my code follow the prescribed design?") as well as transforming programs (e.g., "patch my code as follows") in a declarative manner.
Ekeko is based on the excellent core.logic port to Clojure of the applicative logic programming library Kanren.
Documentation
See the damp.ekeko wiki for information on:
See the damp.ekeko API documentation for an overview of all relations and functions that are included.
See the following publication for the motivation behind Ekeko and possible applications:
Building Development Tools Interactively using the Ekeko Meta-Programming Library
Coen De Roover, Reinout Stevens
Proceedings of the IEEE CSMR-WCRE 2014 Software Evolution Week (CSMR-WCRE14), Tool Demo Track, Antwerp (Belgium)
There is also a screencast accompanying this publication:

Requirements
VS Code or VSCodium, 1.85 or newer.
The following extensions will be installed alongside Ekeko:
- The Language Support for Java
(
redhat.java) extension. Declared as a hard dependency
(extensionDependencies), so installing this extension installs that one
automatically if it isn't already present.
- The Calva extension, to connect to the REPL.
Usage
Open a Java project. Any folder VS Code/redhat.java recognizes as a
Java project (an Eclipse .project/.classpath pair, a Maven pom.xml,
or a Gradle build) works. Wait for the status bar's Java icon to read
"Java: Ready" — Ekeko's bundle activates alongside redhat.java and
automatically enables itself on every open Java project, so there's
nothing project-specific to configure.
Ekeko: Rebuild Model (command palette) — (re)builds Ekeko's queryable
fact base for all open Java projects. Runs automatically on project open;
use this after large offline changes (e.g. a git checkout) to force a
full rebuild.
Ekeko: Start REPL (command palette) — starts an Ekeko nREPL server and connects
Calva to it automatically, opening a classic prompted REPL window
(clj:user:>) docked as a column on the right, beside the code editor.
From here you can evaluate any Clojure code with full access to the live
project's AST. The example depicted below finds all method declarations
in the opened project:
(require 'damp.ekeko)
(in-ns 'damp.ekeko)
(count (ekeko [?m] (ast :MethodDeclaration ?m)))
Ekeko: Stop REPL stops the server.
Running a query and seeing results. Tosee a
query's results in the Ekeko panel: evaluate (ekeko* ...) or (ekeko-n* n ...) at the connected REPL —
and the Ekeko panel pops open automatically with the result table. This is the
primary, REPL-native way to query.
In the results table, one column per query variable: cells that resolved
to a real AST element (a method, type, statement, ...) render as
clickable links — click one to open its source file at exactly
that range. Other cells (strings, numbers, booleans, nil, ...) render
as plain text.
Loading your own scripts. Ekeko scripts are just .clj files
anywhere in your open workspace. Open one and run Calva's own "Load/
Evaluate Current File (and its Requires/Dependencies)" command (command
palette, or Ctrl+Alt+C Enter) to load it into the connected REPL —
functions and vars it defines become callable from the REPL immediately
afterward.
License
Copyright © 2012-2026 Ekeko contributors:
Distributed under the Eclipse Public License.
Ekeko stands on the shoulders of open source giants.
Included dependencies: