Subversion Repositories tendra.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
<!-- Crown Copyright (c) 1998 -->
2
<HTML>
3
<HEAD>
4
<TITLE>TenDRA Home Page</TITLE>
5
</HEAD>
6
<BODY TEXT="#000000" LINK="#0000ff" VLINK="#000080" BGCOLOR="#ffffff">
7
 
8
<H1><A NAME="top">TenDRA</A></H1>
9
<P>Welcome to the TenDRA Home Page. TenDRA is a free, public domain
10
C/C++ compiler and checker technology, developed by the Open Software
11
Systems Group (OSSG) at DERA around its TDF/ANDF compiler intermediate
12
format. </P>
13
<P>TenDRA<SUP>&reg;</SUP> is a registered trademark of the UK 
14
<A HREF="http://www.dera.gov.uk/">Defence Evaluation and Research
15
Agency</A>.  It is pronounced as one word, <I>tendra</I>, rather than
16
<I>ten-D-R-A</I>.</P>
17
<P><HR></P>
18
<H2><A NAME="download">Downloading the TenDRA Software</A></H2>
19
<P>All the TenDRA software is subject to the following copyright notice.
20
Please read it carefully before downloading the TenDRA software. </P>
21
<EM><B><BLOCKQUOTE>Crown Copyright &copy; 1997, 1998</BLOCKQUOTE>
22
</B><BLOCKQUOTE>This TenDRA<SUP>&reg;</SUP> Computer Program is subject
23
to Copyright owned by the United Kingdom Secretary of State for Defence
24
acting through the Defence Evaluation and Research Agency (DERA).
25
It is made available to Recipients with a royalty-free licence for
26
its use, reproduction, transfer to other parties and amendment for
27
any purpose not excluding product development provided that any such
28
use et cetera shall be deemed to be acceptance of the following conditions:
29
<OL>
30
<LI>Recipients shall ensure that this Notice is reproduced upon any
31
copies or amended versions of it;<P>
32
<LI>Any amended version of it shall be clearly marked to show both
33
the nature of and the organisation responsible for the relevant amendment
34
or amendments;<P>
35
<LI>Its onward transfer from a recipient to another party shall be
36
deemed to be that party's acceptance of these conditions;<P>
37
<LI>DERA gives no warranty or assurance as to its quality or suitability
38
for any purpose and DERA accepts no liability whatsoever in relation
39
to any use to which it may be put. 
40
</OL>
41
</BLOCKQUOTE>
42
</EM>
43
<P>A small number of components are also subject to other companies'
44
copyright conditions, which are similar in intent to the DERA notice
45
above.  The Power installer was written under license for the Open
46
Software Foundation (based on the existing DERA SPARC installer).
47
The Motif 1.2 API description was written by SCO UK (based on an earlier
48
DERA Motif 1.1 description).</P>
49
<P>The source for the TenDRA 4.1.2 release can be downloaded from:
50
<BLOCKQUOTE>
51
<A HREF="ftp://alph.dera.gov.uk/pub/TenDRA/TenDRA-4.1.2.tar.gz">
52
ftp://alph.dera.gov.uk/pub/TenDRA/TenDRA-4.1.2.tar.gz</A> (3888989 bytes).
53
</BLOCKQUOTE>
54
In addition the release documentation (consisting of a copy of the web
55
pages accessible from this site) can be downloaded from:
56
<BLOCKQUOTE>
57
<A HREF="ftp://alph.dera.gov.uk/pub/TenDRA/TenDRA-4.1.2-doc.tar.gz">
58
ftp://alph.dera.gov.uk/pub/TenDRA/TenDRA-4.1.2-doc.tar.gz</A> (765752 bytes).
59
</BLOCKQUOTE>
60
<P><HR></P>
61
<H2><A NAME="install">Installing the TenDRA Software</A></H2>
62
<P>
63
The main source archive, <CODE>TenDRA-4.1.2.tar.gz</CODE>, can be extracted
64
using:
65
<PRE>
66
	gzip -d TenDRA-4.1.2.tar.gz
67
	tar xvf TenDRA-4.1.2.tar
