Changes in / [e75b753:22a4292]


Ignore:
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • INSTALL

    re75b753 r22a4292  
    1 cfa-cc: Cforall to C Trans-compiler
     1cfa-cc: The Cforall->C Compiler System
    22======================================
    33
    44Cforall is built using GNU Make and the GNU Autoconf system.  It also requires
    5 g++ version >= 6, bison and flex.  On systems where GNU Make is the default
     5g++ version >= 4.6, bison and flex.  On systems where GNU Make is the default
    66make, the system is built by entering the commands:
    77
    8 For developers using the root git:
     8For devs using the maintainer's git:
    99
    10   $ ./autogen.sh
    11   $ ./configure [ --prefix=/some/directory ]
    12   $ make -j 8 install
     10        ./autogen.sh
     11        ./configure
     12        make
     13        make install
    1314
    1415For users using the distributed tarball / github:
    1516
    16   $ ./configure
    17   $ make -j 8 install
     17        ./configure
     18        make
     19        make check
     20        make install
    1821
    19 where 8 is the number of CPUs on your computer.
     22Options for 'configure'
     23-----------------------
     24The script 'configure' accepts many command line arguments.  Run './configure
     25--help' to see a list of all of them.  This document attempts to summarize the
     26most useful arguments.
    2027
    21 
    22 Options for configure
    23 ======================================
    24 The script 'configure' accepts many command-line arguments.  Run
    25 
    26   $ ./configure --help
    27 
    28 to list them.  The most common argument is:
    29 
    30   --prefix=/some/directory controls the path prefix common to all installed
    31     cfa-cc components.  Components are installed in directories bin and lib.
    32     If unspecified, prefix defaults to /usr/local.  To use (a subdirectory of)
    33     your home directory, ${HOME}/some/dir, but do not put quotes around the
    34     directory path; Cforall may appear to build, but the installed version may
    35     not work properly.
    36 
    37 
    38 Build Test
    39 ======================================
    40 
    41   $ cd ./test
    42   $ make -j 8 all-tests
    43 
    44 The tests take about 2-5 minutes and can be stopped at any time.
     28--prefix=/some/directory controls the path prefix common to all installed
     29  cfa-cc components.  Some components are installed in /some/directory/bin,
     30  others in /some/directory/lib.  If unspecified, this defaults to /usr/local.
     31  To use (a subdirectory of) your home directory, ${HOME}/some/dir works, but
     32  it is important not to put quotes around the directory path; Cforall may
     33  appear to build, but the installed version may not work properly.
  • README

    re75b753 r22a4292  
    1 cfa-cc: Cforall to C Trans-compiler
     1cfa-cc: The Cforall->C Compiler System
    22======================================
    33
     
    66responsibility for the consequences of any malfunction of the software,
    77including the malfunction of any programs compiled using the software.
    8 
    98
    109What is Cforall?
     
    2625into a modern programming language.
    2726
    28 
    2927What is cfa-cc?
    3028---------------
    31 cfa-cc is a collection of programs centred around a translator (trans-compiler)
    32 that takes Cforall code as input and outputs augmented C code that implements
    33 new features.  The translator is complemented by a compiler driver in the style
    34 of "gcc", which handles preprocessing (including cfa-cc after cpp), compiling,
    35 assembling, and linking.
     29cfa-cc is a collection of programs centred around a translator that takes
     30Cforall code as input and outputs corresponding C code.  This is complemented
     31by a compiler driver in the style of "gcc", which handles preprocessing,
     32compiling, assembling, and linking and invokes the translator at appropriate
     33moments.
    3634
    37 cfa-cc is currently written in C++, but eventually be rewritten in Cforall.
     35What is required in order to use cfa-cc?
     36----------------------------------------
     37Building cfa-cc requires GNU Make and gcc/g++ 4.  cfa-cc is written in C++.
    3838
     39The compiler driver uses an installed version of gcc to handle all aspects of
     40the compilation process except for the Cforall->C translation.  Currently, only
     41gcc 4.x is supported.
    3942
    40 How to download and build cfa-cc?
    41 ----------------------------------------
    42 Download cfa-cc using
    43 
    44   $ git clone https://github.com/cforall/cforall.git
    45 
    46 Read the ./INSTALL file for build instructions.
    47 
    48 
    49 How to use cfa-cc?
     43How is cfa-cc used?
    5044-------------------
    51 The compiler driver "cfa" accepts all of the arguments for gcc, and is used in
     45The compiler driver "cfa" accepts all of the arguments of gcc, and is used in
    5246the same way.  For example:
    5347
    54   cfa -c test.c
    55   cfa test.o
     48        cfa -c test.c
     49        cfa test.o
    5650
    57 Cforall source files may end with '.c' or '.cfa' in order to be compiled by the
    58 compiler driver.  In addition, the flag "-CFA" causes cfa to invoke the C
    59 preprocessor and Cforall translator and write the translator output to standard
    60 output.
     51Cforall source files must end with '.c' in order to be compiled by the compiler
     52driver.  In addition, the flag "-CFA" causes cfa to invoke the preprocessor and
     53translator and send the translator output to standard output.
    6154
     55It is possible to invoke the translator directly.  The translator is installed
     56by default as /usr/local/lib/cfa-cpp.  A typical invocation is:
    6257
    63 How to use C code with cfa-cc?
     58        /usr/local/lib/cfa-cpp -cp infile outfile
     59
     60If outfile is omitted, output goes to standard output; if infile is also
     61omitted, input comes from standard input.  Options to the translator other than
     62"-cp" will not produce valid C code and are only useful for debugging the
     63translator.
     64
     65How can C code be used with cfa-cc?
    6466-----------------------------------
    65 cfa-cc should be able to compile and link most ANSI C programs with associated
    66 C standard libraries.
     67cfa-cc should be able to compile most ANSI C programs.  It is also possible to
     68link against C libraries in most cases.  Since Cforall supports overloading,
     69however, names used in Cforall code are mangled in the output C code.  This
     70caused linker failures when the names refer to functions and objects in code
     71compiled with a standard C compiler.  For this reason, it is necessary to
     72enclose the declarations of these functions and objects in extern "C" {}
     73blocks.  For example:
    6774
    68 Like C++, Cforall supports overloading, resulting in duplicate names that are
    69 disambiguated using name mangling in the translated C code.  To prevent
    70 mangling of C names, it is necessary to wrap C declarations in an extern "C"
    71 block, as for C++.  For example:
    72 
    73   extern "C" {
    74   #include <curses.h>
    75   #include <getopt.h>
    76   }
     75        extern "C" {
     76        #include <stdio.h>
     77        #include <stdlib.h>
     78        }
    7779
    7880The extern "C" turns off name mangling for functions and objects declared
    79 within the block. All C standard headers are pre-wrapped, so most wrapping is
    80 unnecessary.
    81 
     81within the block.  As a result, it is not possible to overload their names.
    8282
    8383What's wrong with cfa-cc?
    8484-------------------------
    8585
    86 The authors consider cfa-cc to be in a semi-stable state.  It is possible for
    87 reasonable Cforall programs to fail compilation.  A list of bugs and fixes is
    88 available here: https://cforall.uwaterloo.ca/trac.  We encourage users to
    89 report their experiences to cforall@plg.uwaterloo.ca, but we can make no
    90 promises regarding support.
     86The authors consider this software to be in an unstable state.  It is quite
     87likely that there are many reasonable programs that will fail to compile.  We
     88encourage users to report their experiences to cforall@plg.uwaterloo.ca, but we
     89make no promises regarding support.
    9190
    92 Also, the Cforall features web-page https://cforall.uwaterloo.ca/features lists
    93 small syntactic and semantic differences with standard C.
     91We have fixed most of the problems that we are aware of.  There are some
     92exceptions:
    9493
     94- initializers are poorly implemented; in particular, file-scope initializers
     95  may result in the generation of invalid C code
     96
     97- the ISO C99 designated initialization syntax '[n] = m' or '.n = m' is not
     98  supported; use a colon in place of the equal sign
     99
     100- some legitimate programs will produce warnings from the C compiler; these are
     101  harmless (in particular, the creation of libcfa.a in the build process should
     102  cause four warnings from gcc)
     103
     104- abstract types introduced using the keyword 'type' are not implemented
     105  (although 'type' can be used to introduce type parameters)
     106
     107- the implicit coercion of structure types to the type of their first member is
     108  not implemented
    95109
    96110Who is responsible for cfa-cc?
    97111------------------------------
    98 Cforall was designed and implemented by Andrew Beach, Richard Bilson, Michael
    99 Brooks, Peter A. Buhr, Thierry Delisle Glen Ditchfield, Rodolfo G. Esteves,
    100 Aaron Moss, Colby Parsons, Rob Schluntz, Fangren Yu, Mubeen Zulfiqar, and others.
     112cfa-cc was written by Peter Buhr, Richard Bilson, and Rodolfo Esteves.
     113Questions and comments can be sent to cforall@plg.uwaterloo.ca.
    101114
    102 Check the Cforall web site https://cforall.uwaterloo.ca for news and updates.
     115The Cforall project maintains a web page:
     116
     117        https://cforall.uwaterloo.ca
  • doc/bibliography/pl.bib

    re75b753 r22a4292  
    16731673    address     = {Waterloo Ontario, Canada},
    16741674    month       = sep,
    1675     year        = 2020,
     1675    year        = 2018,
    16761676    note        = {\href{https://plg.uwaterloo.ca/~usystem/pub/uSystem/uC++.pdf}{https://\-plg.uwaterloo.ca/\-$\sim$usystem/\-pub/\-uSystem/uC++.pdf}},
    16771677}
     
    45524552    author      = {Martin Karsten},
    45534553    title       = {{libfibre:~User-Level Threading Runtime}},
    4554     howpublished= {\href{https://git.uwaterloo.ca/mkarsten/libfibre}{https://\-git.uwaterloo.ca/\-mkarsten/\-libfibre}},
     4554    howpublished= {\href{https://git.uwaterloo.ca/mkarsten/libfibre}
     4555                  {https://\-git.uwaterloo.ca/\-mkarsten/\-libfibre}},
    45554556    note        = {[Online; accessed 2020-04-15]},
    45564557}
  • src/Parser/parser.yy

    re75b753 r22a4292  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun 26 08:44:14 2021
    13 // Update Count     : 5025
     12// Last Modified On : Sun Jun 20 18:46:51 2021
     13// Update Count     : 5023
    1414//
    1515
     
    25642564        | '*'
    25652565                { $$ = TypeDecl::DStype; }                                              // dtype + sized
    2566         // | '(' '*' ')'
    2567         //      { $$ = TypeDecl::Ftype; }
    25682566        | ELLIPSIS
    25692567                { $$ = TypeDecl::Ttype; }
Note: See TracChangeset for help on using the changeset viewer.