galois.runtime.wl
Class Priority.Rule

java.lang.Object
  extended by galois.runtime.wl.Priority.Rule
Enclosing class:
Priority

public static class Priority.Rule
extends Object

An ordering specification. An ordering specification consists of two parts: a global order and a local order. An order is a sequence of rules chained together by a sequence of then(Class, Object...) methods. The first order in an ordering specification is the global order. The thenLocally(Class, Object...) method marks the end of the global order and the beginning of the local order.


Method Summary
 Priority.Rule then(Class<? extends Worklist> rule, Object... args)
          Appends a rule to the current order.
 Priority.Rule thenLocally(Class<? extends Worklist> rule, Object... args)
          Appends a rule, marks the rule and all subsequent rules as belonging to the local order.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

then

public Priority.Rule then(Class<? extends Worklist> rule,
                          Object... args)
Appends a rule to the current order. Valid arguments to a rule are the same as the arguments to the constructor of each rule class excluding the maker and needSize arguments, which are used internally by the construction algorithm to generate worklists.

Thus, if rule R1 has two constructors R1(Maker<T> maker, int needSize) and R1(int size, Maker<T> maker, int needSize), then there are only two valid calls to this method with R1: then(R1) and then(R1, int).

Parameters:
rule - the rule to append
args - the arguments to the rule if any
Returns:
a reference to the updated order
See Also:
thenLocally(Class, Object...), Priority.first(Class, Object...)

thenLocally

public Priority.Rule thenLocally(Class<? extends Worklist> rule,
                                 Object... args)
Appends a rule, marks the rule and all subsequent rules as belonging to the local order.

This method follows the same convention regarding arguments to rules as then(Class, Object...).

Parameters:
rule - the rule to append
args - the arguments to the rule if any
Returns:
a reference to the updated order
See Also:
then(Class, Object...)

toString

public String toString()
Overrides:
toString in class Object