- Timestamp:
- Sep 18, 2018, 5:01:11 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- e523b07
- Parents:
- 56b53b2 (diff), 91a950c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- doc
- Files:
-
- 5 added
- 5 deleted
- 2 edited
- 102 moved
-
bibliography/pl.bib (modified) (7 diffs)
-
theses/aaron_moss/phd/Makefile (deleted)
-
theses/aaron_moss/phd/aaron-thesis.bib (deleted)
-
theses/aaron_moss/phd/background.tex (deleted)
-
theses/aaron_moss/phd/conclusion.tex (deleted)
-
theses/aaron_moss/phd/generic-types.tex (deleted)
-
theses/aaron_moss_PhD/comp_II/.gitignore (moved) (moved from doc/theses/aaron_moss/comp_II/.gitignore )
-
theses/aaron_moss_PhD/comp_II/Efficient Type Resolution in Cforall.pptx (moved) (moved from doc/theses/aaron_moss/comp_II/Efficient Type Resolution in Cforall.pptx )
-
theses/aaron_moss_PhD/comp_II/Makefile (moved) (moved from doc/theses/aaron_moss/comp_II/Makefile )
-
theses/aaron_moss_PhD/comp_II/comp_II.tex (moved) (moved from doc/theses/aaron_moss/comp_II/comp_II.tex )
-
theses/aaron_moss_PhD/comp_II/conversion_dag.eps (moved) (moved from doc/theses/aaron_moss/comp_II/conversion_dag.eps )
-
theses/aaron_moss_PhD/comp_II/conversion_dag.odg (moved) (moved from doc/theses/aaron_moss/comp_II/conversion_dag.odg )
-
theses/aaron_moss_PhD/comp_II/conversion_dag.png (moved) (moved from doc/theses/aaron_moss/comp_II/conversion_dag.png )
-
theses/aaron_moss_PhD/comp_II/resolution_dag.eps (moved) (moved from doc/theses/aaron_moss/comp_II/resolution_dag.eps )
-
theses/aaron_moss_PhD/comp_II/resolution_dag.odg (moved) (moved from doc/theses/aaron_moss/comp_II/resolution_dag.odg )
-
theses/aaron_moss_PhD/comp_II/resolution_dag.png (moved) (moved from doc/theses/aaron_moss/comp_II/resolution_dag.png )
-
theses/aaron_moss_PhD/comp_II/resolution_dag2.odg (moved) (moved from doc/theses/aaron_moss/comp_II/resolution_dag2.odg )
-
theses/aaron_moss_PhD/comp_II/resolution_dag2.png (moved) (moved from doc/theses/aaron_moss/comp_II/resolution_dag2.png )
-
theses/aaron_moss_PhD/phd/.gitignore (moved) (moved from doc/theses/aaron_moss/phd/.gitignore )
-
theses/aaron_moss_PhD/phd/Makefile (added)
-
theses/aaron_moss_PhD/phd/background.tex (added)
-
theses/aaron_moss_PhD/phd/cfa-macros.tex (added)
-
theses/aaron_moss_PhD/phd/conclusion.tex (added)
-
theses/aaron_moss_PhD/phd/frontpgs.tex (moved) (moved from doc/theses/aaron_moss/phd/frontpgs.tex )
-
theses/aaron_moss_PhD/phd/generic-types.tex (added)
-
theses/aaron_moss_PhD/phd/introduction.tex (moved) (moved from doc/theses/aaron_moss/phd/introduction.tex ) (3 diffs)
-
theses/aaron_moss_PhD/phd/macros.tex (moved) (moved from doc/theses/aaron_moss/phd/macros.tex ) (1 diff)
-
theses/aaron_moss_PhD/phd/resolution-heuristics.tex (moved) (moved from doc/theses/aaron_moss/phd/resolution-heuristics.tex ) (1 diff)
-
theses/aaron_moss_PhD/phd/thesis.tex (moved) (moved from doc/theses/aaron_moss/phd/thesis.tex ) (2 diffs)
-
theses/aaron_moss_PhD/phd/type-environment.tex (moved) (moved from doc/theses/aaron_moss/phd/type-environment.tex )
-
theses/rob_schluntz_MMath/.gitignore (moved) (moved from doc/theses/rob_schluntz/.gitignore )
-
theses/rob_schluntz_MMath/Makefile (moved) (moved from doc/theses/rob_schluntz/Makefile )
-
theses/rob_schluntz_MMath/cfa-format.tex (moved) (moved from doc/theses/rob_schluntz/cfa-format.tex )
-
theses/rob_schluntz_MMath/conclusions.tex (moved) (moved from doc/theses/rob_schluntz/conclusions.tex )
-
theses/rob_schluntz_MMath/ctordtor.tex (moved) (moved from doc/theses/rob_schluntz/ctordtor.tex )
-
theses/rob_schluntz_MMath/examples/conclusions/dtor.c (moved) (moved from doc/theses/rob_schluntz/examples/conclusions/dtor.c )
-
theses/rob_schluntz_MMath/examples/conclusions/except.c (moved) (moved from doc/theses/rob_schluntz/examples/conclusions/except.c )
-
theses/rob_schluntz_MMath/examples/conclusions/except.cc (moved) (moved from doc/theses/rob_schluntz/examples/conclusions/except.cc )
-
theses/rob_schluntz_MMath/examples/ctor/array_ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/array_ctor.c )
-
theses/rob_schluntz_MMath/examples/ctor/copy_ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/copy_ctor.c )
-
theses/rob_schluntz_MMath/examples/ctor/cv_ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/cv_ctor.c )
-
theses/rob_schluntz_MMath/examples/ctor/enum_ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/enum_ctor.c )
-
theses/rob_schluntz_MMath/examples/ctor/expr_ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/expr_ctor.c )
-
theses/rob_schluntz_MMath/examples/ctor/global_ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/global_ctor.c )
-
theses/rob_schluntz_MMath/examples/ctor/hide_ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/hide_ctor.c )
-
theses/rob_schluntz_MMath/examples/ctor/member.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/member.c )
-
theses/rob_schluntz_MMath/examples/ctor/placement_ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/placement_ctor.c )
-
theses/rob_schluntz_MMath/examples/ctor/return_dtor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/return_dtor.c )
-
theses/rob_schluntz_MMath/examples/ctor/static_ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/static_ctor.c )
-
theses/rob_schluntz_MMath/examples/ctor/union_ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/ctor/union_ctor.c )
-
theses/rob_schluntz_MMath/examples/intro/FileOutputStream.java (moved) (moved from doc/theses/rob_schluntz/examples/intro/FileOutputStream.java )
-
theses/rob_schluntz_MMath/examples/intro/compound_lit.c (moved) (moved from doc/theses/rob_schluntz/examples/intro/compound_lit.c )
-
theses/rob_schluntz_MMath/examples/intro/designation.c (moved) (moved from doc/theses/rob_schluntz/examples/intro/designation.c )
-
theses/rob_schluntz_MMath/examples/intro/ignore.c (moved) (moved from doc/theses/rob_schluntz/examples/intro/ignore.c )
-
theses/rob_schluntz_MMath/examples/intro/ires.java (moved) (moved from doc/theses/rob_schluntz/examples/intro/ires.java )
-
theses/rob_schluntz_MMath/examples/intro/res.java (moved) (moved from doc/theses/rob_schluntz/examples/intro/res.java )
-
theses/rob_schluntz_MMath/examples/intro/res1.java (moved) (moved from doc/theses/rob_schluntz/examples/intro/res1.java )
-
theses/rob_schluntz_MMath/examples/intro/res2.java (moved) (moved from doc/theses/rob_schluntz/examples/intro/res2.java )
-
theses/rob_schluntz_MMath/examples/intro/res3.java (moved) (moved from doc/theses/rob_schluntz/examples/intro/res3.java )
-
theses/rob_schluntz_MMath/examples/intro/tuple.cc (moved) (moved from doc/theses/rob_schluntz/examples/intro/tuple.cc )
-
theses/rob_schluntz_MMath/examples/intro/variadic.java (moved) (moved from doc/theses/rob_schluntz/examples/intro/variadic.java )
-
theses/rob_schluntz_MMath/examples/malloc.cc (moved) (moved from doc/theses/rob_schluntz/examples/malloc.cc )
-
theses/rob_schluntz_MMath/examples/nested.c (moved) (moved from doc/theses/rob_schluntz/examples/nested.c )
-
theses/rob_schluntz_MMath/examples/poly.c (moved) (moved from doc/theses/rob_schluntz/examples/poly.c )
-
theses/rob_schluntz_MMath/examples/scope_guard.h (moved) (moved from doc/theses/rob_schluntz/examples/scope_guard.h )
-
theses/rob_schluntz_MMath/examples/test_scoped_guard.c (moved) (moved from doc/theses/rob_schluntz/examples/test_scoped_guard.c )
-
theses/rob_schluntz_MMath/examples/tuples/assign.c (moved) (moved from doc/theses/rob_schluntz/examples/tuples/assign.c )
-
theses/rob_schluntz_MMath/examples/tuples/cast.c (moved) (moved from doc/theses/rob_schluntz/examples/tuples/cast.c )
-
theses/rob_schluntz_MMath/examples/tuples/ctor.c (moved) (moved from doc/theses/rob_schluntz/examples/tuples/ctor.c )
-
theses/rob_schluntz_MMath/examples/tuples/mrv.c (moved) (moved from doc/theses/rob_schluntz/examples/tuples/mrv.c )
-
theses/rob_schluntz_MMath/examples/tuples/mrv_1.c (moved) (moved from doc/theses/rob_schluntz/examples/tuples/mrv_1.c )
-
theses/rob_schluntz_MMath/examples/tuples/mrv_2.c (moved) (moved from doc/theses/rob_schluntz/examples/tuples/mrv_2.c )
-
theses/rob_schluntz_MMath/examples/tuples/mrv_3.c (moved) (moved from doc/theses/rob_schluntz/examples/tuples/mrv_3.c )
-
theses/rob_schluntz_MMath/examples/tuples/named.c (moved) (moved from doc/theses/rob_schluntz/examples/tuples/named.c )
-
theses/rob_schluntz_MMath/examples/variadic/new.c (moved) (moved from doc/theses/rob_schluntz/examples/variadic/new.c )
-
theses/rob_schluntz_MMath/examples/variadic/print.c (moved) (moved from doc/theses/rob_schluntz/examples/variadic/print.c )
-
theses/rob_schluntz_MMath/examples/variadic/sum1.c (moved) (moved from doc/theses/rob_schluntz/examples/variadic/sum1.c )
-
theses/rob_schluntz_MMath/examples/variadic/sum2.c (moved) (moved from doc/theses/rob_schluntz/examples/variadic/sum2.c )
-
theses/rob_schluntz_MMath/intro.tex (moved) (moved from doc/theses/rob_schluntz/intro.tex )
-
theses/rob_schluntz_MMath/thesis-frontpgs.tex (moved) (moved from doc/theses/rob_schluntz/thesis-frontpgs.tex )
-
theses/rob_schluntz_MMath/thesis.bib (moved) (moved from doc/theses/rob_schluntz/thesis.bib )
-
theses/rob_schluntz_MMath/thesis.tex (moved) (moved from doc/theses/rob_schluntz/thesis.tex )
-
theses/rob_schluntz_MMath/tuples.tex (moved) (moved from doc/theses/rob_schluntz/tuples.tex )
-
theses/rob_schluntz_MMath/variadic.tex (moved) (moved from doc/theses/rob_schluntz/variadic.tex )
-
theses/thierry_delisle_MMath/.gitignore (moved) (moved from doc/theses/thierry_delisle/.gitignore )
-
theses/thierry_delisle_MMath/Makefile (moved) (moved from doc/theses/thierry_delisle/Makefile )
-
theses/thierry_delisle_MMath/annex/glossary.tex (moved) (moved from doc/theses/thierry_delisle/annex/glossary.tex )
-
theses/thierry_delisle_MMath/annex/local.bib (moved) (moved from doc/theses/thierry_delisle/annex/local.bib )
-
theses/thierry_delisle_MMath/figures/dependency.fig (moved) (moved from doc/theses/thierry_delisle/figures/dependency.fig )
-
theses/thierry_delisle_MMath/figures/ext_monitor.fig (moved) (moved from doc/theses/thierry_delisle/figures/ext_monitor.fig )
-
theses/thierry_delisle_MMath/figures/int_monitor.fig (moved) (moved from doc/theses/thierry_delisle/figures/int_monitor.fig )
-
theses/thierry_delisle_MMath/figures/monitor.fig (moved) (moved from doc/theses/thierry_delisle/figures/monitor.fig )
-
theses/thierry_delisle_MMath/figures/monitor_structs.fig (moved) (moved from doc/theses/thierry_delisle/figures/monitor_structs.fig )
-
theses/thierry_delisle_MMath/figures/system.fig (moved) (moved from doc/theses/thierry_delisle/figures/system.fig )
-
theses/thierry_delisle_MMath/notes/cor-thread-traits.c (moved) (moved from doc/theses/thierry_delisle/notes/cor-thread-traits.c )
-
theses/thierry_delisle_MMath/notes/lit-review.md (moved) (moved from doc/theses/thierry_delisle/notes/lit-review.md )
-
theses/thierry_delisle_MMath/notes/notes.md (moved) (moved from doc/theses/thierry_delisle/notes/notes.md )
-
theses/thierry_delisle_MMath/style/cfa-format.tex (moved) (moved from doc/theses/thierry_delisle/style/cfa-format.tex )
-
theses/thierry_delisle_MMath/style/style.tex (moved) (moved from doc/theses/thierry_delisle/style/style.tex )
-
theses/thierry_delisle_MMath/text/basics.tex (moved) (moved from doc/theses/thierry_delisle/text/basics.tex )
-
theses/thierry_delisle_MMath/text/cforall.tex (moved) (moved from doc/theses/thierry_delisle/text/cforall.tex )
-
theses/thierry_delisle_MMath/text/concurrency.tex (moved) (moved from doc/theses/thierry_delisle/text/concurrency.tex )
-
theses/thierry_delisle_MMath/text/frontpgs.tex (moved) (moved from doc/theses/thierry_delisle/text/frontpgs.tex )
-
theses/thierry_delisle_MMath/text/future.tex (moved) (moved from doc/theses/thierry_delisle/text/future.tex )
-
theses/thierry_delisle_MMath/text/internals.tex (moved) (moved from doc/theses/thierry_delisle/text/internals.tex )
-
theses/thierry_delisle_MMath/text/intro.tex (moved) (moved from doc/theses/thierry_delisle/text/intro.tex )
-
theses/thierry_delisle_MMath/text/parallelism.tex (moved) (moved from doc/theses/thierry_delisle/text/parallelism.tex )
-
theses/thierry_delisle_MMath/text/results.tex (moved) (moved from doc/theses/thierry_delisle/text/results.tex )
-
theses/thierry_delisle_MMath/text/together.tex (moved) (moved from doc/theses/thierry_delisle/text/together.tex )
-
theses/thierry_delisle_MMath/thePlan.md (moved) (moved from doc/theses/thierry_delisle/thePlan.md )
-
theses/thierry_delisle_MMath/thesis.tex (moved) (moved from doc/theses/thierry_delisle/thesis.tex )
-
theses/thierry_delisle_MMath/version (moved) (moved from doc/theses/thierry_delisle/version )
-
theses/thierry_delisle_MMath/version.sh (moved) (moved from doc/theses/thierry_delisle/version.sh )
-
user/user.tex (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/bibliography/pl.bib
r56b53b2 r72b0573 939 939 title = {\textsf{C}$\mathbf{\forall}$ : Adding Modern Programming Language Features to C}, 940 940 year = 2018, 941 month = aug, 941 942 journal = spe, 942 note = { Accepted, to appear},943 note = {http://dx.doi.org/10.1002/spe.2624}, 943 944 } 944 945 … … 962 963 comment = { 963 964 The evidence given is thin. 964 } 965 }, 965 966 } 966 967 … … 1580 1581 1581 1582 @mastersthesis{Delisle18, 1582 author = {Thierry Delisle },1583 author = {Thierry Delisle}, 1583 1584 title = {Concurrency in \textsf{C}$\mathbf{\forall}$}, 1584 1585 school = {School of Computer Science, University of Waterloo}, … … 1827 1828 key = {Peter Buhr}, 1828 1829 title = {CS343}, 1829 year = 201 7,1830 year = 2018, 1830 1831 howpublished= {\href{https://www.student.cs.uwaterloo.ca/~cs343}{https://\-www.student.cs.uwaterloo.ca/\-~cs343}}, 1831 1832 } … … 3362 3363 author = {Peter Buhr and David Dice and Wim H. Hesselink}, 3363 3364 journal = ccpe, 3364 volume opt= 30,3365 number opt = 4,3365 volume = 30, 3366 number = 18, 3366 3367 year = 2018, 3367 month = may,3368 month = sep, 3368 3369 publisher = {John Wiley \& Sons}, 3369 3370 note = {\url{https://doi-org.proxy.lib.uwaterloo.ca/10.1002/cpe.4475}} … … 3849 3850 keywords = {concurrency, critical section}, 3850 3851 contributer = {pabuhr@plg}, 3851 author = {Dominic Duggan and G .V. Cormack and John Ophel},3852 author = {Dominic Duggan and Gordon V. Cormack and John Ophel}, 3852 3853 title = {Kinded Type Inference for Parametric Overloading}, 3853 3854 journal = acta, … … 5855 5856 keywords = {Cyclone, existential types, polymorphism, type variables}, 5856 5857 contributer = {a3moss@plg}, 5857 author = {D .Grossman},5858 author = {Dan Grossman}, 5858 5859 title = {Quantified Types in an Imperative Language}, 5859 5860 journal = toplas, -
doc/theses/aaron_moss_PhD/phd/introduction.tex
r56b53b2 r72b0573 4 4 In the 30 years since its first standardization, it has consistently been one of the most popular programming languages, with millions of lines of C code still in active use, and tens of thousands of trained programmers producing it. The TIOBE index\cite{TIOBE} tracks popularity of programming languages over time, and C has never dropped below second place: 5 5 6 \begin{table} 6 \begin{table}[h] 7 7 \label{tiobe-table} 8 8 \caption[TIOBE index over time]{Current top 5 places in the TIOBE index averaged over years} … … 20 20 21 21 The impact of C on programming language design is also obvious from Table~\ref{tiobe-table}; with the exception of Python, all of the top five languages use C-like syntax and procedural control structures. 22 \CC is even a largely backwards-compatible extension of C, with development dating back nearly as far as C itself.22 \CC{} is even a largely backwards-compatible extension of C, with development dating back nearly as far as C itself. 23 23 Though its lasting popularity and wide impact on programming language design point to the continued relevance of C, they also highlight the widespread desire of programmers for languages with more expressive power and programmer-friendly features; accommodating both low-impact maintenance of legacy C code and low-effort development of the software of the future is a difficult task for a single programming language. 24 24 … … 30 30 This thesis is focused on making \CFA{} a more powerful and expressive language, both by adding new features to the \CFA{} type system and ensuring that both added and existing features can be efficiently implemented in \CFACC{}, the \CFA{} reference compiler. 31 31 Particular contributions of this work include design and implementation of 32 parametric-polymorphic (``generic'') types in a manner compatible with the existing polymorphism design of \CFA{} (Chapter~\ref{generic-chap}), a type environment data structure based on a novel variant of the union-find algorithm (Chapter~\ref{env-chap}), and a new expression resolution algorithm designed to quickly locate the optimal declarations for a \CFA{} declaration (Chapter~\ref{resolution-chap}).32 parametric-polymorphic (``generic'') types in a manner compatible with the existing polymorphism design of \CFA{} (Chapter~\ref{generic-chap}), a type environment data structure based on a novel variant of the union-find algorithm (Chapter~\ref{env-chap}), and a new expression resolution algorithm designed to quickly locate the optimal declarations for a \CFA{} expression (Chapter~\ref{resolution-chap}). 33 33 This expression resolution algorithm was designed with the aid of a purpose-built prototype system which encapsulates the essential aspects of the \CFA{} type system without incurring the technical debt of the existing system or the friction-inducing necessity of maintaining a working compiler; the goal of this prototype system was to discover effective heuristics to avoid performing unnecessary work in the process of locating the optimal \CFA{} expression resolution. 34 34 35 35 Though the direction and validation of this work was fairly narrowly focused on the \CFA{} programming language, the tools used and results obtained should be of interest to a wider compiler and programming language design community. 36 36 In particular, with the addition of \emph{concepts} in \CCtwenty{}, conforming \CC{} compilers must support a model of type assertions very similar to that in \CFA{}, and the algorithmic techniques used in the expression resolution algorithm presented here may prove useful. 37 Type environments are also widely modelled in compiler implementations, particularly of functional languages, though also increasingly commonly in other languages (such as Rust) which alsoperform type inference; the type environment presented here may be useful to those language implementers.37 Type environments are also widely modelled in compiler implementations, particularly of functional languages, though also increasingly commonly in other languages (such as Rust) which perform type inference; the type environment presented here may be useful to those language implementers. -
doc/theses/aaron_moss_PhD/phd/macros.tex
r56b53b2 r72b0573 20 20 21 21 \newcommand{\TODO}[1]{\textbf{TODO:} \textit{#1}} 22 \newcommand{\cit}{\textsuperscript{[citation needed]}} -
doc/theses/aaron_moss_PhD/phd/resolution-heuristics.tex
r56b53b2 r72b0573 3 3 4 4 Talk about the resolution heuristics. This is the bulk of the thesis. 5 6 % Discuss changes to cost model, as promised in Ch. 2 -
doc/theses/aaron_moss_PhD/phd/thesis.tex
r56b53b2 r72b0573 57 57 urlcolor=black} 58 58 }{} % end of ifthenelse (no else) 59 60 \input{cfa-macros} % must be loaded after hyperref 59 61 60 62 % \usepackage[automake,toc,abbreviations]{glossaries-extra} % Exception to the rule of hyperref being the last add-on package … … 139 141 \addcontentsline{toc}{chapter}{\textbf{References}} 140 142 141 \bibliography{ aaron-thesis}143 \bibliography{pl} 142 144 % Tip 5: You can create multiple .bib files to organize your references. 143 145 % Just list them all in the \bibliogaphy command, separated by commas (no spaces). -
doc/user/user.tex
r56b53b2 r72b0573 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Thu Jul 26 17:29:05201814 %% Update Count : 33 6613 %% Last Modified On : Fri Aug 31 07:54:50 2018 14 %% Update Count : 3396 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 210 210 Even with all its problems, C continues to be popular because it allows writing software at virtually any level in a computer system without restriction. 211 211 For system programming, where direct access to hardware, storage management, and real-time issues are a requirement, C is usually the only language of choice. 212 The TIOBE index~\cite{TIOBE} for July 2018 ranks the top 5 most \emph{popular} programming languages as:\Index*{Java} 16\%, C 14\%, \Index*[C++]{\CC{}} 7.5\%, Python 6\%, Visual Basic 4\% = 47.5\%, where the next 50 languages are less than 4\% each, with a long tail.212 The TIOBE index~\cite{TIOBE} for July 2018 ranks the top five most \emph{popular} programming languages as \Index*{Java} 16\%, C 14\%, \Index*[C++]{\CC{}} 7.5\%, Python 6\%, Visual Basic 4\% = 47.5\%, where the next 50 languages are less than 4\% each, with a long tail. 213 213 The top 3 rankings over the past 30 years are: 214 214 \begin{center} … … 351 351 The 2011 C standard plus GNU extensions. 352 352 \item 353 \Indexc[deletekeywords=inline]{-fgnu89-inline}\index{compilation option!-fgnu89-inline@{\lstinline[deletekeywords=inline] @-fgnu89-inline@}}353 \Indexc[deletekeywords=inline]{-fgnu89-inline}\index{compilation option!-fgnu89-inline@{\lstinline[deletekeywords=inline]$-fgnu89-inline$}} 354 354 Use the traditional GNU semantics for inline routines in C11 mode, which allows inline routines in header files. 355 355 \end{description} … … 455 455 #endif 456 456 457 ®#include_next <bfdlink.h> §\C{// must have internal check for multiple expansion}§457 ®#include_next <bfdlink.h> §\C{// must have internal check for multiple expansion}§ 458 458 ® 459 459 #if defined( with ) && defined( __CFA_BFD_H__ ) §\C{// reset only if set}§ … … 504 504 505 505 C, \CC, and Java (and many other programming languages) have no exponentiation operator\index{exponentiation!operator}\index{operator!exponentiation}, \ie $x^y$, and instead use a routine, like \Indexc{pow}, to perform the exponentiation operation. 506 \CFA extends the basic operators with the exponentiation operator ©?\?©\index{?\\?@ \lstinline@?\?@} and ©?\=?©\index{?\\=?@\lstinline@?\=?@}, as in, ©x \ y© and ©x \= y©, which means $x^y$ and $x \leftarrow x^y$.506 \CFA extends the basic operators with the exponentiation operator ©?\?©\index{?\\?@©?\?©} and ©?\=?©\index{?\\=?@©\=?©}, as in, ©x \ y© and ©x \= y©, which means $x^y$ and $x \leftarrow x^y$. 507 507 The priority of the exponentiation operator is between the cast and multiplicative operators, so that ©w * (int)x \ (int)y * z© is parenthesized as ©((w * (((int)x) \ ((int)y))) * z)©. 508 508 … … 516 516 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i 517 517 \end{cfa} 518 Parenthesis are necessary for the complex constants or the expression is parsed as ©1.0f+(2.0fi \ 3.0f)+2.0fi©.518 Parenthesis are necessary for complex constants or the expression is parsed as ©1.0f+®(®2.0fi \ 3.0f®)®+2.0fi©. 519 519 The exponentiation operator is available for all the basic types, but for user-defined types, only the integral-computation versions are available. 520 520 For returning an integral value, the user type ©T© must define multiplication, ©*©, and one, ©1©; … … 527 527 528 528 529 %\subsection{\texorpdfstring{\protect\lstinline@if@ Statement}{if Statement}} 530 \subsection{\texorpdfstring{\LstKeywordStyle{if} Statement}{if Statement}} 531 532 The ©if© expression allows declarations, similar to ©for© declaration expression: 533 \begin{cfa} 534 if ( int x = f() ) ... §\C{// x != 0}§ 535 if ( int x = f(), y = g() ) ... §\C{// x != 0 \&\& y != 0}§ 536 if ( int x = f(), y = g(); ®x < y® ) ... §\C{// relational expression}§ 537 \end{cfa} 538 Unless a relational expression is specified, each variable is compared not equal to 0, which is the standard semantics for the ©if© expression, and the results are combined using the logical ©&&© operator.\footnote{\CC only provides a single declaration always compared not equal to 0.} 529 %\subsection{\texorpdfstring{\protect\lstinline@if@/\protect\lstinline@while@ Statement}{if Statement}} 530 \subsection{\texorpdfstring{\LstKeywordStyle{if}/\LstKeywordStyle{while} Statement}{if/while Statement}} 531 532 The ©if©/©while© expression allows declarations, similar to ©for© declaration expression. 533 (Does not make sense for ©do©-©while©.) 534 \begin{cfa} 535 if ( ®int x = f()® ) ... §\C{// x != 0}§ 536 if ( ®int x = f(), y = g()® ) ... §\C{// x != 0 \&\& y != 0}§ 537 if ( ®int x = f(), y = g(); x < y® ) ... §\C{// relational expression}§ 538 if ( ®struct S { int i; } x = { f() }; x.i < 4® ) §\C{// relational expression}§ 539 540 while ( ®int x = f()® ) ... §\C{// x != 0}§ 541 while ( ®int x = f(), y = g()® ) ... §\C{// x != 0 \&\& y != 0}§ 542 while ( ®int x = f(), y = g(); x < y® ) ... §\C{// relational expression}§ 543 while ( ®struct S { int i; } x = { f() }; x.i < 4® ) ... §\C{// relational expression}§ 544 \end{cfa} 545 Unless a relational expression is specified, each variable is compared not equal to 0, which is the standard semantics for the ©if©/©while© expression, and the results are combined using the logical ©&&© operator.\footnote{\CC only provides a single declaration always compared not equal to 0.} 539 546 The scope of the declaration(s) is local to the @if@ statement but exist within both the ``then'' and ``else'' clauses. 547 548 549 %\subsection{\texorpdfstring{\protect\lstinline@for@ Statement}{for Statement}} 550 \subsection{\texorpdfstring{\LstKeywordStyle{for} Statement}{for Statement}} 551 552 The ©for©/©while©/©do-while© loop-control allows empty or simplified ranges. 553 An empty conditional implies ©1©. 554 The up-to range ©~©\index{~@©~©} means exclusive range [M,N); 555 the up-to range ©~=©\index{~=@©~=©} means inclusive range [M,N]. 556 The down-to range ©-~©\index{-~@©-~©} means exclusive range [N,M); 557 the down-to range ©-~=©\index{-~=@©-~=©} means inclusive range [N,M]. 558 ©0© is the implicit start value; 559 ©1© is the implicit increment value for an up-to range and ©-1© for an implicit down-to range. 560 The loop index is polymorphic in the type of the start value or comparison value when start is implicitly ©0©. 561 \begin{cquote} 562 \begin{tabular}{@{}ll|l@{}} 563 \multicolumn{2}{c|}{for control} & \multicolumn{1}{c}{output} \\ 564 \hline 565 \begin{cfa} 566 while ®()® { sout | "empty"; break; } 567 do { sout | "empty"; break; } while ®()®; 568 for ®()® { sout | "empty"; break; } 569 for ( ®0® ) { sout | "A"; } 570 for ( ®1® ) { sout | "A"; } 571 for ( ®10® ) { sout | "A"; } 572 for ( ®1 ~= 10 ~ 2® ) { sout | "B"; } 573 for ( ®10 -~= 1 ~ -2® ) { sout | "C"; } 574 for ( ®0.5 ~ 5.5® ) { sout | "D"; } 575 for ( ®5.5 -~ 0.5® ) { sout | "E"; } 576 for ( ®i; 10® ) { sout | i; } 577 for ( ®i; 1 ~= 10 ~ 2® ) { sout | i; } 578 for ( ®i; 10 -~= 1 ~ -2® ) { sout | i; } 579 for ( ®i; 0.5 ~ 5.5® ) { sout | i; } 580 for ( ®i; 5.5 -~ 0.5® ) { sout | i; } 581 for ( ®ui; 2u ~= 10u ~ 2u® ) { sout | ui; } 582 for ( ®ui; 10u -~= 2u ~ -2u® ) { sout | ui; } 583 int start = 3, comp = 10, inc = 2; 584 for ( ®i; start ~ comp ~ inc + 1® ) { sout | i; } 585 \end{cfa} 586 & 587 \begin{cfa} 588 sout | endl; 589 sout | endl; 590 sout | endl; 591 sout | endl; 592 sout | endl; 593 sout | endl; 594 sout | endl; 595 sout | endl; 596 sout | endl; 597 sout | endl; 598 sout | endl; 599 sout | endl; 600 sout | endl; 601 sout | endl; 602 sout | endl; 603 sout | endl; 604 sout | endl; 605 606 sout | endl; 607 \end{cfa} 608 & 609 \begin{cfa} 610 empty 611 empty 612 empty 613 614 A 615 A A A A A A A A A A 616 B B B B B 617 C C C C C 618 D D D D D 619 E E E E E 620 0 1 2 3 4 5 6 7 8 9 621 1 3 5 7 9 622 10 8 6 4 2 623 0.5 1.5 2.5 3.5 4.5 624 5.5 4.5 3.5 2.5 1.5 625 2 4 6 8 10 626 10 8 6 4 2 627 628 3 6 9 629 \end{cfa} 630 \end{tabular} 631 \end{cquote} 540 632 541 633 … … 800 892 801 893 894 % for () => for ( ;; ) 895 % for ( 10 - t ) => for ( typeof(10 - t) ? = 0 ; ? < 10 - t; ? += 1 ) // using 0 and 1 896 % for ( i ; 10 - t ) => for ( typeof(10 - t) i = 0 ; i < 10 - t; i += 1 ) // using 0 and 1 897 % for ( T i ; 10 - t ) => for ( T i = 0 ; i < 10 - t; i += 1 ) // using 0 and 1 898 % for ( 3~9 ) => for ( int ? = 3 ; ? < 9; ? += 1 ) // using 1 899 % for ( i ; 3~9 ) => for ( int i = 3 ; i < 9; i += 1 ) // using 1 900 % for ( T i ; 3~9 ) => for ( T i = 3 ; i < 9; i += 1 ) // using 1 901 902 802 903 %\subsection{\texorpdfstring{Labelled \protect\lstinline@continue@ / \protect\lstinline@break@}{Labelled continue / break}} 803 904 \subsection{\texorpdfstring{Labelled \LstKeywordStyle{continue} / \LstKeywordStyle{break} Statement}{Labelled continue / break Statement}} … … 805 906 While C provides ©continue© and ©break© statements for altering control flow, both are restricted to one level of nesting for a particular control structure. 806 907 Unfortunately, this restriction forces programmers to use \Indexc{goto} to achieve the equivalent control-flow for more than one level of nesting. 807 To prevent having to switch to the ©goto©, \CFA extends the \Indexc{continue}\index{continue@ \lstinline@continue@!labelled}\index{labelled!continue@©continue©} and \Indexc{break}\index{break@\lstinline@break@!labelled}\index{labelled!break@©break©} with a target label to support static multi-level exit\index{multi-level exit}\index{static multi-level exit}~\cite{Buhr85}, as in Java.908 To prevent having to switch to the ©goto©, \CFA extends the \Indexc{continue}\index{continue@©continue©!labelled}\index{labelled!continue@©continue©} and \Indexc{break}\index{break@©break©!labelled}\index{labelled!break@©break©} with a target label to support static multi-level exit\index{multi-level exit}\index{static multi-level exit}~\cite{Buhr85}, as in Java. 808 909 For both ©continue© and ©break©, the target label must be directly associated with a ©for©, ©while© or ©do© statement; 809 910 for ©break©, the target label can also be associated with a ©switch©, ©if© or compound (©{}©) statement. … … 890 991 \end{figure} 891 992 892 Both labelled ©continue© and ©break© are a ©goto©\index{goto@ \lstinline@goto@!restricted} restricted in the following ways:993 Both labelled ©continue© and ©break© are a ©goto©\index{goto@©goto©!restricted} restricted in the following ways: 893 994 \begin{itemize} 894 995 \item
Note:
See TracChangeset
for help on using the changeset viewer.