Class NoRuleCompilation

java.lang.Object
fr.inria.rules.integraal.model.ruleCompilation.NoRuleCompilation
All Implemented Interfaces:
RuleCompilation

public class NoRuleCompilation extends Object implements RuleCompilation
Does not compile anything
Author:
Florent Tornil
  • Method Details

    • instance

      public static NoRuleCompilation instance()
      Returns the shared no-op compilation instance.
      Returns:
      the default instance of this class
    • compile

      public void compile(RuleBase rb)
      Description copied from interface: RuleCompilation
      This method also removes the compiled rules from the given rulebase.
      Specified by:
      compile in interface RuleCompilation
      Parameters:
      rb - rulebase to compile
    • compileAndGet

      public RuleCompilationResult compileAndGet(RuleBase rb)
      Description copied from interface: RuleCompilation
      Compiles the rule base and returns the compilation split.
      Specified by:
      compileAndGet in interface RuleCompilation
      Parameters:
      rb - rulebase to compile
      Returns:
      the compilation result and the partition of input rules
    • isMoreSpecificThan

      public boolean isMoreSpecificThan(Atom a, Atom b)
      Description copied from interface: RuleCompilation
      This method is not used for the moment.
      Specified by:
      isMoreSpecificThan in interface RuleCompilation
      Parameters:
      a - an atom
      b - an atom
      Returns:
      true iff a <= b
    • unfold

      public Set<org.apache.commons.lang3.tuple.Pair<Atom, Substitution>> unfold(Atom a)
      Description copied from interface: RuleCompilation
      The unfolding of an atom a is a set A' such that for all a' in A', a' <= a. The atom is returned with a substitution representing the specialization from the unification with the compiled rule.
      Specified by:
      unfold in interface RuleCompilation
      Parameters:
      a - an atom
      Returns:
      the unfolding of a with this compilation
    • isCompatible

      public boolean isCompatible(Predicate p, Predicate q)
      Description copied from interface: RuleCompilation
      Two predicates are compatible iff there exists a condition c = (p, q, Ep, Lq)
      Specified by:
      isCompatible in interface RuleCompilation
      Parameters:
      p - a predicate
      q - a predicate
      Returns:
      true iff p and q are compatible
    • getCompatiblePredicates

      public Set<Predicate> getCompatiblePredicates(Predicate p)
      Description copied from interface: RuleCompilation
      Returns every predicate compatible with the supplied one.
      Specified by:
      getCompatiblePredicates in interface RuleCompilation
      Parameters:
      p - a predicate
      Returns:
      the set of all the predicates that are compatible with p
    • getHomomorphisms

      public Set<Substitution> getHomomorphisms(Atom a, Atom b, Substitution s)
      Description copied from interface: RuleCompilation
      Compute all the possible homomorphisms from a to b with respect to s
      Specified by:
      getHomomorphisms in interface RuleCompilation
      Parameters:
      a - an atom
      b - an atom
      s - a substitution
      Returns:
      the set of substitutions from the terms of a to the terms of b with respect to s
    • getUnifications

      public Set<TermPartition> getUnifications(Atom a, Atom b)
      Description copied from interface: RuleCompilation
      Compute all the possible unifiers between a and b
      Specified by:
      getUnifications in interface RuleCompilation
      Parameters:
      a - an atom
      b - an atom
      Returns:
      the set of all partitions from the terms of b and a