├── .clang-format
├── .gitignore
├── .travis.yml
├── .ycm_extra_conf.py
├── CMakeLists.txt
├── Doxyfile.in
├── MIT-LICENSE.txt
├── README.md
├── doc
├── main.tex
├── ref.bib
└── sig-alternate.cls
├── include
├── AuxGraph.h
├── BreakSelfLoopsPass.h
├── EPPDecode.h
├── EPPEncode.h
├── EPPPathPrinter.h
├── EPPProfile.h
└── SplitLandingPadPredsPass.h
├── lib
├── CMakeLists.txt
└── epp
│ ├── AuxGraph.cpp
│ ├── BreakSelfLoopsPass.cpp
│ ├── CMakeLists.txt
│ ├── EPPDecode.cpp
│ ├── EPPEncode.cpp
│ ├── EPPPathPrinter.cpp
│ ├── EPPProfile.cpp
│ ├── Runtime.cpp
│ └── SplitLandingPadPredsPass.cpp
├── test
├── CMakeLists.txt
├── lit.cfg
├── lit.site.cfg.in
└── srcs
│ ├── 01-basic.c
│ ├── 01-basic.c.txt
│ ├── 02-triangle.c
│ ├── 02-triangle.c.txt
│ ├── 03-diamond.c
│ ├── 03-diamond.c.txt
│ ├── 04-diamond-x2.c
│ ├── 04-diamond-x2.c.txt
│ ├── 05-loop.c
│ ├── 05-loop.c.txt
│ ├── 06-loop-triangle.c
│ ├── 06-loop-triangle.c.txt
│ ├── 07-exception.cxx
│ ├── 07-exception.cxx.txt
│ ├── 08-pthread.c
│ ├── 08-pthread.c.txt
│ ├── 09-pthread2.c
│ ├── 09-pthread2.c.txt
│ ├── 10-omp.c
│ ├── 10-omp.c.txt
│ ├── 11-omp-for.c
│ ├── 11-omp-for.c.txt
│ ├── 12-thread.cxx
│ ├── 12-thread.cxx.txt
│ ├── 13-switch.c
│ ├── 13-switch.c.txt
│ ├── 14-triangle-loop.c
│ ├── 14-triangle-loop.c.txt
│ ├── 15-crit-ex.cxx
│ ├── 15-crit-ex.cxx.txt
│ ├── 16-unreach.c
│ ├── 16-unreach.c.txt
│ └── 17-self-loop.c
└── tools
├── CMakeLists.txt
└── llvm-epp
├── CMakeLists.txt
└── main.cpp
/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | Language: Cpp
3 | # BasedOnStyle: LLVM
4 | AccessModifierOffset: -2
5 | AlignAfterOpenBracket: true
6 | AlignConsecutiveAssignments: true
7 | AlignEscapedNewlinesLeft: false
8 | AlignOperands: true
9 | AlignTrailingComments: true
10 | AllowAllParametersOfDeclarationOnNextLine: true
11 | AllowShortBlocksOnASingleLine: false
12 | AllowShortCaseLabelsOnASingleLine: false
13 | AllowShortIfStatementsOnASingleLine: false
14 | AllowShortLoopsOnASingleLine: false
15 | AllowShortFunctionsOnASingleLine: All
16 | AlwaysBreakAfterDefinitionReturnType: false
17 | AlwaysBreakTemplateDeclarations: false
18 | AlwaysBreakBeforeMultilineStrings: false
19 | BreakBeforeBinaryOperators: None
20 | BreakBeforeTernaryOperators: true
21 | BreakConstructorInitializersBeforeComma: false
22 | BinPackParameters: true
23 | BinPackArguments: true
24 | ColumnLimit: 80
25 | ConstructorInitializerAllOnOneLineOrOnePerLine: false
26 | ConstructorInitializerIndentWidth: 4
27 | DerivePointerAlignment: false
28 | ExperimentalAutoDetectBinPacking: false
29 | IndentCaseLabels: false
30 | IndentWrappedFunctionNames: false
31 | IndentFunctionDeclarationAfterType: false
32 | MaxEmptyLinesToKeep: 1
33 | KeepEmptyLinesAtTheStartOfBlocks: true
34 | NamespaceIndentation: None
35 | ObjCBlockIndentWidth: 2
36 | ObjCSpaceAfterProperty: false
37 | ObjCSpaceBeforeProtocolList: true
38 | PenaltyBreakBeforeFirstCallParameter: 19
39 | PenaltyBreakComment: 300
40 | PenaltyBreakString: 1000
41 | PenaltyBreakFirstLessLess: 120
42 | PenaltyExcessCharacter: 1000000
43 | PenaltyReturnTypeOnItsOwnLine: 60
44 | PointerAlignment: Right
45 | SpacesBeforeTrailingComments: 1
46 | Cpp11BracedListStyle: true
47 | Standard: Cpp11
48 | IndentWidth: 4
49 | TabWidth: 4
50 | UseTab: Never
51 | BreakBeforeBraces: Attach
52 | SpacesInParentheses: false
53 | SpacesInSquareBrackets: false
54 | SpacesInAngles: false
55 | SpaceInEmptyParentheses: false
56 | SpacesInCStyleCastParentheses: false
57 | SpaceAfterCStyleCast: false
58 | SpacesInContainerLiterals: true
59 | SpaceBeforeAssignmentOperators: true
60 | ContinuationIndentWidth: 4
61 | CommentPragmas: '^ IWYU pragma:'
62 | ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
63 | SpaceBeforeParens: ControlStatements
64 | DisableFormat: false
65 | ...
66 |
67 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 |
7 | # Precompiled Headers
8 | *.gch
9 | *.pch
10 |
11 | # Compiled Dynamic libraries
12 | *.so
13 | *.dylib
14 | *.dll
15 |
16 | # Fortran module files
17 | *.mod
18 | *.smod
19 |
20 | # Compiled Static libraries
21 | *.lai
22 | *.la
23 | *.a
24 | *.lib
25 |
26 | # Executables
27 | *.exe
28 | *.out
29 | *.app
30 |
31 | # Python
32 | *.pyc
33 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: cpp
2 | sudo: required
3 | dist: trusty
4 | compiler:
5 | - g++
6 | os:
7 | - linux
8 | before_script:
9 | - sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc
10 | - sudo unlink /usr/bin/g++ && sudo ln -s /usr/bin/g++-5 /usr/bin/g++
11 | - g++ --version
12 | - wget http://releases.llvm.org/4.0.0/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
13 | - tar xf clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
14 | - export PATH=${PWD}/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-14.04/bin:$PATH
15 | - export LD_LIBRARY_PATH=${PWD}/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-14.04/lib
16 | - cmake -DLLVM_DIR=clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-14.04/lib/cmake/llvm .
17 | - sudo pip install lit
18 | script:
19 | - make -j4 VERBOSE=1
20 | - lit test -v
21 | branches:
22 | only:
23 | - master
24 | addons:
25 | apt:
26 | sources:
27 | - ubuntu-toolchain-r-test
28 | packages:
29 | - gcc-5
30 | - g++-5
31 | - cmake
32 | notifications:
33 | email: false
34 |
--------------------------------------------------------------------------------
/.ycm_extra_conf.py:
--------------------------------------------------------------------------------
1 | # Generated by YCM Generator at 2017-02-08 22:21:21.129815
2 |
3 | # This file is NOT licensed under the GPLv3, which is the license for the rest
4 | # of YouCompleteMe.
5 | #
6 | # Here's the license text for this file:
7 | #
8 | # This is free and unencumbered software released into the public domain.
9 | #
10 | # Anyone is free to copy, modify, publish, use, compile, sell, or
11 | # distribute this software, either in source code form or as a compiled
12 | # binary, for any purpose, commercial or non-commercial, and by any
13 | # means.
14 | #
15 | # In jurisdictions that recognize copyright laws, the author or authors
16 | # of this software dedicate any and all copyright interest in the
17 | # software to the public domain. We make this dedication for the benefit
18 | # of the public at large and to the detriment of our heirs and
19 | # successors. We intend this dedication to be an overt act of
20 | # relinquishment in perpetuity of all present and future rights to this
21 | # software under copyright law.
22 | #
23 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
26 | # IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
27 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29 | # OTHER DEALINGS IN THE SOFTWARE.
30 | #
31 | # For more information, please refer to
32 |
33 | import os
34 | import ycm_core
35 |
36 | flags = [
37 | '-x',
38 | 'c++',
39 | '-D_GNU_SOURCE',
40 | '-D__STDC_CONSTANT_MACROS',
41 | '-D__STDC_FORMAT_MACROS',
42 | '-D__STDC_LIMIT_MACROS',
43 | '-Depp_rt_agg_EXPORTS',
44 | '-Depp_rt_rle_EXPORTS',
45 | '-I/home/ska124/ModuleInstall/llvm-5.0/include',
46 | '-I/home/ska124/Repos/llvm-epp/include',
47 | '-Werror',
48 | '-Wno-deprecated-declarations',
49 | '-std=c++1y',
50 | ]
51 |
52 |
53 | # Set this to the absolute path to the folder (NOT the file!) containing the
54 | # compile_commands.json file to use that instead of 'flags'. See here for
55 | # more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
56 | #
57 | # You can get CMake to generate this file for you by adding:
58 | # set( CMAKE_EXPORT_COMPILE_COMMANDS 1 )
59 | # to your CMakeLists.txt file.
60 | #
61 | # Most projects will NOT need to set this to anything; you can just change the
62 | # 'flags' list of compilation flags. Notice that YCM itself uses that approach.
63 | compilation_database_folder = ''
64 |
65 | if os.path.exists( compilation_database_folder ):
66 | database = ycm_core.CompilationDatabase( compilation_database_folder )
67 | else:
68 | database = None
69 |
70 | SOURCE_EXTENSIONS = [ '.C', '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
71 |
72 | def DirectoryOfThisScript():
73 | return os.path.dirname( os.path.abspath( __file__ ) )
74 |
75 |
76 | def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
77 | if not working_directory:
78 | return list( flags )
79 | new_flags = []
80 | make_next_absolute = False
81 | path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
82 | for flag in flags:
83 | new_flag = flag
84 |
85 | if make_next_absolute:
86 | make_next_absolute = False
87 | if not flag.startswith( '/' ):
88 | new_flag = os.path.join( working_directory, flag )
89 |
90 | for path_flag in path_flags:
91 | if flag == path_flag:
92 | make_next_absolute = True
93 | break
94 |
95 | if flag.startswith( path_flag ):
96 | path = flag[ len( path_flag ): ]
97 | new_flag = path_flag + os.path.join( working_directory, path )
98 | break
99 |
100 | if new_flag:
101 | new_flags.append( new_flag )
102 | return new_flags
103 |
104 |
105 | def IsHeaderFile( filename ):
106 | extension = os.path.splitext( filename )[ 1 ]
107 | return extension in [ '.H', '.h', '.hxx', '.hpp', '.hh' ]
108 |
109 |
110 | def GetCompilationInfoForFile( filename ):
111 | # The compilation_commands.json file generated by CMake does not have entries
112 | # for header files. So we do our best by asking the db for flags for a
113 | # corresponding source file, if any. If one exists, the flags for that file
114 | # should be good enough.
115 | if IsHeaderFile( filename ):
116 | basename = os.path.splitext( filename )[ 0 ]
117 | for extension in SOURCE_EXTENSIONS:
118 | replacement_file = basename + extension
119 | if os.path.exists( replacement_file ):
120 | compilation_info = database.GetCompilationInfoForFile(
121 | replacement_file )
122 | if compilation_info.compiler_flags_:
123 | return compilation_info
124 | return None
125 | return database.GetCompilationInfoForFile( filename )
126 |
127 |
128 | def FlagsForFile( filename, **kwargs ):
129 | if database:
130 | # Bear in mind that compilation_info.compiler_flags_ does NOT return a
131 | # python list, but a "list-like" StringVec object
132 | compilation_info = GetCompilationInfoForFile( filename )
133 | if not compilation_info:
134 | return None
135 |
136 | final_flags = MakeRelativePathsInFlagsAbsolute(
137 | compilation_info.compiler_flags_,
138 | compilation_info.compiler_working_dir_ )
139 |
140 | else:
141 | relative_to = DirectoryOfThisScript()
142 | final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
143 |
144 | return {
145 | 'flags': final_flags,
146 | 'do_cache': True
147 | }
148 |
149 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project(llvm-epp)
2 | cmake_minimum_required(VERSION 2.8)
3 |
4 | set(PACKAGE_NAME llvm-epp)
5 | set(PACKAGE_VERSION 1.0)
6 | set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
7 | set(PACKAGE_BUGREPORT "ska124@sfu.ca")
8 |
9 | # LLVM 3.8 downloaded from the releases page is built using the older version
10 | # of the CXX ABI, here we disable it. When we use a newer version this option
11 | # will be removed.
12 | set(CMAKE_CXX_FLAGS "-fno-rtti -std=c++1y -Werror -Wno-deprecated-declarations")
13 |
14 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
15 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
16 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
17 |
18 | set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
19 | ############## LLVM CONFIGURATION #################
20 |
21 | # LLVM_DIR must be set to the prefix of /share/llvm/cmake via commandline
22 | find_package(LLVM REQUIRED CONFIG)
23 | message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
24 | message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
25 |
26 | # We incorporate the CMake features provided by LLVM:
27 | list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
28 | include(AddLLVM)
29 |
30 | #option(LLVM_ENABLE_CXX11 "Enable C++11" ON)
31 |
32 | option(LLVM_INCLUDE_TOOLS "Generate build targets for the LLVM tools." ON)
33 | option(LLVM_BUILD_TOOLS
34 | "Build the LLVM tools. If OFF, just generate build targets." ON)
35 |
36 | message("LLVM STATUS:
37 | Definitions ${LLVM_DEFINITIONS}
38 | Includes ${LLVM_INCLUDE_DIRS}
39 | Libraries ${LLVM_LIBRARY_DIRS}
40 | Targets ${LLVM_TARGETS_TO_BUILD}")
41 | # Now set the LLVM header and library paths:
42 | include_directories( ${LLVM_INCLUDE_DIRS} )
43 | link_directories( ${LLVM_LIBRARY_DIRS} )
44 | add_definitions( ${LLVM_DEFINITIONS} )
45 |
46 |
47 |
48 |
49 | find_program(LIT_COMMAND lit)
50 |
51 | # Documentation
52 |
53 | find_package(Doxygen)
54 | if(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
55 | message(STATUS "Doxygen found, the `doc` target is available to generate html documentation")
56 | configure_file(${CMAKE_SOURCE_DIR}/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile @ONLY)
57 | add_custom_target(doc
58 | ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
59 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
60 | COMMENT "Generating API documentation for needle" VERBATIM
61 | )
62 | endif()
63 |
64 |
65 | ############## FINAL PROJECT CONFIG #################
66 |
67 | # And the project header and library paths
68 | include_directories(${CMAKE_SOURCE_DIR}/include)
69 | link_directories( ${LIBRARY_OUTPUT_PATH} )
70 | set(CMAKE_TEMP_LIBRARY_PATH "${PROJECT_BINARY_DIR}/lib")
71 | # TODO: Add install path to the list....
72 |
73 |
74 | add_subdirectory(lib)
75 | add_subdirectory(tools)
76 | add_subdirectory(test)
77 |
--------------------------------------------------------------------------------
/MIT-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright 2017 Snehasish Kumar
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## llvm-epp
2 | Efficient Path Profiling using LLVM
3 |
4 | ## Requires
5 |
6 | 1. LLVM 5.0
7 | 2. gcc-5+
8 |
9 | ## Build
10 |
11 | 1. `mkdir build && cd build`
12 | 2. `cmake -DCMAKE_BUILD_TYPE=Release .. && make -j 8`
13 | 3. `sudo make install`
14 |
15 | ## Test
16 |
17 | To run the tests, install [lit](https://pypi.python.org/pypi/lit) from the python package index.
18 |
19 | 1. `pip install lit`
20 | 2. `cd build`
21 | 3. `lit test`
22 |
23 | ## Documentation
24 |
25 | To generate documentation, install [graphviz](http://www.graphviz.org/) and [doxygen](http://www.stack.nl/~dimitri/doxygen/). Running `cmake` with these prerequisites will enable the `doc` target for the build system. Running `make doc` will generate html documentation of the classes.
26 |
27 | ## Usage
28 |
29 | 1. `clang -c -g -emit-llvm prog.c`
30 | 2. `llvm-epp prog.bc -o prog`
31 | 3. `clang prog.epp.bc -o exe -lepp-rt`
32 | 4. `./exe`
33 | 5. `llvm-epp -p=path-profile-results.txt prog.bc`
34 |
35 | ## Known Issues
36 |
37 | 1. Instrumentation cannot be placed along computed indirect branch target edges. [This](http://blog.llvm.org/2010/01/address-of-label-and-indirect-branches.html) blog post describes the issue under the section "How does this extension interact with critical edge splitting?".
38 |
39 | ## License
40 |
41 | The MIT License
42 |
43 |
--------------------------------------------------------------------------------
/doc/main.tex:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % This is the template for submission to ISCA 2016
3 | % The cls file is a modified from 'sig-alternate.cls'
4 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 |
6 |
7 | \documentclass{sig-alternate}
8 | \usepackage{mathptmx} % This is Times font
9 |
10 | \newcommand{\ignore}[1]{}
11 | \usepackage{fancyhdr}
12 | \usepackage[normalem]{ulem}
13 | \usepackage[hyphens]{url}
14 | \usepackage{hyperref}
15 |
16 |
17 | %%%%%%%%%%%---SETME-----%%%%%%%%%%%%%
18 | \newcommand{\hpcasubmissionnumber}{NaN}
19 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20 |
21 | \fancypagestyle{firstpage}{
22 | \fancyhf{}
23 | \setlength{\headheight}{10pt}
24 | \renewcommand{\headrulewidth}{0pt}
25 | \fancyhead[C]{\normalsize{ISCA 2016 Submission
26 | \textbf{\#\hpcasubmissionnumber} \\ Confidential Draft: DO NOT DISTRIBUTE}}
27 | \pagenumbering{arabic}
28 | }
29 |
30 | %%%%%%%%%%%---SETME-----%%%%%%%%%%%%%
31 | \title{Efficient Path Profiling for LLVM}
32 | \author{Snehasish Kumar, Nick Sumner\\\{ska124,wsumner\}@cs.sfu.ca}
33 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34 |
35 | \begin{document}
36 | \maketitle
37 | %\thispagestyle{firstpage}
38 | \pagestyle{plain}
39 | \begin{abstract}
40 |
41 | This document is intended to serve as a sample for submissions to ISCA 2016. We provide some guidelines that authors should follow when submitting papers to the conference. In an effort to respect the efforts of reviewers and in the interest of fairness to all prospective authors, we request that all submissions follow the formatting and submission rules detailed below.
42 |
43 | \end{abstract}
44 |
45 | \section{Introduction}
46 |
47 | \subsection{About this document}
48 |
49 | \section{Implementation}
50 |
51 | \section{Evaluation of overheads}
52 |
53 | \section{Roadmap}
54 |
55 | %%%%%%%%% -- BIB STYLE AND FILE -- %%%%%%%%
56 | \bibliographystyle{ieeetr}
57 | \bibliography{ref}
58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59 |
60 | \end{document}
61 |
--------------------------------------------------------------------------------
/doc/ref.bib:
--------------------------------------------------------------------------------
1 |
2 |
3 | @book{lamport94,
4 | author = "Leslie Lamport",
5 | title = "{\LaTeX: A Document Preparation System}",
6 | year = "1994",
7 | publisher = "Addison-Wesley",
8 | edition = "2nd",
9 | address = "Reading, Massachusetts"
10 | }
11 |
12 | @inproceedings{nicepaper1,
13 | author = "Firstname1 Lastname1 and Firstname2 Lastname2",
14 | title = "A Very Nice Paper To Cite",
15 | month = "Feb.",
16 | year = "2014",
17 | booktitle = "Intl. Symp. on High Performance Computer Architecture (HPCA)"
18 | }
19 |
20 | @inproceedings{nicepaper2,
21 | author = "Firstname1 Lastname1 and Firstname2 Lastname2 and Firstname3 Lastname3",
22 | title = "Another Very Nice Paper to Cite",
23 | month = "Oct.",
24 | year = "2012",
25 | booktitle = "Intl. Symp. on Microarchitecture (MICRO)"
26 | }
27 |
28 | @inproceedings{nicepaper3,
29 | author = "Firstname1 Lastname1 and Firstname2 Lastname2 and Firstname3 Lastname3 and Firstname4 Lastname4 and Firstname5 Lastname5",
30 | title = "Yet Another Very Nice Paper To Cite, With Many Author Names All Spelled Out",
31 | month = "June",
32 | year = "2011",
33 | booktitle = "Intl. Symp. on Computer Architecture (ISCA)"
34 | }
35 |
--------------------------------------------------------------------------------
/doc/sig-alternate.cls:
--------------------------------------------------------------------------------
1 | %rabi SIG-ALTERNATE.CLS - VERSION 2.5
2 | % "COMPATIBLE" WITH THE "ACM_PROC_ARTICLE-SP.CLS" V3.2SP
3 | % Gerald Murray - May 23rd 2012
4 | %
5 | % ---- Start of 'updates' ----
6 | % Changed $10 fee to $15 -- May 2012 -- Gerry
7 | % Changed $5 fee to $10 -- April 2009 -- Gerry
8 | % April 22nd. 2009 - Fixed 'Natbib' incompatibility problem - Gerry
9 | % April 22nd. 2009 - Fixed 'Babel' incompatibility problem - Gerry
10 | % April 22nd. 2009 - Inserted various bug-fixes and improvements - Gerry
11 | %
12 | % To produce Type 1 fonts in the document plus allow for 'normal LaTeX accenting' in the critical areas;
13 | % title, author block, section-heads, confname, etc. etc.
14 | % i.e. the whole purpose of this version update is to NOT resort to 'inelegant accent patches'.
15 | % After much research, three extra .sty packages were added to the the tail (ae, aecompl, aeguill) to solve,
16 | % in particular, the accenting problem(s). We _could_ ask authors (via instructions/sample file) to 'include' these in
17 | % the source .tex file - in the preamble - but if everything is already provided ('behind the scenes' - embedded IN the .cls)
18 | % then this is less work for authors and also makes everything appear 'vanilla'.
19 | % NOTE: all 'patchwork accenting" has been commented out (here) and is no longer 'used' in the sample .tex file (either).
20 | % Gerry June 2007
21 | %
22 | % Patch for accenting in conference name/location. Gerry May 3rd. 2007
23 | % Rule widths changed to .5, author count (>6) fixed, roll-back for Type 3 problem. Gerry March 20th. 2007
24 | % Changes made to 'modernize' the fontnames but esp. for MikTeX users V2.4/2.5 - Nov. 30th. 2006
25 | % Updated the \email definition to allow for its use inside of 'shared affiliations' - Nov. 30th. 2006
26 | % Fixed the 'section number depth value' - Nov. 30th. 2006
27 | %
28 | % Footnotes inside table cells using \minipage (Oct. 2002)
29 | % Georgia fixed bug in sub-sub-section numbering in paragraphs (July 29th. 2002)
30 | % JS/GM fix to vertical spacing before Proofs (July 30th. 2002)
31 | %
32 | % Made the Permission Statement / Conference Info / Copyright Info
33 | % 'user definable' in the source .tex file OR automatic if
34 | % not specified.
35 | %
36 | % Allowance made to switch default fonts between those systems using
37 | % normal/modern font names and those using 'Type 1' or 'Truetype' fonts.
38 | % See LINE NUMBER 255 for details.
39 | % Also provided for enumerated/annotated Corollaries 'surrounded' by
40 | % enumerated Theorems (line 848).
41 | % Gerry November 11th. 1999
42 | %
43 | % ---- End of 'updates' ----
44 | %
45 | \def\fileversion{v2.5} % for ACM's tracking purposes
46 | \def\filedate{May 23, 2012} % Gerry Murray's tracking data
47 | \def\docdate {Wednesday 23rd. May 2012} % Gerry Murray (with deltas to doc}
48 | \usepackage{epsfig}
49 | \usepackage{amssymb}
50 | \usepackage{amsmath}
51 | \usepackage{amsfonts}
52 | % Need this for accents in Arial/Helvetica
53 | %\usepackage[T1]{fontenc} % Gerry March 12, 2007 - causes Type 3 problems (body text)
54 | %\usepackage{textcomp}
55 | %
56 | % SIG-ALTERNATE DOCUMENT STYLE
57 | % G.K.M. Tobin August-October 1999
58 | % adapted from ARTICLE document style by Ken Traub, Olin Shivers
59 | % also using elements of esub2acm.cls
60 | % HEAVILY MODIFIED, SUBSEQUENTLY, BY GERRY MURRAY 2000
61 | % ARTICLE DOCUMENT STYLE -- Released 16 March 1988
62 | % for LaTeX version 2.09
63 | % Copyright (C) 1988 by Leslie Lamport
64 | %
65 | %
66 | %%% sig-alternate.cls is an 'ALTERNATE' document style for producing
67 | %%% two-column camera-ready pages for ACM conferences.
68 | %%% THIS FILE DOES NOT STRICTLY ADHERE TO THE SIGS (BOARD-ENDORSED)
69 | %%% PROCEEDINGS STYLE. It has been designed to produce a 'tighter'
70 | %%% paper in response to concerns over page budgets.
71 | %%% The main features of this style are:
72 | %%%
73 | %%% 1) Two columns.
74 | %%% 2) Side and top margins of 4.5pc, bottom margin of 6pc, column gutter of
75 | %%% 2pc, hence columns are 20pc wide and 55.5pc tall. (6pc =3D 1in, approx)
76 | %%% 3) First page has title information, and an extra 6pc of space at the
77 | %%% bottom of the first column for the ACM copyright notice.
78 | %%% 4) Text is 9pt on 10pt baselines; titles (except main) are 9pt bold.
79 | %%%
80 | %%%
81 | %%% There are a few restrictions you must observe:
82 | %%%
83 | %%% 1) You cannot change the font size; ACM wants you to use 9pt.
84 | %%% 3) You must start your paper with the \maketitle command. Prior to the
85 | %%% \maketitle you must have \title and \author commands. If you have a
86 | %%% \date command it will be ignored; no date appears on the paper, since
87 | %%% the proceedings will have a date on the front cover.
88 | %%% 4) Marginal paragraphs, tables of contents, lists of figures and tables,
89 | %%% and page headings are all forbidden.
90 | %%% 5) The `figure' environment will produce a figure one column wide; if you
91 | %%% want one that is two columns wide, use `figure*'.
92 | %%%
93 | %
94 | %%% Copyright Space:
95 | %%% This style automatically reserves 1" blank space at the bottom of page 1/
96 | %%% column 1. This space can optionally be filled with some text using the
97 | %%% \toappear{...} command. If used, this command must be BEFORE the \maketitle
98 | %%% command. If this command is defined AND [preprint] is on, then the
99 | %%% space is filled with the {...} text (at the bottom); otherwise, it is
100 | %%% blank. If you use \toappearbox{...} instead of \toappear{...} then a
101 | %%% box will be drawn around the text (if [preprint] is on).
102 | %%%
103 | %%% A typical usage looks like this:
104 | %%% \toappear{To appear in the Ninth AES Conference on Medievil Lithuanian
105 | %%% Embalming Technique, June 1991, Alfaretta, Georgia.}
106 | %%% This will be included in the preprint, and left out of the conference
107 | %%% version.
108 | %%%
109 | %%% WARNING:
110 | %%% Some dvi-ps converters heuristically allow chars to drift from their
111 | %%% true positions a few pixels. This may be noticeable with the 9pt sans-serif
112 | %%% bold font used for section headers.
113 | %%% You may turn this hackery off via the -e option:
114 | %%% dvips -e 0 foo.dvi >foo.ps
115 | %%%
116 | \typeout{Document Class 'sig-alternate' <23rd. May '12>. Modified by G.K.M. Tobin/Gerry Murray}
117 | \typeout{Based in part upon document Style `acmconf' <22 May 89>. Hacked 4/91 by}
118 | \typeout{shivers@cs.cmu.edu, 4/93 by theobald@cs.mcgill.ca}
119 | \typeout{Excerpts were taken from (Journal Style) 'esub2acm.cls'.}
120 | \typeout{****** Bugs/comments/suggestions/technicalities to Gerry Murray -- murray@hq.acm.org ******}
121 | \typeout{Questions on the style, SIGS policies, etc. to Adrienne Griscti griscti@acm.org}
122 | \oddsidemargin 4.5pc
123 | \evensidemargin 4.5pc
124 | \advance\oddsidemargin by -1in % Correct for LaTeX gratuitousness
125 | \advance\evensidemargin by -1in % Correct for LaTeX gratuitousness
126 | \marginparwidth 0pt % Margin pars are not allowed.
127 | \marginparsep 11pt % Horizontal space between outer margin and
128 | % marginal note
129 |
130 | % Top of page:
131 | \topmargin 4.5pc % Nominal distance from top of page to top of
132 | % box containing running head.
133 | \advance\topmargin by -1in % Correct for LaTeX gratuitousness
134 | \headheight 0pt % Height of box containing running head.
135 | \headsep 0pt % Space between running head and text.
136 | % Bottom of page:
137 | \footskip 30pt % Distance from baseline of box containing foot
138 | % to baseline of last line of text.
139 | \@ifundefined{footheight}{\newdimen\footheight}{}% this is for LaTeX2e
140 | \footheight 12pt % Height of box containing running foot.
141 |
142 | %% Must redefine the top margin so there's room for headers and
143 | %% page numbers if you are using the preprint option. Footers
144 | %% are OK as is. Olin.
145 | \advance\topmargin by -37pt % Leave 37pt above text for headers
146 | \headheight 12pt % Height of box containing running head.
147 | \headsep 25pt % Space between running head and text.
148 |
149 | \textheight 666pt % 9 1/4 column height
150 | \textwidth 42pc % Width of text line.
151 | % For two-column mode:
152 | \columnsep 2pc % Space between columns
153 | \columnseprule 0pt % Width of rule between columns.
154 | \hfuzz 1pt % Allow some variation in column width, otherwise it's
155 | % too hard to typeset in narrow columns.
156 |
157 | \footnotesep 5.6pt % Height of strut placed at the beginning of every
158 | % footnote =3D height of normal \footnotesize strut,
159 | % so no extra space between footnotes.
160 |
161 | \skip\footins 8.1pt plus 4pt minus 2pt % Space between last line of text and
162 | % top of first footnote.
163 | \floatsep 11pt plus 2pt minus 2pt % Space between adjacent floats moved
164 | % to top or bottom of text page.
165 | \textfloatsep 18pt plus 2pt minus 4pt % Space between main text and floats
166 | % at top or bottom of page.
167 | \intextsep 11pt plus 2pt minus 2pt % Space between in-text figures and
168 | % text.
169 | \@ifundefined{@maxsep}{\newdimen\@maxsep}{}% this is for LaTeX2e
170 | \@maxsep 18pt % The maximum of \floatsep,
171 | % \textfloatsep and \intextsep (minus
172 | % the stretch and shrink).
173 | \dblfloatsep 11pt plus 2pt minus 2pt % Same as \floatsep for double-column
174 | % figures in two-column mode.
175 | \dbltextfloatsep 18pt plus 2pt minus 4pt% \textfloatsep for double-column
176 | % floats.
177 | \@ifundefined{@dblmaxsep}{\newdimen\@dblmaxsep}{}% this is for LaTeX2e
178 | \@dblmaxsep 18pt % The maximum of \dblfloatsep and
179 | % \dbltexfloatsep.
180 | \@fptop 0pt plus 1fil % Stretch at top of float page/column. (Must be
181 | % 0pt plus ...)
182 | \@fpsep 8pt plus 2fil % Space between floats on float page/column.
183 | \@fpbot 0pt plus 1fil % Stretch at bottom of float page/column. (Must be
184 | % 0pt plus ... )
185 | \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
186 | \@dblfpsep 8pt plus 2fil % Space between floats on float page.
187 | \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be
188 | % 0pt plus ... )
189 | \marginparpush 5pt % Minimum vertical separation between two marginal
190 | % notes.
191 |
192 | \parskip 0pt plus 1pt % Extra vertical space between paragraphs.
193 | \parindent 10pt % GM July 2000 / was 0pt - width of paragraph indentation.
194 | \partopsep 2pt plus 1pt minus 1pt% Extra vertical space, in addition to
195 | % \parskip and \topsep, added when user
196 | % leaves blank line before environment.
197 |
198 | \@lowpenalty 51 % Produced by \nopagebreak[1] or \nolinebreak[1]
199 | \@medpenalty 151 % Produced by \nopagebreak[2] or \nolinebreak[2]
200 | \@highpenalty 301 % Produced by \nopagebreak[3] or \nolinebreak[3]
201 |
202 | \@beginparpenalty -\@lowpenalty % Before a list or paragraph environment.
203 | \@endparpenalty -\@lowpenalty % After a list or paragraph environment.
204 | \@itempenalty -\@lowpenalty % Between list items.
205 |
206 | %\@namedef{ds@10pt}{\@latexerr{The `10pt' option is not allowed in the `acmconf'
207 | %\@namedef{ds@10pt}{\ClassError{The `10pt' option is not allowed in the `acmconf' % January 2008
208 | % document style.}\@eha}
209 | %\@namedef{ds@11pt}{\@latexerr{The `11pt' option is not allowed in the `acmconf'
210 | \@namedef{ds@11pt}{\ClassError{The `11pt' option is not allowed in the `acmconf' % January 2008
211 | document style.}\@eha}
212 | %\@namedef{ds@12pt}{\@latexerr{The `12pt' option is not allowed in the `acmconf'
213 | \@namedef{ds@12pt}{\ClassError{The `12pt' option is not allowed in the `acmconf' % January 2008
214 | document style.}\@eha}
215 |
216 | \@options
217 |
218 | \lineskip 2pt % \lineskip is 1pt for all font sizes.
219 | \normallineskip 2pt
220 | \def\baselinestretch{1}
221 |
222 | \abovedisplayskip 10pt plus2pt minus4.5pt%
223 | \belowdisplayskip \abovedisplayskip
224 | \abovedisplayshortskip \z@ plus3pt%
225 | \belowdisplayshortskip 5.4pt plus3pt minus3pt%
226 | \let\@listi\@listI % Setting of \@listi added 9 Jun 87
227 |
228 | \def\small{\@setsize\small{9pt}\viiipt\@viiipt
229 | \abovedisplayskip 7.6pt plus 3pt minus 4pt%
230 | \belowdisplayskip \abovedisplayskip
231 | \abovedisplayshortskip \z@ plus2pt%
232 | \belowdisplayshortskip 3.6pt plus2pt minus 2pt
233 | \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
234 | \topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
235 | \itemsep \parsep}}
236 |
237 | \def\refsmall{\@setsize\small{8pt}\viiipt\@viiipt
238 | \abovedisplayskip 7.6pt plus 3pt minus 4pt%
239 | \belowdisplayskip \abovedisplayskip
240 | \abovedisplayshortskip \z@ plus2pt%
241 | \belowdisplayshortskip 3.6pt plus2pt minus 2pt
242 | \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
243 | \topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
244 | \itemsep \parsep}}
245 |
246 | \def\footnotesize{\@setsize\footnotesize{9pt}\ixpt\@ixpt
247 | \abovedisplayskip 6.4pt plus 2pt minus 4pt%
248 | \belowdisplayskip \abovedisplayskip
249 | \abovedisplayshortskip \z@ plus 1pt%
250 | \belowdisplayshortskip 2.7pt plus 1pt minus 2pt
251 | \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
252 | \topsep 3pt plus 1pt minus 1pt\parsep 2pt plus 1pt minus 1pt
253 | \itemsep \parsep}}
254 |
255 | \newcount\aucount
256 | \newcount\originalaucount
257 | \newdimen\auwidth
258 | \auwidth=\textwidth
259 | \newdimen\auskip
260 | \newcount\auskipcount
261 | \newdimen\auskip
262 | \global\auskip=1pc
263 | \newdimen\allauboxes
264 | \allauboxes=\auwidth
265 | \newtoks\addauthors
266 | \newcount\addauflag
267 | \global\addauflag=0 %Haven't shown additional authors yet
268 |
269 | \newtoks\subtitletext
270 | \gdef\subtitle#1{\subtitletext={#1}}
271 |
272 | \gdef\additionalauthors#1{\addauthors={#1}}
273 |
274 | \gdef\numberofauthors#1{\global\aucount=#1
275 | \ifnum\aucount>3\global\originalaucount=\aucount \global\aucount=3\fi %g} % 3 OK - Gerry March 2007
276 | \global\auskipcount=\aucount\global\advance\auskipcount by 1
277 | \global\multiply\auskipcount by 2
278 | \global\multiply\auskip by \auskipcount
279 | \global\advance\auwidth by -\auskip
280 | \global\divide\auwidth by \aucount}
281 |
282 | % \and was modified to count the number of authors. GKMT 12 Aug 1999
283 | \def\alignauthor{% % \begin{tabular}
284 | \end{tabular}%
285 | \begin{tabular}[t]{p{\auwidth}}\centering}%
286 |
287 | % *** NOTE *** NOTE *** NOTE *** NOTE ***
288 | % If you have 'font problems' then you may need
289 | % to change these, e.g. 'arialb' instead of "arialbd".
290 | % Gerry Murray 11/11/1999
291 | % *** OR ** comment out block A and activate block B or vice versa.
292 | % **********************************************
293 | %
294 | % -- Start of block A -- (Type 1 or Truetype fonts)
295 | %\newfont{\secfnt}{timesbd at 12pt} % was timenrb originally - now is timesbd
296 | %\newfont{\secit}{timesbi at 12pt} %13 Jan 00 gkmt
297 | %\newfont{\subsecfnt}{timesi at 11pt} % was timenrri originally - now is timesi
298 | %\newfont{\subsecit}{timesbi at 11pt} % 13 Jan 00 gkmt -- was times changed to timesbi gm 2/4/2000
299 | % % because "normal" is italic, "italic" is Roman
300 | %\newfont{\ttlfnt}{arialbd at 18pt} % was arialb originally - now is arialbd
301 | %\newfont{\ttlit}{arialbi at 18pt} % 13 Jan 00 gkmt
302 | %\newfont{\subttlfnt}{arial at 14pt} % was arialr originally - now is arial
303 | %\newfont{\subttlit}{ariali at 14pt} % 13 Jan 00 gkmt
304 | %\newfont{\subttlbf}{arialbd at 14pt} % 13 Jan 00 gkmt
305 | %\newfont{\aufnt}{arial at 12pt} % was arialr originally - now is arial
306 | %\newfont{\auit}{ariali at 12pt} % 13 Jan 00 gkmt
307 | %\newfont{\affaddr}{arial at 10pt} % was arialr originally - now is arial
308 | %\newfont{\affaddrit}{ariali at 10pt} %13 Jan 00 gkmt
309 | %\newfont{\eaddfnt}{arial at 12pt} % was arialr originally - now is arial
310 | %\newfont{\ixpt}{times at 9pt} % was timenrr originally - now is times
311 | %\newfont{\confname}{timesi at 8pt} % was timenrri - now is timesi
312 | %\newfont{\crnotice}{times at 8pt} % was timenrr originally - now is times
313 | %\newfont{\ninept}{times at 9pt} % was timenrr originally - now is times
314 |
315 | % *********************************************
316 | % -- End of block A --
317 | %
318 | %
319 | % -- Start of block B -- UPDATED FONT NAMES
320 | % *********************************************
321 | % Gerry Murray 11/30/2006
322 | % *********************************************
323 | \newfont{\secfnt}{ptmb8t at 12pt}
324 | \newfont{\secit}{ptmbi8t at 12pt} %13 Jan 00 gkmt
325 | \newfont{\subsecfnt}{ptmri8t at 11pt}
326 | \newfont{\subsecit}{ptmbi8t at 11pt} %
327 | \newfont{\ttlfnt}{phvb8t at 18pt}
328 | \newfont{\ttlit}{phvbo8t at 18pt} % GM 2/4/2000
329 | \newfont{\subttlfnt}{phvr8t at 14pt}
330 | \newfont{\subttlit}{phvro8t at 14pt} % GM 2/4/2000
331 | \newfont{\subttlbf}{phvb8t at 14pt} % 13 Jan 00 gkmt
332 | \newfont{\aufnt}{phvr8t at 12pt}
333 | \newfont{\auit}{phvro8t at 12pt} % GM 2/4/2000
334 | \newfont{\affaddr}{phvr8t at 10pt}
335 | \newfont{\affaddrit}{phvro8t at 10pt} % GM 2/4/2000
336 | \newfont{\eaddfnt}{phvr8t at 12pt}
337 | \newfont{\ixpt}{ptmr8t at 9pt}
338 | \newfont{\confname}{ptmri8t at 8pt}
339 | \newfont{\crnotice}{ptmr8t at 8pt}
340 | \newfont{\ninept}{ptmr8t at 9pt}
341 | % +++++++++++++++++++++++++++++++++++++++++++++
342 | % -- End of block B --
343 |
344 | %\def\email#1{{{\eaddfnt{\vskip 4pt#1}}}}
345 | % If we have an email, inside a "shared affiliation" then we need the following instead
346 | \def\email#1{{{\eaddfnt{\par #1}}}} % revised - GM - 11/30/2006
347 |
348 | \def\addauthorsection{\ifnum\originalaucount>6 % was 3 - Gerry March 2007
349 | \section{Additional Authors}\the\addauthors
350 | \fi}
351 |
352 | \newcount\savesection
353 | \newcount\sectioncntr
354 | \global\sectioncntr=1
355 |
356 | \setcounter{secnumdepth}{3}
357 |
358 | \def\appendix{\par
359 | \section*{APPENDIX}
360 | \setcounter{section}{0}
361 | \setcounter{subsection}{0}
362 | \def\thesection{\Alph{section}} }
363 |
364 | \leftmargini 22.5pt
365 | \leftmarginii 19.8pt % > \labelsep + width of '(m)'
366 | \leftmarginiii 16.8pt % > \labelsep + width of 'vii.'
367 | \leftmarginiv 15.3pt % > \labelsep + width of 'M.'
368 | \leftmarginv 9pt
369 | \leftmarginvi 9pt
370 |
371 | \leftmargin\leftmargini
372 | \labelsep 4.5pt
373 | \labelwidth\leftmargini\advance\labelwidth-\labelsep
374 |
375 | \def\@listI{\leftmargin\leftmargini \parsep 3.6pt plus 2pt minus 1pt%
376 | \topsep 7.2pt plus 2pt minus 4pt%
377 | \itemsep 3.6pt plus 2pt minus 1pt}
378 |
379 | \let\@listi\@listI
380 | \@listi
381 |
382 | \def\@listii{\leftmargin\leftmarginii
383 | \labelwidth\leftmarginii\advance\labelwidth-\labelsep
384 | \topsep 3.6pt plus 2pt minus 1pt
385 | \parsep 1.8pt plus 0.9pt minus 0.9pt
386 | \itemsep \parsep}
387 |
388 | \def\@listiii{\leftmargin\leftmarginiii
389 | \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
390 | \topsep 1.8pt plus 0.9pt minus 0.9pt
391 | \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
392 | \itemsep \topsep}
393 |
394 | \def\@listiv{\leftmargin\leftmarginiv
395 | \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
396 |
397 | \def\@listv{\leftmargin\leftmarginv
398 | \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
399 |
400 | \def\@listvi{\leftmargin\leftmarginvi
401 | \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
402 |
403 | \def\labelenumi{\theenumi.}
404 | \def\theenumi{\arabic{enumi}}
405 |
406 | \def\labelenumii{(\theenumii)}
407 | \def\theenumii{\alph{enumii}}
408 | \def\p@enumii{\theenumi}
409 |
410 | \def\labelenumiii{\theenumiii.}
411 | \def\theenumiii{\roman{enumiii}}
412 | \def\p@enumiii{\theenumi(\theenumii)}
413 |
414 | \def\labelenumiv{\theenumiv.}
415 | \def\theenumiv{\Alph{enumiv}}
416 | \def\p@enumiv{\p@enumiii\theenumiii}
417 |
418 | \def\labelitemi{$\bullet$}
419 | \def\labelitemii{\bf --}
420 | \def\labelitemiii{$\ast$}
421 | \def\labelitemiv{$\cdot$}
422 |
423 | \def\verse{\let\\=\@centercr
424 | \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent
425 | \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}
426 | \let\endverse\endlist
427 |
428 | \def\quotation{\list{}{\listparindent 1.5em
429 | \itemindent\listparindent
430 | \rightmargin\leftmargin \parsep 0pt plus 1pt}\item[]}
431 | \let\endquotation=\endlist
432 |
433 | \def\quote{\list{}{\rightmargin\leftmargin}\item[]}
434 | \let\endquote=\endlist
435 |
436 | \def\descriptionlabel#1{\hspace\labelsep \bf #1}
437 | \def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
438 | \let\makelabel\descriptionlabel}}
439 |
440 | \let\enddescription\endlist
441 |
442 | \def\theequation{\arabic{equation}}
443 |
444 | \arraycolsep 4.5pt % Half the space between columns in an array environment.
445 | \tabcolsep 5.4pt % Half the space between columns in a tabular environment.
446 | \arrayrulewidth .5pt % Width of rules in array and tabular environment. % (was .4) updated Gerry March 20 2007
447 | \doublerulesep 1.8pt % Space between adjacent rules in array or tabular env.
448 |
449 | \tabbingsep \labelsep % Space used by the \' command. (See LaTeX manual.)
450 |
451 | \skip\@mpfootins =\skip\footins
452 |
453 | \fboxsep =2.7pt % Space left between box and text by \fbox and \framebox.
454 | \fboxrule =.5pt % Width of rules in box made by \fbox and \framebox. % (was .4) updated Gerry March 20 2007
455 |
456 | \def\thepart{\Roman{part}} % Roman numeral part numbers.
457 | \def\thesection {\arabic{section}}
458 | \def\thesubsection {\thesection.\arabic{subsection}}
459 | %\def\thesubsubsection {\thesubsection.\arabic{subsubsection}} % GM 7/30/2002
460 | %\def\theparagraph {\thesubsubsection.\arabic{paragraph}} % GM 7/30/2002
461 | \def\thesubparagraph {\theparagraph.\arabic{subparagraph}}
462 |
463 | \def\@pnumwidth{1.55em}
464 | \def\@tocrmarg {2.55em}
465 | \def\@dotsep{4.5}
466 | \setcounter{tocdepth}{3}
467 |
468 | %\def\tableofcontents{\@latexerr{\tableofcontents: Tables of contents are not
469 | % allowed in the `acmconf' document style.}\@eha}
470 |
471 | \def\tableofcontents{\ClassError{%
472 | \string\tableofcontents\space is not allowed in the `acmconf' document % January 2008
473 | style}\@eha}
474 |
475 | \def\l@part#1#2{\addpenalty{\@secpenalty}
476 | \addvspace{2.25em plus 1pt} % space above part line
477 | \begingroup
478 | \@tempdima 3em % width of box holding part number, used by
479 | \parindent \z@ \rightskip \@pnumwidth %% \numberline
480 | \parfillskip -\@pnumwidth
481 | {\large \bf % set line in \large boldface
482 | \leavevmode % TeX command to enter horizontal mode.
483 | #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
484 | \nobreak % Never break after part entry
485 | \endgroup}
486 |
487 | \def\l@section#1#2{\addpenalty{\@secpenalty} % good place for page break
488 | \addvspace{1.0em plus 1pt} % space above toc entry
489 | \@tempdima 1.5em % width of box holding section number
490 | \begingroup
491 | \parindent \z@ \rightskip \@pnumwidth
492 | \parfillskip -\@pnumwidth
493 | \bf % Boldface.
494 | \leavevmode % TeX command to enter horizontal mode.
495 | \advance\leftskip\@tempdima %% added 5 Feb 88 to conform to
496 | \hskip -\leftskip %% 25 Jan 88 change to \numberline
497 | #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
498 | \endgroup}
499 |
500 |
501 | \def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
502 | \def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
503 | \def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
504 | \def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
505 |
506 | %\def\listoffigures{\@latexerr{\listoffigures: Lists of figures are not
507 | % allowed in the `acmconf' document style.}\@eha}
508 |
509 | \def\listoffigures{\ClassError{%
510 | \string\listoffigures\space is not allowed in the `acmconf' document % January 2008
511 | style}\@eha}
512 |
513 | \def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
514 |
515 | %\def\listoftables{\@latexerr{\listoftables: Lists of tables are not
516 | % allowed in the `acmconf' document style.}\@eha}
517 | %\let\l@table\l@figure
518 |
519 | \def\listoftables{\ClassError{%
520 | \string\listoftables\space is not allowed in the `acmconf' document % January 2008
521 | style}\@eha}
522 | \let\l@table\l@figure
523 |
524 | \def\footnoterule{\kern-3\p@
525 | \hrule width .5\columnwidth % (was .4) updated Gerry March 20 2007
526 | \kern 2.6\p@} % The \hrule has default height of .4pt % (was .4) updated Gerry March 20 2007
527 | % ------
528 | \long\def\@makefntext#1{\noindent
529 | %\hbox to .5em{\hss$^{\@thefnmark}$}#1} % original
530 | \hbox to .5em{\hss\textsuperscript{\@thefnmark}}#1} % C. Clifton / GM Oct. 2nd. 2002
531 | % -------
532 |
533 | \long\def\@maketntext#1{\noindent
534 | #1}
535 |
536 | \long\def\@maketitlenotetext#1#2{\noindent
537 | \hbox to 1.8em{\hss$^{#1}$}#2}
538 |
539 | \setcounter{topnumber}{2}
540 | \def\topfraction{.7}
541 | \setcounter{bottomnumber}{1}
542 | \def\bottomfraction{.3}
543 | \setcounter{totalnumber}{3}
544 | \def\textfraction{.2}
545 | \def\floatpagefraction{.5}
546 | \setcounter{dbltopnumber}{2}
547 | \def\dbltopfraction{.7}
548 | \def\dblfloatpagefraction{.5}
549 |
550 | %
551 | \long\def\@makecaption#1#2{
552 | \vskip \baselineskip
553 | \setbox\@tempboxa\hbox{\textbf{#1: #2}}
554 | \ifdim \wd\@tempboxa >\hsize % IF longer than one line:
555 | \textbf{#1: #2}\par % THEN set as ordinary paragraph.
556 | \else % ELSE center.
557 | \hbox to\hsize{\hfil\box\@tempboxa\hfil}\par
558 | \fi}
559 |
560 | %
561 |
562 | \long\def\@makecaption#1#2{
563 | \vskip 10pt
564 | \setbox\@tempboxa\hbox{\textbf{#1: #2}}
565 | \ifdim \wd\@tempboxa >\hsize % IF longer than one line:
566 | \textbf{#1: #2}\par % THEN set as ordinary paragraph.
567 | \else % ELSE center.
568 | \hbox to\hsize{\hfil\box\@tempboxa\hfil}
569 | \fi}
570 |
571 | \@ifundefined{figure}{\newcounter {figure}} % this is for LaTeX2e
572 |
573 | \def\fps@figure{tbp}
574 | \def\ftype@figure{1}
575 | \def\ext@figure{lof}
576 | \def\fnum@figure{Figure \thefigure}
577 | \def\figure{\@float{figure}}
578 | %\let\endfigure\end@float
579 | \def\endfigure{\end@float} % Gerry January 2008
580 | \@namedef{figure*}{\@dblfloat{figure}}
581 | \@namedef{endfigure*}{\end@dblfloat}
582 |
583 | \@ifundefined{table}{\newcounter {table}} % this is for LaTeX2e
584 |
585 | \def\fps@table{tbp}
586 | \def\ftype@table{2}
587 | \def\ext@table{lot}
588 | \def\fnum@table{Table \thetable}
589 | \def\table{\@float{table}}
590 | %\let\endtable\end@float
591 | \def\endtable{\end@float} % Gerry January 2008
592 | \@namedef{table*}{\@dblfloat{table}}
593 | \@namedef{endtable*}{\end@dblfloat}
594 |
595 | \newtoks\titleboxnotes
596 | \newcount\titleboxnoteflag
597 |
598 | \def\maketitle{\par
599 | \begingroup
600 | \def\thefootnote{\fnsymbol{footnote}}
601 | \def\@makefnmark{\hbox
602 | to 0pt{$^{\@thefnmark}$\hss}}
603 | \twocolumn[\@maketitle]
604 | \@thanks
605 | \endgroup
606 | \setcounter{footnote}{0}
607 | \let\maketitle\relax
608 | \let\@maketitle\relax
609 | \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\gdef\@subtitle{}\let\thanks\relax
610 | \@copyrightspace}
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} [2012/05/23 - V2.5 - based on acmproc.cls V1.3 ]
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{11\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
686 | \@setsize\normalsize{10\p@}\ixpt\@ixpt
687 | \abovedisplayskip 6\p@ \@plus2\p@ \@minus\p@
688 | \belowdisplayskip \abovedisplayskip
689 | \abovedisplayshortskip 6\p@ \@minus 3\p@
690 | \belowdisplayshortskip 6\p@ \@minus 3\p@
691 | \let\@listi\@listI
692 | }%
693 | \fi
694 | \if@ll
695 | \newcommand\scriptsize{\@setfontsize\scriptsize\@viipt{8\p@}}
696 | \newcommand\tiny{\@setfontsize\tiny\@vpt{6\p@}}
697 | \newcommand\large{\@setfontsize\large\@xiipt{14\p@}}
698 | \newcommand\Large{\@setfontsize\Large\@xivpt{18\p@}}
699 | \newcommand\LARGE{\@setfontsize\LARGE\@xviipt{20\p@}}
700 | \newcommand\huge{\@setfontsize\huge\@xxpt{25\p@}}
701 | \newcommand\Huge{\@setfontsize\Huge\@xxvpt{30\p@}}
702 | \else
703 | \def\scriptsize{\@setsize\scriptsize{8\p@}\viipt\@viipt}
704 | \def\tiny{\@setsize\tiny{6\p@}\vpt\@vpt}
705 | \def\large{\@setsize\large{14\p@}\xiipt\@xiipt}
706 | \def\Large{\@setsize\Large{18\p@}\xivpt\@xivpt}
707 | \def\LARGE{\@setsize\LARGE{20\p@}\xviipt\@xviipt}
708 | \def\huge{\@setsize\huge{25\p@}\xxpt\@xxpt}
709 | \def\Huge{\@setsize\Huge{30\p@}\xxvpt\@xxvpt}
710 | \fi
711 | \normalsize
712 |
713 | % make aubox hsize/number of authors up to 3, less gutter
714 | % then showbox gutter showbox gutter showbox -- GKMT Aug 99
715 | \newbox\@acmtitlebox
716 | \def\@maketitle{\newpage
717 | \null
718 | \setbox\@acmtitlebox\vbox{%
719 | \baselineskip 10pt
720 | \vskip 1em % Vertical space above title.
721 | \begin{center}
722 | {\ttlfnt \@title\par} % Title set in 18pt Helvetica (Arial) bold size.
723 | \vskip 1em % Vertical space after title.
724 | %This should be the subtitle.
725 | {\subttlfnt \the\subtitletext\par}\vskip 1.25em%\fi
726 | {\baselineskip 16pt\aufnt % each author set in \12 pt Arial, in a
727 | \lineskip .5em % tabular environment
728 | \begin{tabular}[t]{c}\@author
729 | \end{tabular}\par}
730 | \vskip 2em % Vertical space after author.
731 | \end{center}}
732 | \dimen0=\ht\@acmtitlebox
733 | \advance\dimen0 by -12.75pc\relax % Increased space for title box -- KBT
734 | \unvbox\@acmtitlebox
735 | \ifdim\dimen0<0.0pt\relax\vskip-\dimen0\fi}
736 |
737 |
738 | \newcount\titlenotecount
739 | \global\titlenotecount=0
740 | \newtoks\tntoks
741 | \newtoks\tntokstwo
742 | \newtoks\tntoksthree
743 | \newtoks\tntoksfour
744 | \newtoks\tntoksfive
745 |
746 | \def\abstract{
747 | \ifnum\titlenotecount>0 % was =1
748 | \insert\footins{%
749 | \reset@font\footnotesize
750 | \interlinepenalty\interfootnotelinepenalty
751 | \splittopskip\footnotesep
752 | \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
753 | \hsize\columnwidth \@parboxrestore
754 | \protected@edef\@currentlabel{%
755 | }%
756 | \color@begingroup
757 | \ifnum\titlenotecount=1
758 | \@maketntext{%
759 | \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\@finalstrut\strutbox}%
760 | \fi
761 | \ifnum\titlenotecount=2
762 | \@maketntext{%
763 | \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
764 | \@maketntext{%
765 | \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\@finalstrut\strutbox}%
766 | \fi
767 | \ifnum\titlenotecount=3
768 | \@maketntext{%
769 | \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
770 | \@maketntext{%
771 | \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\par\@finalstrut\strutbox}%
772 | \@maketntext{%
773 | \raisebox{4pt}{$\ddagger$}\rule\z@\footnotesep\ignorespaces\the\tntoksthree\@finalstrut\strutbox}%
774 | \fi
775 | \ifnum\titlenotecount=4
776 | \@maketntext{%
777 | \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
778 | \@maketntext{%
779 | \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\par\@finalstrut\strutbox}%
780 | \@maketntext{%
781 | \raisebox{4pt}{$\ddagger$}\rule\z@\footnotesep\ignorespaces\the\tntoksthree\par\@finalstrut\strutbox}%
782 | \@maketntext{%
783 | \raisebox{4pt}{$\S$}\rule\z@\footnotesep\ignorespaces\the\tntoksfour\@finalstrut\strutbox}%
784 | \fi
785 | \ifnum\titlenotecount=5
786 | \@maketntext{%
787 | \raisebox{4pt}{$\ast$}\rule\z@\footnotesep\ignorespaces\the\tntoks\par\@finalstrut\strutbox}%
788 | \@maketntext{%
789 | \raisebox{4pt}{$\dagger$}\rule\z@\footnotesep\ignorespaces\the\tntokstwo\par\@finalstrut\strutbox}%
790 | \@maketntext{%
791 | \raisebox{4pt}{$\ddagger$}\rule\z@\footnotesep\ignorespaces\the\tntoksthree\par\@finalstrut\strutbox}%
792 | \@maketntext{%
793 | \raisebox{4pt}{$\S$}\rule\z@\footnotesep\ignorespaces\the\tntoksfour\par\@finalstrut\strutbox}%
794 | \@maketntext{%
795 | \raisebox{4pt}{$\P$}\rule\z@\footnotesep\ignorespaces\the\tntoksfive\@finalstrut\strutbox}%
796 | \fi
797 | \color@endgroup} %g}
798 | \fi
799 | \setcounter{footnote}{0}
800 | \section*{ABSTRACT}\normalsize%\ninept
801 | }
802 |
803 | \def\endabstract{\if@twocolumn\else\endquotation\fi}
804 |
805 |
806 | % \def\keywords{\if@twocolumn
807 | % \section*{Keywords}
808 | % \else \small
809 | % \quotation
810 | % \fi}
811 |
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
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 |
864 | %\def\@toappear{} % Default setting blank - commands below change this.
865 | %\long\def\toappear#1{\def\@toappear{\parbox[b]{20pc}{\baselineskip 9pt%#1}}}
866 | %\def\toappearbox#1{\def\@toappear{\raisebox{5pt}{\framebox[20pc]{\parb%ox[b]{19pc}{#1}}}}}
867 |
868 | %\newtoks\conf
869 | %\newtoks\confinfo
870 | %\def\conferenceinfo#1#2{\global\conf={#1}\global\confinfo{#2}}
871 |
872 |
873 | %\def\marginpar{\@latexerr{The \marginpar command is not allowed in the
874 | % `acmconf' document style.}\@eha}
875 |
876 | \def\marginpar{\ClassError{%
877 | \string\marginpar\space is not allowed in the `acmconf' document % January 2008
878 | style}\@eha}
879 |
880 | \mark{{}{}} % Initializes TeX's marks
881 |
882 | \def\today{\ifcase\month\or
883 | January\or February\or March\or April\or May\or June\or
884 | July\or August\or September\or October\or November\or December\fi
885 | \space\number\day, \number\year}
886 |
887 | \def\@begintheorem#1#2{%
888 | \parskip 0pt % GM July 2000 (for tighter spacing)
889 | \trivlist
890 | \item[%
891 | \hskip 10\p@
892 | \hskip \labelsep
893 | {{\sc #1}\hskip 5\p@\relax#2.}%
894 | ]
895 | \it
896 | }
897 | \def\@opargbegintheorem#1#2#3{%
898 | \parskip 0pt % GM July 2000 (for tighter spacing)
899 | \trivlist
900 | \item[%
901 | \hskip 10\p@
902 | \hskip \labelsep
903 | {\sc #1\ #2\ % This mod by Gerry to enumerate corollaries
904 | \setbox\@tempboxa\hbox{(#3)} % and bracket the 'corollary title'
905 | \ifdim \wd\@tempboxa>\z@ % and retain the correct numbering of e.g. theorems
906 | \hskip 5\p@\relax % if they occur 'around' said corollaries.
907 | \box\@tempboxa % Gerry - Nov. 1999.
908 | \fi.}%
909 | ]
910 | \it
911 | }
912 | \newif\if@qeded
913 | \global\@qededfalse
914 |
915 | % -- original
916 | %\def\proof{%
917 | % \vspace{-\parskip} % GM July 2000 (for tighter spacing)
918 | % \global\@qededfalse
919 | % \@ifnextchar[{\@xproof}{\@proof}%
920 | %}
921 | % -- end of original
922 |
923 | % (JSS) Fix for vertical spacing bug - Gerry Murray July 30th. 2002
924 | \def\proof{%
925 | \vspace{-\lastskip}\vspace{-\parsep}\penalty-51%
926 | \global\@qededfalse
927 | \@ifnextchar[{\@xproof}{\@proof}%
928 | }
929 |
930 | \def\endproof{%
931 | \if@qeded\else\qed\fi
932 | \endtrivlist
933 | }
934 | \def\@proof{%
935 | \trivlist
936 | \item[%
937 | \hskip 10\p@
938 | \hskip \labelsep
939 | {\sc Proof.}%
940 | ]
941 | \ignorespaces
942 | }
943 | \def\@xproof[#1]{%
944 | \trivlist
945 | \item[\hskip 10\p@\hskip \labelsep{\sc Proof #1.}]%
946 | \ignorespaces
947 | }
948 | \def\qed{%
949 | \unskip
950 | \kern 10\p@
951 | \begingroup
952 | \unitlength\p@
953 | \linethickness{.4\p@}%
954 | \framebox(6,6){}%
955 | \endgroup
956 | \global\@qededtrue
957 | }
958 |
959 | \def\newdef#1#2{%
960 | \expandafter\@ifdefinable\csname #1\endcsname
961 | {\@definecounter{#1}%
962 | \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%
963 | \global\@namedef{#1}{\@defthm{#1}{#2}}%
964 | \global\@namedef{end#1}{\@endtheorem}%
965 | }%
966 | }
967 | \def\@defthm#1#2{%
968 | \refstepcounter{#1}%
969 | \@ifnextchar[{\@ydefthm{#1}{#2}}{\@xdefthm{#1}{#2}}%
970 | }
971 | \def\@xdefthm#1#2{%
972 | \@begindef{#2}{\csname the#1\endcsname}%
973 | \ignorespaces
974 | }
975 | \def\@ydefthm#1#2[#3]{%
976 | \trivlist
977 | \item[%
978 | \hskip 10\p@
979 | \hskip \labelsep
980 | {\it #2%
981 | % \savebox\@tempboxa{#3}%
982 | \saveb@x\@tempboxa{#3}% % January 2008
983 | \ifdim \wd\@tempboxa>\z@
984 | \ \box\@tempboxa
985 | \fi.%
986 | }]%
987 | \ignorespaces
988 | }
989 | \def\@begindef#1#2{%
990 | \trivlist
991 | \item[%
992 | \hskip 10\p@
993 | \hskip \labelsep
994 | {\it #1\ \rm #2.}%
995 | ]%
996 | }
997 | \def\theequation{\arabic{equation}}
998 |
999 | \newcounter{part}
1000 | \newcounter{section}
1001 | \newcounter{subsection}[section]
1002 | \newcounter{subsubsection}[subsection]
1003 | \newcounter{paragraph}[subsubsection]
1004 | \def\thepart{\Roman{part}}
1005 | \def\thesection{\arabic{section}}
1006 | \def\thesubsection{\thesection.\arabic{subsection}}
1007 | \def\thesubsubsection{\thesubsection.\arabic{subsubsection}} %removed \subsecfnt 29 July 2002 gkmt
1008 | \def\theparagraph{\thesubsubsection.\arabic{paragraph}} %removed \subsecfnt 29 July 2002 gkmt
1009 | \newif\if@uchead
1010 | \@ucheadfalse
1011 |
1012 | %% CHANGES: NEW NOTE
1013 | %% NOTE: OK to use old-style font commands below, since they were
1014 | %% suitably redefined for LaTeX2e
1015 | %% END CHANGES
1016 | \setcounter{secnumdepth}{3}
1017 | \def\part{%
1018 | \@startsection{part}{9}{\z@}{-10\p@ \@plus -4\p@ \@minus -2\p@}
1019 | {4\p@}{\normalsize\@ucheadtrue}%
1020 | }
1021 | \def\section{%
1022 | \@startsection{section}{1}{\z@}{-10\p@ \@plus -4\p@ \@minus -2\p@}% GM
1023 | {4\p@}{\baselineskip 14pt\secfnt\@ucheadtrue}%
1024 | }
1025 |
1026 | \def\subsection{%
1027 | \@startsection{subsection}{2}{\z@}{-8\p@ \@plus -2\p@ \@minus -\p@}
1028 | {4\p@}{\secfnt}%
1029 | }
1030 | \def\subsubsection{%
1031 | \@startsection{subsubsection}{3}{\z@}{-8\p@ \@plus -2\p@ \@minus -\p@}%
1032 | {4\p@}{\subsecfnt}%
1033 | }
1034 | %\def\paragraph{%
1035 | % \vskip 12pt\@startsection{paragraph}{3}{\z@}{6\p@ \@plus \p@}% original
1036 | % {-5\p@}{\subsecfnt}%
1037 | %}
1038 | % If one wants sections, subsections and subsubsections numbered,
1039 | % but not paragraphs, one usually sets secnumepth to 3.
1040 | % For that, the "depth" of paragraphs must be given correctly
1041 | % in the definition (``4'' instead of ``3'' as second argument
1042 | % of @startsection):
1043 | \def\paragraph{%
1044 | \vskip 12pt\@startsection{paragraph}{4}{\z@}{6\p@ \@plus \p@}% % GM and Wolfgang May - 11/30/06
1045 | {-5\p@}{\subsecfnt}%
1046 | }
1047 | \let\@period=.
1048 | \def\@startsection#1#2#3#4#5#6{%
1049 | \if@noskipsec %gkmt, 11 aug 99
1050 | \global\let\@period\@empty
1051 | \leavevmode
1052 | \global\let\@period.%
1053 | \fi
1054 | \par %
1055 | \@tempskipa #4\relax
1056 | \@afterindenttrue
1057 | \ifdim \@tempskipa <\z@
1058 | \@tempskipa -\@tempskipa
1059 | \@afterindentfalse
1060 | \fi
1061 | \if@nobreak
1062 | \everypar{}%
1063 | \else
1064 | \addpenalty\@secpenalty
1065 | \addvspace\@tempskipa
1066 | \fi
1067 | \parskip=0pt % GM July 2000 (non numbered) section heads
1068 | \@ifstar
1069 | {\@ssect{#3}{#4}{#5}{#6}}
1070 | {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}%
1071 | }
1072 | \def\@sect#1#2#3#4#5#6[#7]#8{%
1073 | \ifnum #2>\c@secnumdepth
1074 | \let\@svsec\@empty
1075 | \else
1076 | \refstepcounter{#1}%
1077 | \edef\@svsec{%
1078 | \begingroup
1079 | %\ifnum#2>2 \noexpand\rm \fi % changed to next 29 July 2002 gkmt
1080 | \ifnum#2>2 \noexpand#6 \fi
1081 | \csname the#1\endcsname
1082 | \endgroup
1083 | \ifnum #2=1\relax .\fi
1084 | \hskip 1em
1085 | }%
1086 | \fi
1087 | \@tempskipa #5\relax
1088 | \ifdim \@tempskipa>\z@
1089 | \begingroup
1090 | #6\relax
1091 | \@hangfrom{\hskip #3\relax\@svsec}%
1092 | \begingroup
1093 | \interlinepenalty \@M
1094 | \if@uchead
1095 | \uppercase{#8}%
1096 | \else
1097 | #8%
1098 | \fi
1099 | \par
1100 | \endgroup
1101 | \endgroup
1102 | \csname #1mark\endcsname{#7}%
1103 | \vskip -12pt %gkmt, 11 aug 99 and GM July 2000 (was -14) - numbered section head spacing
1104 | \addcontentsline{toc}{#1}{%
1105 | \ifnum #2>\c@secnumdepth \else
1106 | \protect\numberline{\csname the#1\endcsname}%
1107 | \fi
1108 | #7%
1109 | }%
1110 | \else
1111 | \def\@svsechd{%
1112 | #6%
1113 | \hskip #3\relax
1114 | \@svsec
1115 | \if@uchead
1116 | \uppercase{#8}%
1117 | \else
1118 | #8%
1119 | \fi
1120 | \csname #1mark\endcsname{#7}%
1121 | \addcontentsline{toc}{#1}{%
1122 | \ifnum #2>\c@secnumdepth \else
1123 | \protect\numberline{\csname the#1\endcsname}%
1124 | \fi
1125 | #7%
1126 | }%
1127 | }%
1128 | \fi
1129 | \@xsect{#5}\hskip 1pt
1130 | \par
1131 | }
1132 | \def\@xsect#1{%
1133 | \@tempskipa #1\relax
1134 | \ifdim \@tempskipa>\z@
1135 | \par
1136 | \nobreak
1137 | \vskip \@tempskipa
1138 | \@afterheading
1139 | \else
1140 | \global\@nobreakfalse
1141 | \global\@noskipsectrue
1142 | \everypar{%
1143 | \if@noskipsec
1144 | \global\@noskipsecfalse
1145 | \clubpenalty\@M
1146 | \hskip -\parindent
1147 | \begingroup
1148 | \@svsechd
1149 | \@period
1150 | \endgroup
1151 | \unskip
1152 | \@tempskipa #1\relax
1153 | \hskip -\@tempskipa
1154 | \else
1155 | \clubpenalty \@clubpenalty
1156 | \everypar{}%
1157 | \fi
1158 | }%
1159 | \fi
1160 | \ignorespaces
1161 | }
1162 | \def\@trivlist{%
1163 | \@topsepadd\topsep
1164 | \if@noskipsec
1165 | \global\let\@period\@empty
1166 | \leavevmode
1167 | \global\let\@period.%
1168 | \fi
1169 | \ifvmode
1170 | \advance\@topsepadd\partopsep
1171 | \else
1172 | \unskip
1173 | \par
1174 | \fi
1175 | \if@inlabel
1176 | \@noparitemtrue
1177 | \@noparlisttrue
1178 | \else
1179 | \@noparlistfalse
1180 | \@topsep\@topsepadd
1181 | \fi
1182 | \advance\@topsep \parskip
1183 | \leftskip\z@skip
1184 | \rightskip\@rightskip
1185 | \parfillskip\@flushglue
1186 | \@setpar{\if@newlist\else{\@@par}\fi}
1187 | \global\@newlisttrue
1188 | \@outerparskip\parskip
1189 | }
1190 |
1191 | %%% Actually, 'abbrev' works just fine as the default
1192 | %%% Bibliography style.
1193 |
1194 | \typeout{Using 'Abbrev' bibliography style}
1195 | \newcommand\bibyear[2]{%
1196 | \unskip\quad\ignorespaces#1\unskip
1197 | \if#2..\quad \else \quad#2 \fi
1198 | }
1199 | \newcommand{\bibemph}[1]{{\em#1}}
1200 | \newcommand{\bibemphic}[1]{{\em#1\/}}
1201 | \newcommand{\bibsc}[1]{{\sc#1}}
1202 | \def\@normalcite{%
1203 | \def\@cite##1##2{[##1\if@tempswa , ##2\fi]}%
1204 | }
1205 | \def\@citeNB{%
1206 | \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
1207 | }
1208 | \def\@citeRB{%
1209 | \def\@cite##1##2{##1\if@tempswa , ##2\fi]}%
1210 | }
1211 | \def\start@cite#1#2{%
1212 | \edef\citeauthoryear##1##2##3{%
1213 | ###1%
1214 | \ifnum#2=\z@ \else\ ###2\fi
1215 | }%
1216 | \ifnum#1=\thr@@
1217 | \let\@@cite\@citeyear
1218 | \else
1219 | \let\@@cite\@citenormal
1220 | \fi
1221 | \@ifstar{\@citeNB\@@cite}{\@normalcite\@@cite}%
1222 | }
1223 | %\def\cite{\start@cite23}
1224 | \DeclareRobustCommand\cite{\start@cite23} % January 2008
1225 | \def\citeNP{\cite*} % No Parentheses e.g. 5
1226 | %\def\citeA{\start@cite10}
1227 | \DeclareRobustCommand\citeA{\start@cite10} % January 2008
1228 | \def\citeANP{\citeA*}
1229 | %\def\shortcite{\start@cite23}
1230 | \DeclareRobustCommand\shortcite{\start@cite23} % January 2008
1231 | \def\shortciteNP{\shortcite*}
1232 | %\def\shortciteA{\start@cite20}
1233 | \DeclareRobustCommand\shortciteA{\start@cite20} % January 2008
1234 | \def\shortciteANP{\shortciteA*}
1235 | %\def\citeyear{\start@cite30}
1236 | \DeclareRobustCommand\citeyear{\start@cite30} % January 2008
1237 | \def\citeyearNP{\citeyear*}
1238 | %\def\citeN{%
1239 | \DeclareRobustCommand\citeN{% % January 2008
1240 | \@citeRB
1241 | \def\citeauthoryear##1##2##3{##1\ [##3%
1242 | \def\reserved@a{##1}%
1243 | \def\citeauthoryear####1####2####3{%
1244 | \def\reserved@b{####1}%
1245 | \ifx\reserved@a\reserved@b
1246 | ####3%
1247 | \else
1248 | \errmessage{Package acmart Error: author mismatch
1249 | in \string\citeN^^J^^J%
1250 | See the acmart package documentation for explanation}%
1251 | \fi
1252 | }%
1253 | }%
1254 | \@ifstar\@citeyear\@citeyear
1255 | }
1256 | %\def\shortciteN{%
1257 | \DeclareRobustCommand\shortciteN{% % January 2008
1258 | \@citeRB
1259 | \def\citeauthoryear##1##2##3{##2\ [##3%
1260 | \def\reserved@a{##2}%
1261 | \def\citeauthoryear####1####2####3{%
1262 | \def\reserved@b{####2}%
1263 | \ifx\reserved@a\reserved@b
1264 | ####3%
1265 | \else
1266 | \errmessage{Package acmart Error: author mismatch
1267 | in \string\shortciteN^^J^^J%
1268 | See the acmart package documentation for explanation}%
1269 | \fi
1270 | }%
1271 | }%
1272 | \@ifstar\@citeyear\@citeyear % GM July 2000
1273 | }
1274 |
1275 | \def\@citenormal{%
1276 | \@ifnextchar [{\@tempswatrue\@citex;}%
1277 | % original {\@tempswafalse\@citex,[]}% was ; Gerry 2/24/00
1278 | {\@tempswafalse\@citex[]}% % GERRY FIX FOR BABEL 3/20/2009
1279 | }
1280 |
1281 | \def\@citeyear{%
1282 | \@ifnextchar [{\@tempswatrue\@citex,}%
1283 | % original {\@tempswafalse\@citex,[]}%
1284 | {\@tempswafalse\@citex[]}% % GERRY FIX FOR BABEL 3/20/2009
1285 | }
1286 |
1287 | \def\@citex#1[#2]#3{%
1288 | \let\@citea\@empty
1289 | \@cite{%
1290 | \@for\@citeb:=#3\do{%
1291 | \@citea
1292 | % original \def\@citea{#1 }%
1293 | \def\@citea{#1, }% % GERRY FIX FOR BABEL 3/20/2009 -- SO THAT YOU GET [1, 2] IN THE BODY TEXT
1294 | \edef\@citeb{\expandafter\@iden\@citeb}%
1295 | \if@filesw
1296 | \immediate\write\@auxout{\string\citation{\@citeb}}%
1297 | \fi
1298 | \@ifundefined{b@\@citeb}{%
1299 | {\bf ?}%
1300 | \@warning{%
1301 | Citation `\@citeb' on page \thepage\space undefined%
1302 | }%
1303 | }%
1304 | {\csname b@\@citeb\endcsname}%
1305 | }%
1306 | }{#2}%
1307 | }
1308 | %\let\@biblabel\@gobble % Dec. 2008 - Gerry
1309 | % ----
1310 | \def\@biblabelnum#1{[#1]} % Gerry's solution #1 - for Natbib -- April 2009
1311 | \let\@biblabel=\@biblabelnum % Gerry's solution #1 - for Natbib -- April 2009
1312 | \def\newblock{\relax} % Gerry Dec. 2008
1313 | % ---
1314 | \newdimen\bibindent
1315 | \setcounter{enumi}{1}
1316 | \bibindent=0em
1317 | \def\thebibliography#1{%
1318 | \ifnum\addauflag=0\addauthorsection\global\addauflag=1\fi
1319 | \section[References]{% <=== OPTIONAL ARGUMENT ADDED HERE
1320 | {References} % was uppercased but this affects pdf bookmarks (SP/GM October 2004)
1321 | {\vskip -2pt plus 1pt} % GM Nov. 2006 / GM July 2000 (for somewhat tighter spacing)
1322 | \@mkboth{{\refname}}{{\refname}}%
1323 | }%
1324 | \refsmall
1325 | \list{[\arabic{enumi}]}{%
1326 | \settowidth\labelwidth{[#1]}%
1327 | \leftmargin\labelwidth
1328 | \advance\leftmargin\labelsep
1329 | \advance\leftmargin\bibindent
1330 | \parsep=0pt\itemsep=5pt % GM July 2000
1331 | \itemindent -\bibindent
1332 | \listparindent \itemindent
1333 | \usecounter{enumi}
1334 | }%
1335 | \let\newblock\@empty
1336 | \raggedright % GM July 2000
1337 | \sloppy
1338 | \sfcode`\.=1000\relax
1339 | }
1340 |
1341 |
1342 | \gdef\balancecolumns
1343 | {\vfill\eject
1344 | \global\@colht=\textheight
1345 | \global\ht\@cclv=\textheight
1346 | }
1347 |
1348 | \newcount\colcntr
1349 | \global\colcntr=0
1350 | %\newbox\savebox
1351 | \newbox\saveb@x % January 2008
1352 |
1353 | \gdef \@makecol {%
1354 | \global\advance\colcntr by 1
1355 | \ifnum\colcntr>2 \global\colcntr=1\fi
1356 | \ifvoid\footins
1357 | \setbox\@outputbox \box\@cclv
1358 | \else
1359 | \setbox\@outputbox \vbox{%
1360 | \boxmaxdepth \@maxdepth
1361 | \@tempdima\dp\@cclv
1362 | \unvbox \@cclv
1363 | \vskip-\@tempdima
1364 | \vskip \skip\footins
1365 | \color@begingroup
1366 | \normalcolor
1367 | \footnoterule
1368 | \unvbox \footins
1369 | \color@endgroup
1370 | }%
1371 | \fi
1372 | \xdef\@freelist{\@freelist\@midlist}%
1373 | \global \let \@midlist \@empty
1374 | \@combinefloats
1375 | \ifvbox\@kludgeins
1376 | \@makespecialcolbox
1377 | \else
1378 | \setbox\@outputbox \vbox to\@colht {%
1379 | \@texttop
1380 | \dimen@ \dp\@outputbox
1381 | \unvbox \@outputbox
1382 | \vskip -\dimen@
1383 | \@textbottom
1384 | }%
1385 | \fi
1386 | \global \maxdepth \@maxdepth
1387 | }
1388 | \def\titlenote{\@ifnextchar[\@xtitlenote{\stepcounter\@mpfn
1389 | \global\advance\titlenotecount by 1
1390 | \ifnum\titlenotecount=1
1391 | \raisebox{9pt}{$\ast$}
1392 | \fi
1393 | \ifnum\titlenotecount=2
1394 | \raisebox{9pt}{$\dagger$}
1395 | \fi
1396 | \ifnum\titlenotecount=3
1397 | \raisebox{9pt}{$\ddagger$}
1398 | \fi
1399 | \ifnum\titlenotecount=4
1400 | \raisebox{9pt}{$\S$}
1401 | \fi
1402 | \ifnum\titlenotecount=5
1403 | \raisebox{9pt}{$\P$}
1404 | \fi
1405 | \@titlenotetext
1406 | }}
1407 |
1408 | \long\def\@titlenotetext#1{\insert\footins{%
1409 | \ifnum\titlenotecount=1\global\tntoks={#1}\fi
1410 | \ifnum\titlenotecount=2\global\tntokstwo={#1}\fi
1411 | \ifnum\titlenotecount=3\global\tntoksthree={#1}\fi
1412 | \ifnum\titlenotecount=4\global\tntoksfour={#1}\fi
1413 | \ifnum\titlenotecount=5\global\tntoksfive={#1}\fi
1414 | \reset@font\footnotesize
1415 | \interlinepenalty\interfootnotelinepenalty
1416 | \splittopskip\footnotesep
1417 | \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
1418 | \hsize\columnwidth \@parboxrestore
1419 | \protected@edef\@currentlabel{%
1420 | }%
1421 | \color@begingroup
1422 | \color@endgroup}}
1423 |
1424 | %%%%%%%%%%%%%%%%%%%%%%%%%
1425 | \ps@plain
1426 | \baselineskip=11pt
1427 | \let\thepage\relax % For NO page numbers - GM Nov. 30th. 1999 and July 2000
1428 | \def\setpagenumber#1{\global\setcounter{page}{#1}}
1429 | %\pagenumbering{arabic} % Arabic page numbers GM July 2000
1430 | \twocolumn % Double column.
1431 | \flushbottom % Even bottom -- alas, does not balance columns at end of document
1432 | \pagestyle{plain}
1433 |
1434 | % Need Copyright Year and Copyright Data to be user definable (in .tex file).
1435 | % Gerry Nov. 30th. 1999
1436 | \newtoks\copyrtyr
1437 | \newtoks\acmcopyr
1438 | \newtoks\boilerplate
1439 | \global\acmcopyr={X-XXXXX-XX-X/XX/XX} % Default - 5/11/2001 *** Gerry
1440 | \global\copyrtyr={20XX} % Default - 3/3/2003 *** Gerry
1441 | \def\CopyrightYear#1{\global\copyrtyr{#1}}
1442 | \def\crdata#1{\global\acmcopyr{#1}}
1443 | \def\permission#1{\global\boilerplate{#1}}
1444 | %
1445 | \global\boilerplate={}
1446 | \newtoks\copyrightetc
1447 | \global\copyrightetc{} % Gerry changed to 15 May 2012
1448 | %\toappear{\the\boilerplate\par
1449 | %{\confname{\the\conf}} \the\confinfo\par \the\copyrightetc.}
1450 | %\DeclareFixedFont{\altcrnotice}{OT1}{tmr}{m}{n}{8} % << patch needed for accenting e.g. Montreal - Gerry, May 2007
1451 | %\DeclareFixedFont{\altconfname}{OT1}{tmr}{m}{it}{8} % << patch needed for accenting in italicized confname - Gerry, May 2007
1452 | %
1453 | %{\altconfname{{\the\conf}}} {\altcrnotice\the\confinfo\par} \the\copyrightetc.} % << Gerry, May 2007
1454 | %
1455 | % The following section (i.e. 3 .sty inclusions) was added in May 2007 so as to fix the problems that many
1456 | % authors were having with accents. Sometimes accents would occur, but the letter-character would be of a different
1457 | % font. Conversely the letter-character font would be correct but, e.g. a 'bar' would appear superimposed on the
1458 | % character instead of, say, an unlaut/diaresis. Sometimes the letter-character would NOT appear at all.
1459 | % Using [T1]{fontenc} outright was not an option as this caused 99% of the authors to 'produce' a Type-3 (bitmapped)
1460 | % PDF file - useless for production.
1461 | %
1462 | % For proper (font) accenting we NEED these packages to be part of the .cls file i.e. 'ae', 'aecompl' and 'aeguil'
1463 | % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1464 | %% This is file `ae.sty'
1465 | \def\fileversion{1.3}
1466 | \def\filedate{2001/02/12}
1467 | \NeedsTeXFormat{LaTeX2e}
1468 | %\ProvidesPackage{ae}[\filedate\space\fileversion\space % GM
1469 | % Almost European Computer Modern] % GM - keeping the log file clean(er)
1470 | \newif\if@ae@slides \@ae@slidesfalse
1471 | \DeclareOption{slides}{\@ae@slidestrue}
1472 | \ProcessOptions
1473 | \fontfamily{aer}
1474 | \RequirePackage[T1]{fontenc}
1475 | \if@ae@slides
1476 | \renewcommand{\sfdefault}{laess}
1477 | \renewcommand{\rmdefault}{laess} % no roman
1478 | \renewcommand{\ttdefault}{laett}
1479 | \else
1480 | \renewcommand{\sfdefault}{aess}
1481 | \renewcommand{\rmdefault}{aer}
1482 | \renewcommand{\ttdefault}{aett}
1483 | \fi
1484 | \endinput
1485 | %%
1486 | %% End of file `ae.sty'.
1487 | %
1488 | %
1489 | \def\fileversion{0.9}
1490 | \def\filedate{1998/07/23}
1491 | \NeedsTeXFormat{LaTeX2e}
1492 | %\ProvidesPackage{aecompl}[\filedate\space\fileversion\space % GM
1493 | %T1 Complements for AE fonts (D. Roegel)] % GM -- keeping the log file clean(er)
1494 |
1495 | \def\@ae@compl#1{{\fontencoding{T1}\fontfamily{cmr}\selectfont\symbol{#1}}}
1496 | \def\guillemotleft{\@ae@compl{19}}
1497 | \def\guillemotright{\@ae@compl{20}}
1498 | \def\guilsinglleft{\@ae@compl{14}}
1499 | \def\guilsinglright{\@ae@compl{15}}
1500 | \def\TH{\@ae@compl{222}}
1501 | \def\NG{\@ae@compl{141}}
1502 | \def\ng{\@ae@compl{173}}
1503 | \def\th{\@ae@compl{254}}
1504 | \def\DJ{\@ae@compl{208}}
1505 | \def\dj{\@ae@compl{158}}
1506 | \def\DH{\@ae@compl{208}}
1507 | \def\dh{\@ae@compl{240}}
1508 | \def\@perthousandzero{\@ae@compl{24}}
1509 | \def\textperthousand{\%\@perthousandzero}
1510 | \def\textpertenthousand{\%\@perthousandzero\@perthousandzero}
1511 | \endinput
1512 | %
1513 | %
1514 | %% This is file `aeguill.sty'
1515 | % This file gives french guillemets (and not guillemots!)
1516 | % built with the Polish CMR fonts (default), WNCYR fonts, the LASY fonts
1517 | % or with the EC fonts.
1518 | % This is useful in conjunction with the ae package
1519 | % (this package loads the ae package in case it has not been loaded)
1520 | % and with or without the french(le) package.
1521 | %
1522 | % In order to get the guillemets, it is necessary to either type
1523 | % \guillemotleft and \guillemotright, or to use an 8 bit encoding
1524 | % (such as ISO-Latin1) which selects these two commands,
1525 | % or, if you use the french package (but not the frenchle package),
1526 | % to type << or >>.
1527 | %
1528 | % By default, you get the Polish CMR guillemets; if this package is loaded
1529 | % with the `cm' option, you get the LASY guillemets; with `ec,' you
1530 | % get the EC guillemets, and with `cyr,' you get the cyrillic guillemets.
1531 | %
1532 | % In verbatim mode, you always get the EC/TT guillemets.
1533 | %
1534 | % The default option is interesting in conjunction with PDF,
1535 | % because there is a Type 1 version of the Polish CMR fonts
1536 | % and these guillemets are very close in shape to the EC guillemets.
1537 | % There are no free Type 1 versions of the EC fonts.
1538 | %
1539 | % Support for Polish CMR guillemets was kindly provided by
1540 | % Rolf Niepraschk in version 0.99 (2000/05/22).
1541 | % Bernd Raichle provided extensive simplifications to the code
1542 | % for version 1.00.
1543 | %
1544 | % This package is released under the LPPL.
1545 | %
1546 | % Changes:
1547 | % Date version
1548 | % 2001/04/12 1.01 the frenchle and french package are now distinguished.
1549 | %
1550 | \def\fileversion{1.01}
1551 | \def\filedate{2001/04/12}
1552 | \NeedsTeXFormat{LaTeX2e}
1553 | %\ProvidesPackage{aeguill}[2001/04/12 1.01 % % GM
1554 | %AE fonts with french guillemets (D. Roegel)] % GM - keeping the log file clean(er)
1555 | %\RequirePackage{ae} % GM May 2007 - already embedded here
1556 |
1557 | \newcommand{\@ae@switch}[4]{#4}
1558 | \DeclareOption{ec}{\renewcommand\@ae@switch[4]{#1}}
1559 | \DeclareOption{cm}{\renewcommand\@ae@switch[4]{#2}}
1560 | \DeclareOption{cyr}{\renewcommand\@ae@switch[4]{#3}}
1561 | \DeclareOption{pl}{\renewcommand\@ae@switch[4]{#4}}
1562 | \ExecuteOptions{pl}
1563 | \ProcessOptions
1564 |
1565 | %
1566 | % Load necessary packages
1567 | %
1568 | \@ae@switch{% ec
1569 | % do nothing
1570 | }{% cm
1571 | \RequirePackage{latexsym}% GM - May 2007 - already 'mentioned as required' up above
1572 | }{% cyr
1573 | \RequirePackage[OT2,T1]{fontenc}%
1574 | }{% pl
1575 | \RequirePackage[OT4,T1]{fontenc}%
1576 | }
1577 |
1578 | % The following command will be compared to \frenchname,
1579 | % as defined in french.sty and frenchle.sty.
1580 | \def\aeguillfrenchdefault{french}%
1581 |
1582 | \let\guill@verbatim@font\verbatim@font
1583 | \def\verbatim@font{\guill@verbatim@font\ecguills{cmtt}%
1584 | \let\guillemotleft\@oguills\let\guillemotright\@fguills}
1585 |
1586 | \begingroup \catcode`\<=13 \catcode`\>=13
1587 | \def\x{\endgroup
1588 | \def\ae@lfguill{<<}%
1589 | \def\ae@rfguill{>>}%
1590 | }\x
1591 |
1592 | \newcommand{\ecguills}[1]{%
1593 | \def\selectguillfont{\fontencoding{T1}\fontfamily{#1}\selectfont}%
1594 | \def\@oguills{{\selectguillfont\symbol{19}}}%
1595 | \def\@fguills{{\selectguillfont\symbol{20}}}%
1596 | }
1597 |
1598 | \newcommand{\aeguills}{%
1599 | \ae@guills
1600 | % We redefine \guillemotleft and \guillemotright
1601 | % in order to catch them when they are used
1602 | % with \DeclareInputText (in latin1.def for instance)
1603 | % We use \auxWARNINGi as a safe indicator that french.sty is used.
1604 | \gdef\guillemotleft{\ifx\auxWARNINGi\undefined
1605 | \@oguills % neither french.sty nor frenchle.sty
1606 | \else
1607 | \ifx\aeguillfrenchdefault\frenchname
1608 | \ae@lfguill % french.sty
1609 | \else
1610 | \@oguills % frenchle.sty
1611 | \fi
1612 | \fi}%
1613 | \gdef\guillemotright{\ifx\auxWARNINGi\undefined
1614 | \@fguills % neither french.sty nor frenchle.sty
1615 | \else
1616 | \ifx\aeguillfrenchdefault\frenchname
1617 | \ae@rfguill % french.sty
1618 | \else
1619 | \@fguills % frenchle.sty
1620 | \fi
1621 | \fi}%
1622 | }
1623 |
1624 | %
1625 | % Depending on the class option
1626 | % define the internal command \ae@guills
1627 | \@ae@switch{% ec
1628 | \newcommand{\ae@guills}{%
1629 | \ecguills{cmr}}%
1630 | }{% cm
1631 | \newcommand{\ae@guills}{%
1632 | \def\selectguillfont{\fontencoding{U}\fontfamily{lasy}%
1633 | \fontseries{m}\fontshape{n}\selectfont}%
1634 | \def\@oguills{\leavevmode\nobreak
1635 | \hbox{\selectguillfont (\kern-.20em(\kern.20em}\nobreak}%
1636 | \def\@fguills{\leavevmode\nobreak
1637 | \hbox{\selectguillfont \kern.20em)\kern-.2em)}%
1638 | \ifdim\fontdimen\@ne\font>\z@\/\fi}}%
1639 | }{% cyr
1640 | \newcommand{\ae@guills}{%
1641 | \def\selectguillfont{\fontencoding{OT2}\fontfamily{wncyr}\selectfont}%
1642 | \def\@oguills{{\selectguillfont\symbol{60}}}%
1643 | \def\@fguills{{\selectguillfont\symbol{62}}}}
1644 | }{% pl
1645 | \newcommand{\ae@guills}{%
1646 | \def\selectguillfont{\fontencoding{OT4}\fontfamily{cmr}\selectfont}%
1647 | \def\@oguills{{\selectguillfont\symbol{174}}}%
1648 | \def\@fguills{{\selectguillfont\symbol{175}}}}
1649 | }
1650 |
1651 |
1652 | \AtBeginDocument{%
1653 | \ifx\GOfrench\undefined
1654 | \aeguills
1655 | \else
1656 | \let\aeguill@GOfrench\GOfrench
1657 | \gdef\GOfrench{\aeguill@GOfrench \aeguills}%
1658 | \fi
1659 | }
1660 |
1661 | \endinput
1662 | %
1663 |
1664 |
--------------------------------------------------------------------------------
/include/AuxGraph.h:
--------------------------------------------------------------------------------
1 | #ifndef AUXGRAPH_H
2 | #define AUXGRAPH_H
3 |
4 | #include "llvm/ADT/DenseMap.h"
5 | #include "llvm/ADT/DenseSet.h"
6 | #include "llvm/ADT/MapVector.h"
7 | #include "llvm/ADT/SetVector.h"
8 | #include "llvm/IR/BasicBlock.h"
9 | #include "llvm/IR/Function.h"
10 |
11 | #include
12 |
13 | using namespace llvm;
14 |
15 | namespace epp {
16 |
17 | struct Edge {
18 | BasicBlock *src, *tgt;
19 | bool real;
20 | Edge(BasicBlock *from, BasicBlock *to, bool r = true)
21 | : src(from), tgt(to), real(r) {}
22 | };
23 |
24 | typedef std::shared_ptr EdgePtr;
25 |
26 | // An auxiliary graph representation of the CFG of a function which
27 | // will be queried online during instrumentation. Edges in the graph
28 | // will need to be updated as instrumentation changes the basic block
29 | // pointers used to represent a particular edge/node.
30 | class AuxGraph {
31 |
32 | SmallVector Nodes;
33 | DenseMap> EdgeList;
34 | std::unordered_map> SegmentMap;
35 | std::unordered_map Weights;
36 | BasicBlock *FakeExit;
37 |
38 | public:
39 | void clear();
40 | void init(Function &F);
41 | EdgePtr add(BasicBlock *src, BasicBlock *tgt, bool isReal = true);
42 | void
43 | segment(SetVector> &List);
44 | //void printWeights();
45 | void dot(raw_ostream &os) const;
46 | void dotW(raw_ostream &os) const;
47 | SmallVector succs(BasicBlock *B) const;
48 | SmallVector, 16> getWeights() const;
49 | APInt getEdgeWeight(const EdgePtr &Ptr) const;
50 | std::unordered_map> getSegmentMap() const;
51 | EdgePtr exists(BasicBlock *Src, BasicBlock *Tgt, bool isReal) const;
52 | EdgePtr getOrInsertEdge(BasicBlock *Src, BasicBlock *Tgt, bool isReal);
53 |
54 | bool isExitBlock(BasicBlock *B) const { return B == FakeExit; }
55 | SmallVector nodes() const { return Nodes; }
56 | APInt &operator[](const EdgePtr &E) { return Weights[E]; }
57 | };
58 | }
59 | #endif
60 |
--------------------------------------------------------------------------------
/include/BreakSelfLoopsPass.h:
--------------------------------------------------------------------------------
1 | #ifndef BREAKSELFLOOPSPASS_H
2 | #define BREAKSELFLOOPSPASS_H
3 |
4 | #include "llvm/Pass.h"
5 |
6 | using namespace llvm;
7 |
8 | namespace epp {
9 |
10 | struct BreakSelfLoopsPass : public ModulePass {
11 | static char ID;
12 | BreakSelfLoopsPass() : llvm::ModulePass(ID){}
13 | virtual bool runOnModule(llvm::Module &m) override;
14 | llvm::StringRef getPassName() const override { return "BreakSelfLoopsPass"; }
15 | };
16 |
17 | }
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/include/EPPDecode.h:
--------------------------------------------------------------------------------
1 | #ifndef EPPDECODE_H
2 | #define EPPDECODE_H
3 |
4 | #include "llvm/ADT/APInt.h"
5 | #include "llvm/ADT/StringRef.h"
6 | #include "llvm/Analysis/LoopInfo.h"
7 | #include "llvm/IR/Module.h"
8 | #include "llvm/Pass.h"
9 |
10 | #include "EPPEncode.h"
11 | #include