68
</PRE>
69
to give a directory, <CODE>TenDRA-4.1.2</CODE>, containing the release
70
source.  If you also want to install the release documentation you will
71
also need to download <CODE>TenDRA-4.1.2-doc.tar.gz</CODE> and extract
72
this as above.  The documentation is extracted into the subdirectory
73
<CODE>TenDRA-4.1.2/doc</CODE>.
74
<P>
75
The release is installed by running the shell script <CODE>INSTALL</CODE>
76
found in the main source directory.  The default configuration installs the
77
public executables into <CODE>/usr/local/bin</CODE>, the private executables,
78
libraries, configuration files etc. into <CODE>/usr/local/lib/TenDRA</CODE>,
79
and the manual pages into <CODE>/usr/local/man</CODE>.  It also assumes
80
that the source has been installed in <CODE>/usr/local/src/TenDRA-4.1.2</CODE>.
81
These locations may be changed by editing the <CODE>INSTALL</CODE> script
82
(which is fully commented).
83
<P>
84
Other installation details, such as which compiler to use, can be
85
specified using command-line options to <CODE>INSTALL</CODE>, or by editing
86
the script.  For example:
87
<PRE>
88
	INSTALL -gcc
89
</PRE>
90
will install the release using <I>gcc</I> as the compiler.  After this the
91
work directory can be removed, and:
92
<PRE>
93
	INSTALL -tcc
94
</PRE>
95
run to bootstrap the system.
96
<P>
97
See the <CODE>README</CODE> in the top directory of the source code for
98
more details.  Also see the
99
<A HREF="FAQ">Frequently Asked Questions</A>.
100
<P><HR></P>
101
<H2><A NAME="platforms">Supported Platforms</A></H2>
102
<P>The following table gives the list of platforms on which the current
103
release has been compiled and tested:</P>
104
 
105
<P ALIGN="CENTER"><CENTER><TABLE BORDER>
106
<TR><TD><B>Operating System</B></TD>
107
<TD><B>Version</B></TD>
108
<TD><B>CPU</B></TD></TR>
109
<TR><TD>AIX</TD><TD> 3.2</TD><TD>Power</TD></TR>
110
<TR><TD>HP-UX</TD><TD> A.09.05</TD><TD>HP-PA</TD></TR>
111
<TR><TD>Irix</TD><TD>5.2</TD><TD>Mips</TD></TR>
112
<TR><TD>Linux</TD><TD>1.2.8 and 2.0.27</TD><TD>Intel</TD></TR>
113
<TR><TD>OSF1</TD><TD>V3.2</TD><TD>Alpha</TD></TR>
114
<TR><TD>SCO</TD><TD>4.2</TD><TD>Intel</TD></TR>
115
<TR><TD>Solaris</TD><TD>2.3 and 2.4</TD><TD>SPARC</TD></TR>
116
<TR><TD>Solaris</TD><TD>2.4</TD><TD>Intel</TD></TR>
117
<TR><TD>SunOS</TD><TD>4.1</TD><TD>680x0</TD></TR>
118
<TR><TD>SunOS</TD><TD>4.1.4</TD><TD>SPARC</TD></TR>
119
<TR><TD>Ultrix</TD><TD>4.4</TD><TD>Mips</TD></TR>
120
<TR><TD>Unixware</TD><TD>1.1.2</TD><TD>Intel</TD></TR>
121
</TABLE>
122
</CENTER></P>
123
 
124
<P>It should compile on other versions of these operating system/processor
125
pairs, the only danger area being TDF API library building.</P>
126
 
