Subversion Repositories tendra.SVN

Rev

Rev 2 | Blame | Last modification | View Log | RSS feed

<!-- Crown Copyright (c) 1998 -->
<HTML>
<HEAD>
<TITLE>TenDRA Home Page</TITLE>
</HEAD>
<BODY TEXT="#000000" LINK="#0000ff" VLINK="#000080" BGCOLOR="#ffffff">

<H1><A NAME="top">TenDRA</A></H1>
<P>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. </P>
<P>TenDRA<SUP>&reg;</SUP> is a registered trademark of the UK 
<A HREF="http://www.dera.gov.uk/">Defence Evaluation and Research
Agency</A>.  It is pronounced as one word, <I>tendra</I>, rather than
<I>ten-D-R-A</I>.</P>
<P><HR></P>
<H2><A NAME="download">Downloading the TenDRA Software</A></H2>
<P>All the TenDRA software is subject to the following copyright notice.
Please read it carefully before downloading the TenDRA software. </P>
<EM><B><BLOCKQUOTE>Crown Copyright &copy; 1997, 1998</BLOCKQUOTE>
</B><BLOCKQUOTE>This TenDRA<SUP>&reg;</SUP> 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:
<OL>
<LI>Recipients shall ensure that this Notice is reproduced upon any
copies or amended versions of it;<P>
<LI>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;<P>
<LI>Its onward transfer from a recipient to another party shall be
deemed to be that party's acceptance of these conditions;<P>
<LI>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. 
</OL>
</BLOCKQUOTE>
</EM>
<P>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).</P>
<P>The source for the TenDRA 4.1.2 release can be downloaded from:
<BLOCKQUOTE>
<A HREF="ftp://alph.dera.gov.uk/pub/TenDRA/TenDRA-4.1.2.tar.gz">
ftp://alph.dera.gov.uk/pub/TenDRA/TenDRA-4.1.2.tar.gz</A> (3888989 bytes).
</BLOCKQUOTE>
In addition the release documentation (consisting of a copy of the web
pages accessible from this site) can be downloaded from:
<BLOCKQUOTE>
<A HREF="ftp://alph.dera.gov.uk/pub/TenDRA/TenDRA-4.1.2-doc.tar.gz">
ftp://alph.dera.gov.uk/pub/TenDRA/TenDRA-4.1.2-doc.tar.gz</A> (765752 bytes).
</BLOCKQUOTE>
<P><HR></P>
<H2><A NAME="install">Installing the TenDRA Software</A></H2>
<P>
The main source archive, <CODE>TenDRA-4.1.2.tar.gz</CODE>, can be extracted
using:
<PRE>
        gzip -d TenDRA-4.1.2.tar.gz
        tar xvf TenDRA-4.1.2.tar
</PRE>
to give a directory, <CODE>TenDRA-4.1.2</CODE>, containing the release
source.  If you also want to install the release documentation you will
also need to download <CODE>TenDRA-4.1.2-doc.tar.gz</CODE> and extract
this as above.  The documentation is extracted into the subdirectory
<CODE>TenDRA-4.1.2/doc</CODE>.
<P>
The release is installed by running the shell script <CODE>INSTALL</CODE>
found in the main source directory.  The default configuration installs the
public executables into <CODE>/usr/local/bin</CODE>, the private executables,
libraries, configuration files etc. into <CODE>/usr/local/lib/TenDRA</CODE>,
and the manual pages into <CODE>/usr/local/man</CODE>.  It also assumes
that the source has been installed in <CODE>/usr/local/src/TenDRA-4.1.2</CODE>.
These locations may be changed by editing the <CODE>INSTALL</CODE> script
(which is fully commented).
<P>
Other installation details, such as which compiler to use, can be
specified using command-line options to <CODE>INSTALL</CODE>, or by editing
the script.  For example:
<PRE>
        INSTALL -gcc
</PRE>
will install the release using <I>gcc</I> as the compiler.  After this the
work directory can be removed, and:
<PRE>
        INSTALL -tcc
</PRE>
run to bootstrap the system.
<P>
See the <CODE>README</CODE> in the top directory of the source code for
more details.  Also see the
<A HREF="FAQ">Frequently Asked Questions</A>.
<P><HR></P>
<H2><A NAME="platforms">Supported Platforms</A></H2>
<P>The following table gives the list of platforms on which the current
release has been compiled and tested:</P>

