[pypy-svn] extradoc extradoc: import blog posts into latex. will need tons of tweaking, but it's a start

cfbolz commits-noreply at bitbucket.org
Wed Mar 23 15:08:20 CET 2011


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: extradoc
Changeset: r3391:20a682f0b923
Date: 2011-03-23 14:17 +0100
http://bitbucket.org/pypy/extradoc/changeset/20a682f0b923/

Log:	import blog posts into latex. will need tons of tweaking, but it's a
	start

diff --git a/talk/icooolps2011/paper.tex b/talk/icooolps2011/paper.tex
new file mode 100644
--- /dev/null
+++ b/talk/icooolps2011/paper.tex
@@ -0,0 +1,1198 @@
+%\documentclass{acm_proc_article-sp}
+\documentclass{sig-alternate}
+
+\usepackage{ifthen}
+\usepackage{fancyvrb}
+\usepackage{color}
+\usepackage{ulem}
+\usepackage{xspace}
+\usepackage[utf8]{inputenc}
+
+\makeatletter
+\def\PY at reset{\let\PY at it=\relax \let\PY at bf=\relax%
+    \let\PY at ul=\relax \let\PY at tc=\relax%
+    \let\PY at bc=\relax \let\PY at ff=\relax}
+\def\PY at tok#1{\csname PY at tok@#1\endcsname}
+\def\PY at toks#1+{\ifx\relax#1\empty\else%
+    \PY at tok{#1}\expandafter\PY at toks\fi}
+\def\PY at do#1{\PY at bc{\PY at tc{\PY at ul{%
+    \PY at it{\PY at bf{\PY at ff{#1}}}}}}}
+\def\PY#1#2{\PY at reset\PY at toks#1+\relax+\PY at do{#2}}
+
+\def\PY at tok@gd{\def\PY at bc##1{\fcolorbox[rgb]{0.80,0.00,0.00}{1.00,0.80,0.80}{##1}}}
+\def\PY at tok@gu{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.20,0.00}{##1}}}
+\def\PY at tok@gt{\def\PY at tc##1{\textcolor[rgb]{0.60,0.80,0.40}{##1}}}
+\def\PY at tok@gs{\let\PY at bf=\textbf}
+\def\PY at tok@gr{\def\PY at tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
+\def\PY at tok@cm{\let\PY at it=\textit\def\PY at tc##1{\textcolor[rgb]{0.00,0.60,1.00}{##1}}}
+\def\PY at tok@vg{\def\PY at tc##1{\textcolor[rgb]{0.00,0.20,0.20}{##1}}}
+\def\PY at tok@m{\def\PY at tc##1{\textcolor[rgb]{1.00,0.40,0.00}{##1}}}
+\def\PY at tok@mh{\def\PY at tc##1{\textcolor[rgb]{1.00,0.40,0.00}{##1}}}
+\def\PY at tok@cs{\let\PY at bf=\textbf\let\PY at it=\textit\def\PY at tc##1{\textcolor[rgb]{0.00,0.60,1.00}{##1}}}
+\def\PY at tok@ge{\let\PY at it=\textit}
+\def\PY at tok@vc{\def\PY at tc##1{\textcolor[rgb]{0.00,0.20,0.20}{##1}}}
+\def\PY at tok@il{\def\PY at tc##1{\textcolor[rgb]{1.00,0.40,0.00}{##1}}}
+\def\PY at tok@go{\def\PY at tc##1{\textcolor[rgb]{0.67,0.67,0.67}{##1}}}
+\def\PY at tok@cp{\def\PY at tc##1{\textcolor[rgb]{0.00,0.60,0.60}{##1}}}
+\def\PY at tok@gi{\def\PY at bc##1{\fcolorbox[rgb]{0.00,0.80,0.00}{0.80,1.00,0.80}{##1}}}
+\def\PY at tok@gh{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.20,0.00}{##1}}}
+\def\PY at tok@ni{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.60,0.60,0.60}{##1}}}
+\def\PY at tok@nl{\def\PY at tc##1{\textcolor[rgb]{0.60,0.60,1.00}{##1}}}
+\def\PY at tok@nn{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.80,1.00}{##1}}}
+\def\PY at tok@no{\def\PY at tc##1{\textcolor[rgb]{0.20,0.40,0.00}{##1}}}
+\def\PY at tok@na{\def\PY at tc##1{\textcolor[rgb]{0.20,0.00,0.60}{##1}}}
+\def\PY at tok@nb{\def\PY at tc##1{\textcolor[rgb]{0.20,0.40,0.40}{##1}}}
+\def\PY at tok@nc{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.67,0.53}{##1}}}
+\def\PY at tok@nd{\def\PY at tc##1{\textcolor[rgb]{0.60,0.60,1.00}{##1}}}
+\def\PY at tok@ne{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.80,0.00,0.00}{##1}}}
+\def\PY at tok@nf{\def\PY at tc##1{\textcolor[rgb]{0.80,0.00,1.00}{##1}}}
+\def\PY at tok@si{\def\PY at tc##1{\textcolor[rgb]{0.67,0.00,0.00}{##1}}}
+\def\PY at tok@s2{\def\PY at tc##1{\textcolor[rgb]{0.80,0.20,0.00}{##1}}}
+\def\PY at tok@vi{\def\PY at tc##1{\textcolor[rgb]{0.00,0.20,0.20}{##1}}}
+\def\PY at tok@nt{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.20,0.00,0.60}{##1}}}
+\def\PY at tok@nv{\def\PY at tc##1{\textcolor[rgb]{0.00,0.20,0.20}{##1}}}
+\def\PY at tok@s1{\def\PY at tc##1{\textcolor[rgb]{0.80,0.20,0.00}{##1}}}
+\def\PY at tok@gp{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.00,0.60}{##1}}}
+\def\PY at tok@sh{\def\PY at tc##1{\textcolor[rgb]{0.80,0.20,0.00}{##1}}}
+\def\PY at tok@ow{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.00,0.00}{##1}}}
+\def\PY at tok@sx{\def\PY at tc##1{\textcolor[rgb]{0.80,0.20,0.00}{##1}}}
+\def\PY at tok@bp{\def\PY at tc##1{\textcolor[rgb]{0.20,0.40,0.40}{##1}}}
+\def\PY at tok@c1{\let\PY at it=\textit\def\PY at tc##1{\textcolor[rgb]{0.00,0.60,1.00}{##1}}}
+\def\PY at tok@kc{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.40,0.60}{##1}}}
+\def\PY at tok@c{\let\PY at it=\textit\def\PY at tc##1{\textcolor[rgb]{0.00,0.60,1.00}{##1}}}
+\def\PY at tok@mf{\def\PY at tc##1{\textcolor[rgb]{1.00,0.40,0.00}{##1}}}
+\def\PY at tok@err{\def\PY at tc##1{\textcolor[rgb]{0.67,0.00,0.00}{##1}}\def\PY at bc##1{\colorbox[rgb]{1.00,0.67,0.67}{##1}}}
+\def\PY at tok@kd{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.40,0.60}{##1}}}
+\def\PY at tok@ss{\def\PY at tc##1{\textcolor[rgb]{1.00,0.80,0.20}{##1}}}
+\def\PY at tok@sr{\def\PY at tc##1{\textcolor[rgb]{0.20,0.67,0.67}{##1}}}
+\def\PY at tok@mo{\def\PY at tc##1{\textcolor[rgb]{1.00,0.40,0.00}{##1}}}
+\def\PY at tok@mi{\def\PY at tc##1{\textcolor[rgb]{1.00,0.40,0.00}{##1}}}
+\def\PY at tok@kn{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.40,0.60}{##1}}}
+\def\PY at tok@o{\def\PY at tc##1{\textcolor[rgb]{0.33,0.33,0.33}{##1}}}
+\def\PY at tok@kr{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.40,0.60}{##1}}}
+\def\PY at tok@s{\def\PY at tc##1{\textcolor[rgb]{0.80,0.20,0.00}{##1}}}
+\def\PY at tok@kp{\def\PY at tc##1{\textcolor[rgb]{0.00,0.40,0.60}{##1}}}
+\def\PY at tok@w{\def\PY at tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
+\def\PY at tok@kt{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.47,0.53}{##1}}}
+\def\PY at tok@sc{\def\PY at tc##1{\textcolor[rgb]{0.80,0.20,0.00}{##1}}}
+\def\PY at tok@sb{\def\PY at tc##1{\textcolor[rgb]{0.80,0.20,0.00}{##1}}}
+\def\PY at tok@k{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.00,0.40,0.60}{##1}}}
+\def\PY at tok@se{\let\PY at bf=\textbf\def\PY at tc##1{\textcolor[rgb]{0.80,0.20,0.00}{##1}}}
+\def\PY at tok@sd{\let\PY at it=\textit\def\PY at tc##1{\textcolor[rgb]{0.80,0.20,0.00}{##1}}}
+
+\def\PYZbs{\char`\\}
+\def\PYZus{\char`\_}
+\def\PYZob{\char`\{}
+\def\PYZcb{\char`\}}
+\def\PYZca{\char`\^}
+% for compatibility with earlier versions
+\def\PYZat{@}
+\def\PYZlb{[}
+\def\PYZrb{]}
+\makeatother
+
+
+\ifthenelse{\isundefined{\hypersetup}}{
+  \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
+}{}
+\hypersetup{
+  pdftitle={Controlling the Tracing of an Interpreter With Hints, Part 1: Controlling the Extent of Tracing},
+}
+
+\newboolean{showcomments}
+\setboolean{showcomments}{false}
+\ifthenelse{\boolean{showcomments}}
+  {\newcommand{\nb}[2]{
+    \fbox{\bfseries\sffamily\scriptsize#1}
+    {\sf\small$\blacktriangleright$\textit{#2}$\blacktriangleleft$}
+   }
+   \newcommand{\version}{\emph{\scriptsize$-$Id: main.tex 19055 2008-06-05 11:20:31Z cfbolz $-$}}
+  }
+  {\newcommand{\nb}[2]{}
+   \newcommand{\version}{}
+  }
+
+\newcommand\cfbolz[1]{\nb{CFB}{#1}}
+\newcommand\toon[1]{\nb{TOON}{#1}}
+\newcommand\anto[1]{\nb{ANTO}{#1}}
+\newcommand\arigo[1]{\nb{AR}{#1}}
+\newcommand\fijal[1]{\nb{FIJAL}{#1}}
+\newcommand{\commentout}[1]{}
+
+\newcommand\ie{i.e.,\xspace}
+\newcommand\eg{e.g.,\xspace}
+
+\normalem
+
+\let\oldcite=\cite
+
+\renewcommand\cite[1]{\ifthenelse{\equal{#1}{XXX}}{[citation~needed]}{\oldcite{#1}}}
+
+% compressing itemize env, in case we need it
+\newenvironment{zitemize}% zero - line spacing itemize environment
+   {\begin{list}{--}{
+   \setlength{\itemsep}{0 pt}
+   \setlength{\parsep}{0 pt}
+   \setlength{\topsep} {0 pt} }}% the end stuff
+   {\end{list}}
+
+
+\begin{document}
+
+\title{XXX in a Tracing JIT Compiler for Efficient Dynamic Languages}
+
+\numberofauthors{4}
+\author{
+\alignauthor Carl Friedrich Bolz\\
+       \affaddr{University of D&#252;sseldorf}\\
+       \affaddr{STUPS Group}\\
+       \affaddr{Germany}\\
+       \email{cfbolz at gmx.de}
+\alignauthor XXX
+       \affaddr{XXX}\\
+       \email{XXX}
+}
+\conferenceinfo{ICOOOLPS}{'09 Genova, Italy}
+\CopyrightYear{2009}
+\crdata{978-1-60558-541-3/09/07}
+
+\maketitle
+
+\category{D.3.4}{Programming Languages}{Processors}[code generation,
+incremental compilers, interpreters, run-time environments]
+
+\begin{abstract}
+
+
+\end{abstract}
+
+
+\section{Introduction}
+
+
+\section{The PyPy Project}
+\label{sect:pypy}
+
+XXX
+
+
+\section{Tracing JIT Compilers}
+\label{sect:tracing}
+
+XXX
+
+\section{Controlling The Extent of Tracing}
+
+The question I was asked most often during my recent \href{http://morepypy.blogspot.com/2011/03/us-trip-report-popl-microsoft-ibm.html}{US trip} was how exactly
+the hints work that interpreter authors can use to improve the execution speed
+of the programs running on their interpreters. Since those hints are not really
+documented all that well, I decided to write blog posts about them. This is the
+first one.
+
+
+%___________________________________________________________________________
+
+\subsection{Background}
+
+First, let's recap some basics: PyPy's approach to implementing dynamic
+languages is to write an interpreter for
+the language in RPython. This interpreter can be translated to C and then
+further to machine code. The interpreter consists of code in the form of a
+large number of generated C functions and some data. Similarly, the user
+program consists of functions in the language the interpreter executes.
+
+As was explained in a \href{http://morepypy.blogspot.com/2009/03/applying-tracing-jit-to-interpreter.html}{blog post} and a \href{http://codespeak.net/svn/pypy/extradoc/talk/icooolps2009/bolz-tracing-jit.pdf}{paper} two years ago, PyPy's JIT is a
+meta-tracer. Since we want to re-use our tracer for a variety of languages, we
+don't trace the execution of the user program, but instead trace the execution
+of the \emph{interpreter} that is running the program. This means that the traces
+don't contain the bytecodes of the language in question, but RPython-level
+operations that the interpreter did to execute the program.
+
+On the other hand, the loops that are traced by the tracer are the loops in the
+user program. This means that the tracer stops tracing after one iteration of
+the loop in the user function that is being considered. At this point, it can
+have traced many iterations of the interpreter main loop.
+
+Here's a diagram of this process:
+
+\begin{figure*}
+\includegraphics[scale=0.5]{figures/trace-levels}
+\caption{The levels involved in tracing}
+\label{fig:trace-levels}
+\end{figure*}
+
+On the left you see the levels of execution. The CPU executes the binary of
+PyPy's Python interpreter, which consists of RPython functions that have been
+compiled first to C, then to machine code. Some of these functions contain
+loops, others don't. The interpreter runs a Python program written by a
+programmer (the user). If the tracer is used, it traces operations on the level
+of the interpreter. However, the extent of the trace is determined by the loops
+in the user program.
+
+
+%___________________________________________________________________________
+
+\subsection{How Far Should Tracing Go}
+
+When the tracer encounters a function call at the interpreter level, e.g. the
+interpreter main loop calling a helper function, it can do one of two things:
+
+\begin{enumerate}
+\item it can trace into the helper function, effectively inlining it into the trace.
+
+\item it can not trace into the function and instead record a call to that function
+as an operation in the trace. Such a call operation in the trace is sometimes
+called \emph{residual call}.
+\end{enumerate}
+
+As a default, the tracer will try to trace into the helper because that will
+give more information to the optimizer, allowing it to do a better job. This is
+particularly important for the allocation removal optimization, because if a
+freshly allocated object is passed as an argument to a residual call, its
+allocation cannot be optimized away.
+
+There is a problem however if the helper function itself contains a loop. The
+tracer records the linear sequence of operations that are being executed. Thus
+when it encounters a loop on the interpreter level it records all the
+operations of every iteration of the loop itself, with the net effect of
+unrolling it. The only places where the tracer stops and tries to close the
+trace is in the main loop of the interpreter. When the tracer encounters the
+main loop, it also checks whether the original user loop has been closed, and
+thus whether it can stop tracing.
+
+For most helper functions in the interpreter that contain loops, fully
+unrolling does not make sense. If a loop is unrolled, the trace is specific to
+the number of iteration that was seen during tracing. If the trace is later
+executed with a different number of iterations, the trace will be left via a
+guard failure, which is inefficient. Therefore the default behaviour of the
+tracer is to never trace into a function on the interpreter level that contains
+a loop, but to trace into all non-looping helper functions.
+
+This default behaviour is essentially a heuristic, but one that usually makes
+sense. We want to produce just enough traces to make the resulting code
+efficient, but not more. Therefore we trace as much as possible (everything by
+default) except the functions which loops where tracing would produce code that
+is less general than it could be.
+
+As an example for a helper with a loop, take string concatenation. It loops over
+the characters of both arguments and copies them over into the result string. It
+does not make sense to unroll the loops in this function. If we do that,
+the resulting trace can only be used for strings of the length that was seen
+during tracing. In practise, the string lengths are usually different each run,
+meaning that the trace with unrolling is not run to completion in most cases.
+
+
+%___________________________________________________________________________
+
+\subsection{Influencing the Default Behaviour}
+
+Sometimes the default behaviour is not actually what is wanted. This is
+something the interpreter author has to decide, usually by looking at the traces
+that are produced and deciding that they should be improved. There are two ways
+in which the default is wrong:
+%
+\begin{itemize}
+
+\item \textbf{false negatives:} if a helper function that \textbf{does} contain a loop should
+be traced into, unrolling the loop.
+
+\item \textbf{false positives:} if a helper function that \textbf{does not} contain a loop is
+inlined into the trace, but the interpreter author decides that this is not
+helpful.
+
+\end{itemize}
+
+If the interpreter author finds false negatives or false positives, she can fix
+that by applying a hint to the tracer. These hints take the form of function
+decorators (which both live in the \texttt{pypy.rlib.jit} module). In the next two
+subsections I will describe these two function decorators and their use.
+
+
+%___________________________________________________________________________
+
+\subsubsection{Unrolling Functions With Loops}
+
+The first decorator, used to fix false negatives, is the \texttt{unroll\_safe}
+decorator. It is used to tell the tracer to always trace into a function that
+has a loop, effectively unrolling the loop. This decorator should be used only
+if the loop in the helper function is expected to always run for the same number
+of iterations. This sounds like a strong restriction, in practise this is less
+severe: The number of iterations needs to only be the same \emph{in the context where
+the helper functions is traced from}.
+
+It is easiest to understand this condition via an example. Let's look at the
+\texttt{BUILD\_TUPLE} bytecode in Python. It takes one argument, the length \texttt{n} of
+the tuple being built. The bytecode pops \texttt{n} arguments from the stack, turns
+them into a tuple and pushes that tuple on the stack. Thus the function that
+implements \texttt{BUILD\_TUPLE} in PyPy's Python interpreter calls a helper
+\texttt{popvalues} which pops \texttt{n} values from the stack and returns them in a list.
+This helper is implemented with a loop and would thus not be traced into by
+default.  The loop in the helper can run for very different numbers of
+iterations, because it is used in a variety of places. However, for every
+concrete \texttt{BUILD\_TUPLE} bytecode, the argument will be constant. Therefore it
+is safe (and even necessary) to annotate \texttt{popvalues} with the \texttt{unroll\_safe}
+decorator.
+
+A different example is the implementation of the \texttt{isinstance} builtin. It is
+used to check whether an object \texttt{a} is an instance of a class \texttt{B} like
+this: \texttt{isinstance(a, B)}. The second argument of the function can also be a
+tuple of classes to check whether an object is an instance of one of a number of
+classes: \texttt{isinstance(a, (A, B, C, D))}. To implement this second case, the
+implementation of \texttt{isinstance} contains a loop iterating over the elements of
+the tuple. The number of loop iterations can vary, but is usually fixed for each
+individual call site which typically just lists a few classes in the source
+code. Therefore it is also safe to annotate the implementation of \texttt{isinstance}
+with the \texttt{unroll\_safe} decorator.
+
+
+%___________________________________________________________________________
+
+\subsubsection{Preventing the Tracing of Functions}
+
+The second decorator \texttt{dont\_look\_inside} is used to fix false positives. It
+tells the JIT to never trace into the decorated function and just always produce
+a residual call instead. This decorator is in many ways less important than the
+unrolling one (except for a special situation that I will describe in a
+follow-up post). It is used if tracing into a function is not expected to yield
+any speed benefits, because the optimizer will not be able to improve it much.
+This is often the case if the called helper function does not contain any
+``dynamic'' behaviour. In such a situation it is better to just leave the function
+call in the trace, because that produces less code.
+
+An example would be the import mechanism in Python. It's very unlikely that any
+performance improvement can be had by turning part of it into assembler.
+Therefore we hide it from the tracer by annotating them with
+\texttt{dont\_look\_inside}.
+
+
+%___________________________________________________________________________
+
+\subsection{Conclusion}
+
+In this post we discussed two hints that can be used to control precisely which
+parts of the interpreter should be meta-traced. If these hints are used
+carefully, this can go a long way to making the interpreter produce traces that
+contain exactly the interesting part of the execution, and will contain calls to
+the functions that can not be optimized by tracing techniques.
+
+In the next part of this series I will discuss a different set of hints that can
+be used to strongly optimize traces.
+
+
+% Document title
+\section{Controlling the Tracing of an Interpreter With Hints, Part 2: Controlling Optimization}
+
+This is part 2 of a series on how to speed up an interpreter written with PyPy
+by adding JIT hints to the interpreter. Part 1 described how to \href{http://morepypy.blogspot.com/2011/03/controlling-tracing-of-interpreter-with.html}{control the
+extent of tracing}. In this post I will describe how to add hints that
+influence the optimizer.  If applied correctly these techniques can give
+really big speedups by pre-computing parts of what happens at runtime. On the other
+hand, if applied incorrectly they might lead to code bloat, thus making the
+resulting program actually slower.
+
+
+%___________________________________________________________________________
+
+\subsection{Background}
+
+Before sending the trace to the backend to produce actual machine code, it is
+optimized.  The optimizer applies a number of techniques to remove or reduce
+the number of operations: most of these are well known \href{http://en.wikipedia.org/wiki/Compiler_optimization\#Optimization_techniques}{compiler optimization
+techniques}, with the difference that it is easier to apply them in a tracing
+JIT because it only has to deal with linear traces.  Among the techniques:
+%
+\begin{itemize}
+
+\item \href{http://en.wikipedia.org/wiki/Constant_folding}{constant folding}
+
+\item \href{http://en.wikipedia.org/wiki/Common_subexpression_elimination}{common subexpression elimination}
+
+\item allocation removal, as described in the paper that I recently \href{http://morepypy.blogspot.com/2011/03/us-trip-report-popl-microsoft-ibm.html}{presented at
+PEPM}
+
+\item store/load propagation
+
+\item \href{http://morepypy.blogspot.com/2011/01/loop-invariant-code-motion.html}{loop invariant code motion}
+
+\end{itemize}
+
+In some places it turns out that if the interpreter author rewrites some parts
+of the interpreter with these optimizations in mind the traces that are produced
+by the optimizer can be vastly improved.
+
+In this post I will describe two hints that allow the interpreter author to
+increase the optimization opportunities for constant folding. For constant
+folding to work, two conditions need
+to be met:
+%
+\begin{itemize}
+
+\item the arguments of an operation actually need to all be constant,
+i.e. statically known by the optimizer
+
+\item the operation needs to be \emph{pure}, i.e. always yield the same result given
+the same arguments.
+
+\end{itemize}
+
+The PyPy JIT generator automatically detects the majority of these conditions.
+However, for the cases in which the automatic detection does not work, the
+interpreter author can apply \textbf{hints} to improve the optimization
+opportunities. There is one kind of hint for both of the conditions above.
+
+\textbf{Note}: These hints are written by an interpreter developer and applied to the
+RPython source of the interpreter. Normal Python users will never see them.
+
+
+%___________________________________________________________________________
+
+\subsection{Where Do All the Constants Come From}
+
+It is worth clarifying what is a ``constant'' in this context.  A variable of
+the trace is said to be constant if its value is statically known by the
+optimizer.
+
+The simplest example of constants are literal values.  For example, if in the
+RPython source code we have a line like \texttt{y = x + 1}, the second operand will
+be a constant in the trace.
+
+However, the optimizer can statically know the value of a variable even if it
+is not a constant in the original source code. For example, consider the
+following fragment of RPython code:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{k}{if} \PY{n}{x} \PY{o}{==} \PY{l+m+mi}{4}\PY{p}{:}
+    \PY{n}{y} \PY{o}{=} \PY{n}{y} \PY{o}{+} \PY{n}{x}
+\end{Verbatim}
+
+If the fragment is traced with \texttt{x} being \texttt{4}, the following trace is
+produced:
+%
+\begin{quote}{\ttfamily \raggedright \noindent
+guard(x~==~4)\\
+y~=~y~+~x
+}
+\end{quote}
+
+In the trace above, the value of \texttt{x} is statically known thanks to the
+guard. Remember that a guard is a runtime check. The above trace will run to
+completion when \texttt{x == 4}. If the check fails, execution of the trace is
+stopped and the interpreter continues to run.
+
+There are cases in which it is useful to turn an arbitrary variable
+into a constant value. This process is called \emph{promotion} and it is an old idea
+in partial evaluation (it's called ``the trick'' there). Promotion is also heavily
+used by \href{http://psyco.sourceforge.net/}{Psyco} and by all older versions of PyPy's JIT. Promotion is a technique
+that only works well in JIT compilers, in
+static compilers it is significantly less applicable.
+
+Promotion is essentially a tool for trace specialization. In some places in the
+interpreter it would be very useful if a variable were constant, even though it
+could have different values in practice. In such a place, promotion is used. The
+typical reason to do that is if there is
+a lot of computation depending on the value of that variable.
+
+Let's make this more concrete. If we trace a call to the following function:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{k}{def} \PY{n+nf}{f1}\PY{p}{(}\PY{n}{x}\PY{p}{,} \PY{n}{y}\PY{p}{)}\PY{p}{:}
+    \PY{n}{z} \PY{o}{=} \PY{n}{x} \PY{o}{*} \PY{l+m+mi}{2} \PY{o}{+} \PY{l+m+mi}{1}
+    \PY{k}{return} \PY{n}{z} \PY{o}{+} \PY{n}{y}
+\end{Verbatim}
+
+We get a trace that looks like this:
+%
+\begin{quote}{\ttfamily \raggedright \noindent
+v1~=~x~*~2\\
+z~=~v1~+~1\\
+v2~=~z~+~y\\
+return(v2)
+}
+\end{quote}
+
+Observe how the first two operations could be constant-folded if the value of
+\texttt{x} were known. Let's assume that the value of \texttt{x} can vary, but does so
+rarely, i.e. only takes a few different values at runtime. If this is the
+case, we can add a hint to promote \texttt{x}, like this:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{k}{def} \PY{n+nf}{f2}\PY{p}{(}\PY{n}{x}\PY{p}{,} \PY{n}{y}\PY{p}{)}\PY{p}{:}
+    \PY{n}{x} \PY{o}{=} \PY{n}{hint}\PY{p}{(}\PY{n}{x}\PY{p}{,} \PY{n}{promote}\PY{o}{=}\PY{n+nb+bp}{True}\PY{p}{)}
+    \PY{n}{z} \PY{o}{=} \PY{n}{x} \PY{o}{*} \PY{l+m+mi}{2} \PY{o}{+} \PY{l+m+mi}{1}
+    \PY{k}{return} \PY{n}{z} \PY{o}{+} \PY{n}{y}
+\end{Verbatim}
+
+The meaning of this hint is that the tracer should pretend that \texttt{x} is a
+constant
+in the code that follows. When just running the code, the function has no
+effect, as it simply returns its first argument. When tracing, some extra work
+is done. Let's assume that this changed function is traced with
+the arguments \texttt{4} and \texttt{8}. The trace will be the same, except for one
+operation at the beginning:
+%
+\begin{quote}{\ttfamily \raggedright \noindent
+guard(x~==~4)\\
+v1~=~x~*~2\\
+z~=~v1~+~1\\
+v2~=~z~+~y\\
+return(v2)
+}
+\end{quote}
+
+The promotion is turned into a \texttt{guard} operation in the trace. The guard
+captures the value of \texttt{x} as it was at runtime. From the point of view of the
+optimizer, this guard is not any different than the one produced by the \texttt{if}
+statement in the example above. After the guard, the rest of the trace can
+assume that \texttt{x} is equal to \texttt{4}, meaning that the optimizer will turn this
+trace into:
+%
+\begin{quote}{\ttfamily \raggedright \noindent
+guard(x~==~4)\\
+v2~=~9~+~y\\
+return(v2)
+}
+\end{quote}
+
+Notice how the first two arithmetic operations were constant folded. The hope is
+that the guard is executed quicker than the multiplication and the addition that
+was now optimized away.
+
+If this trace is executed with values of \texttt{x} other than \texttt{4}, the guard will
+fail, and execution will continue in the interpreter. If the guard fails often
+enough, a new trace will be started from the guard. This other trace will
+capture a different value of \texttt{x}. If it is e.g. \texttt{2}, then the optimized
+trace looks like this:
+%
+\begin{quote}{\ttfamily \raggedright \noindent
+guard(x~==~2)\\
+v2~=~5~+~y\\
+return(v2)
+}
+\end{quote}
+
+This new trace will be attached to the guard instruction of the first trace. If
+\texttt{x} takes on even more values, a new trace will eventually be made for all of them,
+linking them into a chain. This is clearly not desirable, so we should promote
+only variables that don't vary much. However, adding a promotion hint will never produce wrong
+results. It might just lead to too much assembler code.
+
+Promoting integers, as in the examples above, is not used that often.
+However, the internals of dynamic language interpreters often
+have values that are variable but vary little in the context of parts of a user
+program. An example would be the types of variables in a user function. Even
+though in principle the argument to a Python function could be any Python type,
+in practice the argument types tend to not vary often. Therefore it is possible to
+promote the types. In the next blog post I will give a complete example of how
+this works.
+
+
+%___________________________________________________________________________
+
+\subsection{Declaring New Pure Operations}
+
+In the last section we saw a way to turn arbitrary variables into constants. All
+pure operations on these constants can be constant-folded. This works great for
+constant folding of simple types, e.g. integers. Unfortunately, in the context of an
+interpreter for a dynamic
+language, most operations actually manipulate objects, not simple types. The
+operations on objects are often not pure and might even have side-effects. If
+one reads a field out of a constant reference to an object this cannot
+necessarily be folded away because the object can be mutated. Therefore, another
+hint is needed.
+
+As an example, take the following class:
+
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{k}{class} \PY{n+nc}{A}\PY{p}{(}\PY{n+nb}{object}\PY{p}{)}\PY{p}{:}
+    \PY{k}{def} \PY{n+nf}{\PYZus{}\PYZus{}init\PYZus{}\PYZus{}}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{x}\PY{p}{,} \PY{n}{y}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{x} \PY{o}{=} \PY{n}{x}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{y} \PY{o}{=} \PY{n}{y}
+
+    \PY{k}{def} \PY{n+nf}{f}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{val}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{y} \PY{o}{=} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{compute}\PY{p}{(}\PY{p}{)} \PY{o}{+} \PY{n}{val}
+
+    \PY{k}{def} \PY{n+nf}{compute}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{)}\PY{p}{:}
+        \PY{k}{return} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{x} \PY{o}{*} \PY{l+m+mi}{2} \PY{o}{+} \PY{l+m+mi}{1}
+\end{Verbatim}
+
+Tracing the call \texttt{a.f(10)} of some instance of \texttt{A} yields the following
+trace (note how the call to \texttt{compute} is inlined):
+%
+\begin{quote}{\ttfamily \raggedright \noindent
+x~=~a.x\\
+v1~=~x~*~2\\
+v2~=~v1~+~1\\
+v3~=~v2~+~val\\
+a.y~=~v3
+}
+\end{quote}
+
+In this case, adding a promote of \texttt{self} in the \texttt{f} method to get rid of the
+computation of the first few operations does not help. Even if \texttt{a} is a
+constant reference to an object, reading the \texttt{x} field does not necessarily
+always yield the same value. To solve this problem, there is another annotation,
+which lets the interpreter author communicate invariants to the optimizer. In
+this case, she could decide that the \texttt{x} field of instances of \texttt{A} is
+immutable, and therefore \texttt{compute}
+is a pure function. To communicate this, there is a \texttt{purefunction} decorator.
+If the code in \texttt{compute} should be constant-folded away, we would change the
+class as follows:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{k}{class} \PY{n+nc}{A}\PY{p}{(}\PY{n+nb}{object}\PY{p}{)}\PY{p}{:}
+    \PY{k}{def} \PY{n+nf}{\PYZus{}\PYZus{}init\PYZus{}\PYZus{}}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{x}\PY{p}{,} \PY{n}{y}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{x} \PY{o}{=} \PY{n}{x}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{y} \PY{o}{=} \PY{n}{y}
+
+    \PY{k}{def} \PY{n+nf}{f}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{val}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self} \PY{o}{=} \PY{n}{hint}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{promote}\PY{o}{=}\PY{n+nb+bp}{True}\PY{p}{)}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{y} \PY{o}{=} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{compute}\PY{p}{(}\PY{p}{)} \PY{o}{+} \PY{n}{val}
+
+    \PY{n+nd}{@purefunction}
+    \PY{k}{def} \PY{n+nf}{compute}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{)}\PY{p}{:}
+        \PY{k}{return} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{x} \PY{o}{*} \PY{l+m+mi}{2} \PY{o}{+} \PY{l+m+mi}{1}
+\end{Verbatim}
+
+Now the trace will look like this:
+%
+\begin{quote}{\ttfamily \raggedright \noindent
+guard(a~==~0xb73984a8)\\
+v1~=~compute(a)\\
+v2~=~v1~+~val\\
+a.y~=~v2
+}
+\end{quote}
+
+Here, \texttt{0xb73984a8} is the address of the instance of \texttt{A} that was used
+during tracing. The call to \texttt{compute} is not inlined, so that the optimizer
+has a chance to see it. Since \texttt{compute} function is marked as pure, and its
+argument
+is a constant reference, the call will be removed by the optimizer. The final
+trace looks like this:
+%
+\begin{quote}{\ttfamily \raggedright \noindent
+guard(a~==~0xb73984a8)\\
+v2~=~9~+~val\\
+a.y~=~v2
+}
+\end{quote}
+
+(assuming that the \texttt{x} field's value is \texttt{4}).
+
+On the one hand, the \texttt{purefunction} annotation is very powerful. It can be
+used to constant-fold arbitrary parts of the computation in the interpreter.
+However, the annotation also gives you ample opportunity to mess things up. If a
+function is annotated to be pure, but is not really, the optimizer can produce
+subtly wrong code. Therefore, a lot of care has to be taken when using this
+annotation.
+
+
+%___________________________________________________________________________
+
+\subsubsection{Observably Pure Functions}
+
+Why can't we simply write an analysis to find out that the \texttt{x} fields of the
+\texttt{A} instances is immutable and deduce that \texttt{compute} is a pure function,
+since it only reads the \texttt{x} field and does not have side effects? This might
+be possible in this particular case, but in practice the functions that are
+annotated with the \texttt{purefunction} decorator are usually more complex.
+The easiest example for this is that of a function that uses memoization to
+cache its results. If you analyze this function, it looks like the function has
+side effects, because it changes the memoizing dictionary. However, because this side
+effect is not externally visible, the function from the outside is pure. This is
+a property that is not easily detectable by analysis. Therefore, the purity
+of this function needs to be annotated.
+
+
+%___________________________________________________________________________
+
+\subsubsection{Immutable Fields}
+
+One of the most common cases of pure functions is reading immutable
+values out of objects. Since this is so common, we have special syntactic sugar
+for it. A RPython class can have a class attribute \texttt{\_immutable\_fields\_} set to
+a list of strings, listing the fields that cannot be changed. This is equivalent
+to using getters and annotating them with \texttt{purefunction}.
+
+
+%___________________________________________________________________________
+
+\subsection{Conclusion}
+
+In this blog post I explained two more hints that can be used in the source code
+of the interpreter. They are used to influence what the optimizer does with the
+trace. I realize the examples given here are a bit too small, in the next
+installment I will give a worked-out example that puts all the pieces together.
+
+\section{Controlling the Tracing of an Interpreter With Hints, Part 3: Putting Things Together}
+
+This is part 3 of the series on how to speed up an interpreter written with
+PyPy by adding JIT hints to the interpreter. Part 1 described how to \href{http://morepypy.blogspot.com/2011/03/controlling-tracing-of-interpreter-with.html}{control
+the extent of tracing}. Part 2 described how to \href{http://morepypy.blogspot.com/2011/03/controlling-tracing-of-interpreter-with_15.html}{influence the optimizer with
+promotion and pure functions}. In this post I describe a worked-out example of
+a small object model for a dynamic language and how to make it efficient using
+the hints described in the previous posts.
+
+
+%___________________________________________________________________________
+
+\subsection{A Simple Object Model}
+
+To implement a dynamic language efficiently, the operations on its objects need
+to be fast. Most dynamic languages have object models that are made by using
+dictionaries everywhere. Let's look at an example of how the JIT can be made to
+optimize such operations.
+
+For the purpose of this blog post we will use a very simple and bare-bones
+object model that just supports very simple classes and instances, without any
+inheritance or any fancy features. The model has classes, which contain methods.
+Instances have a class. Instances have their own attributes. When looking up an
+attribute on an instance, the instances attributes are searched. If the
+attribute is not found there, the class' attributes are searched.
+
+To implement this object model, we could use the following RPython code as part
+of the interpreter source code:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{k}{class} \PY{n+nc}{Class}\PY{p}{(}\PY{n+nb}{object}\PY{p}{)}\PY{p}{:}
+    \PY{k}{def} \PY{n+nf}{\PYZus{}\PYZus{}init\PYZus{}\PYZus{}}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{name} \PY{o}{=} \PY{n}{name}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{methods} \PY{o}{=} \PY{p}{\PYZob{}}\PY{p}{\PYZcb{}}
+
+    \PY{k}{def} \PY{n+nf}{instantiate}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{)}\PY{p}{:}
+        \PY{k}{return} \PY{n}{Instance}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{)}
+
+    \PY{k}{def} \PY{n+nf}{find\PYZus{}method}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{)}\PY{p}{:}
+        \PY{n}{result} \PY{o}{=} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{methods}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+        \PY{k}{if} \PY{n}{result} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{:}
+            \PY{k}{return} \PY{n}{result}
+        \PY{k}{raise} \PY{n+ne}{AttributeError}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+
+    \PY{k}{def} \PY{n+nf}{change\PYZus{}method}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{,} \PY{n}{value}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{methods}\PY{p}{[}\PY{n}{name}\PY{p}{]} \PY{o}{=} \PY{n}{value}
+
+
+\PY{k}{class} \PY{n+nc}{Instance}\PY{p}{(}\PY{n+nb}{object}\PY{p}{)}\PY{p}{:}
+    \PY{k}{def} \PY{n+nf}{\PYZus{}\PYZus{}init\PYZus{}\PYZus{}}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{cls}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{cls} \PY{o}{=} \PY{n}{cls}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{attributes} \PY{o}{=} \PY{p}{\PYZob{}}\PY{p}{\PYZcb{}}
+
+    \PY{k}{def} \PY{n+nf}{getfield}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{)}\PY{p}{:}
+        \PY{n}{result} \PY{o}{=} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{attributes}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+        \PY{k}{if} \PY{n}{result} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{:}
+            \PY{k}{return} \PY{n}{result}
+        \PY{k}{raise} \PY{n+ne}{AttributeError}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+
+    \PY{k}{def} \PY{n+nf}{write\PYZus{}attribute}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{,} \PY{n}{value}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{attributes}\PY{p}{[}\PY{n}{name}\PY{p}{]} \PY{o}{=} \PY{n}{value}
+
+    \PY{k}{def} \PY{n+nf}{getattr}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{)}\PY{p}{:}
+        \PY{k}{try}\PY{p}{:}
+            \PY{k}{return} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{getfield}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+        \PY{k}{except} \PY{n+ne}{AttributeError}\PY{p}{:}
+            \PY{k}{return} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{cls}\PY{o}{.}\PY{n}{find\PYZus{}method}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+\end{Verbatim}
+
+In this straightforward implementation the methods and attributes are just
+stored in dictionaries on the classes/instances. While this object model is very
+simple it already contains all the hard parts of Python's object model. Both
+instances and classes can have arbitrary fields, and they are changeable at
+any time.  Moreover, instances can change their class after they have been
+created.
+
+When using this object model in
+an interpreter, a huge amount of time will be spent doing lookups in these
+dictionaries. To make the language efficient using a tracing JIT, we need to
+find a way to get rid of these dictionary lookups somehow.
+
+Let's assume we trace through code that sums three attributes, such as:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{n}{inst}\PY{o}{.}\PY{n}{getattr}\PY{p}{(}\PY{l+s}{"}\PY{l+s}{a}\PY{l+s}{"}\PY{p}{)} \PY{o}{+} \PY{n}{inst}\PY{o}{.}\PY{n}{getattr}\PY{p}{(}\PY{l+s}{"}\PY{l+s}{b}\PY{l+s}{"}\PY{p}{)} \PY{o}{+} \PY{n}{inst}\PY{o}{.}\PY{n}{getattr}\PY{p}{(}\PY{l+s}{"}\PY{l+s}{c}\PY{l+s}{"}\PY{p}{)}
+\end{Verbatim}
+
+The trace could look like this:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{c}{# inst.getattr("a")}
+\PY{n}{attributes1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{attributes}
+\PY{n}{result1} \PY{o}{=} \PY{n+nb}{dict}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{attributes1}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{a}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{result1} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{)}
+
+\PY{c}{# inst.getattr("b")}
+\PY{n}{attributes2} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{attributes}
+\PY{n}{v1} \PY{o}{=} \PY{n+nb}{dict}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{attributes2}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{b}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{v1} \PY{o+ow}{is} \PY{n+nb+bp}{None}\PY{p}{)}
+\PY{n}{cls1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{cls}
+\PY{n}{methods1} \PY{o}{=} \PY{n}{cls}\PY{o}{.}\PY{n}{methods}
+\PY{n}{result2} \PY{o}{=} \PY{n+nb}{dict}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{methods1}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{b}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{result2} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{)}
+\PY{n}{v2} \PY{o}{=} \PY{n}{result1} \PY{o}{+} \PY{n}{result2}
+
+\PY{c}{# inst.getattr("c")}
+\PY{n}{attributes3} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{attributes}
+\PY{n}{v3} \PY{o}{=} \PY{n+nb}{dict}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{attributes3}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{c}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{v3} \PY{o+ow}{is} \PY{n+nb+bp}{None}\PY{p}{)}
+\PY{n}{cls1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{cls}
+\PY{n}{methods2} \PY{o}{=} \PY{n}{cls}\PY{o}{.}\PY{n}{methods}
+\PY{n}{result3} \PY{o}{=} \PY{n+nb}{dict}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{methods2}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{c}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{result3} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{)}
+
+\PY{n}{v4} \PY{o}{=} \PY{n}{v2} \PY{o}{+} \PY{n}{result3}
+\PY{k}{return}\PY{p}{(}\PY{n}{v4}\PY{p}{)}
+\end{Verbatim}
+
+In this example, the attribute \texttt{a} is found on the instance, but the
+attributes \texttt{b} and \texttt{c} are found on the class. The trace indeed contains
+five calls to \texttt{dict.get}, which is slow.
+
+
+%___________________________________________________________________________
+
+\subsection{Making Instance Attributes Faster Using Maps}
+
+The first step in making \texttt{getattr} faster in our object model is to optimize
+away the dictionary lookups on the instances. The hints we have looked at in the
+two earlier blog posts don't seem to help with the current object model. There is
+no pure function to be seen, and the instance is not a candidate for promotion,
+because there tend to be many instances.
+
+This is a common problem when trying to apply hints. Often, the interpreter
+needs a small rewrite to expose the pure functions and nearly-constant objects
+that are implicitly there. In the case of instance fields this rewrite is not
+entirely obvious. The basic idea is as follows. In theory instances can have
+arbitrary fields. In practice however many instances share their layout (i.e.
+their set of keys) with many other instances.
+
+Therefore it makes sense to factor the layout information out of the instance
+implementation into a shared object. This shared layout object is called a
+\emph{map}. Maps are an old idea that comes originally from the SELF language. They are
+also used by many JavaScript implementations such as V8. I've \href{http://morepypy.blogspot.com/2010/11/efficiently-implementing-python-objects.html}{written about maps
+before}, so I won't explain them fully again.
+
+The rewritten \texttt{Instance} class using maps looks like this:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{k}{class} \PY{n+nc}{Map}\PY{p}{(}\PY{n+nb}{object}\PY{p}{)}\PY{p}{:}
+    \PY{k}{def} \PY{n+nf}{\PYZus{}\PYZus{}init\PYZus{}\PYZus{}}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{attribute\PYZus{}indexes} \PY{o}{=} \PY{p}{\PYZob{}}\PY{p}{\PYZcb{}}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{other\PYZus{}maps} \PY{o}{=} \PY{p}{\PYZob{}}\PY{p}{\PYZcb{}}
+
+    \PY{n+nd}{@purefunction}
+    \PY{k}{def} \PY{n+nf}{getindex}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{)}\PY{p}{:}
+        \PY{k}{return} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{attribute\PYZus{}indexes}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{name}\PY{p}{,} \PY{o}{-}\PY{l+m+mi}{1}\PY{p}{)}
+
+    \PY{n+nd}{@purefunction}
+    \PY{k}{def} \PY{n+nf}{new\PYZus{}map\PYZus{}with\PYZus{}additional\PYZus{}attribute}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{)}\PY{p}{:}
+        \PY{k}{if} \PY{n}{name} \PY{o+ow}{not} \PY{o+ow}{in} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{other\PYZus{}maps}\PY{p}{:}
+            \PY{n}{newmap} \PY{o}{=} \PY{n}{Map}\PY{p}{(}\PY{p}{)}
+            \PY{n}{newmap}\PY{o}{.}\PY{n}{attribute\PYZus{}indexes}\PY{o}{.}\PY{n}{update}\PY{p}{(}\PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{attribute\PYZus{}indexes}\PY{p}{)}
+            \PY{n}{newmap}\PY{o}{.}\PY{n}{attribute\PYZus{}indexes}\PY{p}{[}\PY{n}{name}\PY{p}{]} \PY{o}{=} \PY{n+nb}{len}\PY{p}{(}\PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{attribute\PYZus{}indexes}\PY{p}{)}
+            \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{other\PYZus{}maps}\PY{p}{[}\PY{n}{name}\PY{p}{]} \PY{o}{=} \PY{n}{newmap}
+        \PY{k}{return} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{other\PYZus{}maps}\PY{p}{[}\PY{n}{name}\PY{p}{]}
+
+
+\PY{n}{EMPTY\PYZus{}MAP} \PY{o}{=} \PY{n}{Map}\PY{p}{(}\PY{p}{)}
+
+\PY{k}{class} \PY{n+nc}{Instance}\PY{p}{(}\PY{n+nb}{object}\PY{p}{)}\PY{p}{:}
+    \PY{k}{def} \PY{n+nf}{\PYZus{}\PYZus{}init\PYZus{}\PYZus{}}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{cls}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{cls} \PY{o}{=} \PY{n}{cls}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{map} \PY{o}{=} \PY{n}{EMPTY\PYZus{}MAP}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{storage} \PY{o}{=} \PY{p}{[}\PY{p}{]}
+
+    \PY{k}{def} \PY{n+nf}{getfield}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb}{map} \PY{o}{=} \PY{n}{hint}\PY{p}{(}\PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{map}\PY{p}{,} \PY{n}{promote}\PY{o}{=}\PY{n+nb+bp}{True}\PY{p}{)}
+        \PY{n}{index} \PY{o}{=} \PY{n+nb}{map}\PY{o}{.}\PY{n}{getindex}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+        \PY{k}{if} \PY{n}{index} \PY{o}{!=} \PY{o}{-}\PY{l+m+mi}{1}\PY{p}{:}
+            \PY{k}{return} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{storage}\PY{p}{[}\PY{n}{index}\PY{p}{]}
+        \PY{k}{raise} \PY{n+ne}{AttributeError}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+
+    \PY{k}{def} \PY{n+nf}{write\PYZus{}attribute}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{,} \PY{n}{value}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb}{map} \PY{o}{=} \PY{n}{hint}\PY{p}{(}\PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{map}\PY{p}{,} \PY{n}{promote}\PY{o}{=}\PY{n+nb+bp}{True}\PY{p}{)}
+        \PY{n}{index} \PY{o}{=} \PY{n+nb}{map}\PY{o}{.}\PY{n}{getindex}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+        \PY{k}{if} \PY{n}{index} \PY{o}{!=} \PY{o}{-}\PY{l+m+mi}{1}\PY{p}{:}
+            \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{storage}\PY{p}{[}\PY{n}{index}\PY{p}{]} \PY{o}{=} \PY{n}{value}
+            \PY{k}{return}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{map} \PY{o}{=} \PY{n+nb}{map}\PY{o}{.}\PY{n}{new\PYZus{}map\PYZus{}with\PYZus{}additional\PYZus{}attribute}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{storage}\PY{o}{.}\PY{n}{append}\PY{p}{(}\PY{n}{value}\PY{p}{)}
+
+    \PY{k}{def} \PY{n+nf}{getattr}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{)}\PY{p}{:}
+        \PY{k}{try}\PY{p}{:}
+            \PY{k}{return} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{getfield}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+        \PY{k}{except} \PY{n+ne}{AttributeError}\PY{p}{:}
+            \PY{k}{return} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{cls}\PY{o}{.}\PY{n}{find\PYZus{}method}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+\end{Verbatim}
+
+Instances no longer use dictionaries to store their fields. Instead, they have a
+reference to a map, which maps field names to indexes into a storage list. The
+storage list contains the actual field values. The maps are shared between
+objects with the same layout. Therefore they have to be immutable, which means
+that their \texttt{getindex} method is a pure function. When a new attribute is added
+to an instance, a new map needs to be chosen, which is done with the
+\texttt{new\_map\_with\_additional\_attribute} method on the previous map. Now that we have
+introduced maps, it is safe to promote the map everywhere, because we assume
+that the number of different instance layouts is small.
+
+With this changed instance implementation, the trace we had above changes to the
+following, where \texttt{0xb74af4a8} is the memory address of the Map instance that
+has been promoted:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{c}{# inst.getattr("a")}
+\PY{n}{map1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{map}
+\PY{n}{guard}\PY{p}{(}\PY{n}{map1} \PY{o}{==} \PY{l+m+mh}{0xb74af4a8}\PY{p}{)}
+\PY{n}{index1} \PY{o}{=} \PY{n}{Map}\PY{o}{.}\PY{n}{getindex}\PY{p}{(}\PY{n}{map1}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{a}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{index1} \PY{o}{!=} \PY{o}{-}\PY{l+m+mi}{1}\PY{p}{)}
+\PY{n}{storage1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{storage}
+\PY{n}{result1} \PY{o}{=} \PY{n}{storage1}\PY{p}{[}\PY{n}{index1}\PY{p}{]}
+
+\PY{c}{# inst.getattr("b")}
+\PY{n}{map2} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{map}
+\PY{n}{guard}\PY{p}{(}\PY{n}{map2} \PY{o}{==} \PY{l+m+mh}{0xb74af4a8}\PY{p}{)}
+\PY{n}{index2} \PY{o}{=} \PY{n}{Map}\PY{o}{.}\PY{n}{getindex}\PY{p}{(}\PY{n}{map2}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{b}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{index2} \PY{o}{==} \PY{o}{-}\PY{l+m+mi}{1}\PY{p}{)}
+\PY{n}{cls1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{cls}
+\PY{n}{methods1} \PY{o}{=} \PY{n}{cls}\PY{o}{.}\PY{n}{methods}
+\PY{n}{result2} \PY{o}{=} \PY{n+nb}{dict}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{methods1}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{b}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{result2} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{)}
+\PY{n}{v2} \PY{o}{=} \PY{n}{result1} \PY{o}{+} \PY{n}{result2}
+
+\PY{c}{# inst.getattr("c")}
+\PY{n}{map3} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{map}
+\PY{n}{guard}\PY{p}{(}\PY{n}{map3} \PY{o}{==} \PY{l+m+mh}{0xb74af4a8}\PY{p}{)}
+\PY{n}{index3} \PY{o}{=} \PY{n}{Map}\PY{o}{.}\PY{n}{getindex}\PY{p}{(}\PY{n}{map3}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{c}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{index3} \PY{o}{==} \PY{o}{-}\PY{l+m+mi}{1}\PY{p}{)}
+\PY{n}{cls1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{cls}
+\PY{n}{methods2} \PY{o}{=} \PY{n}{cls}\PY{o}{.}\PY{n}{methods}
+\PY{n}{result3} \PY{o}{=} \PY{n+nb}{dict}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{methods2}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{c}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{result3} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{)}
+
+\PY{n}{v4} \PY{o}{=} \PY{n}{v2} \PY{o}{+} \PY{n}{result3}
+\PY{k}{return}\PY{p}{(}\PY{n}{v4}\PY{p}{)}
+\end{Verbatim}
+
+The calls to \texttt{Map.getindex} can be optimized away, because they are calls to
+a pure function and they have constant arguments. That means that \texttt{index1/2/3}
+are constant and the guards on them can be removed. All but the first guard on
+the map will be optimized away too, because the map cannot have changed in
+between. The optimized trace looks like this:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{c}{# inst.getattr("a")}
+\PY{n}{map1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{map}
+\PY{n}{guard}\PY{p}{(}\PY{n}{map1} \PY{o}{==} \PY{l+m+mh}{0xb74af4a8}\PY{p}{)}
+\PY{n}{storage1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{storage}
+\PY{n}{result1} \PY{o}{=} \PY{n}{storage1}\PY{p}{[}\PY{l+m+mi}{0}\PY{p}{]}
+
+\PY{c}{# inst.getattr("b")}
+\PY{n}{cls1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{cls}
+\PY{n}{methods1} \PY{o}{=} \PY{n}{cls1}\PY{o}{.}\PY{n}{methods}
+\PY{n}{result2} \PY{o}{=} \PY{n+nb}{dict}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{methods1}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{b}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{result2} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{)}
+\PY{n}{v2} \PY{o}{=} \PY{n}{result1} \PY{o}{+} \PY{n}{result2}
+
+\PY{c}{# inst.getattr("c")}
+\PY{n}{cls2} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{cls}
+\PY{n}{methods2} \PY{o}{=} \PY{n}{cls2}\PY{o}{.}\PY{n}{methods}
+\PY{n}{result3} \PY{o}{=} \PY{n+nb}{dict}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{methods2}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{c}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{result3} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{)}
+
+\PY{n}{v4} \PY{o}{=} \PY{n}{v2} \PY{o}{+} \PY{n}{result3}
+\PY{k}{return}\PY{p}{(}\PY{n}{v4}\PY{p}{)}
+\end{Verbatim}
+
+The index \texttt{0} that is used to read out of the \texttt{storage} array is the result
+of the constant-folded \texttt{getindex} call. This trace is already much better than
+the original one. Now we are down from five dictionary lookups to just two.
+
+
+%___________________________________________________________________________
+
+\subsection{Versioning of Classes}
+
+Instances were optimized making the assumption that the total number of
+Instance layouts is small compared to the number of instances. For classes we
+will make an even stronger assumption. We simply assume that it is rare for
+classes to change at all. This is not totally reasonable (sometimes classes contain
+counters or similar things) but for this simple example it is good enough.
+
+What we would really like is if the \texttt{Class.find\_method} method were pure.
+But it cannot be, because it is always possible to change the class itself.
+Every time the class changes, \texttt{find\_method} can potentially return a
+new value.
+
+Therefore, we give every class a version number, which is increased every time a
+class gets changed (i.e., the content of the \texttt{methods} dictionary changes).
+This means that the result of \texttt{methods.get()} for a given \texttt{(name,
+version)} pair will always be the same, i.e. it is a pure operation.  To help
+the JIT to detect this case, we factor it out in a helper method which is
+explicitly marked as \texttt{@purefunction}. The refactored \texttt{Class} looks like
+this:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{k}{class} \PY{n+nc}{VersionTag}\PY{p}{(}\PY{n+nb}{object}\PY{p}{)}\PY{p}{:}
+    \PY{k}{pass}
+
+\PY{k}{class} \PY{n+nc}{Class}\PY{p}{(}\PY{n+nb}{object}\PY{p}{)}\PY{p}{:}
+    \PY{k}{def} \PY{n+nf}{\PYZus{}\PYZus{}init\PYZus{}\PYZus{}}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{name} \PY{o}{=} \PY{n}{name}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{methods} \PY{o}{=} \PY{p}{\PYZob{}}\PY{p}{\PYZcb{}}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{version} \PY{o}{=} \PY{n}{VersionTag}\PY{p}{(}\PY{p}{)}
+
+    \PY{k}{def} \PY{n+nf}{find\PYZus{}method}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self} \PY{o}{=} \PY{n}{hint}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{promote}\PY{o}{=}\PY{n+nb+bp}{True}\PY{p}{)}
+        \PY{n}{version} \PY{o}{=} \PY{n}{hint}\PY{p}{(}\PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{version}\PY{p}{,} \PY{n}{promote}\PY{o}{=}\PY{n+nb+bp}{True}\PY{p}{)}
+        \PY{n}{result} \PY{o}{=} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{\PYZus{}find\PYZus{}method}\PY{p}{(}\PY{n}{name}\PY{p}{,} \PY{n}{version}\PY{p}{)}
+        \PY{k}{if} \PY{n}{result} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{:}
+            \PY{k}{return} \PY{n}{result}
+        \PY{k}{raise} \PY{n+ne}{AttributeError}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+
+    \PY{n+nd}{@purefunction}
+    \PY{k}{def} \PY{n+nf}{\PYZus{}find\PYZus{}method}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{,} \PY{n}{version}\PY{p}{)}\PY{p}{:}
+        \PY{k}{return} \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{methods}\PY{o}{.}\PY{n}{get}\PY{p}{(}\PY{n}{name}\PY{p}{)}
+
+    \PY{k}{def} \PY{n+nf}{change\PYZus{}method}\PY{p}{(}\PY{n+nb+bp}{self}\PY{p}{,} \PY{n}{name}\PY{p}{,} \PY{n}{value}\PY{p}{)}\PY{p}{:}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{methods}\PY{p}{[}\PY{n}{name}\PY{p}{]} \PY{o}{=} \PY{n}{value}
+        \PY{n+nb+bp}{self}\PY{o}{.}\PY{n}{version} \PY{o}{=} \PY{n}{VersionTag}\PY{p}{(}\PY{p}{)}
+\end{Verbatim}
+
+What is interesting here is that \texttt{\_find\_method} takes the \texttt{version}
+argument but it does not use it at all. Its only purpose is to make the call
+pure (because when the version number changes, the result of the call might be
+different than the previous one).
+
+The trace with this new class implementation looks like this:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{c}{# inst.getattr("a")}
+\PY{n}{map1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{map}
+\PY{n}{guard}\PY{p}{(}\PY{n}{map1} \PY{o}{==} \PY{l+m+mh}{0xb74af4a8}\PY{p}{)}
+\PY{n}{index1} \PY{o}{=} \PY{n}{Map}\PY{o}{.}\PY{n}{getindex}\PY{p}{(}\PY{n}{map1}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{a}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{index1} \PY{o}{!=} \PY{o}{-}\PY{l+m+mi}{1}\PY{p}{)}
+\PY{n}{storage1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{storage}
+\PY{n}{result1} \PY{o}{=} \PY{n}{storage1}\PY{p}{[}\PY{n}{index1}\PY{p}{]}
+
+\PY{c}{# inst.getattr("b")}
+\PY{n}{map2} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{map}
+\PY{n}{guard}\PY{p}{(}\PY{n}{map2} \PY{o}{==} \PY{l+m+mh}{0xb74af4a8}\PY{p}{)}
+\PY{n}{index2} \PY{o}{=} \PY{n}{Map}\PY{o}{.}\PY{n}{getindex}\PY{p}{(}\PY{n}{map2}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{b}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{index2} \PY{o}{==} \PY{o}{-}\PY{l+m+mi}{1}\PY{p}{)}
+\PY{n}{cls1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{cls}
+\PY{n}{guard}\PY{p}{(}\PY{n}{cls1} \PY{o}{==} \PY{l+m+mh}{0xb7aaaaf8}\PY{p}{)}
+\PY{n}{version1} \PY{o}{=} \PY{n}{cls1}\PY{o}{.}\PY{n}{version}
+\PY{n}{guard}\PY{p}{(}\PY{n}{version1} \PY{o}{==} \PY{l+m+mh}{0xb7bbbb18}\PY{p}{)}
+\PY{n}{result2} \PY{o}{=} \PY{n}{Class}\PY{o}{.}\PY{n}{\PYZus{}find\PYZus{}method}\PY{p}{(}\PY{n}{cls}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{b}\PY{l+s}{"}\PY{p}{,} \PY{n}{version1}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{result2} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{)}
+\PY{n}{v2} \PY{o}{=} \PY{n}{result1} \PY{o}{+} \PY{n}{result2}
+
+\PY{c}{# inst.getattr("c")}
+\PY{n}{map3} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{map}
+\PY{n}{guard}\PY{p}{(}\PY{n}{map3} \PY{o}{==} \PY{l+m+mh}{0xb74af4a8}\PY{p}{)}
+\PY{n}{index3} \PY{o}{=} \PY{n}{Map}\PY{o}{.}\PY{n}{getindex}\PY{p}{(}\PY{n}{map3}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{c}\PY{l+s}{"}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{index3} \PY{o}{==} \PY{o}{-}\PY{l+m+mi}{1}\PY{p}{)}
+\PY{n}{cls2} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{cls}
+\PY{n}{guard}\PY{p}{(}\PY{n}{cls2} \PY{o}{==} \PY{l+m+mh}{0xb7aaaaf8}\PY{p}{)}
+\PY{n}{version2} \PY{o}{=} \PY{n}{cls2}\PY{o}{.}\PY{n}{version}
+\PY{n}{guard}\PY{p}{(}\PY{n}{version2} \PY{o}{==} \PY{l+m+mh}{0xb7bbbb18}\PY{p}{)}
+\PY{n}{result3} \PY{o}{=} \PY{n}{Class}\PY{o}{.}\PY{n}{\PYZus{}find\PYZus{}method}\PY{p}{(}\PY{n}{cls}\PY{p}{,} \PY{l+s}{"}\PY{l+s}{c}\PY{l+s}{"}\PY{p}{,} \PY{n}{version2}\PY{p}{)}
+\PY{n}{guard}\PY{p}{(}\PY{n}{result3} \PY{o+ow}{is} \PY{o+ow}{not} \PY{n+nb+bp}{None}\PY{p}{)}
+
+\PY{n}{v4} \PY{o}{=} \PY{n}{v2} \PY{o}{+} \PY{n}{result3}
+\PY{k}{return}\PY{p}{(}\PY{n}{v4}\PY{p}{)}
+\end{Verbatim}
+
+The calls to \texttt{Class.\_find\_method} can now be optimized away, also the
+promotion of the class and the version, except for the first one. The final
+optimized trace looks like this:
+\begin{Verbatim}[commandchars=\\\{\}]
+\PY{c}{# inst.getattr("a")}
+\PY{n}{map1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{map}
+\PY{n}{guard}\PY{p}{(}\PY{n}{map1} \PY{o}{==} \PY{l+m+mh}{0xb74af4a8}\PY{p}{)}
+\PY{n}{storage1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{storage}
+\PY{n}{result1} \PY{o}{=} \PY{n}{storage1}\PY{p}{[}\PY{l+m+mi}{0}\PY{p}{]}
+
+\PY{c}{# inst.getattr("b")}
+\PY{n}{cls1} \PY{o}{=} \PY{n}{inst}\PY{o}{.}\PY{n}{cls}
+\PY{n}{guard}\PY{p}{(}\PY{n}{cls1} \PY{o}{==} \PY{l+m+mh}{0xb7aaaaf8}\PY{p}{)}
+\PY{n}{version1} \PY{o}{=} \PY{n}{cls1}\PY{o}{.}\PY{n}{version}
+\PY{n}{guard}\PY{p}{(}\PY{n}{version1} \PY{o}{==} \PY{l+m+mh}{0xb7bbbb18}\PY{p}{)}
+\PY{n}{v2} \PY{o}{=} \PY{n}{result1} \PY{o}{+} \PY{l+m+mi}{41}
+
+\PY{c}{# inst.getattr("c")}
+\PY{n}{v4} \PY{o}{=} \PY{n}{v2} \PY{o}{+} \PY{l+m+mi}{17}
+\PY{k}{return}\PY{p}{(}\PY{n}{v4}\PY{p}{)}
+\end{Verbatim}
+
+The constants \texttt{41} and \texttt{17} are the results of the folding of the
+\texttt{\_find\_method`} calls. This final trace is now very good. It no longer performs any
+dictionary lookups. Instead it contains several guards. The first guard
+checks that the map is still the same. This guard will fail if the same
+code is executed with an instance that has another layout. The second guard
+checks that the class of \texttt{inst} is still the same. It will fail if trace is
+executed with an instance of another class. The third guard checks that the
+class did not change since the trace was produced. It will fail if somebody
+calls the \texttt{change\_method} method on the class.
+
+
+%___________________________________________________________________________
+
+\subsection{Real-World Considerations}
+
+The techniques used above for the simple object model are used for the object
+model of PyPy's Python interpreter too. Since Python's object model is
+considerably more complex, some additional work needs to be done.
+
+The first problem that needs to be solved is that Python supports (multiple)
+inheritance. Therefore looking up a method in a class needs to consider the
+whole method resolution order. This makes the versioning of classes more
+complex. If a class is changed its version changes. At the same time, the
+versions of all the classes inheriting from it need to be changed as well,
+recursively. This makes class changes expensive, but they should be rare.  On the
+other hand, a method lookup in a complex class hierarchy is as optimized in the
+trace as in our object model here.
+
+A downside of the versioning of classes that we haven't yet fixed in PyPy, is
+that some classes \emph{do} change a lot. An example would be a class that keeps a
+counter of how many instances have been created so far. This is very slow right
+now, but we have ideas about how to fix it in the future.
+
+Another optimization is that in practice the shape of an instance is correlated
+with its class. In our code above, we allow both to vary independently.
+In PyPy's Python interpreter we act somewhat more cleverly. The class of
+an instance is not stored on the instance itself, but on the map. This means
+that we get one fewer promotion (and thus one fewer guard) in the trace, because the class doesn't need to
+be promoted after the map has been.
+
+
+%___________________________________________________________________________
+
+\subsection{More General Patterns}
+
+The techniques we used above to make instance and class lookups faster are
+applicable in more general cases than the one we developed them for. A more
+abstract view of maps is that of splitting a data-structure into a part that
+changes slowly, and a part that changes quickly. In the concrete example of maps
+we split the original dictionary into the map (the slow-changing part) and the
+storage array (the quick-changing part). All the computation on the
+slow-changing part can be constant-folded during tracing so that only the
+manipulation of the quick-changing part remains.
+
+Similarly, versions can be used to constant-fold arbitrary functions of large data
+structures. The version needs to be updated carefully every time the result of
+this function can change. Therefore this is useful only if the data structure is
+expected to change slowly.
+
+
+%___________________________________________________________________________
+
+\subsection{Conclusion}
+
+In this post I showed how to use \texttt{purefunction} and \texttt{promote} to make a
+small but still relevant dynamic object model no longer use any dictionary lookups
+after tracing. Instead a number of guards are inserted into the
+trace to check whether the assumptions about the objects are still true. This
+makes operations on objects seriously faster. I plan to write another small post
+that shows the speed benefits for PyPy's Python interpreter for exactly these
+operations.
+
+\section{Evaluation}
+\label{sect:evaluation}
+
+\section{Related Work}
+
+\section{Conclusion and Next Steps}
+
+\section*{Acknowledgements}
+
+\bibliographystyle{abbrv}
+\bibliography{paper}
+
+\end{document}

diff --git a/talk/icooolps2011/figures/trace-levels.svg b/talk/icooolps2011/figures/trace-levels.svg
new file mode 100644
--- /dev/null
+++ b/talk/icooolps2011/figures/trace-levels.svg
@@ -0,0 +1,849 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="858.59668"
+   height="514.20831"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.0 r9654"
+   sodipodi:docname="trace-levels.svg"
+   inkscape:export-filename="/home/cfbolz/code/hguserdir/blog/figures/trace-levels.png"
+   inkscape:export-xdpi="90.25"
+   inkscape:export-ydpi="90.25">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mend"
+       style="overflow:visible">
+      <path
+         id="path4622"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.4,0,0,-0.4,-4,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend"
+       style="overflow:visible">
+      <path
+         id="path4167"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend-9"
+       style="overflow:visible">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4167-8"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend-3"
+       style="overflow:visible">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4167-2"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend-96"
+       style="overflow:visible">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4167-1"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend-7"
+       style="overflow:visible">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4167-15"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend-36"
+       style="overflow:visible">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4167-0"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend-2"
+       style="overflow:visible">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4167-6"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend-28"
+       style="overflow:visible">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4167-5"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend-6"
+       style="overflow:visible">
+      <path
+         id="path4167-01"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend-77"
+       style="overflow:visible">
+      <path
+         id="path4167-4"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend-4"
+       style="overflow:visible">
+      <path
+         id="path4167-69"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mend-2"
+       style="overflow:visible">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4622-2"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.4,0,0,-0.4,-4,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mend-3"
+       style="overflow:visible">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4622-5"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.4,0,0,-0.4,-4,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mend-9"
+       style="overflow:visible">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4622-57"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.4,0,0,-0.4,-4,0)" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.98994949"
+     inkscape:cx="295.82388"
+     inkscape:cy="217.02929"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1170"
+     inkscape:window-x="0"
+     inkscape:window-y="1"
+     inkscape:window-maximized="1"
+     showguides="true"
+     fit-margin-left="2"
+     fit-margin-top="2"
+     fit-margin-right="2"
+     fit-margin-bottom="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-9.4277382,-314.88983)">
+    <g
+       id="g3032"
+       transform="translate(12.121831,307.08637)">
+      <rect
+         y="457.22968"
+         x="0.85749745"
+         height="62.934772"
+         width="512.45264"
+         id="rect2985"
+         style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.69468975;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+      <text
+         sodipodi:linespacing="125%"
+         id="text2987"
+         y="484.81891"
+         x="15.172592"
+         style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+         xml:space="preserve"><tspan
+           y="484.81891"
+           x="15.172592"
+           id="tspan2989"
+           sodipodi:role="line">CPU</tspan></text>
+    </g>
+    <g
+       transform="translate(12.121831,85.086374)"
+       id="g3032-3">
+      <rect
+         y="457.22968"
+         x="0.85749745"
+         height="211.02032"
+         width="512.45264"
+         id="rect2985-3"
+         style="color:#000000;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3.10318041;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+      <text
+         sodipodi:linespacing="125%"
+         id="text2987-5"
+         y="484.81891"
+         x="15.172592"
+         style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+         xml:space="preserve"><tspan
+           y="484.81891"
+           x="15.172592"
+           id="tspan2989-0"
+           sodipodi:role="line">Python Interpreter in RPython</tspan></text>
+      <rect
+         y="235.22968"
+         x="0.85749745"
+         height="211.02032"
+         width="512.45264"
+         id="rect2985-3-6"
+         style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3.10318041;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+      <text
+         sodipodi:linespacing="125%"
+         id="text2987-5-1"
+         y="262.81891"
+         x="15.172592"
+         style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+         xml:space="preserve"><tspan
+           y="262.81891"
+           x="15.172592"
+           id="tspan2989-0-0"
+           sodipodi:role="line">User Program in Python</tspan></text>
+      <g
+         id="g3206-5"
+         transform="translate(-17.714285,-251.42857)">
+        <rect
+           y="547.28589"
+           x="52.022858"
+           height="77.071976"
+           width="78.920738"
+           id="rect3101-96"
+           style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.70633686;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+        <text
+           xml:space="preserve"
+           style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+           x="56.548615"
+           y="562.09229"
+           id="text2987-5-6-6"
+           sodipodi:linespacing="125%"><tspan
+             sodipodi:role="line"
+             id="tspan2989-0-4-1"
+             x="56.548615"
+             y="562.09229">f1</tspan></text>
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:url(#Arrow1Lend-4);marker-end:url(#Arrow1Lend-4)"
+           d="m 93.302412,573.98129 c 27.779198,0 27.923368,33.26568 -0.02234,33.25279 -27.945707,-0.0129 -27.756856,-33.25279 0.02234,-33.25279 z"
+           id="path3211-7"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="zzz" />
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:none;marker-end:url(#Arrow1Lend-4)"
+           d="m 825.92276,991.18236 c 44.19418,0 45.7002,-117.67517 45.11448,-235.17874 -0.58573,-117.50357 -0.88909,-188.20986 -41.1259,-250.34069"
+           id="path3211-7-4"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="czc" />
+      </g>
+      <g
+         id="g3206-5-5"
+         transform="translate(110.28571,-269.42857)">
+        <rect
+           y="547.28589"
+           x="52.022858"
+           height="77.071976"
+           width="78.920738"
+           id="rect3101-96-4"
+           style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.70633686;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:url(#Arrow1Lend)"
+           d="m 93.302412,573.98129 c 27.779198,0 27.923368,33.26568 -0.02234,33.25279 -27.945707,-0.0129 -27.756856,-33.25279 0.02234,-33.25279 z"
+           id="path3211-7-8"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="zzz" />
+        <text
+           xml:space="preserve"
+           style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+           x="56.548615"
+           y="562.09229"
+           id="text2987-5-6-6-0"
+           sodipodi:linespacing="125%"><tspan
+             sodipodi:role="line"
+             id="tspan2989-0-4-1-4"
+             x="56.548615"
+             y="562.09229">f2</tspan></text>
+      </g>
+      <g
+         id="g3206-5-5-6"
+         transform="translate(220.28571,-279.42857)">
+        <rect
+           y="546.90326"
+           x="51.640251"
+           height="39.70393"
+           width="46.603455"
+           id="rect3101-96-4-6"
+           style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.94112384;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+        <text
+           xml:space="preserve"
+           style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+           x="56.548615"
+           y="562.09229"
+           id="text2987-5-6-6-0-3"
+           sodipodi:linespacing="125%"><tspan
+             sodipodi:role="line"
+             id="tspan2989-0-4-1-4-7"
+             x="56.548615"
+             y="562.09229">f3</tspan></text>
+      </g>
+      <g
+         id="g3206-5-5-6-6"
+         transform="translate(220.28571,-217.42861)">
+        <rect
+           y="546.90326"
+           x="51.640251"
+           height="39.70393"
+           width="46.603455"
+           id="rect3101-96-4-6-6"
+           style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.94112384;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+        <text
+           xml:space="preserve"
+           style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+           x="56.548615"
+           y="562.09229"
+           id="text2987-5-6-6-0-3-5"
+           sodipodi:linespacing="125%"><tspan
+             sodipodi:role="line"
+             id="tspan2989-0-4-1-4-7-9"
+             x="56.548615"
+             y="562.09229">f4</tspan></text>
+      </g>
+      <g
+         id="g3206-5-5-9"
+         transform="translate(316.28571,-251.42857)">
+        <rect
+           y="547.28589"
+           x="52.022858"
+           height="77.071976"
+           width="78.920738"
+           id="rect3101-96-4-1"
+           style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.70633686;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:url(#Arrow1Lend)"
+           d="m 93.302412,573.98129 c 27.779198,0 27.923368,33.26568 -0.02234,33.25279 -27.945707,-0.0129 -27.756856,-33.25279 0.02234,-33.25279 z"
+           id="path3211-7-8-3"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="zzz" />
+        <text
+           xml:space="preserve"
+           style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+           x="56.548615"
+           y="562.09229"
+           id="text2987-5-6-6-0-1"
+           sodipodi:linespacing="125%"><tspan
+             sodipodi:role="line"
+             id="tspan2989-0-4-1-4-4"
+             x="56.548615"
+             y="562.09229">g</tspan></text>
+      </g>
+    </g>
+    <g
+       id="g4605"
+       transform="translate(4.1414692e-7,323.24881)">
+      <g
+         transform="translate(-22,-266)"
+         id="g3206">
+        <rect
+           style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           id="rect3101"
+           width="92.428955"
+           height="90.408653"
+           x="52.022858"
+           y="547.28589" />
+        <text
+           sodipodi:linespacing="125%"
+           id="text2987-5-6"
+           y="562.09229"
+           x="56.548615"
+           style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+           xml:space="preserve"><tspan
+             y="562.09229"
+             x="56.548615"
+             id="tspan2989-0-4"
+             sodipodi:role="line">main_loop</tspan></text>
+      </g>
+      <path
+         sodipodi:nodetypes="zzz"
+         inkscape:connector-curvature="0"
+         id="path3211"
+         d="m 72.730983,317.98129 c 27.779197,0 27.923367,33.26568 -0.02234,33.25279 -27.945707,-0.0129 -27.756856,-33.25279 0.02234,-33.25279 z"
+         style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:url(#Arrow1Lend)" />
+    </g>
+    <g
+       transform="translate(357.39594,274.7615)"
+       id="g4605-6">
+      <g
+         transform="translate(-22,-266)"
+         id="g3206-8">
+        <rect
+           style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:2.27070475;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           id="rect3101-6"
+           width="119.14324"
+           height="90.408653"
+           x="52.022858"
+           y="547.28589" />
+        <text
+           sodipodi:linespacing="125%"
+           id="text2987-5-6-9"
+           y="562.09229"
+           x="56.548615"
+           style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+           xml:space="preserve"><tspan
+             y="562.09229"
+             x="56.548615"
+             id="tspan2989-0-4-7"
+             sodipodi:role="line">string_concat</tspan></text>
+      </g>
+      <path
+         sodipodi:nodetypes="zzz"
+         inkscape:connector-curvature="0"
+         id="path3211-2"
+         d="m 60.730983,317.98129 c 27.779197,0 27.923367,33.26568 -0.02234,33.25279 -27.945707,-0.0129 -27.756856,-33.25279 0.02234,-33.25279 z"
+         style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:url(#Arrow1Lend)" />
+      <path
+         sodipodi:nodetypes="zzz"
+         inkscape:connector-curvature="0"
+         id="path3211-2-4"
+         d="m 110.73094,317.98129 c 27.7792,0 27.92337,33.26568 -0.0223,33.25279 -27.945696,-0.0129 -27.756846,-33.25279 0.0223,-33.25279 z"
+         style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:url(#Arrow1Lend)" />
+    </g>
+    <g
+       transform="translate(145.69796,302.03561)"
+       id="g4605-0">
+      <rect
+         y="281.28589"
+         x="6.0228596"
+         height="46.018757"
+         width="103.17617"
+         id="rect3101-9"
+         style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.50757229;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+      <text
+         xml:space="preserve"
+         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         x="10.548616"
+         y="296.09229"
+         id="text2987-5-6-92"
+         sodipodi:linespacing="125%"><tspan
+           sodipodi:role="line"
+           id="tspan2989-0-4-3"
+           x="10.548616"
+           y="296.09229">BUILD_TUPLE</tspan></text>
+    </g>
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot5062"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"><flowRegion
+         id="flowRegion5064"><rect
+           id="rect5066"
+           width="839.43677"
+           height="705.08649"
+           x="-127.27922"
+           y="-361.01239" /></flowRegion><flowPara
+         id="flowPara5068" /></flowRoot>    <g
+       transform="translate(112.27917,112.30214)"
+       id="g3206-86-2">
+      <rect
+         style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.69065166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+         id="rect3101-9-6"
+         width="92.428955"
+         height="64.603836"
+         x="52.022858"
+         y="547.28589" />
+      <text
+         sodipodi:linespacing="125%"
+         id="text2987-5-6-92-4"
+         y="562.09229"
+         x="56.548615"
+         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         xml:space="preserve"><tspan
+           y="562.09229"
+           x="56.548615"
+           id="tspan2989-0-4-3-7"
+           sodipodi:role="line">popvalues</tspan></text>
+      <path
+         sodipodi:nodetypes="zzz"
+         inkscape:connector-curvature="0"
+         id="path3211-0"
+         d="m 96.328504,569.87702 c 27.779196,0 27.923366,33.26568 -0.0223,33.25279 -27.945697,-0.0129 -27.756847,-33.25279 0.0223,-33.25279 z"
+         style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:url(#Arrow1Lend)" />
+    </g>
+    <g
+       transform="translate(355.35921,391.56873)"
+       id="g4605-0-4">
+      <rect
+         y="281.28589"
+         x="6.0228596"
+         height="59.083008"
+         width="134.79616"
+         id="rect3101-9-2"
+         style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.9525001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+      <text
+         xml:space="preserve"
+         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         x="10.548616"
+         y="296.09229"
+         id="text2987-5-6-92-9"
+         sodipodi:linespacing="125%"><tspan
+           sodipodi:role="line"
+           id="tspan2989-0-4-3-6"
+           x="10.548616"
+           y="296.09229">import_helper1</tspan></text>
+    </g>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Mend)"
+       d="m 122.73353,314.77965 28.78935,-9.09137"
+       id="path3178"
+       inkscape:connector-curvature="0"
+       transform="translate(0,308.2677)" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Mend)"
+       d="m 200.51528,322.35579 0,28.78935"
+       id="path3180"
+       inkscape:connector-curvature="0"
+       transform="translate(0,308.2677)" />
+    <rect
+       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect3078"
+       width="129.29953"
+       height="487.81381"
+       x="691.7019"
+       y="338.18433" />
+    <text
+       sodipodi:linespacing="125%"
+       id="text2987-5-1-7"
+       y="332.08514"
+       x="694.76465"
+       style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+       xml:space="preserve"><tspan
+         y="332.08514"
+         x="694.76465"
+         id="tspan2989-0-0-2"
+         sodipodi:role="line">Trace for f1</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Mend)"
+       d="m 351.50353,603.71915 33.25364,-8.9128"
+       id="path3178-1"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Mend)"
+       d="m 332.39639,687.64772 26.46792,10.73006"
+       id="path3178-6"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="316.96429"
+       y="312.48734"
+       id="text4614"
+       sodipodi:linespacing="125%"
+       transform="translate(0,308.2677)"><tspan
+         sodipodi:role="line"
+         id="tspan4616"
+         x="316.96429"
+         y="312.48734" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="305.89285"
+       y="315.16592"
+       id="text4618"
+       sodipodi:linespacing="125%"
+       transform="translate(0,308.2677)"><tspan
+         sodipodi:role="line"
+         id="tspan4620"
+         x="305.89285"
+         y="315.16592" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+       x="311.78571"
+       y="318.38019"
+       id="text4622"
+       sodipodi:linespacing="125%"
+       transform="translate(0,308.2677)"><tspan
+         sodipodi:role="line"
+         id="tspan4624"
+         x="311.78571"
+         y="318.38019" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+       x="331.25"
+       y="604.68359"
+       id="text4626"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan4628"
+         x="331.25"
+         y="604.68359"
+         style="font-size:14px">...</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+       x="313.32471"
+       y="688.23035"
+       id="text4626-3"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan4628-6"
+         x="313.32471"
+         y="688.23035"
+         style="font-size:14px">...</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Mend)"
+       d="m 83.536404,696.54687 26.467916,10.73006"
+       id="path3178-6-4"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+       x="108.75043"
+       y="715.70093"
+       id="text4626-3-6"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan4628-6-4"
+         x="108.75043"
+         y="715.70093"
+         style="font-size:14px">...</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1.92068112px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-4)"
+       d="m 564.7476,646.4231 87.94523,0"
+       id="path4681"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot4893"
+       style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+       transform="translate(0,308.2677)"><flowRegion
+         id="flowRegion4895"><rect
+           id="rect4897"
+           width="112.85714"
+           height="475.71429"
+           x="697.14288"
+           y="36.237335"
+           style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono" /></flowRegion><flowPara
+         id="flowPara4899"></flowPara></flowRoot>    <flowRoot
+       xml:space="preserve"
+       id="flowRoot4901"
+       style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+       transform="translate(0,308.2677)"><flowRegion
+         id="flowRegion4903"><rect
+           id="rect4905"
+           width="117.14286"
+           height="477.14285"
+           x="695.71429"
+           y="36.237335"
+           style="font-size:14px" /></flowRegion><flowPara
+         id="flowPara4907"></flowPara></flowRoot>    <flowRoot
+       xml:space="preserve"
+       id="flowRoot4909"
+       style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+       transform="translate(0,308.2677)"><flowRegion
+         id="flowRegion4911"><rect
+           id="rect4913"
+           width="123.57162"
+           height="474.28592"
+           x="696.42853"
+           y="33.380196"
+           style="font-size:14px"
+           ry="0" /></flowRegion><flowPara
+         id="flowPara4919"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono">ops from main_loop</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4921" /><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4923">...</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4925" /><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4927">more ops from</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara6940">main_loop</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4933" /><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4935">...</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4937" /><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4939">ops from</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4941">BUILD_TUPLE</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4949">ops from</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4957">popvalues</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4961" /><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4971">residual call </flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara6962"></flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara6968">...</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara6964" /><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara6966" /><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara6958">even more ops</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4973">from</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4975">main_loop</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4977" /><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4979">...</flowPara><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4985" /><flowPara
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+         id="flowPara4987">jump to start</flowPara></flowRoot>    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+       x="279.19788"
+       y="648.15918"
+       id="text4626-3-0"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan4628-6-5"
+         x="279.19788"
+         y="648.15918"
+         style="font-size:14px">...</tspan></text>
+  </g>
+</svg>

diff --git a/talk/icooolps2011/Makefile b/talk/icooolps2011/Makefile
new file mode 100644
--- /dev/null
+++ b/talk/icooolps2011/Makefile
@@ -0,0 +1,13 @@
+
+jit-hints.pdf: paper.tex paper.bib
+	pdflatex paper
+	bibtex paper
+	pdflatex paper
+	pdflatex paper
+	mv paper.pdf jit-hints.pdf
+
+view: jit-hints.pdf
+	evince jit-hints.pdf &
+
+xpdf: jit-hints.pdf
+	xpdf jit-hints.pdf &

diff --git a/talk/icooolps2011/sig-alternate.cls b/talk/icooolps2011/sig-alternate.cls
new file mode 100644
--- /dev/null
+++ b/talk/icooolps2011/sig-alternate.cls
@@ -0,0 +1,1603 @@
+% SIG-ALTERNATE.CLS - VERSION 2.3
+% "COMPATIBLE" WITH THE "ACM_PROC_ARTICLE-SP.CLS" V3.1SP
+% Gerald Murray June 7th. 2007
+%
+% ---- Start of 'updates'  ----
+%
+% To produce Type 1 fonts in the document plus allow for 'normal LaTeX accenting' in the critical areas;
+% title, author block, section-heads, confname, etc. etc. 
+% i.e. the whole purpose of this version update is to NOT resort to 'inelegant accent patches'.
+% After much research, three extra .sty packages were added to the the tail (ae, aecompl, aeguill) to solve,
+% in particular, the accenting problem(s). We _could_ ask authors (via instructions/sample file) to 'include' these in
+% the source .tex file - in the preamble - but if everything is already provided ('behind the scenes' - embedded IN the .cls)
+% then this is less work for authors and also makes everything appear 'vanilla'.
+% NOTE: all 'patchwork accenting" has been commented out (here) and is no longer 'used' in the sample .tex file (either).
+% Gerry June 2007
+%
+% Patch for accenting in conference name/location. Gerry May 3rd. 2007
+% Rule widths changed to .5, author count (>6) fixed, roll-back for Type 3 problem. Gerry March 20th. 2007
+% Changes made to 'modernize' the fontnames but esp. for MikTeX users V2.4/2.5 - Nov. 30th. 2006
+% Updated the \email definition to allow for its use inside of 'shared affiliations' - Nov. 30th. 2006
+% Fixed the 'section number depth value' - Nov. 30th. 2006
+%
+% Footnotes inside table cells using \minipage (Oct. 2002)
+% Georgia fixed bug in sub-sub-section numbering in paragraphs (July 29th. 2002)
+% JS/GM fix to vertical spacing before Proofs (July 30th. 2002)
+%
+% Made the Permission Statement / Conference Info / Copyright Info
+% 'user definable' in the source .tex file OR automatic if
+% not specified.
+%
+% Allowance made to switch default fonts between those systems using
+% normal/modern font names and those using 'Type 1' or 'Truetype' fonts.
+% See LINE NUMBER 255 for details.
+% Also provided for enumerated/annotated Corollaries 'surrounded' by
+% enumerated Theorems (line 848).
+% Gerry November 11th. 1999
+%
+% ---- End of 'updates' ----
+%
+\def\fileversion{v2.3}          % for ACM's tracking purposes
+\def\filedate{June 7, 2007}    % Gerry Murray's tracking data
+\def\docdate {Thursday 7th. June 2007} % Gerry Murray (with deltas to doc}
+\usepackage{epsfig}
+\usepackage{amssymb}
+\usepackage{amsmath}
+\usepackage{amsfonts}
+% Need this for accents in Arial/Helvetica
+%\usepackage[T1]{fontenc}  % Gerry March 12, 2007 - causes Type 3 problems (body text)
+%\usepackage{textcomp}
+%
+% SIG-ALTERNATE DOCUMENT STYLE
+% G.K.M. Tobin August-October 1999
+%    adapted from ARTICLE document style by Ken Traub, Olin Shivers
+%    also using elements of esub2acm.cls
+% HEAVILY MODIFIED, SUBSEQUENTLY, BY GERRY MURRAY 2000
+% ARTICLE DOCUMENT STYLE -- Released 16 March 1988
+%    for LaTeX version 2.09
+% Copyright (C) 1988 by Leslie Lamport
+%
+%
+%%% sig-alternate.cls is an 'ALTERNATE' document style for producing
+%%% two-column camera-ready pages for ACM conferences.
+%%% THIS FILE DOES NOT STRICTLY ADHERE TO THE SIGS (BOARD-ENDORSED)
+%%% PROCEEDINGS STYLE. It has been designed to produce a 'tighter'
+%%% paper in response to concerns over page budgets.
+%%% The main features of this style are:
+%%%
+%%% 1)  Two columns.
+%%% 2)  Side and top margins of 4.5pc, bottom margin of 6pc, column gutter of
+%%%     2pc, hence columns are 20pc wide and 55.5pc tall.  (6pc =3D 1in, approx)
+%%% 3)  First page has title information, and an extra 6pc of space at the
+%%%     bottom of the first column for the ACM copyright notice.
+%%% 4)  Text is 9pt on 10pt baselines; titles (except main) are 9pt bold.
+%%%
+%%%
+%%% There are a few restrictions you must observe:
+%%%
+%%% 1)  You cannot change the font size; ACM wants you to use 9pt.
+%%% 3)  You must start your paper with the \maketitle command.  Prior to the
+%%%     \maketitle you must have \title and \author commands.  If you have a
+%%%     \date command it will be ignored; no date appears on the paper, since
+%%%     the proceedings will have a date on the front cover.
+%%% 4)  Marginal paragraphs, tables of contents, lists of figures and tables,
+%%%     and page headings are all forbidden.
+%%% 5)  The `figure' environment will produce a figure one column wide; if you
+%%%     want one that is two columns wide, use `figure*'.
+%%%
+%
+%%% Copyright Space:
+%%% This style automatically reserves 1" blank space at the bottom of page 1/
+%%% column 1.  This space can optionally be filled with some text using the
+%%% \toappear{...} command.  If used, this command must be BEFORE the \maketitle
+%%% command.  If this command is defined AND [preprint] is on, then the
+%%% space is filled with the {...} text (at the bottom); otherwise, it is
+%%% blank.  If you use \toappearbox{...} instead of \toappear{...} then a
+%%% box will be drawn around the text (if [preprint] is on).
+%%%
+%%% A typical usage looks like this:
+%%%     \toappear{To appear in the Ninth AES Conference on Medievil Lithuanian
+%%%               Embalming Technique, June 1991, Alfaretta, Georgia.}
+%%% This will be included in the preprint, and left out of the conference
+%%% version.
+%%%
+%%% WARNING:
+%%% Some dvi-ps converters heuristically allow chars to drift from their
+%%% true positions a few pixels. This may be noticeable with the 9pt sans-serif
+%%% bold font used for section headers.
+%%% You may turn this hackery off via the -e option:
+%%%     dvips -e 0 foo.dvi >foo.ps
+%%%
+\typeout{Document Class 'sig-alternate' <7th. June '07>.  Modified by G.K.M. Tobin/Gerry Murray}
+\typeout{Based in part upon document Style `acmconf' <22 May 89>. Hacked 4/91 by}
+\typeout{shivers at cs.cmu.edu, 4/93 by theobald at cs.mcgill.ca}
+\typeout{Excerpts were taken from (Journal Style) 'esub2acm.cls'.}
+\typeout{****** Bugs/comments/suggestions/technicalities to Gerry Murray -- murray at hq.acm.org ******}
+\typeout{Questions on the style, SIGS policies, etc. to Adrienne Griscti griscti at acm.org}
+\oddsidemargin 4.5pc
+\evensidemargin 4.5pc
+\advance\oddsidemargin by -1in  % Correct for LaTeX gratuitousness
+\advance\evensidemargin by -1in % Correct for LaTeX gratuitousness
+\marginparwidth 0pt             % Margin pars are not allowed.
+\marginparsep 11pt              % Horizontal space between outer margin and
+                                % marginal note
+
+                                % Top of page:
+\topmargin 4.5pc                % Nominal distance from top of page to top of
+                                % box containing running head.
+\advance\topmargin by -1in      % Correct for LaTeX gratuitousness
+\headheight 0pt                 % Height of box containing running head.
+\headsep 0pt                    % Space between running head and text.
+                                % Bottom of page:
+\footskip 30pt                  % Distance from baseline of box containing foot
+                                % to baseline of last line of text.
+\@ifundefined{footheight}{\newdimen\footheight}{}% this is for LaTeX2e
+\footheight 12pt                % Height of box containing running foot.
+
+%% Must redefine the top margin so there's room for headers and
+%% page numbers if you are using the preprint option. Footers
+%% are OK as is. Olin.
+\advance\topmargin by -37pt     % Leave 37pt above text for headers
+\headheight 12pt                % Height of box containing running head.
+\headsep 25pt                   % Space between running head and text.
+
+\textheight 666pt       % 9 1/4 column height
+\textwidth 42pc         % Width of text line.
+                        % For two-column mode:
+\columnsep 2pc          %    Space between columns
+\columnseprule 0pt      %    Width of rule between columns.
+\hfuzz 1pt              % Allow some variation in column width, otherwise it's
+                        % too hard to typeset in narrow columns.
+
+\footnotesep 5.6pt      % Height of strut placed at the beginning of every
+                        % footnote =3D height of normal \footnotesize strut,
+                        % so no extra space between footnotes.
+
+\skip\footins 8.1pt plus 4pt minus 2pt  % Space between last line of text and
+                                        % top of first footnote.
+\floatsep 11pt plus 2pt minus 2pt       % Space between adjacent floats moved
+                                        % to top or bottom of text page.
+\textfloatsep 18pt plus 2pt minus 4pt   % Space between main text and floats
+                                        % at top or bottom of page.
+\intextsep 11pt plus 2pt minus 2pt      % Space between in-text figures and
+                                        % text.
+\@ifundefined{@maxsep}{\newdimen\@maxsep}{}% this is for LaTeX2e
+\@maxsep 18pt                           % The maximum of \floatsep,
+                                        % \textfloatsep and \intextsep (minus
+                                        % the stretch and shrink).
+\dblfloatsep 11pt plus 2pt minus 2pt    % Same as \floatsep for double-column
+                                        % figures in two-column mode.
+\dbltextfloatsep 18pt plus 2pt minus 4pt% \textfloatsep for double-column
+                                        % floats.
+\@ifundefined{@dblmaxsep}{\newdimen\@dblmaxsep}{}% this is for LaTeX2e
+\@dblmaxsep 18pt                        % The maximum of \dblfloatsep and
+                                        % \dbltexfloatsep.
+\@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be
+                         % 0pt plus ...)
+\@fpsep 8pt plus 2fil    % Space between floats on float page/column.
+\@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be
+                         % 0pt plus ... )
+\@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
+\@dblfpsep 8pt plus 2fil % Space between floats on float page.
+\@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be
+                         % 0pt plus ... )
+\marginparpush 5pt       % Minimum vertical separation between two marginal
+                         % notes.
+
+\parskip 0pt plus 1pt            % Extra vertical space between paragraphs.
+\parindent 9pt  % GM July 2000 / was 0pt - width of paragraph indentation.
+\partopsep 2pt plus 1pt minus 1pt% Extra vertical space, in addition to
+                                 % \parskip and \topsep, added when user
+                                 % leaves blank line before environment.
+
+\@lowpenalty   51       % Produced by \nopagebreak[1] or \nolinebreak[1]
+\@medpenalty  151       % Produced by \nopagebreak[2] or \nolinebreak[2]
+\@highpenalty 301       % Produced by \nopagebreak[3] or \nolinebreak[3]
+
+\@beginparpenalty -\@lowpenalty % Before a list or paragraph environment.
+\@endparpenalty   -\@lowpenalty % After a list or paragraph environment.
+\@itempenalty     -\@lowpenalty % Between list items.
+
+\@namedef{ds at 10pt}{\@latexerr{The `10pt' option is not allowed in the `acmconf'
+  document style.}\@eha}
+\@namedef{ds at 11pt}{\@latexerr{The `11pt' option is not allowed in the `acmconf'
+  document style.}\@eha}
+\@namedef{ds at 12pt}{\@latexerr{The `12pt' option is not allowed in the `acmconf'
+  document style.}\@eha}
+
+\@options
+
+\lineskip 2pt           % \lineskip is 1pt for all font sizes.
+\normallineskip 2pt
+\def\baselinestretch{1}
+
+\abovedisplayskip 9pt plus2pt minus4.5pt%
+\belowdisplayskip \abovedisplayskip
+\abovedisplayshortskip  \z@ plus3pt%
+\belowdisplayshortskip  5.4pt plus3pt minus3pt%
+\let\@listi\@listI     % Setting of \@listi added 9 Jun 87
+
+\def\small{\@setsize\small{9pt}\viiipt\@viiipt
+\abovedisplayskip 7.6pt plus 3pt minus 4pt%
+\belowdisplayskip \abovedisplayskip
+\abovedisplayshortskip \z@ plus2pt%
+\belowdisplayshortskip 3.6pt plus2pt minus 2pt
+\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
+\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
+\itemsep \parsep}}
+
+\def\footnotesize{\@setsize\footnotesize{9pt}\ixpt\@ixpt
+\abovedisplayskip 6.4pt plus 2pt minus 4pt%
+\belowdisplayskip \abovedisplayskip
+\abovedisplayshortskip \z@ plus 1pt%
+\belowdisplayshortskip 2.7pt plus 1pt minus 2pt
+\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
+\topsep 3pt plus 1pt minus 1pt\parsep 2pt plus 1pt minus 1pt
+\itemsep \parsep}}
+
+\newcount\aucount
+\newcount\originalaucount
+\newdimen\auwidth
+\auwidth=\textwidth
+\newdimen\auskip
+\newcount\auskipcount
+\newdimen\auskip
+\global\auskip=1pc
+\newdimen\allauboxes
+\allauboxes=\auwidth
+\newtoks\addauthors
+\newcount\addauflag
+\global\addauflag=0 %Haven't shown additional authors yet
+
+\newtoks\subtitletext
+\gdef\subtitle#1{\subtitletext={#1}}
+
+\gdef\additionalauthors#1{\addauthors={#1}}
+
+\gdef\numberofauthors#1{\global\aucount=#1
+\ifnum\aucount>3\global\originalaucount=\aucount \global\aucount=3\fi %g}  % 3 OK - Gerry March 2007
+\global\auskipcount=\aucount\global\advance\auskipcount by 1
+\global\multiply\auskipcount by 2
+\global\multiply\auskip by \auskipcount
+\global\advance\auwidth by -\auskip
+\global\divide\auwidth by \aucount}
+
+% \and was modified to count the number of authors.  GKMT 12 Aug 1999
+\def\alignauthor{%                  % \begin{tabular}
+\end{tabular}%
+  \begin{tabular}[t]{p{\auwidth}}\centering}%
+
+%  *** NOTE *** NOTE *** NOTE *** NOTE ***
+%  If you have 'font problems' then you may need
+%  to change these, e.g. 'arialb' instead of "arialbd".
+%  Gerry Murray 11/11/1999
+%  *** OR ** comment out block A and activate block B or vice versa.
+% **********************************************
+%
+%  -- Start of block A -- (Type 1 or Truetype fonts)
+%\newfont{\secfnt}{timesbd at 12pt} % was timenrb originally - now is timesbd
+%\newfont{\secit}{timesbi at 12pt}   %13 Jan 00 gkmt
+%\newfont{\subsecfnt}{timesi at 11pt} % was timenrri originally - now is timesi
+%\newfont{\subsecit}{timesbi at 11pt} % 13 Jan 00 gkmt -- was times changed to timesbi gm 2/4/2000
+%                         % because "normal" is italic, "italic" is Roman
+%\newfont{\ttlfnt}{arialbd at 18pt} % was arialb originally - now is arialbd
+%\newfont{\ttlit}{arialbi at 18pt}    % 13 Jan 00 gkmt
+%\newfont{\subttlfnt}{arial at 14pt} % was arialr originally - now is arial
+%\newfont{\subttlit}{ariali at 14pt} % 13 Jan 00 gkmt
+%\newfont{\subttlbf}{arialbd at 14pt}  % 13 Jan 00 gkmt
+%\newfont{\aufnt}{arial at 12pt} % was arialr originally - now is arial
+%\newfont{\auit}{ariali at 12pt} % 13 Jan 00 gkmt
+%\newfont{\affaddr}{arial at 10pt} % was arialr originally - now is arial
+%\newfont{\affaddrit}{ariali at 10pt} %13 Jan 00 gkmt
+%\newfont{\eaddfnt}{arial at 12pt} % was arialr originally - now is arial
+%\newfont{\ixpt}{times at 9pt} % was timenrr originally - now is times
+%\newfont{\confname}{timesi at 8pt} % was timenrri - now is timesi
+%\newfont{\crnotice}{times at 8pt} % was timenrr originally - now is times
+%\newfont{\ninept}{times at 9pt} % was timenrr originally - now is times
+
+% *********************************************
+%  -- End of block A --
+%
+%
+% -- Start of block B -- UPDATED FONT NAMES
+% *********************************************
+% Gerry Murray 11/30/2006
+% *********************************************
+\newfont{\secfnt}{ptmb8t at 12pt}
+\newfont{\secit}{ptmbi8t at 12pt}    %13 Jan 00 gkmt
+\newfont{\subsecfnt}{ptmri8t at 11pt}
+\newfont{\subsecit}{ptmbi8t at 11pt}  % 
+\newfont{\ttlfnt}{phvb8t at 18pt}
+\newfont{\ttlit}{phvbo8t at 18pt}    % GM 2/4/2000
+\newfont{\subttlfnt}{phvr8t at 14pt}
+\newfont{\subttlit}{phvro8t at 14pt} % GM 2/4/2000
+\newfont{\subttlbf}{phvb8t at 14pt}  % 13 Jan 00 gkmt
+\newfont{\aufnt}{phvr8t at 12pt}
+\newfont{\auit}{phvro8t at 12pt}     % GM 2/4/2000
+\newfont{\affaddr}{phvr8t at 10pt}
+\newfont{\affaddrit}{phvro8t at 10pt} % GM 2/4/2000
+\newfont{\eaddfnt}{phvr8t at 12pt}
+\newfont{\ixpt}{ptmr8t at 9pt}
+\newfont{\confname}{ptmri8t at 8pt}
+\newfont{\crnotice}{ptmr8t at 8pt}
+\newfont{\ninept}{ptmr8t at 9pt}
+% +++++++++++++++++++++++++++++++++++++++++++++
+% -- End of block B --
+
+%\def\email#1{{{\eaddfnt{\vskip 4pt#1}}}}
+% If we have an email, inside a "shared affiliation" then we need the following instead
+\def\email#1{{{\eaddfnt{\par #1}}}}       % revised  - GM - 11/30/2006
+
+\def\addauthorsection{\ifnum\originalaucount>6  % was 3 - Gerry March 2007
+    \section{Additional Authors}\the\addauthors
+  \fi}
+
+\newcount\savesection
+\newcount\sectioncntr
+\global\sectioncntr=1
+
+\setcounter{secnumdepth}{3}
+
+\def\appendix{\par
+\section*{APPENDIX}
+\setcounter{section}{0}
+ \setcounter{subsection}{0}
+ \def\thesection{\Alph{section}} }
+
+\leftmargini 22.5pt
+\leftmarginii 19.8pt    % > \labelsep + width of '(m)'
+\leftmarginiii 16.8pt   % > \labelsep + width of 'vii.'
+\leftmarginiv 15.3pt    % > \labelsep + width of 'M.'
+\leftmarginv 9pt
+\leftmarginvi 9pt
+
+\leftmargin\leftmargini
+\labelsep 4.5pt
+\labelwidth\leftmargini\advance\labelwidth-\labelsep
+
+\def\@listI{\leftmargin\leftmargini \parsep 3.6pt plus 2pt minus 1pt%
+\topsep 7.2pt plus 2pt minus 4pt%
+\itemsep 3.6pt plus 2pt minus 1pt}
+
+\let\@listi\@listI
+\@listi
+
+\def\@listii{\leftmargin\leftmarginii
+   \labelwidth\leftmarginii\advance\labelwidth-\labelsep
+   \topsep 3.6pt plus 2pt minus 1pt
+   \parsep 1.8pt plus 0.9pt minus 0.9pt
+   \itemsep \parsep}
+
+\def\@listiii{\leftmargin\leftmarginiii
+    \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
+    \topsep 1.8pt plus 0.9pt minus 0.9pt
+    \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
+    \itemsep \topsep}
+
+\def\@listiv{\leftmargin\leftmarginiv
+     \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
+
+\def\@listv{\leftmargin\leftmarginv
+     \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
+
+\def\@listvi{\leftmargin\leftmarginvi
+     \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
+
+\def\labelenumi{\theenumi.}
+\def\theenumi{\arabic{enumi}}
+
+\def\labelenumii{(\theenumii)}
+\def\theenumii{\alph{enumii}}
+\def\p at enumii{\theenumi}
+
+\def\labelenumiii{\theenumiii.}
+\def\theenumiii{\roman{enumiii}}
+\def\p at enumiii{\theenumi(\theenumii)}
+
+\def\labelenumiv{\theenumiv.}
+\def\theenumiv{\Alph{enumiv}}
+\def\p at enumiv{\p at enumiii\theenumiii}
+
+\def\labelitemi{$\bullet$}
+\def\labelitemii{\bf --}
+\def\labelitemiii{$\ast$}
+\def\labelitemiv{$\cdot$}
+
+\def\verse{\let\\=\@centercr
+  \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent
+          \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}
+\let\endverse\endlist
+
+\def\quotation{\list{}{\listparindent 1.5em
+    \itemindent\listparindent
+    \rightmargin\leftmargin \parsep 0pt plus 1pt}\item[]}
+\let\endquotation=\endlist
+
+\def\quote{\list{}{\rightmargin\leftmargin}\item[]}
+\let\endquote=\endlist
+
+\def\descriptionlabel#1{\hspace\labelsep \bf #1}
+\def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
+       \let\makelabel\descriptionlabel}}
+
+\let\enddescription\endlist
+
+\def\theequation{\arabic{equation}}
+
+\arraycolsep 4.5pt   % Half the space between columns in an array environment.
+\tabcolsep 5.4pt    % Half the space between columns in a tabular environment.
+\arrayrulewidth .5pt % Width of rules in array and tabular environment. % (was .4) updated Gerry March 20 2007
+\doublerulesep 1.8pt % Space between adjacent rules in array or tabular env.
+
+\tabbingsep \labelsep   % Space used by the \' command.  (See LaTeX manual.)
+
+\skip\@mpfootins =\skip\footins
+
+\fboxsep =2.7pt      % Space left between box and text by \fbox and \framebox.
+\fboxrule =.5pt      % Width of rules in box made by \fbox and \framebox. % (was .4) updated Gerry March 20 2007
+
+\def\thepart{\Roman{part}} % Roman numeral part numbers.
+\def\thesection       {\arabic{section}}
+\def\thesubsection    {\thesection.\arabic{subsection}}
+%\def\thesubsubsection {\thesubsection.\arabic{subsubsection}} % GM 7/30/2002
+%\def\theparagraph     {\thesubsubsection.\arabic{paragraph}}  % GM 7/30/2002
+\def\thesubparagraph  {\theparagraph.\arabic{subparagraph}}
+
+\def\@pnumwidth{1.55em}
+\def\@tocrmarg {2.55em}
+\def\@dotsep{4.5}
+\setcounter{tocdepth}{3}
+
+\def\tableofcontents{\@latexerr{\tableofcontents: Tables of contents are not
+  allowed in the `acmconf' document style.}\@eha}
+
+\def\l at part#1#2{\addpenalty{\@secpenalty}
+   \addvspace{2.25em plus 1pt}  % space above part line
+   \begingroup
+   \@tempdima 3em       % width of box holding part number, used by
+     \parindent \z@ \rightskip \@pnumwidth      %% \numberline
+     \parfillskip -\@pnumwidth
+     {\large \bf        % set line in \large boldface
+     \leavevmode        % TeX command to enter horizontal mode.
+     #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
+     \nobreak           % Never break after part entry
+   \endgroup}
+
+\def\l at section#1#2{\addpenalty{\@secpenalty} % good place for page break
+   \addvspace{1.0em plus 1pt}   % space above toc entry
+   \@tempdima 1.5em             % width of box holding section number
+   \begingroup
+    \parindent  \z@ \rightskip \@pnumwidth
+     \parfillskip -\@pnumwidth
+     \bf                        % Boldface.
+     \leavevmode                % TeX command to enter horizontal mode.
+      \advance\leftskip\@tempdima %% added 5 Feb 88 to conform to
+      \hskip -\leftskip           %% 25 Jan 88 change to \numberline
+     #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
+   \endgroup}
+
+
+\def\l at subsection{\@dottedtocline{2}{1.5em}{2.3em}}
+\def\l at subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
+\def\l at paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
+\def\l at subparagraph{\@dottedtocline{5}{10em}{5em}}
+
+\def\listoffigures{\@latexerr{\listoffigures: Lists of figures are not
+  allowed in the `acmconf' document style.}\@eha}
+
+\def\l at figure{\@dottedtocline{1}{1.5em}{2.3em}}
+
+\def\listoftables{\@latexerr{\listoftables: Lists of tables are not
+  allowed in the `acmconf' document style.}\@eha}
+\let\l at table\l at figure
+
+\def\footnoterule{\kern-3\p@
+  \hrule width .5\columnwidth   % (was .4) updated Gerry March 20 2007
+  \kern 2.6\p@}                 % The \hrule has default height of .4pt % (was .4) updated Gerry March 20 2007
+% ------
+\long\def\@makefntext#1{\noindent 
+%\hbox to .5em{\hss$^{\@thefnmark}$}#1}   % original
+\hbox to .5em{\hss\textsuperscript{\@thefnmark}}#1}  % C. Clifton / GM Oct. 2nd. 2002
+% -------
+
+\long\def\@maketntext#1{\noindent
+#1}
+
+\long\def\@maketitlenotetext#1#2{\noindent
+            \hbox to 1.8em{\hss$^{#1}$}#2}
+
+\setcounter{topnumber}{2}
+\def\topfraction{.7}
+\setcounter{bottomnumber}{1}
+\def\bottomfraction{.3}
+\setcounter{totalnumber}{3}
+\def\textfraction{.2}
+\def\floatpagefraction{.5}
+\setcounter{dbltopnumber}{2}
+\def\dbltopfraction{.7}
+\def\dblfloatpagefraction{.5}
+
+%
+\long\def\@makecaption#1#2{
+   \vskip \baselineskip
+   \setbox\@tempboxa\hbox{\textbf{#1: #2}}
+   \ifdim \wd\@tempboxa >\hsize % IF longer than one line:
+       \textbf{#1: #2}\par               %   THEN set as ordinary paragraph.
+     \else                      %   ELSE  center.
+       \hbox to\hsize{\hfil\box\@tempboxa\hfil}\par
+   \fi}
+
+%
+
+\long\def\@makecaption#1#2{
+   \vskip 10pt
+   \setbox\@tempboxa\hbox{\textbf{#1: #2}}
+   \ifdim \wd\@tempboxa >\hsize % IF longer than one line:
+       \textbf{#1: #2}\par                %   THEN set as ordinary paragraph.
+     \else                      %   ELSE  center.
+       \hbox to\hsize{\hfil\box\@tempboxa\hfil}
+   \fi}
+
+\@ifundefined{figure}{\newcounter {figure}} % this is for LaTeX2e
+
+\def\fps at figure{tbp}
+\def\ftype at figure{1}
+\def\ext at figure{lof}
+\def\fnum at figure{Figure \thefigure}
+\def\figure{\@float{figure}}
+\let\endfigure\end at float
+\@namedef{figure*}{\@dblfloat{figure}}
+\@namedef{endfigure*}{\end at dblfloat}
+
+\@ifundefined{table}{\newcounter {table}} % this is for LaTeX2e
+
+\def\fps at table{tbp}
+\def\ftype at table{2}
+\def\ext at table{lot}
+\def\fnum at table{Table \thetable}
+\def\table{\@float{table}}
+\let\endtable\end at float
+\@namedef{table*}{\@dblfloat{table}}
+\@namedef{endtable*}{\end at dblfloat}
+
+\newtoks\titleboxnotes
+\newcount\titleboxnoteflag
+
+\def\maketitle{\par
+ \begingroup
+   \def\thefootnote{\fnsymbol{footnote}}
+   \def\@makefnmark{\hbox
+       to 0pt{$^{\@thefnmark}$\hss}}
+     \twocolumn[\@maketitle]
+\@thanks
+ \endgroup
+ \setcounter{footnote}{0}
+ \let\maketitle\relax
+ \let\@maketitle\relax
+ \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\gdef\@subtitle{}\let\thanks\relax
+ \@copyrightspace}
+
+%% CHANGES ON NEXT LINES
+\newif\if at ll % to record which version of LaTeX is in use
+
+\expandafter\ifx\csname LaTeXe\endcsname\relax % LaTeX2.09 is used
+\else% LaTeX2e is used, so set ll to true
+\global\@lltrue
+\fi
+
+\if at ll
+  \NeedsTeXFormat{LaTeX2e}
+  \ProvidesClass{sig-alternate} [2007/06/07 - V2.3 - based on acmproc.cls V1.3 <Nov. 30 '99>]
+  \RequirePackage{latexsym}% QUERY: are these two really needed?
+  \let\dooptions\ProcessOptions
+\else
+  \let\dooptions\@options
+\fi
+%% END CHANGES
+
+\def\@height{height}
+\def\@width{width}
+\def\@minus{minus}
+\def\@plus{plus}
+\def\hb at xt@{\hbox to}
+\newif\if at faircopy
+\@faircopyfalse
+\def\ds at faircopy{\@faircopytrue}
+
+\def\ds at preprint{\@faircopyfalse}
+
+\@twosidetrue
+\@mparswitchtrue
+\def\ds at draft{\overfullrule 5\p@}
+%% CHANGE ON NEXT LINE
+\dooptions
+
+\lineskip \p@
+\normallineskip \p@
+\def\baselinestretch{1}
+\def\@ptsize{0} %needed for amssymbols.sty
+
+%% CHANGES ON NEXT LINES
+\if at ll% allow use of old-style font change commands in LaTeX2e
+\@maxdepth\maxdepth
+%
+\DeclareOldFontCommand{\rm}{\ninept\rmfamily}{\mathrm}
+\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
+\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
+\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
+\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
+\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
+\DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}}
+\DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}}
+\fi
+%
+\if at ll
+ \renewcommand{\rmdefault}{cmr}  % was 'ttm'
+% Note! I have also found 'mvr' to work ESPECIALLY well.
+% Gerry - October 1999
+% You may need to change your LV1times.fd file so that sc is
+% mapped to cmcsc - -for smallcaps -- that is if you decide
+% to change {cmr} to {times} above. (Not recommended)
+  \renewcommand{\@ptsize}{}
+  \renewcommand{\normalsize}{%
+    \@setfontsize\normalsize\@ixpt{10.5\p@}%\ninept%
+    \abovedisplayskip 6\p@ \@plus2\p@ \@minus\p@
+    \belowdisplayskip \abovedisplayskip
+    \abovedisplayshortskip 6\p@ \@minus 3\p@
+    \belowdisplayshortskip 6\p@ \@minus 3\p@
+    \let\@listi\@listI
+  }
+\else
+  \def\@normalsize{%changed next to 9 from 10
+    \@setsize\normalsize{9\p@}\ixpt\@ixpt
+   \abovedisplayskip 6\p@ \@plus2\p@ \@minus\p@
+    \belowdisplayskip \abovedisplayskip
+    \abovedisplayshortskip 6\p@ \@minus 3\p@
+    \belowdisplayshortskip 6\p@ \@minus 3\p@
+    \let\@listi\@listI
+  }%
+\fi
+\if at ll
+  \newcommand\scriptsize{\@setfontsize\scriptsize\@viipt{8\p@}}
+  \newcommand\tiny{\@setfontsize\tiny\@vpt{6\p@}}
+  \newcommand\large{\@setfontsize\large\@xiipt{14\p@}}
+  \newcommand\Large{\@setfontsize\Large\@xivpt{18\p@}}
+  \newcommand\LARGE{\@setfontsize\LARGE\@xviipt{20\p@}}
+  \newcommand\huge{\@setfontsize\huge\@xxpt{25\p@}}
+  \newcommand\Huge{\@setfontsize\Huge\@xxvpt{30\p@}}
+\else
+  \def\scriptsize{\@setsize\scriptsize{8\p@}\viipt\@viipt}
+  \def\tiny{\@setsize\tiny{6\p@}\vpt\@vpt}
+  \def\large{\@setsize\large{14\p@}\xiipt\@xiipt}
+  \def\Large{\@setsize\Large{18\p@}\xivpt\@xivpt}
+  \def\LARGE{\@setsize\LARGE{20\p@}\xviipt\@xviipt}
+  \def\huge{\@setsize\huge{25\p@}\xxpt\@xxpt}
+  \def\Huge{\@setsize\Huge{30\p@}\xxvpt\@xxvpt}
+\fi
+\normalsize
+
+% make aubox hsize/number of authors up to 3, less gutter
+% then showbox gutter showbox gutter showbox -- GKMT Aug 99
+\newbox\@acmtitlebox
+\def\@maketitle{\newpage
+ \null
+ \setbox\@acmtitlebox\vbox{%
+\baselineskip 20pt
+\vskip 2em                   % Vertical space above title.
+   \begin{center}
+    {\ttlfnt \@title\par}       % Title set in 18pt Helvetica (Arial) bold size.
+    \vskip 1.5em                % Vertical space after title.
+%This should be the subtitle.
+{\subttlfnt \the\subtitletext\par}\vskip 1.25em%\fi
+    {\baselineskip 16pt\aufnt   % each author set in \12 pt Arial, in a
+     \lineskip .5em             % tabular environment
+     \begin{tabular}[t]{c}\@author
+     \end{tabular}\par}
+    \vskip 1.5em               % Vertical space after author.
+   \end{center}}
+ \dimen0=\ht\@acmtitlebox
+ \advance\dimen0 by -12.75pc\relax % Increased space for title box -- KBT
+ \unvbox\@acmtitlebox
+ \ifdim\dimen0<0.0pt\relax\vskip-\dimen0\fi}
+
+
+\newcount\titlenotecount
+\global\titlenotecount=0
+\newtoks\tntoks
+\newtoks\tntokstwo
+\newtoks\tntoksthree
+\newtoks\tntoksfour
+\newtoks\tntoksfive
+
+\def\abstract{
+\ifnum\titlenotecount>0 % was =1
+    \insert\footins{%
+    \reset at font\footnotesize
+        \interlinepenalty\interfootnotelinepenalty
+        \splittopskip\footnotesep
+        \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+        \hsize\columnwidth \@parboxrestore
+        \protected at edef\@currentlabel{%
+        }%
+        \color at begingroup
+\ifnum\titlenotecount=1
+      \@maketntext{%
+         \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\@finalstrut\strutbox}%
+\fi
+\ifnum\titlenotecount=2
+      \@maketntext{%
+      \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
+\@maketntext{%
+         \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\@finalstrut\strutbox}%
+\fi
+\ifnum\titlenotecount=3
+      \@maketntext{%
+         \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
+\@maketntext{%
+         \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\par\@finalstrut\strutbox}%
+\@maketntext{%
+         \raisebox{4pt}{$\ddagger$}\rule\z@\footnotesep\ignorespaces\the\tntoksthree\@finalstrut\strutbox}%
+\fi
+\ifnum\titlenotecount=4
+      \@maketntext{%
+         \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
+\@maketntext{%
+         \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\par\@finalstrut\strutbox}%
+\@maketntext{%
+         \raisebox{4pt}{$\ddagger$}\rule\z@\footnotesep\ignorespaces\the\tntoksthree\par\@finalstrut\strutbox}%
+\@maketntext{%
+         \raisebox{4pt}{$\S$}\rule\z@\footnotesep\ignorespaces\the\tntoksfour\@finalstrut\strutbox}%
+\fi
+\ifnum\titlenotecount=5
+      \@maketntext{%
+         \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
+\@maketntext{%
+         \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\par\@finalstrut\strutbox}%
+\@maketntext{%
+         \raisebox{4pt}{$\ddagger$}\rule\z@\footnotesep\ignorespaces\the\tntoksthree\par\@finalstrut\strutbox}%
+\@maketntext{%
+         \raisebox{4pt}{$\S$}\rule\z@\footnotesep\ignorespaces\the\tntoksfour\par\@finalstrut\strutbox}%
+\@maketntext{%
+         \raisebox{4pt}{$\P$}\rule\z@\footnotesep\ignorespaces\the\tntoksfive\@finalstrut\strutbox}%
+\fi
+   \color at endgroup} %g}
+\fi
+\setcounter{footnote}{0}
+\section*{ABSTRACT}\normalsize%\ninept
+}
+
+\def\endabstract{\if at twocolumn\else\endquotation\fi}
+
+\def\keywords{\if at twocolumn
+\section*{Keywords}
+\else \small
+\quotation
+\fi}
+
+\def\terms{\if at twocolumn
+\section*{General Terms}
+\else \small
+\quotation
+\fi}
+
+% -- Classification needs to be a bit smart due to optionals - Gerry/Georgia November 2nd. 1999
+\newcount\catcount
+\global\catcount=1
+
+\def\category#1#2#3{%
+\ifnum\catcount=1
+\section*{Categories and Subject Descriptors}
+\advance\catcount by 1\else{\unskip; }\fi
+    \@ifnextchar [{\@category{#1}{#2}{#3}}{\@category{#1}{#2}{#3}[]}%
+}
+
+\def\@category#1#2#3[#4]{%
+    \begingroup
+        \let\and\relax
+            #1 [\textbf{#2}]%
+            \if!#4!%
+                \if!#3!\else : #3\fi
+            \else
+                :\space
+                \if!#3!\else #3\kern\z at ---\hskip\z@\fi
+                \textit{#4}%
+            \fi
+    \endgroup
+}
+%
+
+%%% This section (written by KBT) handles the 1" box in the lower left
+%%% corner of the left column of the first page by creating a picture,
+%%% and inserting the predefined string at the bottom (with a negative
+%%% displacement to offset the space allocated for a non-existent
+%%% caption).
+%%%
+\newtoks\copyrightnotice
+\def\ftype at copyrightbox{8}
+\def\@copyrightspace{
+\@float{copyrightbox}[b]
+\begin{center}
+\setlength{\unitlength}{1pc}
+\begin{picture}(20,6) %Space for copyright notice
+\put(0,-0.95){\crnotice{\@toappear}}
+\end{picture}
+\end{center}
+\end at float}
+
+\def\@toappear{} % Default setting blank - commands below change this.
+\long\def\toappear#1{\def\@toappear{\parbox[b]{20pc}{\baselineskip 9pt#1}}}
+\def\toappearbox#1{\def\@toappear{\raisebox{5pt}{\framebox[20pc]{\parbox[b]{19pc}{#1}}}}}
+
+\newtoks\conf
+\newtoks\confinfo
+\def\conferenceinfo#1#2{\global\conf={#1}\global\confinfo{#2}}
+
+
+\def\marginpar{\@latexerr{The \marginpar command is not allowed in the
+  `acmconf' document style.}\@eha}
+
+\mark{{}{}}     % Initializes TeX's marks
+
+\def\today{\ifcase\month\or
+  January\or February\or March\or April\or May\or June\or
+  July\or August\or September\or October\or November\or December\fi
+  \space\number\day, \number\year}
+
+\def\@begintheorem#1#2{%
+    \parskip 0pt % GM July 2000 (for tighter spacing)
+    \trivlist
+    \item[%
+        \hskip 10\p@
+        \hskip \labelsep
+        {{\sc #1}\hskip 5\p@\relax#2.}%
+    ]
+    \it
+}
+\def\@opargbegintheorem#1#2#3{%
+    \parskip 0pt % GM July 2000 (for tighter spacing)
+    \trivlist
+    \item[%
+        \hskip 10\p@
+        \hskip \labelsep
+        {\sc #1\ #2\             % This mod by Gerry to enumerate corollaries
+   \setbox\@tempboxa\hbox{(#3)}  % and bracket the 'corollary title'
+        \ifdim \wd\@tempboxa>\z@ % and retain the correct numbering of e.g. theorems
+            \hskip 5\p@\relax    % if they occur 'around' said corollaries.
+            \box\@tempboxa       % Gerry - Nov. 1999.
+        \fi.}%
+    ]
+    \it
+}
+\newif\if at qeded
+\global\@qededfalse
+
+% -- original
+%\def\proof{%
+%  \vspace{-\parskip} % GM July 2000 (for tighter spacing)
+%    \global\@qededfalse
+%    \@ifnextchar[{\@xproof}{\@proof}%
+%}
+% -- end of original
+
+% (JSS) Fix for vertical spacing bug - Gerry Murray July 30th. 2002
+\def\proof{%
+\vspace{-\lastskip}\vspace{-\parsep}\penalty-51%
+\global\@qededfalse
+\@ifnextchar[{\@xproof}{\@proof}%
+}
+
+\def\endproof{%
+    \if at qeded\else\qed\fi
+    \endtrivlist
+}
+\def\@proof{%
+    \trivlist
+    \item[%
+        \hskip 10\p@
+        \hskip \labelsep
+        {\sc Proof.}%
+    ]
+    \ignorespaces
+}
+\def\@xproof[#1]{%
+    \trivlist
+    \item[\hskip 10\p@\hskip \labelsep{\sc Proof #1.}]%
+    \ignorespaces
+}
+\def\qed{%
+    \unskip
+    \kern 10\p@
+    \begingroup
+        \unitlength\p@
+        \linethickness{.4\p@}%
+        \framebox(6,6){}%
+    \endgroup
+    \global\@qededtrue
+}
+
+\def\newdef#1#2{%
+    \expandafter\@ifdefinable\csname #1\endcsname
+        {\@definecounter{#1}%
+         \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%
+         \global\@namedef{#1}{\@defthm{#1}{#2}}%
+         \global\@namedef{end#1}{\@endtheorem}%
+    }%
+}
+\def\@defthm#1#2{%
+    \refstepcounter{#1}%
+    \@ifnextchar[{\@ydefthm{#1}{#2}}{\@xdefthm{#1}{#2}}%
+}
+\def\@xdefthm#1#2{%
+    \@begindef{#2}{\csname the#1\endcsname}%
+    \ignorespaces
+}
+\def\@ydefthm#1#2[#3]{%
+    \trivlist
+    \item[%
+        \hskip 10\p@
+        \hskip \labelsep
+        {\it #2%
+         \savebox\@tempboxa{#3}%
+         \ifdim \wd\@tempboxa>\z@
+            \ \box\@tempboxa
+         \fi.%
+        }]%
+    \ignorespaces
+}
+\def\@begindef#1#2{%
+    \trivlist
+    \item[%
+        \hskip 10\p@
+        \hskip \labelsep
+        {\it #1\ \rm #2.}%
+    ]%
+}
+\def\theequation{\arabic{equation}}
+
+\newcounter{part}
+\newcounter{section}
+\newcounter{subsection}[section]
+\newcounter{subsubsection}[subsection]
+\newcounter{paragraph}[subsubsection]
+\def\thepart{\Roman{part}}
+\def\thesection{\arabic{section}}
+\def\thesubsection{\thesection.\arabic{subsection}}
+\def\thesubsubsection{\thesubsection.\arabic{subsubsection}} %removed \subsecfnt 29 July 2002 gkmt
+\def\theparagraph{\thesubsubsection.\arabic{paragraph}} %removed \subsecfnt 29 July 2002 gkmt
+\newif\if at uchead
+\@ucheadfalse
+
+%% CHANGES: NEW NOTE
+%% NOTE: OK to use old-style font commands below, since they were
+%% suitably redefined for LaTeX2e
+%% END CHANGES
+\setcounter{secnumdepth}{3}
+\def\part{%
+    \@startsection{part}{9}{\z@}{-10\p@ \@plus -4\p@ \@minus -2\p@}
+        {4\p@}{\normalsize\@ucheadtrue}%
+}
+\def\section{%
+    \@startsection{section}{1}{\z@}{-10\p@ \@plus -4\p@ \@minus -2\p@}% GM
+    {4\p@}{\baselineskip 14pt\secfnt\@ucheadtrue}%
+}
+
+\def\subsection{%
+    \@startsection{subsection}{2}{\z@}{-8\p@ \@plus -2\p@ \@minus -\p@}
+    {4\p@}{\secfnt}%
+}
+\def\subsubsection{%
+    \@startsection{subsubsection}{3}{\z@}{-8\p@ \@plus -2\p@ \@minus -\p@}%
+    {4\p@}{\subsecfnt}%
+}
+%\def\paragraph{%
+%    \vskip 12pt\@startsection{paragraph}{3}{\z@}{6\p@ \@plus \p@}% original
+%    {-5\p@}{\subsecfnt}%
+%}
+%  If one wants sections, subsections and subsubsections numbered,
+%  but not paragraphs, one usually sets secnumepth to 3.
+%  For that, the "depth" of paragraphs must be given correctly
+%  in the definition (``4'' instead of ``3'' as second argument
+%  of @startsection):
+\def\paragraph{%
+    \vskip 12pt\@startsection{paragraph}{4}{\z@}{6\p@ \@plus \p@}%    % GM and Wolfgang May - 11/30/06
+    {-5\p@}{\subsecfnt}%
+}
+\let\@period=.
+\def\@startsection#1#2#3#4#5#6{%
+        \if at noskipsec  %gkmt, 11 aug 99
+        \global\let\@period\@empty
+        \leavevmode
+        \global\let\@period.%
+    \fi
+      \par %
+    \@tempskipa #4\relax
+    \@afterindenttrue
+    \ifdim \@tempskipa <\z@
+        \@tempskipa -\@tempskipa
+        \@afterindentfalse
+    \fi
+    \if at nobreak
+    \everypar{}%
+    \else
+        \addpenalty\@secpenalty
+        \addvspace\@tempskipa
+    \fi
+\parskip=0pt % GM July 2000 (non numbered) section heads
+    \@ifstar
+        {\@ssect{#3}{#4}{#5}{#6}}
+        {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}%
+}
+\def\@sect#1#2#3#4#5#6[#7]#8{%
+    \ifnum #2>\c at secnumdepth
+        \let\@svsec\@empty
+    \else
+        \refstepcounter{#1}%
+        \edef\@svsec{%
+            \begingroup
+                %\ifnum#2>2 \noexpand\rm \fi % changed to next 29 July 2002 gkmt
+            \ifnum#2>2 \noexpand#6 \fi
+                \csname the#1\endcsname
+            \endgroup
+            \ifnum #2=1\relax .\fi
+            \hskip 1em
+        }%
+    \fi
+    \@tempskipa #5\relax
+    \ifdim \@tempskipa>\z@
+        \begingroup
+            #6\relax
+            \@hangfrom{\hskip #3\relax\@svsec}%
+            \begingroup
+                \interlinepenalty \@M
+                \if at uchead
+                    \uppercase{#8}%
+                \else
+                    #8%
+                \fi
+                \par
+            \endgroup
+        \endgroup
+        \csname #1mark\endcsname{#7}%
+        \vskip -12pt  %gkmt, 11 aug 99 and GM July 2000 (was -14) - numbered section head spacing
+\addcontentsline{toc}{#1}{%
+            \ifnum #2>\c at secnumdepth \else
+                \protect\numberline{\csname the#1\endcsname}%
+            \fi
+            #7%
+        }%
+    \else
+        \def\@svsechd{%
+            #6%
+            \hskip #3\relax
+            \@svsec
+            \if at uchead
+                \uppercase{#8}%
+            \else
+                #8%
+            \fi
+            \csname #1mark\endcsname{#7}%
+            \addcontentsline{toc}{#1}{%
+                \ifnum #2>\c at secnumdepth \else
+                    \protect\numberline{\csname the#1\endcsname}%
+                \fi
+                #7%
+            }%
+        }%
+    \fi
+    \@xsect{#5}\hskip 1pt
+    \par
+}
+\def\@xsect#1{%
+    \@tempskipa #1\relax
+    \ifdim \@tempskipa>\z@
+        \par
+        \nobreak
+        \vskip \@tempskipa
+        \@afterheading
+    \else
+        \global\@nobreakfalse
+        \global\@noskipsectrue
+        \everypar{%
+            \if at noskipsec
+                \global\@noskipsecfalse
+                \clubpenalty\@M
+                \hskip -\parindent
+                \begingroup
+                    \@svsechd
+                    \@period
+                \endgroup
+                \unskip
+                \@tempskipa #1\relax
+                \hskip -\@tempskipa
+            \else
+                \clubpenalty \@clubpenalty
+                \everypar{}%
+            \fi
+        }%
+    \fi
+    \ignorespaces
+}
+\def\@trivlist{%
+    \@topsepadd\topsep
+    \if at noskipsec
+        \global\let\@period\@empty
+        \leavevmode
+        \global\let\@period.%
+    \fi
+    \ifvmode
+        \advance\@topsepadd\partopsep
+    \else
+        \unskip
+        \par
+    \fi
+    \if at inlabel
+        \@noparitemtrue
+        \@noparlisttrue
+    \else
+        \@noparlistfalse
+        \@topsep\@topsepadd
+    \fi
+    \advance\@topsep \parskip
+    \leftskip\z at skip
+    \rightskip\@rightskip
+    \parfillskip\@flushglue
+    \@setpar{\if at newlist\else{\@@par}\fi}
+    \global\@newlisttrue
+    \@outerparskip\parskip
+}
+
+%%% Actually, 'abbrev' works just fine as the default
+%%% Bibliography style.
+
+\typeout{Using 'Abbrev' bibliography style}
+\newcommand\bibyear[2]{%
+    \unskip\quad\ignorespaces#1\unskip
+    \if#2..\quad \else \quad#2 \fi
+}
+\newcommand{\bibemph}[1]{{\em#1}}
+\newcommand{\bibemphic}[1]{{\em#1\/}}
+\newcommand{\bibsc}[1]{{\sc#1}}
+\def\@normalcite{%
+    \def\@cite##1##2{[##1\if at tempswa , ##2\fi]}%
+}
+\def\@citeNB{%
+    \def\@cite##1##2{##1\if at tempswa , ##2\fi}%
+}
+\def\@citeRB{%
+    \def\@cite##1##2{##1\if at tempswa , ##2\fi]}%
+}
+\def\start at cite#1#2{%
+    \edef\citeauthoryear##1##2##3{%
+        ###1%
+        \ifnum#2=\z@ \else\ ###2\fi
+    }%
+    \ifnum#1=\thr@@
+        \let\@@cite\@citeyear
+    \else
+        \let\@@cite\@citenormal
+    \fi
+    \@ifstar{\@citeNB\@@cite}{\@normalcite\@@cite}%
+}
+\def\cite{\start at cite23}
+\def\citeNP{\cite*}
+\def\citeA{\start at cite10}
+\def\citeANP{\citeA*}
+\def\shortcite{\start at cite23}
+\def\shortciteNP{\shortcite*}
+\def\shortciteA{\start at cite20}
+\def\shortciteANP{\shortciteA*}
+\def\citeyear{\start at cite30}
+\def\citeyearNP{\citeyear*}
+\def\citeN{%
+    \@citeRB
+    \def\citeauthoryear##1##2##3{##1\ [##3%
+        \def\reserved at a{##1}%
+        \def\citeauthoryear####1####2####3{%
+            \def\reserved at b{####1}%
+            \ifx\reserved at a\reserved at b
+                ####3%
+            \else
+                \errmessage{Package acmart Error: author mismatch
+                         in \string\citeN^^J^^J%
+                    See the acmart package documentation for explanation}%
+            \fi
+        }%
+    }%
+    \@ifstar\@citeyear\@citeyear
+}
+\def\shortciteN{%
+    \@citeRB
+    \def\citeauthoryear##1##2##3{##2\ [##3%
+        \def\reserved at a{##2}%
+        \def\citeauthoryear####1####2####3{%
+            \def\reserved at b{####2}%
+            \ifx\reserved at a\reserved at b
+                ####3%
+            \else
+                \errmessage{Package acmart Error: author mismatch
+                         in \string\shortciteN^^J^^J%
+                    See the acmart package documentation for explanation}%
+            \fi
+        }%
+    }%
+    \@ifstar\@citeyear\@citeyear  % GM July 2000
+}
+\def\@citenormal{%
+    \@ifnextchar [{\@tempswatrue\@citex;}
+                  {\@tempswafalse\@citex,[]}% % GM July 2000
+}
+\def\@citeyear{%
+    \@ifnextchar [{\@tempswatrue\@citex,}%
+                  {\@tempswafalse\@citex,[]}%
+}
+\def\@citex#1[#2]#3{%
+    \let\@citea\@empty
+    \@cite{%
+        \@for\@citeb:=#3\do{%
+            \@citea
+            \def\@citea{#1 }%
+            \edef\@citeb{\expandafter\@iden\@citeb}%
+            \if at filesw
+                \immediate\write\@auxout{\string\citation{\@citeb}}%
+            \fi
+            \@ifundefined{b@\@citeb}{%
+                {\bf ?}%
+                \@warning{%
+                    Citation `\@citeb' on page \thepage\space undefined%
+                }%
+            }%
+            {\csname b@\@citeb\endcsname}%
+        }%
+    }{#2}%
+}
+\let\@biblabel\@gobble
+\newdimen\bibindent
+\setcounter{enumi}{1}
+\bibindent=0em
+\def\thebibliography#1{% 
+\ifnum\addauflag=0\addauthorsection\global\addauflag=1\fi
+     \section[References]{%    <=== OPTIONAL ARGUMENT ADDED HERE
+        {References} % was uppercased but this affects pdf bookmarks (SP/GM October 2004)
+          {\vskip -9pt plus 1pt} % GM Nov. 2006 / GM July 2000 (for somewhat tighter spacing) 
+         \@mkboth{{\refname}}{{\refname}}%
+     }%
+     \list{[\arabic{enumi}]}{%
+         \settowidth\labelwidth{[#1]}%
+         \leftmargin\labelwidth
+         \advance\leftmargin\labelsep
+         \advance\leftmargin\bibindent
+         \parsep=0pt\itemsep=1pt % GM July 2000
+         \itemindent -\bibindent
+         \listparindent \itemindent
+         \usecounter{enumi}
+     }%
+     \let\newblock\@empty
+     \raggedright % GM July 2000
+     \sloppy
+     \sfcode`\.=1000\relax
+}
+
+
+\gdef\balancecolumns
+{\vfill\eject
+\global\@colht=\textheight
+\global\ht\@cclv=\textheight
+}
+
+\newcount\colcntr
+\global\colcntr=0
+\newbox\savebox
+
+\gdef \@makecol {%
+\global\advance\colcntr by 1
+\ifnum\colcntr>2 \global\colcntr=1\fi
+   \ifvoid\footins
+     \setbox\@outputbox \box\@cclv
+   \else
+     \setbox\@outputbox \vbox{%
+\boxmaxdepth \@maxdepth
+       \@tempdima\dp\@cclv
+       \unvbox \@cclv
+       \vskip-\@tempdima
+       \vskip \skip\footins
+       \color at begingroup
+         \normalcolor
+         \footnoterule
+         \unvbox \footins
+       \color at endgroup
+       }%
+   \fi
+   \xdef\@freelist{\@freelist\@midlist}%
+   \global \let \@midlist \@empty
+   \@combinefloats
+   \ifvbox\@kludgeins
+     \@makespecialcolbox
+   \else
+     \setbox\@outputbox \vbox to\@colht {%
+\@texttop
+       \dimen@ \dp\@outputbox
+       \unvbox \@outputbox
+   \vskip -\dimen@
+       \@textbottom
+       }%
+   \fi
+   \global \maxdepth \@maxdepth
+}
+\def\titlenote{\@ifnextchar[\@xtitlenote{\stepcounter\@mpfn
+\global\advance\titlenotecount by 1
+\ifnum\titlenotecount=1
+    \raisebox{9pt}{$\ast$}
+\fi
+\ifnum\titlenotecount=2
+    \raisebox{9pt}{$\dagger$}
+\fi
+\ifnum\titlenotecount=3
+    \raisebox{9pt}{$\ddagger$}
+\fi
+\ifnum\titlenotecount=4
+\raisebox{9pt}{$\S$}
+\fi
+\ifnum\titlenotecount=5
+\raisebox{9pt}{$\P$}
+\fi
+         \@titlenotetext
+}}
+
+\long\def\@titlenotetext#1{\insert\footins{%
+\ifnum\titlenotecount=1\global\tntoks={#1}\fi
+\ifnum\titlenotecount=2\global\tntokstwo={#1}\fi
+\ifnum\titlenotecount=3\global\tntoksthree={#1}\fi
+\ifnum\titlenotecount=4\global\tntoksfour={#1}\fi
+\ifnum\titlenotecount=5\global\tntoksfive={#1}\fi
+    \reset at font\footnotesize
+    \interlinepenalty\interfootnotelinepenalty
+    \splittopskip\footnotesep
+    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+    \hsize\columnwidth \@parboxrestore
+    \protected at edef\@currentlabel{%
+    }%
+    \color at begingroup
+   \color at endgroup}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
+\ps at plain
+\baselineskip=11pt
+\let\thepage\relax % For NO page numbers - GM Nov. 30th. 1999 and July 2000
+\def\setpagenumber#1{\global\setcounter{page}{#1}}
+%\pagenumbering{arabic}  % Arabic page numbers GM July 2000
+\twocolumn             % Double column.
+\flushbottom           % Even bottom -- alas, does not balance columns at end of document
+\pagestyle{plain}
+
+% Need Copyright Year and Copyright Data to be user definable (in .tex file).
+% Gerry Nov. 30th. 1999
+\newtoks\copyrtyr
+\newtoks\acmcopyr
+\newtoks\boilerplate
+\global\acmcopyr={X-XXXXX-XX-X/XX/XX}  % Default - 5/11/2001 *** Gerry
+\global\copyrtyr={200X}                % Default - 3/3/2003 *** Gerry
+\def\CopyrightYear#1{\global\copyrtyr{#1}}
+\def\crdata#1{\global\acmcopyr{#1}}
+\def\permission#1{\global\boilerplate{#1}}
+%
+\global\boilerplate={Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page.  To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee.}
+\newtoks\copyrightetc
+\global\copyrightetc{Copyright \the\copyrtyr\ ACM \the\acmcopyr\ ...\$5.00}
+\toappear{\the\boilerplate\par
+{\confname{\the\conf}} \the\confinfo\par \the\copyrightetc.}
+%\DeclareFixedFont{\altcrnotice}{OT1}{tmr}{m}{n}{8}  % << patch needed for accenting e.g. Montreal - Gerry, May 2007
+%\DeclareFixedFont{\altconfname}{OT1}{tmr}{m}{it}{8}  % << patch needed for accenting in italicized confname - Gerry, May 2007
+%
+%{\altconfname{{\the\conf}}} {\altcrnotice\the\confinfo\par} \the\copyrightetc.}  % << Gerry, May 2007
+%
+% The following section (i.e. 3 .sty inclusions) was added in May 2007 so as to fix the problems that many
+% authors were having with accents. Sometimes accents would occur, but the letter-character would be of a different
+% font. Conversely the letter-character font would be correct but, e.g. a 'bar' would appear superimposed on the
+% character instead of, say, an unlaut/diaresis. Sometimes the letter-character would NOT appear at all.
+% Using [T1]{fontenc} outright was not an option as this caused 99% of the authors to 'produce' a Type-3 (bitmapped)
+% PDF file - useless for production. 
+%
+% For proper (font) accenting we NEED these packages to be part of the .cls file i.e. 'ae', 'aecompl' and 'aeguil' 
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%% This is file `ae.sty' 
+\def\fileversion{1.3}
+\def\filedate{2001/02/12}
+\NeedsTeXFormat{LaTeX2e}
+%\ProvidesPackage{ae}[\filedate\space\fileversion\space  % GM
+% Almost European Computer Modern]                       % GM - keeping the log file clean(er)
+\newif\if at ae@slides \@ae at slidesfalse
+\DeclareOption{slides}{\@ae at slidestrue}
+\ProcessOptions
+\fontfamily{aer}
+\RequirePackage[T1]{fontenc}
+\if at ae@slides
+    \renewcommand{\sfdefault}{laess}
+    \renewcommand{\rmdefault}{laess} % no roman
+    \renewcommand{\ttdefault}{laett}
+\else
+    \renewcommand{\sfdefault}{aess}
+    \renewcommand{\rmdefault}{aer}
+    \renewcommand{\ttdefault}{aett}
+\fi
+\endinput
+%% 
+%% End of file `ae.sty'.
+%
+%
+\def\fileversion{0.9}
+\def\filedate{1998/07/23}
+\NeedsTeXFormat{LaTeX2e}
+%\ProvidesPackage{aecompl}[\filedate\space\fileversion\space   % GM
+%T1 Complements for AE fonts (D. Roegel)]                      % GM -- keeping the log file clean(er)
+ 
+\def\@ae at compl#1{{\fontencoding{T1}\fontfamily{cmr}\selectfont\symbol{#1}}}
+\def\guillemotleft{\@ae at compl{19}}
+\def\guillemotright{\@ae at compl{20}}
+\def\guilsinglleft{\@ae at compl{14}}
+\def\guilsinglright{\@ae at compl{15}}
+\def\TH{\@ae at compl{222}}
+\def\NG{\@ae at compl{141}}
+\def\ng{\@ae at compl{173}}
+\def\th{\@ae at compl{254}}
+\def\DJ{\@ae at compl{208}}
+\def\dj{\@ae at compl{158}}
+\def\DH{\@ae at compl{208}}
+\def\dh{\@ae at compl{240}}
+\def\@perthousandzero{\@ae at compl{24}}
+\def\textperthousand{\%\@perthousandzero}
+\def\textpertenthousand{\%\@perthousandzero\@perthousandzero}
+\endinput
+%
+%
+%% This is file `aeguill.sty' 
+% This file gives french guillemets (and not guillemots!)
+% built with the Polish CMR fonts (default), WNCYR fonts, the LASY fonts 
+% or with the EC fonts. 
+% This is useful in conjunction with the ae package
+% (this package loads the ae package in case it has not been loaded)
+%  and with or without the french(le) package.
+%
+% In order to get the guillemets, it is necessary to either type
+% \guillemotleft and \guillemotright, or to use an 8 bit encoding
+% (such as ISO-Latin1) which selects these two commands, 
+% or, if you use the french package (but not the frenchle package), 
+% to type << or >>.
+%
+% By default, you get the Polish CMR guillemets; if this package is loaded
+% with the `cm' option, you get the LASY guillemets; with `ec,' you
+% get the EC guillemets, and with `cyr,' you get the cyrillic guillemets.
+%
+% In verbatim mode, you always get the EC/TT guillemets.
+%
+% The default option is interesting in conjunction with PDF,
+% because there is a Type 1 version of the Polish CMR fonts
+% and these guillemets are very close in shape to the EC guillemets.
+% There are no free Type 1 versions of the EC fonts.
+%
+% Support for Polish CMR guillemets was kindly provided by 
+% Rolf Niepraschk <niepraschk at ptb.de> in version 0.99 (2000/05/22).
+% Bernd Raichle provided extensive simplifications to the code
+% for version 1.00.
+%
+% This package is released under the LPPL.
+%
+% Changes:
+%   Date        version
+%   2001/04/12  1.01    the frenchle and french package are now distinguished.
+%
+\def\fileversion{1.01}
+\def\filedate{2001/04/12}
+\NeedsTeXFormat{LaTeX2e}
+%\ProvidesPackage{aeguill}[2001/04/12 1.01 %    % GM
+%AE fonts with french guillemets (D. Roegel)]   % GM - keeping the log file clean(er)
+%\RequirePackage{ae}  % GM May 2007 - already embedded here
+
+\newcommand{\@ae at switch}[4]{#4}
+\DeclareOption{ec}{\renewcommand\@ae at switch[4]{#1}}
+\DeclareOption{cm}{\renewcommand\@ae at switch[4]{#2}}
+\DeclareOption{cyr}{\renewcommand\@ae at switch[4]{#3}}
+\DeclareOption{pl}{\renewcommand\@ae at switch[4]{#4}}
+\ExecuteOptions{pl}
+\ProcessOptions
+
+%
+% Load necessary packages
+%
+\@ae at switch{% ec
+  % do nothing
+}{% cm
+  \RequirePackage{latexsym}%  GM - May 2007 - already 'mentioned as required' up above
+}{% cyr
+  \RequirePackage[OT2,T1]{fontenc}%
+}{% pl
+  \RequirePackage[OT4,T1]{fontenc}%
+}
+
+% The following command will be compared to \frenchname,
+% as defined in french.sty and frenchle.sty.
+\def\aeguillfrenchdefault{french}%
+
+\let\guill at verbatim@font\verbatim at font
+\def\verbatim at font{\guill at verbatim@font\ecguills{cmtt}%
+                   \let\guillemotleft\@oguills\let\guillemotright\@fguills}
+
+\begingroup \catcode`\<=13 \catcode`\>=13
+\def\x{\endgroup
+ \def\ae at lfguill{<<}%
+ \def\ae at rfguill{>>}%
+}\x
+
+\newcommand{\ecguills}[1]{%
+  \def\selectguillfont{\fontencoding{T1}\fontfamily{#1}\selectfont}%
+  \def\@oguills{{\selectguillfont\symbol{19}}}%
+  \def\@fguills{{\selectguillfont\symbol{20}}}%
+  } 
+
+\newcommand{\aeguills}{%
+  \ae at guills
+  % We redefine \guillemotleft and \guillemotright
+  % in order to catch them when they are used 
+  % with \DeclareInputText (in latin1.def for instance)
+  % We use \auxWARNINGi as a safe indicator that french.sty is used.
+  \gdef\guillemotleft{\ifx\auxWARNINGi\undefined
+                         \@oguills % neither french.sty nor frenchle.sty
+                      \else
+                         \ifx\aeguillfrenchdefault\frenchname
+                           \ae at lfguill  % french.sty
+                         \else
+                           \@oguills    % frenchle.sty
+                         \fi
+                      \fi}%
+  \gdef\guillemotright{\ifx\auxWARNINGi\undefined
+                         \@fguills % neither french.sty nor frenchle.sty
+                       \else
+                         \ifx\aeguillfrenchdefault\frenchname
+                           \ae at rfguill  % french.sty
+                         \else
+                           \@fguills    % frenchle.sty
+                         \fi
+                       \fi}%
+  }
+
+%
+% Depending on the class option
+% define the internal command \ae at guills
+\@ae at switch{% ec
+  \newcommand{\ae at guills}{%
+    \ecguills{cmr}}%
+}{% cm
+  \newcommand{\ae at guills}{%
+    \def\selectguillfont{\fontencoding{U}\fontfamily{lasy}%
+            \fontseries{m}\fontshape{n}\selectfont}%
+    \def\@oguills{\leavevmode\nobreak
+                \hbox{\selectguillfont (\kern-.20em(\kern.20em}\nobreak}%
+    \def\@fguills{\leavevmode\nobreak
+                \hbox{\selectguillfont \kern.20em)\kern-.2em)}%
+                \ifdim\fontdimen\@ne\font>\z@\/\fi}}%
+}{% cyr
+  \newcommand{\ae at guills}{%
+    \def\selectguillfont{\fontencoding{OT2}\fontfamily{wncyr}\selectfont}%
+    \def\@oguills{{\selectguillfont\symbol{60}}}%
+    \def\@fguills{{\selectguillfont\symbol{62}}}}
+}{% pl
+  \newcommand{\ae at guills}{%
+    \def\selectguillfont{\fontencoding{OT4}\fontfamily{cmr}\selectfont}%
+    \def\@oguills{{\selectguillfont\symbol{174}}}%
+    \def\@fguills{{\selectguillfont\symbol{175}}}}
+}
+
+
+\AtBeginDocument{%
+  \ifx\GOfrench\undefined
+    \aeguills
+  \else
+    \let\aeguill at GOfrench\GOfrench
+    \gdef\GOfrench{\aeguill at GOfrench \aeguills}%
+  \fi
+  }
+
+\endinput
+%
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+

diff --git a/talk/icooolps2011/figures/trace-levels.pdf b/talk/icooolps2011/figures/trace-levels.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..ac54d57f68c799ef0594e46997952e78d0221a8a
GIT binary patch
[cut]


More information about the Pypy-commit mailing list