[Indigo]<Rosemary>2.6>Rosemary.df=>RoseCreate.Mesa
Last Edited by: Spreitzer, January 17, 1985 4:43:28 pm PST
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];
PickInOrder: PROC [--earlier=better--ExpandDecisionList] RETURNS [ExpandDeciderClosure];
ExpandDecisionList: TYPE = LIST OF ExpandDecision;
inlineFirst: ExpandDeciderClosure --= PickInOrder[LIST[Inline, Nested, Leaf]]--;
nestedFirst: ExpandDeciderClosure --= PickInOrder[LIST[Nested, Inline, Leaf]]--;
ByDepth: PROC [shallow: ExpandDeciderClosure, boundary: INT, deep: ExpandDeciderClosure] RETURNS [ExpandDeciderClosure];
Uses shallow when depth <= boundary, deep when depth > boundary.
Depth of root is 0.
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];
GetOtherss: PROC [fileName: ROPE] RETURNS [SymbolTable];
GetOthers: PROC [otherss: SymbolTable, cellTypeName: ROPE] RETURNS [SymbolTable];
GetOther: PROC [others: SymbolTable, partName: 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];
EqualInterfaces: PROC [a, b: Ports] RETURNS [equal: BOOL];
roots: SymbolTable;
END.