DIRECTORY Commander USING [Handle], Icons USING [IconFlavor], IO USING [Value], MakeDo, SymTab; MakeDoPrivate: CEDAR DEFINITIONS = BEGIN OPEN MakeDo; NodeList: TYPE = LIST OF Node; Node: TYPE = REF NodeRep; NodeRep: TYPE = RECORD [ given, name: ROPE, class: NodeClass, memberships: RefTable--of NodeSet--, producer: Edge ¬ NIL, props: PropList ¬ NIL, to: ARRAY ActionDep OF EdgeRingHead ¬ ALL[emptyHead], modifiability: Modifiability ¬ uninitialized, created: Time ¬ unknownTime, length: INT ¬ FIRST[INT], current: ExpensiveBool ¬ notComputed, broken: BOOL ¬ FALSE, consistencyAsked: BOOL ¬ FALSE, consistent: BOOL ¬ FALSE, consistencyReason: ROPE ¬ NIL, someoneWhoCares: Job ¬ NIL, state: NodeState ¬ inactive, waitCount: INTEGER ¬ 0, waitingOnCurrent: NodeList ¬ NIL ]; NodeState: TYPE = {inactive, ready, working, waiting}; Action: TYPE = REF ActionRep; ActionRep: TYPE = RECORD [ class: ActionClass, foundData: REF ANY, cmd: ROPE, makes: EdgeRingHead ¬ emptyHead, from: ARRAY ActionDep OF EdgeRingHead ¬ ALL[emptyHead], waitingForPermission: NodeList ¬ NIL, permissionGranted: BOOL ¬ FALSE, derivedFromCurrentDeterminers: BOOL ¬ TRUE, queuedFailsInvalidation: BOOL ¬ FALSE, fails: ExpensiveBool ¬ notComputed, timesTried: INTEGER ¬ 0, reasonWhyLastDone: ROPE ¬ NIL ]; ExpensiveBool: TYPE = {notComputed, false, true} ¬ notComputed; Expensify: ARRAY BOOL OF ExpensiveBool = [false, true]; EdgeRingHead: TYPE = RECORD [first, last: Edge]; emptyHead: EdgeRingHead = [NIL, NIL]; Edge: TYPE = REF EdgeRep; EdgeRep: TYPE = RECORD [ optional: BOOL, n: Node, a: Action, nNext, nPrev: Edge, aNext, aPrev: Edge ]; Job: TYPE = REF JobRep; JobRep: TYPE = RECORD [ wDir: ROPE, goals, processes: RefTable, otherModifiable: ModifiabilitySpec, nSteps: NAT ¬ 0, failedSteps: ActionList ¬ NIL ]; NodeSet: TYPE = REF NodeSetPrivate; NodeSetPrivate: TYPE = RECORD [ nodes: RefTable, currents, nonCurrents: INT ¬ 0, broken, ok: INT ¬ 0 ]; NodeClass: TYPE = REF NodeClassRep; NodeClassRep: TYPE = RECORD [ name: ROPE, CanonizeName: PROC [ROPE] RETURNS [ROPE], GetInfo: GetInfoProc ]; debugging: BOOL; leaf: Action; Log: PROC [fmt: ROPE, v1, v2, v3, v4, v5: IO.Value ¬ [null[]]]; Confirm: PROC [action: ROPE]; GetCommanderHandle: PROC RETURNS [Commander.Handle]; MDInstall: PROC [dir, packageName: ROPE] RETURNS [foundFile, failed: BOOL]; EnumerateFinders: PROC [to: PROC [Finder] RETURNS [stop: BOOL]]; IncrementStepCount: PROC [Job]; AddFailedCmd: PROC [Job, Action]; EnglishList: PROC [NodeList] RETURNS [el: ROPE, ec: CARDINAL]; NodeInRefTable: PROC [n: Node, t: RefTable] RETURNS [BOOL]; IsRootGoal: PROC [job: Job, n: Node] RETURNS [BOOL]; IsLeaf: PROC [job: Job, n: Node] RETURNS [BOOL]; StartTime: PROC [n: Node]; EnumerateAndDestroy: PROC [to: PROC [Node], andDestroy--table when done--: BOOL]; IconSeq: TYPE = REF IconSeqPrivate; IconSeqPrivate: TYPE = RECORD [icons: SEQUENCE length: NAT OF Icons.IconFlavor]; icons: IconSeq; EmptyCmdUtils: PROC; END. Π MakeDoPrivate.Mesa Copyright Σ 1991 by Xerox Corporation. All rights reserved. Last tweaked by Mike Spreitzer on October 6, 1992 11:06 am PDT Carl Hauser, April 11, 1985 3:34:27 pm PST Eduardo Pelegri-Llopart March 17, 1989 8:32:14 am PST Definitions: iba = i is a determiner of a i_a = i is an input of a iga = i is a mandatory input of a Current[n] = if Leaf[n] then true else let a = n.producer in CorrectlyDerived[a] & (A i_a: Current[i]) & (a.Consistent[{i:i_a}, n] V Eiga: ~i.Exists[] V Ei_a: Broken[i] V a.Fails[{i:i_a}]) CorrectlyDerived[a] = A iba: Current[i] & DerivedFrom[a, i] V Eiba: Broken[i] Leaf[n] = CertainlyNotModifiable[n] V n has no producer Current[n] g Broken[n] = CertainlyModifiable[n] & ~n.Exists[] V ~CertainlyNotModifiable[n] & Ea_n: ( Ei_a: Broken[i] V Eiba: Broken[i] V CertainlyModifiable[n] & Eiga: ~i.Exists[] V E i_a: (i.Exists & ~a.Consistent[i, n]) & (E iga: ~i.Exists[] V a.Fails[{i:i_a}]) ) Basic Monitor Invariant: (eb: ExpensiveBool S b: BOOL W eb=notComputed g b=eb) ~RawLeaf[node] g node.consistencyAsked g node.consistent = node.producer.Consistent[{i:i_a}, node] node.current S Current[n] node.created dates contents used herein node.current=true g node.broken = Broken[n] NodeSets agree with nodes act.correctlyDerived g CorrectlyDerived[a] act.fails=notComputed g act.timesTried=0 if act.permissionGranted & act.queuedFailsInvalidation then a.Fails[..] unknown else act.fails S a.Fails[..] currents counts nodes with current=true; nonCurrent counts others. Only current nodes are counted broken or ok. In Basic monitor: In node table monitor: Clears data cached by the command utilities. Eduardo Pelegri-Llopart October 20, 1988 5:07:28 pm PDT cleaned up DIRECTORY and removed GetTerminal ΚN•NewlineDelimiter –(cedarcode) style™code™Kšœ Οeœ1™K™*K™5—K˜šΟk ˜ Kšœ žœ ˜Kšœžœ˜Kšžœžœ ˜Kšœ˜Kšœ˜—K˜KšΠbx œžœž œ˜"K˜Kšžœžœ˜K˜head™ KšœΟmœ™Kšœ œ™Kšœ œ™!šœ™Kšœ ™ šœ™K™Kš œ œ œ™š œ œ™Kš œ œ œ™Kš œ œ œ ™Kš œ  œ™———Kš œ œ œ œ œ œ œ ™MKšœ$ œ™7šœ  œ ™Kšœ œ ™$š œ œ œ œ™&Kš  œ œ  œ œ œ ™!Kš œ œ œ œ™,š œ œ œ  œ™)Kš  œ œ œ œ  œ™+————K˜™Kš œ œ  œ œ  œ™5šœ œ ™(Kšœ/ œ ™9—Kšœ  œ ™Kšœ'™'Kšœ œ™+K™Kšœ œ™*Kšœ œ™(™Kšœ œ5™LKšœ œ ™——K˜Kšœ žœžœžœ˜Kšœžœžœ ˜šœ žœžœ˜Kšœ žœ˜K˜KšœΟcœ˜$Kšœžœ˜Kšœžœ˜Kšœžœ žœžœ ˜5Kšœ-˜-Kšœ˜Kšœžœžœžœ˜K˜%Kšœžœžœ˜Kšœžœžœ˜Kšœ žœžœ˜Kšœžœžœ˜Kšœžœ˜K˜Kšœ žœ˜Kšœž˜ K˜—K˜Kšœ žœ'˜6K˜Kšœžœžœ ˜šœ žœžœ˜K˜Kšœ žœžœ˜Kšœžœ˜ Kšœ ˜ Kšœžœ žœžœ ˜7Kšœ!žœ˜%Kšœžœžœ˜ Kšœžœžœ˜+Kšœžœžœ˜&K˜#Kšœ žœ˜Kšœžœž˜Kšœ˜—K˜Kšœžœ,˜?Kšœ žœžœžœ˜7K˜Kšœžœžœ˜0Kšœžœžœ˜%K˜Kšœžœžœ ˜šœ žœžœ˜Kšœ žœ˜K˜K˜ Kšœ˜Kšœ˜K˜—K˜Kšœžœžœ˜šœžœžœ˜Kšœžœ˜ Kšœ˜Kšœ#˜#Kšœžœ˜Kšœž˜K˜—K˜Kšœ žœžœ˜#šœžœžœ˜K˜šœžœ˜K™B—šœ žœ˜K™,—K˜—K˜Kšœ žœžœ˜#šœžœžœ˜Kšœžœ˜ Kš Οn œžœžœžœžœ˜)Kš’œ ˜K˜—K˜Kšœ žœ˜K˜ K˜Kš’œžœžœžœ˜?Kš’œžœ žœ˜Kš’œžœžœ˜4K˜Kš ’ œžœžœžœžœ˜KK˜Kš ’œžœžœ žœžœ˜@K˜Kš’œžœ˜Kš’ œžœ˜!K˜Kš ’ œžœ žœžœžœ˜>Kš’œžœžœžœ˜;Kš’ œžœžœžœ˜4Kš’œžœžœžœ˜0K˜™Kš’ œžœ ˜—K˜™Kš ’œžœžœ‘œžœ˜Q—K˜Kšœ žœžœ˜#Kš œžœžœ žœ žœžœ˜PK˜K˜K˜š’ œžœ˜K™,—K˜Kšžœ˜™7K™,—K™—…— šΈ