Context
-- A Context is a stack of properties
Context: TYPE = Properties.PropList; -- order is preserved!
PropertyLiteral: TYPE = Properties.KeyVal;
PropertyLiterals: TYPE = Properties.PropList;
GetRef: PROC [context: Context, prop: ATOM] RETURNS [REF];
GetAtom: PROC [context: Context, prop: ATOM] RETURNS [ATOM];
GetRope: PROC [context: Context, prop: ATOM] RETURNS [ROPE];
GetInt: PROC [context: Context, prop: ATOM] RETURNS [INT];
GetReal: PROC [context: Context, prop: ATOM] RETURNS [REAL];
PushRef: PROC [context: Context, prop: ATOM, val: REF];
PushAtom: PROC [context: Context, prop: ATOM, val: ATOM];
PushRope: PROC [context: Context, prop: ATOM, val: ROPE];
PushInt: PROC [context: Context, prop: ATOM, val: INT];
PushReal: PROC [context: Context, prop: ATOM, val: REAL];
RegisterRefProperty: PROC [prop: ATOM];
RegisterAtomProperty: PROC [prop: ATOM];
RegisterRopeProperty: PROC [prop: ATOM];
RegisterIntProperty: PROC [prop: ATOM];
RegisterRealProperty: PROC [prop: ATOM];
CreateContext: PROC [init: Context ← NIL, props: PropertyLiterals] RETURNS [Context];
MarkContext: PROC [context: Context, mark: ATOM];
PopContext: PROC [context: Context, mark: ATOM];