<P ALIGN="CENTER"><CENTER><TABLE BORDER>
<TR><TD><B>Operating System</B></TD>
<TD><B>Version</B></TD>
<TD><B>CPU</B></TD></TR>
<TR><TD>AIX</TD><TD> 3.2</TD><TD>Power</TD></TR>
<TR><TD>HP-UX</TD><TD> A.09.05</TD><TD>HP-PA</TD></TR>
<TR><TD>Irix</TD><TD>5.2</TD><TD>Mips</TD></TR>
<TR><TD>Linux</TD><TD>1.2.8 and 2.0.27</TD><TD>Intel</TD></TR>
<TR><TD>OSF1</TD><TD>V3.2</TD><TD>Alpha</TD></TR>
<TR><TD>SCO</TD><TD>4.2</TD><TD>Intel</TD></TR>
<TR><TD>Solaris</TD><TD>2.3 and 2.4</TD><TD>SPARC</TD></TR>
<TR><TD>Solaris</TD><TD>2.4</TD><TD>Intel</TD></TR>
<TR><TD>SunOS</TD><TD>4.1</TD><TD>680x0</TD></TR>
<TR><TD>SunOS</TD><TD>4.1.4</TD><TD>SPARC</TD></TR>
<TR><TD>Ultrix</TD><TD>4.4</TD><TD>Mips</TD></TR>
<TR><TD>Unixware</TD><TD>1.1.2</TD><TD>Intel</TD></TR>
</TABLE>
</CENTER></P>

<P>It should compile on other versions of these operating system/processor
pairs, the only danger area being TDF API library building.</P>

