Changeset 6244dfb


Ignore:
Timestamp:
May 27, 2015, 5:03:58 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
52ac3b4
Parents:
6aa5ec0f
Message:

update INSTALL README documentation

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • INSTALL

    r6aa5ec0f r6244dfb  
    33
    44Cforall is built using GNU Make and the GNU Autoconf system.  It also requires
    5 g++ version 3, bison and flex.  On systems where GNU Make is the default make
     5g++ version 4, bison and flex.  On systems where GNU Make is the default make
    66it may suffice to build the system by entering the commands
    77
     
    1717
    1818--prefix=/some/directory controls the path prefix common to all installed
    19 cfa-cc components.  Some components will be installed in /some/directory/bin,
    20 others in /some/directory/lib.  If unspecified, this defaults to /usr/local.
     19  cfa-cc components.  Some components will be installed in /some/directory/bin,
     20  others in /some/directory/lib.  If unspecified, this defaults to /usr/local.
    2121
    22 --with-backend-compiler=PROGRAM specifies the installed path of gcc 3.2.  It
    23 defaults to the first command named 'gcc' in the current PATH.
     22--with-backend-compiler=PROGRAM specifies the installed path of gcc.  It
     23  defaults to the first command named 'gcc' in the current PATH.
    2424
    2525cfa-cc itself is built with the version of g++ specified by the environment
  • README

    r6aa5ec0f r6244dfb  
    22======================================
    33
    4 This is a PRE-RELEASE version of cfa-cc.  It exists solely for the
    5 purpose of private experimentation and scholarly research.  The authors
    6 disclaim all responsibility for the consequences of any malfunction of
    7 the software, including the malfunction of any programs compiled using
    8 the software.
     4This is a PRE-RELEASE version of cfa-cc.  It exists solely for the purpose of
     5private experimentation and scholarly research.  The authors disclaim all
     6responsibility for the consequences of any malfunction of the software,
     7including the malfunction of any programs compiled using the software.
    98
    109What is Cforall?
    1110----------------
    12 Cforall is a language design extending ISO C. The purpose of the
    13 project is to engineer modern language features into C in an
    14 evolutionary rather than revolutionary way. Java is an example of the
    15 revolutionary approach of modernizing C/C++, resulting in a new
    16 language rather than an extension of its descendents. C++, Fortran 95
    17 and Cobol 9X are examples of the evolutionary approach where modern
    18 language features are added and problems fixed within the framework of
    19 an existing language.
     11Cforall is a language design extending ISO C. The purpose of the project is to
     12engineer modern language features into C in an evolutionary rather than
     13revolutionary way. Java is an example of the revolutionary approach of
     14modernizing C/C++, resulting in a new language rather than an extension of its
     15descendents. C++, Fortran 95 and Cobol 9X are examples of the evolutionary
     16approach where modern language features are added and problems fixed within the
     17framework of an existing language.
    2018
    21 The goal of this project is to produce a largely backwards compatible
    22 version of C containing many modern language features and fixing some
    23 of the well known C problems. Without continued development of the
    24 language, C will be unable to cope with the needs of modern programming
    25 problems and programmers; as a result, it will fade into disuse.
    26 Considering the large body of existing C code and programmers, there is
    27 a significant impetus to ensure C is transformed into a modern
    28 programming language.
     19The goal of this project is to produce a largely backwards compatible version
     20of C containing many modern language features and fixing some of the well known
     21C problems. Without continued development of the language, C will be unable to
     22cope with the needs of modern programming problems and programmers; as a
     23result, it will fade into disuse.  Considering the large body of existing C
     24code and programmers, there is a significant impetus to ensure C is transformed
     25into a modern programming language.
    2926
    3027What is cfa-cc?
    3128---------------
    32 cfa-cc is a collection of programs centred around a translator that
    33 takes Cforall code as input and outputs corresponding C code.  This
    34 is complemented by a compiler driver in the style of "gcc", which
    35 handles preprocessing, compiling, assembling, and linking and invokes
    36 the translator at appropriate moments.
     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.
    3734
    3835What is required in order to use cfa-cc?
    3936----------------------------------------
    40 Building cfa-cc requires GNU Make and gcc/g++ 3.  cfa-cc is written in
    41 C++.
     37Building cfa-cc requires GNU Make and gcc/g++ 4.  cfa-cc is written in C++.
    4238
    43 The compiler driver uses an installed version of gcc to handle all
    44 aspects of the compilation process except for the Cforall->C translation.
    45 Currently, only gcc 3.2 is supported.
     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.
    4642
    4743How is cfa-cc used?
    4844-------------------
    49 The compiler driver "cfa" accepts all of the arguments of gcc, and is
    50 used in the same way.  For example:
     45The compiler driver "cfa" accepts all of the arguments of gcc, and is used in
     46the same way.  For example:
    5147
    5248        cfa -c test.c
    5349        cfa test.o
    5450
    55 Cforall source files must end with '.c' in order to be compiled by the
    56 compiler driver.  In addition, the flag "-CFA" causes cfa to invoke the
    57 preprocessor and translator and send the translator output to standard
    58 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.
    5954
    60 In cases where the compiler driver is not useful (i.e., where gcc 3.2
    61 is not available), it is still possible to invoke the translator
    62 directly.  The translator is installed by default as
    63 /usr/local/lib/cfa-cpp.  A typical invocation is:
     55It is possible to invoke the translator directly.  The translator is installed
     56by default as /usr/local/lib/cfa-cpp.  A typical invocation is:
    6457
    6558        /usr/local/lib/cfa-cpp -cp infile outfile
    6659
    67 If outfile is omitted, output goes to standard output; if infile is
    68 also omitted, input comes from standard input.  Options to the
    69 translator other than "-cp" will not produce valid C code and are only
    70 useful for debugging the translator.
     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.
    7164
    7265How can C code be used with cfa-cc?
    7366-----------------------------------
    74 cfa-cc should be able to compile most ANSI C programs.  It is also
    75 possible to link against C libraries in most cases.  Since Cforall
    76 supports overloading, however, names used in Cforall code are
    77 mangled in the output C code.  This will cause linker failures when
    78 the names refer to functions and objects in code compiled with
    79 a standard C compiler.  For this reason, it is necessary to enclose
    80 the declarations of these functions and objects in extern "C" {}
     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" {}
    8173blocks.  For example:
    8274
     
    8779
    8880The extern "C" turns off name mangling for functions and objects declared
    89 within the block.  As a result, it is not possible to overload their
    90 names.
    91 
    92 It is our intention to have a transparent solution to this problem
    93 in place for our first official release.
     81within the block.  As a result, it is not possible to overload their names.
    9482
    9583What's wrong with cfa-cc?
    9684-------------------------
    97 The authors consider this software to be in an unstable state.  It is
    98 quite likely that there are many reasonable programs that will fail
    99 to compile.  We encourage users to report their experiences to
    100 cforall@plg.uwaterloo.ca, but we make no promises regarding support.
    10185
    102 We have fixed most of the problems that we are aware of.  There are
    103 some exceptions:
     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.
    10490
    105         - initializers are poorly implemented; in particular,
    106         file-scope initializers may result in the generation of invalid
    107         C code
     91We have fixed most of the problems that we are aware of.  There are some
     92exceptions:
    10893
    109         - the ISO C99 designated initialization syntax '[n] = m' or
    110         '.n = m' is not supported; use a colon in place of the equal sign
    111        
    112         - some legitimate programs will produce warnings from the C
    113         compiler; these are harmless (in particular, the creation of
    114         libcfa.a in the build process should cause four warnings from
    115         gcc)
     94- initializers are poorly implemented; in particular, file-scope initializers
     95  may result in the generation of invalid C code
    11696
    117         - abstract types introduced using the keyword 'type' are not
    118         implemented (although 'type' can be used to introduce type
    119         parameters)
     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
    12099
    121         - the implicit coercion of structure types to the type of their
    122         first member is not implemented
     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
    123109       
    124110Who is responsible for cfa-cc?
Note: See TracChangeset for help on using the changeset viewer.