source: README @ 4dbdd1d

Last change on this file since 4dbdd1d was 44b37de, checked in by Peter A. Buhr <pabuhr@…>, 3 years ago

fix wording problem

  • Property mode set to 100644
File size: 4.0 KB
Line 
1cfa-cc: Cforall to C Trans-compiler
2======================================
3
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.
8
9
10What is Cforall?
11----------------
12Cforall is a language design extending ISO C. The purpose of the project is to
13engineer modern language features into C in an evolutionary rather than
14revolutionary way. Java is an example of the revolutionary approach of
15modernizing C/C++, resulting in a new language rather than an extension of its
16descendents. C++, Fortran 95 and Cobol 9X are examples of the evolutionary
17approach where modern language features are added and problems fixed within the
18framework of an existing language.
19
20The goal of this project is to produce a largely backwards compatible version
21of C containing many modern language features and fixing some of the well known
22C problems. Without continued development of the language, C will be unable to
23cope with the needs of modern programming problems and programmers; as a
24result, it will fade into disuse.  Considering the large body of existing C
25code and programmers, there is a significant impetus to ensure C is transformed
26into a modern programming language.
27
28
29What is cfa-cc?
30---------------
31cfa-cc is a collection of programs centred around a translator (trans-compiler)
32that takes Cforall code as input and outputs augmented C code that implements
33new features.  The translator is complemented by a compiler driver in the style
34of "gcc", which handles preprocessing (including cfa-cc after cpp), compiling,
35assembling, and linking.
36
37cfa-cc is currently written in C++, but will be eventually rewritten in Cforall.
38
39
40How to download and build cfa-cc?
41----------------------------------------
42Download cfa-cc using
43
44  $ git clone https://github.com/cforall/cforall.git
45
46Read the ./INSTALL file for build instructions.
47
48
49How to use cfa-cc?
50-------------------
51The compiler driver "cfa" accepts all of the arguments for gcc, and is used in
52the same way.  For example:
53
54  cfa -c test.c
55  cfa test.o
56
57Cforall source files may end with '.c' or '.cfa' in order to be compiled by the
58compiler driver.  In addition, the flag "-CFA" causes cfa to invoke the C
59preprocessor and Cforall translator and write the translator output to standard
60output.
61
62
63How to use C code with cfa-cc?
64-----------------------------------
65cfa-cc should be able to compile and link most ANSI C programs with associated
66C standard libraries.
67
68Like C++, Cforall supports overloading, resulting in duplicate names that are
69disambiguated using name mangling in the translated C code.  To prevent
70mangling of C names, it is necessary to wrap C declarations in an extern "C"
71block, as for C++.  For example:
72
73  extern "C" {
74  #include <curses.h>
75  #include <getopt.h>
76  }
77
78The extern "C" turns off name mangling for functions and objects declared
79within the block. All C standard headers are pre-wrapped, so most wrapping is
80unnecessary.
81
82
83What's wrong with cfa-cc?
84-------------------------
85
86The authors consider cfa-cc to be in a semi-stable state.  It is possible for
87reasonable Cforall programs to fail compilation.  A list of bugs and fixes is
88available here: https://cforall.uwaterloo.ca/trac.  We encourage users to
89report their experiences to cforall@plg.uwaterloo.ca, but we can make no
90promises regarding support.
91
92Also, the Cforall features web-page https://cforall.uwaterloo.ca/features lists
93small syntactic and semantic differences with standard C.
94
95
96Who is responsible for cfa-cc?
97------------------------------
98Cforall was designed and implemented by Andrew Beach, Richard Bilson, Michael
99Brooks, Peter A. Buhr, Thierry Delisle Glen Ditchfield, Rodolfo G. Esteves,
100Aaron Moss, Colby Parsons, Rob Schluntz, Fangren Yu, Mubeen Zulfiqar, and others.
101
102Check the Cforall web site https://cforall.uwaterloo.ca for news and updates.
Note: See TracBrowser for help on using the repository browser.