Skip to content

Getting Started with Ekeko

Coen De Roover edited this page Nov 7, 2013 · 10 revisions

This tutorial walks you through the steps necessary to start querying an Eclipse workspace.

Installation

Ensure that plugin dependencies org.eclipse.jdt.astview and Counterclockwise are already installed.

Install the prebuilt Ekeko plugin from the Eclipse update site: http://soft.vub.ac.be/~cderoove/eclipse/

Ekeko has been tested against Eclipse Kepler (4.4)

See Installing New Software for help on installing Eclipse plugins from an update site.

Ensure the JVM has a sufficiently large heap

See the Eclipse FAQ How do I increase the heap size available to Eclipse? to ensure Ekeko and its dependencies will not run out of memory, especially when whole-program analyses have to be run.

Launching a Query

See the screen recording:

  1. Select the projects to query:
    Right-click on each project, choose "Configure > Include in Ekeko Queries".

  2. Start an Ekeko-hosted REPL:
    Choose "Ekeko > Start nRepl" from the main Eclipse menu. A dialog shows the port on which the nRepl server listens.

  3. Connect to the Ekeko-hosted REPL: Choose "Window > Connect to REPL" to connect to this port. A Counterclockwise REPL view now opens.

  4. Switch the REPL to the damp.ekeko namespace:
    Evaluate the following expressions in the bottom pane of the REPL view:

  (use 'damp.ekeko)
  (in-ns 'damp.ekeko)
  1. Launch a query: Evaluate the following expression to launch a query that will find each argument ?arg to every method invocation ?inv in the selected Eclipse JDT projects:
  (ekeko* [?inv ?arg] 
    (ast :MethodInvocation ?inv)
    (child :arguments ?inv ?arg))

A new view opens that enables inspecting the results of the query. See the [http://soft.vub.ac.be/SOUL/home/querying-from-eclipse/running-and-inspecting-a-query/](Barista documentation) for more information about this view.
See Example-Ekeko-Queries for other queries to try.