
% List of Optim_L's base instruction as of Sun May 26 14:00:11 2002 (-hak)

% A macro for runtime instruction:

\newcommand{\inst}[1]{\texttt{\textsc{{\magenta{\small#1}}}}}

% Push instructions:

\newcommand{\PushClosure}{\inst{Push\_Closure}}
\newcommand{\PushNewObject}{\inst{Push\_New\_Object}}
\newcommand{\PushOffsetInt}{\inst{Push\_Offset\_I}}
\newcommand{\PushOffsetObject}{\inst{Push\_Offset\_O}}
\newcommand{\PushOffsetReal}{\inst{Push\_Offset\_R}}
\newcommand{\PushValueInt}{\inst{Push\_I}}
\newcommand{\PushValueObject}{\inst{Push\_O}}
\newcommand{\PushValueReal}{\inst{Push\_R}}
\newcommand{\PushTuple}{\inst{Push\_Tuple}}
\newcommand{\PushIntSet}{\inst{Push\_Set\_I}}
\newcommand{\PushRealSet}{\inst{Push\_Set\_R}}
\newcommand{\PushObjectSet}{\inst{Push\_Set\_O}}
\newcommand{\PushIntRange}{\inst{Push\_Int\_Rng}}
\newcommand{\PushRealRange}{\inst{Push\_Real\_Rng}}

% Subroutine instructions:

\newcommand{\NoOp}{\inst{No\_Op}}
\newcommand{\Apply}{\inst{Apply}}
\newcommand{\ApplyIntHomomorphism}{\inst{Apply\_Hom\_I}}
\newcommand{\ApplyRealHomomorphism}{\inst{Apply\_Hom\_R}}
\newcommand{\ApplyObjectHomomorphism}{\inst{Apply\_Hom\_O}}
\newcommand{\ApplyInPlaceIntHomomorphism}{\inst{Apply\_Ip\_Hom\_I}}
\newcommand{\ApplyInPlaceRealHomomorphism}{\inst{Apply\_Ip\_Hom\_R}}
\newcommand{\ApplyInPlaceObjectHomomorphism}{\inst{Apply\_Ip\_Hom\_O}}
\newcommand{\ApplyIntCollection}{\inst{Apply\_Coll\_I}}
\newcommand{\ApplyRealCollection}{\inst{Apply\_Coll\_R}}
\newcommand{\ApplyObjectCollection}{\inst{Apply\_Coll\_O}}
\newcommand{\ApplyIntCollectionHomomorphism}{\inst{Apply\_Coll\_Hom\_I}}
\newcommand{\ApplyRealCollectionHomomorphism}{\inst{Apply\_Coll\_Hom\_R}}
\newcommand{\ApplyObjectCollectionHomomorphism}{\inst{Apply\_Coll\_Hom\_O}}
\newcommand{\ApplyInPlaceIntCollectionHomomorphism}{\inst{Apply\_Ip\_Coll\_Hom\_I}}
\newcommand{\ApplyInPlaceRealCollectionHomomorphism}{\inst{Apply\_Ip\_Coll\_Hom\_R}}
\newcommand{\ApplyInPlaceObjectCollectionHomomorphism}{\inst{Apply\_Ip\_Coll\_Hom\_O}}
\newcommand{\Call}{\inst{Call}}
\newcommand{\End}{\inst{End}}

\newcommand{\Return}[1]{\inst{Return\_}{\green\textit{sort}\ensuremath{(\KRNL{#1})}}}
\newcommand{\ReturnInt}{\inst{Return\_I}}
\newcommand{\ReturnObject}{\inst{Return\_O}}
\newcommand{\ReturnReal}{\inst{Return\_R}}

\newcommand{\NonlocalReturn}[1]{\inst{NL\_Return\_}{\green\textit{sort}\ensuremath{(\KRNL{#1})}}}
\newcommand{\NonlocalReturnInt}{\inst{NL\_Return\_I}}
\newcommand{\NonlocalReturnObject}{\inst{NL\_Return\_O}}
\newcommand{\NonlocalReturnReal}{\inst{NL\_Return\_R}}

% Pop instructions:

\newcommand{\Pop}[1]{\inst{Pop\_}{\green\textit{sort}\ensuremath{(\KRNL{#1})}}}
\newcommand{\PopInt}{\inst{Pop\_I}}
\newcommand{\PopObject}{\inst{Pop\_O}}
\newcommand{\PopReal}{\inst{Pop\_R}}

% Relocatable instructions:

\newcommand{\Jump}{\inst{Jump}}
\newcommand{\JumpOnFalse}{\inst{Jump\_On\_False}}
\newcommand{\JumpOnTrue}{\inst{Jump\_On\_True}}

% Conversion instructions:

\newcommand{\IntToObject}{\inst{I\_To\_O}}
\newcommand{\IntToReal}{\inst{I\_To\_R}}
\newcommand{\ObjectToInt}{\inst{O\_To\_I}}
\newcommand{\ObjectToReal}{\inst{O\_To\_R}}
\newcommand{\RealToInt}{\inst{R\_To\_I}}
\newcommand{\RealToObject}{\inst{R\_To\_O}}
\newcommand{\IntArrayToMap}{\inst{Array\_To\_Map\_I}}
\newcommand{\RealArrayToMap}{\inst{Array\_To\_Map\_R}}
\newcommand{\ObjectArrayToMap}{\inst{Array\_To\_Map\_O}}
\newcommand{\MapToArray}{\inst{Map\_To\_Array\_O}}
\newcommand{\CheckArraySize}{\inst{Check\_Array\_Size}}
\newcommand{\ReconcileIndexables}{\inst{Reconcile\_Indexables}}
\newcommand{\ArrayInitialize}{\inst{Array\_Initialize}}
\newcommand{\ShuffleIntMap}{\inst{Shuffle\_Map\_I}}
\newcommand{\ShuffleRealMap}{\inst{Shuffle\_Map\_R}}
\newcommand{\ShuffleObjectMap}{\inst{Shuffle\_Map\_O}}

% Assignment instructions:

\newcommand{\SetGlobal}{\inst{Set\_Global}}
\newcommand{\SetOffsetInt}{\inst{Set\_Offset\_I}}
\newcommand{\SetOffsetObject}{\inst{Set\_Offset\_O}}
\newcommand{\SetOffsetReal}{\inst{Set\_Offset\_R}}

% Tuple component instructions:

\newcommand{\GetIntTupleComponent}{\inst{Get\_Tuple\_I}}
\newcommand{\GetRealTupleComponent}{\inst{Get\_Tuple\_R}}
\newcommand{\GetObjectTupleComponent}{\inst{Get\_Tuple\_O}}
\newcommand{\SetIntTupleComponent}{\inst{Set\_Tuple\_I}}
\newcommand{\SetRealTupleComponent}{\inst{Set\_Tuple\_R}}
\newcommand{\SetObjectTupleComponent}{\inst{Set\_Tuple\_O}}

% Array/Map allocation instructions:

\newcommand{\PushIntArray}{\inst{Push\_Array\_I}}
\newcommand{\PushRealArray}{\inst{Push\_Array\_R}}
\newcommand{\PushObjectArray}{\inst{Push\_Array\_O}}
\newcommand{\PushIntMap}{\inst{Push\_Map\_I}}
\newcommand{\PushRealMap}{\inst{Push\_Map\_R}}
\newcommand{\PushObjectMap}{\inst{Push\_Map\_O}}
\newcommand{\MakeIntArray}{\inst{Make\_Array\_I}}
\newcommand{\MakeRealArray}{\inst{Make\_Array\_R}}
\newcommand{\MakeObjectArray}{\inst{Make\_Array\_O}}
\newcommand{\MakeIntMap}{\inst{Make\_Map\_I}}
\newcommand{\MakeRealMap}{\inst{Make\_Map\_R}}
\newcommand{\MakeObjectMap}{\inst{Make\_Map\_O}}
\newcommand{\FillArrayFromIntArray}{\inst{Fill\_Array\_IA}}
\newcommand{\FillArrayFromIntMap}{\inst{Fill\_Array\_IM}}
\newcommand{\FillArrayFromObjectArray}{\inst{Fill\_Array\_OA}}
\newcommand{\FillArrayFromObjectMap}{\inst{Fill\_Array\_OM}}
\newcommand{\FillArrayFromRealArray}{\inst{Fill\_Array\_RA}}
\newcommand{\FillArrayFromRealMap}{\inst{Fill\_Array\_RM}}
\newcommand{\FillMapFromIntArray}{\inst{Fill\_Map\_IA}}
\newcommand{\FillMapFromIntMap}{\inst{Fill\_Map\_IM}}
\newcommand{\FillMapFromObjectArray}{\inst{Fill\_Map\_OA}}
\newcommand{\FillMapFromObjectMap}{\inst{Fill\_Map\_OM}}
\newcommand{\FillMapFromRealArray}{\inst{Fill\_Map\_RA}}
\newcommand{\FillMapFromRealMap}{\inst{Fill\_Map\_RM}}

% Array/Map slot instructions:

\newcommand{\GetIntArraySlot}{\inst{Get\_Array\_I}}
\newcommand{\GetIntIndexedIntMapSlot}{\inst{Get\_Int\_Indexed\_Map\_I}}
\newcommand{\GetIntIndexedObjectMapSlot}{\inst{Get\_Int\_Indexed\_Map\_O}}
\newcommand{\GetIntIndexedRealMapSlot}{\inst{Get\_Int\_Indexed\_Map\_R}}
\newcommand{\GetIntMapSlot}{\inst{Get\_Map\_I}}
\newcommand{\GetObjectArraySlot}{\inst{Get\_Array\_O}}
\newcommand{\GetObjectMapSlot}{\inst{Get\_Map\_O}}
\newcommand{\GetRealArraySlot}{\inst{Get\_Array\_R}}
\newcommand{\GetRealMapSlot}{\inst{Get\_Map\_R}}
\newcommand{\SetIntArraySlot}{\inst{Set\_Array\_I}}
\newcommand{\SetIntIndexedIntMapSlot}{\inst{Set\_Int\_Indexed\_Map\_I}}
\newcommand{\SetIntIndexedObjectMapSlot}{\inst{Set\_Int\_Indexed\_Map\_O}}
\newcommand{\SetIntIndexedRealMapSlot}{\inst{Set\_Int\_Indexed\_Map\_R}}
\newcommand{\SetIntMapSlot}{\inst{Set\_Map\_I}}
\newcommand{\SetObjectArraySlot}{\inst{Set\_Array\_O}}
\newcommand{\SetObjectMapSlot}{\inst{Set\_Map\_O}}
\newcommand{\SetRealArraySlot}{\inst{Set\_Array\_R}}
\newcommand{\SetRealMapSlot}{\inst{Set\_Map\_R}}

% Field instructions:

\newcommand{\GetIntField}{\inst{Get\_Field\_I}}
\newcommand{\GetObjectField}{\inst{Get\_Field\_O}}
\newcommand{\GetRealField}{\inst{Get\_Field\_R}}
\newcommand{\SetIntField}{\inst{Set\_Field\_I}}
\newcommand{\SetObjectField}{\inst{Set\_Field\_O}}
\newcommand{\SetRealField}{\inst{Set\_Field\_R}}

% Built-in operations:

% Arithmetic operations:

\newcommand{\AddIntInt}{\inst{Add\_II}}
\newcommand{\AddIntReal}{\inst{Add\_IR}}
\newcommand{\AddRealInt}{\inst{Add\_RI}}
\newcommand{\AddRealReal}{\inst{Add\_RR}}
\newcommand{\SubIntInt}{\inst{Sub\_II}}
\newcommand{\SubIntReal}{\inst{Sub\_IR}}
\newcommand{\SubRealInt}{\inst{Sub\_RI}}
\newcommand{\SubRealReal}{\inst{Sub\_RR}}
\newcommand{\MinusInt}{\inst{Minus\_I}}
\newcommand{\MinusReal}{\inst{Minus\_R}}
\newcommand{\MulIntInt}{\inst{Mul\_II}}
\newcommand{\MulIntReal}{\inst{Mul\_IR}}
\newcommand{\MulRealInt}{\inst{Mul\_RI}}
\newcommand{\MulRealReal}{\inst{Mul\_RR}}
\newcommand{\DivIntInt}{\inst{Div\_II}}
\newcommand{\DivIntReal}{\inst{Div\_IR}}
\newcommand{\DivRealInt}{\inst{Div\_RI}}
\newcommand{\DivRealReal}{\inst{Div\_RR}}
\newcommand{\Modulus}{\inst{Modulus}}
\newcommand{\MinIntInt}{\inst{Min\_II}}
\newcommand{\MinIntReal}{\inst{Min\_IR}}
\newcommand{\MinRealInt}{\inst{Min\_RI}}
\newcommand{\MinRealReal}{\inst{Min\_RR}}
\newcommand{\MaxIntInt}{\inst{Max\_II}}
\newcommand{\MaxIntReal}{\inst{Max\_IR}}
\newcommand{\MaxRealInt}{\inst{Max\_RI}}
\newcommand{\MaxRealReal}{\inst{Max\_RR}}
\newcommand{\AbsInt}{\inst{Abs\_I\_RI}}
\newcommand{\AbsReal}{\inst{Abs\_R}}
\newcommand{\SquareRoot}{\inst{Sqrt}}
\newcommand{\Power}{\inst{Power}}

% Arithmetic relations:

\newcommand{\EqualInts}{\inst{Equ\_II}}
\newcommand{\EqualObjects}{\inst{Equ\_OO}}
\newcommand{\EqualReals}{\inst{Equ\_RR}}
\newcommand{\UnequalInts}{\inst{Neq\_II}}
\newcommand{\UnequalObjects}{\inst{Neq\_OO}}
\newcommand{\UnequalReals}{\inst{Neq\_RR}}
\newcommand{\GreaterEqualIntInt}{\inst{Gte\_II}}
\newcommand{\GreaterEqualIntReal}{\inst{Gte\_IR}}
\newcommand{\GreaterEqualRealInt}{\inst{Gte\_RI}}
\newcommand{\GreaterEqualRealReal}{\inst{Gte\_RR}}
\newcommand{\GreaterIntInt}{\inst{Grt\_II}}
\newcommand{\GreaterIntReal}{\inst{Grt\_IR}}
\newcommand{\GreaterRealInt}{\inst{Grt\_RI}}
\newcommand{\GreaterRealReal}{\inst{Grt\_RR}}
\newcommand{\LessEqualIntInt}{\inst{Lte\_II}}
\newcommand{\LessEqualIntReal}{\inst{Lte\_IR}}
\newcommand{\LessEqualRealInt}{\inst{Lte\_RI}}
\newcommand{\LessEqualRealReal}{\inst{Lte\_RR}}
\newcommand{\LessIntInt}{\inst{Lst\_II}}
\newcommand{\LessIntReal}{\inst{Lst\_IR}}
\newcommand{\LessRealInt}{\inst{Lst\_RI}}
\newcommand{\LessRealReal}{\inst{Lst\_RR}}

% Boolean operations:

\newcommand{\Not}{\inst{Not}}

% Map and Size operations:

\newcommand{\MapSize}{\inst{Map\_Size}}
\newcommand{\ArraySize}{\inst{Array\_Size}}
\newcommand{\IndexableSize}{\inst{Indexable\_Size}}
\newcommand{\GetIndexable}{\inst{Get\_Indexable}}

% Container operations:

\newcommand{\BelongsInt}{\inst{Belongs\_I}}
\newcommand{\BelongsObject}{\inst{Belongs\_O}}
\newcommand{\BelongsReal}{\inst{Belongs\_R}}

% Set operations:

\newcommand{\SetCopy}{\inst{Set\_Copy}}
\newcommand{\MakeIntSet}{\inst{Make\_Set\_I}}
\newcommand{\MakeObjectSet}{\inst{Make\_Set\_O}}
\newcommand{\MakeRealSet}{\inst{Make\_Set\_R}}
\newcommand{\SetDifference}{\inst{Set\_Diff}}
\newcommand{\SetExclusion}{\inst{Set\_Sym\_Diff}}
\newcommand{\SetIntersection}{\inst{Inter}}
\newcommand{\SetUnion}{\inst{Union}}
\newcommand{\DestructiveSetDifference}{\inst{D\_Set\_Diff}}
\newcommand{\DestructiveSetExclusion}{\inst{D\_Set\_Sym\_Diff}}
\newcommand{\DestructiveSetIntersection}{\inst{D\_Inter}}
\newcommand{\DestructiveSetUnion}{\inst{D\_Union}}

% Set relations:

\newcommand{\Subset}{\inst{Subset}}

% Set element operations:

\newcommand{\IntSetAdd}{\inst{Set\_Add\_I}}
\newcommand{\RealSetAdd}{\inst{Set\_Add\_R}}
\newcommand{\ObjectSetAdd}{\inst{Set\_Add\_O}}
\newcommand{\IntSetRemove}{\inst{Set\_Rmv\_I}}
\newcommand{\RealSetRemove}{\inst{Set\_Rmv\_R}}
\newcommand{\ObjectSetRemove}{\inst{Set\_Rmv\_O}}
\newcommand{\FirstInt}{\inst{First\_I}}
\newcommand{\FirstObject}{\inst{First\_O}}
\newcommand{\FirstReal}{\inst{First\_R}}
\newcommand{\LastInt}{\inst{Last\_I}}
\newcommand{\LastObject}{\inst{Last\_O}}
\newcommand{\LastReal}{\inst{Last\_R}}
\newcommand{\NextInt}{\inst{Next\_I}}
\newcommand{\NextIntCirc}{\inst{Next\_C\_I}}
\newcommand{\NextObject}{\inst{Next\_O}}
\newcommand{\NextObjectCirc}{\inst{Next\_C\_O}}
\newcommand{\NextReal}{\inst{Next\_R}}
\newcommand{\NextRealCirc}{\inst{Next\_C\_R}}
\newcommand{\OrdInt}{\inst{Ord\_I}}
\newcommand{\OrdObject}{\inst{Ord\_O}}
\newcommand{\OrdReal}{\inst{Ord\_R}}
\newcommand{\PrevInt}{\inst{Prev\_I}}
\newcommand{\PrevIntCirc}{\inst{Prev\_C\_I}}
\newcommand{\PrevObject}{\inst{Prev\_O}}
\newcommand{\PrevObjectCirc}{\inst{Prev\_C\_O}}
\newcommand{\PrevReal}{\inst{Prev\_R}}
\newcommand{\PrevRealCirc}{\inst{Prev\_C\_R}}

% Range operations:

\newcommand{\IntRangeUpper}{\inst{Int\_Rng\_Ub}}
\newcommand{\IntRangeLower}{\inst{Int\_Rng\_Lb}}
\newcommand{\RealRangeUpper}{\inst{Real\_Rng\_Ub}}
\newcommand{\RealRangeLower}{\inst{Real\_Rng\_Lb}}

% String operations:

\newcommand{\StringConcatenation}{\inst{Strcon}}

% I/O operations:

\newcommand{\WriteInt}{\inst{Write\_I}}
\newcommand{\WriteObject}{\inst{Write\_O}}
\newcommand{\WriteReal}{\inst{Write\_R}}


% Dummy instructions:

\newcommand{\DummyEqual}{\inst{Dummy\_Equ}}
\newcommand{\DummyUnequal}{\inst{Dummy\_Neq}}
\newcommand{\DummyAnd}{\inst{Dummy\_And}}
\newcommand{\DummyOr}{\inst{Dummy\_Or}}
\newcommand{\DummyStringConcat}{\inst{Dummy\_Strcon}}
\newcommand{\DummyWrite}{\inst{Dummy\_Write}}
\newcommand{\DummySize}{\inst{Dummy\_Size}}
\newcommand{\DummySetAdd}{\inst{Dummy\_Set\_Add}}
\newcommand{\DummySetRemove}{\inst{Dummy\_Set\_Rmv}}
\newcommand{\DummyBelongs}{\inst{Dummy\_Belongs}}
\newcommand{\DummyOrd}{\inst{Dummy\_Ord}}
\newcommand{\DummyFirst}{\inst{Dummy\_First}}
\newcommand{\DummyLast}{\inst{Dummy\_Last}}
\newcommand{\DummyNext}{\inst{Dummy\_Next}}
\newcommand{\DummyNextCirc}{\inst{Dummy\_Next\_C}}
\newcommand{\DummyPrev}{\inst{Dummy\_Prev}}
\newcommand{\DummyPrevCirc}{\inst{Dummy\_Prev\_C}}

% Handy names for oft used instructions:

\newcommand{\PushVoid}{\inst{Push\_Void}}
\newcommand{\PushFalse}{\inst{Push\_False}}
\newcommand{\PushTrue}{\inst{Push\_True}}
\newcommand{\PushBoxedVoid}{\inst{Push\_Boxed\_Void}}
\newcommand{\PushBoxedFalse}{\inst{Push\_Boxed\_False}}
\newcommand{\PushBoxedTrue}{\inst{Push\_Boxed\_True}}
\newcommand{\PushNull}{\inst{Push\_Null}}
\newcommand{\PushZeroI}{\inst{Push\_Zero\_I}}
\newcommand{\PushZeroR}{\inst{Push\_Zero\_R}}
\newcommand{\PushOne}{\inst{Push\_One}}
\newcommand{\PushEmptyStr}{\inst{Push\_Empty\_Str}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
