Changeset 33218c6 for doc/user/user.tex


Ignore:
Timestamp:
Jul 26, 2017, 12:19:41 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, 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:
b947fb2
Parents:
e0a653d (diff), ea91c42 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/user/user.tex

    re0a653d r33218c6  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Fri Jul  7 10:36:39 2017
    14 %% Update Count     : 2547
     13%% Last Modified On : Sat Jul 22 11:01:19 2017
     14%% Update Count     : 2878
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    5757\CFAStyle                                                                                               % use default CFA format-style
    5858
     59\lstnewenvironment{C++}[1][]
     60{\lstset{language=C++,moredelim=**[is][\protect\color{red}]{®}{®}#1}}
     61{}
     62
    5963% inline code ©...© (copyright symbol) emacs: C-q M-)
    6064% red highlighting ®...® (registered trademark symbol) emacs: C-q M-.
     
    137141
    138142\CFA{}\index{cforall@\CFA}\footnote{Pronounced ``\Index*{C-for-all}'', and written \CFA, CFA, or \CFL.} is a modern general-purpose programming-language, designed as an evolutionary step forward for the C programming language.
    139 The syntax of the \CFA language builds from C, and should look immediately familiar to C/\Index*[C++]{\CC{}} programmers.
     143The syntax of \CFA builds from C and should look immediately familiar to C/\Index*[C++]{\CC{}} programmers.
    140144% Any language feature that is not described here can be assumed to be using the standard \Celeven syntax.
    141 \CFA adds many modern programming-language features that directly lead to increased \emph{\Index{safety}} and \emph{\Index{productivity}}, while maintaining interoperability with existing C programs and achieving C performance.
    142 Like C, \CFA is a statically typed, procedural language with a low-overhead runtime, meaning there is no global \Index{garbage-collection}, but \Index{regional garbage-collection}\index{garbage-collection!regional} is possible.
     145\CFA adds many modern programming-language features that directly lead to increased \emph{\Index{safety}} and \emph{\Index{productivity}}, while maintaining interoperability with existing C programs and achieving similar performance.
     146Like C, \CFA is a statically typed, procedural (non-\Index{object-oriented}) language with a low-overhead runtime, meaning there is no global \Index{garbage-collection}, but \Index{regional garbage-collection}\index{garbage-collection!regional} is possible.
    143147The primary new features include parametric-polymorphic routines and types, exceptions, concurrency, and modules.
    144148
    145 One of the main design philosophies of \CFA is to ``describe not prescribe'', which means \CFA tries to provide a pathway from low-level C programming to high-level \CFA programming, but it does not force programmers to ``do the right thing''.
    146 Programmers can cautiously add \CFA extensions to their C programs in any order and at any time to incrementally move towards safer, higher-level programming features.
    147 A programmer is always free to reach back to C from \CFA for any reason, and in many cases, new \CFA features have a fallback to a C mechanism.
    148 There is no notion or requirement for rewriting a legacy C program in \CFA;
    149 instead, a programmer evolves an existing C program into \CFA by incrementally incorporating \CFA features.
    150 New programs can be written in \CFA using a combination of C and \CFA features.
    151 \Index*[C++]{\CC{}} had a similar goal 30 years ago, but currently has the disadvantages of multiple legacy design-choices that cannot be updated and active divergence of the language model from C, requiring significant effort and training to incrementally add \CC to a C-based project.
     149One of the main design philosophies of \CFA is to ``\Index{describe not prescribe}'', which means \CFA tries to provide a pathway from low-level C programming to high-level \CFA programming, but it does not force programmers to ``do the right thing''.
     150Programmers can cautiously add \CFA extensions to their C programs in any order and at any time to incrementally move towards safer, higher-level programming.
     151A programmer is always free to reach back to C from \CFA, for any reason, and in many cases, new \CFA features can be locally switched back to there C counterpart.
     152There is no notion or requirement for \emph{rewriting} a legacy C program in \CFA;
     153instead, a programmer evolves a legacy program into \CFA by incrementally incorporating \CFA features.
     154As well, new programs can be written in \CFA using a combination of C and \CFA features.
     155
     156\Index*[C++]{\CC{}} had a similar goal 30 years ago, allowing object-oriented programming to be incrementally added to C.
     157However, \CC currently has the disadvantages of a strong object-oriented bias, multiple legacy design-choices that cannot be updated, and active divergence of the language model from C, all of which requires significant effort and training to incrementally add \CC to a C-based project.
    152158In contrast, \CFA has 30 years of hindsight and a clean starting point.
    153159
     
    156162\begin{quote2}
    157163\begin{tabular}{@{}l@{\hspace{1.5em}}l@{\hspace{1.5em}}l@{}}
    158 \multicolumn{1}{c@{\hspace{1.5em}}}{\textbf{\CFA}}      & \multicolumn{1}{c}{\textbf{C}}        & \multicolumn{1}{c}{\textbf{\CC}}      \\
    159 \begin{cfa}
    160 #include <fstream>§\indexc{fstream}§
    161 
    162 int main( void ) {
    163         int x = 0, y = 1, z = 2;
    164         ®sout | x | y | z | endl;®
    165 }
    166 \end{cfa}
    167 &
    168 \begin{lstlisting}
     164\multicolumn{1}{c@{\hspace{1.5em}}}{\textbf{C}} & \multicolumn{1}{c}{\textbf{\CFA}}     & \multicolumn{1}{c}{\textbf{\CC}}      \\
     165\begin{cfa}
    169166#include <stdio.h>§\indexc{stdio.h}§
    170167
     
    173170        ®printf( "%d %d %d\n", x, y, z );®
    174171}
    175 \end{lstlisting}
     172\end{cfa}
    176173&
    177 \begin{lstlisting}
     174\begin{cfa}
     175#include <fstream>§\indexc{fstream}§
     176
     177int main( void ) {
     178        int x = 0, y = 1, z = 2;
     179        ®sout | x | y | z | endl;®§\indexc{sout}§
     180}
     181\end{cfa}
     182&
     183\begin{cfa}
    178184#include <iostream>§\indexc{iostream}§
    179185using namespace std;
     
    182188        ®cout<<x<<" "<<y<<" "<<z<<endl;®
    183189}
    184 \end{lstlisting}
     190\end{cfa}
    185191\end{tabular}
    186192\end{quote2}
    187193While the \CFA I/O looks similar to the \Index*[C++]{\CC{}} output style, there are important differences, such as automatic spacing between variables as in \Index*{Python} (see~\VRef{s:IOLibrary}).
    188194
     195\subsection{Background}
     196
    189197This document is a programmer reference-manual for the \CFA programming language.
    190198The manual covers the core features of the language and runtime-system, with simple examples illustrating syntax and semantics of each feature.
    191199The manual does not teach programming, i.e., how to combine the new constructs to build complex programs.
    192 A reader should already have an intermediate knowledge of control flow, data structures, and concurrency issues to understand the ideas presented as well as some experience programming in C/\CC.
    193 Implementers may refer to the \CFA Programming Language Specification for details about the language syntax and semantics.
     200A reader should already have an intermediate knowledge of control flow, data structures, and concurrency issues to understand the ideas presented, as well as some experience programming in C/\CC.
     201Implementers should refer to the \CFA Programming Language Specification for details about the language syntax and semantics.
    194202Changes to the syntax and additional features are expected to be included in later revisions.
    195203
     
    200208This installation base and the programmers producing it represent a massive software-engineering investment spanning decades and likely to continue for decades more.
    201209Even with all its problems, C continues to be popular because it allows writing software at virtually any level in a computer system without restriction.
    202 For system programming, where direct access to hardware and dealing with real-time issues is a requirement, C is usually the language of choice.
     210For system programming, where direct access to hardware, storage management, and real-time issues are a requirement, C is usually the only language of choice.
    203211The TIOBE index~\cite{TIOBE} for March 2016 showed the following programming-language popularity: \Index*{Java} 20.5\%, C 14.5\%, \Index*[C++]{\CC{}} 6.7\%, \Csharp 4.3\%, \Index*{Python} 4.3\%, where the next 50 languages are less than 3\% each with a long tail.
    204212As well, for 30 years, C has been the number 1 and 2 most popular programming language:
     
    216224\end{center}
    217225Hence, C is still an extremely important programming language, with double the usage of \Index*[C++]{\CC{}}; in many cases, \CC is often used solely as a better C.
    218 Love it or hate it, C has been an important and influential part of computer science for 40 years and sit appeal is not diminishing.
    219 Unfortunately, C has too many problems and omissions to make it an acceptable programming language for modern needs.
    220 
    221 As stated, the goal of the \CFA project is to engineer modern language features into C in an evolutionary rather than revolutionary way.
     226Love it or hate it, C has been an important and influential part of computer science for 40 years and its appeal is not diminishing.
     227Unfortunately, C has many problems and omissions that make it an unacceptable programming language for modern needs.
     228
     229As stated, the goal of the \CFA project is to engineer modern language-features into C in an evolutionary rather than revolutionary way.
    222230\CC~\cite{C++14,C++} is an example of a similar project;
    223 however, it largely extended the language, and did not address many existing problems.\footnote{%
     231however, it largely extended the C language, and did not address most of C's existing problems.\footnote{%
    224232Two important existing problems addressed were changing the type of character literals from ©int© to ©char© and enumerator from ©int© to the type of its enumerators.}
    225 \Index*{Fortran}~\cite{Fortran08}, \Index*{Ada}~\cite{Ada12}, and \Index*{Cobol}~\cite{Cobol14} are examples of programming languages that took an evolutionary approach, where modern language features (\eg objects, concurrency) are added and problems fixed within the framework of the existing language.
     233\Index*{Fortran}~\cite{Fortran08}, \Index*{Ada}~\cite{Ada12}, and \Index*{Cobol}~\cite{Cobol14} are examples of programming languages that took an evolutionary approach, where modern language-features (\eg objects, concurrency) are added and problems fixed within the framework of the existing language.
    226234\Index*{Java}~\cite{Java8}, \Index*{Go}~\cite{Go}, \Index*{Rust}~\cite{Rust} and \Index*{D}~\cite{D} are examples of the revolutionary approach for modernizing C/\CC, resulting in a new language rather than an extension of the descendent.
    227 These languages have different syntax and semantics from C, and do not interoperate directly with C, largely because of garbage collection.
     235These languages have different syntax and semantics from C, do not interoperate directly with C, and are not systems languages because of restrictive memory-management or garbage collection.
    228236As a result, there is a significant learning curve to move to these languages, and C legacy-code must be rewritten.
    229 These costs can be prohibitive for many companies with a large software base in C/\CC, and a significant number of programmers requiring retraining to a new programming language.
    230 
    231 The result of this project is a language that is largely backwards compatible with \Index*[C11]{\Celeven{}}~\cite{C11}, but fixing some of the well known C problems and containing many modern language features.
     237These costs can be prohibitive for many companies with a large software-base in C/\CC, and a significant number of programmers require retraining to the new programming language.
     238
     239The result of this project is a language that is largely backwards compatible with \Index*[C11]{\Celeven{}}~\cite{C11}, but fixes many of the well known C problems while containing modern language-features.
    232240Without significant extension to the C programming language, it is becoming unable to cope with the needs of modern programming problems and programmers;
    233241as a result, it will fade into disuse.
    234242Considering the large body of existing C code and programmers, there is significant impetus to ensure C is transformed into a modern programming language.
    235 While \Index*[C11]{\Celeven{}} made a few simple extensions to the language, nothing was added to address existing problems in the language or to augment the language with modern language features.
    236 While some may argue that modern language features may make C complex and inefficient, it is clear a language without modern capabilities is insufficient for the advanced programming problems existing today.
     243While \Index*[C11]{\Celeven{}} made a few simple extensions to the language, nothing was added to address existing problems in the language or to augment the language with modern language-features.
     244While some may argue that modern language-features may make C complex and inefficient, it is clear a language without modern capabilities is insufficient for the advanced programming problems existing today.
    237245
    238246
    239247\section{History}
    240248
    241 The \CFA project started with \Index*{K-W C}~\cite{Buhr94a,Till89}, which extended C with new declaration syntax, multiple return values from routines, and extended assignment capabilities using the notion of tuples.
     249The \CFA project started with \Index*{K-W C}~\cite{Buhr94a,Till89}, which extended C with new declaration syntax, multiple return values from routines, and advanced assignment capabilities using the notion of tuples.
    242250(See~\cite{Werther96} for similar work in \Index*[C++]{\CC{}}.)
    243 A first \CFA implementation of these extensions was by Esteves~\cite{Esteves04}.
    244 The signature feature of \CFA is parametric-polymorphic functions~\cite{forceone:impl,Cormack90,Duggan96} with functions generalized using a ©forall© clause (giving the language its name):
     251The first \CFA implementation of these extensions was by Esteves~\cite{Esteves04}.
     252
     253The signature feature of \CFA is \emph{\Index{overload}able} \Index{parametric-polymorphic} functions~\cite{forceone:impl,Cormack90,Duggan96} with functions generalized using a ©forall© clause (giving the language its name):
    245254\begin{lstlisting}
    246255®forall( otype T )® T identity( T val ) { return val; }
     
    248257\end{lstlisting}
    249258% extending the C type system with parametric polymorphism and overloading, as opposed to the \Index*[C++]{\CC{}} approach of object-oriented extensions.
    250 \CFA{}\hspace{1pt}'s polymorphism was originally formalized by Ditchfiled~\cite{Ditchfield92}, and first implemented by Bilson~\cite{Bilson03}.
     259\CFA{}\hspace{1pt}'s polymorphism was originally formalized by Ditchfield~\cite{Ditchfield92}, and first implemented by Bilson~\cite{Bilson03}.
    251260However, at that time, there was little interesting in extending C, so work did not continue.
    252 As the saying goes, ``What goes around, comes around.'', and there is now renewed interest in the C programming language because of legacy code-bases, so the \CFA project has been restarted.
     261As the saying goes, ``\Index*{What goes around, comes around.}'', and there is now renewed interest in the C programming language because of legacy code-bases, so the \CFA project has been restarted.
    253262
    254263
     
    257266
    258267\CFA is designed to integrate directly with existing C programs and libraries.
    259 The most important feature of \Index{interoperability} is using the same \Index{calling convention}s, so there is no overhead to call existing C routines.
     268The most important feature of \Index{interoperability} is using the same \Index{calling convention}s, so there is no complex interface or overhead to call existing C routines.
    260269This feature allows \CFA programmers to take advantage of the existing panoply of C libraries to access thousands of external software features.
    261270Language developers often state that adequate \Index{library support} takes more work than designing and implementing the language itself.
    262271Fortunately, \CFA, like \Index*[C++]{\CC{}}, starts with immediate access to all exiting C libraries, and in many cases, can easily wrap library routines with simpler and safer interfaces, at very low cost.
    263 Hence, \CFA begins by leveraging the large repository of C libraries with little cost.
     272Hence, \CFA begins by leveraging the large repository of C libraries, and than allows programmers to incrementally augment their C programs with modern \Index{backward-compatible} features.
    264273
    265274\begin{comment}
     
    304313\end{comment}
    305314
    306 However, it is necessary to differentiate between C and \CFA code because of name overloading, as for \CC.
     315However, it is necessary to differentiate between C and \CFA code because of name \Index{overload}ing, as for \CC.
    307316For example, the C math-library provides the following routines for computing the absolute value of the basic types: ©abs©, ©labs©, ©llabs©, ©fabs©, ©fabsf©, ©fabsl©, ©cabsf©, ©cabs©, and ©cabsl©.
    308 Whereas, \CFA wraps each of these routines into ones with the common name ©abs©:
     317Whereas, \CFA wraps each of these routines into ones with the overloaded name ©abs©:
    309318\begin{cfa}
    310319char abs( char );
    311 ®extern "C" {®
    312 int abs( int );                                                 §\C{// use default C routine for int}§
    313 ®}® // extern "C"
     320®extern "C" {® int abs( int ); ®}®              §\C{// use default C routine for int}§
    314321long int abs( long int );
    315322long long int abs( long long int );
     
    326333Hence, there is the same need as in \CC, to know if a name is a C or \CFA name, so it can be correctly formed.
    327334There is no way around this problem, other than C's approach of creating unique names for each pairing of operation and type.
    328 This example strongly illustrates a core idea in \CFA: \emph{the power of a name}.
     335
     336This example strongly illustrates a core idea in \CFA: \emph{the \Index{power of a name}}.
    329337The name ``©abs©'' evokes the notion of absolute value, and many mathematical types provide the notion of absolute value.
    330 Hence, knowing the name ©abs© should be sufficient to apply it to any type where it is applicable.
    331 The time savings and safety of using one name uniformly versus $N$ unique names should not be underestimated.
    332 
    333 
    334 \section[Compiling CFA Program]{Compiling \CFA Program}
    335 
    336 The command ©cfa© is used to compile \CFA program(s), and is based on the GNU \Indexc{gcc} command, \eg:
    337 \begin{cfa}
    338 cfa§\indexc{cfa}\index{compilation!cfa@©cfa©}§ [ gcc-options ] C/§\CFA§-files [ assembler/loader-files ]
     338Hence, knowing the name ©abs© is sufficient to apply it to any type where it is applicable.
     339The time savings and safety of using one name uniformly versus $N$ unique names cannot be underestimated.
     340
     341
     342\section[Compiling a CFA Program]{Compiling a \CFA Program}
     343
     344The command ©cfa© is used to compile a \CFA program and is based on the \Index{GNU} \Indexc{gcc} command, \eg:
     345\begin{cfa}
     346cfa§\indexc{cfa}\index{compilation!cfa@©cfa©}§ [ gcc-options ] C/§\CFA{}§-files [ assembler/loader-files ]
    339347\end{cfa}
    340348\CFA programs having the following ©gcc© flags turned on:
     
    344352The 1999 C standard plus GNU extensions.
    345353\item
    346 {\lstset{deletekeywords={inline}}
    347 \Indexc{-fgnu89-inline}\index{compilation option!-fgnu89-inline@{©-fgnu89-inline©}}
     354\Indexc[deletekeywords=inline]{-fgnu89-inline}\index{compilation option!-fgnu89-inline@{\lstinline[deletekeywords=inline]$-fgnu89-inline$}}
    348355Use the traditional GNU semantics for inline routines in C99 mode, which allows inline routines in header files.
    349 }%
    350356\end{description}
    351357The following new \CFA options are available:
     
    354360\Indexc{-CFA}\index{compilation option!-CFA@©-CFA©}
    355361Only the C preprocessor and the \CFA translator steps are performed and the transformed program is written to standard output, which makes it possible to examine the code generated by the \CFA translator.
    356 The generated code started with the standard \CFA prelude.
     362The generated code starts with the standard \CFA \Index{prelude}.
    357363
    358364\item
    359365\Indexc{-debug}\index{compilation option!-debug@©-debug©}
    360366The program is linked with the debugging version of the runtime system.
    361 The debug version performs runtime checks to help during the debugging phase of a \CFA program, but substantially slows the execution of the program.
     367The debug version performs runtime checks to help during the debugging phase of a \CFA program, but can substantially slow program execution.
    362368The runtime checks should only be removed after the program is completely debugged.
    363369\textbf{This option is the default.}
     
    366372\Indexc{-nodebug}\index{compilation option!-nodebug@©-nodebug©}
    367373The program is linked with the non-debugging version of the runtime system, so the execution of the program is faster.
    368 \Emph{However, no runtime checks or ©assert©s are performed so errors usually result in abnormal program termination.}
     374\Emph{However, no runtime checks or ©assert©s are performed so errors usually result in abnormal program behaviour or termination.}
    369375
    370376\item
     
    386392\textbf{This option is the default.}
    387393
     394\begin{comment}
    388395\item
    389396\Indexc{-no-include-stdhdr}\index{compilation option!-no-include-stdhdr@©-no-include-stdhdr©}
    390397Do not supply ©extern "C"© wrappers for \Celeven standard include files (see~\VRef{s:StandardHeaders}).
    391398\textbf{This option is \emph{not} the default.}
     399\end{comment}
    392400\end{description}
    393401
     
    410418\item
    411419\Indexc{__CFA__}\index{preprocessor variables!__CFA__@©__CFA__©},
    412 \Indexc{__CFORALL__}\index{preprocessor variables!__CFORALL__@©__CFORALL__©} and
     420\Indexc{__CFORALL__}\index{preprocessor variables!__CFORALL__@©__CFORALL__©}, and
    413421\Indexc{__cforall}\index{preprocessor variables!__cforall@©__cforall©}
    414422are always available during preprocessing and have no value.
    415423\end{description}
    416424These preprocessor variables allow conditional compilation of programs that must work differently in these situations.
    417 For example, to toggle between C and \CFA extensions, using the following:
     425For example, to toggle between C and \CFA extensions, use the following:
    418426\begin{cfa}
    419427#ifndef __CFORALL__
     
    426434
    427435
    428 \section{Constants Underscores}
    429 
    430 Numeric constants are extended to allow \Index{underscore}s within constants\index{constant!underscore}, \eg:
     436\section{Constant Underscores}
     437
     438Numeric constants are extended to allow \Index{underscore}s\index{constant!underscore}, \eg:
    431439\begin{cfa}
    4324402®_®147®_®483®_®648;                                    §\C{// decimal constant}§
     
    441449L®_®§"\texttt{\textbackslash{x}}§®_®§\texttt{ff}§®_®§\texttt{ee}"§;     §\C{// wide character constant}§
    442450\end{cfa}
    443 The rules for placement of underscores is as follows:
    444 \begin{enumerate}
     451The rules for placement of underscores are:
     452\begin{enumerate}[topsep=5pt,itemsep=5pt,parsep=0pt]
    445453\item
    446454A sequence of underscores is disallowed, \eg ©12__34© is invalid.
     
    463471\label{s:BackquoteIdentifiers}
    464472
    465 \CFA accommodates keyword clashes with existing C variable-names by syntactic transformations using the \CFA backquote escape-mechanism:
     473\CFA introduces several new keywords (see \VRef{s:CFAKeywords}) that can clash with existing C variable-names in legacy code.
     474Keyword clashes are accommodated by syntactic transformations using the \CFA backquote escape-mechanism:
    466475\begin{cfa}
    467476int ®`®otype®`® = 3;                    §\C{// make keyword an identifier}§
    468477double ®`®forall®`® = 3.5;
    469478\end{cfa}
     479
    470480Existing C programs with keyword clashes can be converted by enclosing keyword identifiers in backquotes, and eventually the identifier name can be changed to a non-keyword name.
    471 \VRef[Figure]{f:InterpositionHeaderFile} shows how clashes in C header files (see~\VRef{s:StandardHeaders}) can be handled using preprocessor \newterm{interposition}: ©#include_next© and ©-I filename©:
     481\VRef[Figure]{f:HeaderFileInterposition} shows how clashes in existing C header-files (see~\VRef{s:StandardHeaders}) can be handled using preprocessor \newterm{interposition}: ©#include_next© and ©-I filename©.
     482Several common C header-files with keyword clashes are fixed in the standard \CFA header-library, so there is a seamless programming-experience.
    472483
    473484\begin{figure}
    474485\begin{cfa}
    475 // include file uses the CFA keyword "otype".
    476 #if ! defined( otype )                  §\C{// nesting ?}§
    477 #define otype ®`®otype®`®               §\C{// make keyword an identifier}§
     486// include file uses the CFA keyword "with".
     487#if ! defined( with )                   §\C{// nesting ?}§
     488#define with ®`®with®`®                 §\C{// make keyword an identifier}§
    478489#define __CFA_BFD_H__
    479 #endif // ! otype
    480 
    481 #®include_next® <bfd.h>                 §\C{// must have internal check for multiple expansion}§
    482 
    483 #if defined( otype ) && defined( __CFA_BFD_H__ )        §\C{// reset only if set}§
    484 #undef otype
     490#endif
     491
     492®#include_next <bfdlink.h>              §\C{// must have internal check for multiple expansion}§
     493®
     494#if defined( with ) && defined( __CFA_BFD_H__ ) §\C{// reset only if set}§
     495#undef with
    485496#undef __CFA_BFD_H__
    486 #endif // otype && __CFA_BFD_H__
    487 \end{cfa}
    488 \caption{Interposition of Header File}
    489 \label{f:InterpositionHeaderFile}
     497#endif
     498\end{cfa}
     499\caption{Header-File Interposition}
     500\label{f:HeaderFileInterposition}
    490501\end{figure}
    491502
    492503
    493 \section{Labelled Continue/Break}
     504\section{\texorpdfstring{Labelled \LstKeywordStyle{continue} / \LstKeywordStyle{break}}{Labelled continue / break}}
    494505
    495506While C provides ©continue© and ©break© statements for altering control flow, both are restricted to one level of nesting for a particular control structure.
    496507Unfortunately, this restriction forces programmers to use \Indexc{goto} to achieve the equivalent control-flow for more than one level of nesting.
    497 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,Java}.
     508To 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.
    498509For both ©continue© and ©break©, the target label must be directly associated with a ©for©, ©while© or ©do© statement;
    499510for ©break©, the target label can also be associated with a ©switch©, ©if© or compound (©{}©) statement.
     
    512523                        ®LF:® for ( ... ) {
    513524                                ®LW:® while ( ... ) {
    514                                         ... break ®LC®; ...                     // terminate compound
    515                                         ... break ®LS®; ...                     // terminate switch
    516                                         ... break ®LIF®; ...                    // terminate if
    517                                         ... continue ®LF;® ...   // resume loop
    518                                         ... break ®LF®; ...                     // terminate loop
    519                                         ... continue ®LW®; ...   // resume loop
    520                                         ... break ®LW®; ...               // terminate loop
     525                                        ... break ®LC®; ...             // terminate compound
     526                                        ... break ®LS®; ...             // terminate switch
     527                                        ... break ®LIF®; ...    // terminate if
     528                                        ... continue ®LF;® ...  // resume loop
     529                                        ... break ®LF®; ...             // terminate loop
     530                                        ... continue ®LW®; ...  // resume loop
     531                                        ... break ®LW®; ...             // terminate loop
    521532                                } // while
    522533                        } // for
    523534                } else {
    524                         ... break ®LIF®; ...                                     // terminate if
     535                        ... break ®LIF®; ...                    // terminate if
    525536                } // if
    526537        } // switch
     
    564575                          LF: for ( ;; ) {
    565576                                  LW: while ( 1 ) {
    566                                                 break LC;                       // terminate compound
    567                                                 break LS;                       // terminate switch
    568                                                 break LIF;                      // terminate if
    569                                                 continue LF;     // resume loop
    570                                                 break LF;                       // terminate loop
    571                                                 continue LW;     // resume loop
    572                                                 break LW;                 // terminate loop
     577                                                break LC;               // terminate compound
     578                                                break LS;               // terminate switch
     579                                                break LIF;              // terminate if
     580                                                continue LF;    // resume loop
     581                                                break LF;               // terminate loop
     582                                                continue LW;    // resume loop
     583                                                break LW;               // terminate loop
    573584                                        } // while
    574585                                } // for
    575586                        } else {
    576                                 break LIF;                                      // terminate if
     587                                break LIF;                              // terminate if
    577588                        } // if
    578589                } // switch
     
    613624\item
    614625They cannot branch into a control structure.
    615 This restriction prevents missing initialization at the start of a control structure resulting in undefined behaviour.
     626This restriction prevents missing declarations and/or initializations at the start of a control structure resulting in undefined behaviour.
    616627\end{itemize}
    617628The advantage of the labelled ©continue©/©break© is allowing static multi-level exits without having to use the ©goto© statement, and tying control flow to the target control structure rather than an arbitrary point in a program.
    618 Furthermore, the location of the label at the \emph{beginning} of the target control structure informs the reader that complex control-flow is occurring in the body of the control structure.
     629Furthermore, the location of the label at the \emph{beginning} of the target control structure informs the reader (\Index{eye candy}) that complex control-flow is occurring in the body of the control structure.
    619630With ©goto©, the label is at the end of the control structure, which fails to convey this important clue early enough to the reader.
    620631Finally, using an explicit target for the transfer instead of an implicit target allows new constructs to be added or removed without affecting existing constructs.
     
    622633
    623634
    624 \section{Switch Statement}
     635\section{\texorpdfstring{\LstKeywordStyle{switch} Statement}{switch Statement}}
    625636
    626637C allows a number of questionable forms for the ©switch© statement:
     
    663674        ®// open input file
    664675®} else if ( argc == 2 ) {
    665         ®// open input file
     676        ®// open input file (duplicate)
    666677
    667678®} else {
     
    676687\begin{cfa}
    677688switch ( i ) {
    678   case 1: case 3: case 5:       // odd values
    679         // same action
     689  ®case 1: case 3: case 5:®     // odd values
     690        // odd action
    680691        break;
    681   case 2: case 4: case 6:       // even values
    682         // same action
     692  ®case 2: case 4: case 6:®     // even values
     693        // even action
    683694        break;
    684695}
     
    686697However, this situation is handled in other languages without fall-through by allowing a list of case values.
    687698While fall-through itself is not a problem, the problem occurs when fall-through is the default, as this semantics is unintuitive to many programmers and is different from virtually all other programming languages with a ©switch© statement.
    688 Hence, default fall-through semantics results in a large number of programming errors as programmers often forget the ©break© statement at the end of a ©case© clause, resulting in inadvertent fall-through.
     699Hence, default fall-through semantics results in a large number of programming errors as programmers often \emph{forget} the ©break© statement at the end of a ©case© clause, resulting in inadvertent fall-through.
    689700
    690701\item
     
    708719The problem with this usage is branching into control structures, which is known to cause both comprehension and technical difficulties.
    709720The comprehension problem occurs from the inability to determine how control reaches a particular point due to the number of branches leading to it.
    710 The technical problem results from the inability to ensure allocation and initialization of variables when blocks are not entered at the beginning.
    711 Often transferring into a block can bypass variable declaration and/or its initialization, which results in subsequent errors.
    712 There are virtually no positive arguments for this kind of control flow, and therefore, there is a strong impetus to eliminate it.
     721The technical problem results from the inability to ensure declaration and initialization of variables when blocks are not entered at the beginning.
     722There are no positive arguments for this kind of control flow, and therefore, there is a strong impetus to eliminate it.
    713723Nevertheless, C does have an idiom where this capability is used, known as ``\Index*{Duff's device}''~\cite{Duff83}:
    714724\begin{cfa}
     
    770780and there is only a medium amount of fall-through from one ©case© clause to the next, and most of these result from a list of case values executing common code, rather than a sequence of case actions that compound.
    771781\end{itemize}
    772 These observations help to put the \CFA changes to the ©switch© into perspective.
     782These observations put into perspective the \CFA changes to the ©switch©.
    773783\begin{enumerate}
    774784\item
     
    791801  case 7:
    792802        ...
    793         ®break®                                         §\C{// explicit end of switch}§
     803        ®break®                                         §\C{// redundant explicit end of switch}§
    794804  default:
    795805        j = 3;
     
    797807\end{cfa}
    798808Like the ©switch© statement, the ©choose© statement retains the fall-through semantics for a list of ©case© clauses;
    799 the implicit ©break© is applied only at the end of the \emph{statements} following a ©case© clause.
    800 The explicit ©fallthru© is retained because it is a C-idiom most C programmers expect, and its absence might discourage programmers from using the ©choose© statement.
     809An implicit ©break© is applied only at the end of the \emph{statements} following a ©case© clause.
     810An explicit ©fallthru© is retained because it is a C-idiom most C programmers expect, and its absence might discourage programmers from using the ©choose© statement.
    801811As well, allowing an explicit ©break© from the ©choose© is a carry over from the ©switch© statement, and expected by C programmers.
    802812\item
     
    827837
    828838
    829 \section{Case Clause}
     839\section{\texorpdfstring{\LstKeywordStyle{case} Clause}{case Clause}}
    830840
    831841C restricts the ©case© clause of a ©switch© statement to a single value.
     
    903913
    904914
     915\section{\texorpdfstring{\LstKeywordStyle{with} Clause / Statement}{with Clause / Statement}}
     916\label{s:WithClauseStatement}
     917
     918In \Index{object-oriented} programming, there is an implicit first parameter, often names \textbf{©self©} or \textbf{©this©}, which is elided.
     919\begin{C++}
     920class C {
     921        int i, j;
     922        int mem() {              ®// implicit "this" parameter
     923®               i = 1;          ®// this->i
     924®               j = 3;          ®// this->j
     925®       }
     926}
     927\end{C++}
     928Since CFA is non-object-oriented, the equivalent object-oriented program looks like:
     929\begin{cfa}
     930struct S { int i, j; };
     931int mem( S &this ) {    // explicit "this" parameter
     932        ®this.®i = 1;                     // "this" is not elided
     933        ®this.®j = 2;
     934}
     935\end{cfa}
     936but it is cumbersome having to write "©this.©" many times in a member.
     937
     938\CFA provides a ©with© clause/statement (see Pascal~\cite[\S~4.F]{Pascal}) to elided the "©this.©" by opening a scope containing field identifiers, changing the qualified fields into variables and giving an opportunity for optimizing qualified references.
     939\begin{cfa}
     940int mem( S &this ) ®with this® {        // with clause
     941        i = 1;                  ®// this.i
     942®       j = 2;                  ®// this.j
     943®}
     944\end{cfa}
     945which extends to multiple routine parameters:
     946\begin{cfa}
     947struct T { double m, n; };
     948int mem2( S &this1, T &this2 ) ®with this1, this2® {
     949        i = 1; j = 2;
     950        m = 1.0; n = 2.0;
     951}
     952\end{cfa}
     953
     954The statement form is used within a block:
     955\begin{cfa}
     956int foo() {
     957        struct S1 { ... } s1;
     958        struct S2 { ... } s2;
     959        ®with s1® {                     // with statement
     960                // access fields of s1 without qualification
     961                ®with s2® {  // nesting
     962                        // access fields of s1 and s2 without qualification
     963                }
     964        }
     965        ®with s1, s2® {
     966                // access unambiguous fields of s1 and s2 without qualification
     967        }
     968}
     969\end{cfa}
     970
     971When opening multiple structures, fields with the same name and type are ambiguous and must be fully qualified.
     972For fields with the same name but different type, context/cast can be used to disambiguate.
     973\begin{cfa}
     974struct S { int i; int j; double m; } a, c;
     975struct T { int i; int k; int m } b, c;
     976®with a, b® {
     977        j + k;                                          §\C{// unambiguous, unique names define unique types}§
     978        i;                                                      §\C{// ambiguous, same name and type}§
     979        a.i + b.i;                                      §\C{// unambiguous, qualification defines unique names}§
     980        m;                                                      §\C{// ambiguous, same name and no context to define unique type}§
     981        m = 5.0;                                        §\C{// unambiguous, same name and context defines unique type}§
     982        m = 1;                                          §\C{// unambiguous, same name and context defines unique type}§
     983}
     984®with c® { ... }                                §\C{// ambiguous, same name and no context}§
     985®with (S)c® { ... }                             §\C{// unambiguous, same name and cast defines unique type}§
     986\end{cfa}
     987
     988
    905989\section{Exception Handling}
     990\label{s:ExceptionHandling}
    906991
    907992Exception handling provides two mechanism: change of control flow from a raise to a handler, and communication from the raise to the handler.
    908 \begin{cfa}
    909 exception void h( int i );
    910 exception int h( int i, double d );
    911 
     993Transfer of control can be local, within a routine, or non-local, among routines.
     994Non-local transfer can cause stack unwinding, i.e., non-local routine termination, depending on the kind of raise.
     995\begin{cfa}
     996exception_t E {};                               §\C{// exception type}§
    912997void f(...) {
    913         ... throw h( 3 );
    914         ... i = resume h( 3, 5.1 );
    915 }
    916 
     998        ... throw E{}; ...                      §\C{// termination}§
     999        ... throwResume E{}; ...        §\C{// resumption}§
     1000}
    9171001try {
    9181002        f(...);
    919 } catch h( int w ) {
    920         // reset
    921 } resume h( int p, double x ) {
    922         return 17;  // recover
     1003} catch( E e : §boolean-predicate§ ) {                  §\C{// termination handler}§
     1004        // recover and continue
     1005} catchResume( E e : §boolean-predicate§ ) {    §\C{// resumption handler}§
     1006        // repair and return
    9231007} finally {
    924 }
    925 \end{cfa}
    926 So the type raised would be the mangled name of the exception prototype and that name would be matched at the handler clauses by comparing the strings.
    927 The arguments for the call would have to be packed in a message and unpacked at handler clause and then a call made to the handler.
     1008        // always executed
     1009}
     1010\end{cfa}
     1011The kind of raise and handler match: ©throw© with ©catch© and ©throwResume© with ©catchResume©.
     1012Then the exception type must match along with any additonal predicate must be true.
     1013The ©catch© and ©catchResume© handlers may appear in any oder.
     1014However, the ©finally© clause must appear at the end of the ©try© statement.
    9281015
    9291016
     
    11361223
    11371224
    1138 \section{Pointer/Reference}
     1225\section{Exponentiation Operator}
     1226
     1227C, \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.
     1228\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$.
     1229The 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)©.
     1230
     1231As for \Index{division}, there are exponentiation operators for integral and floating-point types, including the builtin \Index{complex} types.
     1232Unsigned integral exponentiation\index{exponentiation!unsigned integral} is performed with repeated multiplication (or shifting if the base is 2).
     1233Signed integral exponentiation\index{exponentiation!signed integral} is performed with repeated multiplication (or shifting if the base is 2), but yields a floating-point result because $b^{-e}=1/b^e$.
     1234Hence, it is important to designate exponent integral-constants as unsigned or signed: ©3 \ 3u© return an integral result, while ©3 \ 3© returns a floating-point result.
     1235Floating-point exponentiation\index{exponentiation!floating point} is performed using \Index{logarithm}s\index{exponentiation!logarithm}, so the base cannot be negative.
     1236\begin{cfa}
     1237sout | 2 ®\® 8u | 4 ®\® 3u | -4 ®\® 3u | 4 ®\® -3 | -4 ®\® -3 | 4.0 ®\® 2.1 | (1.0f+2.0fi) ®\® (3.0f+2.0fi) | endl;
     1238256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i
     1239\end{cfa}
     1240Parenthesis are necessary for the complex constants or the expresion is parsed as ©1.0f+(2.0fi \ 3.0f)+2.0fi©.
     1241The exponentiation operator is available for all the basic types, but for user-defined types, only the integral-computation versions are available.
     1242For returning an integral value, the user type ©T© must define multiplication, ©*©, and one, ©1©;
     1243for returning a floating-point value, an additional divide of type ©T© into a ©double© returning a ©double© (©double ?/?( double, T )©) is necessary for negative exponents.
     1244
     1245
     1246\section{Pointer / Reference}
    11391247
    11401248C provides a \newterm{pointer type};
     
    11441252An integer constant expression with the value 0, or such an expression cast to type ©void *©, is called a \newterm{null-pointer constant}.\footnote{
    11451253One way to conceptualize the null pointer is that no variable is placed at this address, so the null-pointer address can be used to denote an uninitialized pointer/reference object;
    1146 \ie the null pointer is guaranteed to compare unequal to a pointer to any object or routine.}
     1254\ie the null pointer is guaranteed to compare unequal to a pointer to any object or routine.
     1255In general, a value with special meaning among a set of values is called a \emph{\Index{sentinel value}}, \eg ©-1© as a return code value.}
    11471256An address is \newterm{sound}, if it points to a valid memory location in scope, \ie within the program's execution-environment and has not been freed.
    11481257Dereferencing an \newterm{unsound} address, including the null pointer, is \Index{undefined}, often resulting in a \Index{memory fault}.
     
    11791288\hline
    11801289\begin{cfa}
    1181 lda             r1,100                  // load address of x
    1182 ld               r2,(r1)                  // load value of x
    1183 lda             r3,104                  // load address of y
    1184 st               r2,(r3)                  // store x into y
     1290lda             r1,100  // load address of x
     1291ld               r2,(r1)          // load value of x
     1292lda             r3,104  // load address of y
     1293st               r2,(r3)          // store x into y
    11851294\end{cfa}
    11861295&
    11871296\begin{cfa}
    11881297
    1189 ld              r2,(100)                // load value of x
    1190 
    1191 st              r2,(104)                // store x into y
     1298ld              r2,(100)        // load value of x
     1299
     1300st              r2,(104)        // store x into y
    11921301\end{cfa}
    11931302\end{tabular}
     
    14851594
    14861595\item
    1487 lvalue to reference conversion: \lstinline[deletekeywords={lvalue}]@lvalue-type cv1 T@ converts to ©cv2 T &©, which allows implicitly converting variables to references.
     1596lvalue to reference conversion: \lstinline[deletekeywords=lvalue]$lvalue-type cv1 T$ converts to ©cv2 T &©, which allows implicitly converting variables to references.
    14881597\begin{cfa}
    14891598int x, &r = ®x®, f( int & p ); // lvalue variable (int) convert to reference (int &)
     
    25942703\begin{cfa}[belowskip=0pt]
    25952704char store[®sepSize®];                                          §\C{// sepSize is the maximum separator size}§
    2596 strcpy( store, sepGet( sout ) );
    2597 sepSet( sout, "_" );
     2705strcpy( store, sepGet( sout ) );                          §\C{// copy current separator}§
     2706sepSet( sout, "_" );                                            §\C{// change separator to underscore}§
    25982707sout | 1 | 2 | 3 | endl;
    25992708\end{cfa}
     
    26022711\end{cfa}
    26032712\begin{cfa}[belowskip=0pt]
    2604 sepSet( sout, store );
     2713sepSet( sout, store );                                          §\C{// change separator back to original}§
    26052714sout | 1 | 2 | 3 | endl;
    26062715\end{cfa}
     
    31593268\Indexc{gcc} provides ©typeof© to declare a secondary variable from a primary variable.
    31603269\CFA also relies heavily on the specification of the left-hand side of assignment for type inferencing, so in many cases it is crucial to specify the type of the left-hand side to select the correct type of the right-hand expression.
    3161 Only for overloaded routines with the same return type is variable type-inferencing possible.
     3270Only for overloaded routines \emph{with the same return type} is variable type-inferencing possible.
    31623271Finally, ©auto© presents the programming problem of tracking down a type when the type is actually needed.
    31633272For example, given
     
    52585367
    52595368
    5260 \section{\CFA Keywords}
     5369\section{\texorpdfstring{\CFA Keywords}{Cforall Keywords}}
    52615370\label{s:CFAKeywords}
    52625371
     5372\CFA introduces the following new keywords.
     5373
    52635374\begin{quote2}
    5264 \begin{tabular}{llll}
     5375\begin{tabular}{lllll}
    52655376\begin{tabular}{@{}l@{}}
    5266 ©_AT©                   \\
     5377©_At©                   \\
    52675378©catch©                 \\
    52685379©catchResume©   \\
    52695380©choose©                \\
    52705381©coroutine©             \\
    5271 ©disable©               \\
    52725382\end{tabular}
    52735383&
    52745384\begin{tabular}{@{}l@{}}
     5385©disable©               \\
    52755386©dtype©                 \\
    52765387©enable©                \\
    52775388©fallthrough©   \\
    52785389©fallthru©              \\
    5279 ©finally©               \\
    5280 ©forall©                \\
    52815390\end{tabular}
    52825391&
    52835392\begin{tabular}{@{}l@{}}
     5393©finally©               \\
     5394©forall©                \\
    52845395©ftype©                 \\
    52855396©lvalue©                \\
    52865397©monitor©               \\
     5398\end{tabular}
     5399&
     5400\begin{tabular}{@{}l@{}}
    52875401©mutex©                 \\
    52885402©one_t©                 \\
    52895403©otype©                 \\
     5404©throw©                 \\
     5405©throwResume©   \\
    52905406\end{tabular}
    52915407&
    52925408\begin{tabular}{@{}l@{}}
    5293 ©throw©                 \\
    5294 ©throwResume©   \\
    52955409©trait©                 \\
    52965410©try©                   \\
    52975411©ttype©                 \\
     5412©with©                  \\
    52985413©zero_t©                \\
    52995414\end{tabular}
     
    53305445g( p1, p2 ) int p1, p2;                 §\C{// int g( int p1, int p2 );}§
    53315446\end{cfa}
    5332 \CFA supports K\&R routine definitions:
     5447\CFA continues to support K\&R routine definitions:
    53335448\begin{cfa}
    53345449f( a, b, c )                                    §\C{// default int return}§
     
    54715586\Celeven prescribes the following standard header-files~\cite[\S~7.1.2]{C11} and \CFA adds to this list:
    54725587\begin{quote2}
    5473 \lstset{deletekeywords={float}}
    5474 \begin{tabular}{@{}llll|l@{}}
    5475 \multicolumn{4}{c|}{C11} & \multicolumn{1}{c}{\CFA}             \\
     5588\begin{tabular}{@{}lllll|l@{}}
     5589\multicolumn{5}{c|}{C11} & \multicolumn{1}{c}{\CFA}             \\
    54765590\hline
    54775591\begin{tabular}{@{}l@{}}
     
    54815595\Indexc{errno.h}                \\
    54825596\Indexc{fenv.h}                 \\
    5483 \Indexc{float.h}                \\
    5484 \Indexc{inttypes.h}             \\
    5485 \Indexc{iso646.h}               \\
     5597\Indexc[deletekeywords=float]{float.h} \\
    54865598\end{tabular}
    54875599&
    54885600\begin{tabular}{@{}l@{}}
     5601\Indexc{inttypes.h}             \\
     5602\Indexc{iso646.h}               \\
    54895603\Indexc{limits.h}               \\
    54905604\Indexc{locale.h}               \\
    54915605\Indexc{math.h}                 \\
    54925606\Indexc{setjmp.h}               \\
     5607\end{tabular}
     5608&
     5609\begin{tabular}{@{}l@{}}
    54935610\Indexc{signal.h}               \\
    54945611\Indexc{stdalign.h}             \\
    54955612\Indexc{stdarg.h}               \\
    54965613\Indexc{stdatomic.h}    \\
     5614\Indexc{stdbool.h}              \\
     5615\Indexc{stddef.h}               \\
    54975616\end{tabular}
    54985617&
    54995618\begin{tabular}{@{}l@{}}
    5500 \Indexc{stdbool.h}              \\
    5501 \Indexc{stddef.h}               \\
    55025619\Indexc{stdint.h}               \\
    55035620\Indexc{stdio.h}                \\
     
    55155632\Indexc{wctype.h}               \\
    55165633                                                \\
    5517                                                 \\
    5518                                                 \\
    55195634\end{tabular}
    55205635&
     
    55225637\Indexc{unistd.h}               \\
    55235638\Indexc{gmp.h}                  \\
    5524                                                 \\
    5525                                                 \\
    55265639                                                \\
    55275640                                                \\
     
    55635676The table shows allocation routines supporting different combinations of storage-management capabilities:
    55645677\begin{center}
    5565 \begin{tabular}{@{}lr|l|l|l|l@{}}
    5566                 &                                       & \multicolumn{1}{c|}{fill}     & resize        & alignment     & array \\
     5678\begin{tabular}{@{}r|r|l|l|l|l@{}}
     5679\multicolumn{1}{c}{}&           & \multicolumn{1}{c|}{fill}     & resize        & alignment     & array \\
    55675680\hline
    55685681C               & ©malloc©                      & no                    & no            & no            & no    \\
     
    55715684                & ©memalign©            & no                    & no            & yes           & no    \\
    55725685                & ©posix_memalign©      & no                    & no            & yes           & no    \\
     5686\hline
    55735687C11             & ©aligned_alloc©       & no                    & no            & yes           & no    \\
     5688\hline
    55745689\CFA    & ©alloc©                       & no/copy/yes   & no/yes        & no            & yes   \\
    55755690                & ©align_alloc©         & no/yes                & no            & yes           & yes   \\
Note: See TracChangeset for help on using the changeset viewer.