Changeset 4a368547


Ignore:
Timestamp:
May 29, 2017, 3:08:47 PM (7 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:
2ab67b9, a029714
Parents:
ff98952 (diff), 4c5b972 (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

Files:
8 added
5 deleted
52 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    rff98952 r4a368547  
    161161"""
    162162
    163         def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com, ajbeach@edu.uwaterloo.ca"
     163        def email_to = "cforall@lists.uwaterloo.ca"
    164164
    165165        //send email notification
  • Jenkinsfile

    rff98952 r4a368547  
    2828                wrap([$class: 'TimestamperBuildWrapper']) {
    2929
    30                         notify_server()
     30                        notify_server(0)
    3131
    3232                        prepare_build()
     
    3434                        checkout()
    3535
     36                        notify_server(0)
     37
    3638                        build()
    3739
     
    4648                        publish()
    4749
    48                         notify_server()
     50                        notify_server(45)
    4951                }
    5052        }
     
    171173}
    172174
    173 def notify_server() {
    174         sh 'curl --silent -X POST http://plg2:8082/jenkins/notify > /dev/null || true'
     175def notify_server(int wait) {
     176        sh """curl --silent --data "wait=${wait}" -X POST http://plg2:8082/jenkins/notify > /dev/null || true"""
    175177        return
    176178}
     
    374376"""
    375377
    376         def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com, ajbeach@edu.uwaterloo.ca"
     378        def email_to = "cforall@lists.uwaterloo.ca"
    377379
    378380        //send email notification
  • doc/LaTeXmacros/lstlang.sty

    rff98952 r4a368547  
    88%% Created On       : Sat May 13 16:34:42 2017
    99%% Last Modified By : Peter A. Buhr
    10 %% Last Modified On : Sat May 13 16:49:09 2017
    11 %% Update Count     : 4
     10%% Last Modified On : Fri May 26 12:47:09 2017
     11%% Update Count     : 8
    1212%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1313
     
    118118}
    119119
     120% uC++ programming language, based on ANSI C++
     121\lstdefinelanguage{uC++}[ANSI]{C++}{
     122        morekeywords={
     123                _Accept, _AcceptReturn, _AcceptWait, _Actor, _At, _CatchResume, _Cormonitor, _Coroutine, _Disable,
     124                _Else, _Enable, _Event, _Finally, _Monitor, _Mutex, _Nomutex, _PeriodicTask, _RealTimeTask,
     125                _Resume, _Select, _SporadicTask, _Task, _Timeout, _When, _With, _Throw},
     126}
     127
    120128% Local Variables: %
    121129% tab-width: 4 %
  • doc/bibliography/cfa.bib

    rff98952 r4a368547  
    30353035    year        = 1992,
    30363036    pages       = {T1-53},
     3037}
     3038
     3039@manual{GMP,
     3040    keywords    = {GMP arbitrary-precision library},
     3041    contributer = {pabuhr@plg},
     3042    title       = {{GNU} Multiple Precision Arithmetic Library},
     3043    author      = {GMP},
     3044    organization= {GNU},
     3045    year        = 2016,
     3046    note        = {\href{https://gmplib.org}{https://\-gmplib.org}},
    30373047}
    30383048
  • doc/user/user.tex

    rff98952 r4a368547  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Sun May 21 23:36:42 2017
    14 %% Update Count     : 1822
     13%% Last Modified On : Wed May 24 22:21:42 2017
     14%% Update Count     : 1994
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    151151
    152152Like \Index*[C++]{\CC}, there may be both an old and new ways to achieve the same effect.
    153 For example, the following programs compare the \CFA and C I/O mechanisms.
     153For example, the following programs compare the \CFA, C, nad \CC I/O mechanisms, where the programs output the same result.
    154154\begin{quote2}
    155155\begin{tabular}{@{}l@{\hspace{1.5em}}l@{\hspace{1.5em}}l@{}}
     
    183183\end{tabular}
    184184\end{quote2}
    185 The programs output the same result.
    186185While 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}).
    187186
     
    14261425
    14271426
    1428 \section{Type/Routine Nesting}
     1427\section{Unnamed Structure Fields}
     1428
     1429C requires each field of a structure to have a name, except for a bit field associated with a basic type, \eg:
     1430\begin{cfa}
     1431struct {
     1432        int f1;                                 §\C{// named field}§
     1433        int f2 : 4;                             §\C{// named field with bit field size}§
     1434        int : 3;                                §\C{// unnamed field for basic type with bit field size}§
     1435        int ;                                   §\C{// disallowed, unnamed field}§
     1436        int *;                                  §\C{// disallowed, unnamed field}§
     1437        int (*)(int);                   §\C{// disallowed, unnamed field}§
     1438};
     1439\end{cfa}
     1440This requirement is relaxed by making the field name optional for all field declarations; therefore, all the field declarations in the example are allowed.
     1441As for unnamed bit fields, an unnamed field is used for padding a structure to a particular size.
     1442A list of unnamed fields is also supported, \eg:
     1443\begin{cfa}
     1444struct {
     1445        int , , ;                               §\C{// 3 unnamed fields}§
     1446}
     1447\end{cfa}
     1448
     1449
     1450\section{Nesting}
    14291451
    14301452Nesting of types and routines is useful for controlling name visibility (\newterm{name hiding}).
     
    17961818
    17971819
    1798 \section{Unnamed Structure Fields}
    1799 
    1800 C requires each field of a structure to have a name, except for a bit field associated with a basic type, \eg:
    1801 \begin{cfa}
    1802 struct {
    1803         int f1;                                 §\C{// named field}§
    1804         int f2 : 4;                             §\C{// named field with bit field size}§
    1805         int : 3;                                §\C{// unnamed field for basic type with bit field size}§
    1806         int ;                                   §\C{// disallowed, unnamed field}§
    1807         int *;                                  §\C{// disallowed, unnamed field}§
    1808         int (*)(int);                   §\C{// disallowed, unnamed field}§
    1809 };
    1810 \end{cfa}
    1811 This requirement is relaxed by making the field name optional for all field declarations; therefore, all the field declarations in the example are allowed.
    1812 As for unnamed bit fields, an unnamed field is used for padding a structure to a particular size.
    1813 A list of unnamed fields is also supported, \eg:
    1814 \begin{cfa}
    1815 struct {
    1816         int , , ;                               §\C{// 3 unnamed fields}§
    1817 }
    1818 \end{cfa}
    1819 
    1820 
    18211820\section{Field Tuples}
    18221821
     
    18611860
    18621861While C provides ©continue© and ©break© statements for altering control flow, both are restricted to one level of nesting for a particular control structure.
    1863 Unfortunately, this restriction forces programmers to use ©goto© to achieve the equivalent control-flow for more than one level of nesting.
    1864 To prevent having to switch to the ©goto©, \CFA extends the ©continue©\index{continue@©continue©}\index{continue@©continue©!labelled}\index{labelled!continue@©continue©} and ©break©\index{break@©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,Java}.
     1862Unfortunately, this restriction forces programmers to use \Indexc{goto} to achieve the equivalent control-flow for more than one level of nesting.
     1863To 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,Java}.
    18651864For both ©continue© and ©break©, the target label must be directly associated with a ©for©, ©while© or ©do© statement;
    18661865for ©break©, the target label can also be associated with a ©switch©, ©if© or compound (©{}©) statement.
    1867 
    1868 The following example shows the labelled ©continue© specifying which control structure is the target for the next loop iteration:
    1869 \begin{quote2}
    1870 \begin{tabular}{@{}l@{\hspace{3em}}l@{}}
    1871 \multicolumn{1}{c@{\hspace{3em}}}{\textbf{\CFA}}        & \multicolumn{1}{c}{\textbf{C}}        \\
    1872 \begin{cfa}
    1873 ®L1:® do {
    1874         ®L2:® while ( ... ) {
    1875                 ®L3:® for ( ... ) {
    1876                         ... continue ®L1®; ...  // continue do
    1877                         ... continue ®L2®; ...  // continue while
    1878                         ... continue ®L3®; ...  // continue for
    1879                 } // for
    1880         } // while
    1881 } while ( ... );
    1882 \end{cfa}
    1883 &
    1884 \begin{cfa}
    1885 do {
    1886         while ( ... ) {
    1887                 for ( ... ) {
    1888                         ... goto L1; ...
    1889                         ... goto L2; ...
    1890                         ... goto L3; ...
    1891                 L3: ; }
    1892         L2: ; }
    1893 L1: ; } while ( ... );
    1894 \end{cfa}
    1895 \end{tabular}
    1896 \end{quote2}
    1897 The innermost loop has three restart points, which cause the next loop iteration to begin.
    1898 
    1899 The following example shows the labelled ©break© specifying which control structure is the target for exit:
    1900 \begin{quote2}
    1901 \begin{tabular}{@{}l@{\hspace{3em}}l@{}}
    1902 \multicolumn{1}{c@{\hspace{3em}}}{\textbf{\CFA}}        & \multicolumn{1}{c}{\textbf{C}}        \\
    1903 \begin{cfa}
    1904 ®L1:® {
     1866\VRef[Figure]{f:MultiLevelResumeTermination} shows the labelled ©continue© and ©break©, specifying which control structure is the target for exit, and the corresponding C program using only ©goto©.
     1867The innermost loop has 7 exit points, which cause resumption or termination of one or more of the 7 \Index{nested control-structure}s.
     1868
     1869\begin{figure}
     1870\begin{tabular}{@{\hspace{\parindentlnth}}l@{\hspace{1.5em}}l@{}}
     1871\multicolumn{1}{c@{\hspace{1.5em}}}{\textbf{\CFA}}      & \multicolumn{1}{c}{\textbf{C}}        \\
     1872\begin{cfa}
     1873®LC:® {
    19051874        ... §declarations§ ...
    1906         ®L2:® switch ( ... ) {
     1875        ®LS:® switch ( ... ) {
    19071876          case 3:
    1908             ®L3:® if ( ... ) {
    1909                         ®L4:® for ( ... ) {
    1910                                 ... break ®L1®; ...     // exit compound statement
    1911                                 ... break ®L2®; ...     // exit switch
    1912                                 ... break ®L3®; ...     // exit if
    1913                                 ... break ®L4®; ...     // exit loop
     1877                ®LIF:® if ( ... ) {
     1878                        ®LF:® for ( ... ) {
     1879                                ®LW:® while ( ... ) {
     1880                                        ... break ®LC®; ...                     // terminate compound
     1881                                        ... break ®LS®; ...                     // terminate switch
     1882                                        ... break ®LIF®; ...                    // terminate if
     1883                                        ... continue ®LF;® ...   // resume loop
     1884                                        ... break ®LF®; ...                     // terminate loop
     1885                                        ... continue ®LW®; ...   // resume loop
     1886                                        ... break ®LW®; ...               // terminate loop
     1887                                } // while
    19141888                        } // for
    19151889                } else {
    1916                         ... break ®L3®; ...             // exit if
     1890                        ... break ®LIF®; ...                                     // terminate if
    19171891                } // if
    19181892        } // switch
     
    19251899        switch ( ... ) {
    19261900          case 3:
    1927             if ( ... ) {
     1901                if ( ... ) {
    19281902                        for ( ... ) {
    1929                                 ... goto L1; ...
    1930                                 ... goto L2; ...
    1931                                 ... goto L3; ...
    1932                                 ... goto L4; ...
    1933                         } L4: ;
     1903                                for ( ... ) {
     1904                                        ... goto ®LC®; ...
     1905                                        ... goto ®LS®; ...
     1906                                        ... goto ®LIF®; ...
     1907                                        ... goto ®LFC®; ...
     1908                                        ... goto ®LFB®; ...
     1909                                        ... goto ®LWC®; ...
     1910                                        ... goto ®LWB®; ...
     1911                                  ®LWC®: ; } ®LWB:® ;
     1912                          ®LFC:® ; } ®LFB:® ;
    19341913                } else {
    1935                         ... goto L3; ...
    1936                 } L3: ;
    1937         } L2: ;
    1938 } L1: ;
     1914                        ... goto ®LIF®; ...
     1915                } ®L3:® ;
     1916        } ®LS:® ;
     1917} ®LC:® ;
    19391918\end{cfa}
    19401919\end{tabular}
    1941 \end{quote2}
    1942 The innermost loop has four exit points, which cause termination of one or more of the four \Index{nested control structure}s.
    1943 
    1944 Both ©continue© and ©break© with target labels are simply a ©goto©\index{goto@©goto©!restricted} restricted in the following ways:
     1920\caption{Multi-level Resume/Termination}
     1921\label{f:MultiLevelResumeTermination}
     1922\end{figure}
     1923
     1924Both labelled ©continue© and ©break© are a ©goto©\index{goto@©goto©!restricted} restricted in the following ways:
    19451925\begin{itemize}
    19461926\item
    1947 They cannot be used to create a loop.
    1948 This means that only the looping construct can be used to create a loop.
    1949 This restriction is important since all situations that can result in repeated execution of statements in a program are clearly delineated.
    1950 \item
    1951 Since they always transfer out of containing control structures, they cannot be used to branch into a control structure.
     1927They cannot create a loop, which means only the looping constructs cause looping.
     1928This restriction means all situations resulting in repeated execution are clearly delineated.
     1929\item
     1930They cannot branch into a control structure.
     1931This restriction prevents missing initialization at the start of a control structure resulting in undefined behaviour.
    19521932\end{itemize}
    1953 The 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.
     1933The 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.
    19541934Furthermore, 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.
    19551935With ©goto©, the label is at the end of the control structure, which fails to convey this important clue early enough to the reader.
     
    22682248\index{input/output library}
    22692249
    2270 The goal for the \CFA I/O is to make I/O as simple as possible in the common cases, while fully supporting polymorphism and user defined types in a consistent way.
     2250The goal of \CFA I/O is to simplify the common cases\index{I/O!common case}, while fully supporting polymorphism and user defined types in a consistent way.
    22712251The common case is printing out a sequence of variables separated by whitespace.
    22722252\begin{quote2}
     
    22742254\multicolumn{1}{c@{\hspace{3em}}}{\textbf{\CFA}}        & \multicolumn{1}{c}{\textbf{\CC}}      \\
    22752255\begin{cfa}
    2276 int x = 0, y = 1, z = 2;
     2256int x = 1, y = 2, z = 3;
    22772257sout | x ®|® y ®|® z | endl;
    22782258\end{cfa}
     
    22812261
    22822262cout << x ®<< " "® << y ®<< " "® << z << endl;
     2263\end{cfa}
     2264\\
     2265\begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
     22661 2 3
     2267\end{cfa}
     2268&
     2269\begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
     22701 2 3
    22832271\end{cfa}
    22842272\end{tabular}
    22852273\end{quote2}
    22862274The \CFA form has half as many characters as the \CC form, and is similar to \Index*{Python} I/O with respect to implicit separators.
    2287 
    2288 The logical-or operator is used because it is the lowest-priority overloadable operator, other than assignment.
     2275A tuple prints all the tuple's values, each separated by ©", "©.
     2276\begin{cfa}[mathescape=off,aboveskip=0pt,belowskip=0pt]
     2277[int, int] t1 = [1, 2], t2 = [3, 4];
     2278sout | t1 | t2 | endl;                                  §\C{// print tuples}§
     2279\end{cfa}
     2280\begin{cfa}[mathescape=off,showspaces=true,belowskip=0pt]
     22811, 2, 3, 4
     2282\end{cfa}
     2283\CFA uses the logical-or operator for I/O because it is the lowest-priority overloadable operator, other than assignment.
    22892284Therefore, fewer output expressions require parenthesis.
    22902285\begin{quote2}
     
    22992294&
    23002295\begin{cfa}
    2301 cout << x * 3 << y + 1 << (z << 2) << (x == y) << (x | y) << (x || y) << (x > z ? 1 : 2) << endl;
     2296cout << x * 3 << y + 1 << ®(®z << 2®)® << ®(®x == y®)® << (x | y) << (x || y) << (x > z ? 1 : 2) << endl;
     2297\end{cfa}
     2298\\
     2299&
     2300\begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
     23013 3 12 0 3 1 2
    23022302\end{cfa}
    23032303\end{tabular}
     
    23052305Finally, the logical-or operator has a link with the Shell pipe-operator for moving data, where data flows in the correct direction for input but the opposite direction for output.
    23062306
     2307
    23072308The implicit separator\index{I/O separator} character (space/blank) is a separator not a terminator.
    23082309The rules for implicitly adding the separator are:
     
    231623171 2 3
    23172318\end{cfa}
     2319
    23182320\item
    23192321A separator does not appear before or after a character literal or variable.
     
    23222324123
    23232325\end{cfa}
    2324 \item
    2325 A separator does not appear before or after a null (empty) C string
     2326
     2327\item
     2328A separator does not appear before or after a null (empty) C string.
    23262329\begin{cfa}
    23272330sout | 1 | "" | 2 | "" | 3 | endl;
     
    23292332\end{cfa}
    23302333which is a local mechanism to disable insertion of the separator character.
    2331 \item
    2332 A separator does not appear before a C string starting with the (extended) \Index{ASCII}\index{ASCII!extended} characters: \lstinline[mathescape=off]@([{=$£¥¡¿«@
     2334
     2335\item
     2336A separator does not appear before a C string starting with the (extended) \Index{ASCII}\index{ASCII!extended} characters: \lstinline[mathescape=off,basicstyle=\tt]@([{=$£¥¡¿«@
    23332337%$
    23342338\begin{cfa}[mathescape=off]
     
    23372341\end{cfa}
    23382342%$
    2339 \begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
    2340 x (1 x [2 x {3 x =4 x $5 x £6 x ¥7 x ¡8 x ¿9 x «10
     2343\begin{cfa}[mathescape=off,basicstyle=\tt,showspaces=true,aboveskip=0pt,belowskip=0pt]
     2344x ®(®1 x ®[®2 x ®{®3 x ®=®4 x ®$®5 x ®£®6 x ®¥®7 x ®¡®8 x ®¿®9 x ®«®10
    23412345\end{cfa}
    23422346%$
     2347where \lstinline[basicstyle=\tt]@¡¿@ are inverted opening exclamation and question marks, and \lstinline[basicstyle=\tt]@«@ is an opening citation mark.
     2348
    23432349\item
    23442350{\lstset{language=CFA,deletedelim=**[is][]{¢}{¢}}
    2345 A seperator does not appear after a C string ending with the (extended) \Index{ASCII}\index{ASCII!extended} characters: ©,.;!?)]}%¢»©
     2351A seperator does not appear after a C string ending with the (extended) \Index{ASCII}\index{ASCII!extended} characters: \lstinline[basicstyle=\tt]@,.;!?)]}%¢»@
    23462352\begin{cfa}[belowskip=0pt]
    23472353sout | 1 | ", x" | 2 | ". x" | 3 | "; x" | 4 | "! x" | 5 | "? x" | 6 | "% x"
    23482354                | 7 | "¢ x" | 8 | "» x" | 9 | ") x" | 10 | "] x" | 11 | "} x" | endl;
    23492355\end{cfa}
    2350 \begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
    2351 1, x 2. x 3; x 4! x 5? x 6% x 7§\textcent§ x 8» x 9) x 10] x 11} x
     2356\begin{cfa}[basicstyle=\tt,showspaces=true,aboveskip=0pt,belowskip=0pt]
     23571®,® x 2®.® x 3®;® x 4®!® x 5®?® x 6®%® x 7§\color{red}\textcent§ x 8®»® x 9®)® x 10®]® x 11®}® x
    23522358\end{cfa}}%
    2353 \item
    2354 A seperator does not appear before or after a C string begining/ending with the \Index{ASCII} quote or whitespace characters: \lstinline[showspaces=true]@`'": \t\v\f\r\n@
     2359where \lstinline[basicstyle=\tt]@»@ is a closing citation mark.
     2360
     2361\item
     2362A seperator does not appear before or after a C string begining/ending with the \Index{ASCII} quote or whitespace characters: \lstinline[basicstyle=\tt,showspaces=true]@`'": \t\v\f\r\n@
    23552363\begin{cfa}[belowskip=0pt]
    23562364sout | "x`" | 1 | "`x'" | 2 | "'x\"" | 3 | "\"x:" | 4 | ":x " | 5 | " x\t" | 6 | "\tx" | endl;
    23572365\end{cfa}
    2358 \begin{cfa}[mathescape=off,showspaces=true,showtabs=true,aboveskip=0pt,belowskip=0pt]
    2359 x`1`x'2'x"3"x:4:x 5 x   6       x
     2366\begin{cfa}[basicstyle=\tt,showspaces=true,showtabs=true,aboveskip=0pt,belowskip=0pt]
     2367x®`®1®`®x§\color{red}\texttt{'}§2§\color{red}\texttt{'}§x§\color{red}\texttt{"}§3§\color{red}\texttt{"}§x®:®4®:®x® ®5® ®x®      ®6®     ®x
     2368\end{cfa}
     2369
     2370\item
     2371If a space is desired before or after one of the special string start/end characters, simply insert a space.
     2372\begin{cfa}[belowskip=0pt]
     2373sout | "x (§\color{red}\texttt{\textvisiblespace}§" | 1 | "§\color{red}\texttt{\textvisiblespace}§) x" | 2 | "§\color{red}\texttt{\textvisiblespace}§, x" | 3 | "§\color{red}\texttt{\textvisiblespace}§:x:§\color{red}\texttt{\textvisiblespace}§" | 4 | endl;
     2374\end{cfa}
     2375\begin{cfa}[basicstyle=\tt,showspaces=true,showtabs=true,aboveskip=0pt,belowskip=0pt]
     2376x (® ®1® ®) x 2® ®, x 3® ®:x:® ®4
    23602377\end{cfa}
    23612378\end{enumerate}
    23622379
    2363 The following \CC-style \Index{manipulator}s allow control over implicit seperation.
     2380The following routines and \CC-style \Index{manipulator}s control implicit seperation.
     2381\begin{enumerate}
     2382\item
     2383Routines \Indexc{sepSet}\index{manipulator!sepSet@©sepSet©} and \Indexc{sepGet}\index{manipulator!sepGet@©sepGet©} set and get the separator string.
     2384The separator string can be at most 16 characters including the ©'\0'© string terminator (15 printable characters).
     2385\begin{cfa}[mathescape=off,aboveskip=0pt,belowskip=0pt]
     2386sepSet( sout, ", $" );                                          §\C{// set separator from " " to ", \$"}§
     2387sout | 1 | 2 | 3 | " \"" | ®sepGet( sout )® | "\"" | endl;
     2388\end{cfa}
     2389%$
     2390\begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt]
     23911, $2, $3 ®", $"®
     2392\end{cfa}
     2393%$
     2394\begin{cfa}[mathescape=off,aboveskip=0pt,belowskip=0pt]
     2395sepSet( sout, " " );                                            §\C{// reset separator to " "}§
     2396sout | 1 | 2 | 3 | " \"" | ®sepGet( sout )® | "\"" | endl;
     2397\end{cfa}
     2398\begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt]
     23991 2 3 ®" "®
     2400\end{cfa}
     2401
     2402\item
    23642403Manipulators \Indexc{sepOn}\index{manipulator!sepOn@©sepOn©} and \Indexc{sepOff}\index{manipulator!sepOff@©sepOff©} \emph{locally} toggle printing the separator, \ie the seperator is adjusted only with respect to the next printed item.
    23652404\begin{cfa}[mathescape=off,belowskip=0pt]
     
    2375241412 3
    23762415\end{cfa}
     2416
     2417\item
    23772418Manipulators \Indexc{sepDisable}\index{manipulator!sepDisable@©sepDisable©} and \Indexc{sepEnable}\index{manipulator!sepEnable@©sepEnable©} \emph{globally} toggle printing the separator, \ie the seperator is adjusted with respect to all subsequent printed items, unless locally adjusted.
    23782419\begin{cfa}[mathescape=off,aboveskip=0pt,belowskip=0pt]
     
    239424351 2 3
    23952436\end{cfa}
    2396 Printing a tuple outputs all the tuple's values separated by ©", "©:
     2437
     2438\item
     2439Routine \Indexc{sepSetTuple}\index{manipulator!sepSetTuple@©sepSetTuple©} and \Indexc{sepGetTuple}\index{manipulator!sepGetTuple@©sepGetTuple©} get and set the tuple separator-string.
     2440The tuple separator-string can be at most 16 characters including the ©'\0'© string terminator (15 printable characters).
    23972441\begin{cfa}[mathescape=off,aboveskip=0pt,belowskip=0pt]
    2398 sout | [2, 3] | [4, 5] | endl;                          §\C{// print tuple}§
     2442sepSetTuple( sout, " " );                                       §\C{// set tuple separator from ", " to " "}§
     2443sout | t1 | t2 | " \"" | ®sepGetTuple( sout )® | "\"" | endl;
     2444\end{cfa}
     2445\begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt]
     24461 2 3 4 ®" "®
     2447\end{cfa}
     2448\begin{cfa}[mathescape=off,aboveskip=0pt,belowskip=0pt]
     2449sepSetTuple( sout, ", " );                                      §\C{// reset tuple separator to ", "}§
     2450sout | t1 | t2 | " \"" | ®sepGetTuple( sout )® | "\"" | endl;
     2451\end{cfa}
     2452\begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt]
     24531, 2, 3, 4 ®", "®
     2454\end{cfa}
     2455
     2456\item
     2457The tuple separator can also be turned on and off.
     2458\begin{cfa}[mathescape=off,aboveskip=0pt,belowskip=0pt]
     2459sout | sepOn | t1 | sepOff | t2 | endl;         §\C{// locally turn on/off implicit separation}§
    23992460\end{cfa}
    24002461\begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
    2401 2, 3, 4, 5
    2402 \end{cfa}
    2403 The tuple separator can also be turned on and off:
    2404 \begin{cfa}[mathescape=off,aboveskip=0pt,belowskip=0pt]
    2405 sout | sepOn | [2, 3] | sepOff | [4, 5] | endl; §\C{// locally turn on/off implicit separation}§
    2406 \end{cfa}
    2407 \begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
    2408 , 2, 34, 5
     2462, 1, 23, 4
    24092463\end{cfa}
    24102464Notice a tuple seperator starts the line because the next item is a tuple.
    2411 Finally, the stream routines \Indexc{sepGet}\index{manipulator!sepGet@©sepGet©} and \Indexc{sepSet}\index{manipulator!sepSet@©sepSet©} get and set the basic separator-string.
    2412 \begin{cfa}[mathescape=off,aboveskip=0pt,aboveskip=0pt,belowskip=0pt]
    2413 sepSet( sout, ", $" );                                          §\C{// set separator from " " to ", \$"}§
    2414 sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\"" | endl;
    2415 \end{cfa}
    2416 %$
    2417 \begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt]
    2418 1, $2, $3 ", $"
    2419 \end{cfa}
    2420 %$
    2421 \begin{cfa}[mathescape=off,aboveskip=0pt,aboveskip=0pt,belowskip=0pt]
    2422 sepSet( sout, " " );                                            §\C{// reset separator to " "}§
    2423 sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\"" | endl;
    2424 \end{cfa}
    2425 \begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt]
    2426 1 2 3 " "
    2427 \end{cfa}
    2428 and the stream routines \Indexc{sepGetTuple}\index{manipulator!sepGetTuple@©sepGetTuple©} and \Indexc{sepSetTuple}\index{manipulator!sepSetTuple@©sepSetTuple©} get and set the tuple separator-string.
    2429 \begin{cfa}[mathescape=off,aboveskip=0pt,aboveskip=0pt,belowskip=0pt]
    2430 sepSetTuple( sout, " " );                                       §\C{// set tuple separator from ", " to " "}§
    2431 sout | [2, 3] | [4, 5] | " \"" | sepGetTuple( sout ) | "\"" | endl;
    2432 \end{cfa}
    2433 \begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt]
    2434 2 3 4 5 " "
    2435 \end{cfa}
    2436 \begin{cfa}[mathescape=off,aboveskip=0pt,aboveskip=0pt,belowskip=0pt]
    2437 sepSetTuple( sout, ", " );                                      §\C{// reset tuple separator to ", "}§
    2438 sout | [2, 3] | [4, 5] | " \"" | sepGetTuple( sout ) | "\"" | endl;
    2439 \end{cfa}
    2440 \begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt]
    2441 2, 3, 4, 5 ", "
    2442 \end{cfa}
     2465\end{enumerate}
    24432466
    24442467\begin{comment}
     
    24462469
    24472470int main( void ) {
    2448         int x = 0, y = 1, z = 2;
    2449         sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl | endl;
     2471        int x = 1, y = 2, z = 3;
     2472        sout | x | y | z | endl;
     2473        [int, int] t1 = [1, 2], t2 = [3, 4];
     2474        sout | t1 | t2 | endl;                                          // print tuple
     2475        sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl;
    24502476        sout | 1 | 2 | 3 | endl;
    24512477        sout | '1' | '2' | '3' | endl;
     
    24562482                | 7 | "¢ x" | 8 | "» x" | 9 | ") x" | 10 | "] x" | 11 | "} x" | endl;
    24572483        sout | "x`" | 1 | "`x'" | 2 | "'x\"" | 3 | "\"x:" | 4 | ":x " | 5 | " x\t" | 6 | "\tx" | endl;
    2458 
    2459         sout | sepOn | 1 | 2 | 3 | sepOn | endl;        // separator at start of line
    2460         sout | 1 | sepOff | 2 | 3 | endl;                       // locally turn off implicit separator
    2461         sout | sepDisable | 1 | 2 | 3 | endl;           // globally turn off implicit separation
    2462         sout | 1 | sepOn | 2 | 3 | endl;                        // locally turn on implicit separator
    2463         sout | sepEnable | 1 | 2 | 3 | endl;            // globally turn on implicit separation
    2464 
    2465         sout | [2, 3] | [4, 5] | endl;                          // print tuple
    2466         sout | sepOn | [2, 3] | sepOff | [4, 5] | endl; // locally turn on/off implicit separation
     2484        sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4 | endl;
    24672485
    24682486        sepSet( sout, ", $" );                                          // set separator from " " to ", $"
     
    24712489        sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\"" | endl;
    24722490
     2491        sout | sepOn | 1 | 2 | 3 | sepOn | endl;        // separator at start of line
     2492        sout | 1 | sepOff | 2 | 3 | endl;                       // locally turn off implicit separator
     2493
     2494        sout | sepDisable | 1 | 2 | 3 | endl;           // globally turn off implicit separation
     2495        sout | 1 | sepOn | 2 | 3 | endl;                        // locally turn on implicit separator
     2496        sout | sepEnable | 1 | 2 | 3 | endl;            // globally turn on implicit separation
     2497
    24732498        sepSetTuple( sout, " " );                                       // set tuple separator from ", " to " "
    2474         sout | [2, 3] | [4, 5] | " \"" | sepGetTuple( sout ) | "\"" | endl;
     2499        sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\"" | endl;
    24752500        sepSetTuple( sout, ", " );                                      // reset tuple separator to ", "
    2476         sout | [2, 3] | [4, 5] | " \"" | sepGetTuple( sout ) | "\"" | endl;
     2501        sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\"" | endl;
     2502
     2503        sout | t1 | t2 | endl;                                          // print tuple
     2504        sout | sepOn | t1 | sepOff | t2 | endl;         // locally turn on/off implicit separation
    24772505}
    24782506
    24792507// Local Variables: //
    24802508// tab-width: 4 //
     2509// fill-column: 100 //
    24812510// End: //
    24822511\end{comment}
     
    29723001generic (type T | bool ?<?(T, T) )
    29733002
    2974 T min(T a, T b) {
     3003T min( T a, T b ) {
    29753004        return a < b ? a : b;
    29763005}
     
    30113040
    30123041generic (type T | Orderable(T))
    3013 T min(T a, T b) {
     3042T min( T a, T b ) {
    30143043        return a < b ? a : b;
    30153044}
     
    50815110C11 prescribes the following standard header-files~\cite[\S~7.1.2]{C11} and \CFA adds to this list:
    50825111\begin{quote2}
    5083 \begin{tabular}{lll|l}
    5084 \multicolumn{3}{c|}{C11} & \multicolumn{1}{c}{\CFA}             \\
     5112\begin{tabular}{llll|l}
     5113\multicolumn{4}{c|}{C11} & \multicolumn{1}{c}{\CFA}             \\
    50855114\hline
    5086 assert.h        & math.h                & stdlib.h              & unistd.h      \\
    5087 complex.h       & setjmp.h              & stdnoreturn.h & gmp.h         \\
    5088 ctype.h         & signal.h              & string.h              \\
    5089 errno.h         & stdalign.h    & tgmath.h              \\
    5090 fenv.h          & stdarg.h              & threads.h             \\
    5091 float.h         & stdatomic.h   & time.h                \\
    5092 inttypes.h      & stdbool.h             & uchar.h               \\
    5093 iso646.h        & stddef.h              & wchar.h               \\
    5094 limits.h        & stdint.h              & wctype.h              \\
    5095 locale.h        & stdio.h               &                               \\
     5115\begin{tabular}{@{}l@{}}
     5116assert.h        \\
     5117complex.h       \\
     5118ctype.h         \\
     5119errno.h         \\
     5120fenv.h          \\
     5121float.h         \\
     5122inttypes.h      \\
     5123iso646.h        \\
     5124\end{tabular}
     5125&
     5126\begin{tabular}{@{}l@{}}
     5127limits.h        \\
     5128locale.h        \\
     5129math.h          \\
     5130setjmp.h        \\
     5131signal.h        \\
     5132stdalign.h      \\
     5133stdarg.h        \\
     5134stdatomic.h     \\
     5135\end{tabular}
     5136&
     5137\begin{tabular}{@{}l@{}}
     5138stdbool.h       \\
     5139stddef.h        \\
     5140stdint.h        \\
     5141stdio.h         \\
     5142stdlib.h        \\
     5143stdnoreturn.h \\
     5144string.h        \\
     5145tgmath.h        \\
     5146\end{tabular}
     5147&
     5148\begin{tabular}{@{}l@{}}
     5149threads.h       \\
     5150time.h          \\
     5151uchar.h         \\
     5152wchar.h         \\
     5153wctype.h        \\
     5154                        \\
     5155                        \\
     5156                        \\
     5157\end{tabular}
     5158&
     5159\begin{tabular}{@{}l@{}}
     5160unistd.h        \\
     5161gmp.h           \\
     5162                        \\
     5163                        \\
     5164                        \\
     5165                        \\
     5166                        \\
     5167                        \\
     5168\end{tabular}
    50965169\end{tabular}
    50975170\end{quote2}
     
    51045177\label{s:StandardLibrary}
    51055178
    5106 The \CFA standard-library wraps many existing explicitly-polymorphic C general-routines into implicitly-polymorphic versions.
     5179The \CFA standard-library wraps explicitly-polymorphic C general-routines into implicitly-polymorphic versions.
    51075180
    51085181
     
    51225195forall( dtype T | sized(T) ) T * memalign( size_t alignment );          // deprecated
    51235196forall( dtype T | sized(T) ) int posix_memalign( T ** ptr, size_t alignment );
    5124 
    5125 forall( otype T ) T * memset( T * ptr, unsigned char fill ); // use default value '\0' for fill
    5126 forall( otype T ) T * memset( T * ptr );                                // remove when default value available
    51275197
    51285198forall( dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); } ) T * new( Params p );
     
    51685238\leavevmode
    51695239\begin{cfa}[aboveskip=0pt,belowskip=0pt]
    5170 forall( otype T | { int ?<?( T, T ); } )
    5171 T * bsearch( const T key, const T * arr, size_t dimension );§\indexc{bsearch}§
     5240forall( otype T | { int ?<?( T, T ); } )        // location
     5241T * bsearch( T key, const T * arr, size_t dimension );§\indexc{bsearch}§
     5242
     5243forall( otype T | { int ?<?( T, T ); } )        // position
     5244unsigned int bsearch( T key, const T * arr, size_t dimension );
    51725245
    51735246forall( otype T | { int ?<?( T, T ); } )
     
    51805253\leavevmode
    51815254\begin{cfa}[aboveskip=0pt,belowskip=0pt]
    5182 char abs( char );§\indexc{abs}§
     5255unsigned char abs( signed char );§\indexc{abs}§
    51835256int abs( int );
    5184 long int abs( long int );
    5185 long long int abs( long long int );
     5257unsigned long int abs( long int );
     5258unsigned long long int abs( long long int );
    51865259float abs( float );
    51875260double abs( double );
     
    51905263double abs( double _Complex );
    51915264long double abs( long double _Complex );
     5265forall( otype T | { void ?{}( T *, zero_t ); int ?<?( T, T ); T -?( T ); } )
     5266T abs( T );
    51925267\end{cfa}
    51935268
     
    52165291\begin{cfa}[aboveskip=0pt,belowskip=0pt]
    52175292forall( otype T | { int ?<?( T, T ); } )
    5218 T min( const T t1, const T t2 );§\indexc{min}§
     5293T min( T t1, T t2 );§\indexc{min}§
    52195294
    52205295forall( otype T | { int ?>?( T, T ); } )
    5221 T max( const T t1, const T t2 );§\indexc{max}§
     5296T max( T t1, T t2 );§\indexc{max}§
    52225297
    52235298forall( otype T | { T min( T, T ); T max( T, T ); } )
     
    52325307\label{s:Math Library}
    52335308
    5234 The \CFA math-library wraps many existing explicitly-polymorphic C math-routines into implicitly-polymorphic versions.
     5309The \CFA math-library wraps explicitly-polymorphic C math-routines into implicitly-polymorphic versions.
    52355310
    52365311
     
    52395314\leavevmode
    52405315\begin{cfa}[aboveskip=0pt,belowskip=0pt]
    5241 float fabs( float );§\indexc{fabs}§
    5242 double fabs( double );
    5243 long double fabs( long double );
    5244 float cabs( float _Complex );
    5245 double cabs( double _Complex );
    5246 long double cabs( long double _Complex );
    5247 
    52485316float ?%?( float, float );§\indexc{fmod}§
    52495317float fmod( float, float );
     
    56005668
    56015669
     5670\section{Multi-precision Integers}
     5671\label{s:MultiPrecisionIntegers}
     5672
     5673\CFA has an interface to the \Index{GMP} \Index{multi-precision} signed-integers~\cite{GMP}, similar to the \CC interface provided by GMP.
     5674The \CFA interface wraps GMP routines into operator routines to make programming with multi-precision integers identical to using fixed-sized integers.
     5675The \CFA type name for multi-precision signed-integers is \Indexc{Int}.
     5676
     5677\begin{cfa}
     5678void ?{}( Int * this );                                 §\C{// constructor}§
     5679void ?{}( Int * this, Int init );
     5680void ?{}( Int * this, zero_t );
     5681void ?{}( Int * this, one_t );
     5682void ?{}( Int * this, signed long int init );
     5683void ?{}( Int * this, unsigned long int init );
     5684void ?{}( Int * this, const char * val );
     5685void ^?{}( Int * this );
     5686
     5687Int ?=?( Int * lhs, Int rhs );                  §\C{// assignment}§
     5688Int ?=?( Int * lhs, long int rhs );
     5689Int ?=?( Int * lhs, unsigned long int rhs );
     5690Int ?=?( Int * lhs, const char * rhs );
     5691
     5692char ?=?( char * lhs, Int rhs );
     5693short int ?=?( short int * lhs, Int rhs );
     5694int ?=?( int * lhs, Int rhs );
     5695long int ?=?( long int * lhs, Int rhs );
     5696unsigned char ?=?( unsigned char * lhs, Int rhs );
     5697unsigned short int ?=?( unsigned short int * lhs, Int rhs );
     5698unsigned int ?=?( unsigned int * lhs, Int rhs );
     5699unsigned long int ?=?( unsigned long int * lhs, Int rhs );
     5700
     5701long int narrow( Int val );
     5702unsigned long int narrow( Int val );
     5703
     5704int ?==?( Int oper1, Int oper2 );               §\C{// comparison}§
     5705int ?==?( Int oper1, long int oper2 );
     5706int ?==?( long int oper2, Int oper1 );
     5707int ?==?( Int oper1, unsigned long int oper2 );
     5708int ?==?( unsigned long int oper2, Int oper1 );
     5709
     5710int ?!=?( Int oper1, Int oper2 );
     5711int ?!=?( Int oper1, long int oper2 );
     5712int ?!=?( long int oper1, Int oper2 );
     5713int ?!=?( Int oper1, unsigned long int oper2 );
     5714int ?!=?( unsigned long int oper1, Int oper2 );
     5715
     5716int ?<?( Int oper1, Int oper2 );
     5717int ?<?( Int oper1, long int oper2 );
     5718int ?<?( long int oper2, Int oper1 );
     5719int ?<?( Int oper1, unsigned long int oper2 );
     5720int ?<?( unsigned long int oper2, Int oper1 );
     5721
     5722int ?<=?( Int oper1, Int oper2 );
     5723int ?<=?( Int oper1, long int oper2 );
     5724int ?<=?( long int oper2, Int oper1 );
     5725int ?<=?( Int oper1, unsigned long int oper2 );
     5726int ?<=?( unsigned long int oper2, Int oper1 );
     5727
     5728int ?>?( Int oper1, Int oper2 );
     5729int ?>?( Int oper1, long int oper2 );
     5730int ?>?( long int oper1, Int oper2 );
     5731int ?>?( Int oper1, unsigned long int oper2 );
     5732int ?>?( unsigned long int oper1, Int oper2 );
     5733
     5734int ?>=?( Int oper1, Int oper2 );
     5735int ?>=?( Int oper1, long int oper2 );
     5736int ?>=?( long int oper1, Int oper2 );
     5737int ?>=?( Int oper1, unsigned long int oper2 );
     5738int ?>=?( unsigned long int oper1, Int oper2 );
     5739
     5740Int +?( Int oper );                                             §\C{// arithmetic}§
     5741Int -?( Int oper );
     5742Int ~?( Int oper );
     5743
     5744Int ?&?( Int oper1, Int oper2 );
     5745Int ?&?( Int oper1, long int oper2 );
     5746Int ?&?( long int oper1, Int oper2 );
     5747Int ?&?( Int oper1, unsigned long int oper2 );
     5748Int ?&?( unsigned long int oper1, Int oper2 );
     5749Int ?&=?( Int * lhs, Int rhs );
     5750
     5751Int ?|?( Int oper1, Int oper2 );
     5752Int ?|?( Int oper1, long int oper2 );
     5753Int ?|?( long int oper1, Int oper2 );
     5754Int ?|?( Int oper1, unsigned long int oper2 );
     5755Int ?|?( unsigned long int oper1, Int oper2 );
     5756Int ?|=?( Int * lhs, Int rhs );
     5757
     5758Int ?^?( Int oper1, Int oper2 );
     5759Int ?^?( Int oper1, long int oper2 );
     5760Int ?^?( long int oper1, Int oper2 );
     5761Int ?^?( Int oper1, unsigned long int oper2 );
     5762Int ?^?( unsigned long int oper1, Int oper2 );
     5763Int ?^=?( Int * lhs, Int rhs );
     5764
     5765Int ?+?( Int addend1, Int addend2 );
     5766Int ?+?( Int addend1, long int addend2 );
     5767Int ?+?( long int addend2, Int addend1 );
     5768Int ?+?( Int addend1, unsigned long int addend2 );
     5769Int ?+?( unsigned long int addend2, Int addend1 );
     5770Int ?+=?( Int * lhs, Int rhs );
     5771Int ?+=?( Int * lhs, long int rhs );
     5772Int ?+=?( Int * lhs, unsigned long int rhs );
     5773Int ++?( Int * lhs );
     5774Int ?++( Int * lhs );
     5775
     5776Int ?-?( Int minuend, Int subtrahend );
     5777Int ?-?( Int minuend, long int subtrahend );
     5778Int ?-?( long int minuend, Int subtrahend );
     5779Int ?-?( Int minuend, unsigned long int subtrahend );
     5780Int ?-?( unsigned long int minuend, Int subtrahend );
     5781Int ?-=?( Int * lhs, Int rhs );
     5782Int ?-=?( Int * lhs, long int rhs );
     5783Int ?-=?( Int * lhs, unsigned long int rhs );
     5784Int --?( Int * lhs );
     5785Int ?--( Int * lhs );
     5786
     5787Int ?*?( Int multiplicator, Int multiplicand );
     5788Int ?*?( Int multiplicator, long int multiplicand );
     5789Int ?*?( long int multiplicand, Int multiplicator );
     5790Int ?*?( Int multiplicator, unsigned long int multiplicand );
     5791Int ?*?( unsigned long int multiplicand, Int multiplicator );
     5792Int ?*=?( Int * lhs, Int rhs );
     5793Int ?*=?( Int * lhs, long int rhs );
     5794Int ?*=?( Int * lhs, unsigned long int rhs );
     5795
     5796Int ?/?( Int dividend, Int divisor );
     5797Int ?/?( Int dividend, unsigned long int divisor );
     5798Int ?/?( unsigned long int dividend, Int divisor );
     5799Int ?/?( Int dividend, long int divisor );
     5800Int ?/?( long int dividend, Int divisor );
     5801Int ?/=?( Int * lhs, Int rhs );
     5802Int ?/=?( Int * lhs, long int rhs );
     5803Int ?/=?( Int * lhs, unsigned long int rhs );
     5804
     5805[ Int, Int ] div( Int dividend, Int divisor );
     5806[ Int, Int ] div( Int dividend, unsigned long int divisor );
     5807
     5808Int ?%?( Int dividend, Int divisor );
     5809Int ?%?( Int dividend, unsigned long int divisor );
     5810Int ?%?( unsigned long int dividend, Int divisor );
     5811Int ?%?( Int dividend, long int divisor );
     5812Int ?%?( long int dividend, Int divisor );
     5813Int ?%=?( Int * lhs, Int rhs );
     5814Int ?%=?( Int * lhs, long int rhs );
     5815Int ?%=?( Int * lhs, unsigned long int rhs );
     5816
     5817Int ?<<?( Int shiften, mp_bitcnt_t shift );
     5818Int ?<<=?( Int * lhs, mp_bitcnt_t shift );
     5819Int ?>>?( Int shiften, mp_bitcnt_t shift );
     5820Int ?>>=?( Int * lhs, mp_bitcnt_t shift );
     5821
     5822Int abs( Int oper );                                    §\C{// number functions}§
     5823Int fact( unsigned long int N );
     5824Int gcd( Int oper1, Int oper2 );
     5825Int pow( Int base, unsigned long int exponent );
     5826Int pow( unsigned long int base, unsigned long int exponent );
     5827void srandom( gmp_randstate_t state );
     5828Int random( gmp_randstate_t state, mp_bitcnt_t n );
     5829Int random( gmp_randstate_t state, Int n );
     5830Int random( gmp_randstate_t state, mp_size_t max_size );
     5831int sgn( Int oper );
     5832Int sqrt( Int oper );
     5833
     5834forall( dtype istype | istream( istype ) ) istype * ?|?( istype * is, Int * mp );  §\C{// I/O}§
     5835forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype * os, Int mp );
     5836\end{cfa}
     5837
     5838The following factorial programs contrast using GMP with the \CFA and C interfaces, where the output from these programs appears in \VRef[Figure]{f:MultiPrecisionFactorials}.
     5839(Compile with flag \Indexc{-lgmp} to link with the GMP library.)
     5840\begin{quote2}
     5841\begin{tabular}{@{}l@{\hspace{\parindentlnth}}|@{\hspace{\parindentlnth}}l@{}}
     5842\multicolumn{1}{c|@{\hspace{\parindentlnth}}}{\textbf{\CFA}}    & \multicolumn{1}{@{\hspace{\parindentlnth}}c}{\textbf{C}}      \\
     5843\hline
     5844\begin{cfa}
     5845#include <gmp>
     5846int main( void ) {
     5847        sout | "Factorial Numbers" | endl;
     5848        Int fact;
     5849        fact = 1;
     5850        sout | 0 | fact | endl;
     5851        for ( unsigned int i = 1; i <= 40; i += 1 ) {
     5852                fact *= i;
     5853                sout | i | fact | endl;
     5854        }
     5855}
     5856\end{cfa}
     5857&
     5858\begin{cfa}
     5859#include <gmp.h>
     5860int main( void ) {
     5861        ®gmp_printf®( "Factorial Numbers\n" );
     5862        ®mpz_t® fact;
     5863        ®mpz_init_set_ui®( fact, 1 );
     5864        ®gmp_printf®( "%d %Zd\n", 0, fact );
     5865        for ( unsigned int i = 1; i <= 40; i += 1 ) {
     5866                ®mpz_mul_ui®( fact, fact, i );
     5867                ®gmp_printf®( "%d %Zd\n", i, fact );
     5868        }
     5869}
     5870\end{cfa}
     5871\end{tabular}
     5872\end{quote2}
     5873
     5874\begin{figure}
     5875\begin{cfa}
     5876Factorial Numbers
     58770 1
     58781 1
     58792 2
     58803 6
     58814 24
     58825 120
     58836 720
     58847 5040
     58858 40320
     58869 362880
     588710 3628800
     588811 39916800
     588912 479001600
     589013 6227020800
     589114 87178291200
     589215 1307674368000
     589316 20922789888000
     589417 355687428096000
     589518 6402373705728000
     589619 121645100408832000
     589720 2432902008176640000
     589821 51090942171709440000
     589922 1124000727777607680000
     590023 25852016738884976640000
     590124 620448401733239439360000
     590225 15511210043330985984000000
     590326 403291461126605635584000000
     590427 10888869450418352160768000000
     590528 304888344611713860501504000000
     590629 8841761993739701954543616000000
     590730 265252859812191058636308480000000
     590831 8222838654177922817725562880000000
     590932 263130836933693530167218012160000000
     591033 8683317618811886495518194401280000000
     591134 295232799039604140847618609643520000000
     591235 10333147966386144929666651337523200000000
     591336 371993326789901217467999448150835200000000
     591437 13763753091226345046315979581580902400000000
     591538 523022617466601111760007224100074291200000000
     591639 20397882081197443358640281739902897356800000000
     591740 815915283247897734345611269596115894272000000000
     5918\end{cfa}
     5919\caption{Multi-precision Factorials}
     5920\label{f:MultiPrecisionFactorials}
     5921\end{figure}
     5922
     5923
    56025924\section{Rational Numbers}
    56035925\label{s:RationalNumbers}
     
    56125934}; // Rational
    56135935
    5614 // constants
    5615 extern struct Rational 0;
    5616 extern struct Rational 1;
    5617 
    5618 // constructors
    5619 Rational rational();
     5936Rational rational();                                    §\C{// constructors}§
    56205937Rational rational( long int n );
    56215938Rational rational( long int n, long int d );
    5622 
    5623 // getter/setter for numerator/denominator
    5624 long int numerator( Rational r );
     5939void ?{}( Rational * r, zero_t );
     5940void ?{}( Rational * r, one_t );
     5941
     5942long int numerator( Rational r );               §\C{// numerator/denominator getter/setter}§
    56255943long int numerator( Rational r, long int n );
    56265944long int denominator( Rational r );
    56275945long int denominator( Rational r, long int d );
    56285946
    5629 // comparison
    5630 int ?==?( Rational l, Rational r );
     5947int ?==?( Rational l, Rational r );             §\C{// comparison}§
    56315948int ?!=?( Rational l, Rational r );
    56325949int ?<?( Rational l, Rational r );
     
    56355952int ?>=?( Rational l, Rational r );
    56365953
    5637 // arithmetic
    5638 Rational -?( Rational r );
     5954Rational -?( Rational r );                              §\C{// arithmetic}§
    56395955Rational ?+?( Rational l, Rational r );
    56405956Rational ?-?( Rational l, Rational r );
     
    56425958Rational ?/?( Rational l, Rational r );
    56435959
    5644 // conversion
    5645 double widen( Rational r );
     5960double widen( Rational r );                             §\C{// conversion}§
    56465961Rational narrow( double f, long int md );
    56475962
    5648 // I/O
    5649 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, Rational * );
     5963forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, Rational * ); // I/O
    56505964forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, Rational );
    56515965\end{cfa}
  • doc/working/resolver_design.md

    rff98952 r4a368547  
    4141ensure that they are two-arg functions (this restriction may be valuable
    4242regardless).
     43
     44Regardless of syntax, there should be a type assertion that expresses `From`
     45is convertable to `To`.
     46If user-defined conversions are not added to the language,
     47`void ?{} ( To*, From )` may be a suitable representation, relying on
     48conversions on the argument types to account for transitivity.
     49On the other hand, `To*` should perhaps match its target type exactly, so
     50another assertion syntax specific to conversions may be required, e.g.
     51`From -> To`.
    4352
    4453### Constructor Idiom ###
  • src/CodeGen/CodeGenerator.cc

    rff98952 r4a368547  
    324324                printDesignators( init->get_designators() );
    325325                output << "{ ";
    326                 if ( init->begin() == init->end() ) {
    327                         // illegal to leave initializer list empty for scalar initializers, but always legal to have 0
    328                         output << "0";
    329                 } else {
    330                         genCommaList( init->begin(), init->end() );
    331                 } // if
     326                genCommaList( init->begin(), init->end() );
    332327                output << " }";
    333328        }
  • src/InitTweak/GenInit.cc

    rff98952 r4a368547  
    315315                for ( auto & tyDecl : functionDecl->get_functionType()->get_forall() ) {
    316316                        for ( DeclarationWithType *& assertion : tyDecl->get_assertions() ) {
    317                                 assertion = assertion->acceptMutator( *this );
     317                                handleDWT( assertion );
    318318                        }
    319319                }
  • src/MakeLibCfa.cc

    rff98952 r4a368547  
    7575                  case CodeGen::OT_POSTFIXASSIGN:
    7676                  case CodeGen::OT_INFIXASSIGN:
     77                  case CodeGen::OT_CTOR:
     78                  case CodeGen::OT_DTOR:
    7779                                funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( std::list< Label >(), newExpr ) );
    7880                                break;
    79                   case CodeGen::OT_CTOR:
    80                         // ctors don't return a value
    81                         if ( funcDecl->get_functionType()->get_parameters().size() == 1 ) {
    82                                 // intrinsic default constructors should do nothing
    83                                 // delete newExpr;
    84                                 break;
    85                         } else {
    86                                 assert( funcDecl->get_functionType()->get_parameters().size() == 2 );
    87                                 // anything else is a single parameter constructor that is effectively a C-style assignment
    88                                 // delete newExpr->get_function();
    89                                 assert(newExpr->get_args().size()==2);
    90                                 newExpr->set_function( new NameExpr( "?=?" ) );
    91                                 funcDecl->get_statements()->get_kids().push_back( new ExprStmt( std::list< Label >(), newExpr ) );
    92                         }
    93                         break;
    94                   case CodeGen::OT_DTOR:
    95                         // intrinsic destructors should do nothing
    96                         // delete newExpr;
    97                         break;
    9881                  case CodeGen::OT_CONSTANT:
    9982                  case CodeGen::OT_LABELADDRESS:
  • src/Parser/DeclarationNode.cc

    rff98952 r4a368547  
    5757        variable.tyClass = NoTypeClass;
    5858        variable.assertions = nullptr;
     59        variable.initializer = nullptr;
    5960
    6061//      attr.name = nullptr;
     
    7071//      delete variable.name;
    7172        delete variable.assertions;
     73        delete variable.initializer;
    7274
    7375        delete type;
     
    101103        newnode->variable.tyClass = variable.tyClass;
    102104        newnode->variable.assertions = maybeClone( variable.assertions );
     105        newnode->variable.initializer = maybeClone( variable.initializer );
    103106
    104107//      newnode->attr.name = attr.name ? new string( *attr.name ) : nullptr;
     
    857860}
    858861
     862DeclarationNode * DeclarationNode::addTypeInitializer( DeclarationNode * init ) {
     863        assertf( variable.tyClass != NoTypeClass, "Called addTypeInitializer on something that isn't a type variable." );
     864        variable.initializer = init;
     865        return this;
     866}
     867
    859868DeclarationNode * DeclarationNode::cloneType( string * newName ) {
    860869        DeclarationNode * newnode = new DeclarationNode;
     
    10141023                assertf( sizeof(kindMap)/sizeof(kindMap[0] == NoTypeClass-1), "DeclarationNode::build: kindMap is out of sync." );
    10151024                assertf( variable.tyClass < sizeof(kindMap)/sizeof(kindMap[0]), "Variable's tyClass is out of bounds." );
    1016                 TypeDecl * ret = new TypeDecl( *name, Type::StorageClasses(), nullptr, kindMap[ variable.tyClass ] );
     1025                TypeDecl * ret = new TypeDecl( *name, Type::StorageClasses(), nullptr, kindMap[ variable.tyClass ], variable.initializer ? variable.initializer->buildType() : nullptr );
    10171026                buildList( variable.assertions, ret->get_assertions() );
    10181027                return ret;
  • src/Parser/ParseNode.h

    rff98952 r4a368547  
    274274        DeclarationNode * addIdList( DeclarationNode * list ); // old-style functions
    275275        DeclarationNode * addInitializer( InitializerNode * init );
     276        DeclarationNode * addTypeInitializer( DeclarationNode * init );
    276277
    277278        DeclarationNode * cloneType( std::string * newName );
     
    301302                DeclarationNode::TypeClass tyClass;
    302303                DeclarationNode * assertions;
     304                DeclarationNode * initializer;
    303305        };
    304306        Variable_t variable;
  • src/Parser/lex.ll

    rff98952 r4a368547  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Thu May 18 09:03:49 2017
    13  * Update Count     : 513
     12 * Last Modified On : Mon May 22 07:46:30 2017
     13 * Update Count     : 525
    1414 */
    1515
     
    377377"?"{op_binary_over}"?"  { IDENTIFIER_RETURN(); }                // binary
    378378        /*
    379           This rule handles ambiguous cases with operator identifiers, e.g., "int *?*?()", where the string "*?*?"
    380           can be lexed as "*"/"?*?" or "*?"/"*?". Since it is common practise to put a unary operator juxtaposed
    381           to an identifier, e.g., "*i", users will be annoyed if they cannot do this with respect to operator
    382           identifiers. Even with this special hack, there are 5 general cases that cannot be handled. The first
    383           case is for the function-call identifier "?()":
    384 
    385           int * ?()();  // declaration: space required after '*'
    386           * ?()();      // expression: space required after '*'
    387 
    388           Without the space, the string "*?()" is ambiguous without N character look ahead; it requires scanning
    389           ahead to determine if there is a '(', which is the start of an argument/parameter list.
    390 
    391           The 4 remaining cases occur in expressions:
    392 
    393           i++?i:0;              // space required before '?'
    394           i--?i:0;              // space required before '?'
    395           i?++i:0;              // space required after '?'
    396           i?--i:0;              // space required after '?'
    397 
    398           In the first two cases, the string "i++?" is ambiguous, where this string can be lexed as "i"/"++?" or
    399           "i++"/"?"; it requires scanning ahead to determine if there is a '(', which is the start of an argument
    400           list.  In the second two cases, the string "?++x" is ambiguous, where this string can be lexed as
    401           "?++"/"x" or "?"/"++x"; it requires scanning ahead to determine if there is a '(', which is the start of
    402           an argument list.
     379          This rule handles ambiguous cases with operator identifiers, e.g., "int *?*?()", where the string "*?*?"  can be
     380          lexed as "*?"/"*?" or "*"/"?*?". Since it is common practise to put a unary operator juxtaposed to an identifier,
     381          e.g., "*i", users will be annoyed if they cannot do this with respect to operator identifiers. Therefore, there is
     382          a lexical look-ahead for the second case, with backtracking to return the leading unary operator and then
     383          reparsing the trailing operator identifier.  Otherwise a space is needed between the unary operator and operator
     384          identifier to disambiguate this common case.
     385
     386          A similar issue occurs with the dereference, *?(...), and routine-call, ?()(...) identifiers.  The ambiguity
     387          occurs when the deference operator has no parameters, *?() and *?()(...), requiring arbitrary whitespace
     388          look-ahead for the routine-call parameter-list to disambiguate.  However, the dereference operator must have a
     389          parameter/argument to dereference *?(...).  Hence, always interpreting the string *?() as * ?() does not preclude
     390          any meaningful program.
     391
     392          The remaining cases are with the increment/decrement operators and conditional expression:
     393
     394          i++? ...(...);
     395          i?++ ...(...);
     396
     397          requiring arbitrary whitespace look-ahead for the operator parameter-list, even though that interpretation is an
     398      incorrect expression (juxtaposed identifiers).  Therefore, it is necessary to disambiguate these cases with a
     399      space:
     400
     401          i++ ? i : 0;
     402          i? ++i : 0;
    403403        */
    404 {op_unary}"?"({op_unary_pre_post}|"[?]"|{op_binary_over}"?") {
     404{op_unary}"?"({op_unary_pre_post}|"()"|"[?]"|{op_binary_over}"?") {
    405405        // 1 or 2 character unary operator ?
    406406        int i = yytext[1] == '?' ? 1 : 2;
  • src/Parser/parser.yy

    rff98952 r4a368547  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu May 18 18:06:17 2017
    13 // Update Count     : 2338
     12// Last Modified On : Thu May 25 15:21:59 2017
     13// Update Count     : 2398
    1414//
    1515
     
    159159}
    160160
    161 %type<tok> identifier  no_01_identifier  no_attr_identifier zero_one
    162 %type<tok> identifier_or_type_name  no_attr_identifier_or_type_name  no_01_identifier_or_type_name  attr_name
     161%type<tok> identifier  no_attr_identifier zero_one
     162%type<tok> identifier_or_type_name  no_attr_identifier_or_type_name  attr_name
    163163%type<constant> string_literal
    164164%type<str> string_literal_list
     
    207207%type<en>   bit_subrange_size_opt bit_subrange_size
    208208
    209 %type<decl> basic_declaration_specifier basic_type_name basic_type_specifier direct_type_name indirect_type_name
     209%type<decl> basic_declaration_specifier basic_type_name basic_type_specifier direct_type indirect_type
    210210
    211211%type<decl> trait_declaration trait_declaration_list trait_declaring_list trait_specifier
     
    261261%type<decl> type_declarator type_declarator_name type_declaring_list
    262262
    263 %type<decl> typedef typedef_type_specifier typedef_declaration typedef_declaration_specifier typedef_expression
     263%type<decl> type_declaration_specifier type_type_specifier type_name typegen_name
     264%type<decl> typedef typedef_declaration typedef_expression
    264265
    265266%type<decl> variable_type_redeclarator type_ptr type_array type_function
    266267
    267268%type<decl> type_parameter_redeclarator type_parameter_ptr type_parameter_array type_parameter_function
    268 %type<decl> typegen_declaration_specifier typegen_type_specifier typegen_name
    269 
    270 %type<decl> type_name type_name_no_function
    271 %type<decl> type_parameter type_parameter_list
    272 
    273 %type<en> type_name_list
     269
     270%type<decl> type type_no_function
     271%type<decl> type_parameter type_parameter_list type_initializer_opt
     272
     273%type<en> type_list
    274274
    275275%type<decl> type_qualifier type_qualifier_name type_qualifier_list_opt type_qualifier_list
     
    351351        IDENTIFIER
    352352        | ATTR_IDENTIFIER                                                                       // CFA
    353         | zero_one                                                                                      // CFA
    354         ;
    355 
    356 no_01_identifier:
    357         IDENTIFIER
    358         | ATTR_IDENTIFIER                                                                       // CFA
    359353        ;
    360354
    361355no_attr_identifier:
    362356        IDENTIFIER
    363         | zero_one                                                                                      // CFA
    364357        ;
    365358
     
    367360        ZERO
    368361        | ONE
    369         ;
     362        ;
    370363
    371364string_literal:
     
    395388        | '(' compound_statement ')'                                            // GCC, lambda expression
    396389                { $$ = new ExpressionNode( build_valexpr( $2 ) ); }
    397         | primary_expression '{' argument_expression_list '}' // CFA
     390        | primary_expression '{' argument_expression_list '}' // CFA, constructor call
    398391                {
    399392                        Token fn;
     
    401394                        $$ = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 ) ) ) );
    402395                }
     396        | type_name '.' no_attr_identifier                                      // CFA, nested type
     397                { $$ = nullptr; }                                                               // FIX ME
     398        | type_name '.' '[' push field_list pop ']'                     // CFA, nested type / tuple field selector
     399                { $$ = nullptr; }                                                               // FIX ME
    403400        ;
    404401
     
    431428        | postfix_expression DECR
    432429                { $$ = new ExpressionNode( build_unary_ptr( OperKinds::DecrPost, $1 ) ); }
    433         | '(' type_name_no_function ')' '{' initializer_list comma_opt '}' // C99, compound-literal
     430        | '(' type_no_function ')' '{' initializer_list comma_opt '}' // C99, compound-literal
    434431                { $$ = new ExpressionNode( build_compoundLiteral( $2, new InitializerNode( $5, true ) ) ); }
    435432        | '^' primary_expression '{' argument_expression_list '}' // CFA
     
    483480        | no_attr_identifier fraction_constants
    484481                {
    485                         if( (*$1) == "0" || (*$1) == "1" ) {
    486                                 $$ = new ExpressionNode( build_field_name_fraction_constants( build_constantZeroOne( *$1 ), $2 ) );
    487                         } else {
    488                                 $$ = new ExpressionNode( build_field_name_fraction_constants( build_varref( $1 ), $2 ) );
    489                         }
     482                        $$ = new ExpressionNode( build_field_name_fraction_constants( build_varref( $1 ), $2 ) );
     483                }
     484        | zero_one fraction_constants
     485                {
     486                        $$ = new ExpressionNode( build_field_name_fraction_constants( build_constantZeroOne( *$1 ), $2 ) );
    490487                }
    491488        ;
     
    535532        | SIZEOF unary_expression
    536533                { $$ = new ExpressionNode( build_sizeOfexpr( $2 ) ); }
    537         | SIZEOF '(' type_name_no_function ')'
     534        | SIZEOF '(' type_no_function ')'
    538535                { $$ = new ExpressionNode( build_sizeOftype( $3 ) ); }
    539536        | ALIGNOF unary_expression                                                      // GCC, variable alignment
    540537                { $$ = new ExpressionNode( build_alignOfexpr( $2 ) ); }
    541         | ALIGNOF '(' type_name_no_function ')'                         // GCC, type alignment
     538        | ALIGNOF '(' type_no_function ')'                              // GCC, type alignment
    542539                { $$ = new ExpressionNode( build_alignOftype( $3 ) ); }
    543         | OFFSETOF '(' type_name_no_function ',' no_attr_identifier ')'
     540        | OFFSETOF '(' type_no_function ',' no_attr_identifier ')'
    544541                { $$ = new ExpressionNode( build_offsetOf( $3, build_varref( $5 ) ) ); }
    545542        | ATTR_IDENTIFIER
     
    547544        | ATTR_IDENTIFIER '(' argument_expression ')'
    548545                { $$ = new ExpressionNode( build_attrexpr( build_varref( $1 ), $3 ) ); }
    549         | ATTR_IDENTIFIER '(' type_name ')'
     546        | ATTR_IDENTIFIER '(' type ')'
    550547                { $$ = new ExpressionNode( build_attrtype( build_varref( $1 ), $3 ) ); }
    551548//      | ANDAND IDENTIFIER                                                                     // GCC, address of label
     
    569566cast_expression:
    570567        unary_expression
    571         | '(' type_name_no_function ')' cast_expression
     568        | '(' type_no_function ')' cast_expression
    572569                { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
    573 //      | '(' type_name_no_function ')' tuple
     570//      | '(' type_no_function ')' tuple
    574571//              { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
    575572        ;
     
    658655        | logical_OR_expression '?' /* empty */ ':' conditional_expression // GCC, omitted first operand
    659656                { $$ = new ExpressionNode( build_cond( $1, $1, $4 ) ); }
    660 //      | logical_OR_expression '?' comma_expression ':' tuple // CFA, tuple expression
    661 //              { $$ = new ExpressionNode( build_cond( $1, $3, $5 ) ); }
    662657        ;
    663658
     
    671666        | unary_expression assignment_operator assignment_expression
    672667                { $$ = new ExpressionNode( build_binary_ptr( $2, $1, $3 ) ); }
    673 //      | tuple assignment_opt                                                          // CFA, tuple expression
    674 //              { $$ = ( $2 == 0 ) ? $1 : new ExpressionNode( build_binary_ptr( OperKinds::Assign, $1, $2 ) ); }
    675668        ;
    676669
     
    13521345        basic_declaration_specifier
    13531346        | sue_declaration_specifier
    1354         | typedef_declaration_specifier
    1355         | typegen_declaration_specifier
     1347        | type_declaration_specifier
    13561348        ;
    13571349
     
    13641356        basic_declaration_specifier
    13651357        | sue_declaration_specifier_nobody
    1366         | typedef_declaration_specifier
    1367         | typegen_declaration_specifier
     1358        | type_declaration_specifier
    13681359        ;
    13691360
     
    13711362        basic_type_specifier
    13721363        | sue_type_specifier
    1373         | typedef_type_specifier
    1374         | typegen_type_specifier
     1364        | type_type_specifier
    13751365        ;
    13761366
     
    13831373        basic_type_specifier
    13841374        | sue_type_specifier_nobody
    1385         | typedef_type_specifier
    1386         | typegen_type_specifier
     1375        | type_type_specifier
    13871376        ;
    13881377
     
    15191508
    15201509basic_type_specifier:
    1521         direct_type_name
    1522         | type_qualifier_list_opt indirect_type_name type_qualifier_list_opt
     1510        direct_type
     1511        | type_qualifier_list_opt indirect_type type_qualifier_list_opt
    15231512                { $$ = $2->addQualifiers( $1 )->addQualifiers( $3 ); }
    15241513        ;
    15251514
    1526 direct_type_name:
     1515direct_type:
    15271516                // A semantic check is necessary for conflicting type qualifiers.
    15281517        basic_type_name
    15291518        | type_qualifier_list basic_type_name
    15301519                { $$ = $2->addQualifiers( $1 ); }
    1531         | direct_type_name type_qualifier
     1520        | direct_type type_qualifier
    15321521                { $$ = $1->addQualifiers( $2 ); }
    1533         | direct_type_name basic_type_name
     1522        | direct_type basic_type_name
    15341523                { $$ = $1->addType( $2 ); }
    15351524        ;
    15361525
    1537 indirect_type_name:
    1538         TYPEOF '(' type_name ')'                                                        // GCC: typeof(x) y;
     1526indirect_type:
     1527        TYPEOF '(' type ')'                                                                     // GCC: typeof(x) y;
    15391528                { $$ = $3; }
    15401529        | TYPEOF '(' comma_expression ')'                                       // GCC: typeof(a+b) y;
    15411530                { $$ = DeclarationNode::newTypeof( $3 ); }
    1542         | ATTR_TYPEGENname '(' type_name ')'                            // CFA: e.g., @type(x) y;
     1531        | ATTR_TYPEGENname '(' type ')'                                         // CFA: e.g., @type(x) y;
    15431532                { $$ = DeclarationNode::newAttr( $1, $3 ); }
    15441533        | ATTR_TYPEGENname '(' comma_expression ')'                     // CFA: e.g., @type(a+b) y;
     
    15841573        ;
    15851574
    1586 typedef_declaration_specifier:
    1587         typedef_type_specifier
    1588         | declaration_qualifier_list typedef_type_specifier
     1575type_declaration_specifier:
     1576        type_type_specifier
     1577        | declaration_qualifier_list type_type_specifier
    15891578                { $$ = $2->addQualifiers( $1 ); }
    1590         | typedef_declaration_specifier storage_class           // remaining OBSOLESCENT (see 2)
     1579        | type_declaration_specifier storage_class                      // remaining OBSOLESCENT (see 2)
    15911580                { $$ = $1->addQualifiers( $2 ); }
    1592         | typedef_declaration_specifier storage_class type_qualifier_list
     1581        | type_declaration_specifier storage_class type_qualifier_list
    15931582                { $$ = $1->addQualifiers( $2 )->addQualifiers( $3 ); }
    15941583        ;
    15951584
    1596 typedef_type_specifier:                                                                 // typedef types
     1585type_type_specifier:                                                                    // typedef types
     1586        type_name
     1587        | type_qualifier_list type_name
     1588                { $$ = $2->addQualifiers( $1 ); }
     1589        | type_type_specifier type_qualifier
     1590                { $$ = $1->addQualifiers( $2 ); }
     1591        ;
     1592
     1593type_name:
    15971594        TYPEDEFname
    15981595                { $$ = DeclarationNode::newFromTypedef( $1 ); }
    1599         | type_qualifier_list TYPEDEFname
    1600                 { $$ = DeclarationNode::newFromTypedef( $2 )->addQualifiers( $1 ); }
    1601         | typedef_type_specifier type_qualifier
    1602                 { $$ = $1->addQualifiers( $2 ); }
     1596        | '.' TYPEDEFname
     1597                { $$ = DeclarationNode::newFromTypedef( $2 ); } // FIX ME
     1598        | type_name '.' TYPEDEFname
     1599                { $$ = DeclarationNode::newFromTypedef( $3 ); } // FIX ME
     1600        | typegen_name
     1601        | '.' typegen_name
     1602                { $$ = $2; }                                                                    // FIX ME
     1603        | type_name '.' typegen_name
     1604                { $$ = $3; }                                                                    // FIX ME
     1605        ;
     1606
     1607typegen_name:                                                                                   // CFA
     1608        TYPEGENname '(' ')'
     1609                { $$ = DeclarationNode::newFromTypeGen( $1, nullptr ); }
     1610        | TYPEGENname '(' type_list ')'
     1611                { $$ = DeclarationNode::newFromTypeGen( $1, $3 ); }
    16031612        ;
    16041613
     
    16241633          '{' field_declaration_list '}'
    16251634                { $$ = DeclarationNode::newAggregate( $1, $3, nullptr, $6, true )->addQualifiers( $2 ); }
    1626         | aggregate_key attribute_list_opt '(' type_name_list ')' '{' field_declaration_list '}' // CFA
     1635        | aggregate_key attribute_list_opt '(' type_list ')' '{' field_declaration_list '}' // CFA
    16271636                { $$ = DeclarationNode::newAggregate( $1, new string( DeclarationNode::anonymous.newName() ), $4, $7, false )->addQualifiers( $2 ); }
    16281637        | aggregate_type_nobody
     
    16301639
    16311640aggregate_type_nobody:                                                                  // struct, union - {...}
    1632         aggregate_key attribute_list_opt no_attr_identifier_or_type_name
     1641        aggregate_key attribute_list_opt no_attr_identifier
    16331642                {
    16341643                        typedefTable.makeTypedef( *$3 );
    16351644                        $$ = DeclarationNode::newAggregate( $1, $3, nullptr, nullptr, false )->addQualifiers( $2 );
    16361645                }
    1637         | aggregate_key attribute_list_opt typegen_name         // CFA, S/R conflict
     1646        | aggregate_key attribute_list_opt TYPEDEFname
     1647                {
     1648                        typedefTable.makeTypedef( *$3 );
     1649                        $$ = DeclarationNode::newAggregate( $1, $3, nullptr, nullptr, false )->addQualifiers( $2 );
     1650                }
     1651        | aggregate_key attribute_list_opt typegen_name         // CFA
    16381652                { $$ = $3->addQualifiers( $2 ); }
    16391653        ;
     
    18731887        ;
    18741888
    1875 no_01_identifier_or_type_name:
    1876         no_01_identifier
    1877         | TYPEDEFname
    1878         | TYPEGENname
    1879         ;
    1880 
    18811889no_attr_identifier_or_type_name:
    18821890        no_attr_identifier
     
    18851893        ;
    18861894
    1887 type_name_no_function:                                                                  // sizeof, alignof, cast (constructor)
     1895type_no_function:                                                                               // sizeof, alignof, cast (constructor)
    18881896        cfa_abstract_declarator_tuple                                           // CFA
    18891897        | type_specifier
     
    18921900        ;
    18931901
    1894 type_name:                                                                                              // typeof, assertion
    1895         type_name_no_function
     1902type:                                                                                                   // typeof, assertion
     1903        type_no_function
    18961904        | cfa_abstract_function                                                         // CFA
    18971905        ;
     
    19331941designation:
    19341942        designator_list ':'                                                                     // C99, CFA uses ":" instead of "="
    1935         | no_attr_identifier_or_type_name ':'                           // GCC, field name
     1943        | no_attr_identifier ':'                                                        // GCC, field name
    19361944                { $$ = new ExpressionNode( build_varref( $1 ) ); }
    19371945        ;
     
    19451953
    19461954designator:
    1947         '.' no_attr_identifier_or_type_name                                     // C99, field name
     1955        '.' no_attr_identifier                                                          // C99, field name
    19481956                { $$ = new ExpressionNode( build_varref( $2 ) ); }
    19491957        | '[' push assignment_expression pop ']'                        // C99, single array element
     
    19761984//     on type arguments of polymorphic functions.
    19771985
    1978 typegen_declaration_specifier:                                                  // CFA
    1979         typegen_type_specifier
    1980         | declaration_qualifier_list typegen_type_specifier
    1981                 { $$ = $2->addQualifiers( $1 ); }
    1982         | typegen_declaration_specifier storage_class           // remaining OBSOLESCENT (see 2)
    1983                 { $$ = $1->addQualifiers( $2 ); }
    1984         | typegen_declaration_specifier storage_class type_qualifier_list
    1985                 { $$ = $1->addQualifiers( $2 )->addQualifiers( $3 ); }
    1986         ;
    1987 
    1988 typegen_type_specifier:                                                                 // CFA
    1989         typegen_name
    1990         | type_qualifier_list typegen_name
    1991                 { $$ = $2->addQualifiers( $1 ); }
    1992         | typegen_type_specifier type_qualifier
    1993                 { $$ = $1->addQualifiers( $2 ); }
    1994         ;
    1995 
    1996 typegen_name:                                                                                   // CFA
    1997         TYPEGENname '(' type_name_list ')'
    1998                 { $$ = DeclarationNode::newFromTypeGen( $1, $3 ); }
    1999         ;
    2000 
    20011986type_parameter_list:                                                                    // CFA
    2002         type_parameter assignment_opt
    2003         | type_parameter_list ',' type_parameter assignment_opt
     1987        type_parameter
     1988                { $$ = $1; }
     1989        | type_parameter_list ',' type_parameter
    20041990                { $$ = $1->appendList( $3 ); }
     1991        ;
     1992
     1993type_initializer_opt:                                                                   // CFA
     1994        // empty
     1995                { $$ = nullptr; }
     1996        | '=' type
     1997                { $$ = $2; }
    20051998        ;
    20061999
     
    20082001        type_class no_attr_identifier_or_type_name
    20092002                { typedefTable.addToEnclosingScope( *$2, TypedefTable::TD ); }
    2010           assertion_list_opt
    2011                 { $$ = DeclarationNode::newTypeParam( $1, $2 )->addAssertions( $4 ); }
     2003          type_initializer_opt assertion_list_opt
     2004                { $$ = DeclarationNode::newTypeParam( $1, $2 )->addTypeInitializer( $4 )->addAssertions( $5 ); }
    20122005        | type_specifier identifier_parameter_declarator
    20132006        ;
     
    20322025
    20332026assertion:                                                                                              // CFA
    2034         '|' no_attr_identifier_or_type_name '(' type_name_list ')'
     2027        '|' no_attr_identifier_or_type_name '(' type_list ')'
    20352028                {
    20362029                        typedefTable.openTrait( *$2 );
     
    20392032        | '|' '{' push trait_declaration_list '}'
    20402033                { $$ = $4; }
    2041         | '|' '(' push type_parameter_list pop ')' '{' push trait_declaration_list '}' '(' type_name_list ')'
     2034        | '|' '(' push type_parameter_list pop ')' '{' push trait_declaration_list '}' '(' type_list ')'
    20422035                { $$ = nullptr; }
    20432036        ;
    20442037
    2045 type_name_list:                                                                                 // CFA
    2046         type_name
     2038type_list:                                                                                              // CFA
     2039        type
    20472040                { $$ = new ExpressionNode( build_typevalue( $1 ) ); }
    20482041        | assignment_expression
    2049         | type_name_list ',' type_name
     2042        | type_list ',' type
    20502043                { $$ = (ExpressionNode *)( $1->set_last( new ExpressionNode( build_typevalue( $3 ) ) ) ); }
    2051         | type_name_list ',' assignment_expression
     2044        | type_list ',' assignment_expression
    20522045                { $$ = (ExpressionNode *)( $1->set_last( $3 )); }
    20532046        ;
     
    20652058        type_declarator_name assertion_list_opt
    20662059                { $$ = $1->addAssertions( $2 ); }
    2067         | type_declarator_name assertion_list_opt '=' type_name
     2060        | type_declarator_name assertion_list_opt '=' type
    20682061                { $$ = $1->addAssertions( $2 )->addType( $4 ); }
    20692062        ;
     
    20752068                        $$ = DeclarationNode::newTypeDecl( $1, 0 );
    20762069                }
    2077         | no_01_identifier_or_type_name '(' push type_parameter_list pop ')'
     2070        | no_attr_identifier_or_type_name '(' push type_parameter_list pop ')'
    20782071                {
    20792072                        typedefTable.addToEnclosingScope( *$1, TypedefTable::TG );
     
    21012094        ;
    21022095
    2103 trait_declaration_list:                                                         // CFA
     2096trait_declaration_list:                                                                 // CFA
    21042097        trait_declaration
    21052098        | trait_declaration_list push trait_declaration
     
    21072100        ;
    21082101
    2109 trait_declaration:                                                                      // CFA
     2102trait_declaration:                                                                              // CFA
    21102103        cfa_trait_declaring_list pop ';'
    21112104        | trait_declaring_list pop ';'
  • src/ResolvExpr/AlternativeFinder.cc

    rff98952 r4a368547  
    627627                TypeEnvironment resultEnv;
    628628                makeUnifiableVars( funcType, openVars, resultNeed );
     629                resultEnv.add( funcType->get_forall() ); // add all type variables as open variables now so that those not used in the parameter list are still considered open
    629630                AltList instantiatedActuals; // filled by instantiate function
    630631                if ( targetType && ! targetType->isVoid() && ! funcType->get_returnVals().empty() ) {
  • src/ResolvExpr/CastCost.cc

    rff98952 r4a368547  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // CastCost.cc -- 
     7// CastCost.cc --
    88//
    99// Author           : Richard C. Bilson
     
    2626          public:
    2727                CastCost( Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env );
    28  
     28
    2929                virtual void visit( BasicType *basicType );
    3030                virtual void visit( PointerType *pointerType );
     
    3636                        NamedTypeDecl *namedType;
    3737                        if ( env.lookup( destAsTypeInst->get_name(), eqvClass ) ) {
    38                                 return castCost( src, eqvClass.type, indexer, env );
     38                                if ( eqvClass.type ) {
     39                                        return castCost( src, eqvClass.type, indexer, env );
     40                                } else {
     41                                        return Cost::infinity;
     42                                }
    3943                        } else if ( ( namedType = indexer.lookupType( destAsTypeInst->get_name() ) ) ) {
    4044                                TypeDecl *type = dynamic_cast< TypeDecl* >( namedType );
  • src/ResolvExpr/ConversionCost.cc

    rff98952 r4a368547  
    3030///     std::cout << "type inst " << destAsTypeInst->get_name();
    3131                        if ( env.lookup( destAsTypeInst->get_name(), eqvClass ) ) {
    32                                 return conversionCost( src, eqvClass.type, indexer, env );
     32                                if ( eqvClass.type ) {
     33                                        return conversionCost( src, eqvClass.type, indexer, env );
     34                                } else {
     35                                        return Cost::infinity;
     36                                }
    3337                        } else if ( ( namedType = indexer.lookupType( destAsTypeInst->get_name() ) ) ) {
    3438///       std::cout << " found" << std::endl;
  • src/ResolvExpr/Resolver.cc

    rff98952 r4a368547  
    124124                        } // if
    125125#endif
    126                         assert( finder.get_alternatives().size() == 1 );
     126                        assertf( finder.get_alternatives().size() == 1, "findSingleExpression: must have exactly one alternative at the end." );
    127127                        Alternative &choice = finder.get_alternatives().front();
    128128                        Expression *newExpr = choice.expr->clone();
     
    397397                        // //   cerr << type << endl;
    398398                        // // } // for
    399                        
     399
    400400                        // // O(N^2) checks of d-types with f-types
    401401                        // // find the minimum cost
  • src/ResolvExpr/Unify.cc

    rff98952 r4a368547  
    344344                std::cerr << "unifyInexact type 1 is ";
    345345                type1->print( std::cerr );
    346                 std::cerr << "type 2 is ";
     346                std::cerr << " type 2 is ";
    347347                type2->print( std::cerr );
    348348                std::cerr << std::endl;
     
    595595                        TypeExpr *otherParam = dynamic_cast< TypeExpr* >(*jt);
    596596                        assertf(otherParam, "Aggregate parameters should be type expressions");
    597                        
     597
    598598                        Type* paramTy = param->get_type();
    599599                        Type* otherParamTy = otherParam->get_type();
  • src/SymTab/FixFunction.cc

    rff98952 r4a368547  
    2424
    2525        DeclarationWithType * FixFunction::mutate(FunctionDecl *functionDecl) {
    26                 ObjectDecl *pointer = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClasses(), functionDecl->get_linkage(), 0, new PointerType( Type::Qualifiers(), functionDecl->get_type()->clone() ), 0, functionDecl->get_attributes() );
     26                ObjectDecl *pointer = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClasses(), functionDecl->get_linkage(), 0, new PointerType( Type::Qualifiers(), functionDecl->get_type() ), 0, functionDecl->get_attributes() );
    2727                functionDecl->get_attributes().clear();
     28                // can't delete function type because it may contain assertions, but can't transfer ownership without a clone since set_type checks for nullptr
     29                functionDecl->set_type( functionDecl->get_type()->clone() );
    2830                delete functionDecl;
    2931                return pointer;
  • src/SymTab/Indexer.cc

    rff98952 r4a368547  
    124124                        };
    125125                        // properties for this type
    126                         bool userDefinedFunc = false; // any user-defined function found
    127                         bool userDefinedCtor = false; // any user-defined constructor found
    128                         bool userDefinedDtor = false; // any user-defined destructor found
    129                         bool userDefinedCopyFunc = false; // user-defined copy ctor found
     126                        bool existsUserDefinedFunc = false;    // any user-defined function found
     127                        bool existsUserDefinedCtor = false;    // any user-defined constructor found
     128                        bool existsUserDefinedDtor = false;    // any user-defined destructor found
     129                        bool existsUserDefinedCopyFunc = false;    // user-defined copy ctor found
     130                        bool existsUserDefinedDefaultCtor = false; // user-defined default ctor found
    130131                        std::list< DeclBall > decls;
    131132
     
    138139                                bool isCopyFunc = InitTweak::isCopyFunction( function, function->get_name() );
    139140                                decls.push_back( DeclBall{ function, isUserDefinedFunc, isDefaultCtor, isDtor, isCopyFunc } );
    140                                 userDefinedFunc = userDefinedFunc || isUserDefinedFunc;
    141                                 userDefinedCtor = userDefinedCtor || (isUserDefinedFunc && InitTweak::isConstructor( function->get_name() ) );
    142                                 userDefinedDtor = userDefinedDtor || (isUserDefinedFunc && isDtor);
    143                                 userDefinedCopyFunc = userDefinedCopyFunc || (isUserDefinedFunc && isCopyFunc);
     141                                existsUserDefinedFunc = existsUserDefinedFunc || isUserDefinedFunc;
     142                                existsUserDefinedCtor = existsUserDefinedCtor || (isUserDefinedFunc && InitTweak::isConstructor( function->get_name() ) );
     143                                existsUserDefinedDtor = existsUserDefinedDtor || (isUserDefinedFunc && isDtor);
     144                                existsUserDefinedCopyFunc = existsUserDefinedCopyFunc || (isUserDefinedFunc && isCopyFunc);
     145                                existsUserDefinedDefaultCtor = existsUserDefinedDefaultCtor || (isUserDefinedFunc && isDefaultCtor);
    144146                                return *this;
    145147                        }
     
    163165                }
    164166
    165                 // if a type contains user defined ctor/dtors, then special rules trigger, which determine
    166                 // the set of ctor/dtors that are seen by the requester. In particular, if the user defines
     167                // if a type contains user defined ctor/dtor/assign, then special rules trigger, which determine
     168                // the set of ctor/dtor/assign that are seen by the requester. In particular, if the user defines
    167169                // a default ctor, then the generated default ctor should never be seen, likewise for copy ctor
    168170                // and dtor. If the user defines any ctor/dtor, then no generated field ctors should be seen.
    169                 // If the user defines any ctor then the generated default ctor should not be seen.
     171                // If the user defines any ctor then the generated default ctor should not be seen (intrinsic default
     172                // ctor must be overridden exactly).
    170173                for ( std::pair< const std::string, ValueType > & pair : funcMap ) {
    171174                        ValueType & val = pair.second;
    172175                        for ( ValueType::DeclBall ball : val.decls ) {
    173                                 if ( ! val.userDefinedFunc || ball.isUserDefinedFunc || (! val.userDefinedCtor && ball.isDefaultCtor) || (! val.userDefinedCopyFunc && ball.isCopyFunc) || (! val.userDefinedDtor && ball.isDtor) ) {
     176                                bool noUserDefinedFunc = ! val.existsUserDefinedFunc;
     177                                bool isUserDefinedFunc = ball.isUserDefinedFunc;
     178                                bool isAcceptableDefaultCtor = (! val.existsUserDefinedCtor || (! val.existsUserDefinedDefaultCtor && ball.decl->get_linkage() == LinkageSpec::Intrinsic)) && ball.isDefaultCtor; // allow default constructors only when no user-defined constructors exist, except in the case of intrinsics, which require exact overrides
     179                                bool isAcceptableCopyFunc = ! val.existsUserDefinedCopyFunc && ball.isCopyFunc; // handles copy ctor and assignment operator
     180                                bool isAcceptableDtor = ! val.existsUserDefinedDtor && ball.isDtor;
     181                                if ( noUserDefinedFunc || isUserDefinedFunc || isAcceptableDefaultCtor || isAcceptableCopyFunc || isAcceptableDtor ) {
    174182                                        // decl conforms to the rules described above, so it should be seen by the requester
    175183                                        out.push_back( ball.decl );
     
    277285                addType( typeDecl );
    278286                acceptAll( typeDecl->get_assertions(), *this );
     287                acceptNewScope( typeDecl->get_init(), *this );
    279288        }
    280289
  • src/SymTab/Validate.cc

    rff98952 r4a368547  
    506506        void LinkReferenceToTypes::visit( StructDecl *structDecl ) {
    507507                // visit struct members first so that the types of self-referencing members are updated properly
     508                // xxx - need to ensure that type parameters match up between forward declarations and definition (most importantly, number of type parameters and and their defaults)
    508509                Parent::visit( structDecl );
    509510                if ( ! structDecl->get_members().empty() ) {
     
    844845                if ( params != NULL ) {
    845846                        std::list< Expression * > & args = inst->get_parameters();
     847
     848                        // insert defaults arguments when a type argument is missing (currently only supports missing arguments at the end of the list).
     849                        // A substitution is used to ensure that defaults are replaced correctly, e.g.,
     850                        //   forall(otype T, otype alloc = heap_allocator(T)) struct vector;
     851                        //   vector(int) v;
     852                        // after insertion of default values becomes
     853                        //   vector(int, heap_allocator(T))
     854                        // and the substitution is built with T=int so that after substitution, the result is
     855                        //   vector(int, heap_allocator(int))
     856                        TypeSubstitution sub;
     857                        auto paramIter = params->begin();
     858                        for ( size_t i = 0; paramIter != params->end(); ++paramIter, ++i ) {
     859                                if ( i < args.size() ) {
     860                                        TypeExpr * expr = safe_dynamic_cast< TypeExpr * >( *std::next( args.begin(), i ) );
     861                                        sub.add( (*paramIter)->get_name(), expr->get_type()->clone() );
     862                                } else if ( i == args.size() ) {
     863                                        Type * defaultType = (*paramIter)->get_init();
     864                                        if ( defaultType ) {
     865                                                args.push_back( new TypeExpr( defaultType->clone() ) );
     866                                                sub.add( (*paramIter)->get_name(), defaultType->clone() );
     867                                        }
     868                                }
     869                        }
     870
     871                        sub.apply( inst );
    846872                        if ( args.size() < params->size() ) throw SemanticError( "Too few type arguments in generic type ", inst );
    847873                        if ( args.size() > params->size() ) throw SemanticError( "Too many type arguments in generic type ", inst );
  • src/SynTree/Declaration.h

    rff98952 r4a368547  
    194194        };
    195195
    196         TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind );
     196        TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, Type * init = nullptr );
    197197        TypeDecl( const TypeDecl &other );
     198        virtual ~TypeDecl();
    198199
    199200        Kind get_kind() const { return kind; }
     201
     202        Type * get_init() const { return init; }
     203        TypeDecl * set_init( Type * newValue ) { init = newValue; return this; }
    200204
    201205        bool isComplete() const { return kind == Any || sized; }
     
    209213        virtual void accept( Visitor &v ) { v.visit( this ); }
    210214        virtual TypeDecl *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     215        virtual void print( std::ostream &os, int indent = 0 ) const;
     216
    211217  private:
    212218        Kind kind;
     219        Type * init;
    213220        bool sized;
    214221};
  • src/SynTree/Mutator.cc

    rff98952 r4a368547  
    7777TypeDecl *Mutator::mutate( TypeDecl *typeDecl ) {
    7878        handleNamedTypeDecl( typeDecl );
     79        typeDecl->set_init( maybeMutate( typeDecl->get_init(), *this ) );
    7980        return typeDecl;
    8081}
  • src/SynTree/TypeDecl.cc

    rff98952 r4a368547  
    1818#include "Common/utility.h"
    1919
    20 TypeDecl::TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind ) : Parent( name, scs, type ), kind( kind ), sized( kind == Any || kind == Ttype ) {
     20TypeDecl::TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, Type * init ) : Parent( name, scs, type ), kind( kind ), init( init ), sized( kind == Any || kind == Ttype ) {
    2121}
    2222
    23 TypeDecl::TypeDecl( const TypeDecl &other ) : Parent( other ), kind( other.kind ), sized( other.sized ) {
     23TypeDecl::TypeDecl( const TypeDecl &other ) : Parent( other ), kind( other.kind ), init( maybeClone( other.init ) ), sized( other.sized ) {
     24}
     25
     26TypeDecl::~TypeDecl() {
     27  delete init;
    2428}
    2529
     
    3438}
    3539
     40void TypeDecl::print( std::ostream &os, int indent ) const {
     41  NamedTypeDecl::print( os, indent );
     42  if ( init ) {
     43    os << std::endl << std::string( indent, ' ' ) << "with type initializer: ";
     44    init->print( os, indent + 2 );
     45  }
     46}
     47
     48
    3649std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data ) {
    3750  return os << data.kind << ", " << data.isComplete;
  • src/SynTree/Visitor.cc

    rff98952 r4a368547  
    6767void Visitor::visit( TypeDecl *typeDecl ) {
    6868        handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );
     69        maybeAccept( typeDecl->get_init(), *this );
    6970}
    7071
  • src/Tuples/TupleExpansion.cc

    rff98952 r4a368547  
    332332        TypeInstType * isTtype( Type * type ) {
    333333                if ( TypeInstType * inst = dynamic_cast< TypeInstType * >( type ) ) {
    334                         if ( inst->get_baseType()->get_kind() == TypeDecl::Ttype ) {
     334                        if ( inst->get_baseType() && inst->get_baseType()->get_kind() == TypeDecl::Ttype ) {
    335335                                return inst;
    336336                        }
  • src/libcfa/Makefile.am

    rff98952 r4a368547  
    4141CC = ${abs_top_srcdir}/src/driver/cfa
    4242
    43 headers = limits stdlib math iostream fstream iterator rational assert containers/pair containers/vector
     43headers = assert fstream iostream iterator limits math rational stdlib \
     44          containers/maybe containers/pair containers/result containers/vector
    4445
    4546# not all platforms support concurrency, add option do disable it
  • src/libcfa/Makefile.in

    rff98952 r4a368547  
    9898libcfa_d_a_LIBADD =
    9999am__libcfa_d_a_SOURCES_DIST = libcfa-prelude.c interpose.c \
    100         libhdr/libdebug.c limits.c stdlib.c math.c iostream.c \
    101         fstream.c iterator.c rational.c assert.c containers/pair.c \
    102         containers/vector.c concurrency/coroutine.c \
    103         concurrency/thread.c concurrency/kernel.c \
    104         concurrency/monitor.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
    105         concurrency/invoke.c
     100        libhdr/libdebug.c assert.c fstream.c iostream.c iterator.c \
     101        limits.c math.c rational.c stdlib.c containers/maybe.c \
     102        containers/pair.c containers/result.c containers/vector.c \
     103        concurrency/coroutine.c concurrency/thread.c \
     104        concurrency/kernel.c concurrency/monitor.c \
     105        concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
    106106am__dirstamp = $(am__leading_dot)dirstamp
    107107@BUILD_CONCURRENCY_TRUE@am__objects_1 = concurrency/libcfa_d_a-coroutine.$(OBJEXT) \
     
    109109@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-kernel.$(OBJEXT) \
    110110@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-monitor.$(OBJEXT)
    111 am__objects_2 = libcfa_d_a-limits.$(OBJEXT) \
    112         libcfa_d_a-stdlib.$(OBJEXT) libcfa_d_a-math.$(OBJEXT) \
    113         libcfa_d_a-iostream.$(OBJEXT) libcfa_d_a-fstream.$(OBJEXT) \
    114         libcfa_d_a-iterator.$(OBJEXT) libcfa_d_a-rational.$(OBJEXT) \
    115         libcfa_d_a-assert.$(OBJEXT) \
     111am__objects_2 = libcfa_d_a-assert.$(OBJEXT) \
     112        libcfa_d_a-fstream.$(OBJEXT) libcfa_d_a-iostream.$(OBJEXT) \
     113        libcfa_d_a-iterator.$(OBJEXT) libcfa_d_a-limits.$(OBJEXT) \
     114        libcfa_d_a-math.$(OBJEXT) libcfa_d_a-rational.$(OBJEXT) \
     115        libcfa_d_a-stdlib.$(OBJEXT) \
     116        containers/libcfa_d_a-maybe.$(OBJEXT) \
    116117        containers/libcfa_d_a-pair.$(OBJEXT) \
     118        containers/libcfa_d_a-result.$(OBJEXT) \
    117119        containers/libcfa_d_a-vector.$(OBJEXT) $(am__objects_1)
    118120@BUILD_CONCURRENCY_TRUE@am__objects_3 = concurrency/CtxSwitch-@MACHINE_TYPE@.$(OBJEXT) \
     
    127129libcfa_a_LIBADD =
    128130am__libcfa_a_SOURCES_DIST = libcfa-prelude.c interpose.c \
    129         libhdr/libdebug.c limits.c stdlib.c math.c iostream.c \
    130         fstream.c iterator.c rational.c assert.c containers/pair.c \
    131         containers/vector.c concurrency/coroutine.c \
    132         concurrency/thread.c concurrency/kernel.c \
    133         concurrency/monitor.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
    134         concurrency/invoke.c
     131        libhdr/libdebug.c assert.c fstream.c iostream.c iterator.c \
     132        limits.c math.c rational.c stdlib.c containers/maybe.c \
     133        containers/pair.c containers/result.c containers/vector.c \
     134        concurrency/coroutine.c concurrency/thread.c \
     135        concurrency/kernel.c concurrency/monitor.c \
     136        concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
    135137@BUILD_CONCURRENCY_TRUE@am__objects_5 = concurrency/libcfa_a-coroutine.$(OBJEXT) \
    136138@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-thread.$(OBJEXT) \
    137139@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-kernel.$(OBJEXT) \
    138140@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-monitor.$(OBJEXT)
    139 am__objects_6 = libcfa_a-limits.$(OBJEXT) libcfa_a-stdlib.$(OBJEXT) \
    140         libcfa_a-math.$(OBJEXT) libcfa_a-iostream.$(OBJEXT) \
    141         libcfa_a-fstream.$(OBJEXT) libcfa_a-iterator.$(OBJEXT) \
    142         libcfa_a-rational.$(OBJEXT) libcfa_a-assert.$(OBJEXT) \
     141am__objects_6 = libcfa_a-assert.$(OBJEXT) libcfa_a-fstream.$(OBJEXT) \
     142        libcfa_a-iostream.$(OBJEXT) libcfa_a-iterator.$(OBJEXT) \
     143        libcfa_a-limits.$(OBJEXT) libcfa_a-math.$(OBJEXT) \
     144        libcfa_a-rational.$(OBJEXT) libcfa_a-stdlib.$(OBJEXT) \
     145        containers/libcfa_a-maybe.$(OBJEXT) \
    143146        containers/libcfa_a-pair.$(OBJEXT) \
     147        containers/libcfa_a-result.$(OBJEXT) \
    144148        containers/libcfa_a-vector.$(OBJEXT) $(am__objects_5)
    145149@BUILD_CONCURRENCY_TRUE@am__objects_7 = concurrency/CtxSwitch-@MACHINE_TYPE@.$(OBJEXT) \
     
    179183DIST_SOURCES = $(am__libcfa_d_a_SOURCES_DIST) \
    180184        $(am__libcfa_a_SOURCES_DIST)
    181 am__nobase_cfa_include_HEADERS_DIST = limits stdlib math iostream \
    182         fstream iterator rational assert containers/pair \
    183         containers/vector concurrency/coroutine concurrency/thread \
    184         concurrency/kernel concurrency/monitor ${shell echo stdhdr/*} \
    185         gmp concurrency/invoke.h
     185am__nobase_cfa_include_HEADERS_DIST = assert fstream iostream iterator \
     186        limits math rational stdlib containers/maybe containers/pair \
     187        containers/result containers/vector concurrency/coroutine \
     188        concurrency/thread concurrency/kernel concurrency/monitor \
     189        ${shell echo stdhdr/*} gmp concurrency/invoke.h
    186190HEADERS = $(nobase_cfa_include_HEADERS)
    187191ETAGS = etags
     
    313317EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@
    314318AM_CCASFLAGS = @CFA_FLAGS@
    315 headers = limits stdlib math iostream fstream iterator rational assert \
    316         containers/pair containers/vector $(am__append_3)
     319headers = assert fstream iostream iterator limits math rational stdlib \
     320        containers/maybe containers/pair containers/result \
     321        containers/vector $(am__append_3)
    317322libobjs = ${headers:=.o}
    318323libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \
     
    404409        @$(MKDIR_P) containers/$(DEPDIR)
    405410        @: > containers/$(DEPDIR)/$(am__dirstamp)
     411containers/libcfa_d_a-maybe.$(OBJEXT): containers/$(am__dirstamp) \
     412        containers/$(DEPDIR)/$(am__dirstamp)
    406413containers/libcfa_d_a-pair.$(OBJEXT): containers/$(am__dirstamp) \
     414        containers/$(DEPDIR)/$(am__dirstamp)
     415containers/libcfa_d_a-result.$(OBJEXT): containers/$(am__dirstamp) \
    407416        containers/$(DEPDIR)/$(am__dirstamp)
    408417containers/libcfa_d_a-vector.$(OBJEXT): containers/$(am__dirstamp) \
     
    434443libhdr/libcfa_a-libdebug.$(OBJEXT): libhdr/$(am__dirstamp) \
    435444        libhdr/$(DEPDIR)/$(am__dirstamp)
     445containers/libcfa_a-maybe.$(OBJEXT): containers/$(am__dirstamp) \
     446        containers/$(DEPDIR)/$(am__dirstamp)
    436447containers/libcfa_a-pair.$(OBJEXT): containers/$(am__dirstamp) \
     448        containers/$(DEPDIR)/$(am__dirstamp)
     449containers/libcfa_a-result.$(OBJEXT): containers/$(am__dirstamp) \
    437450        containers/$(DEPDIR)/$(am__dirstamp)
    438451containers/libcfa_a-vector.$(OBJEXT): containers/$(am__dirstamp) \
     
    466479        -rm -f concurrency/libcfa_d_a-monitor.$(OBJEXT)
    467480        -rm -f concurrency/libcfa_d_a-thread.$(OBJEXT)
     481        -rm -f containers/libcfa_a-maybe.$(OBJEXT)
    468482        -rm -f containers/libcfa_a-pair.$(OBJEXT)
     483        -rm -f containers/libcfa_a-result.$(OBJEXT)
    469484        -rm -f containers/libcfa_a-vector.$(OBJEXT)
     485        -rm -f containers/libcfa_d_a-maybe.$(OBJEXT)
    470486        -rm -f containers/libcfa_d_a-pair.$(OBJEXT)
     487        -rm -f containers/libcfa_d_a-result.$(OBJEXT)
    471488        -rm -f containers/libcfa_d_a-vector.$(OBJEXT)
    472489        -rm -f libhdr/libcfa_a-libdebug.$(OBJEXT)
     
    507524@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po@am__quote@
    508525@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-thread.Po@am__quote@
     526@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_a-maybe.Po@am__quote@
    509527@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_a-pair.Po@am__quote@
     528@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_a-result.Po@am__quote@
    510529@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_a-vector.Po@am__quote@
     530@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_d_a-maybe.Po@am__quote@
    511531@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_d_a-pair.Po@am__quote@
     532@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_d_a-result.Po@am__quote@
    512533@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_d_a-vector.Po@am__quote@
    513534@AMDEP_TRUE@@am__include@ @am__quote@libhdr/$(DEPDIR)/libcfa_a-libdebug.Po@am__quote@
     
    581602@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_d_a-libdebug.obj `if test -f 'libhdr/libdebug.c'; then $(CYGPATH_W) 'libhdr/libdebug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/libdebug.c'; fi`
    582603
     604libcfa_d_a-assert.o: assert.c
     605@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-assert.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-assert.Tpo -c -o libcfa_d_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c
     606@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-assert.Tpo $(DEPDIR)/libcfa_d_a-assert.Po
     607@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='assert.c' object='libcfa_d_a-assert.o' libtool=no @AMDEPBACKSLASH@
     608@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     609@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c
     610
     611libcfa_d_a-assert.obj: assert.c
     612@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-assert.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-assert.Tpo -c -o libcfa_d_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`
     613@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-assert.Tpo $(DEPDIR)/libcfa_d_a-assert.Po
     614@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='assert.c' object='libcfa_d_a-assert.obj' libtool=no @AMDEPBACKSLASH@
     615@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     616@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`
     617
     618libcfa_d_a-fstream.o: fstream.c
     619@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-fstream.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-fstream.Tpo -c -o libcfa_d_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
     620@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-fstream.Tpo $(DEPDIR)/libcfa_d_a-fstream.Po
     621@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_d_a-fstream.o' libtool=no @AMDEPBACKSLASH@
     622@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     623@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
     624
     625libcfa_d_a-fstream.obj: fstream.c
     626@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-fstream.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-fstream.Tpo -c -o libcfa_d_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
     627@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-fstream.Tpo $(DEPDIR)/libcfa_d_a-fstream.Po
     628@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_d_a-fstream.obj' libtool=no @AMDEPBACKSLASH@
     629@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     630@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
     631
     632libcfa_d_a-iostream.o: iostream.c
     633@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iostream.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-iostream.Tpo -c -o libcfa_d_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
     634@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iostream.Tpo $(DEPDIR)/libcfa_d_a-iostream.Po
     635@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_d_a-iostream.o' libtool=no @AMDEPBACKSLASH@
     636@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     637@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
     638
     639libcfa_d_a-iostream.obj: iostream.c
     640@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iostream.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-iostream.Tpo -c -o libcfa_d_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
     641@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iostream.Tpo $(DEPDIR)/libcfa_d_a-iostream.Po
     642@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_d_a-iostream.obj' libtool=no @AMDEPBACKSLASH@
     643@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     644@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
     645
     646libcfa_d_a-iterator.o: iterator.c
     647@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iterator.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-iterator.Tpo -c -o libcfa_d_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
     648@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iterator.Tpo $(DEPDIR)/libcfa_d_a-iterator.Po
     649@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_d_a-iterator.o' libtool=no @AMDEPBACKSLASH@
     650@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     651@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
     652
     653libcfa_d_a-iterator.obj: iterator.c
     654@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iterator.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-iterator.Tpo -c -o libcfa_d_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
     655@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iterator.Tpo $(DEPDIR)/libcfa_d_a-iterator.Po
     656@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_d_a-iterator.obj' libtool=no @AMDEPBACKSLASH@
     657@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     658@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
     659
    583660libcfa_d_a-limits.o: limits.c
    584661@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-limits.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-limits.Tpo -c -o libcfa_d_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
     
    595672@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi`
    596673
     674libcfa_d_a-math.o: math.c
     675@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-math.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-math.Tpo -c -o libcfa_d_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
     676@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-math.Tpo $(DEPDIR)/libcfa_d_a-math.Po
     677@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_d_a-math.o' libtool=no @AMDEPBACKSLASH@
     678@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     679@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
     680
     681libcfa_d_a-math.obj: math.c
     682@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-math.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-math.Tpo -c -o libcfa_d_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
     683@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-math.Tpo $(DEPDIR)/libcfa_d_a-math.Po
     684@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_d_a-math.obj' libtool=no @AMDEPBACKSLASH@
     685@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     686@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
     687
     688libcfa_d_a-rational.o: rational.c
     689@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-rational.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-rational.Tpo -c -o libcfa_d_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
     690@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-rational.Tpo $(DEPDIR)/libcfa_d_a-rational.Po
     691@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_d_a-rational.o' libtool=no @AMDEPBACKSLASH@
     692@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     693@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
     694
     695libcfa_d_a-rational.obj: rational.c
     696@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-rational.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-rational.Tpo -c -o libcfa_d_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
     697@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-rational.Tpo $(DEPDIR)/libcfa_d_a-rational.Po
     698@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_d_a-rational.obj' libtool=no @AMDEPBACKSLASH@
     699@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     700@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
     701
    597702libcfa_d_a-stdlib.o: stdlib.c
    598703@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-stdlib.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-stdlib.Tpo -c -o libcfa_d_a-stdlib.o `test -f 'stdlib.c' || echo '$(srcdir)/'`stdlib.c
     
    609714@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-stdlib.obj `if test -f 'stdlib.c'; then $(CYGPATH_W) 'stdlib.c'; else $(CYGPATH_W) '$(srcdir)/stdlib.c'; fi`
    610715
    611 libcfa_d_a-math.o: math.c
    612 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-math.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-math.Tpo -c -o libcfa_d_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
    613 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-math.Tpo $(DEPDIR)/libcfa_d_a-math.Po
    614 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_d_a-math.o' libtool=no @AMDEPBACKSLASH@
    615 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    616 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
    617 
    618 libcfa_d_a-math.obj: math.c
    619 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-math.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-math.Tpo -c -o libcfa_d_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
    620 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-math.Tpo $(DEPDIR)/libcfa_d_a-math.Po
    621 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_d_a-math.obj' libtool=no @AMDEPBACKSLASH@
    622 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    623 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
    624 
    625 libcfa_d_a-iostream.o: iostream.c
    626 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iostream.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-iostream.Tpo -c -o libcfa_d_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
    627 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iostream.Tpo $(DEPDIR)/libcfa_d_a-iostream.Po
    628 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_d_a-iostream.o' libtool=no @AMDEPBACKSLASH@
    629 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    630 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
    631 
    632 libcfa_d_a-iostream.obj: iostream.c
    633 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iostream.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-iostream.Tpo -c -o libcfa_d_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
    634 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iostream.Tpo $(DEPDIR)/libcfa_d_a-iostream.Po
    635 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_d_a-iostream.obj' libtool=no @AMDEPBACKSLASH@
    636 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    637 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
    638 
    639 libcfa_d_a-fstream.o: fstream.c
    640 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-fstream.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-fstream.Tpo -c -o libcfa_d_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
    641 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-fstream.Tpo $(DEPDIR)/libcfa_d_a-fstream.Po
    642 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_d_a-fstream.o' libtool=no @AMDEPBACKSLASH@
    643 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    644 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
    645 
    646 libcfa_d_a-fstream.obj: fstream.c
    647 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-fstream.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-fstream.Tpo -c -o libcfa_d_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
    648 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-fstream.Tpo $(DEPDIR)/libcfa_d_a-fstream.Po
    649 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_d_a-fstream.obj' libtool=no @AMDEPBACKSLASH@
    650 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    651 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
    652 
    653 libcfa_d_a-iterator.o: iterator.c
    654 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iterator.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-iterator.Tpo -c -o libcfa_d_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
    655 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iterator.Tpo $(DEPDIR)/libcfa_d_a-iterator.Po
    656 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_d_a-iterator.o' libtool=no @AMDEPBACKSLASH@
    657 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    658 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
    659 
    660 libcfa_d_a-iterator.obj: iterator.c
    661 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iterator.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-iterator.Tpo -c -o libcfa_d_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
    662 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iterator.Tpo $(DEPDIR)/libcfa_d_a-iterator.Po
    663 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_d_a-iterator.obj' libtool=no @AMDEPBACKSLASH@
    664 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    665 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
    666 
    667 libcfa_d_a-rational.o: rational.c
    668 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-rational.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-rational.Tpo -c -o libcfa_d_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
    669 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-rational.Tpo $(DEPDIR)/libcfa_d_a-rational.Po
    670 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_d_a-rational.o' libtool=no @AMDEPBACKSLASH@
    671 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    672 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
    673 
    674 libcfa_d_a-rational.obj: rational.c
    675 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-rational.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-rational.Tpo -c -o libcfa_d_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
    676 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-rational.Tpo $(DEPDIR)/libcfa_d_a-rational.Po
    677 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_d_a-rational.obj' libtool=no @AMDEPBACKSLASH@
    678 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    679 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
    680 
    681 libcfa_d_a-assert.o: assert.c
    682 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-assert.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-assert.Tpo -c -o libcfa_d_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c
    683 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-assert.Tpo $(DEPDIR)/libcfa_d_a-assert.Po
    684 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='assert.c' object='libcfa_d_a-assert.o' libtool=no @AMDEPBACKSLASH@
    685 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    686 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c
    687 
    688 libcfa_d_a-assert.obj: assert.c
    689 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-assert.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-assert.Tpo -c -o libcfa_d_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`
    690 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-assert.Tpo $(DEPDIR)/libcfa_d_a-assert.Po
    691 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='assert.c' object='libcfa_d_a-assert.obj' libtool=no @AMDEPBACKSLASH@
    692 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    693 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`
     716containers/libcfa_d_a-maybe.o: containers/maybe.c
     717@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-maybe.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo -c -o containers/libcfa_d_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
     718@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo containers/$(DEPDIR)/libcfa_d_a-maybe.Po
     719@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_d_a-maybe.o' libtool=no @AMDEPBACKSLASH@
     720@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     721@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
     722
     723containers/libcfa_d_a-maybe.obj: containers/maybe.c
     724@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-maybe.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo -c -o containers/libcfa_d_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
     725@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo containers/$(DEPDIR)/libcfa_d_a-maybe.Po
     726@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_d_a-maybe.obj' libtool=no @AMDEPBACKSLASH@
     727@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     728@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
    694729
    695730containers/libcfa_d_a-pair.o: containers/pair.c
     
    707742@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-pair.obj `if test -f 'containers/pair.c'; then $(CYGPATH_W) 'containers/pair.c'; else $(CYGPATH_W) '$(srcdir)/containers/pair.c'; fi`
    708743
     744containers/libcfa_d_a-result.o: containers/result.c
     745@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-result.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-result.Tpo -c -o containers/libcfa_d_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
     746@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-result.Tpo containers/$(DEPDIR)/libcfa_d_a-result.Po
     747@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_d_a-result.o' libtool=no @AMDEPBACKSLASH@
     748@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     749@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
     750
     751containers/libcfa_d_a-result.obj: containers/result.c
     752@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-result.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-result.Tpo -c -o containers/libcfa_d_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
     753@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-result.Tpo containers/$(DEPDIR)/libcfa_d_a-result.Po
     754@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_d_a-result.obj' libtool=no @AMDEPBACKSLASH@
     755@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     756@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
     757
    709758containers/libcfa_d_a-vector.o: containers/vector.c
    710759@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-vector.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-vector.Tpo -c -o containers/libcfa_d_a-vector.o `test -f 'containers/vector.c' || echo '$(srcdir)/'`containers/vector.c
     
    819868@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_a-libdebug.obj `if test -f 'libhdr/libdebug.c'; then $(CYGPATH_W) 'libhdr/libdebug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/libdebug.c'; fi`
    820869
     870libcfa_a-assert.o: assert.c
     871@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-assert.o -MD -MP -MF $(DEPDIR)/libcfa_a-assert.Tpo -c -o libcfa_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c
     872@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-assert.Tpo $(DEPDIR)/libcfa_a-assert.Po
     873@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='assert.c' object='libcfa_a-assert.o' libtool=no @AMDEPBACKSLASH@
     874@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     875@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c
     876
     877libcfa_a-assert.obj: assert.c
     878@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-assert.obj -MD -MP -MF $(DEPDIR)/libcfa_a-assert.Tpo -c -o libcfa_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`
     879@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-assert.Tpo $(DEPDIR)/libcfa_a-assert.Po
     880@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='assert.c' object='libcfa_a-assert.obj' libtool=no @AMDEPBACKSLASH@
     881@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     882@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`
     883
     884libcfa_a-fstream.o: fstream.c
     885@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-fstream.o -MD -MP -MF $(DEPDIR)/libcfa_a-fstream.Tpo -c -o libcfa_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
     886@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-fstream.Tpo $(DEPDIR)/libcfa_a-fstream.Po
     887@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_a-fstream.o' libtool=no @AMDEPBACKSLASH@
     888@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     889@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
     890
     891libcfa_a-fstream.obj: fstream.c
     892@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-fstream.obj -MD -MP -MF $(DEPDIR)/libcfa_a-fstream.Tpo -c -o libcfa_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
     893@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-fstream.Tpo $(DEPDIR)/libcfa_a-fstream.Po
     894@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_a-fstream.obj' libtool=no @AMDEPBACKSLASH@
     895@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     896@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
     897
     898libcfa_a-iostream.o: iostream.c
     899@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iostream.o -MD -MP -MF $(DEPDIR)/libcfa_a-iostream.Tpo -c -o libcfa_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
     900@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iostream.Tpo $(DEPDIR)/libcfa_a-iostream.Po
     901@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_a-iostream.o' libtool=no @AMDEPBACKSLASH@
     902@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     903@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
     904
     905libcfa_a-iostream.obj: iostream.c
     906@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iostream.obj -MD -MP -MF $(DEPDIR)/libcfa_a-iostream.Tpo -c -o libcfa_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
     907@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iostream.Tpo $(DEPDIR)/libcfa_a-iostream.Po
     908@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_a-iostream.obj' libtool=no @AMDEPBACKSLASH@
     909@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     910@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
     911
     912libcfa_a-iterator.o: iterator.c
     913@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iterator.o -MD -MP -MF $(DEPDIR)/libcfa_a-iterator.Tpo -c -o libcfa_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
     914@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iterator.Tpo $(DEPDIR)/libcfa_a-iterator.Po
     915@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_a-iterator.o' libtool=no @AMDEPBACKSLASH@
     916@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     917@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
     918
     919libcfa_a-iterator.obj: iterator.c
     920@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iterator.obj -MD -MP -MF $(DEPDIR)/libcfa_a-iterator.Tpo -c -o libcfa_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
     921@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iterator.Tpo $(DEPDIR)/libcfa_a-iterator.Po
     922@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_a-iterator.obj' libtool=no @AMDEPBACKSLASH@
     923@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     924@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
     925
    821926libcfa_a-limits.o: limits.c
    822927@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-limits.o -MD -MP -MF $(DEPDIR)/libcfa_a-limits.Tpo -c -o libcfa_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
     
    833938@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi`
    834939
     940libcfa_a-math.o: math.c
     941@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-math.o -MD -MP -MF $(DEPDIR)/libcfa_a-math.Tpo -c -o libcfa_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
     942@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-math.Tpo $(DEPDIR)/libcfa_a-math.Po
     943@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_a-math.o' libtool=no @AMDEPBACKSLASH@
     944@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     945@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
     946
     947libcfa_a-math.obj: math.c
     948@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-math.obj -MD -MP -MF $(DEPDIR)/libcfa_a-math.Tpo -c -o libcfa_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
     949@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-math.Tpo $(DEPDIR)/libcfa_a-math.Po
     950@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_a-math.obj' libtool=no @AMDEPBACKSLASH@
     951@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     952@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
     953
     954libcfa_a-rational.o: rational.c
     955@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-rational.o -MD -MP -MF $(DEPDIR)/libcfa_a-rational.Tpo -c -o libcfa_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
     956@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-rational.Tpo $(DEPDIR)/libcfa_a-rational.Po
     957@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_a-rational.o' libtool=no @AMDEPBACKSLASH@
     958@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     959@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
     960
     961libcfa_a-rational.obj: rational.c
     962@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-rational.obj -MD -MP -MF $(DEPDIR)/libcfa_a-rational.Tpo -c -o libcfa_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
     963@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-rational.Tpo $(DEPDIR)/libcfa_a-rational.Po
     964@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_a-rational.obj' libtool=no @AMDEPBACKSLASH@
     965@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     966@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
     967
    835968libcfa_a-stdlib.o: stdlib.c
    836969@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-stdlib.o -MD -MP -MF $(DEPDIR)/libcfa_a-stdlib.Tpo -c -o libcfa_a-stdlib.o `test -f 'stdlib.c' || echo '$(srcdir)/'`stdlib.c
     
    847980@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-stdlib.obj `if test -f 'stdlib.c'; then $(CYGPATH_W) 'stdlib.c'; else $(CYGPATH_W) '$(srcdir)/stdlib.c'; fi`
    848981
    849 libcfa_a-math.o: math.c
    850 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-math.o -MD -MP -MF $(DEPDIR)/libcfa_a-math.Tpo -c -o libcfa_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
    851 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-math.Tpo $(DEPDIR)/libcfa_a-math.Po
    852 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_a-math.o' libtool=no @AMDEPBACKSLASH@
    853 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    854 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
    855 
    856 libcfa_a-math.obj: math.c
    857 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-math.obj -MD -MP -MF $(DEPDIR)/libcfa_a-math.Tpo -c -o libcfa_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
    858 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-math.Tpo $(DEPDIR)/libcfa_a-math.Po
    859 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_a-math.obj' libtool=no @AMDEPBACKSLASH@
    860 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    861 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
    862 
    863 libcfa_a-iostream.o: iostream.c
    864 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iostream.o -MD -MP -MF $(DEPDIR)/libcfa_a-iostream.Tpo -c -o libcfa_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
    865 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iostream.Tpo $(DEPDIR)/libcfa_a-iostream.Po
    866 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_a-iostream.o' libtool=no @AMDEPBACKSLASH@
    867 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    868 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
    869 
    870 libcfa_a-iostream.obj: iostream.c
    871 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iostream.obj -MD -MP -MF $(DEPDIR)/libcfa_a-iostream.Tpo -c -o libcfa_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
    872 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iostream.Tpo $(DEPDIR)/libcfa_a-iostream.Po
    873 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_a-iostream.obj' libtool=no @AMDEPBACKSLASH@
    874 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    875 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
    876 
    877 libcfa_a-fstream.o: fstream.c
    878 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-fstream.o -MD -MP -MF $(DEPDIR)/libcfa_a-fstream.Tpo -c -o libcfa_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
    879 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-fstream.Tpo $(DEPDIR)/libcfa_a-fstream.Po
    880 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_a-fstream.o' libtool=no @AMDEPBACKSLASH@
    881 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    882 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
    883 
    884 libcfa_a-fstream.obj: fstream.c
    885 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-fstream.obj -MD -MP -MF $(DEPDIR)/libcfa_a-fstream.Tpo -c -o libcfa_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
    886 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-fstream.Tpo $(DEPDIR)/libcfa_a-fstream.Po
    887 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_a-fstream.obj' libtool=no @AMDEPBACKSLASH@
    888 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    889 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
    890 
    891 libcfa_a-iterator.o: iterator.c
    892 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iterator.o -MD -MP -MF $(DEPDIR)/libcfa_a-iterator.Tpo -c -o libcfa_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
    893 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iterator.Tpo $(DEPDIR)/libcfa_a-iterator.Po
    894 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_a-iterator.o' libtool=no @AMDEPBACKSLASH@
    895 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    896 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
    897 
    898 libcfa_a-iterator.obj: iterator.c
    899 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iterator.obj -MD -MP -MF $(DEPDIR)/libcfa_a-iterator.Tpo -c -o libcfa_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
    900 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iterator.Tpo $(DEPDIR)/libcfa_a-iterator.Po
    901 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_a-iterator.obj' libtool=no @AMDEPBACKSLASH@
    902 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    903 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
    904 
    905 libcfa_a-rational.o: rational.c
    906 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-rational.o -MD -MP -MF $(DEPDIR)/libcfa_a-rational.Tpo -c -o libcfa_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
    907 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-rational.Tpo $(DEPDIR)/libcfa_a-rational.Po
    908 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_a-rational.o' libtool=no @AMDEPBACKSLASH@
    909 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    910 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
    911 
    912 libcfa_a-rational.obj: rational.c
    913 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-rational.obj -MD -MP -MF $(DEPDIR)/libcfa_a-rational.Tpo -c -o libcfa_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
    914 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-rational.Tpo $(DEPDIR)/libcfa_a-rational.Po
    915 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_a-rational.obj' libtool=no @AMDEPBACKSLASH@
    916 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    917 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
    918 
    919 libcfa_a-assert.o: assert.c
    920 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-assert.o -MD -MP -MF $(DEPDIR)/libcfa_a-assert.Tpo -c -o libcfa_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c
    921 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-assert.Tpo $(DEPDIR)/libcfa_a-assert.Po
    922 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='assert.c' object='libcfa_a-assert.o' libtool=no @AMDEPBACKSLASH@
    923 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    924 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c
    925 
    926 libcfa_a-assert.obj: assert.c
    927 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-assert.obj -MD -MP -MF $(DEPDIR)/libcfa_a-assert.Tpo -c -o libcfa_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`
    928 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-assert.Tpo $(DEPDIR)/libcfa_a-assert.Po
    929 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='assert.c' object='libcfa_a-assert.obj' libtool=no @AMDEPBACKSLASH@
    930 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    931 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`
     982containers/libcfa_a-maybe.o: containers/maybe.c
     983@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-maybe.o -MD -MP -MF containers/$(DEPDIR)/libcfa_a-maybe.Tpo -c -o containers/libcfa_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
     984@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-maybe.Tpo containers/$(DEPDIR)/libcfa_a-maybe.Po
     985@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_a-maybe.o' libtool=no @AMDEPBACKSLASH@
     986@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     987@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
     988
     989containers/libcfa_a-maybe.obj: containers/maybe.c
     990@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-maybe.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_a-maybe.Tpo -c -o containers/libcfa_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
     991@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-maybe.Tpo containers/$(DEPDIR)/libcfa_a-maybe.Po
     992@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_a-maybe.obj' libtool=no @AMDEPBACKSLASH@
     993@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     994@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
    932995
    933996containers/libcfa_a-pair.o: containers/pair.c
     
    9441007@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    9451008@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-pair.obj `if test -f 'containers/pair.c'; then $(CYGPATH_W) 'containers/pair.c'; else $(CYGPATH_W) '$(srcdir)/containers/pair.c'; fi`
     1009
     1010containers/libcfa_a-result.o: containers/result.c
     1011@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-result.o -MD -MP -MF containers/$(DEPDIR)/libcfa_a-result.Tpo -c -o containers/libcfa_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
     1012@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-result.Tpo containers/$(DEPDIR)/libcfa_a-result.Po
     1013@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_a-result.o' libtool=no @AMDEPBACKSLASH@
     1014@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1015@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
     1016
     1017containers/libcfa_a-result.obj: containers/result.c
     1018@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-result.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_a-result.Tpo -c -o containers/libcfa_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
     1019@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-result.Tpo containers/$(DEPDIR)/libcfa_a-result.Po
     1020@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_a-result.obj' libtool=no @AMDEPBACKSLASH@
     1021@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1022@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
    9461023
    9471024containers/libcfa_a-vector.o: containers/vector.c
  • src/libcfa/concurrency/monitor

    rff98952 r4a368547  
    5959        unsigned short count;                           //Number of criterions in the criteria
    6060        __condition_node_t * next;                      //Intrusive linked list Next field
     61        uintptr_t user_info;                            //Custom user info accessible before signalling
    6162};
    6263
     
    8586}
    8687
    87 void wait( condition * this );
    88 void signal( condition * this );
     88void wait( condition * this, uintptr_t user_info = 0 );
     89bool signal( condition * this );
     90bool signal_block( condition * this );
     91static inline bool is_empty( condition * this ) { return !this->blocked.head; }
     92uintptr_t front( condition * this );
     93
    8994#endif //MONITOR_H
  • src/libcfa/concurrency/monitor.c

    rff98952 r4a368547  
    6262                        //Some one else has the monitor, wait in line for it
    6363                        append( &this->entry_queue, thrd );
     64                        LIB_DEBUG_PRINT_SAFE("%p Blocking on entry\n", thrd);
    6465                        ScheduleInternal( &this->lock );
    6566
     
    9798                unlock( &this->lock );
    9899
     100                LIB_DEBUG_PRINT_SAFE("Next owner is %p\n", new_owner);
     101
    99102                //We need to wake-up the thread
    100103                ScheduleThread( new_owner );
     
    134137}
    135138
    136 void debug_break() __attribute__(( noinline ))
    137 {
    138        
     139void ?{}(__condition_node_t * this, thread_desc * waiting_thread, unsigned short count, uintptr_t user_info ) {
     140        this->waiting_thread = waiting_thread;
     141        this->count = count;
     142        this->next = NULL;
     143        this->user_info = user_info;
     144}
     145
     146void ?{}(__condition_criterion_t * this ) {
     147        this->ready  = false;
     148        this->target = NULL;
     149        this->owner  = NULL;
     150        this->next   = NULL;
     151}
     152
     153void ?{}(__condition_criterion_t * this, monitor_desc * target, __condition_node_t * owner ) {
     154        this->ready  = false;
     155        this->target = target;
     156        this->owner  = owner;
     157        this->next   = NULL;
    139158}
    140159
    141160//-----------------------------------------------------------------------------
    142161// Internal scheduling
    143 void wait( condition * this ) {
     162void wait( condition * this, uintptr_t user_info = 0 ) {
    144163        LIB_DEBUG_PRINT_SAFE("Waiting\n");
    145164
     
    149168        assertf( this->monitors != NULL, "Waiting with no monitors (%p)", this->monitors );
    150169        assertf( this->monitor_count != 0, "Waiting with 0 monitors (%i)", this->monitor_count );
     170        assertf( this->monitor_count < 32u, "Excessive monitor count (%i)", this->monitor_count );
    151171
    152172        unsigned short count = this->monitor_count;
     
    156176        LIB_DEBUG_PRINT_SAFE("count %i\n", count);
    157177
    158         __condition_node_t waiter;
    159         waiter.waiting_thread = this_thread();
    160         waiter.count = count;
    161         waiter.next = NULL;
     178        __condition_node_t waiter = { this_thread(), count, user_info };
    162179
    163180        __condition_criterion_t criteria[count];
    164181        for(int i = 0; i < count; i++) {
    165                 criteria[i].ready  = false;
    166                 criteria[i].target = this->monitors[i];
    167                 criteria[i].owner  = &waiter;
    168                 criteria[i].next   = NULL;
     182                (&criteria[i]){ this->monitors[i], &waiter };
    169183                LIB_DEBUG_PRINT_SAFE( "Criterion %p\n", &criteria[i] );
    170184        }
     
    184198        }
    185199
    186         debug_break();
    187 
    188200        for( int i = 0; i < count; i++) {
    189201                thread_desc * new_owner = next_thread( this->monitors[i] );
     
    191203        }
    192204
    193         debug_break();
    194 
    195205        LIB_DEBUG_PRINT_SAFE("Will unblock: ");
    196206        for(int i = 0; i < thread_count; i++) {
     
    201211        // Everything is ready to go to sleep
    202212        ScheduleInternal( locks, count, threads, thread_count );
    203 
    204213
    205214        //WE WOKE UP
     
    212221}
    213222
    214 void signal( condition * this ) {
    215         if( !this->blocked.head ) {
     223bool signal( condition * this ) {
     224        if( is_empty( this ) ) {
    216225                LIB_DEBUG_PRINT_SAFE("Nothing to signal\n");
    217                 return;
     226                return false;
    218227        }
    219228
     
    224233        unsigned short count = this->monitor_count;
    225234       
     235        //Some more checking in debug
    226236        LIB_DEBUG_DO(
    227237                thread_desc * this_thrd = this_thread();
     
    237247        );
    238248
     249        //Lock all the monitors
    239250        lock_all( this->monitors, NULL, count );
    240251        LIB_DEBUG_PRINT_SAFE("Signalling");
    241252
     253        //Pop the head of the waiting queue
    242254        __condition_node_t * node = pop_head( &this->blocked );
     255
     256        //Add the thread to the proper AS stack
    243257        for(int i = 0; i < count; i++) {
    244258                __condition_criterion_t * crit = &node->criteria[i];
     
    250264        LIB_DEBUG_PRINT_SAFE("\n");
    251265
     266        //Release
    252267        unlock_all( this->monitors, count );
     268
     269        return true;
     270}
     271
     272bool signal_block( condition * this ) {
     273        if( !this->blocked.head ) {
     274                LIB_DEBUG_PRINT_SAFE("Nothing to signal\n");
     275                return false;
     276        }
     277
     278        //Check that everything is as expected
     279        assertf( this->monitors != NULL, "Waiting with no monitors (%p)", this->monitors );
     280        assertf( this->monitor_count != 0, "Waiting with 0 monitors (%i)", this->monitor_count );
     281
     282        unsigned short count = this->monitor_count;
     283        unsigned int recursions[ count ];               //Save the current recursion levels to restore them later
     284        spinlock *   locks     [ count ];               //We need to pass-in an array of locks to ScheduleInternal
     285
     286        lock_all( this->monitors, locks, count );
     287
     288        //create creteria
     289        __condition_node_t waiter = { this_thread(), count, 0 };
     290
     291        __condition_criterion_t criteria[count];
     292        for(int i = 0; i < count; i++) {
     293                (&criteria[i]){ this->monitors[i], &waiter };
     294                LIB_DEBUG_PRINT_SAFE( "Criterion %p\n", &criteria[i] );
     295                push( &criteria[i].target->signal_stack, &criteria[i] );
     296        }
     297
     298        waiter.criteria = criteria;
     299
     300        //save contexts
     301        save_recursion( this->monitors, recursions, count );
     302
     303        //Find the thread to run
     304        thread_desc * signallee = pop_head( &this->blocked )->waiting_thread;
     305        for(int i = 0; i < count; i++) {
     306                set_owner( this->monitors[i], signallee );
     307        }
     308
     309        LIB_DEBUG_PRINT_SAFE( "Waiting on signal block\n" );
     310
     311        //Everything is ready to go to sleep
     312        ScheduleInternal( locks, count, &signallee, 1 );
     313
     314        LIB_DEBUG_PRINT_SAFE( "Back from signal block\n" );
     315
     316        //We are back, restore the owners and recursions
     317        lock_all( locks, count );
     318        restore_recursion( this->monitors, recursions, count );
     319        unlock_all( locks, count );
     320
     321        return true;
     322}
     323
     324uintptr_t front( condition * this ) {
     325        LIB_DEBUG_DO(
     326                if( is_empty(this) ) {
     327                        abortf( "Attempt to access user data on an empty condition.\n"
     328                    "Possible cause is not checking if the condition is empty before reading stored data." );
     329                }
     330        );
     331        return this->blocked.head->user_info;
    253332}
    254333
     
    335414
    336415        for(    int i = 0; i < count; i++ ) {
     416
    337417                LIB_DEBUG_PRINT_SAFE( "Checking %p for %p\n", &criteria[i], target );
    338418                if( &criteria[i] == target ) {
  • src/libcfa/concurrency/thread

    rff98952 r4a368547  
    8282
    8383void yield();
     84void yield( unsigned times );
    8485
    8586#endif //THREADS_H
  • src/libcfa/concurrency/thread.c

    rff98952 r4a368547  
    8787}
    8888
     89void yield( unsigned times ) {
     90        for( unsigned i = 0; i < times; i++ ) {
     91                yield();
     92        }
     93}
     94
    8995void ThreadCtxSwitch(coroutine_desc* src, coroutine_desc* dst) {
    9096        // set state of current coroutine to inactive
  • src/libcfa/containers/vector

    rff98952 r4a368547  
    2222
    2323//------------------------------------------------------------------------------
     24//Allocator
     25forall(otype T)
     26struct heap_allocator
     27{
     28        T* storage;
     29        size_t capacity;
     30};
     31
     32forall(otype T)
     33void ?{}(heap_allocator(T)* this);
     34
     35forall(otype T)
     36void ?{}(heap_allocator(T)* this, heap_allocator(T) rhs);
     37
     38forall(otype T)
     39heap_allocator(T) ?=?(heap_allocator(T)* this, heap_allocator(T) rhs);
     40
     41forall(otype T)
     42void ^?{}(heap_allocator(T)* this);
     43
     44forall(otype T)
     45void realloc_storage(heap_allocator(T)* this, size_t size);
     46
     47forall(otype T)
     48static inline T* data(heap_allocator(T)* this)
     49{
     50        return this->storage;
     51}
     52
     53//------------------------------------------------------------------------------
    2454//Declaration
    2555trait allocator_c(otype T, otype allocator_t)
     
    2959};
    3060
    31 forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     61forall(otype T, otype allocator_t = heap_allocator(T) | allocator_c(T, allocator_t))
    3262struct vector;
    3363
     
    4676void ^?{}(vector(T, allocator_t)* this);
    4777
    48 forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     78forall(otype T, otype allocator_t = heap_allocator(T) | allocator_c(T, allocator_t))
    4979struct vector
    5080{
     
    136166// }
    137167
    138 //------------------------------------------------------------------------------
    139 //Allocator
    140 forall(otype T)
    141 struct heap_allocator
    142 {
    143         T* storage;
    144         size_t capacity;
    145 };
    146 
    147 forall(otype T)
    148 void ?{}(heap_allocator(T)* this);
    149 
    150 forall(otype T)
    151 void ?{}(heap_allocator(T)* this, heap_allocator(T) rhs);
    152 
    153 forall(otype T)
    154 heap_allocator(T) ?=?(heap_allocator(T)* this, heap_allocator(T) rhs);
    155 
    156 forall(otype T)
    157 void ^?{}(heap_allocator(T)* this);
    158 
    159 forall(otype T)
    160 void realloc_storage(heap_allocator(T)* this, size_t size);
    161 
    162 forall(otype T)
    163 static inline T* data(heap_allocator(T)* this)
    164 {
    165         return this->storage;
    166 }
    167 
    168168#endif // VECTOR_H
    169169
  • src/libcfa/math

    rff98952 r4a368547  
    1010// Created On       : Mon Apr 18 23:37:04 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Apr 24 12:45:02 2016
    13 // Update Count     : 59
     12// Last Modified On : Wed May 24 17:40:39 2017
     13// Update Count     : 60
    1414//
    1515
     
    2020#include <math.h>                                                                               // fpclassify, isfinite, isnormal, isnan, isinf
    2121} // extern "C"
    22 
    23 float fabs( float );
    24 // extern "C" { double fabs( double ); }
    25 long double fabs( long double );
    26 float cabs( float _Complex );
    27 // extern "C" { double cabs( double _Complex ); }
    28 long double cabs( long double _Complex );
    2922
    3023float ?%?( float, float );
  • src/libcfa/math.c

    rff98952 r4a368547  
    1010// Created On       : Tue Apr 19 22:23:08 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Apr 24 08:52:31 2016
    13 // Update Count     : 75
     12// Last Modified On : Tue May 23 22:52:13 2017
     13// Update Count     : 76
    1414//
    1515
     
    1919#include <complex.h>
    2020} // extern "C"
    21 
    22 float fabs( float x ) { return fabsf( x ); }
    23 long double fabs( long double x ) { return fabsl( x ); }
    24 float cabs( float _Complex x ) { return cabsf( x ); }
    25 long double cabs( long double _Complex x ) { return cabsl( x ); }
    2621
    2722float ?%?( float x, float y ) { return fmodf( x, y ); }
  • src/libcfa/stdlib

    rff98952 r4a368547  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May  9 08:42:44 2017
    13 // Update Count     : 107
     12// Last Modified On : Wed May 24 18:06:27 2017
     13// Update Count     : 115
    1414//
    1515
     
    2828//---------------------------------------
    2929
    30 extern "C" { void * malloc( size_t ); }                                 // use default C routine for void *
    3130forall( dtype T | sized(T) ) T * malloc( void );
    3231forall( dtype T | sized(T) ) T * malloc( char fill );
     
    4241forall( dtype T | sized(T) ) T * memalign( size_t alignment );          // deprecated
    4342forall( dtype T | sized(T) ) int posix_memalign( T ** ptr, size_t alignment );
    44 
    45 extern "C" {
    46 void * memset( void * ptr, int fill, size_t size );
    47 void free( void * ptr );
    48 } // extern "C"
    4943
    5044forall( dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); } ) T * new( Params p );
     
    109103double abs( double _Complex );
    110104long double abs( long double _Complex );
    111 forall ( otype T | { void ?{}( T *, zero_t ); int ?<?( T, T ); T -?( T ); } )
     105forall( otype T | { void ?{}( T *, zero_t ); int ?<?( T, T ); T -?( T ); } )
    112106T abs( T );
    113107
     
    115109
    116110void rand48seed( long int s );
    117 char rand48();
    118 int rand48();
    119 unsigned int rand48();
    120 long int rand48();
    121 unsigned long int rand48();
    122 float rand48();
    123 double rand48();
    124 float _Complex rand48();
    125 double _Complex rand48();
    126 long double _Complex rand48();
     111char rand48( void );
     112int rand48( void );
     113unsigned int rand48( void );
     114long int rand48( void );
     115unsigned long int rand48( void );
     116float rand48( void );
     117double rand48( void );
     118float _Complex rand48( void );
     119double _Complex rand48( void );
     120long double _Complex rand48( void );
    127121
    128122//---------------------------------------
  • src/libcfa/stdlib.c

    rff98952 r4a368547  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May  9 08:43:00 2017
    13 // Update Count     : 191
     12// Last Modified On : Wed May 24 18:13:15 2017
     13// Update Count     : 198
    1414//
    1515
     
    279279
    280280void rand48seed( long int s ) { srand48( s ); }
    281 char rand48() { return mrand48(); }
    282 int rand48() { return mrand48(); }
    283 unsigned int rand48() { return lrand48(); }
    284 long int rand48() { return mrand48(); }
    285 unsigned long int rand48() { return lrand48(); }
    286 float rand48() { return (float)drand48(); }                             // otherwise float uses lrand48
    287 double rand48() { return drand48(); }
    288 float _Complex rand48() { return (float)drand48() + (float _Complex)(drand48() * _Complex_I); }
    289 double _Complex rand48() { return drand48() + (double _Complex)(drand48() * _Complex_I); }
    290 long double _Complex rand48() { return (long double)drand48() + (long double _Complex)(drand48() * _Complex_I); }
     281char rand48( void ) { return mrand48(); }
     282int rand48( void ) { return mrand48(); }
     283unsigned int rand48( void ) { return lrand48(); }
     284long int rand48( void ) { return mrand48(); }
     285unsigned long int rand48( void ) { return lrand48(); }
     286float rand48( void ) { return (float)drand48(); }               // otherwise float uses lrand48
     287double rand48( void ) { return drand48(); }
     288float _Complex rand48( void ) { return (float)drand48() + (float _Complex)(drand48() * _Complex_I); }
     289double _Complex rand48( void ) { return drand48() + (double _Complex)(drand48() * _Complex_I); }
     290long double _Complex rand48( void) { return (long double)drand48() + (long double _Complex)(drand48() * _Complex_I); }
    291291
    292292//---------------------------------------
  • src/prelude/prelude.cf

    rff98952 r4a368547  
    309309// forall( dtype DT ) signed int ?!=?( const volatile void *, const volatile DT * );
    310310
    311 // forall( dtype DT ) signed int ?==?( const volatile DT *, forall( dtype DT2 )const DT2 * );
    312 // forall( dtype DT ) signed int ?==?( forall( dtype DT2 )const DT2 *, const volatile DT * );
    313 // forall( ftype FT ) signed int ?==?( FT *, forall( ftype FT2 )FT2 * );
    314 // forall( ftype FT ) signed int ?==?( forall( ftype FT2 )FT2 *, FT * );
    315 // forall( dtype DT ) signed int ?!=?( const volatile DT *, forall( dtype DT2 )const DT2 * );
    316 // forall( dtype DT ) signed int ?!=?( forall( dtype DT2 )const DT2 *, const volatile DT * );
    317 // forall( ftype FT ) signed int ?!=?( FT *, forall( ftype FT2 )FT2 * );
    318 // forall( ftype FT ) signed int ?!=?( forall( ftype FT2 )FT2 *, FT * );
     311// forall( dtype DT ) signed int ?==?( const volatile DT *, zero_t );
     312// forall( dtype DT ) signed int ?==?( zero_t, const volatile DT * );
     313// forall( ftype FT ) signed int ?==?( FT *, zero_t );
     314// forall( ftype FT ) signed int ?==?( zero_t, FT * );
     315// forall( dtype DT ) signed int ?!=?( const volatile DT *, zero_t );
     316// forall( dtype DT ) signed int ?!=?( zero_t, const volatile DT * );
     317// forall( ftype FT ) signed int ?!=?( FT *, zero_t );
     318// forall( ftype FT ) signed int ?!=?( zero_t, FT * );
    319319
    320320// ------------------------------------------------------------
     
    447447const volatile void *   ?=?( const volatile void * volatile *, const volatile void * );
    448448
    449 //forall( dtype DT ) DT *                       ?=?(                DT *          *, forall( dtype DT2 ) const DT2 * );
    450 //forall( dtype DT ) DT *                       ?=?(                DT * volatile *, forall( dtype DT2 ) const DT2 * );
    451 forall( dtype DT ) const DT *           ?=?( const          DT *          *, forall( dtype DT2 ) const DT2 * );
    452 forall( dtype DT ) const DT *           ?=?( const          DT * volatile *, forall( dtype DT2 ) const DT2 * );
    453 //forall( dtype DT ) volatile DT *      ?=?( volatile       DT *          *, forall( dtype DT2 ) const DT2 * );
    454 //forall( dtype DT ) volatile DT *      ?=?( volatile       DT * volatile *, forall( dtype DT2 ) const DT2 * );
    455 forall( dtype DT ) const volatile DT *  ?=?( const volatile DT *          *, forall( dtype DT2 ) const DT2 * );
    456 forall( dtype DT ) const volatile DT *  ?=?( const volatile DT * volatile *, forall( dtype DT2 ) const DT2 * );
    457 
    458 forall( ftype FT ) FT *                 ?=?( FT *          *, forall( ftype FT2 ) FT2 * );
    459 forall( ftype FT ) FT *                 ?=?( FT * volatile *, forall( ftype FT2 ) FT2 * );
     449// //forall( dtype DT ) DT *                    ?=?(                DT *          *, zero_t );
     450// //forall( dtype DT ) DT *                    ?=?(                DT * volatile *, zero_t );
     451// forall( dtype DT ) const DT *                ?=?( const          DT *          *, zero_t );
     452// forall( dtype DT ) const DT *                ?=?( const          DT * volatile *, zero_t );
     453// //forall( dtype DT ) volatile DT *   ?=?( volatile       DT *          *, zero_t );
     454// //forall( dtype DT ) volatile DT *   ?=?( volatile       DT * volatile *, );
     455// forall( dtype DT ) const volatile DT *       ?=?( const volatile DT *          *, zero_t );
     456// forall( dtype DT ) const volatile DT *       ?=?( const volatile DT * volatile *, zero_t );
     457
     458// forall( ftype FT ) FT *                      ?=?( FT *          *, zero_t );
     459// forall( ftype FT ) FT *                      ?=?( FT * volatile *, zero_t );
    460460
    461461forall( dtype T | sized(T) ) T *                        ?+=?(                T *          *, ptrdiff_t );
     
    799799void    ?{}( const volatile void *          *, const volatile void * );
    800800
    801 //forall( dtype DT ) void ?{}(              DT *          *, forall( dtype DT2 ) const DT2 * );
    802 //forall( dtype DT ) void ?{}(              DT * volatile *, forall( dtype DT2 ) const DT2 * );
    803 forall( dtype DT ) void ?{}( const          DT *          *, forall( dtype DT2 ) const DT2 * );
    804 //forall( dtype DT ) void ?{}( volatile     DT *          *, forall( dtype DT2 ) const DT2 * );
    805 //forall( dtype DT ) void ?{}( volatile     DT * volatile *, forall( dtype DT2 ) const DT2 * );
    806 forall( dtype DT ) void ?{}( const volatile DT *          *, forall( dtype DT2 ) const DT2 * );
    807 
    808 forall( ftype FT ) void ?{}( FT *          *, forall( ftype FT2 ) FT2 * );
     801// //forall( dtype DT ) void ?{}(                   DT *          *, zero_t );
     802// //forall( dtype DT ) void ?{}(                   DT * volatile *, zero_t );
     803// forall( dtype DT ) void ?{}( const       DT *          *, zero_t );
     804// //forall( dtype DT ) void ?{}( volatile          DT *          *, zero_t );
     805// //forall( dtype DT ) void ?{}( volatile          DT * volatile *, zero_t );
     806// forall( dtype DT ) void ?{}( const volatile DT *       *, zero_t );
     807
     808// forall( ftype FT ) void      ?{}( FT *          *, zero_t );
    809809
    810810// default ctors
  • src/tests/.expect/32/math.txt

    rff98952 r4a368547  
    1 fabs: 1 1 1 1.41421 1.41421356237309505 1.41421356237309505
    2 fmod: 1 1 1 1 1 1
    3 remainder: -1 -1 -1
    4 remquo: 7 0.0999999 7 0.1 7 0.0999999999999999999
    5 div: 7 0.0999999 7 0.1 7 0.0999999999999999999
    6 fma: -2 -2 -2
    7 fdim: 2 2 2
    8 nan: nan nan nan
    9 exp: 2.71828 2.71828182845905 2.71828182845904524 1.46869+2.28736i 1.46869393991589+2.28735528717884i 1.46869393991588516+2.28735528717884239i
    10 exp2: 2 2 2
    11 expm1: 1.71828 1.71828182845905 1.71828182845904524
    12 log: 0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i
    13 log2: 3 3 3
    14 log10: 2 2 2
    15 log1p: 0.693147 0.693147180559945 0.693147180559945309
    16 ilogb: 0 0 0
    17 logb: 3 3 3
    18 sqrt: 1 1 1 1.09868+0.45509i 1.09868411346781+0.455089860562227i 1.09868411346780997+0.455089860562227341i
    19 cbrt: 3 3 3
    20 hypot: 1.41421 1.4142135623731 1.41421356237309505
    21 pow: 1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i
    22 sin: 0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i
    23 cos: 0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i
    24 tan: 1.55741 1.5574077246549 1.55740772465490223 0.271753+1.08392i 0.271752585319512+1.08392332733869i 0.271752585319511717+1.08392332733869454i
    25 asin: 1.5708 1.5707963267949 1.57079632679489662 0.66624+1.06128i 0.666239432492515+1.06127506190504i 0.666239432492515255+1.06127506190503565i
    26 acos: 0 0 0 0.904557-1.06128i 0.904556894302381-1.06127506190504i 0.904556894302381364-1.06127506190503565i
    27 atan: 0.785398 0.785398163397448 0.78539816339744831 1.01722+0.402359i 1.01722196789785+0.402359478108525i 1.01722196789785137+0.402359478108525094i
    28 atan2: 0.785398 0.785398163397448 0.78539816339744831 atan: 0.785398 0.785398163397448 0.78539816339744831 sinh: 1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i
    29 cosh: 1.54308 1.54308063481524 1.54308063481524378 0.83373+0.988898i 0.833730025131149+0.988897705762865i 0.833730025131149049+0.988897705762865096i
    30 tanh: 0.761594 0.761594155955765 0.761594155955764888 1.08392+0.271753i 1.08392332733869+0.271752585319512i 1.08392332733869454+0.271752585319511717i
    31 acosh: 0 0 0 1.06128+0.904557i 1.06127506190504+0.904556894302381i 1.06127506190503565+0.904556894302381364i
    32 asinh: 0.881374 0.881373587019543 0.881373587019543025 1.06128+0.666239i 1.06127506190504+0.666239432492515i 1.06127506190503565+0.666239432492515255i
    33 atanh: inf inf inf 0.402359+1.01722i 0.402359478108525+1.01722196789785i 0.402359478108525094+1.01722196789785137i
    34 erf: 0.842701 0.842700792949715 0.842700792949714869
    35 erfc: 0.157299 0.157299207050285 0.157299207050285131
    36 lgamma: 1.79176 1.79175946922805 1.791759469228055
    37 lgamma: 1.79176 1 1.79175946922805 1 1.791759469228055 1
    38 tgamma: 6 6 6
    39 floor: 1 1 1
    40 ceil: 2 2 2
    41 trunc: 3 3 3
    42 rint: 2 2 2
    43 rint: 2 2 2
    44 rint: 2 2 2
    45 lrint: 2 2 2
    46 llrint: 2 2 2
    47 nearbyint: 4 4 4
    48 round: 2 2 2
    49 round: 2 2 2
    50 round: 2 2 2
    51 lround: 2 2 2
    52 llround: 2 2 2
    53 copysign: -1 -1 -1
    54 frexp: 0.5 3 0.5 3 0.5 3
    55 ldexp: 8 8 8
    56 modf: 2 0.3 2 0.3 2 0.3 nextafter: 2 2 2
    57 nexttoward: 2 2 2
    58 scalbn: 16 16 16
    59 scalbln: 16 16 16
     1fmod:1 1 1 1 1 1
     2remainder:-1 -1 -1
     3remquo:7 0.0999999 7 0.1 7 0.0999999999999999999
     4div:7 0.0999999 7 0.1 7 0.0999999999999999999
     5fma:-2 -2 -2
     6fdim:2 2 2
     7nan:nan nan nan
     8exp:2.71828 2.71828182845905 2.71828182845904524 1.46869+2.28736i 1.46869393991589+2.28735528717884i 1.46869393991588516+2.28735528717884239i
     9exp2:2 2 2
     10expm1:1.71828 1.71828182845905 1.71828182845904524
     11log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i
     12log2:3 3 3
     13log10:2 2 2
     14log1p:0.693147 0.693147180559945 0.693147180559945309
     15ilogb:0 0 0
     16logb:3 3 3
     17sqrt:1 1 1 1.09868+0.45509i 1.09868411346781+0.455089860562227i 1.09868411346780997+0.455089860562227341i
     18cbrt:3 3 3
     19hypot:1.41421 1.4142135623731 1.41421356237309505
     20pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i
     21sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i
     22cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i
     23tan:1.55741 1.5574077246549 1.55740772465490223 0.271753+1.08392i 0.271752585319512+1.08392332733869i 0.271752585319511717+1.08392332733869454i
     24asin:1.5708 1.5707963267949 1.57079632679489662 0.66624+1.06128i 0.666239432492515+1.06127506190504i 0.666239432492515255+1.06127506190503565i
     25acos:0 0 0 0.904557-1.06128i 0.904556894302381-1.06127506190504i 0.904556894302381364-1.06127506190503565i
     26atan:0.785398 0.785398163397448 0.78539816339744831 1.01722+0.402359i 1.01722196789785+0.402359478108525i 1.01722196789785137+0.402359478108525094i
     27atan2:0.785398 0.785398163397448 0.78539816339744831 atan:0.785398 0.785398163397448 0.78539816339744831 sinh:1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i
     28cosh:1.54308 1.54308063481524 1.54308063481524378 0.83373+0.988898i 0.833730025131149+0.988897705762865i 0.833730025131149049+0.988897705762865096i
     29tanh:0.761594 0.761594155955765 0.761594155955764888 1.08392+0.271753i 1.08392332733869+0.271752585319512i 1.08392332733869454+0.271752585319511717i
     30acosh:0 0 0 1.06128+0.904557i 1.06127506190504+0.904556894302381i 1.06127506190503565+0.904556894302381364i
     31asinh:0.881374 0.881373587019543 0.881373587019543025 1.06128+0.666239i 1.06127506190504+0.666239432492515i 1.06127506190503565+0.666239432492515255i
     32atanh:inf inf inf 0.402359+1.01722i 0.402359478108525+1.01722196789785i 0.402359478108525094+1.01722196789785137i
     33erf:0.842701 0.842700792949715 0.842700792949714869
     34erfc:0.157299 0.157299207050285 0.157299207050285131
     35lgamma:1.79176 1.79175946922805 1.791759469228055
     36lgamma:1.79176 1 1.79175946922805 1 1.791759469228055 1
     37tgamma:6 6 6
     38floor:1 1 1
     39ceil:2 2 2
     40trunc:3 3 3
     41rint:2 2 2
     42rint:2 2 2
     43rint:2 2 2
     44lrint:2 2 2
     45llrint:2 2 2
     46nearbyint:4 4 4
     47round:2 2 2
     48round:2 2 2
     49round:2 2 2
     50lround:2 2 2
     51llround:2 2 2
     52copysign:-1 -1 -1
     53frexp:0.5 3 0.5 3 0.5 3
     54ldexp:8 8 8
     55modf:2 0.3 2 0.3 2 0.3 nextafter:2 2 2
     56nexttoward:2 2 2
     57scalbn:16 16 16
     58scalbln:16 16 16
  • src/tests/.expect/64/math.txt

    rff98952 r4a368547  
    1 fabs: 1 1 1 1.41421 1.41421356237309505 1.41421356237309505
    2 fmod: 1 1 1 1 1 1
    3 remainder: -1 -1 -1
    4 remquo: 7 0.0999999 7 0.1 7 0.0999999999999999999
    5 div: 7 0.0999999 7 0.1 7 0.0999999999999999999
    6 fma: -2 -2 -2
    7 fdim: 2 2 2
    8 nan: nan nan nan
    9 exp: 2.71828 2.71828182845905 2.71828182845904524 1.46869+2.28736i 1.46869393991589+2.28735528717884i 1.46869393991588516+2.28735528717884239i
    10 exp2: 2 2 2
    11 expm1: 1.71828 1.71828182845905 1.71828182845904524
    12 log: 0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i
    13 log2: 3 3 3
    14 log10: 2 2 2
    15 log1p: 0.693147 0.693147180559945 0.693147180559945309
    16 ilogb: 0 0 0
    17 logb: 3 3 3
    18 sqrt: 1 1 1 1.09868+0.45509i 1.09868411346781+0.455089860562227i 1.09868411346780997+0.455089860562227341i
    19 cbrt: 3 3 3
    20 hypot: 1.41421 1.4142135623731 1.41421356237309505
    21 pow: 1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i
    22 sin: 0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i
    23 cos: 0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i
    24 tan: 1.55741 1.5574077246549 1.55740772465490223 0.271753+1.08392i 0.271752585319512+1.08392332733869i 0.271752585319511717+1.08392332733869454i
    25 asin: 1.5708 1.5707963267949 1.57079632679489662 0.666239+1.06128i 0.666239432492515+1.06127506190504i 0.666239432492515255+1.06127506190503565i
    26 acos: 0 0 0 0.904557-1.06128i 0.904556894302381-1.06127506190504i 0.904556894302381364-1.06127506190503565i
    27 atan: 0.785398 0.785398163397448 0.78539816339744831 1.01722+0.402359i 1.01722196789785+0.402359478108525i 1.01722196789785137+0.402359478108525094i
    28 atan2: 0.785398 0.785398163397448 0.78539816339744831 atan: 0.785398 0.785398163397448 0.78539816339744831 sinh: 1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i
    29 cosh: 1.54308 1.54308063481524 1.54308063481524378 0.83373+0.988898i 0.833730025131149+0.988897705762865i 0.833730025131149049+0.988897705762865096i
    30 tanh: 0.761594 0.761594155955765 0.761594155955764888 1.08392+0.271753i 1.08392332733869+0.271752585319512i 1.08392332733869454+0.271752585319511717i
    31 acosh: 0 0 0 1.06128+0.904557i 1.06127506190504+0.904556894302381i 1.06127506190503565+0.904556894302381364i
    32 asinh: 0.881374 0.881373587019543 0.881373587019543025 1.06128+0.666239i 1.06127506190504+0.666239432492515i 1.06127506190503565+0.666239432492515255i
    33 atanh: inf inf inf 0.402359+1.01722i 0.402359478108525+1.01722196789785i 0.402359478108525094+1.01722196789785137i
    34 erf: 0.842701 0.842700792949715 0.842700792949714869
    35 erfc: 0.157299 0.157299207050285 0.157299207050285131
    36 lgamma: 1.79176 1.79175946922805 1.791759469228055
    37 lgamma: 1.79176 1 1.79175946922805 1 1.791759469228055 1
    38 tgamma: 6 6 6
    39 floor: 1 1 1
    40 ceil: 2 2 2
    41 trunc: 3 3 3
    42 rint: 2 2 2
    43 rint: 2 2 2
    44 rint: 2 2 2
    45 lrint: 2 2 2
    46 llrint: 2 2 2
    47 nearbyint: 4 4 4
    48 round: 2 2 2
    49 round: 2 2 2
    50 round: 2 2 2
    51 lround: 2 2 2
    52 llround: 2 2 2
    53 copysign: -1 -1 -1
    54 frexp: 0.5 3 0.5 3 0.5 3
    55 ldexp: 8 8 8
    56 modf: 2 0.3 2 0.3 2 0.3 nextafter: 2 2 2
    57 nexttoward: 2 2 2
    58 scalbn: 16 16 16
    59 scalbln: 16 16 16
     1fmod:1 1 1 1 1 1
     2remainder:-1 -1 -1
     3remquo:7 0.0999999 7 0.1 7 0.0999999999999999999
     4div:7 0.0999999 7 0.1 7 0.0999999999999999999
     5fma:-2 -2 -2
     6fdim:2 2 2
     7nan:nan nan nan
     8exp:2.71828 2.71828182845905 2.71828182845904524 1.46869+2.28736i 1.46869393991589+2.28735528717884i 1.46869393991588516+2.28735528717884239i
     9exp2:2 2 2
     10expm1:1.71828 1.71828182845905 1.71828182845904524
     11log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i
     12log2:3 3 3
     13log10:2 2 2
     14log1p:0.693147 0.693147180559945 0.693147180559945309
     15ilogb:0 0 0
     16logb:3 3 3
     17sqrt:1 1 1 1.09868+0.45509i 1.09868411346781+0.455089860562227i 1.09868411346780997+0.455089860562227341i
     18cbrt:3 3 3
     19hypot:1.41421 1.4142135623731 1.41421356237309505
     20pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i
     21sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i
     22cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i
     23tan:1.55741 1.5574077246549 1.55740772465490223 0.271753+1.08392i 0.271752585319512+1.08392332733869i 0.271752585319511717+1.08392332733869454i
     24asin:1.5708 1.5707963267949 1.57079632679489662 0.666239+1.06128i 0.666239432492515+1.06127506190504i 0.666239432492515255+1.06127506190503565i
     25acos:0 0 0 0.904557-1.06128i 0.904556894302381-1.06127506190504i 0.904556894302381364-1.06127506190503565i
     26atan:0.785398 0.785398163397448 0.78539816339744831 1.01722+0.402359i 1.01722196789785+0.402359478108525i 1.01722196789785137+0.402359478108525094i
     27atan2:0.785398 0.785398163397448 0.78539816339744831 atan:0.785398 0.785398163397448 0.78539816339744831 sinh:1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i
     28cosh:1.54308 1.54308063481524 1.54308063481524378 0.83373+0.988898i 0.833730025131149+0.988897705762865i 0.833730025131149049+0.988897705762865096i
     29tanh:0.761594 0.761594155955765 0.761594155955764888 1.08392+0.271753i 1.08392332733869+0.271752585319512i 1.08392332733869454+0.271752585319511717i
     30acosh:0 0 0 1.06128+0.904557i 1.06127506190504+0.904556894302381i 1.06127506190503565+0.904556894302381364i
     31asinh:0.881374 0.881373587019543 0.881373587019543025 1.06128+0.666239i 1.06127506190504+0.666239432492515i 1.06127506190503565+0.666239432492515255i
     32atanh:inf inf inf 0.402359+1.01722i 0.402359478108525+1.01722196789785i 0.402359478108525094+1.01722196789785137i
     33erf:0.842701 0.842700792949715 0.842700792949714869
     34erfc:0.157299 0.157299207050285 0.157299207050285131
     35lgamma:1.79176 1.79175946922805 1.791759469228055
     36lgamma:1.79176 1 1.79175946922805 1 1.791759469228055 1
     37tgamma:6 6 6
     38floor:1 1 1
     39ceil:2 2 2
     40trunc:3 3 3
     41rint:2 2 2
     42rint:2 2 2
     43rint:2 2 2
     44lrint:2 2 2
     45llrint:2 2 2
     46nearbyint:4 4 4
     47round:2 2 2
     48round:2 2 2
     49round:2 2 2
     50lround:2 2 2
     51llround:2 2 2
     52copysign:-1 -1 -1
     53frexp:0.5 3 0.5 3 0.5 3
     54ldexp:8 8 8
     55modf:2 0.3 2 0.3 2 0.3 nextafter:2 2 2
     56nexttoward:2 2 2
     57scalbn:16 16 16
     58scalbln:16 16 16
  • src/tests/KRfunctions.c

    rff98952 r4a368547  
    1 //                               -*- Mode: C -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
     
    1110// Created On       : Thu Feb 16 15:23:17 2017
    1211// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Thu Feb 16 15:25:52 2017
    14 // Update Count     : 2
     12// Last Modified On : Wed May 24 22:05:00 2017
     13// Update Count     : 3
    1514//
    1615
  • src/tests/Makefile.am

    rff98952 r4a368547  
    1111## Created On       : Sun May 31 09:08:15 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Sun May 14 14:43:48 2017
    14 ## Update Count     : 42
     13## Last Modified On : Thu May 25 14:39:15 2017
     14## Update Count     : 43
    1515###############################################################################
    1616
     
    2222concurrent=yes
    2323quick_test+= coroutine thread monitor
    24 concurrent_test=coroutine thread monitor multi-monitor sched-int-disjoint sched-int-barge sched-int-wait sched-ext sched-ext-multi preempt
     24concurrent_test=coroutine thread monitor multi-monitor sched-int-barge sched-int-block sched-int-disjoint sched-int-wait sched-ext sched-ext-multi preempt
    2525else
    2626concurrent=no
     
    3636
    3737.PHONY : list
    38 EXTRA_PROGRAMS = fstream_test vector_test avl_test constant0-1DP constant0-1ND constant0-1NDDP # build but do not install
     38EXTRA_PROGRAMS = fstream_test vector_test avl_test # build but do not install
    3939
    4040fstream_test_SOURCES = fstream_test.c
     
    5959.dummy : .dummy.c
    6060        ${CC} ${BUILD_FLAGS} -XCFA -n ${<} -o ${@}                              #don't use CFLAGS, this rule is not a real test
    61 
    62 constant0-1DP : constant0-1.c
    63         ${CC} ${CFLAGS} -DDUPS ${<} -o ${@}
    64 
    65 constant0-1ND : constant0-1.c
    66         ${CC} ${CFLAGS} -DNEWDECL ${<} -o ${@}
    67 
    68 constant0-1NDDP : constant0-1.c
    69         ${CC} ${CFLAGS} -DNEWDECL -DDUPS ${<} -o ${@}
    7061
    7162dtor-early-exit-ERR1: dtor-early-exit.c
  • src/tests/Makefile.in

    rff98952 r4a368547  
    3939@BUILD_CONCURRENCY_TRUE@am__append_1 = coroutine thread monitor
    4040EXTRA_PROGRAMS = fstream_test$(EXEEXT) vector_test$(EXEEXT) \
    41         avl_test$(EXEEXT) constant0-1DP$(EXEEXT) \
    42         constant0-1ND$(EXEEXT) constant0-1NDDP$(EXEEXT)
     41        avl_test$(EXEEXT)
    4342subdir = src/tests
    4443DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     
    5655avl_test_OBJECTS = $(am_avl_test_OBJECTS)
    5756avl_test_LDADD = $(LDADD)
    58 constant0_1DP_SOURCES = constant0-1DP.c
    59 constant0_1DP_OBJECTS = constant0-1DP.$(OBJEXT)
    60 constant0_1DP_LDADD = $(LDADD)
    61 constant0_1ND_SOURCES = constant0-1ND.c
    62 constant0_1ND_OBJECTS = constant0-1ND.$(OBJEXT)
    63 constant0_1ND_LDADD = $(LDADD)
    64 constant0_1NDDP_SOURCES = constant0-1NDDP.c
    65 constant0_1NDDP_OBJECTS = constant0-1NDDP.$(OBJEXT)
    66 constant0_1NDDP_LDADD = $(LDADD)
    6757am_fstream_test_OBJECTS = fstream_test.$(OBJEXT)
    6858fstream_test_OBJECTS = $(am_fstream_test_OBJECTS)
     
    9585am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
    9686am__v_GEN_0 = @echo "  GEN   " $@;
    97 SOURCES = $(avl_test_SOURCES) constant0-1DP.c constant0-1ND.c \
    98         constant0-1NDDP.c $(fstream_test_SOURCES) \
     87SOURCES = $(avl_test_SOURCES) $(fstream_test_SOURCES) \
    9988        $(vector_test_SOURCES)
    100 DIST_SOURCES = $(avl_test_SOURCES) constant0-1DP.c constant0-1ND.c \
    101         constant0-1NDDP.c $(fstream_test_SOURCES) \
     89DIST_SOURCES = $(avl_test_SOURCES) $(fstream_test_SOURCES) \
    10290        $(vector_test_SOURCES)
    10391ETAGS = etags
     
    230218@BUILD_CONCURRENCY_TRUE@concurrent = yes
    231219@BUILD_CONCURRENCY_FALSE@concurrent_test =
    232 @BUILD_CONCURRENCY_TRUE@concurrent_test = coroutine thread monitor multi-monitor sched-int-disjoint sched-int-barge sched-int-wait sched-ext sched-ext-multi preempt
     220@BUILD_CONCURRENCY_TRUE@concurrent_test = coroutine thread monitor multi-monitor sched-int-barge sched-int-block sched-int-disjoint sched-int-wait sched-ext sched-ext-multi preempt
    233221
    234222# applies to both programs
     
    297285@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl4.Po@am__quote@
    298286@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl_test.Po@am__quote@
    299 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant0-1DP.Po@am__quote@
    300 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant0-1ND.Po@am__quote@
    301 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant0-1NDDP.Po@am__quote@
    302287@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstream_test.Po@am__quote@
    303288@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_int.Po@am__quote@
     
    679664        ${CC} ${BUILD_FLAGS} -XCFA -n ${<} -o ${@}                              #don't use CFLAGS, this rule is not a real test
    680665
    681 constant0-1DP : constant0-1.c
    682         ${CC} ${CFLAGS} -DDUPS ${<} -o ${@}
    683 
    684 constant0-1ND : constant0-1.c
    685         ${CC} ${CFLAGS} -DNEWDECL ${<} -o ${@}
    686 
    687 constant0-1NDDP : constant0-1.c
    688         ${CC} ${CFLAGS} -DNEWDECL -DDUPS ${<} -o ${@}
    689 
    690666dtor-early-exit-ERR1: dtor-early-exit.c
    691667        ${CC} ${CFLAGS} -DERR1 ${<} -o ${@}
  • src/tests/complex.c

    rff98952 r4a368547  
     1//
     2// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
     3//
     4// The contents of this file are covered under the licence agreement in the
     5// file "LICENCE" distributed with Cforall.
     6//
     7// complex.c --
     8//
     9// Author           : Peter A. Buhr
     10// Created On       : Wed May 24 22:07:31 2017
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed May 24 22:08:01 2017
     13// Update Count     : 1
     14//
     15
    116#include <stdio.h>
    217#include <complex.h>
     
    2035#endif // __CFA
    2136}
     37
     38// Local Variables: //
     39// tab-width: 4 //
     40// compile-command: "cfa complex.c" //
     41// End: //
  • src/tests/gmp.c

    rff98952 r4a368547  
    1010// Created On       : Tue Apr 19 08:55:51 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 22 09:05:09 2017
    13 // Update Count     : 538
     12// Last Modified On : Wed May 24 22:05:38 2017
     13// Update Count     : 540
    1414//
    1515
     
    8888        sout | (int)0 | fact | endl;
    8989        for ( unsigned int i = 1; i <= 40; i += 1 ) {
    90                 fact = fact * i;                                                                // general case
     90                fact *= i;                                                                              // general case
    9191                sout | i | fact | endl;
    9292        } // for
     
    9494
    9595// Local Variables: //
    96 // mode: c //
    9796// tab-width: 4 //
     97// compile-command: "cfa gmp.c -l gmp" //
    9898// End: //
  • src/tests/libcfa_vector.c

    rff98952 r4a368547  
    2727
    2828int main() {
    29         vector( int, heap_allocator(int) ) iv;
     29        vector( int ) iv;
    3030
    3131        assert( empty( &iv ) );
  • src/tests/math.c

    rff98952 r4a368547  
    1010// Created On       : Fri Apr 22 14:59:21 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Apr 24 13:24:20 2016
    13 // Update Count     : 70
     12// Last Modified On : Wed May 24 13:04:33 2017
     13// Update Count     : 71
    1414//
    1515
     
    2222        long double l;
    2323
    24         sout | "fabs:" | fabs( -1.0F ) | fabs( -1.0D ) | fabs( -1.0L ) | cabs( -1.0F+1.0FI ) | cabs( -1.0D+1.0DI ) | cabs( -1.0DL+1.0LI ) | endl;
    2524        sout | "fmod:" | 5.0F % -2.0F | fmod( 5.0F, -2.0F ) | 5.0D % -2.0D | fmod( 5.0D, -2.0D ) | 5.0L % -2.0L | fmod( 5.0L, -2.0L ) | endl;
    2625        sout | "remainder:" | remainder( 2.0F, 3.0F ) | remainder( 2.0D, 3.0D ) | remainder( 2.0L, 3.0L ) | endl;
  • src/tests/numericConstants.c

    rff98952 r4a368547  
     1//
     2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
     3//
     4// The contents of this file are covered under the licence agreement in the
     5// file "LICENCE" distributed with Cforall.
     6//
     7// numericConstants.c --
     8//
     9// Author           : Peter A. Buhr
     10// Created On       : Wed May 24 22:10:36 2017
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed May 24 22:11:36 2017
     13// Update Count     : 2
     14//
     15
    116int main() {
    217        1;                                                      // decimal
     
    4863        0x_ff.ffp0;                                     // hex real
    4964        0x_1.ffff_ffff_p_128_l;
    50 }
     65} // main
     66
     67// Local Variables: //
     68// tab-width: 4 //
     69// compile-command: "cfa minmax.c" //
     70// End: //
  • src/tests/rational.c

    rff98952 r4a368547  
    1010// Created On       : Mon Mar 28 08:43:12 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 15 21:32:22 2017
    13 // Update Count     : 64
     12// Last Modified On : Wed May 17 15:46:35 2017
     13// Update Count     : 65
    1414//
    1515
  • src/tests/sched-int-disjoint.c

    rff98952 r4a368547  
    7878        signal( &cond, a, &data );
    7979
    80         int pauses = (unsigned)rand48() % 10;
    81         for(int i = 0; i < pauses; i++) {
    82                 yield();
    83         }
     80        yield( (unsigned)rand48() % 10 );
    8481
    8582        //This is technically a mutual exclusion violation but the mutex monitor protects us
  • src/tests/test.py

    rff98952 r4a368547  
    253253        # for each test to run
    254254        try :
    255                 results = pool.map_async(partial(run_test_worker, generate=generate, dry_run=dry_run, debug=debug), tests ).get(3600)
     255                results = pool.map_async(partial(run_test_worker, generate=generate, dry_run=dry_run, debug=debug), tests, chunksize = 1 ).get(3600)
    256256        except KeyboardInterrupt:
    257257                pool.terminate()
  • tools/cfa.nanorc

    rff98952 r4a368547  
    1212color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|auto)\>"
    1313color green "\<(static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
    14 color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
     14color green "\<((s?size)|one|zero|((u_?)?int(8|16|32|64|ptr)))_t\>"
    1515
    1616# Declarations
     
    3939
    4040# Values
     41# Booleans
     42color blue "\<(true|false)\>"
    4143# Characters
    4244color brightmagenta "'([^'\]|(\\")|(\\['abfnrtv\\]))'"
Note: See TracChangeset for help on using the changeset viewer.