PLASYD, standing for Programming Language for System Development, was designed in mid-1968 as a basic tool for the production of new optimising and conversational FORTRAN compilers for the ICL 1900 series of computers. Although previous scientific compilers for the 1900 series had used special purpose languages for syntax analysis and other specialised tasks, a large amount of the coding was done in PLAN PLAN [1]. It was felt that for the new projects a more systematic, easily intelligible and maintainable system would be preferable and an investigation of software production tools was undertaken. The main criteria for the language were that it should itself provide a high standard of documentation and the code generated should be efficient (the compilers to be produced had strict limits both on total size and on compilation time).
PLASYD needed to use all the machine facilities efficiently and also have an algorithmic structure to aid readability. These conditions pointed to an implementation language similar to PL360 [2] but adapted for the 1900 series order code. PL-360's block structure and all operations concerned with flows of control were adopted almost intact, being virtually machine independent. However storage types and methods of manipulating them had to be modified to fit in with the 1900 series architecture. In particular, a method of exploiting the directly and indirectly addressable areas of data storage on the 1900 was devised.
PLASYD is, superficially, Algol-like, having a block structure, type and procedure declarations, the same form of identifiers and similar assignment and control statements. However, recursion is not provided automatically and consequently all storage assignments may be made at compile time. The compiler generates semi-compiled output similar to other 1900 series compilers. Segmentation and common storage are provided in the language so that it is possible to compile PLASYD routines which can communicate with both FORTRAN and ALGOL programs. Consequently, it is quite feasible to recode the most frequently used routines of a program in PLASYD for greater efficiency.
The most fundamental difference between PLASYD and high level programming languages is the splitting of variables into two classes, accumulators and cells. Accumulators correspond directly to the 1900 integer and floating point accumulators whereas cells occupy core storage and correspond closely to variables in high level languages. The ability to specify the accumulators to be used gives the programmer some control over the form of instructions to be compiled. Unlike high level languages, assignment statements do not allow parentheses and all operators, including the assignment itself, are obeyed strictly from left to right. For example, the statement
X1 := A - B AND 3 SRL 2;
produces code which:
In general, each operator/operand pair in an assignment statement produces a single machine code instruction. However in some cases more than one instruction may be generated.
PLASYD is, basically, a free format language except that reserved words, such as BEGIN, must be delimited by spaces or newline. PLASYD programs are written using the 1900 64-character set of symbols and can have a maximum of 72 characters in any line. If the program is to be punched on paper tape TAB characters may be used. TABs are considered to be at six character intervals by the compiler and are equivalent to spaces. A SPACE, TAB, NEWLINE or END OF CARD will serve to terminate an identifier or basic symbol. These layout characters can, in general, be used to improve the format of the program. Spaces, however, are significant in strings and character sequences. Newline is also significant within some assignment statements and the INCLUDE statement. The symbol := may be replaced by ←. This is not to be advised when inputting PLASYD from a MOP terminal.
The intention is to provide a fairly rigorous definition of the syntax of the PLASYD language at the heads of the various sections. The notation is similar to BNF in that:
Terminal symbols in PLASYD are represented by upper case letters and other symbols in the 1900 character set. Syntactic classes are represented by lower case names without spaces. For example:
address ::= wordaddress | CHAR integer | CHAR integer OF wordaddress | @ identifier
indicates that the syntactic class address is defined as one of the following four possibilities:
In some places, several syntactic statements are similar except that one class is replaced by another similar one consistently throughout the statement. In this case they may be written as a single statement using Greek letters to indicate one of several possibilities. For example:
αcell ::= simpleαcell | (simplesmo) {α = x | r}
is equivalent to the two statements:
xcell ::= simplexcell | (simplesmo) rcell ::= simplercell | (simplesmo)
Throughout the syntax definitions the following associations apply:
x INTEGER r REAL xx LONG INTEGER rr LONG REAL
The symbol ? is used to indicate that the preceding syntax class is optional. For example:
a ::= b c? d
is equivalent to
a ::= bd | bcd