<P>For comments on the reliability of the software on these various
platforms, see the section on <A HREF="#installer">TDF installers</A>
below.</P>
<P><HR></P>
<H2><A NAME="doc">About the TenDRA Documentation</A></H2>
<P>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. </P>
<P>Most of the documents were originally written in FrameMaker, and
converted to HTML using a very old version of WebMaker, numerous 
<I>sed</I> and <I>perl</I> scripts, and some specially knocked up
C programs. </P>
<P>The various documents are described below but here, for reference,
is a complete list: 
<OL>
<LI><A HREF="tdf/spec1.html">TDF Issue 4.0 specification</A>; 
<LI><A HREF="diag/diag1.html">TDF Diagnostic Extension Issue 3.0</A>;
<LI><A HREF="tdf/register.html">TDF token register</A>; 
<LI><A HREF="guide/guide1.html">Guide to the TDF specification</A>;
<LI><A HREF="port/port1.html">TDF and portability</A>; 
<LI><A HREF="tcc/tcc1.html"><I>tcc</I> Users' Guide</A>; 
<LI><A HREF="tdfc/tdfc1.html">C Checker Reference Manual</A>; 
<LI><A HREF="tcpplus/index.html">C++ producer guide</A>; 
<LI><A HREF="pl/pl1.html"><I>pl</I> users' guide</A>; 
<LI><A HREF="tools/tspec.html"><I>tspec</I> users' guide</A>; 
<LI><A HREF="tools/tld.html"><I>tld</I> users' guide</A>; 
<LI><A HREF="tools/tnc.html"><I>tnc</I> users' guide</A>; 
<LI><A HREF="utilities/calc.html"><I>calculus</I> users' guide</A>;
<LI><A HREF="utilities/sid.html"><I>sid</I> users' guide</A>. 
</OL>
<P><HR></P>
<H2><A NAME="tdf">What is TDF?</A></H2>
<P>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). </P>
<P>The <A HREF="tdf/spec1.html">TDF Issue 4.0 specification</A> gives
a technical description of the TDF language. This is supplemented
by the 
<A HREF="diag/diag1.html">TDF Diagnostic Extension Issue 3.0 specification</A>.
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). </P>
<P>The companion document, the <A HREF="tdf/register.html">TDF token
register</A>, describes the globally reserved, `standard tokens'.
</P>
<P>The <A HREF="guide/guide1.html">Guide to the TDF specification</A>
gives an overview and commentary on the TDF language, explaining some
of the more difficult concepts. </P>
<P>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.
</P>
<P><HR></P>
<H2>What is TenDRA?</H2>
<P>
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.
<P>
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.
<P><HR></P>
<H2><A NAME="tcc">Using the TenDRA Compiler</A></H2>
<P>The main user interface to the TenDRA compiler, <I>tcc</I>, can
be used as a direct replacement for the system compiler, <I>cc</I>.
This is described in the <A HREF="tcc/tcc1.html"><I>tcc</I> Users'
Guide</A>. 
</P>
<P>There is an alternative user interface, <I>tchk</I>, which just
applies the static program checks and disables code generation. Thus
<I>tchk</I> corresponds to <I>lint</I> in the same way that <I>tcc</I>
corresponds to <I>cc</I>. </P>
<P>The chief difference between <I>tcc</I> 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 <B>-Xc</B> option specifies ISO C with no
extensions and no extra checks, the <B>-Xa</B> option specifies ISO
C with common extensions, and <B>-Xs</B> specifies ISO C with no extensions
and lots of extra checks. Similarly <B>-Yansi</B> specifies the ISO
C API (excluding Amendment 1), <B>-Yposix</B> specifies the POSIX
1003.1 API etc. It is also possible to make <I>tcc</I> use the system
headers on the host machine by the use of the <B>-Ysystem</B>
option. The <B>-Yc++</B> option is required to enable the C++ facilities.
The default mode is equivalent to <B>-Xc -Yansi.</B></P>
<P>How to configure the C compiler checks is described in more detail
in the <A HREF="tdfc/tdfc1.html">C Checker Reference Manual</A>. The
extra checks available in C++ are described in the
<A HREF="tcpplus/index.html">C++ producer guide</A>. </P>
<P><HR></P>
<H2><A NAME="producer">TDF Producers</A></H2>
<P>A tool which compiles a high-level language to TDF, is called a
<I>producer</I>. The TenDRA software contains producers for the C
and C++ languages. The original TenDRA C producer (<I>tdfc</I>) has
now been superseded by a new C producer (<I>tdfc2</I>) based on the
C++ producer (<I>tcpplus</I>). </P>
<P>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 
<A HREF="port/port1.html">TDF and portability</A>. </P>
<P>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.</P>
<P>The C++ producer implements most of the language sections of the
November 1997 draft ISO C++ standard. The known problem areas are:
</P>
<UL>
<LI>Automatic inter-module instantiation of templates is not yet fully
implemented.<P>
<LI>The current implementation of exception handling is not optimal
with respect to performance.<P>
<LI>Temporaries are not always destroyed in precisely the right place.<P>
<LI>Partially constructed objects are not destroyed properly.<P>
<LI>The visibility of <I>friend</I> functions is not right.
</UL>
<P>Also, only the language portions and the language-support library
(<I>&lt;new&gt;</I>, <I>&lt;typeinfo&gt;</I> and 
<I>&lt;exception&gt;</I>) have been implemented. If a complete implementation
of the standard C++ library is required, it must be obtained from
elsewhere. See the <A HREF="tcpplus/index.html">C++ producer guide</A>
for more details. </P>
<P><HR></P>
<H2><A NAME="installer">TDF Installers</A></H2>
<P>A tool which compiles TDF to a machine language, is called an 
<I>installer</I>. TDF installers for a number of Unix systems and
processors are included within the release (see the list of 
<A HREF="#platforms">supported platforms</A> above). Each installer
consists of code from three levels: </P>
<OL>
<LI>Code which is common to all installers. A large portion of each
installer is derived from a common section, which reads the input
TDF capsule and applies various TDF -&gt; TDF transformations to optimise
the code. Each installer has a configuration file which indicates
which of these transformations are appropriate to its particular processor.<P>
<LI>Code which is specific to a particular processor. Each installer
also has some processor-specific code, which applies optimisations
and other transformations, which are too tied to a particular processor
to warrant inclusion in the common section. This section also includes
register allocation.<P>
<LI>Code which is specific to a particular processor/operating system
pair. Even within the installers for a single processor, there may
be differences between different operating systems. These differences
are usually cosmetic, such as the precise assembler format etc. 
</OL>
<P>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.</P>
<P>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 <I>initial_value</I> 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).</P>
<P><HR></P>
<H2><A NAME="tspec">TDF Interface Tools</A></H2>
<P>The API checking facilities of the TenDRA compiler are implemented
by means of abstract interface specifications generated using the
<A HREF="tools/tspec.html"><I>tspec</I></A> 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 <I>tcc</I> to combine the <I>tspec</I>
specification with the implementation given in the system headers.</P>
<P><HR></P>
<H2><A NAME="tools">Other TDF Tools</A></H2>
<P>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, <I>tcc</I>, but they may also be called directly.
</P>
<P><A HREF="tools/tld.html"><I>tld</I></A> 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. </P>
<I><P>disp</I> is the TDF pretty printer. It translates the bitstream
comprising a TDF capsule into a human readable form. 
<P><A HREF="tools/tnc.html"><I>tnc</I></A> 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. </P>
<P><A HREF="pl/pl1.html"><I>pl</I></A> is the PL_TDF compiler. It
is a TDF `structured assembler' in the lineage of PL360. <I>pl</I>
provides a more user-friendly way of generating TDF capsules from
scratch than that offered by <I>tnc</I>. </P>
<P><HR></P>
<H2><A NAME="utilities">Compiler Writing Tools</A></H2>
<P>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:</P>
<P><A HREF="utilities/sid.html"><I>sid</I></A> 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. </P>
<P><A HREF="utilities/calc.html"><I>calculus</I></A> 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. </P>
<P><I>make_tdf</I> 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.</P>
<P><HR></P>
<H2><A NAME="sites">Related Sites</A></H2>
<UL>
<LI><A HREF="http://www.gr.osf.org/andf/">Open Group Research Institute</A>
ANDF projects.<P>
<LI><A HREF="http://www.ddci.dk/ddci/products/andf_comp_system.html">DDC-I</A>
Ada to ANDF compiler.
</UL>
<P><HR></P>
<ADDRESS>
Send enquiries about TenDRA to 
<A HREF="mailto:R.Andrews@eris.dera.gov.uk">R.Andrews@eris.dera.gov.uk</A>
(Rob Andrews). 
</ADDRESS>
<P><I>Part of the <A HREF="#top">TenDRA Web</A>. 
<BR>Crown Copyright &copy; 1998.</I></P>
</BODY>
</HTML>