| OCR Text |
Show procedure deleteConstraint ( Constraint ) ; begin end; for each Object in Constraint->ConatrainadObjecta do if Objact->Constraints :• dalata(Conatraint, Objact->Constrainta) then OnGroupedConatrainta :• union( Object->Conatraints , UnGroupedConstrainta ) ; 6.2.3 FlndComponent. 47 The constraint group labeling algorithm finds all of the constraints in the model which are attached to constraints on the UngroupedConstralnts list. A constraint is attached to another constraint if they constrain one or more of the same objects. An algorithm for finding strongly connected components groups the attached constraints into strongly connected components. Each component represents a constraint group. One constraint in each constraint group is chosen as the constraint group identifier. Each constraint in a constraint group is labeled with its constraint group identifier. Note that not all of the constraints in the model are relabeled. Only new constraints, constraints attached to recently deleted constraints, and their attached constraints are relabeled. Each object constrained by a constraint which is relabeled during constraint group labeling must have its premise_of set recomputed and propagated to its prerequisites. It is clear that objects which are constrained by relabeled constraints need their premise_of sets updated. These objects form the roots of premise_of set propagation. Any objects which are prerequisites to the root objects must also have their premise_of sets recomputed. The premise_of sets can be computed and propagated efficiently if the dependency graph is stood on its head and sorted topologically. The root objects prerequisites are viewed as children of the root objects for the purposes of a topological sort. Sorting the objects and computing their premise of sets is done In linear time proportional to the number of root and prerequisite objects. Given a constraint, and a list of constraints forming the component so far, flndComponent will add the constraint and its attached constraints to the component, and return the resutting component. The algorithm is a depth first search of the graph. |