\chapter{The intermediate language}
\label{IntermediateLanguage}

The complete list of instructions that are currently defined is as
follows. 

\section{Do-nothing instruction}

\begin{Enumerate}
\item \NoOp
\end{Enumerate}

\section{Push instructions}

\begin{Enumerate}
\item \PushValueInt
\item \PushValueObject
\item \PushValueReal
\item \PushOffsetInt
\item \PushOffsetObject
\item \PushOffsetReal
\item \PushTuple
\item \PushIntSet
\item \PushRealSet
\item \PushObjectSet
\item \PushIntRange
\item \PushRealRange
\item \PushClosure
\item \PushNewObject
\end{Enumerate}

\section{Subroutine instructions}

\begin{Enumerate}
\item \Apply
\item \ApplyIntHomomorphism
\item \ApplyRealHomomorphism
\item \ApplyObjectHomomorphism
\item \ApplyInPlaceIntHomomorphism
\item \ApplyInPlaceRealHomomorphism
\item \ApplyInPlaceObjectHomomorphism
\item \ApplyIntCollection
\item \ApplyRealCollection
\item \ApplyObjectCollection
\item \ApplyIntCollectionHomomorphism
\item \ApplyRealCollectionHomomorphism
\item \ApplyObjectCollectionHomomorphism
\item \ApplyInPlaceIntCollectionHomomorphism
\item \ApplyInPlaceRealCollectionHomomorphism
\item \ApplyInPlaceObjectCollectionHomomorphism
\item \Call
\item \End
\item \ReturnInt
\item \ReturnReal
\item \ReturnObject
\item \NonlocalReturnInt
\item \NonlocalReturnReal
\item \NonlocalReturnObject
\end{Enumerate}

\section{Pop instructions}

\begin{Enumerate}
\item \PopInt
\item \PopObject
\item \PopReal
\end{Enumerate}

\section{Relocatable instructions}

\begin{Enumerate}
\item \Jump
\item \JumpOnFalse
\item \JumpOnTrue
\end{Enumerate}

\section{Conversion instructions}

\begin{Enumerate}
\item \IntToObject
\item \IntToReal
\item \ObjectToInt
\item \ObjectToReal
\item \RealToInt
\item \RealToObject
\item \IntArrayToMap
\item \RealArrayToMap
\item \ObjectArrayToMap
\item \MapToArray
\item \CheckArraySize
\item \ReconcileIndexables
\item \ArrayInitialize
\item \ShuffleIntMap
\item \ShuffleRealMap
\item \ShuffleObjectMap
\end{Enumerate}

\section{Assignment instructions}

\begin{Enumerate}
\item \SetGlobal
\item \SetOffsetInt
\item \SetOffsetObject
\item \SetOffsetReal
\end{Enumerate}

\section{Tuple component instructions}

\begin{Enumerate}
\item \GetIntTupleComponent
\item \GetRealTupleComponent
\item \GetObjectTupleComponent
\item \SetIntTupleComponent
\item \SetRealTupleComponent
\item \SetObjectTupleComponent
\end{Enumerate}

\section{Array/Map allocation instructions}

\begin{Enumerate}
\item \PushIntArray
\item \PushRealArray
\item \PushObjectArray
\item \PushIntMap
\item \PushRealMap
\item \PushObjectMap
\item \MakeIntArray
\item \MakeRealArray
\item \MakeObjectArray
\item \MakeIntMap
\item \MakeRealMap
\item \MakeObjectMap
\item \FillArrayFromIntArray
\item \FillArrayFromIntMap
\item \FillArrayFromObjectArray
\item \FillArrayFromObjectMap
\item \FillArrayFromRealArray
\item \FillArrayFromRealMap
\item \FillMapFromIntArray
\item \FillMapFromIntMap
\item \FillMapFromObjectArray
\item \FillMapFromObjectMap
\item \FillMapFromRealArray
\item \FillMapFromRealMap
\end{Enumerate}

\section{Array/Map slot instructions}

\begin{Enumerate}
\item \GetIntArraySlot
\item \GetIntIndexedIntMapSlot
\item \GetIntIndexedObjectMapSlot
\item \GetIntIndexedRealMapSlot
\item \GetIntMapSlot
\item \GetObjectArraySlot
\item \GetObjectMapSlot
\item \GetRealArraySlot
\item \GetRealMapSlot
\item \SetIntArraySlot
\item \SetIntIndexedIntMapSlot
\item \SetIntIndexedObjectMapSlot
\item \SetIntIndexedRealMapSlot
\item \SetIntMapSlot
\item \SetObjectArraySlot
\item \SetObjectMapSlot
\item \SetRealArraySlot
\item \SetRealMapSlot
\end{Enumerate}

\section{Field instructions}

