Class Substitutions
java.lang.Object
fr.lirmm.graphik.integraal.core.Substitutions
Set of utils for manipulating substitutions.
- Author:
- Clément Sipieter (INRIA) <clement@6pi.fr>
-
Method Summary
Modifier and TypeMethodDescriptionstatic Substitutionadd(Substitution s1, Substitution s2) Merges two substitutions.static Substitutionaggregate(Substitution s1, Substitution s2) Aggregates two substitutions.static AtomcreateImageOf(Atom atom, Variable var, Term image) Create a new Atom which is the image of the specified atom by replacing the specified term by the specified image.static SubstitutionReturns the shared empty substitution.static fr.lirmm.graphik.util.Partition<Term> Converts a substitution into an equivalent partition of terms.
-
Method Details
-
emptySubstitution
Returns the shared empty substitution.- Returns:
- the empty substitution
-
add
Merges two substitutions.- Parameters:
s1- the first substitutions2- the second substitution- Returns:
- the merged substitution, or
nullif they conflict
-
toPartition
Converts a substitution into an equivalent partition of terms.- Parameters:
s- the substitution to convert- Returns:
- the corresponding partition
-
createImageOf
Create a new Atom which is the image of the specified atom by replacing the specified term by the specified image.- Parameters:
atom- the source atomvar- the variable to replaceimage- the image of the specified term- Returns:
- a new Atom which is the image of the specified atom.
-
aggregate
Aggregates two substitutions.- Parameters:
s1- the first substitutions2- the second substitution- Returns:
- the aggregated substitution, or
nullif aggregation fails
-