Class AdornedPredicateSym

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

public final class AdornedPredicateSym extends Object
An adorned predicate symbol. Each argument of any atom formed from this predicate symbol will be marked as bound or free in accordance with the predicate's adornment.
  • Constructor Details

    • AdornedPredicateSym

      public AdornedPredicateSym(PredicateSym p, List<Boolean> adornment)
      Constructs an adorned predicate symbol from a predicate symbol and an adornment.
      Parameters:
      p - predicate symbol
      adornment - adornment
  • Method Details

    • getSym

      public String getSym()
    • getArity

      public int getArity()
    • getUnadorned

      public PredicateSym getUnadorned()
      Creates a new predicate symbol that has the same symbol and arity as this one, but no adornment.
      Returns:
      the unadorned predicate symbol
    • getAdornment

      public List<Boolean> getAdornment()
      Returns the adornment for this predicate symbol.
      Returns:
      the adornment
    • getBound

      public int getBound()
      Returns the number of arguments bound in the adornment of this predicate symbol.
      Returns:
      the number of bound arguments
    • 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