The Project

A Guide to the TDF Specification, Issue 4.0

DERA

Katherine Flavel (copyeditor), The TenDRA Project
Jeroen Ruigrok van der Werven (copyeditor), The TenDRA Project

2005


Table of Contents

1. Introduction
2. SORTs and TOKENs
2.1. Token applications and first-class SORTs
2.2. Token definitions and declarations
2.3. A simple use of a TOKEN
2.4. Second class SORTs
3. CAPSULEs and UNITs
3.1. make_capsule and name-spaces
3.1.1. External linkages
3.1.2. UNITs
3.1.3. make_unit
3.1.4. LINK
3.2. Definitions and declarations
3.2.1. Scopes and linking
3.2.2. Declaration and definition signatures
3.2.3. STRING
4. SHAPEs, ALIGNMENTs and OFFSETs.
4.1. Shapes
4.1.1. TOP, BOTTOM, LUB
4.1.2. INTEGER
4.1.3. FLOATING and complex
4.1.4. BITFIELD
4.1.5. PROC
4.1.6. Non-primitive SHAPEs
4.2. Alignments
4.2.1. ALIGNMENT constructors
4.2.2. Special alignments
4.2.3. AL_TAG, make_al_tagdef
4.3. Pointer and offset SHAPEs
4.3.1. OFFSET
4.4. Compound SHAPEs
4.4.1. Offset arithmetic with compound shapes
4.4.2. offset_mult
4.4.3. OFFSET ordering and representation
4.5. BITFIELD alignments
5. Procedures and Locals
5.1. make_proc and apply_proc
5.1.1. vartag, varparam
5.2. make_general_proc and apply_general_proc
5.2.1. tail_call
5.2.2. PROCPROPS
5.3. Defining and using locals
5.3.1. identify, variable
5.3.2. ACCESS
5.3.3. current_env, env_offset
5.3.4. local_alloc, local_free_all, last_local
5.4. Heap storage
6. Control Flow within procedures
6.1. Unconditional flow
6.1.1. sequence
6.2. Conditional flow
6.2.1. labelled, make_label
6.2.2. goto, make_local_lv, goto_local_lv, long_jump, return_to_label
6.2.3. integer_test, NTEST
6.2.4. case
6.2.5. conditional, repeat
6.3. Exceptional flow
7. Values, variables and assignments.
7.1. contents
7.2. assign
7.3. TRANSFER_MODE operations
7.4. Assigning and extracting bitfields
8. Operations
8.1. VARIETY and overflow
8.1.1. ERROR_TREATMENT
8.2. Division and remainder
8.3. change_variety
8.4. and, or, not, xor
8.5. Floating-point operations, ROUNDING_MODE
8.6. change_bitfield_to_int, change_int_to_bitfield
8.7. make_compound, make_nof, n_copies
9. Constants
9.1. _cond constructors
9.2. Primitive constant constructors
10. Tokens and APIs
10.1. Application programming interfaces
10.2. Linking to APIs
10.2.1. Target independent headers, unique_extern
10.3. Language programming interfaces
11. TDF transformations
11.1. Transformations as definitions
11.1.1. Examples of transformations
11.1.2. Programs with undefined values
12. TDF expansions of offsets
12.1. Bitfield offsets
13. Models of the TDF algebra
13.1. Model for a 32-bit standard architecture
13.1.1. Alignment model
13.1.2. Offset and pointer model
13.1.3. Size model
13.2. Model for machines like the iAPX-432
13.2.1. Alignment model
13.2.2. Offset and pointer model
13.2.3. Size model
13.2.4. Offset arithmetic
14. Conclusion