Commit dee4b2b9b9909e4617ac92c9cc9fa6d68b6c2d93

Authored by Scott Haseley
0 parents

Initial commit

.gitignore 0 → 100644
  1 +++ a/.gitignore
  1 +ABSTRACT
  2 +/paper.pdf
  3 +/.xxxnote
  4 +/.draft
  5 +/.blue
  6 +/.deps
  7 +/.spellcheck
  8 +*.swp
  9 +*.aux
  10 +*.log
  11 +*.out
  12 +*.bbl
  13 +*.blg
  14 +*.bak
  15 +.~lock*
  16 +*.pyg
  17 +*.fdb_latexmk
  18 +*.fls
.ispell_english 0 → 100644
  1 +++ a/.ispell_english
  1 +Android
  2 +API
  3 +APIs
  4 +app
  5 +apps
  6 +codebase
  7 +Endgames
  8 +JSON
  9 +logcat
  10 +Navjack
  11 +Navjack's
  12 +outsourced
  13 +PhoneLab
  14 +PocketParker
  15 +pre
  16 +refactored
  17 +runtime's
  18 +smartphone
  19 +smartphone's
  20 +smartphones
  21 +testbed
  22 +USB
  23 +Wifi
.okwords 0 → 100644
  1 +++ a/.okwords
Makefile 0 → 100644
  1 +++ a/Makefile
  1 +START = noxxxnote nodraft noblue
  2 +END = missing
  3 +PYTEX = $(shell pwd)/pytex/
  4 +CLASS = $(PYTEX)/cls/sig-alternate-10pt.cls
  5 +
  6 +all: paper ABSTRACT
  7 +
  8 +open:
  9 + @nohup acroread -openInNewWindow paper.pdf 1>/dev/null 2>/dev/null &
  10 +
  11 +figures:
  12 + @cd figures ; make
  13 +
  14 +ABSTRACT: $(PYTEX)/bin/clean $(PYTEX)/bin/lib.py abstract.tex
  15 + @$(PYTEX)/bin/clean abstract.tex ABSTRACT
  16 +
  17 +# 16 Nov 2010 : GWA : Add other cleaning rules here.
  18 +
  19 +clean: rulesclean
  20 + @rm -f ABSTRACT
  21 +
  22 +include $(PYTEX)/make/Makerules
  23 +
  24 +spellcheck: .spellcheck | silent
  25 +
  26 +.spellcheck: $(PAPER_TEXFILES) .okwords
  27 + @hunspell -t -l -p $(PWD)/.ispell_english $(PAPER_TEXFILES) | sort -f | uniq | tee badwords && touch .spellcheck
  28 +
  29 +silent:
  30 + @:
  31 +
  32 +.PHONY:
  33 + spellcheck
abstract.tex 0 → 100644
  1 +++ a/abstract.tex
  1 +\begin{abstract}
  2 +
  3 +Write an abstract here.
  4 +
  5 +\end{abstract}
badwords 0 → 100644
  1 +++ a/badwords
common.tex 0 → 100644
  1 +++ a/common.tex
  1 +% 16 Nov 2010 : GWA : Any special macros or other stuff for this particular
  2 +% paper go here.
  3 +
  4 +\newcommand{\PhoneLab}{\textsc{PhoneLab}}
  5 +\hyphenation{Phone-Lab}
figures/.gitignore 0 → 100644
  1 +++ a/figures/.gitignore
  1 +*.pyc
figures/logos/blue.jpg 0 → 100644

7 KB

include/start.tex 0 → 100644
  1 +++ a/include/start.tex
  1 +\documentclass{sig-alternate-10pt}
  2 +\usepackage{times,datetime,url,hyperref}
  3 +\usepackage{url,graphicx,multirow,color,calc,ulem,threeparttable,tabularx,booktabs,enumitem,comment,subcaption,balance,leading}
  4 +\usepackage[group-separator={,}]{siunitx}
  5 +
  6 +\hypersetup{
  7 + bookmarks=true,
  8 + unicode=true,
  9 + pdftoolbar=true,
  10 + pdfmenubar=true,
  11 + pdffitwindow=true,
  12 + pdfstartview={FitV},
  13 + pdftitle={},
  14 + pdfauthor={},
  15 + pdfnewwindow=true,
  16 + colorlinks=false,
  17 + pdfdisplaydoctitle=true,
  18 + pdfborder={0 0 0},
  19 +}
  20 +
  21 +\usepackage[absolute]{textpos}
  22 +
  23 +\setlength{\TPHorizModule}{1in}
  24 +\setlength{\TPVertModule}{1in}
  25 +\textblockorigin{0.75in}{0.5in}
  26 +
  27 +\usepackage[all]{hypcap}
  28 +
  29 +\setlist[itemize]{leftmargin=*,itemsep=-0.1ex}
  30 +\setlist[enumerate]{leftmargin=*,topsep=-0.1ex}
  31 +
  32 +\paperheight 11in
  33 +\paperwidth 8.5in
  34 +
  35 +\newcommand*{\refname}{References}
  36 +
  37 +\input{.xxxnote}
  38 +\input{.draft}
  39 +\input{.blue}
  40 +\input{common.tex}
