|
| Previous: 1.1 The History of T3X | TOC | Index | Back | Next: 2. A Tour through the T3X Language |
Since the original design, many different versions of the T3X language (which originally was called T) have been created. The following figure provides an overview over the existing T3X (and T) versions.
BTW, the original name of the T3X language, T, happens to be the same as the name of the Scheme implementation of the University of Yale, which pre-dates T1. Therefore (and for various other reasons), the language described in this work was renamed T3X. The predecessor of T3X is in no way related to the well-known Scheme implementation.
T 1
(just an idea...)
|
|
T 2
(C version, 386, 8086)
|
|
T 3 ----+---- T 3r0c
| | (386)
| |
| |
| +---- T 3r0t
| (386, 8086, symbolic)
| |
| T 3r1t
| (386, 8086, symbolic)
| |
| T 3r2t -------------+---- T3Mr0
| (386, 8086, symbolic) | (6502)
| | |
| T 3r3 |
| (386, 8088, symbolic) +---- T3Xr{0-3}
| (Tcode, 386, 8086,
| synthesizing TXCG,
| VM in C)
T 4 ---- T4r0 |
(386, 8086, T3Xr4
synthesizing CG, (Tcode, 386, 8086,
Modules, serapate TXCG, TXOPT, include
compilation) files via TXPP)
|
T3Xr5
(Tcode2, 386, 8086,
TXCG, TXOPT, TXPP,
debugger support)
|
T3Xr6
(Tcode3, 386, new
RT system, object
extension)
|
T3X 6.x
(Tcode4,5 misc. native
backends, HLL support)
|
T3X 7.x
(Tcode7, R5-compat. removed,
IClasses, HLL-support removed,
simplified design)
|
T3X 8.0.x
(Tcode8 w/ variable word size,
16-bit limit removed, Core
class is now an IClass)
|
T3X 8.1.x
(Re-implemented the
ANSI C back end)
|
| Fig.1 The T3X Family Tree |
The original T language (T1) was never fully implemented. It was merely an idea, something I was playing with.
The first real implementation was T2. It was written in C using very conventional recursive descent parsing techniques. There were assembly code generators for 8086 and 386-based machines. These generators were also used in later T3 and T4 packages, but not in T3M and T3X.
T3 is the root of a large subfamily of T versions. T3r0t (T version 3, release 0, T implementation) was the first full implementation of this language. The techniques used in the T3 implementation were quite different from those used in the T2 translator. In T3, Falling Precedence Parsing was used for the first time.
The T3 code generators were rather dumb at that time, and since the compiler was used to compile itself, efficiency became more important. The C version was written at a later time to allow the installation of T3 on any machine providing a C compiler. Basically, it was a modified T2 compiler. The C version was included in all T3 packages. The language definition of T3 differed from T2 only by the addition of some built-in runtime procedures (namely OPEN(), CLOSE(), and ERASE()) and since the T3 compiler did not use these procedures, the T2 compiler could be used to bootstrap T3.
Subsequent releases of T3 were mainly bug-fix releases. For a long time, T3 was the most stable and usable branch of the language. T3r3 was published after the first T3X version. It was an attempt to make T3 more compatible to T3X.
The next step in the development of T was T4. T4 featured separate compilation, modules, and synthesizing code generators for 8086- and 386-based platforms. There were many other additions to the language itself which made T4 more convenient to use than T3. However, T4 remains an experiment. There has never been a official release of this version. Most enhancements to the language itself have been integrated into T3X in the course of time and some experiences gained during its development turned out to be valuable when creating the module system of T3X Release 6.
T3M was an experimental port of T3 to 6502-based systems. It has never been finished, because the porting scheme was completely redesigned at the same time.
The flagship of the entire T/T3 family is T3X (T3 eXtended). Most important features of all other branches have been integrated into T3X and a totally different approach to portability has been chosen at this time. Instead of defining a procedure call interface to the code generators, Tcode -- a simple intermediate language -- was invented as a notation to pass information from the compiler to the code generator. This way, the translator and the code generator could be conceptionally separated. Another goal of this approach was the creation of a language which is suitable for the efficient interpretation by a virtual machine. In fact, the first `back end' of the T3X compiler was a Tcode interpreter.
Of course, the use of a simple virtual machine for porting a compiler to new platforms is not new. A very good lecture covering this topic is still "BCPL - the language and its compiler", Richards & Whitby-Strevens, Cambridge U Press, 1980.
Since Release 6, the T3X language contains some extensions which support an object-oriented programming style, modules, separate compilation, and a new and different runtime support system. Some new keywords and statement types were added to the language and the object data type was introduced. However, T3X remained a typeless language. Great effort was put on integrating the OO concept into the typeless design. Therefore, the only type-checks, which were added in Release 6, are related to sending messages to objects and accessing members of modules.
Following the T3X philosophy, the object-oriented concept was reduced to a bare minimum while adapting it to the language. Many semantic ambiguities have been removed and the whole concept has been highly simplified. One could say that T3X with OO extensions is to Object-Pascal what purely procedural T3X is to Pascal.
T3X version 7.x introduced some radical simplifications. Compatibility to Release 5 was finally dropped, the constant expression syntax was extended, Big (32 bit) Tcode support was removed. The dynamic loader interface was also removed and Interface Classes (IClasses) were introduced. IClasses form an interface between T3X and C (or assembly language). Unlike dynamically loadable extensions, IClasses offer a way of binding foreign language modules statically, providing an easier porting path to architectures that do not offer dynamic loading.
The greatest enhancement of T3X version 8.x is the Tcode8 machine which uses the natural machine word size of the host architecture. The introduction of Tcode8 allowed to remove all 16-bit contstraints from the language definition. Other improvements include simplified dynamic table syntax and the conversion of the core class to an ordinary IClass. Version 8.1 re-introduces an ANSI C back end.
| Previous: 1.1 The History of T3X | TOC | Index | Back | Next: 2. A Tour through the T3X Language |