Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HarvardPL/AbcDatalog/llms.txt

Use this file to discover all available pages before exploring further.

AbcDatalog is an open-source Java implementation of Datalog, a declarative logic programming language used for knowledge representation and rule-based inference. It provides multiple ready-to-use evaluation engines, a clean Java API, an interactive GUI, and is published to Maven Central under the coordinates io.github.harvardpl:AbcDatalog. Whether you are exploring Datalog as a research tool, teaching logic programming, or embedding deductive inference in a production Java application, AbcDatalog is designed to be easy to adopt and straightforward to extend.

Key features

Installation

Add AbcDatalog to your Maven or Gradle project, or download the pre-built JAR from GitHub Releases.

Quickstart

Write your first Datalog program, initialize an engine, and run queries in minutes.

Evaluation engines

Choose from semi-naive bottom-up, concurrent bottom-up, and top-down QSQ evaluation strategies.

Executor API

Stream new EDB facts into a live evaluation and receive derived facts via registered listeners.

Use cases

AbcDatalog is designed for three primary contexts:
  • Research — the library exposes clean interfaces so you can plug in custom evaluation engines and experiment with new Datalog semantics or language extensions.
  • Pedagogy — the interactive GUI and straightforward Java API make it a practical teaching tool for courses covering logic programming, deductive databases, or program analysis.
  • Production embedding — the Maven Central artifact lets you add a full-featured Datalog engine to any Java application with a single dependency declaration.

Project structure

AbcDatalog is organised into a small set of packages, each with a well-defined responsibility:
PackageDescription
edu.harvard.seas.pl.abcdatalog.engineCore DatalogEngine interface and all evaluation engine implementations
edu.harvard.seas.pl.abcdatalog.parserDatalogTokenizer and DatalogParser for reading Datalog text
edu.harvard.seas.pl.abcdatalog.astAST node types: Clause, PositiveAtom, PredicateSym, Variable, Constant
edu.harvard.seas.pl.abcdatalog.executorDatalogExecutor interface for asynchronous, callback-driven evaluation
edu.harvard.seas.pl.abcdatalog.guiSwing-based interactive GUI (DatalogGui)

Requirements

  • Java 21 or later
  • Maven (v3.9.9 is known to work) — required only for building from source, not for using the library

License

AbcDatalog is released under the 3-Clause BSD License. It was developed as part of the Privacy Tools for Sharing Research Data project at Harvard University and is maintained by Aaron Bembenek, Stephen Chong, and Marco Gaboardi.

Build docs developers (and LLMs) love