paper.tex 0 → 100644
  1 +++ a/paper.tex
  1 +\input{./include/start.tex}
  2 +
  3 +\def\theconference{HotMobile'16}
  4 +\def\thetitle{Poster: Quantifying Quality of Experience Using the Screen as a Sensor}
  5 +\def\theauthors{Scott Haseley$^\star$, Geoffrey Challen$^\star$}
  6 +\def\theemails{\{shaseley,challen\}@buffalo.edu}
  7 +
  8 +\ifdefined\isdraft
  9 + \usepackage{fancyhdr}
  10 + \pagestyle{fancy}
  11 + \renewcommand{\headrulewidth}{0pt}
  12 + \lhead{}
  13 + \chead{Under Submission to \theconference. Do not distribute.}
  14 + \rhead{}
  15 +\else
  16 +\fi
  17 +
  18 +\begin{document}
  19 +
  20 +\ifdefined\isblue
  21 +\begin{textblock}{1}(6.4,0)
  22 +\noindent\href{http://blue.cse.buffalo.edu}{\includegraphics[width=0.6in]{./figures/logos/blue.jpg}}
  23 +\end{textblock}
  24 +\else
  25 +\fi
  26 +
  27 +\date{}
  28 +
  29 +\title{\thetitle}
  30 +
  31 +\numberofauthors{1}
  32 +
  33 +\author{
  34 + \alignauthor\theauthors\\[0.05in]
  35 + \affaddr{$\star$ University at Buffalo}\\
  36 +\email{\theemails}
  37 +}
  38 +
  39 +\CopyrightYear{2016}
  40 +\crdata{}
  41 +
  42 +\hypersetup{
  43 + pdfinfo={
  44 + Title={\thetitle},
  45 + Author={\theauthors}
  46 + },
  47 +}
  48 +
  49 +\maketitle
  50 +
  51 +\input{abstract.tex}
  52 +
  53 +{\scriptsize
  54 +\renewcommand{\baselinestretch}{0.8}
  55 +\bibliographystyle{acm}
  56 +\bibliography{references}
  57 +}
  58 +
  59 +\end{document}
pytex/.gitignore 0 → 100644
  1 +++ a/pytex/.gitignore
  1 +/.pydevproject
  2 +/.project
  3 +*.pyc
  4 +*.swp
pytex/README 0 → 100644
  1 +++ a/pytex/README
  1 +To use, create a PYTEX environment variable and point it at the directory
  2 +where you install these files.
  3 +
  4 +This contains a combined Python-Latex build system useful for generating
  5 +scientific documents.
  6 +
  7 +bin/ contains useful Python tools for generating and building Latex
  8 +documents.
  9 +
  10 +cls/ contains useful class files for NSF proposals, letters, etc. Most of
  11 +these are based on the Memoir Latex package.
  12 +
  13 +make/ contains a Make system designed to be used with these Python tools.
  14 +
  15 +skel/ contains a set of example directories using each of the class files in
  16 +cls/.
  17 +
  18 +docs/ contains the Memoir Latex package and a reminder about how to write NSF
  19 +broader impact sections.
pytex/bin/.gitignore 0 → 100644
  1 +++ a/pytex/bin/.gitignore
  1 +/flatex
  2 +*.pyc
pytex/bin/blank 0 → 100755
  1 +++ a/pytex/bin/blank
  1 +#!/usr/bin/env python
  2 +
  3 +import sys,subprocess
  4 +subprocess.check_output("convert -size %dx%d -density 300 -format pdf xc:white -bordercolor black -border 1x1 %s" % \
  5 + ((int(float(sys.argv[2]) * 300.) - 1),
  6 + (int(float(sys.argv[3]) * 300.) - 1),
  7 + sys.argv[1]), shell=True)
pytex/bin/clean 0 → 100755
  1 +++ a/pytex/bin/clean
  1 +#!/usr/bin/env python
  2 +
  3 +import lib, sys
  4 +from optparse import OptionParser
  5 +import re
  6 +
  7 +parser = OptionParser()
  8 +(options, args) = parser.parse_args()
  9 +
  10 +if len(args) < 2:
  11 + sys.exit(1)
  12 +
  13 +if args[0] == "-":
  14 + dirty_string = sys.stdin.read()
  15 +else:
  16 + dirty_string = open(args[0], "r").read()
  17 +
  18 +match = re.search(r"""(?ms)<clean:start>\s*(?P<excerpt>.*?)\s*<clean:end>""", dirty_string)
  19 +if match != None:
  20 + dirty_string = match.group('excerpt')
  21 +
  22 +if args[1] == "-":
  23 + outfile = sys.stdout
  24 +else:
  25 + outfile = open(args[1], "w")
  26 +
  27 +outfile.write(lib.clean(dirty_string).encode('utf8'))
pytex/bin/flatex.c 0 → 100644
  1 +++ a/pytex/bin/flatex.c
  1 +/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
  2 + * flatex.c -
  3 + * Flatten a latex file into a single file, by explicitly including
  4 + * the files inclued by \include and \input commands. Also, if bibtex is
  5 + * beeing used, then includes the .bbl file into the resulting file. Thus,
  6 + * creating a stand alone latex file that can be emailed to someone else.
  7 + *
  8 + * Compile : gcc -o flatex flatex.c
  9 + * Tested on : Linux + gcc
  10 + * By : Sariel Har-Peled
  11 + * Email : sariel@math.tau.ac.il
  12 + * WEB Page : http://www.math.tau.ac.il/~sariel/flatex.html
  13 + * Status : You can do whatever you like with this program. please
  14 + * email me bugs & suggestions.
  15 + *
  16 + * To do : Add support to the includeonly command.
  17 + *-----------------------------------------------------------------------
  18 + * FLATEX 1.21, 1994, 1996, by Sariel Har-Peled.
  19 + *
  20 + * flatex - create a single latex file with no include/inputs
  21 + *
  22 + * flatex [-v] [-x FileName] [files]
  23 + * -v Verbose, display file structure.
  24 + * -x Unflatex: extract files from archive
  25 + * -q Quiet mode. Cleaner output but -x can not be used.
  26 + * -b Do not insert bibiliography file(.bbl)
  27 + *
  28 + * Flatex page: http://www.math.tau.ac.il/~sariel/flatex.html
  29 + *-----------------------------------------------------------------------
  30 + * History:
  31 + * 26/8/96, 1.21
  32 + * Fixed bug with includegraphics command.
  33 +\*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  34 +
  35 +#include <stdlib.h>
  36 +#include <stdio.h>
  37 +#include <string.h>
  38 +#include <math.h>
  39 +#include <ctype.h>
  40 +
  41 +
  42 +/*======================================================================
  43 + * Static constants.
  44 +\*======================================================================*/
  45 +#define LINE_SIZE 1000
  46 +#define FALSE 0
  47 +#define TRUE 1
  48 +#define USE_ARGUMENT( X ) ((void)X)
  49 +
  50 +
  51 +/*======================================================================
  52 + * Types
  53 +\*======================================================================*/
  54 +typedef struct {
  55 + char verbose;
  56 + char fBibInsert, fQuiet;
  57 + int cSpecialInputLevel;
  58 + char szFullName[ LINE_SIZE ];
  59 +} structFlags;
  60 +
  61 +
  62 +/*======================================================================
  63 + * Static prototypes.
  64 +\*======================================================================*/
  65 +static void flatIt( FILE * flOut,
  66 + char * szInName,
  67 + int level,
  68 + structFlags * pFlags );
  69 +static void replaceExt( char * str, char * ext );
  70 +
  71 +
  72 +/*======================================================================
  73 + * Start of Code
  74 +\*======================================================================*/
  75 +
  76 +
  77 +static void spacesByLevel( int level )
  78 +{
  79 + while ( level > 0 ) {
  80 + printf( " " );
  81 + level--;
  82 + }
  83 +}
  84 +
  85 +
  86 +static void printHelp( void )
  87 +{
  88 + printf( "flatex - create a single latex file with no include/inputs\n" );
  89 + printf( "\n\tflatex [-v] [-x FileName] [files]\n" );
  90 + printf( "\t\t-v\tVerbose, display file structure.\n" );
  91 + printf( "\t\t-x\tUnflatex: extract files from archive\n" );
  92 + printf( "\t\t-q\tQuiet mode. Cleaner output but -x can not be used.\n" );
  93 + printf( "\t\t-b\tDo not insert bibiliography file(.bbl)\n" );
  94 + printf( "\nFlatex page: http://www.math.tau.ac.il/~sariel/flatex.html\n" );
  95 + printf( "\n" );
  96 +}
  97 +
  98 +
  99 +static void * myMalloc( unsigned int size )
  100 +{
  101 + void * ptr;
  102 +
  103 + ptr = malloc( size );
  104 + if ( ptr == NULL ) {
  105 + fprintf( stderr, "Not enough memory" );
  106 + exit( -1 );
  107 + }
  108 +
  109 + return ptr;
  110 +}
  111 +
  112 +
  113 +static void handleIncludeCommand( char * line,
  114 + char * lpszInclude,
  115 + FILE * flOut,
  116 + int level,
  117 + structFlags * pFlags )
  118 +{
  119 + char * lpszBrace, * lpszName, * lpszEndBrace;
  120 + char ch, fInput = 0;
  121 +
  122 + lpszBrace = NULL;
  123 +
  124 + if ( strncmp( lpszInclude, "\\input", 6 ) == 0 ) {
  125 + lpszBrace = lpszInclude + 6;
  126 + fInput = 1;
  127 + } else
  128 + if ( strncmp( lpszInclude, "\\include", 8 ) == 0 ) {
  129 + lpszBrace = lpszInclude + 8;
  130 + }
  131 +
  132 + ch = *lpszInclude;
  133 + *lpszInclude = 0;
  134 + fputs( line, flOut );
  135 + *lpszInclude = ch;
  136 +
  137 + lpszEndBrace = strchr( lpszBrace, '}' );
  138 + if ( *lpszBrace != '{' || lpszEndBrace == NULL ) {
  139 + fprintf( stderr, "ERROR: Expected brace not found.\n\n\tline:%s\n",
  140 + line );
  141 + exit( -1 );
  142 + }
  143 +
  144 + *lpszEndBrace = 0;
  145 + lpszName = (char *)myMalloc( LINE_SIZE );
  146 + strcpy( lpszName, lpszBrace + 1 );
  147 + if ( ! fInput )
  148 + replaceExt( lpszName, ".tex" );
  149 +
  150 + flatIt( flOut, lpszName, level + 1, pFlags );
  151 +
  152 + lpszEndBrace++;
  153 + while ( *lpszEndBrace ) {
  154 + *line++ = *lpszEndBrace++;
  155 + }
  156 + *line = 0;
  157 +
  158 + free( lpszName );
  159 +}
  160 +
  161 +
  162 +static char isBefore( char * lpszA, char * lpszB )
  163 +{
  164 + if ( lpszB == NULL )
  165 + return TRUE;
  166 + if ( lpszA == NULL )
  167 + return FALSE;
  168 +
  169 + if ( (int)( lpszA -lpszB ) < 0 ) {
  170 + return TRUE;
  171 + }
  172 + return FALSE;
  173 +}
  174 +
  175 +
  176 +static FILE * fopenTex( char * file,
  177 + char * mode )
  178 +{
  179 + FILE * fl;
  180 +
  181 + fl = fopen( file, mode );
  182 + if ( fl != NULL )
  183 + return fl;
  184 +
  185 + replaceExt( file, ".tex" );
  186 + fl = fopen( file, mode );
  187 +
  188 + return fl;
  189 +}
  190 +
  191 +
  192 +static char isTexFileExists( char * file )
  193 +{
  194 + FILE * fl;
  195 +
  196 + fl = fopenTex( file, "rt" );
  197 + if ( fl != NULL ) {
  198 + fclose( fl );
  199 + return 1;
  200 + }
  201 +
  202 + return 0;
  203 +}
  204 +
  205 +
  206 +static void addTexExt( char * file )
  207 +{
  208 + FILE * fl;
  209 +
  210 + fl = fopenTex( file, "rt");
  211 + if ( fl != NULL )
  212 + fclose( fl );
  213 +}
  214 +
  215 +
  216 +static char is_str_prefix( char * str, char * prefix )
  217 +{
  218 + int len;
  219 +
  220 + if ( str == NULL || prefix == NULL )
  221 + return 0;
  222 +
  223 + len = strlen( prefix );
  224 +
  225 + return (strncmp( str, prefix, len ) == 0);
  226 +}
  227 +
  228 +
  229 +static void flatIt( FILE * flOut,
  230 + char * pSzInName,
  231 + int level,
  232 + structFlags * pFlags )
  233 +{
  234 + FILE * flIn;
  235 + char * str, * lpszInput, * lpszInclude, * line, * lpszRem, *inc;
  236 + char * lpszLine, * lpszRemark, * lpszBib, * lpszBibStyle;
  237 + char * lpszNewCommand, * lpszName;
  238 + char cont;
  239 + char repFlag;
  240 + char szInName[ 100 ];
  241 + char fInclude;
  242 +
  243 + strcpy( szInName, pSzInName );
  244 +
  245 + addTexExt( szInName );
  246 + if ( ! pFlags->fQuiet )
  247 + fprintf( flOut, "%%%cflatex input: [%s]\n",
  248 + pFlags->cSpecialInputLevel > 0? '*' : ' ',
  249 + szInName );
  250 + if ( pFlags->verbose ) {
  251 + printf( "\t" );
  252 + spacesByLevel( level );
  253 + printf( "%s\n", szInName );
  254 + }
  255 +
  256 + line = (char *)myMalloc( LINE_SIZE );
  257 + lpszLine = (char *)myMalloc( LINE_SIZE );
  258 + lpszRemark = (char *)myMalloc( LINE_SIZE );
  259 +
  260 + flIn = fopenTex( szInName, "rt" );
  261 + if ( flIn == NULL ) {
  262 + fprintf( stderr, "Unable to open file: %s\n", szInName );
  263 + exit( -1 );
  264 + }
  265 +
  266 + *lpszRemark = 0;
  267 + while ( ! feof( flIn ) ) {
  268 + str = fgets( line, LINE_SIZE, flIn );
  269 + if ( str == NULL )
  270 + break;
  271 +
  272 + fInclude = FALSE;
  273 +
  274 + strcpy( lpszLine, line );
  275 +
  276 + lpszRem = strchr( line, '%' );
  277 + if ( lpszRem != NULL ) {
  278 + strcpy( lpszRemark, lpszRem );
  279 + *lpszRem = 0;
  280 + }
  281 +
  282 + do {
  283 + cont = 0;
  284 + lpszInput = strstr( line, "\\input" );
  285 +
  286 + lpszBib = strstr( line, "\\bibliography" );
  287 + lpszBibStyle = strstr( line, "\\bibliographystyle" );
  288 +
  289 + if ( pFlags->fBibInsert &&
  290 + ( lpszBib != NULL || lpszBibStyle != NULL ) ) {
  291 + lpszName = (char *)myMalloc( LINE_SIZE );
  292 +
  293 + strcpy( lpszName, lpszLine );
  294 + strcpy( lpszLine, pFlags->fQuiet? "%" : "%FLATEX-REM:" );
  295 + strcat( lpszLine, lpszName );
  296 +
  297 + if ( lpszBibStyle != NULL ) {
  298 + strcpy( lpszName, pFlags->szFullName );
  299 + replaceExt( lpszName, ".bbl" );
  300 +
  301 + pFlags->cSpecialInputLevel++;
  302 + flatIt( flOut, lpszName, level + 1, pFlags );
  303 + pFlags->cSpecialInputLevel--;
  304 +
  305 + if ( pFlags->verbose ) {
  306 + printf( "\t" );
  307 + spacesByLevel( level + 1 );
  308 + printf( "(Bibiliography)\n" );
  309 + }
  310 + }
  311 + break;
  312 + }
  313 +
  314 + inc = line;
  315 + do {
  316 + repFlag = 0;
  317 + lpszInclude = strstr( inc, "\\include" );
  318 +
  319 + if ( is_str_prefix( lpszInclude, "\\includeversion" )
  320 + || is_str_prefix( lpszInclude,
  321 + "\\includegraphics" ) ) {
  322 + repFlag = 1;
  323 + inc = lpszInclude + 1;
  324 + continue;
  325 + }
  326 +
  327 + if ( is_str_prefix( lpszInclude, "\\includeonly" ) ) {
  328 + fprintf( stderr, "WARNING: \"\\includeonly\" command "
  329 + "ignored\n" );
  330 + inc = lpszInclude + 1;
  331 + repFlag = 1;
  332 + continue;
  333 + }
  334 + if ( lpszInclude != NULL && isalpha( lpszInclude[ 8 ] ) ) {
  335 + fprintf( stderr,
  336 + "\nWarning: include-like(?) command ignored"
  337 + " at line:\n\t%s", lpszLine );
  338 + inc = lpszInclude + 1;
  339 + repFlag = 1;
  340 + continue;
  341 + }
  342 + } while ( repFlag );
  343 +
  344 + if ( isBefore( lpszInput, lpszInclude ) )
  345 + lpszInclude = lpszInput;
  346 +
  347 + if ( lpszInclude != NULL ) {
  348 + lpszNewCommand = strstr( line, "\\newcommand" );
  349 + if ( lpszNewCommand == NULL ) {
  350 + handleIncludeCommand( line, lpszInclude, flOut, level,
  351 + pFlags );
  352 + cont = 1;
  353 + fInclude = TRUE;
  354 + }
  355 + }
  356 + } while ( cont );
  357 + if ( fInclude ) {
  358 + strcat( line, lpszRemark );
  359 + fputs( line, flOut );
  360 + } else
  361 + fputs( lpszLine, flOut );
  362 + }
  363 +
  364 + fclose( flIn );
  365 + fputs( "\n", flOut );
  366 +
  367 + if ( ! pFlags->fQuiet )
  368 + fprintf( flOut, "%% flatex input end: [%s]\n", szInName );
  369 +
  370 + free( line );
  371 + free( lpszLine );
  372 + free( lpszRemark );
  373 +}
  374 +
  375 +
  376 +static void replaceExt( char * str, char * ext )
  377 +{
  378 + int len, ind;
  379 +
  380 + len = strlen( str );
  381 + ind = len - 1;
  382 + while ( ind >= 0 && str[ ind ] != '.' && str[ ind ] != '\\' &&
  383 + str[ ind ] != '/' )
  384 + ind--;
  385 +
  386 + if ( ind >= 0 && str[ ind ] == '.' ) {
  387 + str[ ind ] = 0;
  388 + }
  389 +
  390 + strcat( str, ext );
  391 +}
  392 +
  393 +static char strCmpPrefixAndCopy( char * line,
  394 + char * str,
  395 + char * outName )
  396 +{
  397 + char * pos, * pPreLine;
  398 +
  399 + pPreLine = line;
  400 +
  401 + pos = strstr( line, str );
  402 + if ( pos == NULL )
  403 + return 0;
  404 +
  405 + line = pos + strlen( str );
  406 + strcpy( outName, line );
  407 + pos = strchr( outName, ']' );
  408 +
  409 + if ( pos == NULL ) {
  410 + fprintf( stderr, "Error encountered in line: [%s]", pPreLine );
  411 + exit( -1 );
  412 + }
  413 + *pos = 0;
  414 +
  415 + return 1;
  416 +}
  417 +
  418 +
  419 +static void writeFile( FILE * flIn,
  420 + char * pOutName,
  421 + int level )
  422 +{
  423 + FILE * flOut;
  424 + char * lpszLine;
  425 + char line[ LINE_SIZE ], outName[ LINE_SIZE ];
  426 + char flag;
  427 +
  428 + outName[ 0 ] = 0;
  429 +
  430 + if ( pOutName == NULL ) {
  431 + flOut = NULL;
  432 + printf( "Scanning for flatex archive start...\n" );
  433 + } else {
  434 + flOut = fopen( pOutName, "wt" );
  435 + if ( flOut == NULL ) {
  436 + fprintf( stderr, "Unable to open file: %s", pOutName );
  437 + exit( -1 );
  438 + }
  439 + spacesByLevel( level );
  440 + printf( "[%s]\n", pOutName );
  441 + }
  442 +
  443 + do {
  444 + lpszLine = fgets( line, LINE_SIZE, flIn );
  445 + if ( lpszLine == NULL )
  446 + break;
  447 +
  448 + flag = strCmpPrefixAndCopy( line, "% flatex input end: [", outName );
  449 + if ( flag ) {
  450 + if ( flOut == NULL ) {
  451 + fprintf( stderr, "Something is wrong!!!!\n" );
  452 + exit( -1 );
  453 + }
  454 + //spacesByLevel( level );
  455 + // printf( "/\n" );
  456 + //printf( "Writing [%s] done\n", outName );
  457 + break;
  458 + }
  459 +
  460 + flag = strCmpPrefixAndCopy( line, "% flatex input: [", outName );
  461 + if ( flag ) {
  462 + writeFile( flIn, outName, level + 1 );
  463 + if ( flOut != NULL )
  464 + fprintf( flOut, "\\input{%s}\n", outName );
  465 + } else {
  466 + flag = strCmpPrefixAndCopy( line, "%*flatex input: [", outName );
  467 + if ( flag ) {
  468 + writeFile( flIn, outName, level + 1 );
  469 + } else {
  470 + if ( flOut != NULL ) {
  471 + if ( strncmp( line, "%FLATEX-REM:", 12 ) == 0 )
  472 + fputs( line + 12, flOut );
  473 + else
  474 + fputs( line, flOut );
  475 + }
  476 + }
  477 + }
  478 + } while ( ! feof( flIn ) );
  479 +
  480 + if ( flOut != NULL )
  481 + fclose( flOut );
  482 +}
  483 +
  484 +
  485 +static void flatOutFile( char * fileName,
  486 + structFlags * pFlags )
  487 +{
  488 + FILE * flIn;
  489 +
  490 + USE_ARGUMENT( pFlags );
  491 +
  492 + flIn = fopen( fileName, "rt" );
  493 + if ( flIn == NULL ) {
  494 + fprintf( stderr, "Unable to open file: %s", fileName );
  495 + exit( -1 );
  496 + }
  497 +
  498 + writeFile( flIn, NULL, 0 );
  499 +
  500 + fclose( flIn );
  501 +}
  502 +
  503 +
  504 +static void flatFile( char * fileName,
  505 + structFlags * pFlags )
  506 +{
  507 + char * szInName, * szOutName;
  508 + int inLen;
  509 + FILE * flOut;
  510 +
  511 + szInName = (char *)myMalloc( LINE_SIZE );
  512 + szOutName = (char *)myMalloc( LINE_SIZE );
  513 +
  514 + strcpy( szInName, fileName );
  515 + if ( ! isTexFileExists( szInName ) ) {
  516 + fprintf( stderr, "--Unable to open file: [%s]\n", fileName );
  517 + exit( -1 );
  518 + }
  519 +
  520 + inLen = strlen( szInName );
  521 + if ( inLen < 4 || ( szInName[ inLen ] != '.' &&
  522 + strcmp( szInName + inLen - 4, ".tex" ) != 0 ) ) {
  523 + strcat( szInName, ".tex" );
  524 + }
  525 +
  526 + printf( "input file: [%s]\n", szInName );
  527 +
  528 + strcpy( pFlags->szFullName, szInName );
  529 +
  530 + strcpy( szOutName, szInName );
  531 + replaceExt( szOutName, ".flt" );
  532 +
  533 + flOut = fopen( szOutName, "wt" );
  534 + if ( flOut == NULL ) {
  535 + fprintf( stderr, "Unable to open file: %s", szOutName );
  536 + exit( -1 );
  537 + }
  538 +
  539 + flatIt( flOut, szInName, 0, pFlags );
  540 +
  541 + fclose( flOut );
  542 +
  543 + printf( "\n\tFile: \"%s\" generated\n", szOutName );
  544 +}
  545 +
  546 +
  547 +static char isFlag( char * str, char ch )
  548 +{
  549 + if ( str[ 0 ] == '-' &&
  550 + ( str[ 1 ] == ch || str[ 1 ] == toupper( ch ) )
  551 + && ( str[ 2 ] == 0 ) )
  552 + return TRUE;
  553 +
  554 + return FALSE;
  555 +}
  556 +
  557 +
  558 +int main( int argc, char * argv[] )
  559 +{
  560 + int ind;
  561 + structFlags sFlags;
  562 +
  563 + printf( "FLATEX 1.21, 1994, 1996, by Sariel Har-Peled.\n\n" );
  564 + if ( argc == 1 )
  565 + printHelp();
  566 +
  567 + sFlags.verbose = FALSE;
  568 + sFlags.fBibInsert = TRUE;
  569 + sFlags.cSpecialInputLevel = 0;
  570 + *sFlags.szFullName = 0;
  571 + sFlags.fQuiet = FALSE;
  572 +
  573 + for ( ind = 1; ind < argc; ind++ ) {
  574 + if ( isFlag( argv[ ind ], 'v' ) ) {
  575 + sFlags.verbose = TRUE;
  576 + continue;
  577 + }
  578 + if ( isFlag( argv[ ind ], 'b' ) ) {
  579 + sFlags.fBibInsert = FALSE;
  580 + continue;
  581 + }
  582 + if ( isFlag( argv[ ind ], 'q' ) ) {
  583 + sFlags.fQuiet = TRUE;
  584 + continue;
  585 + }
  586 + if ( isFlag( argv[ ind ], 'x' ) ) {
  587 + flatOutFile( argv[ ind + 1 ], &sFlags );
  588 + ind++;
  589 + continue;
  590 + }
  591 +
  592 + flatFile( argv[ ind ], &sFlags );
  593 + }
  594 + return 0;
  595 +}
  596 +
  597 +/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
  598 + *
  599 + * flatex.c - End of File
  600 +\*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  601 +
pytex/bin/lib.py 0 → 100644
  1 +++ a/pytex/bin/lib.py
  1 +import re
  2 +
  3 +def clean(inlines):
  4 +
  5 + removecomments = re.compile(r"(^%.*\n?)", re.M)
  6 + inlines = removecomments.sub("", inlines)
  7 + collapsespaces = re.compile(r"(?:%\s*)+", re.M)
  8 + inlines = collapsespaces.sub("", inlines)
  9 + fixpercents = re.compile(r"\\%", re.M)
  10 + inlines = fixpercents.sub("%", inlines)
  11 + removetex = re.compile(r"~?\\(((sub)*)section(\*?)|cite|chapter|thispagestyle)\*+\{([^\}]+)\}", re.M)
  12 + inlines = removetex.sub("", inlines)
  13 + removetex2 = re.compile(r"\\(clearpage)", re.M)
  14 + inlines = removetex2.sub("", inlines)
  15 + keeptex = re.compile(r"\\(textit|textbf|texttt|textsc|sloppypar)\{([^\}]+)\}", re.M)
  16 + while True:
  17 + beforelines = inlines
  18 + inlines = keeptex.sub(r"\2", inlines)
  19 + if inlines == beforelines:
  20 + break
  21 + keeptex2 = re.compile(r"\{\\scshape\s+([^\}]+)\}", re.S | re.M)
  22 + inlines = keeptex2.sub(r"\1", inlines)
  23 + quotes = re.compile(r"(``|'')", re.M)
  24 + inlines = quotes.sub(r'"', inlines)
  25 + phonelab_macro = re.compile(r"\\PhoneLab{}", re.M)
  26 + inlines = phonelab_macro.sub("PhoneLab", inlines)
  27 + sciwinet_macro = re.compile(r"\\SciWiNet{}", re.M)
  28 + inlines = sciwinet_macro.sub("SciWiNet", inlines)
  29 + composite_macro = re.compile(r"\\ComPoSiTe{}", re.M)
  30 + inlines = composite_macro.sub("ComPoSiTe", inlines)
  31 + agiledroid_macro = re.compile(r"\\AG{}", re.M)
  32 + inlines = agiledroid_macro.sub("AgileDroid", inlines)
  33 + wifi_macro = re.compile(r"\\wifi{}", re.M)
  34 + inlines = wifi_macro.sub("Wifi", inlines)
  35 + keep_together = re.compile(r"~", re.M)
  36 + inlines = keep_together.sub(" ", inlines)
  37 + en_dashes = re.compile(r"([^-])--([^-])", re.M)
  38 + inlines = en_dashes.sub(u"\\1\u2013\\2", inlines)
  39 + em_dashes = re.compile(r"([^-])---([^-])", re.M)
  40 + inlines = em_dashes.sub(u"\\1\u2014\\2", inlines)
  41 + spaces = re.compile(r"(?:\\space|\\;|\\:)+")
  42 + inlines = spaces.sub(" ", inlines)
  43 + enum = re.compile(r"\\begin\{enumerate\}(.*?)\\end\{enumerate\}", re.S | re.M)
  44 +
  45 +
  46 + class Counter:
  47 + def __init__(self):
  48 + self.count = 0
  49 + def reset(self):
  50 + self.count = 0
  51 + def increment(self, matchObject):
  52 + self.count += 1
  53 + return str(self.count) + "."
  54 +
  55 + def match(m):
  56 + c = Counter()
  57 + item = re.compile(r"\\item")
  58 + text = item.sub(c.increment, m.group(1))
  59 + c.reset()
  60 + return text
  61 + inlines = enum.sub(match, inlines)
  62 +
  63 + removeitem = re.compile(r"~?\\item", re.M)
  64 + inlines = removeitem.sub("", inlines)
  65 + removeflushenumbf = re.compile(r"\\begin\{flushenumbf\}\s+(.*?)\s+\\end\{flushenumbf\}", re.S | re.M)
  66 + inlines = removeflushenumbf.sub(r"\1", inlines)
  67 + removebeginabstract = re.compile(r"\\begin\{abstract\}\s+(.*?)\s+\\end\{abstract\}", re.S | re.M)
  68 + inlines = removebeginabstract.sub(r"\1", inlines)
  69 + inlines = inlines.strip()
  70 +
  71 + lines = re.split(r'\s{2,}', inlines)
  72 +
  73 + while re.match(lines[0], r"^\s*$"):
  74 + lines = lines[1:]
  75 + if len(lines) == 0:
  76 + return ""
  77 + while re.match(lines[-1], r"^\s*$"):
  78 + lines = lines[:-1]
  79 + if len(lines) == 0:
  80 + return ""
  81 +
  82 + output = '\n\n'.join([re.sub(r'\n', ' ', line) for line in lines])
  83 + return output
pytex/bin/number 0 → 100755
  1 +++ a/pytex/bin/number
  1 +#!/usr/bin/env python
  2 +
  3 +from optparse import OptionParser
  4 +import sys, subprocess, time, re, shlex, tempfile, os
  5 +
  6 +parser = OptionParser()
  7 +parser.add_option("-s", "--skip", dest="skip", type=int, default=0, help="number of initial pages to skip (default 0)")
  8 +parser.add_option("-a", "--avoid", dest="avoid", type=str, default="", help="pages to avoid, comma separated (default \"\")")
  9 +(options, args) = parser.parse_args()
  10 +
  11 +avoid = options.avoid.split(",")
  12 +avoid = [int(a) for a in avoid]
  13 +
  14 +infile = args[0]
  15 +outfile = args[1]
  16 +ininfo = subprocess.Popen("pdfinfo \"%s\"" % (infile), shell=True, stdout=subprocess.PIPE).communicate()[0]
  17 +origpages = int(re.search(r'Pages:\s+(\d+)', ininfo).group(1))
  18 +numpages = origpages - options.skip
  19 +
  20 +latexstart = r'''\documentclass[11pt]{memoir}
  21 +\usepackage{times}
  22 +\maxdeadcycles=1000
  23 +\setstocksize{11in}{8.5in}
  24 +\settrimmedsize{11in}{8.5in}{*}
  25 +\settrims{0pt}{0pt}
  26 +\setlrmarginsandblock{1in}{1in}{*}
  27 +\setulmarginsandblock{1in}{1in}{*}
  28 +\setheadfoot{0.1pt}{36pt}
  29 +\setmarginnotes{0.5cm}{1.5cm}{0.1cm}
  30 +\checkandfixthelayout
  31 +\copypagestyle{number}{headings}
  32 +\makeoddhead{number}{}{}{}
  33 +\makeevenhead{number}{}{}{}
  34 +\makeoddfoot{number}{}{\thepage}{}
  35 +\makeevenfoot{number}{}{\thepage}{}
  36 +\begin{document}
  37 +\pagestyle{number}'''
  38 +
  39 +latexend = r'''\end{document}'''
  40 +
  41 +startdir = os.getcwd()
  42 +tempdir = tempfile.mkdtemp()
  43 +subprocess.call("cp \"%s\" \"%s\"/A.pdf" % (infile, tempdir), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  44 +os.chdir(tempdir)
  45 +latexfile = open('B.tex', 'w')
  46 +print >>latexfile, latexstart
  47 +for a in range(numpages):
  48 + print >>latexfile, r'''\mbox{}
  49 +\newpage'''
  50 +print >>latexfile, latexend
  51 +latexfile.close()
  52 +subprocess.Popen("pdflatex --interaction=nonstopmode B.tex", shell=True, stdout=subprocess.PIPE).communicate()[0]
  53 +subprocess.Popen(r"pdftk A.pdf burst output A%03d.pdf", shell=True, stdout=subprocess.PIPE).communicate()[0]
  54 +subprocess.Popen(r"pdftk B.pdf burst output B%03d.pdf", shell=True, stdout=subprocess.PIPE).communicate()[0]
  55 +Boffset = options.skip
  56 +for Aindex in range(origpages):
  57 + Aindex += 1
  58 + if (Aindex <= Boffset) or ((Aindex - Boffset) in avoid):
  59 + subprocess.Popen(r"cp A%03d.pdf C%03d.pdf" % (Aindex, Aindex), shell=True, stdout=subprocess.PIPE).communicate()[0]
  60 + else:
  61 + subprocess.Popen(r"pdftk A%03d.pdf background B%03d.pdf output C%03d.pdf" % (Aindex, Aindex - Boffset, Aindex), shell=True, stdout=subprocess.PIPE).communicate()[0]
  62 +subprocess.Popen(r"pdftk %s output D.pdf" % (' '.join(["C%03d.pdf" % (i + 1) for i in range(origpages)])), shell=True, stdout=subprocess.PIPE).communicate()[0]
  63 +subprocess.call("cp D.pdf \"%s\"/\"%s\"" % (startdir, outfile), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  64 +
  65 +os.chdir(startdir)
pytex/bin/rotateandstitch 0 → 100755
  1 +++ a/pytex/bin/rotateandstitch
  1 +#!/usr/bin/env python
  2 +
  3 +from optparse import OptionParser
  4 +import sys, subprocess, time, re, shlex
  5 +
  6 +parser = OptionParser()
  7 +(options, args) = parser.parse_args()
  8 +
  9 +pagesize = re.compile(r'Page size:\s+(\d+)\s+x\s+(\d+)')
  10 +files = []
  11 +outpdf = args.pop(0)
  12 +for arg in args:
  13 + output = subprocess.Popen("pdfinfo \"%s\"" % (arg), shell=True, stdout=subprocess.PIPE).communicate()[0]
  14 + pagematch = pagesize.search(output)
  15 + if pagematch == None:
  16 + continue
  17 + if pagematch.group(1) < pagematch.group(2):
  18 + files.append(arg)
  19 + continue
  20 + infile = arg
  21 + outfile = re.sub(r'.pdf', '.rotate.pdf', infile)
  22 + output = subprocess.Popen("pdftk \"%s\" cat 1-endW output \"%s\"" % (infile, outfile), shell=True, stdout=subprocess.PIPE).communicate()[0]
  23 + files.append(outfile)
  24 +
  25 +def order(pdf):
  26 + nummatch = re.search(r'(\d+)', pdf)
  27 + if nummatch == None:
  28 + return 0
  29 + else:
  30 + return int(nummatch.group(1))
  31 +
  32 +files = sorted(files, key=order)
  33 +output = subprocess.Popen("pdftk %s cat output \"%s\"" % (' '.join(['"%s"' % (file) for file in files]), outpdf), shell=True, stdout=subprocess.PIPE).communicate()[0]
pytex/bin/texincludes 0 → 100755
  1 +++ a/pytex/bin/texincludes
  1 +#!/usr/bin/env python
  2 +
  3 +import sys,re,glob,StringIO,os,tempfile,filecmp,shutil
  4 +from optparse import OptionParser
  5 +
  6 +parser = OptionParser()
  7 +(options, args) = parser.parse_args()
  8 +
  9 +if len(args) < 1:
  10 + sys.exit(1)
  11 +
  12 +files = glob.glob("*.tex")
  13 +
  14 +if len(files) == 0:
  15 + sys.exit(0)
  16 +
  17 +outfile = tempfile.NamedTemporaryFile(delete=False)
  18 +
  19 +docfile = re.compile(r"""(?m)^(?!\s*%).*\\begin\{document\}""")
  20 +inputs = re.compile(r"""(?m)^(?!\s*%).*\\input{(.*)}""")
  21 +bibs = re.compile(r"""(?m)^(?!\s*%).*\\bibliography\{(.*)\}""")
  22 +citations = re.compile(r"""^(?m)^(?!\s*%).*\\(?:no|n)?cite""")
  23 +graphics = re.compile(r"""(?m)^(?!\s*%).*\\includegraphics(\[.*?\])?\{(.*?)\}""")
  24 +withpdf = re.compile(r"^.*\.pdf$")
  25 +nobibtex = re.compile(r"""(?m)^% !NOBIBTEX!""")
  26 +
  27 +nobibtexs = {}
  28 +
  29 +output = StringIO.StringIO()
  30 +allnames = []
  31 +
  32 +for f in files:
  33 + lines = open(f, "r").read()
  34 + if not docfile.search(lines):
  35 + continue
  36 + input_files = []
  37 + bib_files = []
  38 + graphic_files = []
  39 + toprocess = [f]
  40 +
  41 + docitations = False
  42 + dontbibtex = False
  43 + fbasename = os.path.splitext(f)[0]
  44 +
  45 + while len(toprocess) > 0:
  46 + try:
  47 + lines = open(toprocess[0], "r").read()
  48 + if nobibtex.search(lines):
  49 + nobibtexs[toprocess[0]] = True
  50 + else:
  51 + nobibtexs[toprocess[0]] = False
  52 + if len(citations.findall(lines)) > 0:
  53 + docitations = True
  54 + toprocess += inputs.findall(lines)
  55 + b = bibs.finditer(lines)
  56 + for m in b:
  57 + allbibs = m.group(1).split(",")
  58 + for bib in allbibs:
  59 + bib_files.append(bib + ".bib")
  60 + g = graphics.finditer(lines)
  61 + for m in g:
  62 + if withpdf.match(m.group(2)):
  63 + graphic_files.append(m.group(2))
  64 + else:
  65 + path, ext = os.path.splitext(m.group(2))
  66 + if ext == '':
  67 + graphic_files.append(path + ".pdf")
  68 + else:
  69 + graphic_files.append(m.group(2))
  70 + except Exception, e:
  71 + pass
  72 + input_files.append(toprocess.pop(0))
  73 +
  74 + all_files = input_files
  75 + all_files.extend(graphic_files)
  76 + all_files.extend(bib_files)
  77 + for file in args[1:]:
  78 + all_files.append(file)
  79 + allnames.append(fbasename)
  80 +
  81 + tex_files = [all_file for all_file in all_files if all_file.endswith(".tex")]
  82 + print >>output, "%s_TEXFILES=%s" % (fbasename.upper(), " ".join(tex_files),)
  83 + print >>output, "%s : LOG := %s.log" % (fbasename, fbasename)
  84 + print >>output, "%s : PDF := %s.pdf" % (fbasename, fbasename)
  85 + print >>output, "%s : $(START) %s.pdf $(END)" % (fbasename, fbasename)
  86 + print >>output, "%s.ps : %s.pdf" % (fbasename, fbasename)
  87 + print >>output, "%s.pdf %s.blg : .deps %s" % (fbasename, fbasename, " ".join(all_files))
  88 + if docitations and not nobibtexs[f]:
  89 + print >>output, "\txelatex -shell-escape %s" % (f)
  90 + print >>output, "\tbibtex %s" % (fbasename)
  91 + print >>output, "\txelatex -shell-escape %s" % (f)
  92 + print >>output, "\txelatex -shell-escape %s" % (f)
  93 + else:
  94 + print >>output, "\txelatex -shell-escape %s" % (f)
  95 + print >>output, "\txelatex -shell-escape %s" % (f)
  96 + print >>output, "spell-%s : %s" % (fbasename, " ".join(tex_files),)
  97 + print >>output, "\t@hunspell -t -l -p $(PWD)/.okwords %s | sort -f | uniq" % (" ".join(tex_files),)
  98 + print >>output, "open-%s : %s" % (fbasename, " ".join(tex_files),)
  99 + print >>output, "\t@$(PYTEXOPEN) %s.pdf 1>/dev/null 2>/dev/null &" % (fbasename,)
  100 +
  101 +print >>outfile, output.getvalue(),
  102 +print >>outfile, "PDFS = %s" % (" ".join([n + ".pdf" for n in allnames]))
  103 +outfile.close()
  104 +
  105 +shutil.move(outfile.name, args[0])
pytex/bin/wc 0 → 100755
  1 +++ a/pytex/bin/wc
  1 +#!/usr/bin/env python
  2 +
  3 +import lib
  4 +import sys, re, os
  5 +from optparse import OptionParser
  6 +
  7 +parser = OptionParser()
  8 +parser.add_option("-o", "--overonly", dest="overonly", action="store_true", default=False, help="only display sections over the word count (default False)")
  9 +(options, args) = parser.parse_args()
  10 +
  11 +if len(args) < 2:
  12 + sys.exit(1)
  13 +
  14 +if args[0] == "-":
  15 + inlines = sys.stdin.read()
  16 +else:
  17 + try:
  18 + inlines = open(args[0], "r").read()
  19 + except:
  20 + sys.exit(1)
  21 +
  22 +if args[1] == "-":
  23 + outfile = sys.stdout
  24 +else:
  25 + try:
  26 + outfile = open(args[1], "w")
  27 + except:
  28 + sys.exit(1)
  29 +
  30 +clean = re.compile(r'<wc:start description="([^"]*)" max=(\d+)>(.*?)<wc:end>', re.S)
  31 +index = 1
  32 +for f in clean.finditer(inlines):
  33 + description = f.group(1)
  34 + max = int(f.group(2))
  35 + count = len(lib.clean(f.group(3)).split())
  36 + if not options.overonly or count > max:
  37 + if count > max:
  38 + char = "*"
  39 + else:
  40 + char = " "
  41 + print "%c %2d. M:%3d C:%3d %s" % (char, index, max, count, description)
  42 + index += 1
  43 +clean = re.compile(r'<cc:start description="([^"]*)" max=(\d+)>(.*?)<cc:end>', re.S)
  44 +index = 1
  45 +for f in clean.finditer(inlines):
  46 + description = f.group(1)
  47 + max = int(f.group(2))
  48 + count = len(lib.clean(f.group(3)).strip())
  49 + if not options.overonly or count > max:
  50 + if count > max:
  51 + char = "*"
  52 + else:
  53 + char = " "
  54 + print "%c %2d. M:%3d C:%3d %s" % (char, index, max, count, description)
  55 + index += 1
pytex/cls/sig-alternate-10pt.cls 0 → 100644
  1 +++ a/pytex/cls/sig-alternate-10pt.cls
  1 +% SIG-ALTERNATE.CLS - VERSION 2.4
  2 +% "COMPATIBLE" WITH THE "ACM_PROC_ARTICLE-SP.CLS" V3.2SP
  3 +% Gerald Murray - April 22nd. 2009
  4 +%
  5 +% ---- Start of 'updates' ----
  6 +%
  7 +% Updated 10pt version to conform to advertised formatting requirements
  8 +% (leading 11.9pt -> 12.0pt, textheight 660pt -> 666pt) - Dec 9 2009
  9 +% Geoff Voelker
  10 +%
  11 +% Changed $5 fee to $10 - Gerry
  12 +% April 22nd. 2009 - Fixed 'Natbib' incompatibility problem - Gerry
  13 +% April 22nd. 2009 - Fixed 'Babel' incompatibility problem - Gerry
  14 +% April 22nd. 2009 - Inserted various bug-fixes and improvements - Gerry
  15 +%
  16 +% To produce Type 1 fonts in the document plus allow for 'normal LaTeX accenting' in the critical areas;
  17 +% title, author block, section-heads, confname, etc. etc.
  18 +% i.e. the whole purpose of this version update is to NOT resort to 'inelegant accent patches'.
  19 +% After much research, three extra .sty packages were added to the the tail (ae, aecompl, aeguill) to solve,
  20 +% in particular, the accenting problem(s). We _could_ ask authors (via instructions/sample file) to 'include' these in
  21 +% the source .tex file - in the preamble - but if everything is already provided ('behind the scenes' - embedded IN the .cls)
  22 +% then this is less work for authors and also makes everything appear 'vanilla'.
  23 +% NOTE: all 'patchwork accenting" has been commented out (here) and is no longer 'used' in the sample .tex file (either).
  24 +% Gerry June 2007
  25 +%
  26 +% Patch for accenting in conference name/location. Gerry May 3rd. 2007
  27 +% Rule widths changed to .5, author count (>6) fixed, roll-back for Type 3 problem. Gerry March 20th. 2007
  28 +%
  29 +% Changes made to enable easier reviewing by fixing font size to 10pt - Jan. 3th. 2007
  30 +% Anja Feldmann
  31 +%
  32 +% Changes made to 'modernize' the fontnames but esp. for MikTeX users V2.4/2.5 - Nov. 30th. 2006
  33 +% Updated the \email definition to allow for its use inside of 'shared affiliations' - Nov. 30th. 2006
  34 +% Fixed the 'section number depth value' - Nov. 30th. 2006
  35 +%
  36 +% Footnotes inside table cells using \minipage (Oct. 2002)
  37 +% Georgia fixed bug in sub-sub-section numbering in paragraphs (July 29th. 2002)
  38 +% JS/GM fix to vertical spacing before Proofs (July 30th. 2002)
  39 +%
  40 +% Made the Permission Statement / Conference Info / Copyright Info
  41 +% 'user definable' in the source .tex file OR automatic if
  42 +% not specified.
  43 +%
  44 +% Allowance made to switch default fonts between those systems using
  45 +% normal/modern font names and those using 'Type 1' or 'Truetype' fonts.
  46 +% See LINE NUMBER 255 for details.
  47 +% Also provided for enumerated/annotated Corollaries 'surrounded' by
  48 +% enumerated Theorems (line 848).
  49 +% Gerry November 11th. 1999
  50 +%
  51 +% ---- End of 'updates' ----
  52 +%
  53 +\def\fileversion{v2.4-10pt} % for ACM's tracking purposes
  54 +\def\filedate{April 22, 2009} % Gerry Murray's tracking data
  55 +\def\docdate {Wednesday 22nd. April 2009} % Gerry Murray (with deltas to doc}
  56 +\usepackage{epsfig}
  57 +\usepackage{amssymb}
  58 +\usepackage{amsmath}
  59 +\usepackage{amsfonts}
  60 +% Need this for accents in Arial/Helvetica
  61 +%\usepackage[T1]{fontenc} % Gerry March 12, 2007 - causes Type 3 problems (body text)
  62 +%\usepackage{textcomp}
  63 +%
  64 +% SIG-ALTERNATE DOCUMENT STYLE
  65 +% G.K.M. Tobin August-October 1999
  66 +% adapted from ARTICLE document style by Ken Traub, Olin Shivers
  67 +% also using elements of esub2acm.cls
  68 +% HEAVILY MODIFIED, SUBSEQUENTLY, BY GERRY MURRAY 2000
  69 +% ARTICLE DOCUMENT STYLE -- Released 16 March 1988
  70 +% for LaTeX version 2.09
  71 +% Copyright (C) 1988 by Leslie Lamport
  72 +%
  73 +%
  74 +%%% sig-alternate.cls is an 'ALTERNATE' document style for producing
  75 +%%% two-column camera-ready pages for ACM conferences.
  76 +%%% THIS FILE DOES NOT STRICTLY ADHERE TO THE SIGS (BOARD-ENDORSED)
  77 +%%% PROCEEDINGS STYLE. It has been designed to produce a 'tighter'
  78 +%%% paper in response to concerns over page budgets.
  79 +%%% The main features of this style are:
  80 +%%%
  81 +%%% 1) Two columns.
  82 +%%% 2) Side and top margins of 4.5pc, bottom margin of 6pc, column gutter of
  83 +%%% 2pc, hence columns are 20pc wide and 55.5pc tall. (6pc =3D 1in, approx)
  84 +%%% 3) First page has title information, and an extra 6pc of space at the
  85 +%%% bottom of the first column for the ACM copyright notice.
  86 +%%% 4) Text is 9pt on 10pt baselines; titles (except main) are 9pt bold.
  87 +%%%
  88 +%%%
  89 +%%% There are a few restrictions you must observe:
  90 +%%%
  91 +%%% 1) You cannot change the font size; ACM wants you to use 9pt.
  92 +%%% 3) You must start your paper with the \maketitle command. Prior to the
  93 +%%% \maketitle you must have \title and \author commands. If you have a
  94 +%%% \date command it will be ignored; no date appears on the paper, since
  95 +%%% the proceedings will have a date on the front cover.
  96 +%%% 4) Marginal paragraphs, tables of contents, lists of figures and tables,
  97 +%%% and page headings are all forbidden.
  98 +%%% 5) The `figure' environment will produce a figure one column wide; if you
  99 +%%% want one that is two columns wide, use `figure*'.
  100 +%%%
  101 +%
  102 +%%% Copyright Space:
  103 +%%% This style automatically reserves 1" blank space at the bottom of page 1/
  104 +%%% column 1. This space can optionally be filled with some text using the
  105 +%%% \toappear{...} command. If used, this command must be BEFORE the \maketitle
  106 +%%% command. If this command is defined AND [preprint] is on, then the
  107 +%%% space is filled with the {...} text (at the bottom); otherwise, it is
  108 +%%% blank. If you use \toappearbox{...} instead of \toappear{...} then a
  109 +%%% box will be drawn around the text (if [preprint] is on).
  110 +%%%
  111 +%%% A typical usage looks like this:
  112 +%%% \toappear{To appear in the Ninth AES Conference on Medievil Lithuanian
  113 +%%% Embalming Technique, June 1991, Alfaretta, Georgia.}
  114 +%%% This will be included in the preprint, and left out of the conference
  115 +%%% version.
  116 +%%%
  117 +%%% WARNING:
  118 +%%% Some dvi-ps converters heuristically allow chars to drift from their
  119 +%%% true positions a few pixels. This may be noticeable with the 9pt sans-serif
  120 +%%% bold font used for section headers.
  121 +%%% You may turn this hackery off via the -e option:
  122 +%%% dvips -e 0 foo.dvi >foo.ps
  123 +%%%
  124 +\typeout{Document Class 'sig-alternate' <22nd. April '09>. Modified by G.K.M. Tobin/Gerry Murray}
  125 +\typeout{Based in part upon document Style `acmconf' <22 May 89>. Hacked 4/91 by}
  126 +\typeout{shivers@cs.cmu.edu, 4/93 by theobald@cs.mcgill.ca}
  127 +\typeout{Excerpts were taken from (Journal Style) 'esub2acm.cls'.}
  128 +\typeout{****** Bugs/comments/suggestions/technicalities to Gerry Murray -- murray@hq.acm.org ******}
  129 +\typeout{Questions on the style, SIGS policies, etc. to Adrienne Griscti griscti@acm.org}
  130 +\oddsidemargin 4.5pc
  131 +\evensidemargin 4.5pc
  132 +\advance\oddsidemargin by -1in % Correct for LaTeX gratuitousness
  133 +\advance\evensidemargin by -1in % Correct for LaTeX gratuitousness
  134 +\marginparwidth 0pt % Margin pars are not allowed.
  135 +\marginparsep 11pt % Horizontal space between outer margin and
  136 + % marginal note
  137 +
  138 + % Top of page:
  139 +\topmargin 4.5pc % Nominal distance from top of page to top of
  140 + % box containing running head.
  141 +\advance\topmargin by -1in % Correct for LaTeX gratuitousness
  142 +\headheight 0pt % Height of box containing running head.
  143 +\headsep 0pt % Space between running head and text.
  144 + % Bottom of page:
  145 +\footskip 30pt % Distance from baseline of box containing foot
  146 + % to baseline of last line of text.
  147 +\@ifundefined{footheight}{\newdimen\footheight}{}% this is for LaTeX2e
  148 +\footheight 12pt % Height of box containing running foot.
  149 +
  150 +%% Must redefine the top margin so there's room for headers and
  151 +%% page numbers if you are using the preprint option. Footers
  152 +%% are OK as is. Olin.
  153 +\advance\topmargin by -37pt % Leave 37pt above text for headers
  154 +\headheight 12pt % Height of box containing running head.
  155 +\headsep 25pt % Space between running head and text.
  156 +
  157 +\textheight 666pt % 9 1/4 column height
  158 +\textwidth 42pc % Width of text line.
  159 + % For two-column mode:
  160 +\columnsep 2pc % Space between columns
  161 +\columnseprule 0pt % Width of rule between columns.
  162 +\hfuzz 1pt % Allow some variation in column width, otherwise it's
  163 + % too hard to typeset in narrow columns.
  164 +
  165 +\footnotesep 5.6pt % Height of strut placed at the beginning of every
  166 + % footnote =3D height of normal \footnotesize strut,
  167 + % so no extra space between footnotes.
  168 +
  169 +\skip\footins 8.1pt plus 4pt minus 2pt % Space between last line of text and
  170 + % top of first footnote.
  171 +\floatsep 11pt plus 2pt minus 2pt % Space between adjacent floats moved
  172 + % to top or bottom of text page.
  173 +\textfloatsep 18pt plus 2pt minus 4pt % Space between main text and floats
  174 + % at top or bottom of page.
  175 +\intextsep 11pt plus 2pt minus 2pt % Space between in-text figures and
  176 + % text.
  177 +\@ifundefined{@maxsep}{\newdimen\@maxsep}{}% this is for LaTeX2e
  178 +\@maxsep 18pt % The maximum of \floatsep,
  179 + % \textfloatsep and \intextsep (minus
  180 + % the stretch and shrink).
  181 +\dblfloatsep 11pt plus 2pt minus 2pt % Same as \floatsep for double-column
  182 + % figures in two-column mode.
  183 +\dbltextfloatsep 18pt plus 2pt minus 4pt% \textfloatsep for double-column
  184 + % floats.
  185 +\@ifundefined{@dblmaxsep}{\newdimen\@dblmaxsep}{}% this is for LaTeX2e
  186 +\@dblmaxsep 18pt % The maximum of \dblfloatsep and
  187 + % \dbltexfloatsep.
  188 +\@fptop 0pt plus 1fil % Stretch at top of float page/column. (Must be
  189 + % 0pt plus ...)
  190 +\@fpsep 8pt plus 2fil % Space between floats on float page/column.
  191 +\@fpbot 0pt plus 1fil % Stretch at bottom of float page/column. (Must be
  192 + % 0pt plus ... )
  193 +\@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  194 +\@dblfpsep 8pt plus 2fil % Space between floats on float page.
  195 +\@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be
  196 + % 0pt plus ... )
  197 +\marginparpush 5pt % Minimum vertical separation between two marginal
  198 + % notes.
  199 +
  200 +\parskip 0pt plus 1pt % Extra vertical space between paragraphs.
  201 +\parindent 10pt % GM July 2000 / was 0pt - width of paragraph indentation. %% Adjusted for 10pt
  202 +\partopsep 2pt plus 1pt minus 1pt% Extra vertical space, in addition to
  203 + % \parskip and \topsep, added when user
  204 + % leaves blank line before environment.
  205 +
  206 +\@lowpenalty 51 % Produced by \nopagebreak[1] or \nolinebreak[1]
  207 +\@medpenalty 151 % Produced by \nopagebreak[2] or \nolinebreak[2]
  208 +\@highpenalty 301 % Produced by \nopagebreak[3] or \nolinebreak[3]
  209 +
  210 +\@beginparpenalty -\@lowpenalty % Before a list or paragraph environment.
  211 +\@endparpenalty -\@lowpenalty % After a list or paragraph environment.
  212 +\@itempenalty -\@lowpenalty % Between list items.
  213 +
  214 +%\@namedef{ds@10pt}{\@latexerr{The `10pt' option is not allowed in the `acmconf'
  215 +%\@namedef{ds@10pt}{\ClassError{The `10pt' option is not allowed in the `acmconf' % January 2008
  216 +% document style.}\@eha} %% Adjusted for 10pt
  217 +%\@namedef{ds@11pt}{\@latexerr{The `11pt' option is not allowed in the `acmconf'
  218 +\@namedef{ds@11pt}{\ClassError{The `11pt' option is not allowed in the `acmconf' % January 2008
  219 + document style.}\@eha}
  220 +%\@namedef{ds@12pt}{\@latexerr{The `12pt' option is not allowed in the `acmconf'
  221 +\@namedef{ds@12pt}{\ClassError{The `12pt' option is not allowed in the `acmconf' % January 2008
  222 + document style.}\@eha}
  223 +
  224 +\@options
  225 +
  226 +\lineskip 2pt % \lineskip is 1pt for all font sizes.
  227 +\normallineskip 2pt
  228 +\def\baselinestretch{1}
  229 +
  230 +\abovedisplayskip 10pt plus2pt minus4.5pt% %% Adjusted for 10pt
  231 +\belowdisplayskip \abovedisplayskip
  232 +\abovedisplayshortskip \z@ plus3pt%
  233 +\belowdisplayshortskip 5.4pt plus3pt minus3pt%
  234 +\let\@listi\@listI % Setting of \@listi added 9 Jun 87
  235 +
  236 +\def\small{\@setsize\small{9.2pt}\viiipt\@viiipt %% Adjusted for 10pt
  237 +\abovedisplayskip 7.6pt plus 3pt minus 4pt%
  238 +\belowdisplayskip \abovedisplayskip
  239 +\abovedisplayshortskip \z@ plus2pt%
  240 +\belowdisplayshortskip 3.6pt plus2pt minus 2pt
  241 +\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  242 +\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
  243 +\itemsep \parsep}}
  244 +
  245 +\def\footnotesize{\@setsize\footnotesize{10pt}\ixpt\@ixpt %% Adjusted for 10pt
  246 +\abovedisplayskip 6.4pt plus 2pt minus 4pt%
  247 +\belowdisplayskip \abovedisplayskip
  248 +\abovedisplayshortskip \z@ plus 1pt%
  249 +\belowdisplayshortskip 2.7pt plus 1pt minus 2pt
  250 +\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  251 +\topsep 3pt plus 1pt minus 1pt\parsep 2pt plus 1pt minus 1pt
  252 +\itemsep \parsep}}
  253 +
  254 +\newcount\aucount
  255 +\newcount\originalaucount
  256 +\newdimen\auwidth
  257 +\auwidth=\textwidth
  258 +\newdimen\auskip
  259 +\newcount\auskipcount
  260 +\newdimen\auskip
  261 +\global\auskip=1pc
  262 +\newdimen\allauboxes
  263 +\allauboxes=\auwidth
  264 +\newtoks\addauthors
  265 +\newcount\addauflag
  266 +\global\addauflag=0 %Haven't shown additional authors yet
  267 +
  268 +\newtoks\subtitletext
  269 +\gdef\subtitle#1{\subtitletext={#1}}
  270 +
  271 +\gdef\additionalauthors#1{\addauthors={#1}}
  272 +
  273 +\gdef\numberofauthors#1{\global\aucount=#1
  274 +\ifnum\aucount>3\global\originalaucount=\aucount \global\aucount=3\fi %g} % 3 OK - Gerry March 2007
  275 +\global\auskipcount=\aucount\global\advance\auskipcount by 1
  276 +\global\multiply\auskipcount by 2
  277 +\global\multiply\auskip by \auskipcount
  278 +\global\advance\auwidth by -\auskip
  279 +\global\divide\auwidth by \aucount}
  280 +
  281 +% \and was modified to count the number of authors. GKMT 12 Aug 1999
  282 +\def\alignauthor{% % \begin{tabular}
  283 +\end{tabular}%
  284 + \begin{tabular}[t]{p{\auwidth}}\centering}%
  285 +
  286 +% *** NOTE *** NOTE *** NOTE *** NOTE ***
  287 +% If you have 'font problems' then you may need
  288 +% to change these, e.g. 'arialb' instead of "arialbd".
  289 +% Gerry Murray 11/11/1999
  290 +% *** OR ** comment out block A and activate block B or vice versa.
  291 +% **********************************************
  292 +%
  293 +% -- Start of block A -- (Type 1 or Truetype fonts)
  294 +%\newfont{\secfnt}{timesbd at 12pt} % was timenrb originally - now is timesbd
  295 +%\newfont{\secit}{timesbi at 12pt} %13 Jan 00 gkmt
  296 +%\newfont{\subsecfnt}{timesi at 11pt} % was timenrri originally - now is timesi
  297 +%\newfont{\subsecit}{timesbi at 11pt} % 13 Jan 00 gkmt -- was times changed to timesbi gm 2/4/2000
  298 +% % because "normal" is italic, "italic" is Roman
  299 +%\newfont{\ttlfnt}{arialbd at 18pt} % was arialb originally - now is arialbd
  300 +%\newfont{\ttlit}{arialbi at 18pt} % 13 Jan 00 gkmt
  301 +%\newfont{\subttlfnt}{arial at 14pt} % was arialr originally - now is arial
  302 +%\newfont{\subttlit}{ariali at 14pt} % 13 Jan 00 gkmt
  303 +%\newfont{\subttlbf}{arialbd at 14pt} % 13 Jan 00 gkmt
  304 +%\newfont{\aufnt}{arial at 12pt} % was arialr originally - now is arial
  305 +%\newfont{\auit}{ariali at 12pt} % 13 Jan 00 gkmt
  306 +%\newfont{\affaddr}{arial at 10pt} % was arialr originally - now is arial
  307 +%\newfont{\affaddrit}{ariali at 10pt} %13 Jan 00 gkmt
  308 +%\newfont{\eaddfnt}{arial at 12pt} % was arialr originally - now is arial
  309 +%\newfont{\ixpt}{times at 10pt} % was timenrr originally - now is times %% Adjusted for 10pt
  310 +%\newfont{\confname}{timesi at 8pt} % was timenrri - now is timesi
  311 +%\newfont{\crnotice}{times at 8pt} % was timenrr originally - now is times
  312 +%\newfont{\ninept}{times at 10pt} % was timenrr originally - now is times %% Adjusted for 10pt
  313 +
  314 +% *********************************************
  315 +% -- End of block A --
  316 +%
  317 +%
  318 +% -- Start of block B -- UPDATED FONT NAMES
  319 +% *********************************************
  320 +% Gerry Murray 11/30/2006
  321 +% *********************************************
  322 +\newfont{\secfnt}{ptmb8t at 12pt}
  323 +\newfont{\secit}{ptmbi8t at 12pt} %13 Jan 00 gkmt
  324 +\newfont{\subsecfnt}{ptmri8t at 11pt}
  325 +\newfont{\subsecit}{ptmbi8t at 11pt} %
  326 +\newfont{\ttlfnt}{phvb8t at 18pt}
  327 +\newfont{\ttlit}{phvbo8t at 18pt} % GM 2/4/2000
  328 +\newfont{\subttlfnt}{phvr8t at 14pt}
  329 +\newfont{\subttlit}{phvro8t at 14pt} % GM 2/4/2000
  330 +\newfont{\subttlbf}{phvb8t at 14pt} % 13 Jan 00 gkmt
  331 +\newfont{\aufnt}{phvr8t at 12pt}
  332 +\newfont{\auit}{phvro8t at 12pt} % GM 2/4/2000
  333 +\newfont{\affaddr}{phvr8t at 10pt}
  334 +\newfont{\affaddrit}{phvro8t at 10pt} % GM 2/4/2000
  335 +\newfont{\eaddfnt}{phvr8t at 12pt}
  336 +\newfont{\ixpt}{ptmr8t at 10pt} %% Adjusted for 10pt
  337 +\newfont{\confname}{ptmri8t at 8pt}
  338 +\newfont{\crnotice}{ptmr8t at 8pt}
  339 +\newfont{\ninept}{ptmr8t at 10pt} %% Adjusted for 10pt
  340 +% +++++++++++++++++++++++++++++++++++++++++++++
  341 +% -- End of block B --
  342 +
  343 +%\def\email#1{{{\eaddfnt{\vskip 4pt#1}}}}
  344 +% If we have an email, inside a "shared affiliation" then we need the following instead
  345 +\def\email#1{{{\eaddfnt{\par #1}}}} % revised - GM - 11/30/2006
  346 +
  347 +\def\addauthorsection{\ifnum\originalaucount>6 % was 3 - Gerry March 2007
  348 + \section{Additional Authors}\the\addauthors
  349 + \fi}
  350 +
  351 +\newcount\savesection
  352 +\newcount\sectioncntr
  353 +\global\sectioncntr=1
  354 +
  355 +\setcounter{secnumdepth}{3}
  356 +
  357 +\def\appendix{\par
  358 +\section*{APPENDIX}
  359 +\setcounter{section}{0}
  360 + \setcounter{subsection}{0}
  361 + \def\thesection{\Alph{section}} }
  362 +
  363 +\leftmargini 22.5pt
  364 +\leftmarginii 19.8pt % > \labelsep + width of '(m)'
  365 +\leftmarginiii 16.8pt % > \labelsep + width of 'vii.'
  366 +\leftmarginiv 15.3pt % > \labelsep + width of 'M.'
  367 +\leftmarginv 9pt
  368 +\leftmarginvi 9pt
  369 +
  370 +\leftmargin\leftmargini
  371 +\labelsep 4.5pt
  372 +\labelwidth\leftmargini\advance\labelwidth-\labelsep
  373 +
  374 +\def\@listI{\leftmargin\leftmargini \parsep 3.6pt plus 2pt minus 1pt%
  375 +\topsep 7.2pt plus 2pt minus 4pt%
  376 +\itemsep 3.6pt plus 2pt minus 1pt}
  377 +
  378 +\let\@listi\@listI
  379 +\@listi
  380 +
  381 +\def\@listii{\leftmargin\leftmarginii
  382 + \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  383 + \topsep 3.6pt plus 2pt minus 1pt
  384 + \parsep 1.8pt plus 0.9pt minus 0.9pt
  385 + \itemsep \parsep}
  386 +
  387 +\def\@listiii{\leftmargin\leftmarginiii
  388 + \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  389 + \topsep 1.8pt plus 0.9pt minus 0.9pt
  390 + \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  391 + \itemsep \topsep}
  392 +
  393 +\def\@listiv{\leftmargin\leftmarginiv
  394 + \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  395 +
  396 +\def\@listv{\leftmargin\leftmarginv
  397 + \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  398 +
  399 +\def\@listvi{\leftmargin\leftmarginvi
  400 + \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  401 +
  402 +\def\labelenumi{\theenumi.}
  403 +\def\theenumi{\arabic{enumi}}
  404 +
  405 +\def\labelenumii{(\theenumii)}
  406 +\def\theenumii{\alph{enumii}}
  407 +\def\p@enumii{\theenumi}
  408 +
  409 +\def\labelenumiii{\theenumiii.}
  410 +\def\theenumiii{\roman{enumiii}}
  411 +\def\p@enumiii{\theenumi(\theenumii)}
  412 +
  413 +\def\labelenumiv{\theenumiv.}
  414 +\def\theenumiv{\Alph{enumiv}}
  415 +\def\p@enumiv{\p@enumiii\theenumiii}
  416 +
  417 +\def\labelitemi{$\bullet$}
  418 +\def\labelitemii{\bf --}
  419 +\def\labelitemiii{$\ast$}
  420 +\def\labelitemiv{$\cdot$}
  421 +
  422 +\def\verse{\let\\=\@centercr
  423 + \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent
  424 + \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}
  425 +\let\endverse\endlist
  426 +
  427 +\def\quotation{\list{}{\listparindent 1.5em
  428 + \itemindent\listparindent
  429 + \rightmargin\leftmargin \parsep 0pt plus 1pt}\item[]}
  430 +\let\endquotation=\endlist
  431 +
  432 +\def\quote{\list{}{\rightmargin\leftmargin}\item[]}
  433 +\let\endquote=\endlist
  434 +
  435 +\def\descriptionlabel#1{\hspace\labelsep \bf #1}
  436 +\def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
  437 + \let\makelabel\descriptionlabel}}
  438 +
  439 +\let\enddescription\endlist
  440 +
  441 +\def\theequation{\arabic{equation}}
  442 +
  443 +\arraycolsep 4.5pt % Half the space between columns in an array environment.
  444 +\tabcolsep 5.4pt % Half the space between columns in a tabular environment.
  445 +\arrayrulewidth .5pt % Width of rules in array and tabular environment. % (was .4) updated Gerry March 20 2007
  446 +\doublerulesep 1.8pt % Space between adjacent rules in array or tabular env.
  447 +
  448 +\tabbingsep \labelsep % Space used by the \' command. (See LaTeX manual.)
  449 +
  450 +\skip\@mpfootins =\skip\footins
  451 +
  452 +\fboxsep =2.7pt % Space left between box and text by \fbox and \framebox.
  453 +\fboxrule =.5pt % Width of rules in box made by \fbox and \framebox. % (was .4) updated Gerry March 20 2007
  454 +
  455 +\def\thepart{\Roman{part}} % Roman numeral part numbers.
  456 +\def\thesection {\arabic{section}}
  457 +\def\thesubsection {\thesection.\arabic{subsection}}
  458 +%\def\thesubsubsection {\thesubsection.\arabic{subsubsection}} % GM 7/30/2002
  459 +%\def\theparagraph {\thesubsubsection.\arabic{paragraph}} % GM 7/30/2002
  460 +\def\thesubparagraph {\theparagraph.\arabic{subparagraph}}
  461 +
  462 +\def\@pnumwidth{1.55em}
  463 +\def\@tocrmarg {2.55em}
  464 +\def\@dotsep{4.5}
  465 +\setcounter{tocdepth}{3}
  466 +
  467 +%\def\tableofcontents{\@latexerr{\tableofcontents: Tables of contents are not
  468 +% allowed in the `acmconf' document style.}\@eha}
  469 +
  470 +\def\tableofcontents{\ClassError{%
  471 + \string\tableofcontents\space is not allowed in the `acmconf' document % January 2008
  472 + style}\@eha}
  473 +
  474 +\def\l@part#1#2{\addpenalty{\@secpenalty}
  475 + \addvspace{2.25em plus 1pt} % space above part line
  476 + \begingroup
  477 + \@tempdima 3em % width of box holding part number, used by
  478 + \parindent \z@ \rightskip \@pnumwidth %% \numberline
  479 + \parfillskip -\@pnumwidth
  480 + {\large \bf % set line in \large boldface
  481 + \leavevmode % TeX command to enter horizontal mode.
  482 + #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
  483 + \nobreak % Never break after part entry
  484 + \endgroup}
  485 +
  486 +\def\l@section#1#2{\addpenalty{\@secpenalty} % good place for page break
  487 + \addvspace{1.0em plus 1pt} % space above toc entry
  488 + \@tempdima 1.5em % width of box holding section number
  489 + \begingroup
  490 + \parindent \z@ \rightskip \@pnumwidth
  491 + \parfillskip -\@pnumwidth
  492 + \bf % Boldface.
  493 + \leavevmode % TeX command to enter horizontal mode.
  494 + \advance\leftskip\@tempdima %% added 5 Feb 88 to conform to
  495 + \hskip -\leftskip %% 25 Jan 88 change to \numberline
  496 + #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
  497 + \endgroup}
  498 +
  499 +
  500 +\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
  501 +\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
  502 +\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
  503 +\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
  504 +
  505 +%\def\listoffigures{\@latexerr{\listoffigures: Lists of figures are not
  506 +% allowed in the `acmconf' document style.}\@eha}
  507 +
  508 +\def\listoffigures{\ClassError{%
  509 + \string\listoffigures\space is not allowed in the `acmconf' document % January 2008
  510 + style}\@eha}
  511 +
  512 +\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
  513 +
  514 +%\def\listoftables{\@latexerr{\listoftables: Lists of tables are not
  515 +% allowed in the `acmconf' document style.}\@eha}
  516 +%\let\l@table\l@figure
  517 +
  518 +\def\listoftables{\ClassError{%
  519 + \string\listoftables\space is not allowed in the `acmconf' document % January 2008
  520 + style}\@eha}
  521 + \let\l@table\l@figure
  522 +
  523 +\def\footnoterule{\kern-3\p@
  524 + \hrule width .5\columnwidth % (was .4) updated Gerry March 20 2007
  525 + \kern 2.6\p@} % The \hrule has default height of .4pt % (was .4) updated Gerry March 20 2007
  526 +% ------
  527 +\long\def\@makefntext#1{\noindent
  528 +%\hbox to .5em{\hss$^{\@thefnmark}$}#1} % original
  529 +\hbox to .5em{\hss\textsuperscript{\@thefnmark}}#1} % C. Clifton / GM Oct. 2nd. 2002
  530 +% -------
  531 +
  532 +\long\def\@maketntext#1{\noindent
  533 +#1}
  534 +
  535 +\long\def\@maketitlenotetext#1#2{\noindent
  536 + \hbox to 1.8em{\hss$^{#1}$}#2}
  537 +
  538 +\setcounter{topnumber}{2}
  539 +\def\topfraction{.7}
  540 +\setcounter{bottomnumber}{1}
  541 +\def\bottomfraction{.3}
  542 +\setcounter{totalnumber}{3}
  543 +\def\textfraction{.2}
  544 +\def\floatpagefraction{.5}
  545 +\setcounter{dbltopnumber}{2}
  546 +\def\dbltopfraction{.7}
  547 +\def\dblfloatpagefraction{.5}
  548 +
  549 +%
  550 +\long\def\@makecaption#1#2{
  551 + \vskip \baselineskip
  552 + \setbox\@tempboxa\hbox{\textbf{#1: #2}}
  553 + \ifdim \wd\@tempboxa >\hsize % IF longer than one line:
  554 + \textbf{#1: #2}\par % THEN set as ordinary paragraph.
  555 + \else % ELSE center.
  556 + \hbox to\hsize{\hfil\box\@tempboxa\hfil}\par
  557 + \fi}
  558 +
  559 +%
  560 +
  561 +\long\def\@makecaption#1#2{
  562 + \vskip 10pt
  563 + \setbox\@tempboxa\hbox{\textbf{#1: #2}}
  564 + \ifdim \wd\@tempboxa >\hsize % IF longer than one line:
  565 + \textbf{#1: #2}\par % THEN set as ordinary paragraph.
  566 + \else % ELSE center.
  567 + \hbox to\hsize{\hfil\box\@tempboxa\hfil}
  568 + \fi}
  569 +
  570 +\@ifundefined{figure}{\newcounter {figure}} % this is for LaTeX2e
  571 +
  572 +\def\fps@figure{tbp}
  573 +\def\ftype@figure{1}
  574 +\def\ext@figure{lof}
  575 +\def\fnum@figure{Figure \thefigure}
  576 +\def\figure{\@float{figure}}
  577 +%\let\endfigure\end@float
  578 +\def\endfigure{\end@float} % Gerry January 2008
  579 +\@namedef{figure*}{\@dblfloat{figure}}
  580 +\@namedef{endfigure*}{\end@dblfloat}
  581 +
  582 +\@ifundefined{table}{\newcounter {table}} % this is for LaTeX2e
  583 +
  584 +\def\fps@table{tbp}
  585 +\def\ftype@table{2}
  586 +\def\ext@table{lot}
  587 +\def\fnum@table{Table \thetable}
  588 +\def\table{\@float{table}}
  589 +%\let\endtable\end@float
  590 +\def\endtable{\end@float} % Gerry January 2008
  591 +\@namedef{table*}{\@dblfloat{table}}
  592 +\@namedef{endtable*}{\end@dblfloat}
  593 +
  594 +\newtoks\titleboxnotes
  595 +\newcount\titleboxnoteflag
  596 +
  597 +\def\maketitle{\par
  598 + \begingroup
  599 + \def\thefootnote{\fnsymbol{footnote}}
  600 + \def\@makefnmark{\hbox
  601 + to 0pt{$^{\@thefnmark}$\hss}}
  602 + \twocolumn[\@maketitle]
  603 +\@thanks
  604 + \endgroup
  605 + \setcounter{footnote}{0}
  606 + \let\maketitle\relax
  607 + \let\@maketitle\relax
  608 + \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\gdef\@subtitle{}\let\thanks\relax
  609 +% \@copyrightspace %% Adjusted for 10pt submission format
  610 +}
  611 +
  612 +%% CHANGES ON NEXT LINES
  613 +\newif\if@ll % to record which version of LaTeX is in use
  614 +
  615 +\expandafter\ifx\csname LaTeXe\endcsname\relax % LaTeX2.09 is used
  616 +\else% LaTeX2e is used, so set ll to true
  617 +\global\@lltrue
  618 +\fi
  619 +
  620 +\if@ll
  621 + \NeedsTeXFormat{LaTeX2e}
  622 + \ProvidesClass{sig-alternate} [2009/04/22 - V2.4 - based on acmproc.cls V1.3 <Nov. 30 '99>]
  623 + \RequirePackage{latexsym}% QUERY: are these two really needed?
  624 + \let\dooptions\ProcessOptions
  625 +\else
  626 + \let\dooptions\@options
  627 +\fi
  628 +%% END CHANGES
  629 +
  630 +\def\@height{height}
  631 +\def\@width{width}
  632 +\def\@minus{minus}
  633 +\def\@plus{plus}
  634 +\def\hb@xt@{\hbox to}
  635 +\newif\if@faircopy
  636 +\@faircopyfalse
  637 +\def\ds@faircopy{\@faircopytrue}
  638 +
  639 +\def\ds@preprint{\@faircopyfalse}
  640 +
  641 +\@twosidetrue
  642 +\@mparswitchtrue
  643 +\def\ds@draft{\overfullrule 5\p@}
  644 +%% CHANGE ON NEXT LINE
  645 +\dooptions
  646 +
  647 +\lineskip \p@
  648 +\normallineskip \p@
  649 +\def\baselinestretch{1}
  650 +\def\@ptsize{0} %needed for amssymbols.sty
  651 +
  652 +%% CHANGES ON NEXT LINES
  653 +\if@ll% allow use of old-style font change commands in LaTeX2e
  654 +\@maxdepth\maxdepth
  655 +%
  656 +\DeclareOldFontCommand{\rm}{\ninept\rmfamily}{\mathrm}
  657 +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
  658 +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
  659 +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
  660 +\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
  661 +\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
  662 +\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
  663 +\DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}}
  664 +\DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}}
  665 +\fi
  666 +%
  667 +\if@ll
  668 + \renewcommand{\rmdefault}{cmr} % was 'ttm'
  669 +% Note! I have also found 'mvr' to work ESPECIALLY well.
  670 +% Gerry - October 1999
  671 +% You may need to change your LV1times.fd file so that sc is
  672 +% mapped to cmcsc - -for smallcaps -- that is if you decide
  673 +% to change {cmr} to {times} above. (Not recommended)
  674 + \renewcommand{\@ptsize}{}
  675 + \renewcommand{\normalsize}{%
  676 +% \@setfontsize\normalsize\@ixpt{10.5\p@}%\ninept%
  677 + \@setfontsize\normalsize\@xpt{12\p@}%\tenpt% %% Adjusted for 10pt
  678 + \abovedisplayskip 6\p@ \@plus2\p@ \@minus\p@
  679 + \belowdisplayskip \abovedisplayskip
  680 + \abovedisplayshortskip 6\p@ \@minus 3\p@
  681 + \belowdisplayshortskip 6\p@ \@minus 3\p@
  682 + \let\@listi\@listI
  683 + }
  684 +\else
  685 + \def\@normalsize{%changed next to 9 from 10 %% Adjusted for 10pt
  686 +% \@setsize\normalsize{10\p@}\ixpt\@ixpt
  687 + \@setsize\normalsize{10\p@}\xpt\@xpt %% Adjusted for 10pt
  688 + \abovedisplayskip 6\p@ \@plus2\p@ \@minus\p@
  689 + \belowdisplayskip \abovedisplayskip
  690 + \abovedisplayshortskip 6\p@ \@minus 3\p@
  691 + \belowdisplayshortskip 6\p@ \@minus 3\p@
  692 + \let\@listi\@listI
  693 + }%
  694 +\fi
  695 +\if@ll
  696 + \newcommand\scriptsize{\@setfontsize\scriptsize\@viipt{8\p@}}
  697 + \newcommand\tiny{\@setfontsize\tiny\@vpt{6\p@}}
  698 + \newcommand\large{\@setfontsize\large\@xiipt{14\p@}}
  699 + \newcommand\Large{\@setfontsize\Large\@xivpt{18\p@}}
  700 + \newcommand\LARGE{\@setfontsize\LARGE\@xviipt{20\p@}}
  701 + \newcommand\huge{\@setfontsize\huge\@xxpt{25\p@}}
  702 + \newcommand\Huge{\@setfontsize\Huge\@xxvpt{30\p@}}
  703 +\else
  704 + \def\scriptsize{\@setsize\scriptsize{8\p@}\viipt\@viipt}
  705 + \def\tiny{\@setsize\tiny{6\p@}\vpt\@vpt}
  706 + \def\large{\@setsize\large{14\p@}\xiipt\@xiipt}
  707 + \def\Large{\@setsize\Large{18\p@}\xivpt\@xivpt}
  708 + \def\LARGE{\@setsize\LARGE{20\p@}\xviipt\@xviipt}
  709 + \def\huge{\@setsize\huge{25\p@}\xxpt\@xxpt}
  710 + \def\Huge{\@setsize\Huge{30\p@}\xxvpt\@xxvpt}
  711 +\fi
  712 +\normalsize
  713 +
  714 +% make aubox hsize/number of authors up to 3, less gutter
  715 +% then showbox gutter showbox gutter showbox -- GKMT Aug 99
  716 +\newbox\@acmtitlebox
  717 +\def\@maketitle{\newpage
  718 + \null
  719 + \setbox\@acmtitlebox\vbox{%
  720 +\baselineskip 20pt
  721 +\vskip 2em % Vertical space above title.
  722 + \begin{center}
  723 + {\ttlfnt \@title\par} % Title set in 18pt Helvetica (Arial) bold size.
  724 + \vskip 1.5em % Vertical space after title.
  725 +%This should be the subtitle.
  726 +{\subttlfnt \the\subtitletext\par}\vskip 1.25em%\fi
  727 + {\baselineskip 16pt\aufnt % each author set in \12 pt Arial, in a
  728 + \lineskip .5em % tabular environment
  729 + \begin{tabular}[t]{c}\@author
  730 + \end{tabular}\par}
  731 + \vskip 1.5em % Vertical space after author.
  732 + \end{center}}
  733 + \dimen0=\ht\@acmtitlebox
  734 + \advance\dimen0 by -12.75pc\relax % Increased space for title box -- KBT
  735 + \unvbox\@acmtitlebox
  736 + \ifdim\dimen0<0.0pt\relax\vskip-\dimen0\fi}
  737 +
  738 +
  739 +\newcount\titlenotecount
  740 +\global\titlenotecount=0
  741 +\newtoks\tntoks
  742 +\newtoks\tntokstwo
  743 +\newtoks\tntoksthree
  744 +\newtoks\tntoksfour
  745 +\newtoks\tntoksfive
  746 +
  747 +\def\abstract{
  748 +\ifnum\titlenotecount>0 % was =1
  749 + \insert\footins{%
  750 + \reset@font\footnotesize
  751 + \interlinepenalty\interfootnotelinepenalty
  752 + \splittopskip\footnotesep
  753 + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
  754 + \hsize\columnwidth \@parboxrestore
  755 + \protected@edef\@currentlabel{%
  756 + }%
  757 + \color@begingroup
  758 +\ifnum\titlenotecount=1
  759 + \@maketntext{%
  760 + \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\@finalstrut\strutbox}%
  761 +\fi
  762 +\ifnum\titlenotecount=2
  763 + \@maketntext{%
  764 + \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
  765 +\@maketntext{%
  766 + \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\@finalstrut\strutbox}%
  767 +\fi
  768 +\ifnum\titlenotecount=3
  769 + \@maketntext{%
  770 + \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
  771 +\@maketntext{%
  772 + \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\par\@finalstrut\strutbox}%
  773 +\@maketntext{%
  774 + \raisebox{4pt}{$\ddagger$}\rule\z@\footnotesep\ignorespaces\the\tntoksthree\@finalstrut\strutbox}%
  775 +\fi
  776 +\ifnum\titlenotecount=4
  777 + \@maketntext{%
  778 + \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
  779 +\@maketntext{%
  780 + \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\par\@finalstrut\strutbox}%
  781 +\@maketntext{%
  782 + \raisebox{4pt}{$\ddagger$}\rule\z@\footnotesep\ignorespaces\the\tntoksthree\par\@finalstrut\strutbox}%
  783 +\@maketntext{%
  784 + \raisebox{4pt}{$\S$}\rule\z@\footnotesep\ignorespaces\the\tntoksfour\@finalstrut\strutbox}%
  785 +\fi
  786 +\ifnum\titlenotecount=5
  787 + \@maketntext{%
  788 + \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
  789 +\@maketntext{%
  790 + \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\par\@finalstrut\strutbox}%
  791 +\@maketntext{%
  792 + \raisebox{4pt}{$\ddagger$}\rule\z@\footnotesep\ignorespaces\the\tntoksthree\par\@finalstrut\strutbox}%
  793 +\@maketntext{%
  794 + \raisebox{4pt}{$\S$}\rule\z@\footnotesep\ignorespaces\the\tntoksfour\par\@finalstrut\strutbox}%
  795 +\@maketntext{%
  796 + \raisebox{4pt}{$\P$}\rule\z@\footnotesep\ignorespaces\the\tntoksfive\@finalstrut\strutbox}%
  797 +\fi
  798 + \color@endgroup} %g}
  799 +\fi
  800 +\setcounter{footnote}{0}
  801 +%\section*{ABSTRACT}\normalsize%\ninept
  802 +\section*{ABSTRACT}\ninept%\ninept %% Adjusted for 10pt
  803 +}
  804 +
  805 +\def\endabstract{\if@twocolumn\else\endquotation\fi}
  806 +
  807 +\def\keywords{\if@twocolumn
  808 +\section*{Keywords}
  809 +\else \small
  810 +\quotation
  811 +\fi}
  812 +
  813 +\def\terms{\if@twocolumn
  814 +\section*{General Terms}
  815 +\else \small
  816 +\quotation
  817 +\fi}
  818 +
  819 +% -- Classification needs to be a bit smart due to optionals - Gerry/Georgia November 2nd. 1999
  820 +\newcount\catcount
  821 +\global\catcount=1
  822 +
  823 +\def\category#1#2#3{%
  824 +\ifnum\catcount=1
  825 +\section*{Categories and Subject Descriptors}
  826 +\advance\catcount by 1\else{\unskip; }\fi
  827 + \@ifnextchar [{\@category{#1}{#2}{#3}}{\@category{#1}{#2}{#3}[]}%
  828 +}
  829 +
  830 +\def\@category#1#2#3[#4]{%
  831 + \begingroup
  832 + \let\and\relax
  833 + #1 [\textbf{#2}]%
  834 + \if!#4!%
  835 + \if!#3!\else : #3\fi
  836 + \else
  837 + :\space
  838 + \if!#3!\else #3\kern\z@---\hskip\z@\fi
  839 + \textit{#4}%
  840 + \fi
  841 + \endgroup
  842 +}
  843 +%
  844 +
  845 +%%% This section (written by KBT) handles the 1" box in the lower left
  846 +%%% corner of the left column of the first page by creating a picture,
  847 +%%% and inserting the predefined string at the bottom (with a negative
  848 +%%% displacement to offset the space allocated for a non-existent
  849 +%%% caption).
  850 +%%%
  851 +%\newtoks\copyrightnotice %% Adjusted for 10pt submission format
  852 +%\def\ftype@copyrightbox{8}
  853 +%\def\@copyrightspace{
  854 +%\@float{copyrightbox}[b]
  855 +%\begin{center}
  856 +%\setlength{\unitlength}{1pc}
  857 +%\begin{picture}(20,6) %Space for copyright notice
  858 +%\put(0,-0.95){\crnotice{\@toappear}}
  859 +%\end{picture}
  860 +%\end{center}
  861 +%\end@float}
  862 +
  863 +\def\@toappear{} % Default setting blank - commands below change this.
  864 +%\long\def\toappear#1{\def\@toappear{\parbox[b]{20pc}{\baselineskip 9pt#1}}}
  865 +%\def\toappearbox#1{\def\@toappear{\raisebox{5pt}{\framebox[20pc]{\parbox[b]{19pc}{#1}}}}}
  866 +
  867 +\newtoks\conf
  868 +\newtoks\confinfo
  869 +\def\conferenceinfo#1#2{\global\conf={#1}\global\confinfo{#2}}
  870 +
  871 +
  872 +%\def\marginpar{\@latexerr{The \marginpar command is not allowed in the
  873 +% `acmconf' document style.}\@eha}
  874 +
  875 +\def\marginpar{\ClassError{%
  876 + \string\marginpar\space is not allowed in the `acmconf' document % January 2008
  877 + style}\@eha}
  878 +
  879 +\mark{{}{}} % Initializes TeX's marks
  880 +
  881 +\def\today{\ifcase\month\or
  882 + January\or February\or March\or April\or May\or June\or
  883 + July\or August\or September\or October\or November\or December\fi
  884 + \space\number\day, \number\year}
  885 +
  886 +\def\@begintheorem#1#2{%
  887 + \parskip 0pt % GM July 2000 (for tighter spacing)
  888 + \trivlist
  889 + \item[%
  890 + \hskip 10\p@
  891 + \hskip \labelsep
  892 + {{\sc #1}\hskip 5\p@\relax#2.}%
  893 + ]
  894 + \it
  895 +}
  896 +\def\@opargbegintheorem#1#2#3{%
  897 + \parskip 0pt % GM July 2000 (for tighter spacing)
  898 + \trivlist
  899 + \item[%
  900 + \hskip 10\p@
  901 + \hskip \labelsep
  902 + {\sc #1\ #2\ % This mod by Gerry to enumerate corollaries
  903 + \setbox\@tempboxa\hbox{(#3)} % and bracket the 'corollary title'
  904 + \ifdim \wd\@tempboxa>\z@ % and retain the correct numbering of e.g. theorems
  905 + \hskip 5\p@\relax % if they occur 'around' said corollaries.
  906 + \box\@tempboxa % Gerry - Nov. 1999.
  907 + \fi.}%
  908 + ]
  909 + \it
  910 +}
  911 +\newif\if@qeded
  912 +\global\@qededfalse
  913 +
  914 +% -- original
  915 +%\def\proof{%
  916 +% \vspace{-\parskip} % GM July 2000 (for tighter spacing)
  917 +% \global\@qededfalse
  918 +% \@ifnextchar[{\@xproof}{\@proof}%
  919 +%}
  920 +% -- end of original
  921 +
  922 +% (JSS) Fix for vertical spacing bug - Gerry Murray July 30th. 2002
  923 +\def\proof{%
  924 +\vspace{-\lastskip}\vspace{-\parsep}\penalty-51%
  925 +\global\@qededfalse
  926 +\@ifnextchar[{\@xproof}{\@proof}%
  927 +}
  928 +
  929 +\def\endproof{%
  930 + \if@qeded\else\qed\fi
  931 + \endtrivlist
  932 +}
  933 +\def\@proof{%
  934 + \trivlist
  935 + \item[%
  936 + \hskip 10\p@
  937 + \hskip \labelsep
  938 + {\sc Proof.}%
  939 + ]
  940 + \ignorespaces
  941 +}
  942 +\def\@xproof[#1]{%
  943 + \trivlist
  944 + \item[\hskip 10\p@\hskip \labelsep{\sc Proof #1.}]%
  945 + \ignorespaces
  946 +}
  947 +\def\qed{%
  948 + \unskip
  949 + \kern 10\p@
  950 + \begingroup
  951 + \unitlength\p@
  952 + \linethickness{.4\p@}%
  953 + \framebox(6,6){}%
  954 + \endgroup
  955 + \global\@qededtrue
  956 +}
  957 +
  958 +\def\newdef#1#2{%
  959 + \expandafter\@ifdefinable\csname #1\endcsname
  960 + {\@definecounter{#1}%
  961 + \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%
  962 + \global\@namedef{#1}{\@defthm{#1}{#2}}%
  963 + \global\@namedef{end#1}{\@endtheorem}%
  964 + }%
  965 +}
  966 +\def\@defthm#1#2{%
  967 + \refstepcounter{#1}%
  968 + \@ifnextchar[{\@ydefthm{#1}{#2}}{\@xdefthm{#1}{#2}}%
  969 +}
  970 +\def\@xdefthm#1#2{%
  971 + \@begindef{#2}{\csname the#1\endcsname}%
  972 + \ignorespaces
  973 +}
  974 +\def\@ydefthm#1#2[#3]{%
  975 + \trivlist
  976 + \item[%
  977 + \hskip 10\p@
  978 + \hskip \labelsep
  979 + {\it #2%
  980 +% \savebox\@tempboxa{#3}%
  981 + \saveb@x\@tempboxa{#3}% % January 2008
  982 + \ifdim \wd\@tempboxa>\z@
  983 + \ \box\@tempboxa
  984 + \fi.%
  985 + }]%
  986 + \ignorespaces
  987 +}
  988 +\def\@begindef#1#2{%
  989 + \trivlist
  990 + \item[%
  991 + \hskip 10\p@
  992 + \hskip \labelsep
  993 + {\it #1\ \rm #2.}%
  994 + ]%
  995 +}
  996 +\def\theequation{\arabic{equation}}
  997 +
  998 +\newcounter{part}
  999 +\newcounter{section}
  1000 +\newcounter{subsection}[section]
  1001 +\newcounter{subsubsection}[subsection]
  1002 +\newcounter{paragraph}[subsubsection]
  1003 +\def\thepart{\Roman{part}}
  1004 +\def\thesection{\arabic{section}}
  1005 +\def\thesubsection{\thesection.\arabic{subsection}}
  1006 +\def\thesubsubsection{\thesubsection.\arabic{subsubsection}} %removed \subsecfnt 29 July 2002 gkmt
  1007 +\def\theparagraph{\thesubsubsection.\arabic{paragraph}} %removed \subsecfnt 29 July 2002 gkmt
  1008 +\newif\if@uchead
  1009 +\@ucheadfalse
  1010 +
  1011 +%% CHANGES: NEW NOTE
  1012 +%% NOTE: OK to use old-style font commands below, since they were
  1013 +%% suitably redefined for LaTeX2e
  1014 +%% END CHANGES
  1015 +\setcounter{secnumdepth}{3}
  1016 +\def\part{%
  1017 + \@startsection{part}{9}{\z@}{-10\p@ \@plus -4\p@ \@minus -2\p@}
  1018 + {4\p@}{\normalsize\@ucheadtrue}%
  1019 +}
  1020 +\def\section{%
  1021 + \@startsection{section}{1}{\z@}{-10\p@ \@plus -4\p@ \@minus -2\p@}% GM
  1022 + {4\p@}{\baselineskip 14pt\secfnt\@ucheadtrue}%
  1023 +}
  1024 +
  1025 +\def\subsection{%
  1026 + \@startsection{subsection}{2}{\z@}{-8\p@ \@plus -2\p@ \@minus -\p@}
  1027 + {4\p@}{\secfnt}%
  1028 +}
  1029 +\def\subsubsection{%
  1030 + \@startsection{subsubsection}{3}{\z@}{-8\p@ \@plus -2\p@ \@minus -\p@}%
  1031 + {4\p@}{\subsecfnt}%
  1032 +}
  1033 +%\def\paragraph{%
  1034 +% \vskip 12pt\@startsection{paragraph}{3}{\z@}{6\p@ \@plus \p@}% original
  1035 +% {-5\p@}{\subsecfnt}%
  1036 +%}
  1037 +% If one wants sections, subsections and subsubsections numbered,
  1038 +% but not paragraphs, one usually sets secnumepth to 3.
  1039 +% For that, the "depth" of paragraphs must be given correctly
  1040 +% in the definition (``4'' instead of ``3'' as second argument
  1041 +% of @startsection):
  1042 +\def\paragraph{%
  1043 + \vskip 12pt\@startsection{paragraph}{4}{\z@}{6\p@ \@plus \p@}% % GM and Wolfgang May - 11/30/06
  1044 + {-5\p@}{\subsecfnt}%
  1045 +}
  1046 +\let\@period=.
  1047 +\def\@startsection#1#2#3#4#5#6{%
  1048 + \if@noskipsec %gkmt, 11 aug 99
  1049 + \global\let\@period\@empty
  1050 + \leavevmode
  1051 + \global\let\@period.%
  1052 + \fi
  1053 + \par %
  1054 + \@tempskipa #4\relax
  1055 + \@afterindenttrue
  1056 + \ifdim \@tempskipa <\z@
  1057 + \@tempskipa -\@tempskipa
  1058 + \@afterindentfalse
  1059 + \fi
  1060 + \if@nobreak
  1061 + \everypar{}%
  1062 + \else
  1063 + \addpenalty\@secpenalty
  1064 + \addvspace\@tempskipa
  1065 + \fi
  1066 +\parskip=0pt % GM July 2000 (non numbered) section heads
  1067 + \@ifstar
  1068 + {\@ssect{#3}{#4}{#5}{#6}}
  1069 + {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}%
  1070 +}
  1071 +\def\@sect#1#2#3#4#5#6[#7]#8{%
  1072 + \ifnum #2>\c@secnumdepth
  1073 + \let\@svsec\@empty
  1074 + \else
  1075 + \refstepcounter{#1}%
  1076 + \edef\@svsec{%
  1077 + \begingroup
  1078 + %\ifnum#2>2 \noexpand\rm \fi % changed to next 29 July 2002 gkmt
  1079 + \ifnum#2>2 \noexpand#6 \fi
  1080 + \csname the#1\endcsname
  1081 + \endgroup
  1082 + \ifnum #2=1\relax .\fi
  1083 + \hskip 1em
  1084 + }%
  1085 + \fi
  1086 + \@tempskipa #5\relax
  1087 + \ifdim \@tempskipa>\z@
  1088 + \begingroup
  1089 + #6\relax
  1090 + \@hangfrom{\hskip #3\relax\@svsec}%
  1091 + \begingroup
  1092 + \interlinepenalty \@M
  1093 + \if@uchead
  1094 + \uppercase{#8}%
  1095 + \else
  1096 + #8%
  1097 + \fi
  1098 + \par
  1099 + \endgroup
  1100 + \endgroup
  1101 + \csname #1mark\endcsname{#7}%
  1102 + \vskip -12pt %gkmt, 11 aug 99 and GM July 2000 (was -14) - numbered section head spacing
  1103 +\addcontentsline{toc}{#1}{%
  1104 + \ifnum #2>\c@secnumdepth \else
  1105 + \protect\numberline{\csname the#1\endcsname}%
  1106 + \fi
  1107 + #7%
  1108 + }%
  1109 + \else
  1110 + \def\@svsechd{%
  1111 + #6%
  1112 + \hskip #3\relax
  1113 + \@svsec
  1114 + \if@uchead
  1115 + \uppercase{#8}%
  1116 + \else
  1117 + #8%
  1118 + \fi
  1119 + \csname #1mark\endcsname{#7}%
  1120 + \addcontentsline{toc}{#1}{%
  1121 + \ifnum #2>\c@secnumdepth \else
  1122 + \protect\numberline{\csname the#1\endcsname}%
  1123 + \fi
  1124 + #7%
  1125 + }%
  1126 + }%
  1127 + \fi
  1128 + \@xsect{#5}\hskip 1pt
  1129 + \par
  1130 +}
  1131 +\def\@xsect#1{%
  1132 + \@tempskipa #1\relax
  1133 + \ifdim \@tempskipa>\z@
  1134 + \par
  1135 + \nobreak
  1136 + \vskip \@tempskipa
  1137 + \@afterheading
  1138 + \else
  1139 + \global\@nobreakfalse
  1140 + \global\@noskipsectrue
  1141 + \everypar{%
  1142 + \if@noskipsec
  1143 + \global\@noskipsecfalse
  1144 + \clubpenalty\@M
  1145 + \hskip -\parindent
  1146 + \begingroup
  1147 + \@svsechd
  1148 + \@period
  1149 + \endgroup
  1150 + \unskip
  1151 + \@tempskipa #1\relax
  1152 + \hskip -\@tempskipa
  1153 + \else
  1154 + \clubpenalty \@clubpenalty
  1155 + \everypar{}%
  1156 + \fi
  1157 + }%
  1158 + \fi
  1159 + \ignorespaces
  1160 +}
  1161 +\def\@trivlist{%
  1162 + \@topsepadd\topsep
  1163 + \if@noskipsec
  1164 + \global\let\@period\@empty
  1165 + \leavevmode
  1166 + \global\let\@period.%
  1167 + \fi
  1168 + \ifvmode
  1169 + \advance\@topsepadd\partopsep
  1170 + \else
  1171 + \unskip
  1172 + \par
  1173 + \fi
  1174 + \if@inlabel
  1175 + \@noparitemtrue
  1176 + \@noparlisttrue
  1177 + \else
  1178 + \@noparlistfalse
  1179 + \@topsep\@topsepadd
  1180 + \fi
  1181 + \advance\@topsep \parskip
  1182 + \leftskip\z@skip
  1183 + \rightskip\@rightskip
  1184 + \parfillskip\@flushglue
  1185 + \@setpar{\if@newlist\else{\@@par}\fi}
  1186 + \global\@newlisttrue
  1187 + \@outerparskip\parskip
  1188 +}
  1189 +
  1190 +%%% Actually, 'abbrev' works just fine as the default
  1191 +%%% Bibliography style.
  1192 +
  1193 +\typeout{Using 'Abbrev' bibliography style}
  1194 +\newcommand\bibyear[2]{%
  1195 + \unskip\quad\ignorespaces#1\unskip
  1196 + \if#2..\quad \else \quad#2 \fi
  1197 +}
  1198 +\newcommand{\bibemph}[1]{{\em#1}}
  1199 +\newcommand{\bibemphic}[1]{{\em#1\/}}
  1200 +\newcommand{\bibsc}[1]{{\sc#1}}
  1201 +\def\@normalcite{%
  1202 + \def\@cite##1##2{[##1\if@tempswa , ##2\fi]}%
  1203 +}
  1204 +\def\@citeNB{%
  1205 + \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  1206 +}
  1207 +\def\@citeRB{%
  1208 + \def\@cite##1##2{##1\if@tempswa , ##2\fi]}%
  1209 +}
  1210 +\def\start@cite#1#2{%
  1211 + \edef\citeauthoryear##1##2##3{%
  1212 + ###1%
  1213 + \ifnum#2=\z@ \else\ ###2\fi
  1214 + }%
  1215 + \ifnum#1=\thr@@
  1216 + \let\@@cite\@citeyear
  1217 + \else
  1218 + \let\@@cite\@citenormal
  1219 + \fi
  1220 + \@ifstar{\@citeNB\@@cite}{\@normalcite\@@cite}%
  1221 +}
  1222 +%\def\cite{\start@cite23}
  1223 +\DeclareRobustCommand\cite{\start@cite23} % January 2008
  1224 +\def\citeNP{\cite*} % No Parentheses e.g. 5
  1225 +%\def\citeA{\start@cite10}
  1226 +\DeclareRobustCommand\citeA{\start@cite10} % January 2008
  1227 +\def\citeANP{\citeA*}
  1228 +%\def\shortcite{\start@cite23}
  1229 +\DeclareRobustCommand\shortcite{\start@cite23} % January 2008
  1230 +\def\shortciteNP{\shortcite*}
  1231 +%\def\shortciteA{\start@cite20}
  1232 +\DeclareRobustCommand\shortciteA{\start@cite20} % January 2008
  1233 +\def\shortciteANP{\shortciteA*}
  1234 +%\def\citeyear{\start@cite30}
  1235 +\DeclareRobustCommand\citeyear{\start@cite30} % January 2008
  1236 +\def\citeyearNP{\citeyear*}
  1237 +%\def\citeN{%
  1238 +\DeclareRobustCommand\citeN{% % January 2008
  1239 + \@citeRB
  1240 + \def\citeauthoryear##1##2##3{##1\ [##3%
  1241 + \def\reserved@a{##1}%
  1242 + \def\citeauthoryear####1####2####3{%
  1243 + \def\reserved@b{####1}%
  1244 + \ifx\reserved@a\reserved@b
  1245 + ####3%
  1246 + \else
  1247 + \errmessage{Package acmart Error: author mismatch
  1248 + in \string\citeN^^J^^J%
  1249 + See the acmart package documentation for explanation}%
  1250 + \fi
  1251 + }%
  1252 + }%
  1253 + \@ifstar\@citeyear\@citeyear
  1254 +}
  1255 +%\def\shortciteN{%
  1256 +\DeclareRobustCommand\shortciteN{% % January 2008
  1257 + \@citeRB
  1258 + \def\citeauthoryear##1##2##3{##2\ [##3%
  1259 + \def\reserved@a{##2}%
  1260 + \def\citeauthoryear####1####2####3{%
  1261 + \def\reserved@b{####2}%
  1262 + \ifx\reserved@a\reserved@b
  1263 + ####3%
  1264 + \else
  1265 + \errmessage{Package acmart Error: author mismatch
  1266 + in \string\shortciteN^^J^^J%
  1267 + See the acmart package documentation for explanation}%
  1268 + \fi
  1269 + }%
  1270 + }%
  1271 + \@ifstar\@citeyear\@citeyear % GM July 2000
  1272 +}
  1273 +
  1274 +\def\@citenormal{%
  1275 + \@ifnextchar [{\@tempswatrue\@citex;}%
  1276 +% original {\@tempswafalse\@citex,[]}% was ; Gerry 2/24/00
  1277 +{\@tempswafalse\@citex[]}% % GERRY FIX FOR BABEL 3/20/2009
  1278 +}
  1279 +
  1280 +\def\@citeyear{%
  1281 + \@ifnextchar [{\@tempswatrue\@citex,}%
  1282 +% original {\@tempswafalse\@citex,[]}%
  1283 +{\@tempswafalse\@citex[]}% % GERRY FIX FOR BABEL 3/20/2009
  1284 +}
  1285 +
  1286 +\def\@citex#1[#2]#3{%
  1287 + \let\@citea\@empty
  1288 + \@cite{%
  1289 + \@for\@citeb:=#3\do{%
  1290 + \@citea
  1291 +% original \def\@citea{#1 }%
  1292 + \def\@citea{#1, }% % GERRY FIX FOR BABEL 3/20/2009 -- SO THAT YOU GET [1, 2] IN THE BODY TEXT
  1293 + \edef\@citeb{\expandafter\@iden\@citeb}%
  1294 + \if@filesw
  1295 + \immediate\write\@auxout{\string\citation{\@citeb}}%
  1296 + \fi
  1297 + \@ifundefined{b@\@citeb}{%
  1298 + {\bf ?}%
  1299 + \@warning{%
  1300 + Citation `\@citeb' on page \thepage\space undefined%
  1301 + }%
  1302 + }%
  1303 + {\csname b@\@citeb\endcsname}%
  1304 + }%
  1305 + }{#2}%
  1306 +}
  1307 +%\let\@biblabel\@gobble % Dec. 2008 - Gerry
  1308 +% ----
  1309 +\def\@biblabelnum#1{[#1]} % Gerry's solution #1 - for Natbib -- April 2009
  1310 +\let\@biblabel=\@biblabelnum % Gerry's solution #1 - for Natbib -- April 2009
  1311 +\def\newblock{\relax} % Gerry Dec. 2008
  1312 +% ---
  1313 +\newdimen\bibindent
  1314 +\setcounter{enumi}{1}
  1315 +\bibindent=0em
  1316 +\def\thebibliography#1{%
  1317 +\ifnum\addauflag=0\addauthorsection\global\addauflag=1\fi
  1318 + \section[References]{% <=== OPTIONAL ARGUMENT ADDED HERE
  1319 + {References} % was uppercased but this affects pdf bookmarks (SP/GM October 2004)
  1320 + {\vskip -9pt plus 1pt} % GM Nov. 2006 / GM July 2000 (for somewhat tighter spacing)
  1321 + \@mkboth{{\refname}}{{\refname}}%
  1322 + }%
  1323 + \list{[\arabic{enumi}]}{%
  1324 + \settowidth\labelwidth{[#1]}%
  1325 + \leftmargin\labelwidth
  1326 + \advance\leftmargin\labelsep
  1327 + \advance\leftmargin\bibindent
  1328 + \parsep=0pt\itemsep=0pt % GM July 2000 %% Adjusted for 10pt
  1329 + \itemindent -\bibindent
  1330 + \listparindent \itemindent
  1331 + \usecounter{enumi}
  1332 + }%
  1333 + \let\newblock\@empty
  1334 + \raggedright % GM July 2000
  1335 + \sloppy
  1336 + \sfcode`\.=1000\relax
  1337 +}
  1338 +
  1339 +
  1340 +\gdef\balancecolumns
  1341 +{\vfill\eject
  1342 +\global\@colht=\textheight
  1343 +\global\ht\@cclv=\textheight
  1344 +}
  1345 +
  1346 +\newcount\colcntr
  1347 +\global\colcntr=0
  1348 +%\newbox\savebox
  1349 +\newbox\saveb@x % January 2008
  1350 +
  1351 +\gdef \@makecol {%
  1352 +\global\advance\colcntr by 1
  1353 +\ifnum\colcntr>2 \global\colcntr=1\fi
  1354 + \ifvoid\footins
  1355 + \setbox\@outputbox \box\@cclv
  1356 + \else
  1357 + \setbox\@outputbox \vbox{%
  1358 +\boxmaxdepth \@maxdepth
  1359 + \@tempdima\dp\@cclv
  1360 + \unvbox \@cclv
  1361 + \vskip-\@tempdima
  1362 + \vskip \skip\footins
  1363 + \color@begingroup
  1364 + \normalcolor
  1365 + \footnoterule
  1366 + \unvbox \footins
  1367 + \color@endgroup
  1368 + }%
  1369 + \fi
  1370 + \xdef\@freelist{\@freelist\@midlist}%
  1371 + \global \let \@midlist \@empty
  1372 + \@combinefloats
  1373 + \ifvbox\@kludgeins
  1374 + \@makespecialcolbox
  1375 + \else
  1376 + \setbox\@outputbox \vbox to\@colht {%
  1377 +\@texttop
  1378 + \dimen@ \dp\@outputbox
  1379 + \unvbox \@outputbox
  1380 + \vskip -\dimen@
  1381 + \@textbottom
  1382 + }%
  1383 + \fi
  1384 + \global \maxdepth \@maxdepth
  1385 +}
  1386 +\def\titlenote{\@ifnextchar[\@xtitlenote{\stepcounter\@mpfn
  1387 +\global\advance\titlenotecount by 1
  1388 +\ifnum\titlenotecount=1
  1389 + \raisebox{10pt}{$\ast$} %% Adjusted for 10pt
  1390 +\fi
  1391 +\ifnum\titlenotecount=2
  1392 + \raisebox{10pt}{$\dagger$} %% Adjusted for 10pt
  1393 +\fi
  1394 +\ifnum\titlenotecount=3
  1395 + \raisebox{10pt}{$\ddagger$} %% Adjusted for 10pt
  1396 +\fi
  1397 +\ifnum\titlenotecount=4
  1398 +\raisebox{10pt}{$\S$} %% Adjusted for 10pt
  1399 +\fi
  1400 +\ifnum\titlenotecount=5
  1401 +\raisebox{10pt}{$\P$} %% Adjusted for 10pt
  1402 +\fi
  1403 + \@titlenotetext
  1404 +}}
  1405 +
  1406 +\long\def\@titlenotetext#1{\insert\footins{%
  1407 +\ifnum\titlenotecount=1\global\tntoks={#1}\fi
  1408 +\ifnum\titlenotecount=2\global\tntokstwo={#1}\fi
  1409 +\ifnum\titlenotecount=3\global\tntoksthree={#1}\fi
  1410 +\ifnum\titlenotecount=4\global\tntoksfour={#1}\fi
  1411 +\ifnum\titlenotecount=5\global\tntoksfive={#1}\fi
  1412 + \reset@font\footnotesize
  1413 + \interlinepenalty\interfootnotelinepenalty
  1414 + \splittopskip\footnotesep
  1415 + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
  1416 + \hsize\columnwidth \@parboxrestore
  1417 + \protected@edef\@currentlabel{%
  1418 + }%
  1419 + \color@begingroup
  1420 + \color@endgroup}}
  1421 +
  1422 +%%%%%%%%%%%%%%%%%%%%%%%%%
  1423 +\ps@plain
  1424 +\baselineskip=11pt
  1425 +\let\thepage\relax % For NO page numbers - GM Nov. 30th. 1999 and July 2000
  1426 +\def\setpagenumber#1{\global\setcounter{page}{#1}}
  1427 +\pagenumbering{arabic} % Arabic page numbers GM July 2000 %% Adjusted for 10pt submission
  1428 +\twocolumn % Double column.
  1429 +\flushbottom % Even bottom -- alas, does not balance columns at end of document
  1430 +%\pagestyle{plain} %% Adjusted for 10pt
  1431 +
  1432 +% Need Copyright Year and Copyright Data to be user definable (in .tex file).
  1433 +% Gerry Nov. 30th. 1999
  1434 +\newtoks\copyrtyr
  1435 +\newtoks\acmcopyr
  1436 +\newtoks\boilerplate
  1437 +\global\acmcopyr={X-XXXXX-XX-X/XX/XX} % Default - 5/11/2001 *** Gerry
  1438 +\global\copyrtyr={20XX} % Default - 3/3/2003 *** Gerry
  1439 +\def\CopyrightYear#1{\global\copyrtyr{#1}}
  1440 +\def\crdata#1{\global\acmcopyr{#1}}
  1441 +\def\permission#1{\global\boilerplate{#1}}
  1442 +%
  1443 +\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.}
  1444 +\newtoks\copyrightetc
  1445 +\global\copyrightetc{Copyright \the\copyrtyr\ ACM \the\acmcopyr\ ...\$10.00}
  1446 +%\toappear{\the\boilerplate\par %% Adjusted for 10pt
  1447 +%{\confname{\the\conf}} \the\confinfo\par \the\copyrightetc.}
  1448 +%\DeclareFixedFont{\altcrnotice}{OT1}{tmr}{m}{n}{8} % << patch needed for accenting e.g. Montreal - Gerry, May 2007
  1449 +%\DeclareFixedFont{\altconfname}{OT1}{tmr}{m}{it}{8} % << patch needed for accenting in italicized confname - Gerry, May 2007
  1450 +%
  1451 +%{\altconfname{{\the\conf}}} {\altcrnotice\the\confinfo\par} \the\copyrightetc.} % << Gerry, May 2007
  1452 +%
  1453 +% The following section (i.e. 3 .sty inclusions) was added in May 2007 so as to fix the problems that many
  1454 +% authors were having with accents. Sometimes accents would occur, but the letter-character would be of a different
  1455 +% font. Conversely the letter-character font would be correct but, e.g. a 'bar' would appear superimposed on the
  1456 +% character instead of, say, an unlaut/diaresis. Sometimes the letter-character would NOT appear at all.
  1457 +% Using [T1]{fontenc} outright was not an option as this caused 99% of the authors to 'produce' a Type-3 (bitmapped)
  1458 +% PDF file - useless for production.
  1459 +%
  1460 +% For proper (font) accenting we NEED these packages to be part of the .cls file i.e. 'ae', 'aecompl' and 'aeguil'
  1461 +% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1462 +%% This is file `ae.sty'
  1463 +\def\fileversion{1.3}
  1464 +\def\filedate{2001/02/12}
  1465 +\NeedsTeXFormat{LaTeX2e}
  1466 +%\ProvidesPackage{ae}[\filedate\space\fileversion\space % GM
  1467 +% Almost European Computer Modern] % GM - keeping the log file clean(er)
  1468 +\newif\if@ae@slides \@ae@slidesfalse
  1469 +\DeclareOption{slides}{\@ae@slidestrue}
  1470 +\ProcessOptions
  1471 +\fontfamily{aer}
  1472 +\RequirePackage[T1]{fontenc}
  1473 +\if@ae@slides
  1474 + \renewcommand{\sfdefault}{laess}
  1475 + \renewcommand{\rmdefault}{laess} % no roman
  1476 + \renewcommand{\ttdefault}{laett}
  1477 +\else
  1478 + \renewcommand{\sfdefault}{aess}
  1479 + \renewcommand{\rmdefault}{aer}
  1480 + \renewcommand{\ttdefault}{aett}
  1481 +\fi
  1482 +\endinput
  1483 +%%
  1484 +%% End of file `ae.sty'.
  1485 +%
  1486 +%
  1487 +\def\fileversion{0.9}
  1488 +\def\filedate{1998/07/23}
  1489 +\NeedsTeXFormat{LaTeX2e}
  1490 +%\ProvidesPackage{aecompl}[\filedate\space\fileversion\space % GM
  1491 +%T1 Complements for AE fonts (D. Roegel)] % GM -- keeping the log file clean(er)
  1492 +
  1493 +\def\@ae@compl#1{{\fontencoding{T1}\fontfamily{cmr}\selectfont\symbol{#1}}}
  1494 +\def\guillemotleft{\@ae@compl{19}}
  1495 +\def\guillemotright{\@ae@compl{20}}
  1496 +\def\guilsinglleft{\@ae@compl{14}}
  1497 +\def\guilsinglright{\@ae@compl{15}}
  1498 +\def\TH{\@ae@compl{222}}
  1499 +\def\NG{\@ae@compl{141}}
  1500 +\def\ng{\@ae@compl{173}}
  1501 +\def\th{\@ae@compl{254}}
  1502 +\def\DJ{\@ae@compl{208}}
  1503 +\def\dj{\@ae@compl{158}}
  1504 +\def\DH{\@ae@compl{208}}
  1505 +\def\dh{\@ae@compl{240}}
  1506 +\def\@perthousandzero{\@ae@compl{24}}
  1507 +\def\textperthousand{\%\@perthousandzero}
  1508 +\def\textpertenthousand{\%\@perthousandzero\@perthousandzero}
  1509 +\endinput
  1510 +%
  1511 +%
  1512 +%% This is file `aeguill.sty'
  1513 +% This file gives french guillemets (and not guillemots!)
  1514 +% built with the Polish CMR fonts (default), WNCYR fonts, the LASY fonts
  1515 +% or with the EC fonts.
  1516 +% This is useful in conjunction with the ae package
  1517 +% (this package loads the ae package in case it has not been loaded)
  1518 +% and with or without the french(le) package.
  1519 +%
  1520 +% In order to get the guillemets, it is necessary to either type
  1521 +% \guillemotleft and \guillemotright, or to use an 8 bit encoding
  1522 +% (such as ISO-Latin1) which selects these two commands,
  1523 +% or, if you use the french package (but not the frenchle package),
  1524 +% to type << or >>.
  1525 +%
  1526 +% By default, you get the Polish CMR guillemets; if this package is loaded
  1527 +% with the `cm' option, you get the LASY guillemets; with `ec,' you
  1528 +% get the EC guillemets, and with `cyr,' you get the cyrillic guillemets.
  1529 +%
  1530 +% In verbatim mode, you always get the EC/TT guillemets.
  1531 +%
  1532 +% The default option is interesting in conjunction with PDF,
  1533 +% because there is a Type 1 version of the Polish CMR fonts
  1534 +% and these guillemets are very close in shape to the EC guillemets.
  1535 +% There are no free Type 1 versions of the EC fonts.
  1536 +%
  1537 +% Support for Polish CMR guillemets was kindly provided by
  1538 +% Rolf Niepraschk <niepraschk@ptb.de> in version 0.99 (2000/05/22).
  1539 +% Bernd Raichle provided extensive simplifications to the code
  1540 +% for version 1.00.
  1541 +%
  1542 +% This package is released under the LPPL.
  1543 +%
  1544 +% Changes:
  1545 +% Date version
  1546 +% 2001/04/12 1.01 the frenchle and french package are now distinguished.
  1547 +%
  1548 +\def\fileversion{1.01}
  1549 +\def\filedate{2001/04/12}
  1550 +\NeedsTeXFormat{LaTeX2e}
  1551 +%\ProvidesPackage{aeguill}[2001/04/12 1.01 % % GM
  1552 +%AE fonts with french guillemets (D. Roegel)] % GM - keeping the log file clean(er)
  1553 +%\RequirePackage{ae} % GM May 2007 - already embedded here
  1554 +
  1555 +\newcommand{\@ae@switch}[4]{#4}
  1556 +\DeclareOption{ec}{\renewcommand\@ae@switch[4]{#1}}
  1557 +\DeclareOption{cm}{\renewcommand\@ae@switch[4]{#2}}
  1558 +\DeclareOption{cyr}{\renewcommand\@ae@switch[4]{#3}}
  1559 +\DeclareOption{pl}{\renewcommand\@ae@switch[4]{#4}}
  1560 +\ExecuteOptions{pl}
  1561 +\ProcessOptions
  1562 +
  1563 +%
  1564 +% Load necessary packages
  1565 +%
  1566 +\@ae@switch{% ec
  1567 + % do nothing
  1568 +}{% cm
  1569 + \RequirePackage{latexsym}% GM - May 2007 - already 'mentioned as required' up above
  1570 +}{% cyr
  1571 + \RequirePackage[OT2,T1]{fontenc}%
  1572 +}{% pl
  1573 + \RequirePackage[OT4,T1]{fontenc}%
  1574 +}
  1575 +
  1576 +% The following command will be compared to \frenchname,
  1577 +% as defined in french.sty and frenchle.sty.
  1578 +\def\aeguillfrenchdefault{french}%
  1579 +
  1580 +\let\guill@verbatim@font\verbatim@font
  1581 +\def\verbatim@font{\guill@verbatim@font\ecguills{cmtt}%
  1582 + \let\guillemotleft\@oguills\let\guillemotright\@fguills}
  1583 +
  1584 +\begingroup \catcode`\<=13 \catcode`\>=13
  1585 +\def\x{\endgroup
  1586 + \def\ae@lfguill{<<}%
  1587 + \def\ae@rfguill{>>}%
  1588 +}\x
  1589 +
  1590 +\newcommand{\ecguills}[1]{%
  1591 + \def\selectguillfont{\fontencoding{T1}\fontfamily{#1}\selectfont}%
  1592 + \def\@oguills{{\selectguillfont\symbol{19}}}%
  1593 + \def\@fguills{{\selectguillfont\symbol{20}}}%
  1594 + }
  1595 +
  1596 +\newcommand{\aeguills}{%
  1597 + \ae@guills
  1598 + % We redefine \guillemotleft and \guillemotright
  1599 + % in order to catch them when they are used
  1600 + % with \DeclareInputText (in latin1.def for instance)
  1601 + % We use \auxWARNINGi as a safe indicator that french.sty is used.
  1602 + \gdef\guillemotleft{\ifx\auxWARNINGi\undefined
  1603 + \@oguills % neither french.sty nor frenchle.sty
  1604 + \else
  1605 + \ifx\aeguillfrenchdefault\frenchname
  1606 + \ae@lfguill % french.sty
  1607 + \else
  1608 + \@oguills % frenchle.sty
  1609 + \fi
  1610 + \fi}%
  1611 + \gdef\guillemotright{\ifx\auxWARNINGi\undefined
  1612 + \@fguills % neither french.sty nor frenchle.sty
  1613 + \else
  1614 + \ifx\aeguillfrenchdefault\frenchname
  1615 + \ae@rfguill % french.sty
  1616 + \else
  1617 + \@fguills % frenchle.sty
  1618 + \fi
  1619 + \fi}%
  1620 + }
  1621 +
  1622 +%
  1623 +% Depending on the class option
  1624 +% define the internal command \ae@guills
  1625 +\@ae@switch{% ec
  1626 + \newcommand{\ae@guills}{%
  1627 + \ecguills{cmr}}%
  1628 +}{% cm
  1629 + \newcommand{\ae@guills}{%
  1630 + \def\selectguillfont{\fontencoding{U}\fontfamily{lasy}%
  1631 + \fontseries{m}\fontshape{n}\selectfont}%
  1632 + \def\@oguills{\leavevmode\nobreak
  1633 + \hbox{\selectguillfont (\kern-.20em(\kern.20em}\nobreak}%
  1634 + \def\@fguills{\leavevmode\nobreak
  1635 + \hbox{\selectguillfont \kern.20em)\kern-.2em)}%
  1636 + \ifdim\fontdimen\@ne\font>\z@\/\fi}}%
  1637 +}{% cyr
  1638 + \newcommand{\ae@guills}{%
  1639 + \def\selectguillfont{\fontencoding{OT2}\fontfamily{wncyr}\selectfont}%
  1640 + \def\@oguills{{\selectguillfont\symbol{60}}}%
  1641 + \def\@fguills{{\selectguillfont\symbol{62}}}}
  1642 +}{% pl
  1643 + \newcommand{\ae@guills}{%
  1644 + \def\selectguillfont{\fontencoding{OT4}\fontfamily{cmr}\selectfont}%
  1645 + \def\@oguills{{\selectguillfont\symbol{174}}}%
  1646 + \def\@fguills{{\selectguillfont\symbol{175}}}}
  1647 +}
  1648 +
  1649 +
  1650 +\AtBeginDocument{%
  1651 + \ifx\GOfrench\undefined
  1652 + \aeguills
  1653 + \else
  1654 + \let\aeguill@GOfrench\GOfrench
  1655 + \gdef\GOfrench{\aeguill@GOfrench \aeguills}%
  1656 + \fi
  1657 + }
  1658 +
  1659 +\endinput
  1660 +%
  1661 +
pytex/make/Makerules 0 → 100644
  1 +++ a/pytex/make/Makerules
  1 +SHELL := /bin/bash
  2 +export TEXINPUTS :=.:$(PYTEX)/cls:
  3 +
  4 +# 16 Nov 2010 : GWA : Watch all .tex files below this directory to determine
  5 +# when to rebuild the dependencies.
  6 +
  7 +TEXFILES = $(shell find . -name "*.tex")
  8 +
  9 +# 16 Nov 2010 : GWA : Kind of a nasty hack, but we use a special Python
  10 +# script to regenerate make rules which are then loaded by the
  11 +# include below. This was the least nasty way of getting
  12 +# complex Latex dependencies to rebuild properly, while also
  13 +# enabling/disabling Bibtex as needed.
  14 +
  15 +.deps: $(TEXFILES)
  16 + @$(PYTEX)/bin/texincludes .deps $(CLASS)
  17 +include .deps
  18 +
  19 +%.ps : %.pdf
  20 + acroread -toPostScript $<
  21 +
  22 +allclean: rulesclean
  23 + @/bin/rm -f .deps
  24 +
  25 +rulesclean:
  26 + @/bin/rm -f *.dvi *.aux *.ps *~ *.log *.lot *.lof *.toc *.blg *.bbl url.sty *.out *.bak *.pyg $(PDFS)
  27 +
  28 +# 16 Nov 2010 : GWA : Special dummy targets below.
  29 +
  30 +xxxnote:
  31 + @echo "\\newcommand{\\XXXnote}[1]{\\textcolor{red}{\\bfseries XXX: #1}}" > .xxxnote-new
  32 + @if [ -n "`diff -N 2>/dev/null .xxxnote .xxxnote-new`" ]; then\
  33 + mv .xxxnote-new .xxxnote; \
  34 + else\
  35 + rm -f .xxxnote-new; \
  36 + fi
  37 +
  38 +noxxxnote:
  39 + @echo "\\newcommand{\\XXXnote}[1]{}" > .xxxnote-new
  40 + @if [ -n "`diff -N 2>/dev/null .xxxnote .xxxnote-new`" ]; then\
  41 + mv .xxxnote-new .xxxnote; \
  42 + else\
  43 + rm -f .xxxnote-new; \
  44 + fi
  45 +
  46 +draft:
  47 + @echo "\\def\\isdraft{1}" > .draft-new
  48 + @if [ -n "`diff -N 2>/dev/null .draft .draft-new`" ]; then\
  49 + mv .draft-new .draft; \
  50 + else\
  51 + rm -f .draft-new; \
  52 + fi
  53 +
  54 +nodraft:
  55 + @echo "" > .draft-new
  56 + @if [ -n "`diff -N 2>/dev/null .draft .draft-new`" ]; then\
  57 + mv .draft-new .draft; \
  58 + else\
  59 + rm -f .draft-new; \
  60 + fi
  61 +
  62 +blue:
  63 + @echo "\\def\\isblue{1}" > .blue-new
  64 + @if [ -n "`diff -N 2>/dev/null .blue .blue-new`" ]; then\
  65 + mv .blue-new .blue; \
  66 + else\
  67 + rm -f .blue-new; \
  68 + fi
  69 +
  70 +noblue:
  71 + @echo "" > .blue-new
  72 + @if [ -n "`diff -N 2>/dev/null .blue .blue-new`" ]; then\
  73 + mv .blue-new .blue; \
  74 + else\
  75 + rm -f .blue-new; \
  76 + fi
  77 +
  78 +.embed.pdf: $(PDF)
  79 + gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=.embed.pdf -f $(PDF)
  80 + @cp .embed.pdf $(PDF)
  81 +
  82 +embed: .embed.pdf
  83 +
  84 +MISSINGREFERENCES = $(strip $(shell grep Ref $(LOG) | awk '{print substr($$4, 2, length($$4) - 2)}'))
  85 +MISSINGCITATIONS = $(strip $(shell grep Cit $(LOG) | awk '{print substr($$4, 2, length($$4) - 2)}'))
  86 +missing:
  87 + @if [ "$(MISSINGREFERENCES)" != "" ]; then\
  88 + echo "-------------------------------------------------------------";\
  89 + echo "Missing references:";\
  90 + echo "-------------------------------------------------------------";\
  91 + echo $(MISSINGREFERENCES);\
  92 + fi
  93 + @if [ "$(MISSINGCITATIONS)" != "" ]; then\
  94 + echo "-------------------------------------------------------------";\
  95 + echo "Missing citations:";\
  96 + echo "-------------------------------------------------------------";\
  97 + echo $(MISSINGCITATIONS);\
  98 + fi
  99 +
  100 +missing-fail: missing
  101 + @if [ "$(MISSINGREFERENCES)" != "" ]; then false; fi
  102 + @if [ "$(MISSINGCITATIONS)" != "" ]; then false; fi
  103 +
  104 +pages: $(PDF)
  105 + @pdfinfo $(PDF) 2>/dev/null | grep "Pages" | awk '{print "$(PDF)", $$2;}'
  106 +
  107 +# 16 Nov 2010 : GWA : Phony targets.
  108 +
  109 +.PHONY : pages rulesclean missing-fail missing xxxnote noxxxnote draft nodraft blue noblue clean allclean all figures wc
references.bib 0 → 100644
  1 +++ a/references.bib
  1 +@string{proc = "Proc. "}
  2 +@string{sosp = "SOSP"}
  3 +@string{osdi = "OSDI"}
  4 +
  5 +@inproceedings{maui-mobisys10,
  6 + title={MAUI: making smartphones last longer with code offload},
  7 + author={Cuervo, Eduardo and Balasubramanian, Aruna and Cho, Dae-ki and Wolman, Alec and Saroiu, Stefan and Chandra, Ranveer and Bahl, Paramvir},
  8 + booktitle={Proceedings of the 8th international conference on Mobile systems, applications, and services},
  9 + pages={49--62},
  10 + year={2010},
  11 + organization={ACM}
  12 +}
  13 +
  14 +@inproceedings{foraging-mobisys07,
  15 + title={Simplifying cyber foraging for mobile devices},
  16 + author={Balan, Rajesh Krishna and Gergle, Darren and Satyanarayanan, Mahadev and Herbsleb, James},
  17 + booktitle={Proceedings of the 5th international conference on Mobile systems, applications and services},
  18 + pages={272--285},
  19 + year={2007},
  20 + organization={ACM}
  21 +}
  22 +
  23 +@inproceedings{tactics-mobisys03,
  24 + title={Tactics-based remote execution for mobile computing},
  25 + author={Balan, Rajesh Krishna and Satyanarayanan, Mahadev and Park, So Young and Okoshi, Tadashi},
  26 + booktitle={Proceedings of the 1st international conference on Mobile systems, applications and services},
  27 + pages={273--286},
  28 + year={2003},
  29 + organization={ACM}
  30 +}
  31 +
  32 +@article{badrinath2000conceptual,
  33 + title={A conceptual framework for network and client adaptation},
  34 + author={Badrinath, B and Fox, Armando and Kleinrock, Leonard and Popek, Gerald and Reiher, Peter and Satyanarayanan, Mahadev},
  35 + journal={Mobile Networks and Applications},
  36 + volume={5},
  37 + number={4},
  38 + pages={221--231},
  39 + year={2000},
  40 + publisher={Springer-Verlag New York, Inc.}
  41 +}
  42 +
  43 +@inproceedings{odyssey-sosp97,
  44 + Address = {Saint Malo, France},
  45 + Author = {Brian D. Noble and M. Satyanarayanan and Dushyanth Narayanan and James Eric Tilton and Jason Flinn and Kevin R. Walker},
  46 + Booktitle = {SOSP '97: Proceedings of the sixteenth ACM symposium on Operating systems principles},
  47 + Pages = {276--287},
  48 + Title = {Agile application-aware adaptation for mobility},
  49 + Year = {1997}}
  50 +
  51 +@article{arxiv13-enframe,
  52 + title={ENFrame: A Platform for Processing Probabilistic Data},
  53 + author={van Schaik, Sebastiaan J and Olteanu, Dan and Fink, Robert},
  54 + journal={arXiv preprint arXiv:1309.0373},
  55 + year={2013}
  56 +}
  57 +
  58 +@inproceedings{sensys07-eon,
  59 + title={{Eon: A Language and Runtime System for Perpetual Systems}},
  60 + author="J Sorber and A Kostadinov and M Brennan and M Garber and M Corner and E D Berger",
  61 + booktitle="ACM Conference on Embedded Networked Sensor Systems (SenSys'07)",
  62 + month="November", year="2007"}
  63 +
  64 +@inproceedings{sensys07-levels,
  65 + title={{Meeting lifetime goals with energy levels}},
  66 + author="A Lachenmann and P J Marron and D Minder and K Rothermer",
  67 + booktitle="ACM Conference on Embedded Networked Sensor Systems (SenSys'07)",
  68 + month="November", year="2007"}
  69 +
  70 +@inproceedings{gomez2013reran,
  71 + title={Reran: Timing-and touch-sensitive record and replay for android},
  72 + author={Gomez, Lorenzo and Neamtiu, Iulian and Azim, Tanzirul and Millstein, Todd},
  73 + booktitle={Software Engineering (ICSE), 2013 35th International Conference on},
  74 + pages={72--81},
  75 + year={2013},
  76 + organization={IEEE}
  77 +}
  78 +
  79 +@misc{phonelab-url,
  80 + Author = "PhoneLab",
  81 + Howpublished = {\url{http://www.phone-lab.org}},
  82 + Title = {{PhoneLab Testbed}}}
  83 +
  84 +@inproceedings{sustain-hotmobile14,
  85 + Booktitle = proc # {15th Workshop on Mobile Systems and Applications
  86 + (ACM HotMobile 2014)},
  87 + Title = {{The Mote is Dead. Long Live the Discarded Smartphone!}},
  88 + Author = {Geoffrey Challen and Scott Haseley and Anudipa Maiti and Anand
  89 + Nandugudi and Guru Prasad and Mukta Puri and Junfei Wang},
  90 + Month = {Feb.},
  91 + Year = {2014},
  92 +}
  93 +
  94 +@misc{presence-peoplepower,
  95 + title = {{ People Power Products}},
  96 + howpublished = {\url{http://peoplepowerco.com/products/}}
  97 +}
  98 +
  99 +@inproceedings{gdi,
  100 + Author = {Robert Szewczyk and Alan Mainwaring and Joseph Polastre and David Culler},
  101 + Booktitle = proc # {Second ACM Conference on Embedded Networked Sensor Systems (SenSys)},
  102 + Date-Added = {2008-04-13 11:35:45 -0400},
  103 + Date-Modified = {2008-04-13 11:35:45 -0400},
  104 + Month = {November},
  105 + Title = {An Analysis of a Large Scale Habitat Monitoring Application},
  106 + Year = 2004}
  107 +
  108 +@inproceedings{ggb-monitoring,
  109 + Address = {Stanford, CA},
  110 + Author = {Shamim N. Pakzad and Sukun Kim and Gregory L Fenves and Steven D. Glaser and David E. Culler and James W. Demmel},
  111 + Booktitle = proc # {5th International Workshop on Structural Health Monitoring (IWSHM 2005)},
  112 + Date-Added = {2008-04-13 11:47:28 -0400},
  113 + Date-Modified = {2008-04-13 11:47:28 -0400},
  114 + Month = {September},
  115 + Title = {Multi-Purpose Wireless Accelerometers for Civil Infrastructure Monitoring},
  116 + Year = 2005}
  117 +
  118 +@inproceedings{koala-ipsn08,
  119 + author = {Musaloiu-E., Razvan and Liang, Chieh-Jan Mike and Terzis, Andreas},
  120 + title = {Koala: Ultra-Low Power Data Retrieval in Wireless Sensor Networks},
  121 + booktitle = {Proceedings of the 7th international conference on Information processing in sensor networks},
  122 + series = {IPSN '08},
  123 + year = {2008},
  124 + isbn = {978-0-7695-3157-1},
  125 + pages = {421--432},
  126 + numpages = {12},
  127 + url = {http://dx.doi.org/10.1109/IPSN.2008.10},
  128 + doi = {10.1109/IPSN.2008.10},
  129 + acmid = {1372752},
  130 + publisher = {IEEE Computer Society},
  131 + address = {Washington, DC, USA},
  132 + keywords = {Data gathering, duty-cycling, routing, low-power, network wake-up},
  133 +}
  134 +
  135 +@inproceedings{lance-sensys08,
  136 + Address = {Raleigh, NC, USA},
  137 + Author = {Geoffrey Werner-Allen and Stephen Dawson-Haggerty and Matt Welsh},
  138 + Booktitle = proc # {6th ACM Conference on Embedded Networked Sensor Systems
  139 + (SenSys'08)},
  140 + Month = {November},
  141 + Title = {Lance: Optimizing High-Resolution Signal Collection in Wireless
  142 + Sensor Networks},
  143 + Year = 2008}
  144 +
  145 +
  146 +@misc{phonebloks-url,
  147 + title = {{ PhoneBloks }},
  148 + howpublished = {\url{http://www.phonebloks.com/}}
  149 +}
  150 +@misc{etbc-dumping,
  151 + title = {{ Responsible Recycling vs Global Dumping }},
  152 + author = {Electronics TakeBack Coalition},
  153 + howpublished =
  154 + {\url{http://www.electronicstakeback.com/global-e-waste-dumping/}}
  155 +}
  156 +
  157 +@inproceedings{leaves-ipsn12,
  158 + author = {Yerva, Lohit and Campbell, Brad and Bansal, Apoorva and Schmid, Thomas and Dutta, Prabal},
  159 + title = {Grafting energy-harvesting leaves onto the sensornet tree},
  160 + booktitle = {Proceedings of the 11th international conference on Information Processing in Sensor Networks},
  161 + series = {IPSN '12},
  162 + year = {2012},
  163 + isbn = {978-1-4503-1227-1},
  164 + location = {Beijing, China},
  165 + pages = {197--208},
  166 + numpages = {12},
  167 + url = {http://doi.acm.org/10.1145/2185677.2185733},
  168 + doi = {10.1145/2185677.2185733},
  169 + acmid = {2185733},
  170 + publisher = {ACM},
  171 + address = {New York, NY, USA},
  172 + keywords = {energy-harvesting sensor node, low power wireless networking},
  173 +}
  174 +
  175 +
  176 +@INPROCEEDINGS{hitchhikers-sensys08,
  177 + author = {Guillermo Barrenetxea and François Ingelrest and Gunnar Schaefer and Martin Vetterli},
  178 + title = {The Hitchhiker's Guide to Successful Wireless Sensor Network Deployments},
  179 + booktitle = {in Proceedings of ACM SenSys},
  180 + year = {2008}
  181 +}
  182 +
  183 +@inproceedings{hijack-dev10,
  184 + author = {Kuo, Ye-Sheng and Verma, Sonal and Schmid, Thomas and Dutta, Prabal},
  185 + title = {Hijacking power and bandwidth from the mobile phone's audio interface},
  186 + booktitle = {Proceedings of the First ACM Symposium on Computing for Development},
  187 + series = {ACM DEV '10},
  188 + year = {2010},
  189 + isbn = {978-1-4503-0473-3},
  190 + location = {London, United Kingdom},
  191 + pages = {24:1--24:10},
  192 + articleno = {24},
  193 + numpages = {10},
  194 + url = {http://doi.acm.org/10.1145/1926180.1926210},
  195 + doi = {10.1145/1926180.1926210},
  196 + acmid = {1926210},
  197 + publisher = {ACM},
  198 + address = {New York, NY, USA},
  199 + keywords = {audio communications, energy harvesting, mobile phones, participatory sensing, phone peripherals},
  200 +}
  201 +
  202 +@misc{cnn-goldinphone,
  203 + title = {{Your dead iPhone is a gold mine---literally}},
  204 + author = {David Goldman},
  205 + howpublished =
  206 + {\url{http://money.cnn.com/2011/10/13/technology/iphone_trade_in/}}
  207 +}
  208 +
  209 +@misc{sprint-m2m,
  210 + title = {{Sprint M2M Solutions}},
  211 + author = {Sprint},
  212 + howpublished = {\url{http://m2m.sprint.com/}}
  213 +}
  214 +
  215 +@misc{sprintgreen-url,
  216 + title = {{Newsweek's 2012 Green Rankings}},
  217 + author = {\url{greenbiz.com}},
  218 + howpublished =
  219 + {\url{http://www.greenbiz.com/blog/2012/10/20/newsweeks-2012-green-rankings-time-its-serious}}}
  220 +
  221 +@misc{sprintrecycle-url,
  222 + title = {{Sprint Re:cycle}},
  223 + author = {\url{sprint.com}},
  224 + howpublished =
  225 + {\url{http://www.sprint.com/responsibility/communities_across/index.html}}}
  226 +
  227 +@misc{sprintpolicy-url,
  228 + title = {{Sprint Electronics Stewardship Policy}},
  229 + author = {{Sprint}},
  230 + howpublished =
  231 + {\url{http://www.sprint.com/responsibility/ouroperations/docs/ElectronicsStewardshipPolicy.pdf}}}
  232 +
  233 +@misc{rpipower-url,
  234 + title = {{RasPi power usage measurements}},
  235 + author = {\url{www.raspberrypi.org}},
  236 + howpublished = {\url{http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63\&t=6050\&start=50}}}
  237 +
  238 +@misc{wirelessenergyconsumption-url,
  239 + title = {{ Comparing Low-Power Wireless Technologies }},
  240 + author = {{ Digikey }},
  241 + howpublished =
  242 + {\url{http://www.digikey.com/us/en/techzone/wireless/resources/articles/comparing-low-power-wireless.html}}}
  243 +
  244 +@inproceedings{volcano-osdi06,
  245 + Address = {Seattle, WA},
  246 + Author = {Geoff Werner-Allen and Konrad Lorincz and Jeff Johnson and Jonathan Lees and Matt Welsh},
  247 + Booktitle = proc # {7th USENIX Symposium on Operating Systems Design and
  248 + Implementation (OSDI 2006)},
  249 + Month = {November},
  250 + Title = {Fidelity and Yield in a Volcano Monitoring Sensor Network},
  251 + Year = 2006}
  252 +
  253 +@INPROCEEDINGS{icem-sosp07,
  254 + author = {Kevin Klues and Vlado Handziski and Chenyang Lu and Adam Wolisz and David Culler and David Gay and Philip Levis},
  255 + title = {Integrating concurrency control and energy management in device drivers},
  256 + BOOKTITLE = proc # "the 12st Annual " #sosp,
  257 + year = {2007},
  258 + pages = {251--264},
  259 + publisher = {ACM}
  260 +}
  261 +
  262 +@misc{computerreplacement-url,
  263 + title = {{ Most computers replaced after 4.5 years }},
  264 + author = {{ bit-tech }},
  265 + howpublished =
  266 + {\url{http://www.bit-tech.net/news/hardware/2011/05/12/most-computers-replaced-after-4-5-years/1}}
  267 +}
  268 +
  269 +@misc{smartphonereplacement-url,
  270 + title = {{ Trends in Smartphone Turnover }},
  271 + author = {{ Digital Technology: The Tech Portal }},
  272 + howpublished =
  273 + {\url{http://www.technology-digital.com/gadgets/-by-tim-kridel}}
  274 +}
  275 +
  276 +@INPROCEEDINGS{fawn,
  277 + author = {David G. Andersen and Jason Franklin and Michael Kaminsky and Amar Phanishayee and Lawrence Tan
  278 +and Vijay Vasudevan},
  279 + title = {FAWN: A Fast Array of Wimpy Nodes},
  280 + BOOKTITLE = proc # "the 22nd Annual " #sosp,
  281 + year = {2009},
  282 +pages = {1-14},
  283 + publisher = {ACM}
  284 +}
  285 +
  286 +@inproceedings{li-smartphonereuse,
  287 + author = {Li, Xun and Ortiz, Pablo J. and Browne, Jeffrey and Franklin, Diana and Oliver, John Y. and Geyer, Roland and Zhou, Yuanyuan and Chong, Frederic T.},
  288 + title = {Smartphone Evolution and Reuse: Establishing a More Sustainable Model},
  289 + booktitle = {Proceedings of the 2010 39th International Conference on Parallel Processing Workshops},
  290 + series = {ICPPW '10},
  291 + year = {2010},
  292 + isbn = {978-0-7695-4157-0},
  293 + pages = {476--484},
  294 + numpages = {9},
  295 + url = {http://dx.doi.org/10.1109/ICPPW.2010.70},
  296 + doi = {10.1109/ICPPW.2010.70},
  297 + acmid = {1905162},
  298 + publisher = {IEEE Computer Society},
  299 + address = {Washington, DC, USA},
  300 + keywords = {Sustainable Computing, Education, Smartphone Evolution},
  301 +}
  302 +
  303 +@misc{epa-ewasteweb,
  304 + TITLE = {{Statistics on the Management of Used and End-of-Life
  305 + Electronics}},
  306 + AUTHOR = {{United States Environmental Protection Agency}},
  307 + HOWPUBLISHED =
  308 + {\url{http://www.epa.gov/osw/conserve/materials/ecycling/manage.htm}}
  309 +}
  310 +
  311 +@misc{emulab-web,
  312 + AUTHOR = {{Emulab Total Network Testbed}},
  313 + TITLE = {{Emulab - Network Emulation Testbed Home}},
  314 + HOWPUBLISHED =
  315 + {\url{http://www.emulab.net/}}}
  316 +@misc{planetlab-web,
  317 + AUTHOR = {{PlanetLab Consortium}},
  318 + TITLE = {{PlanetLab: An open platform for developing, deploying, and
  319 + accessing planetary-scale services.}},
  320 + HOWPUBLISHED =
  321 + {\url{http://www.planet-lab.org/}}}
  322 +@inproceedings{bursty-sensys09,
  323 + author = {Alizai, Muhammad Hamad and Landsiedel, Olaf and Link, J\'{o} \'{A}gila Bitsch and G\"{o}tz, Stefan and Wehrle, Klaus},
  324 + title = {Bursty traffic over bursty links},
  325 + booktitle = {SenSys '09: Proceedings of the 7th ACM Conference on Embedded Networked Sensor Systems},
  326 + year = {2009},
  327 + isbn = {978-1-60558-519-2},
  328 + pages = {71--84},
  329 + location = {Berkeley, California},
  330 + doi = {http://doi.acm.org/10.1145/1644038.1644046},
  331 + publisher = {ACM},
  332 + address = {New York, NY, USA},
  333 + }
  334 +
  335 +@inproceedings{ctp-sensys09,
  336 + author = {Gnawali, Omprakash and Fonseca, Rodrigo and Jamieson, Kyle and Moss, David and Levis, Philip},
  337 + title = {Collection tree protocol},
  338 + booktitle = {SenSys '09: Proceedings of the 7th ACM Conference on Embedded Networked Sensor Systems},
  339 + year = {2009},
  340 + isbn = {978-1-60558-519-2},
  341 + pages = {1--14},
  342 + location = {Berkeley, California},
  343 + doi = {http://doi.acm.org/10.1145/1644038.1644040},
  344 + publisher = {ACM},
  345 + address = {New York, NY, USA},
  346 + }
  347 +
  348 +@inproceedings{isolation-sensys09,
  349 + author = {Il Choi, Jung and Kazandjieva, Maria A. and Jain, Mayank and Levis, Philip},
  350 + title = {The case for a network protocol isolation layer},
  351 + booktitle = {SenSys '09: Proceedings of the 7th ACM Conference on Embedded Networked Sensor Systems},
  352 + year = {2009},
  353 + isbn = {978-1-60558-519-2},
  354 + pages = {267--280},
  355 + location = {Berkeley, California},
  356 + doi = {http://doi.acm.org/10.1145/1644038.1644065},
  357 + publisher = {ACM},
  358 + address = {New York, NY, USA},
  359 + }
  360 +
  361 +@INPROCEEDINGS{stork,
  362 + AUTHOR = "T.~Kosar and M.~Livny",
  363 + TITLE = "Stork: Making Data Placement a First Class Citizen in the Grid",
  364 + BOOKTITLE = " Proceedings of ICDCS'04 ",
  365 + PAGES = "342-349",
  366 + MONTH = "March",
  367 + YEAR = {2004} }
  368 +
  369 +@ARTICLE{petashare,
  370 + AUTHOR = "X. Wang and D. Huang and I. Akturk and M. Balman and G. Allen and T. Kosar",
  371 + TITLE = "Semantic Enabled Metadata Management in PetaShare",
  372 + JOURNAL = {Journal of Grid and Utility Computing (IJGUC)},
  373 + YEAR = {2009} }
  374 +
  375 +@inproceedings{cloudclone-hotos,
  376 + author = {Chun, Byung-Gon and Maniatis, Petros},
  377 + title = {Augmented smartphone applications through clone cloud execution},
  378 + booktitle = {HotOS'09: Proceedings of the 12th conference on Hot topics in operating systems},
  379 + year = {2009},
  380 + pages = {8--8},
  381 + location = {Monte Verit\`{a}, Switzerland},
  382 + publisher = {USENIX Association},
  383 + address = {Berkeley, CA, USA},
  384 +}
  385 +
  386 +@misc{cloudclone-web,
  387 + AUTHOR = {{Intel Berkeley CloudClone Project}},
  388 + TITLE = {{CloudClone}},
  389 + HOWPUBLISHED =
  390 + {\url{http://berkeley.intel-research.net/bgchun/clonecloud/}}
  391 +}
  392 +
  393 +@inproceedings{motelab-ipsn,
  394 + Author = {Geoff Werner-Allen and Pat Swieskowski and Matt Welsh},
  395 + Booktitle = proc # {the Fourth International Conference on Information Processing in Sensor Networks (IPSN'05)},
  396 + Date-Added = {2008-04-13 11:47:28 -0400},
  397 + Date-Modified = {2008-04-13 11:47:28 -0400},
  398 + Month = {April},
  399 + Title = {{MoteLab: A Wireless Sensor Network Testbed}},
  400 + Year = 2005}
  401 +
  402 +@misc{motelab-web,
  403 + AUTHOR = {{Harvard MoteLab Testbed}},
  404 + TITLE = {{MoteLab}},
  405 + HOWPUBLISHED =
  406 + {\url{http://motelab.eecs.harvard.edu}}}
  407 +}
  408 +
  409 +@misc{opencirrus-web,
  410 + AUTHOR = {{OpenCirrus (TM) the HP/Intel/Yahoo! Open Cloud Computing
  411 + Research Testbed}},
  412 + TITLE = {{OpenCirrus (TM)}},
  413 + HOWPUBLISHED =
  414 + {\url{http://opencirrus.org}}}
  415 +
  416 +@article{opencirrus-ieee,
  417 + AUTHOR = {Arutyun I. Avetisyan and Roy Campbell and Indranil Gupta and Michael
  418 + T. Heath and Steven Y. Ko and Gregory R. Ganger and Michael A. Kozuch and
  419 + David O'Hallaron and Marcel Kunze and Thomas T. Kwan and Kevin Lai and
  420 + Martha Lyons and Dejan S. Milojicic and Hing Yan Lee and Yeng Chai Soh and
  421 + Ng Kwang Ming and Jing-Yuan Luke and Han Namgoong},
  422 + TITLE = {{Open Cirrus: A Global Cloud Computing Testbed}},
  423 + JOURNAL ={IEEE Computer},
  424 + VOLUME = {43},
  425 + ISSN = {0018-9162},
  426 + YEAR = {2010},
  427 + PAGES = {35-43},
  428 + DOI = {http://doi.ieeecomputersociety.org/10.1109/MC.2010.111},
  429 + PUBLISHER = {IEEE Computer Society},
  430 + ADDRESS = {Los Alamitos, CA, USA}}
  431 +
  432 +
  433 +@inproceedings{opencirrus-hotcloud,
  434 + AUTHOR = {Roy Campbell and Indranil Gupta and Michael Heath and Steven Y. Ko
  435 + and Michael Kozuch and Marcel Kunze and Thomas Kwan and Kevin Lai
  436 + and Hing Yan Lee and Martha Lyons and Dejan Milojicic and David O'Hallaron
  437 + and Yeng Chai Soh},
  438 + TITLE = {{Open Cirrus Cloud Computing Testbed: Federated Data Centers for
  439 + Open Source Systems and Services Research}},
  440 + BOOKTITLE = {HotCloud'09: Proceedings of the 1st Workshop on Hot Topics in
  441 + Cloud Computing},
  442 + YEAR = {2009},
  443 + LOCATION = {Sandiego, CA}},
  444 + PUBLISHER = {USENIX Association},
  445 + ADDRESS = {Berkeley, CA, USA}}
  446 +
  447 +@Article{lites,
  448 + author = {A. Arora and P. Dutta and S. Bapat and V. Kulathumani and H. Zhang and V. Naik and V. Mittal and H. Cao and M. Demirbas and M. Gouda and Y-R. Choi and T. Herman and S. S. Kulkarni and U. Arumugam and M. Nesterenko and A. Vora and M. Miyashita},
  449 + title = {A line in the sand: A wireless sensor network for target detection, classification, and tracking},
  450 + journal = {Computer Networks (Elsevier)},
  451 + year = {2004},
  452 + OPTkey = {},
  453 + volume = {46},
  454 + number = {5},
  455 + pages = {605--634},
  456 + OPTmonth = {},
  457 + OPTnote = {},
  458 + OPTannote = {}
  459 +}
  460 +
  461 +@Article{exscal,
  462 + OPTauthor = {A. Arora and et. al.},
  463 + author = {A. Arora and R. Ramnath and E. Ertin and P. Sinha and S. Bapat and V. Naik and V. Kulathumani and H. Zhang and H. Cao and M. Sridharan and S. Kumar and N. Seddon and C. Anderson and T. Herman and N. Trivedi and C. Zhang and M. Nesterenko and R. Shah and S. Kulkarni and M. Aramugam and L. Wang and M. Gouda and Y. Choi and D. Culler and P. Dutta and C. Sharp and G. Tolle and M. Grimmer and B. Ferriera and K. Parker},
  464 + title = {ExScal: Elements of an Extreme Scale Wireless Sensor Network},
  465 + journal = {Int. Conf. on Embedded and Real-Time Computing Systems and Applications},
  466 + year = {2005},
  467 + OPTkey = {},
  468 + OPTvolume = {},
  469 + OPTnumber = {},
  470 + OPTpages = {},
  471 + OPTmonth = {},
  472 + OPTnote = {},
  473 + OPTannote = {}
  474 +}
  475 +
  476 +@inproceedings{tinyos,
  477 + author = "Jason Hill and Robert Szewczyk and Alec Woo and Seth
  478 + Hollar and David E. Culler and Kristofer S. J. Pister",
  479 + title = "System Architecture Directions for Networked Sensors",
  480 + booktitle = proc # "the 9th International Conference on Architectural
  481 + Support for Programming Languages and Operating Systems",
  482 + month = nov,
  483 + pages = "93-104", year = "2000", address="Boston, MA, USA" }
  484 +
  485 +@inproceedings{contiki,
  486 + Address = {Tampa, FL},
  487 + Author = {Adam Dunkels and Bjorn Gronvall and Thiemo Voigt},
  488 + Booktitle = proc # {First IEEE Workshop on Embedded Networked Sensors (EmNetS)},
  489 + Date-Added = {2008-04-13 11:47:28 -0400},
  490 + Date-Modified = {2008-04-13 11:47:28 -0400},
  491 + Month = {November},
  492 + Title = {{Contiki: A Lightweight and Flexible Operating System for Tiny Networked Sensors}},
  493 + Year = 2004}
  494 +
  495 +@inproceedings{sorber2005turducken,
  496 + title={Turducken: hierarchical power management for mobile devices},
  497 + author={Sorber, Jacob and Banerjee, Nilanjan and Corner, Mark D and Rollins, Sami},
  498 + booktitle={Proceedings of the 3rd international conference on Mobile systems, applications, and services},
  499 + pages={261--274},
  500 + year={2005},
  501 + organization={ACM}
  502 +}
  503 +
  504 +@inproceedings{phonelab-sensemine13,
  505 + Author = {Anandatirtha Nandugudi and Anudipa Maiti and Taeyeon Ki and Fatih
  506 + Bulut and Murat Demirbas and Tevfik Kosar and Chunming Qiao and Steven Y.
  507 + Ko and Geoffrey Challen},
  508 + Booktitle = proc # {1st International Workshop on Sensing and Big Data
  509 + Mining (SenseMine 2013)},
  510 + Title = {PhoneLab: A Large Programmable Smartphone Testbed},
  511 + Month = {November},
  512 + Year = {2013}
  513 +}
  514 +
  515 +@INPROCEEDINGS{aop,
  516 + author = {Gregor Kiczales and John Lamping and Anurag Mendhekar and Chris Maeda and Cristina Lopes and Jean-marc Loingtier and John Irwin},
  517 + title = {Aspect-oriented programming},
  518 + booktitle = {ECOOP},
  519 + year = {1997},
  520 + publisher = {SpringerVerlag}
  521 +}
  522 +
  523 +@inproceedings{weaving,
  524 + author = {Popovici, Andrei and Gross, Thomas and Alonso, Gustavo},
  525 + title = {Dynamic Weaving for Aspect-oriented Programming},
  526 + booktitle = {Proceedings of the 1st International Conference on Aspect-oriented Software Development},
  527 + series = {AOSD '02},
  528 + year = {2002},
  529 + isbn = {1-58113-469-X},
  530 + location = {Enschede, The Netherlands},
  531 + pages = {141--147},
  532 + numpages = {7},
  533 + url = {http://doi.acm.org/10.1145/508386.508404},
  534 + doi = {10.1145/508386.508404},
  535 + acmid = {508404},
  536 + publisher = {ACM},
  537 + address = {New York, NY, USA},
  538 +}
  539 +
  540 +@inproceedings{ubicomp14-pocketparker,
  541 + author = {Nandugudi, Anandatirtha and Ki, Taeyeon and Nuessle, Carl and
  542 + Challen, Geoffrey},
  543 + title = {PocketParker: Pocketsourcing Parking Lot Availability},
  544 + booktitle = {Proceedings of the 2014 ACM International Joint Conference on
  545 + Pervasive and Ubiquitous Computing},
  546 + series = {UbiComp '14},
  547 + year = {2014},
  548 + isbn = {978-1-4503-2968-2},
  549 + location = {Seattle, Washington},
  550 + pages = {963--973},
  551 + numpages = {11},
  552 + url = {http://doi.acm.org/10.1145/2632048.2632098},
  553 + doi = {10.1145/2632048.2632098},
  554 + acmid = {2632098},
  555 + publisher = {ACM},
  556 + address = {New York, NY, USA},
  557 + keywords = {crowdsourcing, parking, smartphone sensing},
  558 +}
  559 +
  560 +@article{shen2008cost,
  561 + title={Cost-function-based network selection strategy in integrated
  562 + wireless and mobile networks},
  563 + author={Shen, Wei and Zeng, Qing-An},
  564 + journal={Vehicular Technology, IEEE Transactions on},
  565 + volume={57},
  566 + number={6},
  567 + pages={3778--3788},
  568 + year={2008},
  569 + publisher={IEEE}
  570 +}
  571 +
  572 +@article{nguyen2008user,
  573 + title={A user-centric and context-aware solution to interface management
  574 + and access network selection in heterogeneous wireless environments},
  575 + author={Nguyen-Vuong, Quoc-Thinh and Agoulmine, Nazim and
  576 + Ghamri-Doudane, Yacine},
  577 + journal={Computer Networks},
  578 + volume={52},
  579 + number={18},
  580 + pages={3358--3372},
  581 + year={2008},
  582 + publisher={Elsevier}
  583 +}
submitted/.gitignore 0 → 100644
  1 +++ a/submitted/.gitignore