-- RandomCodeRandomProcedures.mesa last edited by Sturgis: October 8, 1984 10:41:44 am PDT
DIRECTORY
 IO USING[STREAM],
 RandomCodeRandom USING[RandomState],
 RandomCodeTypes USING[SeqType, TypeSet],

 Rope USING[ROPE];
RandomCodeRandomProcedures: CEDAR DEFINITIONS =
BEGIN OPEN RandomCodeRandom, RandomCodeTypes;

ProcedureBody: TYPE = REF ProcedureBodyData;
ProcedureBodyData: TYPE;

GenerateRandomProcedure: PROCEDURE[allowedArgs, possibleResults: SeqType, typeSet: TypeSet, randomState: RandomState] RETURNS[ProcedureBody, INT];


TypeCheckProcedure: PROCEDURE[ProcedureBody];
 -- type checks all arcs of all nodes reachable from the entry node of the procedure

AssignRelativeProcedureNodeAddresses: PROCEDURE[procedure: ProcedureBody] RETURNS[size: INT]; -- may have to install some extra jumps, or modify some conditional jumps

TearDownProcedure: PROCEDURE[ProcedureBody];

PrintProcedureGraph: PROCEDURE[title: Rope.ROPE, procedure: ProcedureBody, on: IO.STREAM];

GenProcedureBytes: PUBLIC PROCEDURE[procedure: ProcedureBody, oneByte: PROCEDURE[[0..255]]];
END.
MODULE HISTORY
Initial by: Sturgis, October 8, 1984 10:42:30 am PDT, from RandomCodeInternal