DEFINITION MODULE AVL;

FROM SYSTEM IMPORT ADDRESS;

EXPORT QUALIFIED NodeType, Node, NodeSzAndType, insert, isNewNode;

TYPE   NodeType = (TransientNode, PermanentNode);
           Node = RECORD
                    Left : ADDRESS;
                   Right : ADDRESS;
                 balance : INTEGER;
                   END;


VAR  isNewNode : BOOLEAN;

PROCEDURE NodeSzAndType(Size : CARDINAL;  type : NodeType);
PROCEDURE insert(VAR T : ADDRESS; Key : INTEGER) : ADDRESS;

END AVL.
