Class AdornedClause

java.lang.Object
edu.harvard.seas.pl.abcdatalog.engine.topdown.AdornedClause

public final class AdornedClause extends Object
An adorned clause (i.e., a Horn clause where every atom is itself adorned).
  • Constructor Details

    • AdornedClause

      public AdornedClause(AdornedAtom head, List<AdornedAtom> body)
      Constructs an adorned clause given an adorned atom for the head and a list of adorned atoms for the body.
      Parameters:
      head - head atom of clause
      body - atoms for body of clause
  • Method Details

    • fromClause

      public static AdornedClause fromClause(List<Boolean> headAdornment, DatalogValidator.ValidClause clause)
      Constructs an adorned clause given an adornment to apply to the head and clause to adorn. The head adornment ripples left to right across the atoms in the body.
      Parameters:
      headAdornment - adornment for head atom. A true value implies that that term is bound, false implies free.
      clause - original clause
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getBody

      public List<AdornedAtom> getBody()
    • getHead

      public AdornedAtom getHead()