| OCR Text |
Show procedure topological.Eval ( Groupld, RootObja ) ; begin scalar Object, NextRootObja ; end; while Object :• pop( RootObja ) do if Object->AnceatorCount neq 0 then if not( Groupid ) or -.mber( Groupid, Object->PremiaeOfSet ) then else if deer( Object->AnceatorCount ) eq 0 then ( recomputeDependency ( Object ) ; SuapectConatrainta := union( Object->Conatrainta, SuapectConatrainta ); RootObja := append( Object->Dependenta, RootObja ) push( Object, NeztRootObja ); return NeztRootObjs 4.1.1 Operation of Dependency Propagation. 38 The dependency propagation algorithm operates in two passes. The first pass performs a depth first search on the subtrees of the dependency graph rooted by modified objects. An ancestor count is computed at each node. The ancestor count represents the number of prerequisite objects which require recomputation, but have not been recomputed . Figure 20 shows an example dependency graph with a single modified root and the ancestor counts ·of the dependent values. The second pass performs the recomputation. TopologicaiEval will recompute only the objects which need to be recorJl)uted, and which are premises of the specified constraint network. TopologicaiEval selects an object from the object list. If the object is not a premise of the constraint network, then the network is not a member of the objects premise_of set. The object is pushed onto the list of objects for the next iteration (NextObjects). H the object is a premise of the constraint network, then the objects ancestor count is decremented. !f the ancestor count is not zero, then one or more of the objects prerequisites remains to be recomputed. When the prerequisites have been recomputed, this same object |