127
<P>For comments on the reliability of the software on these various
128
platforms, see the section on <A HREF="#installer">TDF installers</A>
129
below.</P>
130
<P><HR></P>
131
<H2><A NAME="doc">About the TenDRA Documentation</A></H2>
132
<P>A number of documents on the TenDRA compiler technology are accessible
133
from this page. These consist of documents written and added to by
134
different people at different times during the technology's development.
135
The information may therefore not be totally up-to-date, be presented
136
from a unified viewpoint, or reflect the current thinking of members
137
of OSSG on the given subjects. Time has not been available for the
138
necessary thorough review of the documentation as a whole. </P>
139
<P>Most of the documents were originally written in FrameMaker, and
140
converted to HTML using a very old version of WebMaker, numerous 
141
<I>sed</I> and <I>perl</I> scripts, and some specially knocked up
142
C programs. </P>
143
<P>The various documents are described below but here, for reference,
144
is a complete list: 
145
<OL>
146
<LI><A HREF="tdf/spec1.html">TDF Issue 4.0 specification</A>; 
147
<LI><A HREF="diag/diag1.html">TDF Diagnostic Extension Issue 3.0</A>;
148
<LI><A HREF="tdf/register.html">TDF token register</A>; 
149
<LI><A HREF="guide/guide1.html">Guide to the TDF specification</A>;
150
<LI><A HREF="port/port1.html">TDF and portability</A>; 
151
<LI><A HREF="tcc/tcc1.html"><I>tcc</I> Users' Guide</A>; 
152
<LI><A HREF="tdfc/tdfc1.html">C Checker Reference Manual</A>; 
153
<LI><A HREF="tcpplus/index.html">C++ producer guide</A>; 
154
<LI><A HREF="pl/pl1.html"><I>pl</I> users' guide</A>; 
155
<LI><A HREF="tools/tspec.html"><I>tspec</I> users' guide</A>; 
156
<LI><A HREF="tools/tld.html"><I>tld</I> users' guide</A>; 
157
<LI><A HREF="tools/tnc.html"><I>tnc</I> users' guide</A>; 
158
<LI><A HREF="utilities/calc.html"><I>calculus</I> users' guide</A>;
159
<LI><A HREF="utilities/sid.html"><I>sid</I> users' guide</A>. 
160
</OL>
161
<P><HR></P>
162
<H2><A NAME="tdf">What is TDF?</A></H2>
163
<P>TDF (standing for TenDRA Distribution Format) is the compiler intermediate
164
language, which lies at the heart of the TenDRA technology. Unlike
165
most intermediate languages, which tend to be abstractions of assembler
166
languages, TDF is an abstraction of high level languages. The current
167
release is based on TDF Issue 4.0, with experimental extensions to
168
handle debugging in languages such as C++ and Ada (these extensions
169
are not used by default). </P>
170
<P>The <A HREF="tdf/spec1.html">TDF Issue 4.0 specification</A> gives
171
a technical description of the TDF language. This is supplemented
172
by the 
173
<A HREF="diag/diag1.html">TDF Diagnostic Extension Issue 3.0 specification</A>.
174
This is an extension to the core TDF specification, which describes
175
how information sufficient to allow for the debugging of C programs
176
can be embedded into a TDF capsule (it is this that the experimental
177
extensions mentioned above are intended to replace). </P>
178
<P>The companion document, the <A HREF="tdf/register.html">TDF token
179
register</A>, describes the globally reserved, `standard tokens'.
180
</P>
181
<P>The <A HREF="guide/guide1.html">Guide to the TDF specification</A>
182
gives an overview and commentary on the TDF language, explaining some
183
of the more difficult concepts. </P>
184
<P>For those who know a bit of history, TDF was the technology adopted
185
by OSF as their ANDF (Architecture Neutral Distribution Format), and
186
TDF Issue 4.0 (Revision 1) is the base document for The Open Group
187
XANDF standard. Thus the terms TDF, ANDF and XANDF are largely synonymous;
188
TDF is used in documentation since it is the term closest to our hearts.
189
</P>
190
<P><HR></P>
191
<H2>What is TenDRA?</H2>
192
<P>
193
TenDRA is the name of the compiler technology built around the TDF
194
intermediate language.  The design and intended uses of TDF have
195
affected how the TenDRA technology has developed.  For example, the
196
original emphasis of OSF's ANDF concept was on distribution, but this
197
begged the question about program portablility.  The current TenDRA
198
technology is far more about portability than it is about distribution,
199
although TDF could still be used as a distribution format.
200
<P>
201
The rigid enforcement of an interface level between the compiler front-ends
202
and the compiler back-ends, and the goal of producing target independent
203
TDF (suitable for distribution) have produced a flexible, clean compiler
204
technology.  It has pulled many of the questions about program portability
205
into sharp focus in a way that a more conventional compiler could not.
206
<P><HR></P>
207
<H2><A NAME="tcc">Using the TenDRA Compiler</A></H2>
208
<P>The main user interface to the TenDRA compiler, <I>tcc</I>, can
209
be used as a direct replacement for the system compiler, <I>cc</I>.
210
This is described in the <A HREF="tcc/tcc1.html"><I>tcc</I> Users'
211
Guide</A>. 
212
</P>
213
<P>There is an alternative user interface, <I>tchk</I>, which just
214
applies the static program checks and disables code generation. Thus
215
<I>tchk</I> corresponds to <I>lint</I> in the same way that <I>tcc</I>
216
corresponds to <I>cc</I>. </P>
217
<P>The chief difference between <I>tcc</I> and other compilers is
218
it the degree of preciseness it requires in specifying the compilation
219
environment. This environment consists of two, largely orthogonal,
220
components: the language checks to be applied, and the API to be checked
221
against. For example, the <B>-Xc</B> option specifies ISO C with no
222
extensions and no extra checks, the <B>-Xa</B> option specifies ISO
223
C with common extensions, and <B>-Xs</B> specifies ISO C with no extensions
224
and lots of extra checks. Similarly <B>-Yansi</B> specifies the ISO
225
C API (excluding Amendment 1), <B>-Yposix</B> specifies the POSIX
226
1003.1 API etc. It is also possible to make <I>tcc</I> use the system
227
headers on the host machine by the use of the <B>-Ysystem</B>
228
option. The <B>-Yc++</B> option is required to enable the C++ facilities.
229
The default mode is equivalent to <B>-Xc -Yansi.</B></P>
230
<P>How to configure the C compiler checks is described in more detail
231
in the <A HREF="tdfc/tdfc1.html">C Checker Reference Manual</A>. The
232
extra checks available in C++ are described in the
233
<A HREF="tcpplus/index.html">C++ producer guide</A>. </P>
234
<P><HR></P>
235
<H2><A NAME="producer">TDF Producers</A></H2>
236
<P>A tool which compiles a high-level language to TDF, is called a
237
<I>producer</I>. The TenDRA software contains producers for the C
238
and C++ languages. The original TenDRA C producer (<I>tdfc</I>) has
239
now been superseded by a new C producer (<I>tdfc2</I>) based on the
240
C++ producer (<I>tcpplus</I>). </P>
241
<P>The design of both producers has been guided by the goal of trying
242
to ensure program portability by means of static program analysis.
243
Some thoughts on this subject are set out in the document 
244
<A HREF="port/port1.html">TDF and portability</A>. </P>
245
<P>The first component of this is by ensuring that the language implemented
246
by the producer accurately reflects the corresponding language standard
247
(ISO C, including Amendment 1, or the draft ISO C++ standard). The
248
producers both include references to the standards documents within
249
their error messages, so that a specific error can be tied to a specific
250
clause within the standard. The producers have been tested using both
251
the Plum Hall and Perennial C and C++ compiler validation suites.</P>
252
<P>The C++ producer implements most of the language sections of the
253
November 1997 draft ISO C++ standard. The known problem areas are:
254
</P>
255
<UL>
256
<LI>Automatic inter-module instantiation of templates is not yet fully
257
implemented.<P>
258
<LI>The current implementation of exception handling is not optimal
259
with respect to performance.<P>
260
<LI>Temporaries are not always destroyed in precisely the right place.<P>
261
<LI>Partially constructed objects are not destroyed properly.<P>
262
<LI>The visibility of <I>friend</I> functions is not right.
263
</UL>
264
<P>Also, only the language portions and the language-support library
265
(<I>&lt;new&gt;</I>, <I>&lt;typeinfo&gt;</I> and 
266
<I>&lt;exception&gt;</I>) have been implemented. If a complete implementation
267
of the standard C++ library is required, it must be obtained from
268
elsewhere. See the <A HREF="tcpplus/index.html">C++ producer guide</A>
269
for more details. </P>
270
<P><HR></P>
271
<H2><A NAME="installer">TDF Installers</A></H2>
272
<P>A tool which compiles TDF to a machine language, is called an 
273
<I>installer</I>. TDF installers for a number of Unix systems and
274
processors are included within the release (see the list of 
275
<A HREF="#platforms">supported platforms</A> above). Each installer
276
consists of code from three levels: </P>
277
<OL>
278
<LI>Code which is common to all installers. A large portion of each
279
installer is derived from a common section, which reads the input
280
TDF capsule and applies various TDF -&gt; TDF transformations to optimise
281
the code. Each installer has a configuration file which indicates
282
which of these transformations are appropriate to its particular processor.<P>
283
<LI>Code which is specific to a particular processor. Each installer
284
also has some processor-specific code, which applies optimisations
285
and other transformations, which are too tied to a particular processor
286
to warrant inclusion in the common section. This section also includes
287
register allocation.<P>
288
<LI>Code which is specific to a particular processor/operating system
289
pair. Even within the installers for a single processor, there may
290
be differences between different operating systems. These differences
291
are usually cosmetic, such as the precise assembler format etc. 
292
</OL>
293
<P>The various installers within the release are of differing levels
294
of reliability and performance tuning, due to the differing priorities
295
in building up an installer base. The Intel and SPARC installers are
296
the most reliable and have been subject to the most performance tuning.</P>
297
<P>All the installers fully support the C subset of TDF (i.e. code
298
generated by the C producer). The Mips/Ultrix installer does not support
299
the <I>initial_value</I> construct (used in dynamic initialisation),
300
but otherwise all the installers fully support the C++ subset. The
301
Intel and SPARC installers fully support the entire TDF specification,
302
as checked by the OSF AVS (ANDF Validation Suite).</P>
303
<P><HR></P>
304
<H2><A NAME="tspec">TDF Interface Tools</A></H2>
305
<P>The API checking facilities of the TenDRA compiler are implemented
306
by means of abstract interface specifications generated using the
307
<A HREF="tools/tspec.html"><I>tspec</I></A> tool. This tool and specifications
308
for a number of common APIs are included with the release. Part of
309
the installation process consists of pre-compiling the implementations
310
of those APIs implemented on the target machine into TDF libraries.
311
This is performed automatically using <I>tcc</I> to combine the <I>tspec</I>
312
specification with the implementation given in the system headers.</P>
313
<P><HR></P>
314
<H2><A NAME="tools">Other TDF Tools</A></H2>
315
<P>There are various tools included within the software for viewing,
316
generating and transforming TDF. The use of these components is integrated
317
into the user interface, <I>tcc</I>, but they may also be called directly.
318
</P>
319
<P><A HREF="tools/tld.html"><I>tld</I></A> is the TDF linker. It combines
320
a number of TDF capsules into a single capsule. It also can be used
321
to create and manipulate libraries of TDF capsules. </P>
322
<I><P>disp</I> is the TDF pretty printer. It translates the bitstream
323
comprising a TDF capsule into a human readable form. 
324
<P><A HREF="tools/tnc.html"><I>tnc</I></A> is the TDF notation compiler.
325
It acts as a sort of TDF `assembler', and can translate TDF capsules
326
to and from a human readable form. </P>
327
<P><A HREF="pl/pl1.html"><I>pl</I></A> is the PL_TDF compiler. It
328
is a TDF `structured assembler' in the lineage of PL360. <I>pl</I>
329
provides a more user-friendly way of generating TDF capsules from
330
scratch than that offered by <I>tnc</I>. </P>
331
<P><HR></P>
332
<H2><A NAME="utilities">Compiler Writing Tools</A></H2>
333
<P>A number of compiler writing tools, which were used in the development
334
of the TenDRA compiler technology are also bundled with the TenDRA
335
software release. These include the following:</P>
336
<P><A HREF="utilities/sid.html"><I>sid</I></A> is an LL(1) parser
337
generator with a long history (the original version dates back to
338
the mid-sixties!). As well as the normal rule transformations it provides
339
powerful techniques for call-outs in circumstances where a non-trivial
340
look-ahead is required (essential for languages like C++), and for
341
error recovery. </P>
342
<P><A HREF="utilities/calc.html"><I>calculus</I></A> is a tool for
343
managing complex C type systems. It uses the TenDRA interface checking
344
techniques to enforce strong type checking and type encapsulation,
345
and provides generic container types for lists, vectors etc. </P>
346
<P><I>make_tdf</I> is a tool for generating TDF decoders and encoders.
347
It takes a compact description of the TDF specification and a template
348
file, and generates code to read, write or transform a TDF capsule.</P>
349
<P><HR></P>
350
<H2><A NAME="sites">Related Sites</A></H2>
351
<UL>
352
<LI><A HREF="http://www.gr.osf.org/andf/">Open Group Research Institute</A>
353
ANDF projects.<P>
354
<LI><A HREF="http://www.ddci.dk/ddci/products/andf_comp_system.html">DDC-I</A>
355
Ada to ANDF compiler.
356
</UL>
357
<P><HR></P>
358
<ADDRESS>
359
Send enquiries about TenDRA to 
360
<A HREF="mailto:R.Andrews@eris.dera.gov.uk">R.Andrews@eris.dera.gov.uk</A>
361
(Rob Andrews). 
362
</ADDRESS>
363
<P><I>Part of the <A HREF="#top">TenDRA Web</A>. 
364
<BR>Crown Copyright &copy; 1998.</I></P>
365
</BODY>
366
</HTML>