| OCR Text |
Show in a). The ConstructorExp slot of b would be (In standard lisp syntax) : (Lambda (a) (plus a 1)) B can be recomputed using the lisp function 'apply'. updat.xodalObjact ( b, apply ( b->ConatructorZzp, b->Prerequiaitea ); 36 Apply evaluates a function (the first argument) to a list of arguments (the second argument) and returns the result. UpdateModeiObject captures the result of the apply and updates the value slot of object b. The constraints slot is a list of constraints on the ModeiObject instance. · The PremlseOfSet slot is a list of constraint groups (see chapter 6) that depend, either directly or indirectly, on the value of the object and that may need satisfaction when the value is modified. AncestorCount and Mark are used by the topological sorting algorithm discussed in the next section. 4.1 Propagating Dependencies To A Constraint Group. The premlse_of set is a list of constraint groups which depend on the value of an object in the model. To satisfy the Constraint Kernels when a set of model objects have been modified, it is necessary to propagate dependencies to a specific constraint group. This means evaluating only those values which depend on the set of modified values and are premises of the first independent constraint group, and leaving the values which depend on the set of modified values but are not premises of the constraint group for a later phase of dependency propagation. The premise_of set can be used to determine if a value is a premise of the constraint group. The following Is an generalization of a two pass, non-recursive, topological sort algorithm from Knuth [5]. For each object requiring recomputation, ComputeAneestorCount determines the number of prerequisite objects which also require recomputation. ComputeAneestorCount is: |