2. Program construction using TDF
Traditional program construction using the C language has two phases: compilation and linking.
In the compilation phase the source text written in the C language is mapped to an object code format. This object code is generally not complete in itself and must be linked with other program segments such as definitions from the system libraries.
When tokens are involved there is an extra stage in the construction process where undefined tokens in one program segment are linked with their definitions in another program segment. To summarise, program construction using TDF and the TenDRA tools has four basic operations:
- Source file compilation to TDF
-
The TDF produced may be incomplete in the sense that it may contain undefined tokens;
- TDF linking
-
The undefined tokens represented in TDF are linked to their definitions in other compilation modules or libraries. During linking, tokens with the same identifier are treated as the same token;
- TDF translation
-
This is the conversion of TDF into standard object file format for a particular machine system. The program is still incomplete at this stage in the sense that it may contain undefined library functions;
- Object file linking
-
This corresponds directly to standard object file linking.