ASP-7(ID:5352/asp003)

ASP for the PDP-7 


ASP for the PDP-7


Related languages
ASP => ASP-7   Port
ASP-7 => GULP   Based on
ASP-7 => SLP   Based on

References:
  • Gray, J. C. "Compound data structure for computer aided design" view details
          in Proceedings A.C.M. National Meeting, 1967 view details
  • W M Newman "The ASP-7 ring-structure processor Version III" Internal Note Centre for Computing and Automation Imperial College London 1967 view details
          in Proceedings A.C.M. National Meeting, 1967 view details
  • Pankhurst, R. J. "GULP—A compiler-compiler for verbal and graphic languages" view details Abstract: The General Utility Language Processor (GULP for short) has to operate interactively in a small machine. Its design has to be radically different from compiler-compilers for general-purpose languages in batch-processing operating systems. Except for the processing of interrupts, the processing time is unimportant, provided there is a response from the system within a few seconds. Hence every effort was made to reduce storage requirements, even at the expense of processing time. There are many sophisticated techniques which may be used in compiler-compilers; for example, checking grammars for ambiguity, procedures to put the syntax rules into canonical order4 and methods to optimize generated code. These are neglected in GULP because of the need to save storage space. Mnemonics and familiar higher language forms are used wherever possible in the attempt to simplify the use of GULP and make it easier to learn.
    Extract: Outline of System
    Outline of System
    The Digital Equipment Corporation PDP7 computer at Cambridge is equipped with an 8K-memory of 18-bit words and a type 340 cathode ray tube display with light pen. Input/output is basically by paper tape reader and punch and a teletype. In addition there is a button box (auxiliary keyboard), a drawing tablet with a stylus and a joystick. The joystick is an input device with a lever which can be pushed from side to side, forward and backward and twisted left or right all at once, to represent directions and rates on three axes.

    The PDP7 is connected via a data link to a large computer, the TITAN (prototype I.C.T. Atlas II). The data link software makes the storage capacity and computing power of TITAN available to the PDP7. The display is operated by a display processor directly from display program (display file) in core store. The display processor has to process the display file repeatedly to maintain a picture. In a sense therefore, an input message may translate into code for the main processor which will only need to execute it once, whereas code for the display processor will have to be executed repeatedly. The display with its light pen can be regarded as both an input/output device driven by the main processor and as a processor of code in its own right.
    In what follows, three different languages are referred to. These are:
    1. The user language, which is the language for which the GULP user wants a compiler.
    2. The syntax language (or metasyntactic language) which describes the syntax, or rules of grammar, of the user language, and
    3. The semantic language (or metasemantic language) which describes the semantics (i.e., meaning, or rules of code generation) of the user language.
    Statements in these languages will be called user, syntax and semantic statements respectively. The definition of a user language for GULP to translate is prepared on paper tape or typed on the keyboard. It was not thought useful to generalize the means of making this definition on-line through the various devices, since the user gains little and this would make the system larger. The definition is usually prepared separately on paper tape. The use1 languages which may be defined at present have a fixed syntax; i.e., the syntax rules do not vary in the context of what part of the user language is being used. The definition is made in a number of sections with special headings; for example, CHARACTERS. These sections may come in any order; provided, where appropriate, that anything the user defines must be defined before it is used.

    The notion of a character is generalized in such a way that all input/output on any device is in terms of characters alone. The character may be single-valued (e.g. from a keyboard) or multi-valued (e.g., the co-ordinates of a tracking cross). Characters are defined in the user language definition, but, in the case of the display, can also be defined while the language is being used (see the section below on Graphic Routines and Display File Management).

    The syntax and semantics are defined side by side. The syntax description is translated into an associative ring structure using the ASP7 system 6, (and see the section on Associative Ring Structure) which includes a free storage system; i.e., the system has dynamic control over the use of a large block of memory. The semantic rules are attached to appropriate points in the syntax structure. GULP in fact uses a considerable variety of what in general may be thought of as data structures. It includes tables, chained blocks, stacks of various entry sizes and a circular stack, as well as ASP7.

    The particular structure used is a matter of convenience to reduce storage requirements. Mnemonics are built into the system wherever suitable and the user may in addition define his own. The syntax analysis proceeds by a top-down (also called downwards or synthetic) technique. 16 Input messages from the user are processed by interrupt routines to become strings of characters. The system provides a number of semantic routines (for example, see Table 1). It has been demonstrated  that a surprisingly small number of such routines is sufficient. An ingenious user may write his own semantic routines, but this is not necessary in most cases. Semantic routines generate code, display file and data structure. The operation of the system is very simple; the user-language definition tape is read in at the beginning and translated and the system then waits for user input messages, except when a message is actually being processed. Extract: Associative Ring Structure
    Associative Ring Structure
    The principal tool used by this system is the Associative Structure Package (ASP7) implemented by W. A. Newman 6 for the PDP7. It is used to build data structures whose associative properties are expressed using rings, where a ring is a series of addresses in words so that the first points to the next, and so on until the last points back to the first. The first pointer is specially marked and is called a ringstart. The ringstart may point to itself; i.e., the ring may be null.

    ASP7 divides storage into three kinds of blocks, named elements, associators and ringstart blocks. These are shown symbolically by a rectangle, a circle and a triangle respectively 7. Each type of block has two rings running through it. An element has any number of data words in it (including none), whereas associators and ringstart blocks have one data word each. There are two ringstarts in an element; one starts a ring through ringstart blocks and the other a ring through ass'ociator blocks. A ringstart block has .just one ringstart leading to a ring of associators. Rings are represented in the diagram by lines which end in a marker which implies a pointer back to the ring-start. Null rings are left out of the diagram.
          in Proceedings of the 23rd ACM national conference January 1968 view details