%% \usepackage{mathpazo}  % palatino, including math (where possible)
%\usepackage{palatino}
\usepackage{times}
\usepackage{setspace}
\usepackage[pdftex]{graphicx,color}
\usepackage{pst-node}
\usepackage{epsfig}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{stmaryrd}
\usepackage{alltt}
\usepackage{mathpartir}

%% Hack around a bug in MarvoSym.
%% Cf. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=236967
\let\RescueRightarrow=\Rightarrow
\usepackage{marvosym}
\renewcommand{\Rightarrow}{\RescueRightarrow}

%\usepackage{prelim2e}
\usepackage{mflogo}
\usepackage[hang,flushmargin]{footmisc} 
\usepackage[
  pagebackref=true,
  colorlinks=true,
  plainpages=false,
  backref=page,
  linkcolor=black,
  citecolor=black,
  urlcolor=black,
  pdfpagemode=None,
  pdftitle={The Complexity of Flow Analysis in Higher-Order Languages},
  pdfauthor={David Van Horn},
  baseurl={http://svn.lambda-calcul.us/dissertation/},
  pdfsubject={Computer science, PhD dissertation, Brandeis University},
  pdfkeywords={flow analysis, cfa, kcfa, complexity, lambda calculus, functional programming,
               linear logic, program analysis}]{hyperref}

\urlstyle{rm} 
\definecolor{darkred}{rgb}{.8,0,0}

\setlength\parindent{0pt}
\setlength\parskip{0.1in} 

\newcommand\papa{\em in memory of William Gordon Mercer\\ July 22, 1927--October 8, 2007}


\renewcommand*{\backref}[1]{}
\renewcommand*{\backrefalt}[4]{% 
  \ifcase #1 % 
   No citations.% 
  \or 
   Cited on page #2.% 
  \else 
   Cited on pages #2.% 
  \fi}

\DeclareGraphicsRule{*}{mps}{*}{}

\newcommand\dvhnote[1]{{\em #1 --d.v.h.}}

\newcommand\TB{\ \ \ \ }

%% Linear logic connectives
\newcommand\tensor{\otimes}
\newcommand{\parr}{\bindnasrepma}

\newcommand\kcfa{\texorpdfstring{$k$}{k}CFA}

%% Complexity classes
\newcommand\ptime{\texorpdfstring{{\sc ptime}}{PTIME}}
\newcommand\twonpda{\texorpdfstring{{\sc 2npda}}{2NPDA}}
\newcommand\pspace{\texorpdfstring{{\sc pspace}}{PSPACE}}
\newcommand\dtime{{\sc dtime}}
\newcommand\ntime{{\sc ntime}}
\newcommand\dspace{{\sc dspace}}
\newcommand\np{\texorpdfstring{{\sc nptime}}{NPTIME}}
\newcommand\nc{{\sc nc}}
\newcommand\exptime{\texorpdfstring{{\sc exptime}}{EXPTIME}}
\newcommand\logspace{\texorpdfstring{{\sc logspace}}{LOGSPACE}}

%% CFA notation
\newcommand\Lab{\mathbf{Lab}}
\newcommand\Env{\mathbf{Env}}
\newcommand\Clos{\mathbf{Clos}}
\newcommand\CClos{\mathbf{CClos}}
\newcommand\CEnv{\mathbf{CEnv}}
\newcommand\Cache{\mathbf{Cache}}
\newcommand\ACache{\mathbf{\widehat{Cache}}}
\newcommand\Var{\mathbf{Var}}
\newcommand\Val{\mathbf{Val}}
\newcommand\Exp{\mathbf{Exp}}
\newcommand\Unit{\mathbf{Unit}}
\newcommand\Term{\mathbf{Term}}
\newcommand\cache{\widehat{\mathsf{C}}}
\newcommand\ecache{\mathsf{C}}          %% Exact cache wears no hat.
\newcommand\eenv{\mathsf{r}}
\newcommand\aenv{\hat{\mathsf{r}}}
\newcommand\env{\widehat{\rho}}
\newcommand\ce{\rho}
\newcommand\emptyenv{\bullet}
\newcommand\kmodels[2]{\models^{#1}_{#2}}
\newcommand\fv[1]{\ensuremath{\mathbf{fv}(#1)}}
\newcommand\bv[1]{\ensuremath{\mathbf{bv}(#1)}}

% Eval like functions
\newcommand\evalf[1][]{\ensuremath{\mathcal{E}{#1}}}
\newcommand\ivf{\ensuremath{\mathcal{I}}}
\newcommand\avf{\ensuremath{\mathcal{A}}}
\newcommand\eval[2][]{\ensuremath{\mathcal{E}{#1}\sem{#2}}}
\newcommand\iv[1]{\ensuremath{\mathcal{I}\sem{#1}}}
\newcommand\ev[3]{\ensuremath{\evalf\sem{#1}^{#2}_{#3}}}
\newcommand\av[4][]{\ensuremath{\avf{#1}\sem{#2}^{#3}_{#4}}}
\newcommand\avz[1]{\av[_0]{#1}\empty\empty}
\newcommand\avk[3]{\av[_k]{#1}{#2}{#3}}
\newcommand\evz[1]{\ensuremath{\mathcal{E}\sem{#1}}}

\newcommand\dom[1]{\ensuremath{\mathbf{dom}(#1)}}
\newcommand\sem[1]{\ensuremath{\llbracket #1\rrbracket}}
\newcommand\lab[1]{\ensuremath{\mathbf{lab}(#1)}}
\newcommand\restrict{\ensuremath{\!\upharpoonright\!}}
\newcommand{\loves}{\ensuremath{\vdash}}
\newcommand\unknown{\ensuremath{\mathit{unknown}}}

\newcommand\expnd{\ensuremath{\Rightarrow}}
\newcommand\cfared{\ensuremath{\Rightarrow_{\mathsf{cfa}}}}
\newcommand\vp{\leadsto}
\newcommand\lolli{\multimap}

%% Boolean codings
\newcommand\True{\ensuremath{\mbox{\tt True}}}
\newcommand\False{\ensuremath{\mbox{\tt False}}}
\newcommand\TT{\ensuremath{\mbox{\tt tt}}}
\newcommand\FF{\ensuremath{\mbox{\tt ff}}}
\newcommand\Not{\ensuremath{\mbox{\tt Not}}}
\newcommand\Copy{\ensuremath{\mbox{\tt Copy}}}
\newcommand\Implies{\ensuremath{\mbox{\tt Implies}}}
\newcommand\AND{\ensuremath{\mbox{\tt And}}}
\newcommand\Andgate{\ensuremath{\mbox{\tt Andgate}}}
\newcommand\Or{\ensuremath{\mbox{\tt Or}}}
\newcommand\Orgate{\ensuremath{\mbox{\tt Orgate}}}
\newcommand\Notgate{\ensuremath{\mbox{\tt Notgate}}}
\newcommand\Copygate{\ensuremath{\mbox{\tt Copygate}}}
\newcommand\Implgate{\ensuremath{\mbox{\tt Impliesgate}}}

\newcommand\Widget{\ensuremath{\mbox{\tt Widget}}}
\newcommand\Extract{\ensuremath{\mbox{\tt Extract}}}
\newcommand\Null{\ensuremath{\mbox{\tt Null}}}
\newcommand\Zero{\ensuremath{\mathbf 0}}  %% bits
\newcommand\One{\ensuremath{\mathbf 1}}


%\renewcommand{\PrelimText}{(DRAFT)}

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{corollary}{Corollary}
\newtheorem{proposition}{Proposition}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
\newtheorem{conjecture}{Conjecture}

\usepackage{natbib}
\bibpunct();A{},
\let\cite=\citep
%% \bibliographystyle{plainnat}
\bibliographystyle{brandeis-dissertation}


%% PDF Metadata
% \pdfinfo{/Author (David Van Horn)
%          /Title (The Complexity of Flow Analysis in Higher-Order Languages)
%          /Keywords (complexity, flow analysis, cfa, kcfa)}
