[Indigo]<Rosemary>2.6>Rosemary.df=>RoseCreate.Mesa
Last Edited by: Spreitzer, September 3, 1984 2:27:58 pm PDT
Last Edited by: Gasbarro, August 16, 1984 4:03:20 pm PDT
DIRECTORY OrderedSymbolTableRef, RoseTypes;
RoseCreate: CEDAR DEFINITIONS =
BEGIN OPEN RoseTypes;
InterfaceMismatch: ERROR [cell: Cell,
index: CARDINAL,
expected, got: NodeType];
RegisterCellType: PROC [name: ROPE, expandProc: ExpandProc ← NIL, ioCreator: IOCreator ← NIL, initializer: Initializer ← NIL, evals: EvalProcs, blackBox, stateToo: CellTestProc ← NIL, ports: Ports, drivePrototype: REF ANYNIL, typeData: REF ANYNIL, other: Assertions ← NIL] RETURNS [type: CellType];
GetCellType: PROC [name: ROPE] RETURNS [type: CellType];
CreateSim: PROC [steady: BOOL] RETURNS [sim: Simulation];
steady indicates whether this is for working on the steady-state, or initialization.
CreateTopCell: PROC [instanceName, typeName: ROPE, decider: ExpandDeciderClosure, sim: Simulation] RETURNS [cell: Cell];
interfaceNodes must be empty at the top.
ExpandDeciderClosure: TYPE = REF ExpandDeciderClosureRep;
ExpandDeciderClosureRep: TYPE = RECORD [
Decide: ExpandDecider, otherData: REF ANY];
ExpandDecider: TYPE = PROC [cell: Cell, otherData: REF ANY] RETURNS [ExpandDecision];
Possible: PROC [cell: Cell, whatToDo: ExpandDecision] RETURNS [possible: BOOLEAN];
CreateTest: PROC [rootName, testerName, testeeName, typeName: ROPE, stateToo: BOOLTRUE, decider: ExpandDeciderClosure, sim: Simulation] RETURNS [root: Cell, cth: CellTestHandle];
WrapTop: PROC [rootName, typeName: ROPE, decider: ExpandDeciderClosure, clocks: ROPENIL, sim: Simulation] RETURNS [root: Cell];
Given a type with a non-empty interface, this will create (if necessary) and instantiate a type, with an empty interface, whose ExpandProc instantiates the given type, and the nodes it needs. The instance name used for the component is the type name with its first character lowercased. If clocks # NIL, a clock generator will also be instantiated, with its outputs connected to the nodes named in clocks.
XPhobicize: PROC [n: Node] RETURNS [m: Node-- = n --];
PortsFromROPE: PROC [asRope: ROPE] RETURNS [ports: Ports];
PortsFromFile: PROC [fileName: ROPE] RETURNS [ports: Ports];
PortsFromStream: PROC [stream: STREAM] RETURNS [ports: Ports];
AssertionsFromFile: PROC [fileName: ROPE] RETURNS [Assertions];
DecideFromFile: PROC [fileName: ROPE] RETURNS [dff: ExpandDeciderClosure];
LookupCell: PROC [
path: LIST OF REF ANY --ROPEs or REF TEXTs--,
from: Cell ← NIL --NIL means first name names root--]
RETURNS [cell: Cell];
LookupNode: PROC [
path: LIST OF REF ANY,
from: Cell ← NIL]
RETURNS [node: Node];
LookupCellNode: PROC [cell: Cell, name: ROPE] RETURNS [node: Node];
LongNodeName: PROC [n: Node] RETURNS [name: ROPE];
LongCellName: PROC [c: Cell] RETURNS [name: ROPE];
FillInInterfaceNodes: PROC [cell: Cell, interfaceNodes: ROPE];
CompareNodes, CompareComponents: OrderedSymbolTableRef.CompareProc;
EnsureEnvironment: PROC [in: Cell, forType: CellType, to: ExpansionReceiver];
MirrorPorts: PROC [fwd: Ports, alwaysOutput, alwaysInput: BOOLFALSE] RETURNS [bkwd: Ports];
MakeMoreIO: PROC [cell: Cell, bToo: BOOL] RETURNS [a, b: REF ANY];
roots: SymbolTable;
END.