|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.CompiledSetSpec
public class CompiledSetSpec
Data structure that facilitates iterating over the set of objects x such that a given formula phi(x) is true. A CompiledSetSpec consists of a DNF version of phi, with an ObjGenGraph for each disjunct. To iterate over the objects that satisfy phi, we create an iterator for each ObjGenGraph and get objects from these iterators in a round-robin fashion. When we get an object from an ObjGenGraph, we return it if it satisfies the corresponding disjunct and no earlier disjuncts. Thus, each object that satisfies phi is returned exactly once: when it is returned by the iterator for the first disjunct that it satisfies. The round-robin iteration over disjuncts ensures that even if the ObjGenGraph iterator for, say, the first disjunct returns infinitely many objects, we will still return objects that satisfy the other disjuncts after a finite amount of time.
Constructor Summary | |
---|---|
CompiledSetSpec(LogicalVar var,
Formula phi)
Creates a new CompiledSetSpec for iterating over all bindings for var that satisfy phi . |
Method Summary | |
---|---|
boolean |
dependsOnIdOrder(EvalContext context)
Returns true if the iteration order for the set returned by elementSet is affected by the iteration order for
object identifiers in the given context. |
ObjectSet |
elementSet(EvalContext context)
Returns an ObjectSet representing the objects that, when bound to var , make phi true in the given context. |
java.lang.String |
toString()
|
ObjectIterator |
unfilteredIterator(EvalContext context)
Returns an iterator over the objects specified by the underlying ObjGenGraphs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CompiledSetSpec(LogicalVar var, Formula phi)
var
that satisfy phi
.
Method Detail |
---|
public ObjectSet elementSet(EvalContext context)
var
, make phi
true in the given context.
public ObjectIterator unfilteredIterator(EvalContext context)
public boolean dependsOnIdOrder(EvalContext context)
elementSet
is affected by the iteration order for
object identifiers in the given context.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |