Class TermPartitionFactory

java.lang.Object
fr.inria.rules.integraal.model.partition.TermPartitionFactory

public class TermPartitionFactory extends Object
Creates term partitions using atoms with the same predicate.
  • Constructor Details

    • TermPartitionFactory

      public TermPartitionFactory()
      Creates a term partition factory.
  • Method Details

    • instance

      public static TermPartitionFactory instance()
      Returns the shared factory instance.
      Returns:
      the default instance of this factory
    • getByPositionPartition

      public TermPartition getByPositionPartition(Collection<Atom> A)
      Builds the by-position partition of a set of atoms sharing the same predicate.

      By position partition of A, a set of atoms sharing the predicate p, that is the finest partition on the terms of A such that two terms of A appearing at the same position i (0 < i < arity(p)) are in the same class of the partition

      Parameters:
      A - : all the atoms share the same predicate
      Returns:
      the partition by position