Changeset 49eb6a2 for doc


Ignore:
Timestamp:
Mar 11, 2018, 11:51:09 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
53dece1
Parents:
200b2b5
Message:

switch to SPE latex macros

Location:
doc
Files:
117 added
3 edited

Legend:

Unmodified
Added
Removed
  • doc/bibliography/pl.bib

    r200b2b5 r49eb6a2  
    780780    title       = {Boost Coroutine Library},
    781781    year        = 2015,
    782     note        = {\href{http://www.boost.org/doc/libs/1_61_0/libs/coroutine/doc/html/index.html}
    783                   {{http://www.boost.org/\-doc/\-libs/1\_61\_0/\-libs/\-coroutine/\-doc/\-html/\-index.html}} [Accessed September 2016]},
     782    howpublished= {\href{http://www.boost.org/doc/libs/1_61_0/libs/coroutine/doc/html/index.html}
     783                  {{http://www.boost.org/\-doc/\-libs/1\_61\_0/\-libs/\-coroutine/\-doc/\-html/\-index.html}}},
     784    note        = {Accessed: 2016-09},
    784785}
    785786
     
    865866    keywords    = {ISO/IEC C 11},
    866867    contributer = {pabuhr@plg},
    867     author      = {C11},
    868     title       = {Programming Languages -- {C} {ISO/IEC} 9889:2011-12},
     868    key         = {C11},
     869    title       = {C Programming Language {ISO/IEC} 9889:2011-12},
    869870    edition     = {3rd},
    870871    publisher   = {International Standard Organization},
     
    873874}
    874875
    875 @techreport{C++Concepts,
    876     type        = {International Standard},
     876@manual{C++Concepts,
    877877    keywords    = {ISO/IEC TS 19217:2015},
    878878    contributer = {a3moss@uwaterloo.ca},
    879879    key         = {Concepts},
    880     title       = {Information technology -- Programming languages -- {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Extensions for concepts {ISO/IEC} {TS} 19217:2015},
     880    title       = {{C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Programming language -- Extensions for concepts {ISO/IEC} {TS} 19217:2015},
    881881    publisher   = {International Standard Organization},
    882882    address     = {\href{https://www.iso.org/standard/64031.html}{https://\-www.iso.org/\-standard/\-64031.html}},
    883     year        = 2015
     883    year        = 2015,
    884884}
    885885
     
    10231023
    10241024@inproceedings{Necula02,
    1025     author = {Necula, George C. and McPeak, Scott and Weimer, Westley},
    1026     title = {{CCured}: Type-safe Retrofitting of Legacy Code},
    1027     booktitle = {Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages},
    1028     series = {POPL '02},
    1029     year = {2002},
    1030     isbn = {1-58113-450-9},
    1031     location = {Portland, Oregon},
    1032     pages = {128--139},
    1033     numpages = {12},
    1034     url = {http://doi.acm.org/10.1145/503272.503286},
    1035     doi = {10.1145/503272.503286},
    1036     acmid = {503286},
    1037     publisher = {ACM},
    1038     address = {New York, NY, USA},
     1025    author      = {Necula, George C. and McPeak, Scott and Weimer, Westley},
     1026    title       = {{CCured}: Type-safe Retrofitting of Legacy Code},
     1027    booktitle   = {Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages},
     1028    series      = {POPL '02},
     1029    year        = {2002},
     1030    location    = {Portland, Oregon},
     1031    pages       = {128-139},
     1032    publisher   = {ACM},
     1033    address     = {New York, NY, USA},
    10391034}
    10401035
     
    11221117    title       = {Programming Languages -- {Cobol} ISO/IEC 1989:2014},
    11231118    edition     = {2nd},
    1124     institution = {International Standard Organization},
     1119    institution = {International Standard Organization},
    11251120    address     = {\href{https://www.iso.org/standard/51416.html}{https://\-www.iso.org/\-standard/\-51416.html}},
    11261121    year        = 2014,
     
    11341129    journal     = sigplan,
    11351130    year        = 1984,
    1136     month       = jun, volume = 19, number = 6, pages = {1-12},
     1131    month       = jun,
     1132    volume      = 19,
     1133    number      = 6,
     1134    pages       = {1-12},
    11371135    note        = {Proceedings of the ACM SIGPLAN '84 Symposium on Compiler Construction},
    11381136    abstract    = {
     
    20062004
    20072005@book{Stroustrup94,
    2008     keywords    = {C++},
    2009     contributor = {wyrmok@plg},
    2010     author      = {Bjarne Stroustrup},
    2011     title       = {The Design and Evolution of {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}}},
    2012     publisher   = {Addison-Wesley},
     2006    keywords    = {C++},
     2007    contributor = {wyrmok@plg},
     2008    author      = {Bjarne Stroustrup},
     2009    title       = {The Design and Evolution of {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}}},
     2010    publisher   = {Addison-Wesley},
    20132011    address     = {Boston},
    2014     year        = 1994
     2012    year        = 1994
    20152013}
    20162014
     
    27552753}
    27562754
    2757 @online{GCCExtensions,
     2755@misc{GCCExtensions,
    27582756    contributer = {a3moss@uwaterloo.ca},
    27592757    key         = {{GNU}},
     
    27612759    title       = {Extensions to the {C} Language Family},
    27622760    year        = 2014,
    2763     note        = {\href{https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/C-Extensions.html}{https://\-gcc.gnu.org/\-onlinedocs/\-gcc-4.7.2/\-gcc/\-C\-Extensions.html}},
    2764     urldate     = {2017-04-02}
     2761    howpublished= {\href{https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/C-Extensions.html}{https://\-gcc.gnu.org/\-onlinedocs/\-gcc-4.7.2/\-gcc/\-C\-Extensions.html}},
     2762    note        = {Accessed: 2017-04-02},
    27652763}
    27662764
     
    31003098    keywords    = {GMP arbitrary-precision library},
    31013099    contributer = {pabuhr@plg},
     3100    key         = {GMP},
    31023101    title       = {{GNU} Multiple Precision Arithmetic Library},
    3103     author      = {GMP},
    3104     organization= {GNU},
     3102    address     = {GNU},
    31053103    year        = 2016,
    31063104    note        = {\href{https://gmplib.org}{https://\-gmplib.org}},
     
    31313129}
    31323130
    3133 @online{GObject,
     3131@misc{GObject,
    31343132    keywords    = {GObject},
    31353133    contributor = {a3moss@uwaterloo.ca},
    3136     author      = {{GObject}},
    3137     organization= {The GNOME Project},
    3138     title       = {{GObject} Reference Manual},
     3134    key         = {GObject},
     3135    organization= {The {GNOME} Project},
     3136    title       = {{GO}bject Reference Manual},
    31393137    year        = 2014,
    3140     url         = {https://developer.gnome.org/gobject/stable/},
    3141     urldate     = {2017-04-04}
     3138    howpublished= {https://developer.gnome.org/gobject/stable/},
     3139    note        = {Accessed: 2017-04},
    31423140}
    31433141
     
    36643662
    36653663@inproceedings{Pharr12,
    3666   title={ispc: A SPMD compiler for high-performance CPU programming},
    3667   author={Pharr, Matt and Mark, William R},
    3668   booktitle={Innovative Parallel Computing (InPar), 2012},
    3669   pages={1--13},
    3670   year={2012},
    3671   organization={IEEE}
     3664    title       = {ispc: A {SPMD} compiler for high-performance CPU programming},
     3665    author      = {Pharr, Matt and Mark, William R},
     3666    booktitle   = {Innovative Parallel Computing (InPar), 2012},
     3667    pages       = {1--13},
     3668    year        = {2012},
     3669    month       = may,
     3670    address     = {San Jose, CA, USA},
     3671    publisher   = {IEEE},
    36723672}
    36733673
    36743674@inproceedings{DeLozier13,
    3675     author = {DeLozier, Christian and Eisenberg, Richard and Nagarakatte, Santosh and Osera, Peter-Michael and Martin, Milo M.K. and Zdancewic, Steve},
    3676     title = {{I}ronclad {C++}: A Library-augmented Type-safe Subset of {C++}},
    3677     booktitle = {Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages \& Applications},
    3678     series = {OOPSLA '13},
    3679     year = {2013},
    3680     isbn = {978-1-4503-2374-1},
    3681     location = {Indianapolis, Indiana, USA},
    3682     pages = {287--304},
    3683     numpages = {18},
    3684     url = {http://doi.acm.org/10.1145/2509136.2509550},
    3685     doi = {10.1145/2509136.2509550},
    3686     acmid = {2509550},
    3687     publisher = {ACM},
    3688     address = {New York, NY, USA},
    3689     keywords = {c++, local pointers, memory safety, type-safety},
     3675    keywords    = {C++, local pointers, memory safety, type-safety},
     3676    author      = {DeLozier, Christian and Eisenberg, Richard and Nagarakatte, Santosh and Osera, Peter-Michael and Martin, Milo M.K. and Zdancewic, Steve},
     3677    title       = {{I}ronclad {C++}: A Library-augmented Type-safe Subset of {C++}},
     3678    booktitle   = {Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages \& Applications},
     3679    series      = {OOPSLA'13},
     3680    year        = {2013},
     3681    address     = {Indianapolis, Indiana, USA},
     3682    pages       = {287-304},
     3683    publisher   = {ACM},
    36903684}
    36913685
     
    37313725                 
    37323726@book{Java,
    3733     keywords    = {Java},
    3734     contributer = {pabuhr@plg},
    3735     author      = {James Gosling and Bill Joy and Guy Steele and Gilad Bracha},
    3736     title       = {The {Java} Language Specification},
     3727    keywords    = {Java},
     3728    contributer = {pabuhr@plg},
     3729    author      = {James Gosling and Bill Joy and Guy Steele and Gilad Bracha},
     3730    title       = {The {Java} Language Specification},
    37373731    publisher   = {Addison-Wesley},
    37383732    address     = {Reading},
    3739     year        = 2000,
     3733    year        = 2000,
    37403734    edition     = {2nd},
    37413735}
    37423736
    37433737@manual{Java8,
    3744     keywords    = {Java SE 8},
    3745     contributer = {pabuhr@plg},
    3746     author      = {James Gosling and Bill Joy and Guy Steele and Gilad Bracha and Alex Buckley},
    3747     title       = {{Java} Language Specification},
     3738    keywords    = {Java SE 8},
     3739    contributer = {pabuhr@plg},
     3740    author      = {James Gosling and Bill Joy and Guy Steele and Gilad Bracha and Alex Buckley},
     3741    title       = {{Java} Language Specification},
    37483742    publisher   = {Oracle},
    3749     year        = 2015,
     3743    year        = 2015,
    37503744    edition     = {Java SE 8},
    37513745}
     
    46834677}
    46844678
    4685 @manual{obj-c-book,
     4679@misc{obj-c-book,
    46864680    keywords    = {objective-c},
    46874681    contributor = {a3moss@uwaterloo.ca},
    4688     author      = {{Objective-C}},
    4689     title       = {The {Objective-C} Programming Language},
    4690     organization= {Apple Computer Inc.},
    4691     address     = {Cupertino, CA},
    4692     year        = 2003
    4693 }
    4694 
    4695 @online{xcode7,
     4682    key         = {Objective-C},
     4683    title       = {Objective-C},
     4684    publisher   = {Apple Inc.},
     4685    year        = 2015,
     4686    howpublished= {\href{https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/ObjectiveC.html}{https://developer.apple.com/\-library/\-content/\-documentation/\-General/\-Conceptual/\-DevPedia-\-CocoaCore/\-ObjectiveC.html}},
     4687    note        = {Accessed: 2018-03}
     4688}
     4689
     4690@misc{xcode7,
    46964691    keywords    = {objective-c},
    46974692    contributor = {a3moss@uwaterloo.ca},
    4698     author      = {{Xcode}},
    4699     title       = {{Xcode} 7 Release Notes},
     4693    key         = {Xcode},
     4694    title       = {{X}code 7 Release Notes},
    47004695    year        = 2015,
    4701     note        = {\href{https://developer.apple.com/library/content/documentation/Xcode/Conceptual/RN-Xcode-Archive/Chapters/xc7_release_notes.html}{https://developer.apple.com/\-library/\-content/\-documentation/\-Xcode/\-Conceptual/\-RN-Xcode-Archive/\-Chapters/\-xc7\_release\_notes.html}},
    4702     urldate     = {2017-04-04}
     4696    howpublished= {\href{https://developer.apple.com/library/content/documentation/Xcode/Conceptual/RN-Xcode-Archive/Chapters/xc7_release_notes.html}{https://developer.apple.com/\-library/\-content/\-documentation/\-Xcode/\-Conceptual/\-RN-Xcode-Archive/\-Chapters/\-xc7\_release\_notes.html}},
     4697    note        = {Accessed: 2017-04}
    47034698}
    47044699
     
    54775472    contributer = {pabuhr@plg},
    54785473    key         = {C++98},
    5479     title       = {Programming Languages -- {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}}},
    5480     organization= {International Standard ISO/IEC 14882:1998 (E)},
    5481     publisher   = {American National Standards Institute},
    5482     address     = {www.ansi.org},
     5474    title       = {{C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Programming Language ISO/IEC 14882:1998},
     5475    edition     = {1st},
     5476    publisher   = {International Standard Organization},
     5477    address     = {\href{https://www.iso.org/standard/25845.html}{https://\-www.iso.org/\-standard/\-25845.html}},
    54835478    year        = 1998,
    54845479}
     
    54875482    keywords    = {ISO/IEC C++ 14},
    54885483    contributer = {pabuhr@plg},
    5489     author      = {C++14},
    5490     title       = {Programming Languages -- {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} ISO/IEC 14882:2014},
     5484    key         = {C++14},
     5485    title       = {{C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Programming Language ISO/IEC 14882:2014},
    54915486    edition     = {4th},
    54925487    publisher   = {International Standard Organization},
     
    60116006    keywords    = {Rust programming language},
    60126007    contributer = {pabuhr@plg},
    6013     author      = {{Rust}},
    6014     title       = {The {Rust} Programming Language},
    6015     organization= {The Rust Project Developers},
     6008    key         = {Rust},
     6009    title       = {The {R}ust Programming Language},
     6010    address     = {The Rust Project Developers},
    60166011    year        = 2015,
    60176012    note        = {\href{https://doc.rust-lang.org/reference.html}{https://\-doc.rust-lang\-.org/\-reference.html}},
     
    60236018    keywords    = {Scala programming language},
    60246019    contributer = {pabuhr@plg},
    6025     author      = {{Scala}},
    6026     title       = {{Scala} Language Specification, Version 2.11},
    6027     organization= {\'{E}cole Polytechnique F\'{e}d\'{e}rale de Lausanne},
     6020    key         = {Scala},
     6021    title       = {{S}cala Language Specification, Version 2.11},
     6022    address     = {\'{E}cole Polytechnique F\'{e}d\'{e}rale de Lausanne},
    60286023    year        = 2016,
    60296024    note        = {\href{http://www.scala-lang.org/files/archive/spec/2.11}{http://\-www.scala-lang.org/\-files/\-archive/\-spec/\-2.11}},
     
    61246119    author      = {Lei{\ss}a, Roland and Haffner, Immanuel and Hack, Sebastian},
    61256120    booktitle   = {Proceedings of the 2014 Workshop on Workshop on programming models for SIMD/Vector processing},
    6126     pages       = {17--24},
     6121    pages       = {17-24},
    61276122    year        = {2014},
    61286123    organization= {ACM}
     
    63706365    keywords    = {Polymorphic C},
    63716366    contributor = {a3moss@uwaterloo.ca},
    6372     title       = {A sound polymorphic type system for a dialect of C},
     6367    title       = {A sound polymorphic type system for a dialect of {C}},
    63736368    author      = {Smith, Geoffrey and Volpano, Dennis},
    63746369    journal     = {Science of computer programming},
     
    64786473}
    64796474
    6480 @online{Sutter15,
     6475@misc{Sutter15,
    64816476    contributer = {pabuhr@plg},
    64826477    author      = {Herb Sutter and Bjarne Stroustrup and Gabriel Dos Reis},
     
    64856480    month       = oct,
    64866481    year        = 2015,
    6487     pages       = {1--6},
     6482    pages       = {1-6},
    64886483    numpages    = {6},
    6489     note        = {\href{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0144r0.pdf}{http://\-www.open-std.org/\-jtc1/\-sc22/\-wg21/\-docs/\-papers/\-2015/\-p0144r0.pdf}},
     6484    howpublished= {\href{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0144r0.pdf}{http://\-www.open-std.org/\-jtc1/\-sc22/\-wg21/\-docs/\-papers/\-2015/\-p0144r0.pdf}},
    64906485}
    64916486
     
    67616756}
    67626757
    6763 @online{TIOBE,
    6764     contributer = {pabuhr@plg},
    6765     author      = {{TIOBE Index}},
    6766     year        = {February 2018},
    6767     url         = {http://www.tiobe.com/tiobe_index},
     6758@misc{TIOBE,
     6759    contributer = {pabuhr@plg},
     6760    key         = {TIOBE Index},
     6761    title       = {{TIOBE} Index},
     6762    howpublished= {\href{http://www.tiobe.com/tiobe_index}{http://\-www.tiobe.com/\-tiobe\_index}},
     6763    note        = {Accessed: 2018-09},
    67686764}
    67696765
     
    67766772    month       = sep,
    67776773    year        = 1990,
    6778     note        = {}
    67796774}
    67806775
     
    70837078}
    70847079
    7085 @online{Vala,
     7080@misc{Vala,
    70867081    keywords    = {GObject, Vala},
    70877082    contributor = {a3moss@uwaterloo.ca},
    7088     author      = {{Vala}},
    7089     organization= {The GNOME Project},
    7090     title       = {Vala Reference Manual},
     7083    key         = {Vala},
     7084    organization= {The {GNOME} Project},
     7085    title       = {{V}ala Reference Manual},
    70917086    year        = 2017,
    7092     url         = {https://wiki.gnome.org/Projects/Vala/Manual},
    7093     urldate     = {2017-04-04}
     7087    howpublished= {\url{https://wiki.gnome.org/Projects/Vala/Manual}},
     7088    note        = {Accessed: 2017-04}
    70947089}
    70957090
  • doc/papers/general/Makefile

    r200b2b5 r49eb6a2  
    33Build = build
    44Figures = figures
    5 Macros = ../../LaTeXmacros
     5Macros = AMA/AMA-stix/ama
    66TeXLIB = .:${Macros}:${Build}:../../bibliography:
    77LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
    88BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
    99
    10 MAKEFLAGS = --no-print-directory --silent #
     10MAKEFLAGS = --no-print-directory # --silent
    1111VPATH = ${Build} ${Figures} evaluation
    1212
     
    5050
    5151${basename ${DOCUMENT}}.ps : ${basename ${DOCUMENT}}.dvi
    52         dvips ${Build}/$< -o $@
     52        dvips -h ${Build}/Paper.out.ps -o $@ ${Build}/$<
    5353
    5454${basename ${DOCUMENT}}.dvi : Makefile ${Build} ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \
    55                 ${Macros}/common.tex ${Macros}/indexstyle ../../bibliography/pl.bib
     55                ../../bibliography/pl.bib
    5656        # Must have *.aux file containing citations for bibtex
    5757        if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
    58         -${BibTeX} ${Build}/${basename $@}
     58        ${BibTeX} ${Build}/${basename $@}
    5959        # Some citations reference others so run again to resolve these citations
    6060        ${LaTeX} ${basename $@}.tex
    61         -${BibTeX} ${Build}/${basename $@}
     61        ${BibTeX} ${Build}/${basename $@}
    6262        # Run again to finish citations
    6363        ${LaTeX} ${basename $@}.tex
  • doc/papers/general/Paper.tex

    r200b2b5 r49eb6a2  
    1 \documentclass{article}
     1\documentclass[AMA,STIX1COL]{WileyNJD-v2}
     2%\documentclass{article}
     3
     4\articletype{RESEARCH ARTICLE}%
     5
     6\received{26 April 2016}
     7\revised{6 June 2016}
     8\accepted{6 June 2016}
     9
     10\raggedbottom
    211
    312\usepackage{fullpage}
     
    817\usepackage{enumitem}
    918\setlist[itemize]{topsep=3pt,itemsep=2pt,parsep=0pt}% global
    10 \usepackage[flushmargin]{footmisc}                      % support label/reference in footnote
    1119\usepackage{rotating}
    12 \usepackage[usenames]{color}
    13 \usepackage{pslatex}                                            % reduce size of san serif font
    14 \usepackage[plainpages=false,pdfpagelabels,pdfpagemode=UseNone,pagebackref=true,breaklinks=true,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
    15 \urlstyle{sf}
    16 \usepackage{breakurl}
    17 
    18 \setlength{\textheight}{9in}
    19 %\oddsidemargin 0.0in
    20 \renewcommand{\topfraction}{0.8}                        % float must be greater than X of the page before it is forced onto its own page
    21 \renewcommand{\bottomfraction}{0.8}                     % float must be greater than X of the page before it is forced onto its own page
    22 \renewcommand{\floatpagefraction}{0.8}          % float must be greater than X of the page before it is forced onto its own page
    23 \renewcommand{\textfraction}{0.0}                       % the entire page maybe devoted to floats with no text on the page at all
     20\definecolor{ForestGreen}{cmyk}{1, 0, 0.99995, 0}
     21\hypersetup{breaklinks=true}
     22
     23\usepackage[pagewise]{lineno}
     24\renewcommand{\linenumberfont}{\scriptsize\sffamily}
     25
     26\setlength{\topmargin}{-0.75in}\setlength{\headsep}{0.5in}\setlength{\footskip}{0.25in}
     27\setlength{\textheight}{9.325in}
     28\setlength{\textwidth}{6.75in}
     29\setlength{\evensidemargin}{-0.25in}
     30\setlength{\oddsidemargin}{-0.25in}
    2431
    2532\lefthyphenmin=4                                                        % hyphen only after 4 characters
     
    6471\newlength{\gcolumnposn}                                        % temporary hack because lstlisting does not handle tabs correctly
    6572\newlength{\columnposn}
    66 \setlength{\gcolumnposn}{2.75in}
     73\setlength{\gcolumnposn}{3.5in}
    6774\setlength{\columnposn}{\gcolumnposn}
    6875\newcommand{\C}[2][\@empty]{\ifx#1\@empty\else\global\setlength{\columnposn}{#1}\global\columnposn=\columnposn\fi\hfill\makebox[\textwidth-\columnposn][l]{\lst@basicstyle{\LstCommentStyle{#2}}}}
     
    96103        {\ETC.\xspace}%
    97104}%
    98 \newcommand{\ETAL}{\abbrevFont{et}~\abbrevFont{al}}
    99 \newcommand*{\etal}{%
    100         \@ifnextchar{.}{\protect\ETAL}%
    101                 {\protect\ETAL.\xspace}%
    102 }%
     105%\newcommand{\ETAL}{\abbrevFont{et}~\abbrevFont{al}}
     106%\newcommand*{\etal}{%
     107%       \@ifnextchar{.}{\protect\ETAL}%
     108%               {\protect\ETAL.\xspace}%
     109%}%
    103110\newcommand{\VIZ}{\abbrevFont{viz}}
    104111\newcommand*{\viz}{%
     
    145152belowskip=3pt,
    146153% replace/adjust listing characters that look bad in sanserif
    147 literate={-}{\makebox[1ex][c]{\raisebox{0.4ex}{\rule{0.8ex}{0.1ex}}}}1 {^}{\raisebox{0.6ex}{$\scriptscriptstyle\land\,$}}1
    148         {~}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}}1 {@}{\small{@}}1 {<}{\small{\textless}}1 {>}{\small{\textgreater}}1  % {`}{\ttfamily\upshape\hspace*{-0.1ex}`}1
    149         {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 {->}{\makebox[1ex][c]{\raisebox{0.4ex}{\rule{0.8ex}{0.075ex}}}\kern-0.2ex{\small\textgreater}}2,
     154literate={-}{\makebox[1ex][c]{\raisebox{0.4ex}{\rule{0.8ex}{0.1ex}}}}1 {^}{\raisebox{0.6ex}{$\scriptstyle\land\,$}}1
     155        {~}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}}1 % {`}{\ttfamily\upshape\hspace*{-0.1ex}`}1
     156        {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 {->}{\makebox[1ex][c]{\raisebox{0.5ex}{\rule{0.8ex}{0.075ex}}}\kern-0.2ex{\textgreater}}2,
    150157moredelim=**[is][\color{red}]{`}{`},
    151158}% lstset
    152 
    153 % inline code @...@
    154 \lstMakeShortInline@%
    155159
    156160\lstnewenvironment{cfa}[1][]
     
    162166
    163167
    164 \title{\protect\CFA : Adding Modern Programming Language Features to C}
    165 
    166 \author{Aaron Moss, Robert Schluntz, Peter Buhr}
    167 % \email{a3moss@uwaterloo.ca}
    168 % \email{rschlunt@uwaterloo.ca}
    169 % \email{pabuhr@uwaterloo.ca}
    170 % \affiliation{%
    171 %       \institution{University of Waterloo}
    172 %       \department{David R. Cheriton School of Computer Science}
    173 %       \streetaddress{Davis Centre, University of Waterloo}
    174 %       \city{Waterloo}
    175 %       \state{ON}
    176 %       \postcode{N2L 3G1}
    177 %       \country{Canada}
    178 % }
    179 
    180 %\terms{generic, tuple, variadic, types}
    181 %\keywords{generic types, tuple types, variadic types, polymorphic functions, C, Cforall}
    182 
    183168\begin{document}
    184 \maketitle
    185 
    186 
    187 \begin{abstract}
     169\linenumbers                                            % comment out to turn off line numbering
     170
     171\title{\texorpdfstring{\protect\CFA : Adding Modern Programming Language Features to C}{Cforall : Adding Modern Programming Language Features to C}}
     172
     173\author[1]{Aaron Moss}
     174\author[1]{Robert Schluntz}
     175\author[1]{Peter A. Buhr*}
     176
     177\address[1]{\orgdiv{David R. Cheriton School of Computer Science}, \orgname{University of Waterloo}, \orgaddress{\state{Ontario}, \country{Canada}}}
     178
     179%\corres{*Aaron Moss, \email{a3moss@uwaterloo.ca}}
     180\corres{*Peter A. Buhr, \email{pabuhr@uwaterloo.ca}}
     181\presentaddress{David R. Cheriton School of Computer Science, University of Waterloo, Waterloo, ON, N2L 3G1, Canada}
     182
     183% inline code @...@
     184\lstMakeShortInline@%
     185
     186
     187\abstract[Summary]{
    188188The C programming language is a foundational technology for modern computing with millions of lines of code implementing everything from commercial operating-systems to hobby projects.
    189189This installation base and the programmers producing it represent a massive software-engineering investment spanning decades and likely to continue for decades more.
     
    195195This paper presents a quick tour of \CFA features showing how their design avoids shortcomings of similar features in C and other C-like languages.
    196196Finally, experimental results are presented to validate several of the new features.
    197 \end{abstract}
     197}%
     198
     199\keywords{generic types, tuple types, variadic types, polymorphic functions, C, Cforall}
     200
     201\maketitle
    198202
    199203
     
    230234\CFA is currently implemented as a source-to-source translator from \CFA to the gcc-dialect of C~\cite{GCCExtensions}, allowing it to leverage the portability and code optimizations provided by gcc, meeting goals (1)--(3).
    231235Ultimately, a compiler is necessary for advanced features and optimal performance.
    232 All of the features discussed in this paper are working, unless a feature states it is a future feature for completion.
     236All features discussed in this paper are working, unless otherwise stated as under construction.
    233237
    234238Finally, it is impossible to describe a programming language without usages before definitions.
     
    258262
    259263\begin{cfa}
    260 int max = 2147483647;                                           $\C[3.75in]{// (1)}$
     264int max = 2147483647;                                   $\C[4in]{// (1)}$
    261265double max = 1.7976931348623157E+308;   $\C{// (2)}$
    262266int max( int a, int b ) { return a < b ? b : a; }  $\C{// (3)}$
    263267double max( double a, double b ) { return a < b ? b : a; }  $\C{// (4)}\CRT$
    264 max( 7, -max );                                                         $\C{// uses (3) and (1), by matching int from constant 7}$
    265 max( max, 3.14 );                                                       $\C{// uses (4) and (2), by matching double from constant 3.14}$
    266 max( max, -max );                                                       $\C{// ERROR: ambiguous}$
    267 int m = max( max, -max );                                       $\C{// uses (3) and (1) twice, by matching return type}$
     268max( 7, -max );                                         $\C[2.75in]{// uses (3) and (1), by matching int from constant 7}$
     269max( max, 3.14 );                                       $\C{// uses (4) and (2), by matching double from constant 3.14}$
     270max( max, -max );                                       $\C{// ERROR: ambiguous}$
     271int m = max( max, -max );                       $\C{// uses (3) and (1) twice, by matching return type}\CRT$
    268272\end{cfa}
    269273
     
    292296\begin{cfa}
    293297`forall( otype T )` T identity( T val ) { return val; }
    294 int forty_two = identity( 42 );                         $\C{// T is bound to int, forty\_two == 42}$
     298int forty_two = identity( 42 );         $\C{// T is bound to int, forty\_two == 42}$
    295299\end{cfa}
    296300This @identity@ function can be applied to any complete \newterm{object type} (or @otype@).
     
    306310For example, the function @twice@ can be defined using the \CFA syntax for operator overloading:
    307311\begin{cfa}
    308 forall( otype T `| { T ?+?(T, T); }` ) T twice( T x ) { return x `+` x; }       $\C{// ? denotes operands}$
     312forall( otype T `| { T ?+?(T, T); }` ) T twice( T x ) { return x `+` x; }  $\C{// ? denotes operands}$
    309313int val = twice( twice( 3.7 ) );
    310314\end{cfa}
     
    325329}
    326330double key = 5.0, vals[10] = { /* 10 sorted float values */ };
    327 double * val = (double *)bsearch( &key, vals, 10, sizeof(vals[0]), comp );      $\C{// search sorted array}$
     331double * val = (double *)bsearch( &key, vals, 10, sizeof(vals[0]), comp ); $\C{// search sorted array}$
    328332\end{cfa}
    329333which can be augmented simply with a generalized, type-safe, \CFA-overloaded wrappers:
     
    335339forall( otype T | { int ?<?( T, T ); } ) unsigned int bsearch( T key, const T * arr, size_t size ) {
    336340        T * result = bsearch( key, arr, size ); $\C{// call first version}$
    337         return result ? result - arr : size;    $\C{// pointer subtraction includes sizeof(T)}$
    338 }
    339 double * val = bsearch( 5.0, vals, 10 );        $\C{// selection based on return type}$
     341        return result ? result - arr : size; $\C{// pointer subtraction includes sizeof(T)}$
     342}
     343double * val = bsearch( 5.0, vals, 10 ); $\C{// selection based on return type}$
    340344int posn = bsearch( 5.0, vals, 10 );
    341345\end{cfa}
     
    361365forall( otype T | { int ?<?( T, T ); } ) void qsort( const T * arr, size_t size ) { /* use C qsort */ }
    362366{
    363         int ?<?( double x, double y ) { return x `>` y; }       $\C{// locally override behaviour}$
     367        int ?<?( double x, double y ) { return x `>` y; } $\C{// locally override behaviour}$
    364368        qsort( vals, size );                                    $\C{// descending sort}$
    365369}
     
    368372Hence, programmers can easily form local environments, adding and modifying appropriate functions, to maximize reuse of other existing functions and types.
    369373
    370 Unconstruction is a mechanism to distribute @forall@ over related routines/types (see @stack@ examples in Section~\ref{sec:eval}):
    371 \begin{cfa}
    372 forall( otype T ) {                                                     $\C{// forall block}$
    373         struct stack { stack_node(T) * head; }; $\C{// generic type}$
    374         void push( stack(T) & s, T value ) ...  $\C{// generic operations}$
    375         T pop( stack(T) & s ) ...
    376 }
    377 \end{cfa}
    378 Each block declaration is prefixed with the initial @forall@ clause significantly reducing duplication.
     374Under construction is a mechanism to distribute @forall@ over routines/types, where each block declaration is prefixed with the initial @forall@ clause significantly reducing duplication (see @stack@ examples in Section~\ref{sec:eval}):
     375\begin{cfa}
     376forall( otype `T` ) {                                                   $\C{// forall block}$
     377        struct stack { stack_node(`T`) * head; };       $\C{// generic type}$
     378        void push( stack(`T`) & s, `T` value ) ...      $\C{// generic operations}$
     379        T pop( stack(`T`) & s ) ...
     380}
     381\end{cfa}
    379382
    380383
     
    388391        T ?+=?( T *, T );
    389392        T ++?( T * );
    390         T ?++( T * ); };
    391 
     393        T ?++( T * );
     394};
    392395forall( otype T `| summable( T )` ) T sum( T a[$\,$], size_t size ) {  // use trait
    393396        `T` total = { `0` };                                    $\C{// instantiate T from 0 by calling its constructor}$
    394397        for ( unsigned int i = 0; i < size; i += 1 ) total `+=` a[i]; $\C{// select appropriate +}$
    395         return total; }
     398        return total;
     399}
    396400\end{cfa}
    397401
     
    402406        void ?{}( T &, T );                                             $\C{// copy constructor}$
    403407        void ?=?( T &, T );                                             $\C{// assignment operator}$
    404         void ^?{}( T & ); };                                    $\C{// destructor}$
     408        void ^?{}( T & );                                               $\C{// destructor}$
     409};
    405410\end{cfa}
    406411Given the information provided for an @otype@, variables of polymorphic type can be treated as if they were a complete type: stack-allocatable, default or copy-initialized, assigned, and deleted.
     
    654659p`->0` = 5;                                                                     $\C{// change quotient}$
    655660bar( qr`.1`, qr );                                                      $\C{// pass remainder and quotient/remainder}$
    656 rem = [div( 13, 5 ), 42]`.0.1`;                         $\C{// access 2nd component of 1st component of tuple expression}$
     661rem = [div( 13, 5 ), 42]`.0.1`;                         $\C{// access 2nd component of 1st component}$
    657662\end{cfa}
    658663
     
    663668Tuple flattening recursively expands a tuple into the list of its basic components.
    664669Tuple structuring packages a list of expressions into a value of tuple type, \eg:
    665 %\lstDeleteShortInline@%
    666 %\par\smallskip
    667 %\begin{tabular}{@{}l@{\hspace{1.5\parindent}}||@{\hspace{1.5\parindent}}l@{}}
    668670\begin{cfa}
    669671int f( int, int );
     
    672674[int, int] x;
    673675int y;
    674 f( x );                 $\C{// flatten}$
    675 g( y, 10 );             $\C{// structure}$
    676 h( x, y );              $\C{// flatten and structure}$
    677 \end{cfa}
    678 %\end{cfa}
    679 %&
    680 %\begin{cfa}
    681 %\end{tabular}
    682 %\smallskip\par\noindent
    683 %\lstMakeShortInline@%
     676f( x );                                                                         $\C{// flatten}$
     677g( y, 10 );                                                                     $\C{// structure}$
     678h( x, y );                                                                      $\C{// flatten and structure}$
     679\end{cfa}
    684680In the call to @f@, @x@ is implicitly flattened so the components of @x@ are passed as the two arguments.
    685681In the call to @g@, the values @y@ and @10@ are structured into a single argument of type @[int, int]@ to match the parameter type of @g@.
     
    692688An assignment where the left side is a tuple type is called \newterm{tuple assignment}.
    693689There are two kinds of tuple assignment depending on whether the right side of the assignment operator has a tuple type or a non-tuple type, called \newterm{multiple} and \newterm{mass assignment}, respectively.
    694 %\lstDeleteShortInline@%
    695 %\par\smallskip
    696 %\begin{tabular}{@{}l@{\hspace{1.5\parindent}}||@{\hspace{1.5\parindent}}l@{}}
    697690\begin{cfa}
    698691int x = 10;
     
    704697[y, x] = 3.14;                                                          $\C{// mass assignment}$
    705698\end{cfa}
    706 %\end{cfa}
    707 %&
    708 %\begin{cfa}
    709 %\end{tabular}
    710 %\smallskip\par\noindent
    711 %\lstMakeShortInline@%
    712699Both kinds of tuple assignment have parallel semantics, so that each value on the left and right side is evaluated before any assignments occur.
    713700As a result, it is possible to swap the values in two variables without explicitly creating any temporary variables or calling a function, \eg, @[x, y] = [y, x]@.
     
    733720Here, the mass assignment sets all members of @s@ to zero.
    734721Since tuple-index expressions are a form of member-access expression, it is possible to use tuple-index expressions in conjunction with member tuple expressions to manually restructure a tuple (\eg rearrange, drop, and duplicate components).
    735 %\lstDeleteShortInline@%
    736 %\par\smallskip
    737 %\begin{tabular}{@{}l@{\hspace{1.5\parindent}}||@{\hspace{1.5\parindent}}l@{}}
    738722\begin{cfa}
    739723[int, int, long, double] x;
     
    743727[int, int, int] y = x.[2, 0, 2];                        $\C{// duplicate: [y.0, y.1, y.2] = [x.2, x.0.x.2]}$
    744728\end{cfa}
    745 %\end{cfa}
    746 %&
    747 %\begin{cfa}
    748 %\end{tabular}
    749 %\smallskip\par\noindent
    750 %\lstMakeShortInline@%
    751729It is also possible for a member access to contain other member accesses, \eg:
    752730\begin{cfa}
     
    11461124\end{figure}
    11471125
    1148 Finally, @fallthrough@ may appear in contexts other than terminating a @case@ clause, and have an explicit transfer label allowing separate cases but common final-code for a set of cases:
    1149 \begin{cquote}
     1126Finally, Figure~\ref{f:FallthroughStatement} shows @fallthrough@ may appear in contexts other than terminating a @case@ clause, and have an explicit transfer label allowing separate cases but common final-code for a set of cases.
     1127The target label must be below the @fallthrough@, \ie @fallthrough@ cannot form a loop, and the label may not be nested in a control structure, \ie it must be at the same level as the @case@ clauses;
     1128the target label may be case @default@.
     1129
     1130\begin{figure}
     1131\centering
    11501132\lstDeleteShortInline@%
    11511133\begin{tabular}{@{}l@{\hspace{2\parindentlnth}}l@{}}
     
    11691151  case 4:
    11701152        ... `fallthrough common;`
    1171   common: // below fallthrough and at same level as case clauses
     1153  common: // below fallthrough at same level as case clauses
    11721154        ...      // common code for cases 3 and 4
    11731155        // implicit break
     
    11761158\end{tabular}
    11771159\lstMakeShortInline@%
    1178 \end{cquote}
    1179 The target label must be below the @fallthrough@, \ie @fallthrough@ cannot form a loop, and the label may not be nested in a control structure, \ie it must be at the same level as the @case@ clauses;
    1180 the target label may be case @default@.
     1160\caption{\lstinline|fallthrough| Statement}
     1161\label{f:FallthroughStatement}
     1162\end{figure}
    11811163
    11821164Collectively, these control-structure enhancements reduce programmer burden and increase readability and safety.
     
    13101292        R r;
    13111293        ... `resume( r );` ...
    1312         ... r.fix // control does return here after handler
     1294        ... r.fix // control returns here after handler
    13131295}
    13141296`try` {
     
    14231405
    14241406
    1425 \subsection{\texorpdfstring{\protect\lstinline{with} Clause / Statement}{with Clause / Statement}}
    1426 \label{s:WithClauseStatement}
     1407\subsection{\texorpdfstring{\protect\lstinline{with} Statement}{with Statement}}
     1408\label{s:WithStatement}
    14271409
    14281410Grouping heterogeneous data into \newterm{aggregate}s (structure/union) is a common programming practice, and an aggregate can be further organized into more complex structures, such as arrays and containers:
     
    14441426A similar situation occurs in object-oriented programming, \eg \CC:
    14451427\begin{C++}
    1446 class C {
     1428struct S {
    14471429        char c;                                                                 $\C{// fields}$
    14481430        int i;
    14491431        double d;
    1450         int f() {                                                               $\C{// implicit ``this'' aggregate}$
     1432        void f() {                                                              $\C{// implicit ``this'' aggregate}$
    14511433                `this->`c; `this->`i; `this->`d;        $\C{// access containing fields}$
    14521434        }
    14531435}
    14541436\end{C++}
    1455 Object-oriented nesting of member functions in a \lstinline[language=C++]@class@ allows eliding \lstinline[language=C++]@this->@ because of lexical scoping.
     1437Object-oriented nesting of member functions in a \lstinline[language=C++]@class/struct@ allows eliding \lstinline[language=C++]@this->@ because of lexical scoping.
    14561438However, for other aggregate parameters, qualification is necessary:
    14571439\begin{cfa}
    14581440struct T { double m, n; };
    1459 int C::f( T & t ) {                                                     $\C{// multiple aggregate parameters}$
    1460         c; i; d;                                                                $\C{\color{red}// this--{\small\textgreater}.c, this--{\small\textgreater}.i, this--{\small\textgreater}.d}$
     1441int S::f( T & t ) {                                                     $\C{// multiple aggregate parameters}$
     1442        c; i; d;                                                                $\C{\color{red}// this--{\textgreater}.c, this--{\textgreater}.i, this--{\textgreater}.d}$
    14611443        `t.`m; `t.`n;                                                   $\C{// must qualify}$
    14621444}
     
    14721454with the generality of opening multiple aggregate-parameters:
    14731455\begin{cfa}
    1474 int f( S & s, T & t ) `with ( s, t )` {         $\C{// multiple aggregate parameters}$
     1456void f( S & s, T & t ) `with ( s, t )` {                $\C{// multiple aggregate parameters}$
    14751457        c; i; d;                                                                $\C{\color{red}// s.c, s.i, s.d}$
    14761458        m; n;                                                                   $\C{\color{red}// t.m, t.n}$
     
    15381520\begin{cfa}
    15391521struct S { int i, j; } sv;
    1540 with ( sv ) {                                                           $\C{implicit reference}$
     1522with ( sv ) {                                                           $\C{// implicit reference}$
    15411523        S & sr = sv;
    1542         with ( sr ) {                                                   $\C{explicit reference}$
     1524        with ( sr ) {                                                   $\C{// explicit reference}$
    15431525                S * sp = &sv;
    1544                 with ( *sp ) {                                          $\C{computed reference}$
    1545                         i = 3; j = 4;                                   $\C{\color{red}// sp--{\small\textgreater}i, sp--{\small\textgreater}j}$
     1526                with ( *sp ) {                                          $\C{// computed reference}$
     1527                        i = 3; j = 4;                                   $\C{\color{red}// sp--{\textgreater}i, sp--{\textgreater}j}$
    15461528                }
    15471529                i = 2; j = 3;                                           $\C{\color{red}// sr.i, sr.j}$
     
    16091591\begin{cfa}
    16101592// array of 5 pointers to int
    1611 // pointer to an array of 5 int
    1612 // function returning pointer to an array of 5 int and taking an int
     1593// pointer to array of 5 int
     1594// function returning pointer to array of 5 int and taking int
    16131595\end{cfa}
    16141596\end{tabular}
     
    16871669\begin{cfa}
    16881670extern const * const int x;
    1689 static const * [ 5 ] const int y;
     1671static const * [5] const int y;
    16901672\end{cfa}
    16911673&
    16921674\begin{cfa}
    16931675int extern const * const x;
    1694 static const int (* const y)[ 5 ]
     1676static const int (* const y)[5]
    16951677\end{cfa}
    16961678&
     
    17261708as well, parameter names are optional, \eg:
    17271709\begin{cfa}
    1728 [ int x ] f ( /* void */ );                                     $\C{// returning int with no parameters}$
    1729 [ int x ] f (...);                                                      $\C{// returning int with unknown parameters}$
    1730 [ * int ] g ( int y );                                          $\C{// returning pointer to int with int parameter}$
    1731 [ void ] h ( int, char );                                       $\C{// returning no result with int and char parameters}$
    1732 [ * int, int ] j ( int );                                       $\C{// returning pointer to int and int, with int parameter}$
     1710[ int x ] f ( /* void */ );             $\C[2in]{// returning int with no parameters}$
     1711[ int x ] f (...);                              $\C{// returning int with unknown parameters}$
     1712[ * int ] g ( int y );                  $\C{// returning pointer to int with int parameter}$
     1713[ void ] h ( int, char );               $\C{// returning no result with int and char parameters}$
     1714[ * int, int ] j ( int );               $\C{// returning pointer to int and int with int parameter}$
    17331715\end{cfa}
    17341716This syntax allows a prototype declaration to be created by cutting and pasting source text from the function-definition header (or vice versa).
     
    17521734The syntax for pointers to \CFA functions specifies the pointer name on the right, \eg:
    17531735\begin{cfa}
    1754 * [ int x ] () fp;                                                      $\C{// pointer to function returning int with no parameters}$
    1755 * [ * int ] ( int y ) gp;                                       $\C{// pointer to function returning pointer to int with int parameter}$
    1756 * [ ] ( int, char ) hp;                                         $\C{// pointer to function returning no result with int and char parameters}$
    1757 * [ * int, int ] ( int ) jp;                            $\C{// pointer to function returning pointer to int and int, with int parameter}$
     1736* [ int x ] () fp;                              $\C{// pointer to function returning int with no parameters}$
     1737* [ * int ] ( int y ) gp;               $\C{// pointer to function returning pointer to int with int parameter}$
     1738* [ ] ( int, char ) hp;                 $\C{// pointer to function returning no result with int and char parameters}$
     1739* [ * int, int ] ( int ) jp;    $\C{// pointer to function returning pointer to int and int with int parameter}$
    17581740\end{cfa}
    17591741Note, a function name cannot be specified:
    17601742\begin{cfa}
    1761 * [ int x ] f () fp;                                            $\C{// function name "f" is disallowed}$
     1743* [ int x ] f () fp;                    $\C{// function name "f" is disallowed}\CRT$
    17621744\end{cfa}
    17631745
     
    21472129        return (W){ l.stones + r.stones };
    21482130}
    2149 W |?`st|( double w ) { return (W){ w }; }
    2150 W |?`lb|( double w ) { return (W){ w / 14.0 }; }
    2151 W |?`kg|( double w ) { return (W) { w * 0.16 }; }
     2131W |?`st|(double w) { return (W){ w }; }
     2132W |?`lb|(double w) { return (W){ w/14.0 }; }
     2133W |?`kg|(double w) { return (W){ w*0.16 }; }
    21522134
    21532135
     
    21722154        return W( l.stones + r.stones );
    21732155}
    2174 W |operator"" _st|( unsigned long long int w ) { return W( w ); }
    2175 W |operator"" _lb|( unsigned long long int w ) { return W( w / 14.0 ); }
    2176 W |operator"" _kg|( unsigned long long int w ) { return W( w * 0.16 ); }
    2177 W |operator"" _st|( long double w ) { return W( w ); }
    2178 W |operator"" _lb|( long double w ) { return W( w / 14.0 ); }
    2179 W |operator"" _kg|( long double w ) { return W( w * 0.16 ); }
     2156W |operator""_st|(unsigned long long int w) {return W(w); }
     2157W |operator""_lb|(unsigned long long int w) {return W(w/14.0); }
     2158W |operator""_kg|(unsigned long long int w) {return W(w*0.16); }
     2159W |operator""_st|(long double w ) { return W( w ); }
     2160W |operator""_lb|(long double w ) { return W( w / 14.0 ); }
     2161W |operator""_kg|(long double w ) { return W( w * 0.16 ); }
    21802162int main() {
    21812163        W w, heavy = { 20 };
     
    22102192\begin{cquote}
    22112193\lstDeleteShortInline@%
    2212 \begin{tabular}{@{}l@{\hspace{\parindentlnth}}l@{}}
    2213 \multicolumn{1}{c@{\hspace{\parindentlnth}}}{\textbf{Definition}}       & \multicolumn{1}{c}{\textbf{Usage}}    \\
     2194\begin{tabular}{@{}l@{\hspace{2\parindentlnth}}l@{}}
     2195\multicolumn{1}{c@{\hspace{2\parindentlnth}}}{\textbf{Definition}}      & \multicolumn{1}{c}{\textbf{Usage}}    \\
    22142196\begin{cfa}
    22152197const short int `MIN` = -32768;
     
    22292211\begin{cquote}
    22302212\lstDeleteShortInline@%
    2231 \lstset{basicstyle=\linespread{0.9}\sf\small}
    2232 \begin{tabular}{@{}l@{\hspace{0.5\parindentlnth}}l@{}}
    2233 \multicolumn{1}{c@{\hspace{0.5\parindentlnth}}}{\textbf{\CFA}}  & \multicolumn{1}{c}{\textbf{C}}        \\
     2213\begin{tabular}{@{}l@{\hspace{2\parindentlnth}}l@{}}
     2214\multicolumn{1}{c@{\hspace{2\parindentlnth}}}{\textbf{\CFA}}    & \multicolumn{1}{c}{\textbf{C}}        \\
    22342215\begin{cfa}
    22352216MIN
     2217
    22362218MAX
     2219
    22372220PI
    22382221E
     
    22402223&
    22412224\begin{cfa}
    2242 SCHAR_MIN, CHAR_MIN, SHRT_MIN, INT_MIN, LONG_MIN, LLONG_MIN, FLT_MIN, DBL_MIN, LDBL_MIN
    2243 SCHAR_MAX, UCHAR_MAX, SHRT_MAX, INT_MAX, LONG_MAX, LLONG_MAX, FLT_MAX, DBL_MAX, LDBL_MAX
     2225SCHAR_MIN, CHAR_MIN, SHRT_MIN, INT_MIN, LONG_MIN, LLONG_MIN,
     2226                FLT_MIN, DBL_MIN, LDBL_MIN
     2227SCHAR_MAX, UCHAR_MAX, SHRT_MAX, INT_MAX, LONG_MAX, LLONG_MAX,
     2228                FLT_MAX, DBL_MAX, LDBL_MAX
    22442229M_PI, M_PIl
    22452230M_E, M_El
     
    22562241\begin{cquote}
    22572242\lstDeleteShortInline@%
    2258 \begin{tabular}{@{}l@{\hspace{\parindentlnth}}l@{}}
    2259 \multicolumn{1}{c@{\hspace{\parindentlnth}}}{\textbf{Definition}}       & \multicolumn{1}{c}{\textbf{Usage}}    \\
     2243\begin{tabular}{@{}l@{\hspace{2\parindentlnth}}l@{}}
     2244\multicolumn{1}{c@{\hspace{2\parindentlnth}}}{\textbf{Definition}}      & \multicolumn{1}{c}{\textbf{Usage}}    \\
    22602245\begin{cfa}
    22612246float `log`( float x );
     
    22752260\begin{cquote}
    22762261\lstDeleteShortInline@%
    2277 \begin{tabular}{@{}l@{\hspace{\parindentlnth}}l@{}}
    2278 \multicolumn{1}{c@{\hspace{\parindentlnth}}}{\textbf{\CFA}}     & \multicolumn{1}{c}{\textbf{C}}        \\
     2262\begin{tabular}{@{}l@{\hspace{2\parindentlnth}}l@{}}
     2263\multicolumn{1}{c@{\hspace{2\parindentlnth}}}{\textbf{\CFA}}    & \multicolumn{1}{c}{\textbf{C}}        \\
    22792264\begin{cfa}
    22802265log
     
    23032288\begin{cquote}
    23042289\lstDeleteShortInline@%
    2305 \begin{tabular}{@{}l@{\hspace{\parindentlnth}}l@{}}
    2306 \multicolumn{1}{c@{\hspace{\parindentlnth}}}{\textbf{Definition}}       & \multicolumn{1}{c}{\textbf{Usage}}    \\
     2290\begin{tabular}{@{}l@{\hspace{2\parindentlnth}}l@{}}
     2291\multicolumn{1}{c@{\hspace{2\parindentlnth}}}{\textbf{Definition}}      & \multicolumn{1}{c}{\textbf{Usage}}    \\
    23072292\begin{cfa}
    23082293unsigned int `abs`( int );
     
    23222307\begin{cquote}
    23232308\lstDeleteShortInline@%
    2324 \begin{tabular}{@{}l@{\hspace{\parindentlnth}}l@{}}
    2325 \multicolumn{1}{c@{\hspace{\parindentlnth}}}{\textbf{\CFA}}     & \multicolumn{1}{c}{\textbf{C}}        \\
     2309\begin{tabular}{@{}l@{\hspace{2\parindentlnth}}l@{}}
     2310\multicolumn{1}{c@{\hspace{2\parindentlnth}}}{\textbf{\CFA}}    & \multicolumn{1}{c}{\textbf{C}}        \\
    23262311\begin{cfa}
    23272312abs
     
    24142399ip = (int *)malloc( sizeof( int ) ); memset( ip, fill, dim * sizeof( int ) );
    24152400ip = (int *)realloc( ip, 2 * dim * sizeof( int ) );
    2416 ip = (int *)realloc( ip, 4 * dim * sizeof( int ) ); memset( ip, fill, 4 * dim * sizeof( int ) );
    2417 
     2401ip = (int *)realloc( ip, 4 * dim * sizeof( int ) );
     2402                        memset( ip, fill, 4 * dim * sizeof( int ) );
    24182403ip = memalign( 16, sizeof( int ) );
    24192404ip = memalign( 16, sizeof( int ) ); memset( ip, fill, sizeof( int ) );
     
    27882773\section{Acknowledgments}
    27892774
    2790 The authors would like to recognize the design assistance of Glen Ditchfield, Richard Bilson, Thierry Delisle, and Andrew Beach on the features described in this paper, and thank Magnus Madsen for feedback in the writing.
    2791 This work is supported through a corporate partnership with Huawei Ltd.\ (\url{http://www.huawei.com}), and Aaron Moss and Peter Buhr are partially funded by the Natural Sciences and Engineering Research Council of Canada.
    2792 
    2793 % the first author's \grantsponsor{NSERC-PGS}{NSERC PGS D}{http://www.nserc-crsng.gc.ca/Students-Etudiants/PG-CS/BellandPostgrad-BelletSuperieures_eng.asp} scholarship.
    2794 
    2795 
    2796 \bibliographystyle{plain}
     2775The authors would like to recognize the design assistance of Glen Ditchfield, Richard Bilson, Thierry Delisle, Andrew Beach and Brice Dobry on the features described in this paper, and thank Magnus Madsen for feedback on the writing.
     2776This work is supported by a corporate partnership with Huawei Ltd.\ (\url{http://www.huawei.com}), and Aaron Moss and Peter Buhr are partially funded by the Natural Sciences and Engineering Research Council of Canada.
     2777
     2778
    27972779\bibliography{pl}
    27982780
     
    28022784\section{Benchmark Stack Implementation}
    28032785\label{sec:BenchmarkStackImplementation}
    2804 
    2805 \lstset{basicstyle=\linespread{0.9}\sf\small}
    28062786
    28072787Throughout, @/***/@ designates a counted redundant type annotation; code reformatted for brevity.
Note: See TracChangeset for help on using the changeset viewer.