Welcome to the TenDRA Home Page. TenDRA is a free, public domain C/C++ compiler and checker technology, developed by the Open Software Systems Group (OSSG) at DERA around its TDF/ANDF compiler intermediate format.
TenDRA® is a registered trademark of the UK Defence Evaluation and Research Agency. It is pronounced as one word, tendra, rather than ten-D-R-A.
All the TenDRA software is subject to the following copyright notice. Please read it carefully before downloading the TenDRA software.
Crown Copyright © 1997, 1998
This TenDRA® Computer Program is subject to Copyright owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency (DERA). It is made available to Recipients with a royalty-free licence for its use, reproduction, transfer to other parties and amendment for any purpose not excluding product development provided that any such use et cetera shall be deemed to be acceptance of the following conditions:
- Recipients shall ensure that this Notice is reproduced upon any copies or amended versions of it;
- Any amended version of it shall be clearly marked to show both the nature of and the organisation responsible for the relevant amendment or amendments;
- Its onward transfer from a recipient to another party shall be deemed to be that party's acceptance of these conditions;
- DERA gives no warranty or assurance as to its quality or suitability for any purpose and DERA accepts no liability whatsoever in relation to any use to which it may be put.
A small number of components are also subject to other companies' copyright conditions, which are similar in intent to the DERA notice above. The Power installer was written under license for the Open Software Foundation (based on the existing DERA SPARC installer). The Motif 1.2 API description was written by SCO UK (based on an earlier DERA Motif 1.1 description).
The source for the TenDRA 4.1.2 release can be downloaded from:
http://www.jantar.org/TenDRA/TenDRA-4.1.2.tar.gz (3888989 bytes).In addition the release documentation (consisting of a copy of the web pages accessible from this site) can be downloaded from:
http://www.jantar.org/TenDRA/TenDRA-4.1.2-doc.tar.gz (765752 bytes).
The main source archive, TenDRA-4.1.2.tar.gz
, can be extracted
using:
gzip -d TenDRA-4.1.2.tar.gz tar xvf TenDRA-4.1.2.tarto give a directory,
TenDRA-4.1.2
, containing the release
source. If you also want to install the release documentation you will
also need to download TenDRA-4.1.2-doc.tar.gz
and extract
this as above. The documentation is extracted into the subdirectory
TenDRA-4.1.2/doc
.
The release is installed by running the shell script INSTALL
found in the main source directory. The default configuration installs the
public executables into /usr/local/bin
, the private executables,
libraries, configuration files etc. into /usr/local/lib/TenDRA
,
and the manual pages into /usr/local/man
. It also assumes
that the source has been installed in /usr/local/src/TenDRA-4.1.2
.
These locations may be changed by editing the INSTALL
script
(which is fully commented).
Other installation details, such as which compiler to use, can be
specified using command-line options to INSTALL
, or by editing
the script. For example:
INSTALL -gccwill install the release using gcc as the compiler. After this the work directory can be removed, and:
INSTALL -tccrun to bootstrap the system.
See the README
in the top directory of the source code for
more details. Also see the
Frequently Asked Questions.
The following table gives the list of platforms on which the current release has been compiled and tested:
Operating System | Version | CPU |
AIX | 3.2 | Power |
HP-UX | A.09.05 | HP-PA |
Irix | 5.2 | Mips |
Linux | 1.2.8 and 2.0.27 | Intel |
OSF1 | V3.2 | Alpha |
SCO | 4.2 | Intel |
Solaris | 2.3 and 2.4 | SPARC |
Solaris | 2.4 | Intel |
SunOS | 4.1 | 680x0 |
SunOS | 4.1.4 | SPARC |
Ultrix | 4.4 | Mips |
Unixware | 1.1.2 | Intel |
It should compile on other versions of these operating system/processor pairs, the only danger area being TDF API library building.
For comments on the reliability of the software on these various platforms, see the section on TDF installers below.
A number of documents on the TenDRA compiler technology are accessible from this page. These consist of documents written and added to by different people at different times during the technology's development. The information may therefore not be totally up-to-date, be presented from a unified viewpoint, or reflect the current thinking of members of OSSG on the given subjects. Time has not been available for the necessary thorough review of the documentation as a whole.
Most of the documents were originally written in FrameMaker, and converted to HTML using a very old version of WebMaker, numerous sed and perl scripts, and some specially knocked up C programs.
The various documents are described below but here, for reference, is a complete list:
TDF (standing for TenDRA Distribution Format) is the compiler intermediate language, which lies at the heart of the TenDRA technology. Unlike most intermediate languages, which tend to be abstractions of assembler languages, TDF is an abstraction of high level languages. The current release is based on TDF Issue 4.0, with experimental extensions to handle debugging in languages such as C++ and Ada (these extensions are not used by default).
The TDF Issue 4.0 specification gives a technical description of the TDF language. This is supplemented by the TDF Diagnostic Extension Issue 3.0 specification. This is an extension to the core TDF specification, which describes how information sufficient to allow for the debugging of C programs can be embedded into a TDF capsule (it is this that the experimental extensions mentioned above are intended to replace).
The companion document, the TDF token register, describes the globally reserved, `standard tokens'.
The Guide to the TDF specification gives an overview and commentary on the TDF language, explaining some of the more difficult concepts.
For those who know a bit of history, TDF was the technology adopted by OSF as their ANDF (Architecture Neutral Distribution Format), and TDF Issue 4.0 (Revision 1) is the base document for The Open Group XANDF standard. Thus the terms TDF, ANDF and XANDF are largely synonymous; TDF is used in documentation since it is the term closest to our hearts.
TenDRA is the name of the compiler technology built around the TDF intermediate language. The design and intended uses of TDF have affected how the TenDRA technology has developed. For example, the original emphasis of OSF's ANDF concept was on distribution, but this begged the question about program portablility. The current TenDRA technology is far more about portability than it is about distribution, although TDF could still be used as a distribution format.
The rigid enforcement of an interface level between the compiler front-ends and the compiler back-ends, and the goal of producing target independent TDF (suitable for distribution) have produced a flexible, clean compiler technology. It has pulled many of the questions about program portability into sharp focus in a way that a more conventional compiler could not.
The main user interface to the TenDRA compiler, tcc, can be used as a direct replacement for the system compiler, cc. This is described in the tcc Users' Guide.
There is an alternative user interface, tchk, which just applies the static program checks and disables code generation. Thus tchk corresponds to lint in the same way that tcc corresponds to cc.
The chief difference between tcc and other compilers is it the degree of preciseness it requires in specifying the compilation environment. This environment consists of two, largely orthogonal, components: the language checks to be applied, and the API to be checked against. For example, the -Xc option specifies ISO C with no extensions and no extra checks, the -Xa option specifies ISO C with common extensions, and -Xs specifies ISO C with no extensions and lots of extra checks. Similarly -Yansi specifies the ISO C API (excluding Amendment 1), -Yposix specifies the POSIX 1003.1 API etc. It is also possible to make tcc use the system headers on the host machine by the use of the -Ysystem option. The -Yc++ option is required to enable the C++ facilities. The default mode is equivalent to -Xc -Yansi.
How to configure the C compiler checks is described in more detail in the C Checker Reference Manual. The extra checks available in C++ are described in the C++ producer guide.
A tool which compiles a high-level language to TDF, is called a producer. The TenDRA software contains producers for the C and C++ languages. The original TenDRA C producer (tdfc) has now been superseded by a new C producer (tdfc2) based on the C++ producer (tcpplus).
The design of both producers has been guided by the goal of trying to ensure program portability by means of static program analysis. Some thoughts on this subject are set out in the document TDF and portability.
The first component of this is by ensuring that the language implemented by the producer accurately reflects the corresponding language standard (ISO C, including Amendment 1, or the draft ISO C++ standard). The producers both include references to the standards documents within their error messages, so that a specific error can be tied to a specific clause within the standard. The producers have been tested using both the Plum Hall and Perennial C and C++ compiler validation suites.
The C++ producer implements most of the language sections of the November 1997 draft ISO C++ standard. The known problem areas are:
Also, only the language portions and the language-support library (<new>, <typeinfo> and <exception>) have been implemented. If a complete implementation of the standard C++ library is required, it must be obtained from elsewhere. See the C++ producer guide for more details.
A tool which compiles TDF to a machine language, is called an installer. TDF installers for a number of Unix systems and processors are included within the release (see the list of supported platforms above). Each installer consists of code from three levels:
The various installers within the release are of differing levels of reliability and performance tuning, due to the differing priorities in building up an installer base. The Intel and SPARC installers are the most reliable and have been subject to the most performance tuning.
All the installers fully support the C subset of TDF (i.e. code generated by the C producer). The Mips/Ultrix installer does not support the initial_value construct (used in dynamic initialisation), but otherwise all the installers fully support the C++ subset. The Intel and SPARC installers fully support the entire TDF specification, as checked by the OSF AVS (ANDF Validation Suite).
The API checking facilities of the TenDRA compiler are implemented by means of abstract interface specifications generated using the tspec tool. This tool and specifications for a number of common APIs are included with the release. Part of the installation process consists of pre-compiling the implementations of those APIs implemented on the target machine into TDF libraries. This is performed automatically using tcc to combine the tspec specification with the implementation given in the system headers.
There are various tools included within the software for viewing, generating and transforming TDF. The use of these components is integrated into the user interface, tcc, but they may also be called directly.
tld is the TDF linker. It combines a number of TDF capsules into a single capsule. It also can be used to create and manipulate libraries of TDF capsules.
disp is the TDF pretty printer. It translates the bitstream comprising a TDF capsule into a human readable form.
tnc is the TDF notation compiler. It acts as a sort of TDF `assembler', and can translate TDF capsules to and from a human readable form.
pl is the PL_TDF compiler. It is a TDF `structured assembler' in the lineage of PL360. pl provides a more user-friendly way of generating TDF capsules from scratch than that offered by tnc.
A number of compiler writing tools, which were used in the development of the TenDRA compiler technology are also bundled with the TenDRA software release. These include the following:
sid is an LL(1) parser generator with a long history (the original version dates back to the mid-sixties!). As well as the normal rule transformations it provides powerful techniques for call-outs in circumstances where a non-trivial look-ahead is required (essential for languages like C++), and for error recovery.
calculus is a tool for managing complex C type systems. It uses the TenDRA interface checking techniques to enforce strong type checking and type encapsulation, and provides generic container types for lists, vectors etc.
make_tdf is a tool for generating TDF decoders and encoders. It takes a compact description of the TDF specification and a template file, and generates code to read, write or transform a TDF capsule.
Part of the TenDRA Web.
Crown Copyright © 1998.