Class SubstitutionUtils
java.lang.Object
edu.harvard.seas.pl.abcdatalog.util.substitution.SubstitutionUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Clause
applyToClause
(Substitution subst, Clause cl) 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).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).
-
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 substitutionatoms
- the atomsacc
- 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 substitutionatoms
- the atoms- Returns:
- a list of the atoms that result from applying the substitution
-
applyToClause
-