\begin{Enumerate}
\item \GetIntField
\item \GetObjectField
\item \GetRealField
\item \SetIntField
\item \SetObjectField
\item \SetRealField
\end{Enumerate}

\section{Built-in operations}

\subsection{Arithmetic operations}

\begin{Enumerate}
   \item \AddIntInt
   \item \AddIntReal
   \item \AddRealInt
   \item \AddRealReal
   \item \SubIntInt
   \item \SubIntReal
   \item \SubRealInt
   \item \SubRealReal
   \item \MinusInt
   \item \MinusReal
   \item \MulIntInt
   \item \MulIntReal
   \item \MulRealInt
   \item \MulRealReal
   \item \DivIntInt
   \item \DivIntReal
   \item \DivRealInt
   \item \DivRealReal
   \item \Modulus
   \item \MinIntInt
   \item \MinIntReal
   \item \MinRealInt
   \item \MinRealReal
   \item \MaxIntInt
   \item \MaxIntReal
   \item \MaxRealInt
   \item \MaxRealReal
   \item \AbsInt
   \item \AbsReal
   \item \SquareRoot
   \item \Power
\end{Enumerate}

\subsection{Arithmetic relations}

\begin{Enumerate}
   \item \EqualInts
   \item \EqualObjects
   \item \EqualReals
   \item \UnequalInts
   \item \UnequalObjects
   \item \UnequalReals
   \item \GreaterEqualIntInt
   \item \GreaterEqualIntReal
   \item \GreaterEqualRealInt
   \item \GreaterEqualRealReal
   \item \GreaterIntInt
   \item \GreaterIntReal
   \item \GreaterRealInt
   \item \GreaterRealReal
   \item \LessEqualIntInt
   \item \LessEqualIntReal
   \item \LessEqualRealInt
   \item \LessEqualRealReal
   \item \LessIntInt
   \item \LessIntReal
   \item \LessRealInt
   \item \LessRealReal
\end{Enumerate}

\subsection{Boolean operations}

\begin{Enumerate}
   \item \Not
\end{Enumerate}

\subsection{Map and Size operations}

\begin{Enumerate}
   \item \MapSize
   \item \ArraySize
   \item \IndexableSize
   \item \GetIndexable
\end{Enumerate}

\subsection{Container operations}

\begin{Enumerate}
   \item \BelongsInt
   \item \BelongsObject
   \item \BelongsReal
\end{Enumerate}

\subsection{Set operations}

\begin{Enumerate}
   \item \SetCopy
   \item \MakeIntSet
   \item \MakeObjectSet
   \item \MakeRealSet
   \item \SetDifference
   \item \SetExclusion
   \item \SetIntersection
   \item \SetUnion
   \item \DestructiveSetDifference
   \item \DestructiveSetExclusion
   \item \DestructiveSetIntersection
   \item \DestructiveSetUnion
\end{Enumerate}

\subsection{Set relations}

\begin{Enumerate}
   \item \Subset
\end{Enumerate}

\subsection{Set element operations}

\begin{Enumerate}
   \item \IntSetAdd
   \item \RealSetAdd
   \item \ObjectSetAdd
   \item \IntSetRemove
   \item \RealSetRemove
   \item \ObjectSetRemove
   \item \FirstInt
   \item \FirstObject
   \item \FirstReal
   \item \LastInt
   \item \LastObject
   \item \LastReal
   \item \NextInt
   \item \NextIntCirc
   \item \NextObject
   \item \NextObjectCirc
   \item \NextReal
   \item \NextRealCirc
   \item \OrdInt
   \item \OrdObject
   \item \OrdReal
   \item \PrevInt
   \item \PrevIntCirc
   \item \PrevObject
   \item \PrevObjectCirc
   \item \PrevReal
   \item \PrevRealCirc
\end{Enumerate}

\subsection{Range operations}

\begin{Enumerate}
   \item \IntRangeUpper
   \item \IntRangeLower
   \item \RealRangeUpper
   \item \RealRangeLower
\end{Enumerate}

\subsection{String operations}

\begin{Enumerate}
   \item \StringConcatenation
\end{Enumerate}

\subsection{I/O operations}

\begin{Enumerate}
   \item \WriteInt
   \item \WriteObject
   \item \WriteReal
\end{Enumerate}

\section{Dummy instructions}

\begin{Enumerate}
\item \DummyEqual
\item \DummyUnequal
\item \DummyAnd
\item \DummyOr
\item \DummyStringConcat
\item \DummyWrite
\item \DummySize
\item \DummySetAdd
\item \DummySetRemove
\item \DummyBelongs
\item \DummyOrd
\item \DummyFirst
\item \DummyLast
\item \DummyNext
\item \DummyNextCirc
\item \DummyPrev
\item \DummyPrevCirc
\end{Enumerate}
