Class Substitutions

java.lang.Object
fr.lirmm.graphik.integraal.core.Substitutions

public final class Substitutions extends Object
Set of utils for manipulating substitutions.
Author:
Clément Sipieter (INRIA) <clement@6pi.fr>
  • Method Details

    • emptySubstitution

      public static Substitution emptySubstitution()
      Returns the shared empty substitution.
      Returns:
      the empty substitution
    • add

      public static Substitution add(Substitution s1, Substitution s2)
      Merges two substitutions.
      Parameters:
      s1 - the first substitution
      s2 - the second substitution
      Returns:
      the merged substitution, or null if they conflict
    • toPartition

      public static fr.lirmm.graphik.util.Partition<Term> toPartition(Substitution s)
      Converts a substitution into an equivalent partition of terms.
      Parameters:
      s - the substitution to convert
      Returns:
      the corresponding partition
    • createImageOf

      public static Atom createImageOf(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.
      Parameters:
      atom - the source atom
      var - the variable to replace
      image - the image of the specified term
      Returns:
      a new Atom which is the image of the specified atom.
    • aggregate

      public static Substitution aggregate(Substitution s1, Substitution s2)
      Aggregates two substitutions.
      Parameters:
      s1 - the first substitution
      s2 - the second substitution
      Returns:
      the aggregated substitution, or null if aggregation fails