source: README @ 9bb6c5f

Last change on this file since 9bb6c5f 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
RevLine 
[4200b7e]1cfa-cc: Cforall to C Trans-compiler
[51b7345]2======================================
3
[6244dfb]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.
[51b7345]8
[4200b7e]9
[51b7345]10What is Cforall?
11----------------
[6244dfb]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.
[51b7345]27
[4200b7e]28
[51b7345]29What is cfa-cc?
30---------------
[4200b7e]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
[44b37de]37cfa-cc is currently written in C++, but will be eventually rewritten in Cforall.
[4200b7e]38
[51b7345]39
[4200b7e]40How to download and build cfa-cc?
[51b7345]41----------------------------------------
[4200b7e]42Download cfa-cc using
[51b7345]43
[4200b7e]44  $ git clone https://github.com/cforall/cforall.git
[51b7345]45
[4200b7e]46Read the ./INSTALL file for build instructions.
47
48
49How to use cfa-cc?
[51b7345]50-------------------
[4200b7e]51The compiler driver "cfa" accepts all of the arguments for gcc, and is used in
[6244dfb]52the same way.  For example:
[51b7345]53
[4200b7e]54  cfa -c test.c
55  cfa test.o
[51b7345]56
[4200b7e]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.
[51b7345]61
62
[4200b7e]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.
[51b7345]67
[4200b7e]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:
[51b7345]72
[4200b7e]73  extern "C" {
74  #include <curses.h>
75  #include <getopt.h>
76  }
[51b7345]77
78The extern "C" turns off name mangling for functions and objects declared
[4200b7e]79within the block. All C standard headers are pre-wrapped, so most wrapping is
80unnecessary.
81
[51b7345]82
83What's wrong with cfa-cc?
84-------------------------
85
[4200b7e]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.
[6244dfb]91
[4200b7e]92Also, the Cforall features web-page https://cforall.uwaterloo.ca/features lists
93small syntactic and semantic differences with standard C.
[6244dfb]94
[da60c631]95
[51b7345]96Who is responsible for cfa-cc?
97------------------------------
[4200b7e]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.
[51b7345]101
[4200b7e]102Check the Cforall web site https://cforall.uwaterloo.ca for news and updates.
Note: See TracBrowser for help on using the repository browser.