Class SimpleScheduler

java.lang.Object
fr.inria.rules.integraal.query_evaluation.conjunction.backtrack.legacy.SimpleScheduler
All Implemented Interfaces:
Scheduler

public class SimpleScheduler extends Object implements Scheduler
This (static) scheduler gives the next part to evaluate by keeping the parts containing computed atoms and negation at the end. This make it sure that the current solution contains the elements that are needed to evaluate the given part (iff the initial conjunction is correct)
  • Constructor Details

    • SimpleScheduler

      public SimpleScheduler(FOQuery<? extends FOFormulaConjunction> query)
      Creates a new scheduler over the given query
      Parameters:
      query - the query to schedule
  • Method Details

    • next

      public FOFormula next(int level, Substitution currentSolution)
      Description copied from interface: Scheduler
      Returns the next formula to evaluate at the supplied level.
      Specified by:
      next in interface Scheduler
      Parameters:
      level - the current level
      currentSolution - the current solution
      Returns:
      the next element to evaluate at the given level
    • hasNext

      public boolean hasNext(int level)
      Description copied from interface: Scheduler
      Indicates whether another formula remains to evaluate at the supplied level.
      Specified by:
      hasNext in interface Scheduler
      Parameters:
      level - the current level
      Returns:
      true iff there is a next element to evaluate at the given level