Class SubstitutionUtils

java.lang.Object
edu.harvard.seas.pl.abcdatalog.util.substitution.SubstitutionUtils

public final class SubstitutionUtils extends Object
  • Method Details

    • applyToPositiveAtoms

      public static void applyToPositiveAtoms(Substitution subst, Iterable<PositiveAtom> atoms, Collection<PositiveAtom> acc)
      Apply a substitution to the given positive atoms, adding the resulting atoms to the provided collection (in order).
      Parameters:
      subst - the substitution
      atoms - the atoms
      acc - the collection to add the atoms to
    • applyToPositiveAtoms

      public static List<PositiveAtom> applyToPositiveAtoms(Substitution subst, Iterable<PositiveAtom> atoms)
      Apply a substitution to the given positive atoms, returning a list of the resulting atoms (in order).
      Parameters:
      subst - the substitution
      atoms - the atoms
      Returns:
      a list of the atoms that result from applying the substitution
    • applyToClause

      public static Clause applyToClause(Substitution subst, Clause cl)