Interface DatalogEngineWithProvenance

All Superinterfaces:
DatalogEngine
All Known Implementing Classes:
BottomUpEngineFrameWithProvenance, SemiNaiveEngine

public interface DatalogEngineWithProvenance extends DatalogEngine
A Datalog evaluation engine that retains fact provenance. Datalog engines are initialized with a set of clauses that represent initial facts and rules that can be used to derive new facts. After initialization, clients can query about whether certain facts are derivable.

This engine also supports why-provenance queries; that is, querying for the justification for why a fact was derived.

  • Method Summary

    Modifier and Type
    Method
    Description
    Return the last rule used in the justification of the given atom.

    Methods inherited from interface edu.harvard.seas.pl.abcdatalog.engine.DatalogEngine

    init, query, query
  • Method Details

    • getJustification

      Clause getJustification(PositiveAtom fact)
      Return the last rule used in the justification of the given atom. The returned rule should be ground (variable-free). Return null if the given atom is not a fact or was not derived.

      A client can recursively invoke this method on the premises of the returned clause to build a provenance tree.
      Parameters:
      fact - the fact
      Returns:
      the last rule used to justify that fact