In this document we describe a system that supports the construction of programs that use trees or terms as their main data structure. This system is a `meta'-tool in the development process of tools. Its input is an abstract description of terms, annotated with implementation directives, plus a description of functions on these terms. The output consists of a number of C-files that contain data structure definitions for the terms, a number of standard functions on those terms, and a translation (in C) of the function definitions in the input (e.g. term rewriting). The standard functions can be used to create terms, compare them for equality, read and write them on files in various formats and do manipulations like list concatenation.
This document is organised as follows. In Section 1 we describe the input format of the term processor1. In Section 2 we describe the output of the system: the C types and functions, the files, etc. Section 3 goes into the details of running the system, and the relation with other software development tools, such as the Unix tools make, yacc, lex, lint and the Synthesizer Generator (SG)[TR84,TR89b,TR89a]. Section 4 discusses various techniques in which programs can be written over terms, and thus gives examples of the concept of multi-paradigm programming. Finally, Section 5 motivates some of the design decisions of our system.
Some reading knowledge of the C programming language and associated tools is assumed.