RoseRun.mesa
Last Edited by: Spreitzer, July 11, 1985 7:23:07 pm PDT
DIRECTORY PrincOps, RoseTypes;
RoseRun: CEDAR DEFINITIONS =
BEGIN OPEN RoseTypes;
Run: PROC [sim: Simulation];
Next: PROC [sim: Simulation] RETURNS [stepType: StepType];
StepSim: PROC [sim: Simulation] RETURNS [stepType: StepType];
StepType: TYPE = {noStep, switchStep, otherStep};
stop: BOOLEAN;
To suspend all running, set this; when sampled, Stop will be raised.
SlotRef: TYPE = REF Slot;
Events $ChangeEarly, $ChangeLate, $Perturbed, $Found, $NewNodeQ, and $NewNodeUD have: watched: Node, arg: SlotRef (which "caused" event; may be NIL or nilSlot).
PerturbNode: PROC [node: Node, agitator: Slot, evenIfInput: BOOLFALSE];
PerturbPort: PROC [cell: Cell, portIndex: PortIndex, evenIfInput: BOOLFALSE];
UpdateCurrent: PROC [node: Node, bbTable: PrincOps.BitBltTablePtr, agitator: Slot];
Recomputes simple node value. Assumes cells linked in proper strength sets.
ValueChanged: PROC [node: Node];
To be called after the user tweaks a node value.
Delayed: PROC [n: Node] RETURNS [delayed: BOOL];
ScheduleCell: PROC [Cell];
PreSimple: PROC [cell: Cell, reallyCopy: BOOLTRUE];
The right way to prepare for calling an EvalSimple.
Copies newIO to oldIO.
Setting reallyCopy to FALSE inhibits the copy.
AllowToModify: PROC [cell: Cell, modifier: CellProc, blindly, mayRescheduleSelf: BOOLEANFALSE];
Arrange to call modifier as if it were the cell's evalSimple.
If blindly, then don't differentiate --- all ports are assumed to change.
Test: PROC [sim: Simulation, parms: TestParms, testData: REF ANYNIL];
Calls the Cell's Test proc, possibly surrounded by SIGNAL Stop["About to eval/Just eval'ed", cell].
TestParms: TYPE = REF TestParmsRep;
TestParmsRep: TYPE = RECORD [
stopBefore, stopAfter: BOOLEANFALSE];
Eval: PROC [handle: CellTestHandle, returnAfter: ReturnAfter ← returnWhenSettled] RETURNS [happened: StepType];
ReturnAfter: TYPE = PACKED ARRAY MaskableStepType OF BOOLEAN;
MaskableStepType: TYPE = StepType[switchStep .. otherStep];
returnWhenSettled: ReturnAfter = [FALSE, FALSE];
DisableableStop: PROC [proc: UNSAFE PROC ANY RETURNS ANY, msg: ROPE, data: REF ANYNIL];
Raises RoseTypes.Stop, unless disabled.
DisableThisStop: PROC [fh: PrincOps.FrameHandle] RETURNS [ok: BOOL];
Disables Raising RoseTypes.Stop from PC where DisableableStop.proc is called, in stack of fh.
END.