original
13 − 1 − 0 SECTION 13.1 ALGOL COMPILER (KIDSGROVE) 13.1 A. IDENTIFICATION . Computers KDF 9 Program Nos: KAB00 etc. (see Division C) Title: ALGOL COMPILER {KIDSGROVE) B. GENERAL DESCRIPTION Purpose: To compile an ALGOL program from a magnetic tape into a machine code program on another magnetic tape. The object program is self−contained, and after successful compilation may be entered by the normal Director program reading facilities. This compilation is relatively slow but produces a fast efficient program. Due to the slow compilation, it is advisable to check carefully the syntax of the ALGOL programs before presentation. The system is controlled by the TRANSLATE PHASE of the POST system. Input: The ALGOL text on magnetic tapes The definition of this tape is contained in Section C. Limitations: The limitations on the ALGOL text are described in Appendix 1. Output: 1. A MAGNETIC TAPE containing the object program as a self contained binary program, with the same identifiers as the corresponding source programs, but with the 'T' at the front of the index block replaced by 'M'. 2. Optional output on. a specified device, as follows :-− (a) Level Parameters or Procedure Descriptions − a description of the internal constants concerned with the organisation of procedures. (b) Storage Allocation and Reference Correspondence. (c) The Call Matrix − a description of the possible run time procedure call structure of the source program. (a) The Object Program in USERCODE − a full listing of the object program. KDF 9 (Revised 25/2/65).
original
13 − 2 − 0 Section 13.1 B (cont.) 13.1 Accuracy Checks: There is no formal syntax check in this version, but the large number of checks performed throughout compilation should ensure that an error of syntax will be found before the compilation is complete. A full description of the failures is contained in Appendix 2 to this Section. It is recommended that a syntax check be carried out before a program is presented to this Compiler. Error Reporting: The user is referred to Appendix 3. C.. METHOD OF USE Structure of This Compiler will only work from a magnetic tape, known System Tape: as the System Tape. This must be constructed by Updater (see Section 9.1 of the KDF 9 Service Routine Library and) Manual contain the following, in order stated, preceded by the POST system Phase control bricks:− POST M KABO2....USm ) M KAB2O....USm ) M KAB22....USm } M KAB4O....USm ) M KAB45....USm ) The exact order of these bricks M KAB46....USm ) is optional but the given order M KAB41....USm ) is recommended for efficiency. M KAB42....USm ) M KAB60....USm ) M KAB95....USm ) M KAB84....USm ) M KAB01...−USm ) M KAB99....USm M KAB24....USm Internal diagnostic print brick. M KAB97....USU Control program USERCODE text. ALGOL AND USERCODE, AND ANY PRIVATE, LIBRARIES. ANY OTHER STANDARD BINARY PROGRAMS. Notes. (a) The module size (m) must be consistent and not greater than the machine core size. (In general, only a 3 module version will be issued). {b) The ALGOL and USERCODE library texts (which should be laid out in order of frequency of use and may be intermingled) must follow the control program USERCODE text (KAB97) which must be the last entry in the KAB series. KDF 9 (Revised 26.3265)
original
13 − 3 − 0 Section 13.1 (cont.) 4304 Entry to Entry to the System is by means of the TRANSLATE PHASE System Tape: of POST (Section 7.3 @). Source Text All ALGOL programs processed by the Compiler are read Tape: from magnetic tape, the SOURCE TEXT TAPE. This tape, which may contain any number of programs, should be established by means of POST (see section 7.3) When the text is presented to the 'Assemble’ phase of POST it must be preceded by the standard POST Assemble message. The ALGOL program which follows this message will be an unlabelled block or compound statement, i.e. the first symbol will be begin. The remainder of the text is in standard ALGOL format and must be terminated by one '→' character. The text should contain 'library A0’ (the standard function) and requests for the required input/output facilities as listed in Chapter 6 of the KDF 9 ALGOL Users Manual.. These library requests should be made in the outermost block (that is immediately after the first begin) of the ALGOL program. D. Not applicable. E. PROGRAM CHARACTERISTICS Purpose: ALGOL COMPILER (KIDSGROVE) is an autonomous, segmented program, which accepts ALGOL programs on magnetic tape. Selected programs are processed to give an efficient USERCODE text, which is then compiled to produce a binary Object Program. For ease of reference, particularly with regard to failure messages, the various segments are termed 'Bricks'. Method: The compiler is entered from the TRANSLATE PHASE of the POST operating system. The declaration lists are set up and the text partially: encoded (Brick 01). If required, the ALGOL and USERCODE text may be output at this point. The coding and declaration tables are completed (Brick 02). KDF 9
original
13 − 4 − 0 Section 13.1 E (cont. ) 13.1 The procedure classification is then carried out and a call matrix set up for the text (Brick 20). If required, diagnostic information may be output at this point (by Brick 24). The storage allocation is then made (Brick 22) and the storage allocation table may be obtained at this point. If optimisation is not required (Section 7.3 C, translation directives) the codewords are re−ordered (Brick 40) and those with 'for' statements are broken down into basic statements (Brick 45). If optimisation is required, the codewords are re−ordered with nested for' statements denested (Brick 46), optimisation of For'statements and subscripted variables performed (Brick 41) and the code words restored to their original nested order (Brick 42). The codewords, now without 'for' statements, are translated into a USERCODE text (Brick 60) which is output, if required, at this point. There are two sub−sections of Brick 60 which are:- Brick 61, an optimisation process which accepts any simple (i.e. containing no sub−expressions) or conditional, expression or statement, and scans it for common operations, which are then replaced by a common reference. The order of evaluation is then altered so that an operation is performed as soon as its operands are available. Finally the operands in an operation are marked to indicate if they are required by later operations or not. Brick 62, a generation process which converts the processed expression into USERCODE, replacing the expression by a descriptive tag. The code generated is designed to use the Nesting Stone, and, where necessary, the section generates the storage for partial results, manipulative functions, etc− If a complete ALGOL statement is being processed, the resultant USERCODE is output to the Object program tape for compilation. The USERCODE text is then compiled in two phases by a USERCODE Compiler and a Binary Object Program on magnetic tape produced (Brick 84). A copy of the USERCODE Reference Tables may be obtained at this point if required. KOF 9
original
13 − 5 − 0 Section 13.1 (cont. ) 13.1 F. COMPUTER REQUIREMENTS AND CONDITIONS The minimum configuration for this program is:- 1 8−hole Paper Tape Reader 3 Magnetic Tape Units 1 Output Device The output device can be an 8−hole paper tape punch, a line printer, a magnetic tape unit, or a 5−hole paper tape punch. Up to 2 additional magnetic tape units can be used for internal working, with a corresponding increase in operating efficiency. If a magnetic tape unit is used for output it must be pre~labelled, and it must be additional to the 3 magnetic tape units specified for internal working. Thus, if only 3 magnetic tape units are available, output may not be allocated a magnetic tape unit. G. NORMAL OPERATING PROCEDURES See Section 7.3 G If diagnostic output is required, a 'TINT;B10.→' should be done during the compilation and the following replies should be used:- ccc/dd START; 25000.4 if dd = 01 25000.→ 02 05335.→ 20 05061.→ 22 0179210.→ 40 0455310.→ 41 0572010.→ 42 0201610.→ 45 N.→ 46 0471110.→ 60 0471110.→ 61 0471110.→ 62 N.→ 84 END: E.→ (all bricks) START; N.→ CHANNEL: N.→ The message 'ccc/dd' may be preceded by 'FAILURE nn' 'F dd/ss' 'P nn/ss' For a table of failure exits and warning messages, see Appendix 2. KDF 9 (Revised 26.3.65)
original
13 − 6 − 0 Section 13.1 (cont) 13.1 H. NORMAL CORRECTION PROCEDURES In the event of a machine failure or a failure leading to Director action, the program may be re−entered via the failure section, by means of an 'Even Restart". If no diagnostic information is required. Translate Phase Control is re−entered with the failure marker set (section 7.3 G 8b). J−K Not relevant. L. TIMING DATA Not provided for this version. M. EXTENSIBILITY The compiler may be extended by recompilation of all sections with a larger store limit. KDF 9
original
13 − 7 − 0 APPENDIX 1 Limits on the ALGOL submitted to the Kidsgrove Compiler There are several limiting maxima for programs being compiled, which are as follows:— Number of procedures declared 95 Number of parameters to a procedure 31 Number of switch elements 63 Depth of nested brackets in an arithmetic expression 21 Nested block depth in any one procedure or main program 127 Number of blocks in any one procedure or main program 255 Depth of delimiters 195 Left part list size 64 Number of array identifiers in any one array declaration segment 341 Number of identifiers 32,767 Number of labels 32,500 Number of procedure statements in a procedure statement 16 Formal chain (i.e. a chain of actual parameters which are formal). 16 Size of unique identifiers in characters 155 Number of array dimensions 31 KDF 9
original
13−8−0 APPENDIX 2 FAILURE MESSAGES The failure messages have been listed under the various Bricks in which they occur or under Input/Output. Where an entry under the heading 'Position’ is left blank, it indicates that the point of failure may vary. When there is no entry under the heading "Probable cause', the 'Technical reason' should provide enough information. Failures in Brick 84 (USERCODE COMPILER) are in Section 7.1 of the Service Routine Library Manual. KOF 9
original
13 − 9 − 0 Appendix 2 (cont.) Failures in the translator control routine These take the form of failure messages on the monitor flexowriter of the form [m] F dd/ss or [m] P nn/ss where dd is a failure number, ss the brick number, and nn a device number, indicating a parity failure. ┌─────────────┬───────────────────────────────┬────────┬────────────────────┐ │ Fail number │ Technical Reason │Position│ Probable Cause │ ├─────────────┼───────────────────────────────┼────────┼────────────────────┤ │ 01 │ Invalid operation code │ │ Machine or program │ │ 02 │ Open/closed check │ │ − ditto − │ │ 03 │ Buffer bounds invalid │ │ − ditto − │ │ 04 │ Over reading CH4 │ │ − ditto − │ │ 10 │ Invalid peripheral operation │ │ Configuration │ │ 11 │ Channels not interchangeable │ │ ~ ditto − │ │ 12 │ Two last blocks not to MT │ │ ~ ditto − │ │ 13 │ Channel overwritten │ │ − ditto − │ │ 14 │ Preceding channel still open │ │ − ditto − │ │ 15 │ Succeeding channel still open │ │ − ditto − │ │ 16 │ Text connot be found │ │ − ditto − │ │ 20 │ Sequence fail │ │ Machine │ │ 21 │ Sum check fail │ │ Machine │ │ 22 │ Skip out of range │ │ Machine │ │ 23 │ Line overflow . │ │ Machine │ └─────────────┴───────────────────────────────┴────────┴────────────────────┘ KDF 9
original
13−10 −0 Appendix 2 (cont.) 'failures in Bricks 01 and 02 are reported on the Channel 3 output device, as more than one may be detected per run. For the failures listed, a failure 000/01 or 000/02 is output on the monitor typewriter.' Brick 01 failures ┌─────────────┬─────────────────────────────────────┬────────┬────────────────────┐ │ Fail Number │ Technical reason │Position│ Probable Cause │ ├─────────────┼─────────────────────────────────────┼────────┼────────────────────┤ │ 01 300 │ Any failure in Channel 7 output │ R6P754 │ Machine │ │ 01 501 │ EM not after end or end comment │ Various│ │ │ O1 303 │ Failure in control routine │ Various│ │ │ 01 304 │ Sumcheck failure on Channel 6 or 8 | R21P1 │ Machine │ │ 01 305 │ Not allocated │ │ │ │ 01 306 │ Declaration List structure wrong │ │ Machine or │ │ │ │ │ program │ │ 01 307 │ Not allocated │ │ │ │ 01 308 │ Invalid number │ │ │ │ 01 309 │ Misuse of codeword output S/R │ │ Machine or │ │ │ │ │ program │ │ 01 310 │ First symbol of source program │ │ │ │ │ is not begin │ │ │ │ 01 311 │ Machine too small │ │ │ │ 01 312 │ Bracket mismatch │ │ │ │ 01 313 │ Bracket stack over−emptied │ │ Too many end's │ │ │ │ │ in ALGOL │ │ 01 314 │ Statement flag wrong │ │ ABS valid only │ │ │ │ │ in expressions │ │ │ │ │ used at state− | │ │ │ │ ment level, or │ │ │ │ │ vice versa │ │ 01 315 │ comment in wrong place, invalid │ │ │ │ │ parameter comment │ │ │ │ 01 316 │ Bracket stack under~emptied │ │ Not enough end's │ │ │ │ │ in ALGOL │ │ 01 317 │ Too many blocks in a level │ │ │ │ 01 318 │ Declarator not in block head, or │ │ │ │ │ Specifier not in procedure head │ │ │ │ 01 319 │ Various syntax errors in block or │ │ │ │ │ procedure head │ │ │ │ 01 320 │ Repeated declarations, formals; or │ │ │ │ │ specifications; formal unspecified,│ │ │ │ │ specification and no formal │ │ │ │ Q2 321 │ More than 96 procedures │ │ │ └─────────────┴─────────────────────────────────────┴────────┴────────────────────┘ KDF 9
original
13 − 11 − 0 Appendix 2 (cont.) Brick 01 failures (cont. ) ┌──────────────┬─────────────────────────────────────┬────────┬────────────────────┐ │ Fail Number │ Technical reason │Position│ Probable Cause │ ├──────────────┼─────────────────────────────────────┼────────┼────────────────────┤ │ 01 322 │ Not allocated │ │ │ │ │ │ │ │ │ 01 323 │ Too many dimensions in array │ │ │ │ │ declaration: too many arrays │ │ │ │ │ in segment │ │ │ │ │ │ │ │ │ 01 324 │ Closing string quote misplaced │ │ │ │ │ │ │ │ │ 01 325−399 │ Not allocated │ │ │ │ │ │ │ │ │ 01 400 │ Misplaced KDF │ │ │ │ │ │ │ │ │ 01 401 │ Formals not permitted in code │ │ │ │ │ │ │ │ │ 01 402 │ Syntax of code specification │ │ Invalid number │ │ │ │ │ separators; │ │ │ │ │ terminator; │ │ │ │ │ numbers too large │ │ │ │ │ │ │ 01 403 │ Pseudo instruction invalid │ │ Not [F], = [F] or │ │ │ │ │ J[F]; jump to non− │ │ │ │ │ label, fetch/store │ │ │ │ │ │ │ 01 404 │ Invalid formal identifier in code │ │ │ │ │ │ │ │ │ 01 405 │ Formal not in formal list │ │ Missing ] or │ │ │ │ │ mis−spelling │ └──────────────┴─────────────────────────────────────┴────────┴────────────────────┘ KDF 9 (Revised 26.3.65)
original
13 − 12 − 0 Appendix 2 (cont. ) Brick 02 failure │ │ │ │ │ │ Fail Number│ Technical reason │ Position │ Probable cause │ │ │ │ │ │ │ 02 303 │ PANACEA failure │ Various; │ Machine or PANACEA │ │ │ │ before R10│ │ │ │ │ after R21:│ │ │ │ │ in P2, P7 │ │ │ │ │ │ │ │ 02 304−308 │ Not allocated │ │ │ │ │ │ │ │ │ 02 309 │ List coming down meets │ R27; P6; │ Machine too small │ │ │ list going up │ │ or ALGOL too large │ │ │ │ │ │ │ 02 310 │ First basic symbol not │ R11 │ Machine or PANACEA │ │ │ begin program │ │ │ │ │ │ │ │ │ 02 311−312 │ Not allocated │ │ │ │ │ │ │ │ │ 02 313 │ Bracket stack over− │ R1 P6 │ Machine or Brick O1 │ │ │ emptied │ │ │ │ │ │ │ │ │ O2 314 │ Not allocated │ │ │ │ │ │ │ │ │ 02 315 │ Invalid codewords │ R15; R24 │ Machine or Brick 01 │ │ │ │ │ │ │ 02 316−319 │ Not allocated │ │ │ │ │ │ │ │ │ 02 320 │ Undeclared identifier │ R14 │ Identifier undeclared │ │ │ │ │ or used outside its │ │ │ │ │ scope │ │ │ │ │ │ │ 02 321 │ Not allocated │ │ │ │ │ │ │ │ │ 02 322 │ Assignment to procedure │ R38; R41 │ │ │ │ or function description │ │ │ │ │ outside its body │ │ │ │ │ │ │ │ │ 02 323 │ BPL variable local to │ R14 │ │ │ │ current block │ │ │ KDF9 (Revised 9.6.65)
original
13 − 13 − 0 Appendix 2 (cont.) Brick 20 │ │ │ │ │ │ Fail Number│ Technical Reason │ Position │ Probable Cause │ │ │ │ │ │ │ 01/20 │ First word fetched backwards │ P210 │ Failure Brick 01 or │ │ │ not end program │ │ or PANACEA or mach. │ │ │ │ │ │ │ 02/20 │ Member in class 14 other than 0 │ R3P210 │ │ │ │ │ │ │ │ 03/20 │ Not allocated │ │ │ │ │ │ │ │ │ 04/20 │ (p not preceded by a procedure │ R8P210 │ " │ │ │ statement or declaration │ │ │ │ │ │ │ │ │ 05/20 │ Invalid character in procedure │ R14P2t0 │ " │ │ │ heading │ │ │ │ │ │ │ │ │ 06/20 │ formal parameter in procedure │ RISP210 │ " │ │ │ declaration without │ │ │ │ │ specification marker │ │ │ │ │ │ │ │ │ 07/20 │ Class 3 variable other than │ R20P210 │ " │ │ │ switch, label or string │ │ │ │ │ │ │ │ │ 08/20 │ " │ R39P210 │ " │ │ │ │ │ │ │ 09/20 │ CD in Li-1 ≠ 1 begin end │ R26P210 │ begin end incorrectly │ │ │ incorrectly nested │ │ │ │ │ │ │ │ │ 10/20 │ 2 end programs │ R36P210 │ │ │ │ │ │ │ │ 11/20 │ Lilist not empty │ R36P210 │ procedures incorrectly │ │ │ │ │ nested │ │ │ │ │ │ │ 12/20 │ Felist not empty │ R37P210 │ formal by name not in │ │ │ │ │ decln, │ │ │ │ │ │ │ 13/20 │ Specifier not inside (p) p's │ R46P210 │ Brick │ │ │ │ │ │ │ 14/20 │ No space left │ R56P210 │ Source program too big │ │ │ │ │ │ │ 15/20 │ No Level parameters │ R8P220 │ failure in P2160 or B2 │ │ │ │ │ │ │ 16/20 │ Sm14 not a procedure │ R9P220 │ Statement list out of │ │ │ │ │ step. │ │ │ │ │ │ │ 17/20 │ Bblist not empty │ R17P220 │ formal level statement │ │ │ │ │ without an actual │ │ │ │ │ statement including │ │ │ │ │ formal │ │ │ │ │ │ │ 18/20 │ No Level parameters with L │ R1P200 │ failure in P210 or B2 │ │ │ │ │ formal │ │ │ │ │ │ │ 19/20 │ No space left │ R2P205 │ Source program too big │ │ │ │ │ │ │ 20/20 │ Bblast full │ R5P201 │ too many formal │ │ │ │ │ procedures │ │ │ │ │ │ │ 21/20 │ SPilist full │ R9P201 │ procedure calls nested │ │ │ │ │ too deep │ │ │ │ │ │ │ │ │ │ │ │ 22/20 │ EPjlist full │ R25P201 │ formal chain too long │ │ │ │ │ │ │ 23/20 │ invalid character after actual │ R36P201 │ B01 or 02 │ │ │ parameter │ │ │ │ │ │ │ │ │ 24/20 │ character following (p or ,p │ R9P201 │ " │ │ │ not a parameter │ │ │ │ │ │ │ │ │ 25/20 │ invalid character after │ R13P201 │ " │ │ │ procedure identifier │ │ │ │ │ │ │ │ │ 26/20 │ begin after procedure │ Ri4P201 │ " │ │ │ identifier │ │ │
original
13 − 14 − 90 Appendix 2 (cont. Brick 20 (cont. ) , │ │ │ │ │ │ Fail Number│ Technical Reason │ Position │ Probable Cause │ │ │ │ │ │ │ 27/20 │ no. of parameter F/A not equal │ R15P201 │ Invalid ALGOL │ │ │ │ │ │ │ 28/20 │ LUL not found in th position │ R17P201 │ Invalid ALGOL or │ │ │ │ │ P210 in B20. │ │ │ │ │ │ │ 29/20 │ Sm14 not a procedure │ R19P201 │ P220 Statement list . │ │ │ │ │ wrong │ │ │ │ │ │ │ 30/20 │ Actual/Formal correspondence │ R35P201 │ Invalid ALGOL │ │ │ incorrect │ │ │ │ │ │ │ │ │ 31/20 │ Sm13 not a procedure │ R11P202 │ P220 Statement list │ │ │ │ │ wrong │ │ │ │ │ │ │ 32/20 │ Not sufficient room for Call │ R1P206 │ Source program too │ │ │ & Corr matrices │ big │ │ │ │ │ │ │ │ 33/20 │ No level parameters │ R1IP230 │ P210 of B20 │ │ │ │ │ │ │ 34/20 │ SSilist full in Set up │ R13P230 │ Source program too │ │ │ Call matrix │ │ big or complicated. │ │ │ │ │ Try writing it more │ │ │ │ │ simply. │ │ │ │ │ │ │ 35/20 │ SSilist full Next Statement │ R4P208 │ " │ │ │ Routine │ │ │ │ │ │ │ │ │ 36/20 │ SSjlist full │ R23P230 │ " │ │ │ │ │ │ │ 37/20 │ Actual/formal correspondence │ R29P230 │ Invalid ALGOL │ │ │ incorrect │ │ │ │ │ │ │ │ │ │ │ │ │ │ 38/20 │ No level parameters │ R25P230 │ P210 of B20 │ │ │ │ │ │ │ 39/20 │ insufficient room for CS, and │ R1IOP240 │ Source program too │ │ │ SSilist │ │ big │ │ │ │ │ │ │ 40/20 │ No level parameters │ R1P240 │ P210 of B20 │ │ │ │ │ │ │ 41/20 │ CSjand SSilist full │ R15P240 │ Source program too │ │ │ │ │ big │ │ │ │ │ │ │ 42/20 │ CSjlist full │ R23P209 │ " │ │ │ │ │ │ │ 43/20 │ Sm13 not an expression │ R13P209 │ P220 Statement list │ │ │ │ │ wrong │ │ │ │ │ │ │ 44/20 │ SSilist full │ R1I0P209 │ Source program too │ │ │ │ │ big │ │ │ │ │ │ │ 45/20 │ level not found with A as a │ R3P209 │ P210 of B20 │ │ │ formal │ │ │ │ │ │ │ │ │ 46/20 │ Skip to block N error │ R21P240 │ Brick 00 │ │ │ │ │ │ │ 47/20 │ No level parameters │ R16P250 │ P210 of B20 │ │ │ │ │ │ │ 48/20 │ No level parameters for LUL │ R16P201 │ P210 of B20 or P201 . │ │ │ │ │ │ │ 49−79/20 │ Not allocated │ │ │ │ │ │ │ │ │ 80/20 │ SJNS Simulator overflow │ R3P4 │ formal/Actual procedure│ │ │ │ │ claiming more than 16 │ │ │ │ │ deep │ │ │ │ │ │ │ 81/20 │ Panacea failure in reading │ RI3P2 │ Machine │ │ │ from channel 4 │ │ │ │ │ │ │ │ │ 82/20 │ Odd or even restart R6P0 │ │ │
original
13 − 15 − 0 Appendix 2 (cont.) Brick 22 Failure i ri │ │ │ │ │ │ Fail Number│ Technical Reason │ Position │ Probable Cause │ │ │ │ │ │ │ 01/22 │ Procedure misplaced │ R1P213 │ │ │ │ │ │ │ │ 02/22 │ level not found for procedure │ R2P214 │ B20 (Procedure used │ │ │ │ │ but not declared) │ │ │ │ │ │ │ 03/22 │ codename not found in 58, list │ R3P214 │ B01 (incorrect code− │ │ │ │ │ words) │ │ │ │ │ │ │ 04/22 │ No level parameters found for │ R11P260 │ B20 (Procedure Used │ │ │ a level but not declared) │ │ │ │ │ │ │ │ │ 05/22 │ Codeword found not a delimeter │ RBOP260 │ B01 or B02 (incorrect │ │ │ │ │ codeword } │ │ │ │ │ │ │ 06/22 │ del is not found │ R13P260 │ B01 or Bo2 (incorrect │ │ │ │ │ codeword ) │ │ │ │ │ │ │ 07/22 │ Not a for st; block, procedure; │ R19P260 │ B01 or B0Z (incorrect │ │ │ begin or end │ │ codeword ) │ │ │ │ │ │ │ 08/22 │ No level parameters for procedure │ R21P260 │ B20 │ │ │ or program begin │ │ │ │ │ │ │ │ │ 09/22 │ A ≠ add of Arrow Vector │ R22P260 │ B20 │ │ │ │ │ │ │ 10/22 │ j:=0 at end of program │ R34P260 │ Begin/end structure │ │ │ │ │ incorrect │ │ │ │ │ │ │ 41/22 │ No. of elements declared in │ R52P260 │ B01 or B02 (incorrect │ │ │ array segment ≠0 │ │ codewords) │ │ │ │ │ │ │ 12/22 │ not local array n of el=0 │ R39P260 │ Incorrect array decln │ │ │ │ │ │ │ 13/22 │ del in array decln. │ R38P260 │ " │ │ │ │ │ │ │ 14/22 │ not own array n of el = 0 │ R42P260 │ Incorrect own arrey │ │ │ │ │ decln. │ │ │ │ │ │ │ 15/22 │ del in own array decln. │ R41P260 │ " │ │ │ │ │ │ │ 16/22 │ No space available in machine │ R8P215 │ Program tco long to │ │ │ │ │ be translated │ │ │ │ │ │ │ 17/22 │ ACL=0 (level not found for │ R16P270 │ B20 │ │ │ proc. dec1n) │ │ │ │ │ │ │ │ │ 18/22 │ level parameters not found │ R58P270 │ B20 │ │ │ for main program │ │ │ │ │ │ │ │ │ 19/22 │ x≠0 (BBr list not exhausted) │ R712270 │ begin/end structure │ │ │ │ │ incorrect │ │ │ │ │ │ │ 20/22 │ not a BPL, or par. or array │ R21P270 │ B01/B02 (incorrect │ │ │ decln, in an array decln. │ │ codewords) │ │ │ │ │ │ │ 21/22 │ No. of elements in an array │ R22P270 │ Incorrect Array │ │ │ ≠0 (double declaration) │ │ Decln. │ │ │ │ │ │ │ 22/22 │ Δ2 or Δ3 >32, 767 │ R52P270 │ Arrays toc large │ │ │ │ │ │ │ 23/22 │ ACL=0 {level not found for │ R56P270 │ B20 │ │ │ proc) ; , │ │ │ KDF 9 .
original
13 − 16 − 0 Appendix 2 (cont. ) Brick 22 Failures (cont.) │ │ │ │ │ │ Fail Number│ Technical Reason │ Position │ Probable Cause │ │ │ │ │ │ │ 24/22 │ level parameter not found for a │ R5TP270 │ B20 │ │ │ │ │ Level │ │ │ │ │ │ │ 25/22 │ Panacea failure (ch 17 or 3) │ P218 │ Panacea │ │ │ │ │ │ │ 26/22 │ Not formal array, procedure │ R69P260 │ B01/B02 (incorrect │ │ │ switch or label in decl. list │ │ eodewords) │ │ │ │ │ │ │ 27/22 │ Codename not found for a formal │ R63P270 │ B01/B02 (incorrect │ │ │ procedure in BSk list │ │ codewords) │ │ │ │ │ │ │ 28/22 │ Odd or even Restart │ R3PO │ │ │ │ │ │ │ │ 29−80/22 │ Not allocated │ │ │ │ │ │ │ │ │ 81/22 │ Panacea failure (ch 4) │ R13P2 │ Panacea │ │ │ │ │ │ │ 82/22 │ Panacea failure (ch 5) │ ROPG │ Panacea, │ KDF 9
original
13 − 7 − 0 Appendix 2 (conte) Brick 40 Failures │ │ │ │ │ │ Fail Number│ Technical Reason │ Position │ Probable Cause │ │ │ │ │ │ │ O10/40 │ Failure in P3 (no procedure │ R4P681 │ Machine or compiler │ │ │ parameter) │ called │ │ │ │ │ from │ │ │ │ │ R1P88 │ │ │ │ │ │ │ │ 011/40 │ Failure in P3 (no procmdure │ R6P8661 │ Machine or compiler │ │ │ parameter │ called │ │ │ │ │ from │ │ │ │ │ R1P881 │ │ │ │ │ │ │ │ 012/40 │ Failare to locate Level │ R4P881 │ Compiler or machine │ │ │ parameters │ │ │ │ │ │ │ │ │ 013/40 │ No room left │ R1P689 │ BRICK 40 │ │ │ │ │ │ │ 014/40 │ Restart │ R1P4 │ Restart │ │ │ │ │ │ │ 041/40 │ Failure to locate Level │ R4P886 │ Compiler or machine │ │ │ parameters │ │ │ │ │ │ │ │ │ 081/40 │ Channel 4 │ R13P2 │ PANACEA or machine │ │ │ │ │ │ │ 082/40 │ Channel 5 │ R6P6 │ PANACEA or machine │ │ │ │ │ │ │ 083/40 │ Not Allocated │ │ │ KDF9 (Revised 29.1.66)
original
13 − 18 − 0 Section 13.1 Appendix 2 (cont. ) Briek 41 Failures │ │ │ │ │ │ Fail Number│ Technical Reason │ Position │ Probable Cause │ │ │ │ │ │ │ 000/41 │ Syntactical error in a for list │ P368 │ Invalid ALCL │ │ │ │ │ │ │ 001/41 │ Second Input word not a special │ R3P360 │ Machine or BLlci 45 │ │ │ deliniter (i.e. not H.D.) │ │ │ │ │ │ │ │ │ 002/41 │ Second H.D. does not agree vith │ B3P360 │ " │ │ │ the firet H.D. │ │ │ │ │ │ │ │ │ 003/41 │ Not sufficient room in procedure or │ R2P360 │ Structure of program │ │ │ for store │ │ too large to be │ │ │ │ │ Optimised. Dun │ │ │ │ │ without Optimiser. │ │ │ │ │ │ │ 004/21 │ for list expression wrongly │ R1P38O │ BRICK 41 or │ │ │ classified │ │ Source Frogram │ │ │ │ │ │ │ 005/41 │ Invalid procedure parameter (i.e. │ R38P820 │ Invalid Algol │ │ │ ith exp. to be used as LH │ │ Progrem │ │ │ variable) │ │ │ │ │ │ │ │ │ 006/44 │ for list element wrongly classified │ R33P380 │ BRICK 41 or │ │ │ │ │ Source lprogren │ │ │ │ │ │ │ 007/41 │ Invalid L.H.S.−. for an internally │ R113P388 │ BRICK 41 │ │ │ generated expression │ │ │ │ │ │ │ │ │ 008/41 │ Given tag not in lists │ R2P300 │ BRICK 46 or 41 │ │ │ │ │ │ │ 009/71 │ Failure to locate level parsneters │ R1P309 │ Compiler or Machine │ │ │ │ │ │ │ 010/41 │ Array dimension count wrong │ R40P3O8 │ " │ │ │ │ │ │ │ 011/41 │ Procedure delimiter found outside │ │ │ │ │ procedure or declarcticon │ R63P308 │ " │ │ │ │ │ │ │ 012/41 │ Array with more then 3 divenciens │ R1P317 │ BRICK 41 │ │ │ not rejected for optimisation │ │ │ │ │ │ │ │ │ 013/41 │ Not enough room in for List element │ R8P319 │ Algol program too │ │ │ lists │ │ big for optimiser │ │ │ │ │ │ │ 014/41 │ Specification or declaration R19P319 │ Compiler │ │ │ │ codevord in for list │ │ │ │ │ │ │ │ │ 015/41 │ Syntax failure in for statement │ R1P322 │ Source program │ │ │ (do wrongly placed) │ │ or compiler │ │ │ │ │ │ │ 016/41 │ Syntax failure in for statement │ R13P322 │ " │ │ │ (step wrongly placed) │ │ │ │ │ │ │ │ │ 017/41 │ Not enough room in Arithmetic Pert │ R10P328 │ Source program too │ │ │ Lists │ │ big │ │ │ │ │ │ │ 018/41 │ Failure to replace optimised │ R13p316 │ Optimiser │ │ │ subtseripted variable in tne text │ │ │ │ │ │ │ │ │ 019/41 │ Too many transfer codes gonerated │ R1P336 │ Algol Progrem too │ │ │ │ │ large for Ostiniver │ │ │ │ │ │ │ 020/41 │ Too many description registers │ R1P370 │ " │ │ │ generated │ │ │ KDF9 (Revised 1.4.66)
original
13 − 19 − 9 Section 13.1 Appendix 2 (cont. ) Brick 41 Pailures │ │ │ │ │ │ Fail Number│ Technical Reason │ Position │ Probable Cause │ │ │ │ │ │ │ 021/44 │ Too many order table entries │ R1P371 │ Algol program too │ │ │ generated │ │ large for Optimiser │ │ │ │ │ │ │ 022/41 │ step substitution failure │ R28p391 │ Macnine │ │ │ │ │ │ │ 023/41 │ Equivalence lists full │ R1P806 │ Source program too │ │ │ │ │ big │ │ │ │ │ │ │ 024/41 │ Too many control statenents in │ R1P372 │ Algol Program too │ │ │ a for list │ │ large for Optimiser │ │ │ │ │ │ │ 025/41 │ Unable to interchange Channels │ R11P884 │ Panacea or machine │ │ │ 4 and 5 │ │ │ │ │ │ │ │ │ 026/41 │ Too many nest entries generated │ R1P373 │ Algol Program too │ │ │ │ │ large for Ostimiser │ │ │ │ │ │ │ 027−039/41 │ Not allocated │ │ │ │ │ │ │ │ │ 040/41 │ Restart │ R1P9 │ Restart │ │ │ │ │ │ │ 041−080/41 │ Not allocated │ │ │ │ │ │ │ │ │ 081/41 │ Channel 4 Failure │ R13P2 │ Panacea or machine │ │ │ │ │ │ │ 082/41 │ Channel 5 Failure │ R6P6 │ " or " │ KDF9 (Revised 1.4.56)
original
Appendix 2 {cont.) 13 − 20 − 0 Brick 42 Failures Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
Appendix 2 {cont.) 13 − 21 − 0 Brick 42 (cont.) Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
13 − 22 − 0 Appendix 2 (cont.) Brick 45 Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
13 − 23 − 0 Appendix 2 (cont.) BRICK 46 Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
13 − 24 − 0 Appendix 2 (cont.) Brick 60 Failures ~ Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
13 − 25 − 90 Appendix 2 (cont.) Brick 60 Failures (cont. ) Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
13 − 26 − 0 Appendix 2 (cont.) Brick 60 Failure (cont.) Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
13 − 27 − 0 Appendix 2 (cont.) Brick 60 Failures (cont. ) Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
13 − 28 − 0 Appendix 2 (cont. ) Brick 61 Failures (Internal to Brick 60) Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
13 − 29 − 0 Appendix 2 (cont.) Brick 62 Failures (Internal to Brick 60) Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
13 = 30 − 0 Appendix 2 (cont. ) Brick 62 Failures (Internal to Brick 60) (cont. ) Automatic recogniton of this page has not worked well. Please consult the original scan (see above>
original
13 − 31 − 0 SECTION 13.1 APPENDIX 3 13.1 ERROR REPORTING In the event of a consistent compiler failure, users should:- (a} Check that the latest edition of compiler is being used. (b) Check that this failure is not accounted for by previously published compiler errors or failures. (c) Eliminate paper tape as a source of failure. (a) If USERCODE Compiler (B84) failures are being produced check that these are not errors in code procedures. (e) Cheek that the ALGOL program is valid (by using Whetstone ALGOL as a syntax check). (f) Report the error using the procedure given in Section 2.4 of the Service Routine Library Manual. (g) Summarize (using Updater) the Systems Tape being used. − It will facilitate and expedite isolation and correction of compiler faults if the following items are supplied: (1) The paper tape (a verified copy, which will not be returned). (2) A printout of the program (which will not be returned). (3) A magnetic tape holding the established text (which will be returned). (4) The summary of the Systems Tape being used. The run should be repeated with full diagnostic output and a TINT;B10.→ done during compilation. At the failure (if at translate time) the action detailed in SECTION (G) should be followed. The resultant printout (or magnetic tape) should be sent with the report. (The Magnetic Tape will be returned immediately). KDF 9 ( Revised 26, 3.65)
original
13 − 32 − 0 SECTION 13.1 APPENDIX 4 13.1 ALGOL OBJECT PROGRAMS The result of a compiling session is a series of ALGOL programs in binary on the output tape. The identifier of this tape, allocated to Channel 7, is specified by the 'Option and System Description Tape'. In order to run a program this tape is nominated as the program tape and Director is used to call and enter the required program, The identifier of the object program is identical to that of the source program, except that the 'T' in the index block is replaced by 'H'. Program Testing Progran testing is largely in the hands of the programmer who must write into his program the required procedures to output partial results, path traces, etc. These may be deleted using POST correction facilities before the final compilation to provide an efficient object program. aN Built−in checks A variety of checks on KALGOL object programs is made automatically at run time on:— (a) Real to integer conversions The limit of 39 bits in any ALGOL conversion is checked every time a real number is converted to an integer. In the event of failure, the character string 'Fix'! and the value of the floating point number are output. (b) Integral arguments to ÷ The Kidsgrove ALGOL '÷' is defined for integral arguments. In the event of failure, the character string 'NOT it and the value of the real argument are output. (c) Overflow This is checked on the left most assignment of the left part list (excluding those generated as the result of 'for! clauses). The character string is 'VR' and the value of the expression which ee caused the overflow to be set are output. (a) Storage Capacity This is checked whenever a procedure is entered, an array is declared, or an array is value copied. The character string is 'STORAGE CAP' and the value is the amount of core store required to get past the failure point. {e) Valid use of ression called by Name When a parameter is called by name (and its corresponding formal parameter appears in a left part list) it must either (1) be a simple or Subscripted variable or, (2) correspond identically in type with the formal parameter. Violation of this semantic rule causes failure. The character string is 'SEOT.4.7.5.2.' and the value is 0. XDF 9 (Revised 26.3.65)
original
Sheet L − 1 − OA for A.U.M 13 −32 − OA for S.R.L.M. KIDSGROVE RUN TIME CONTROL Although it is not mentioned in this manual there are two types of failure in storage capacity;− FAIL 4 IN STGRAGE CAP is the failure described in this manual and the value given is the amount of store required to get past the failure point. FAIL 2 IN STORAG# CAP is not described herein and occurs when a program is claiming buffer areas. The value given here is the address at which the program fails end is usually about one hundred words less than the store which is requested. The failure implies that there is insufficient space beyond the program data space for the 2 x 32−word buffer areas required for each Algol device opened, Remedy − increase ST by 64 words for each device yet to be opened. A.A.H. AG.
original
13 + 33−0 Appendix 4 (cont. ) (f) Array by value conversions. When an array is called by value it is copied into the precedure data space, with appropriate type conversion. The character string is 'A−B TRANSFER! and the value is 0. (g) Switch Subscript Check. A switch subscript “1' must satisfy 1Sisn, where n is the number of switch elements. If it is outside this range then failure will oscur. 'The character string is 'SW. UNDEFINED' and the value is the subscript value. (h) ↑operator. This operator is undefined for various combinations and values of arguments, For failures the character string is 'SEC.3.3.4.3.' and the value indicates the particulars leading to failure. 1 Exponent negative. zero mantissa (in x↑i) 2 Exponent zero, zero mantissa (in x↑i) 3 Exponent zere, zero mantissa (in x↑y) 4 Exponent zero, negative mantissa (in x↑y) 6 Overflow in x↑i 7 y too big in x↑y 8 y too big in i↑y (i) Result of exp. If the result of exp{x} would have been out of range, then failure will occur The character string is EXP and FAIL 1. (j) All peripheral devices have beer closed, If at the end of the program ali devices used have not Leen closed a failure will occur. The character string is GRAND CLOSE FAIL 1 and the value is the number of devices that have been left open. All these devices are then closed. No information is icst. Check Modification If the WITHOUT TEST option is not requested, then the Overflow Check (c) is converted to an entry to a routine. This routine. which prints the value being assigned in octal (so as to give the precise vaiue}, is controlled sy the welue of Y0P244 in the run time control routine. If this store is zero, no printing takes place; but if it is non−zero then its value followed by the assignment value, are output in the following format: llll ddddddddddddddd where llll is a four digit octal line number held in VO and dddddddddddddddddd is the 16−digit cetal assignment vaiue. 'he value of VO is incremented by one every time the routine 15 entered KDF 9 (Revised 26.3.65)
original
13 − 34 − 0 Appendix 4 (cont, ) ——— Control ef this routine is provided by a code procedure such as the following:- procedure ass check (i); value i; integer i; KDF9 1/0/0/0; [i] ; = V0P244; EXIT; ALGOL Thus ass check 493 ewitches the printing off. ass check (5) switches the printing on, starting the line numbering at 5. This mechansim is normally switched OFF, and must be switched ON. The output is via OUT8 to strean (30)8. Program Failures The tracing of an Object Program fault involves either the finding of ° that expression which, with the correct argument, gives the wrong answer, or, if it is am explicit failuze in the internal checking, the branch which goes the 'wrong way’. Thus all Objest Program failures should be treated as program errors and the point at which the first wrong answer appears, or the first wrong path is taken, should be investigated. The author of the program is in the best position to perform such an investigation, which will facilitate and expedite the tracing of a fault if it exists. Particular attention should be paid to code procedures (if being used) to ensure that they cbey the rules laid down and do not interfere with the stack or other mechanisns involved in the object program. Input−Output Failure Numbers, All failures are typed on the monitor typewriter and are in the form :- KALGOL AT R (last label passed) FAIL (failure number) IN (descriptive string) VALUE (informative number in octal} OCTAL The failure list gives a description of the failure in relation to failure number, descriptive string and informative number.