\begin{algorithm} \caption{Method-Dispatch-Of-Virtual-Calls} \begin{algorithmic} \INPUT Type $c$ of receiver object and method signature $m$ at call site. \OUTPUT The signature of target method. \PROCEDURE{Dispatch}{$c,m$} \IF{$c$ contains non-abstract method $m'$ that has the same name and descriptor as $m$} \RETURN $m'$ \ELSE \STATE Let $c'$ be the superclass of $c$. \RETURN \CALL{Dispatch}{$c', m$} \ENDIF \ENDPROCEDURE \end{algorithmic} \end{algorithm}