Heap.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Greene, September 19, 1986 6:49:14 pm PDT
Russ Atkinson (RRA) September 23, 1986 2:37:00 pm PDT
Heap: CEDAR DEFINITIONS = BEGIN
Queue: TYPE = REF QueueRec;
QueueRec: TYPE;
Event: TYPE = REF ANY;
CompareEvents: TYPE = PROC [e1, e2: Event] RETURNS[Basics.Comparison];
CreateQueue: PROC
[compare: CompareEvents, conjectureSize: CARDINAL ← 64] RETURNS [Queue];
ChangeCompareProc: PROC [heap: Queue, compare: CompareEvents];
InsertEvent: PUBLIC PROC [heap: Queue, event: Event];
NextEvent: PROC [heap: Queue] RETURNS [event: Event];
PeekNextEvent: PROC [heap: Queue] RETURNS [event: Event];
Empty: PROC [heap: Queue] RETURNS [empty: BOOL ← FALSE];
END.