AT1:- This program tests if the compiler survives oversized constant.Should not run. AT2:- This program tests if long similar names are distinguished. Should output 1.0. AT3:- This program tests if a program can be labelled. Some compilers allow this. AT4:- This program tests if the preassigned names can be used as program labels. This can cause problems hence many compilers disallow labels here. AT5:- This program tests if a program can be a statement. THis was allowed in the 63 Report but is now explicitly disallowed. Should not compile. AT6:- This program tests if double sided conditions are allowed. Strictly invalid Algol so should not compile. AT7:- This program tests assignment to name parameters. The first four calls of p are valid but the last attempts to assign to a constant. The compiler can discover this at compile time but it is very difficult. Most compilers will execute this program printing 1.0,4.0,2.0,1.0 and then fail. AT8:- This program tests if misplaced declarations are discovered. Should not run. AT9->15:- These programs test the syntax of comments exhaustively. The first two case are valid and should both compile & execute with no output. The others are all erroneous and should be faulted at compile time. AT16:- This program tests curious string parameters. It is valid and should execute without producing any output. AT17:- This program checks that identifiers can be the same as keywords. This test will fail on a reserved word implementation. AT18:- This program tests for deficiencies in dictionary handling. Itshould compile and execute without any output. Will fail on most name truncation algorithims. AT19:- This curious program which sums arrays is formally correct. Most compilers will fault it since arrays of differing dimensions are passed to the same formal parameter. Algol interpreters can often deal with this situation by deferring all checking to run time. Proper compilers can not. AT20&21:- Minor variants of AT19; Compiler quite reasonable can fault them. AT22:- This program tests that the correct activation level is maintained when when label parameters are used. Should print the numbers 1 to 10. AT23:- This program tests labels by name and by value. Should print 1 and 2. May loop if labels are not correctedly evaluated. AT24:- This program tests that arrays are passed correctly by Value. Should print 45.0. AT24A is the more difficult version with a type change as well. AT25:- This program tests all the syntactic variations of real constants. The constants are simply printed out and must be checked by inspection. AT26:- This program tests if the declarations in a procedure body are treated strictly or sensibly. Most compilers will fault this program "name redeclared". AT27:- This program tests tests that a correct activation level is maintained for formal procedures. Shoud print 2,1,2,2. Most compilers will not compile it as actual procedures with different parameters are presented to the same formal procedure. AT29 is modified to avoid this. AT28:- This program also tests actvation levels of formal procedures. Should print 4,5,4,5,6,7; AT29:- This program is a modified version of AT27. Should print 2,1,2,2; AT30:- This program is logically similar to AT28 except that Label parameters are used. Should print 4,5,4,5,6,7. AT31:- This invalid program tests that ifs may not follow then. AT32:- This program tests type checking on assignment to formal parameters passed by name. Strict interpretation of textual substitution makes all these assignments valid but the implemation problems are formidable. Many compilers with good reason treat names of the wrong type as expressions and prohibit assignments. These compilers should fail the program at run time on the final assignment. AT33:- This program tests that the compiler can cope with six procedures nested within each other. Executes with no output. AT34:- This program tests that the compiler can cope with 15 nested blocks. Should execute with no output AT35:- This program tests that the compiler can cope with 300 variables in one list. Should output 300. AT36:- This program tests that the compiler can cope with 60 one dimensional arrays declared in one staement Should output 60. AT37:- This program tests that the compiler can cope with 12 nested for loops. Should output 8190 AT38:- This program tests that the compiler can cope with 24 nested conditional expressions. Should print 24. AT39:- This program tests that the compiler can cope with a single conditional expression containing 9 ifs. Should print 2. AT40:- This program tests that the compiler can cope with switches with 300 labels. Should print 300. AT41:- This program tests that the compiler can cope with a function having 60 value parameters. Should print 60. AT42:- This program tests that the compiler can cope with an array of 12 dimensions. Should print 1.0. AT43:- This program tests that the compiler can cope with an expression with 15 levels of nesting. The form is such that care is needed to get the best code. Should output 15. AT44:- This program tests that the compiler can cope with an expression with 15 levels of nesting. The form is much more complex than the previous test. Should output 4-3/(2**14) ie 3.99981689..... AT45:- This program tests that the compiler can cope with a nested call 9 deep of a standard function. Should print 1.03811889.... AT46:- This program tests that the compiler can cope with a designational expression nested 9 deep. No output. AT47:- This program tests that the compiler can cope with a program consisting og 6 dummy statements only. Should execute with no output. AT48:- This program tests that the compiler can cope with a compound statement nested 24 deep. Should print the number 24. AT49:- This program tests that the compiler can cope with 15 variables in a Left Part list. Should print 15. AT50:- This program tests that the compiler can cope with a for list containing 60 elemnts. Should print 60. AT51:- This program tests that the compiler can cope with 60 arrays having different bounds declared in a single statement. Should print 60. AT52:- This program tests that the compiler can accept a complicated expression in all places where an expression is acceptable in Algol syntax. Should 6.8 but may be subject to rounding errors. AT53:- This program tests the integer divide operator against the definition in the Report. There should be no output unlees there are errors. However rounding errors could just cause output without the compiler being at fault. AT54:- This program tests SIGN, ENTIER & ABS aginst their formal definitions. Should be no output. AT55:- This program tests the accuracy of rational constants aginst the calculated value. Outputs a table of inequalities that need careful examination. There should be very close agreement between constants in program and constants in data. On IBM floating point there will be some discrepancies between exact and calculated values. These should be random not biased towrds greater or less. AT56-63:- This program tests exponetiation operator which is difficult to implement. There are 18 case ten valid and 8 invalid. AT56 tests all the valid ones and one of the invlid ones. The valid ones print on descrepancies the last case should fail. AT57-63 test the other 7 invalid cases. AT64:- This program tests investigates the type of a conditional expression. This was not clearly defined in the 1963 Report and some experts maintained that this test should work and output 0.0. The subsequent clarification in section 3.3.4.4 means that compilers should reject the program. AT65:- This program tests integer exponentiation. This program is erroneous by the terms of the 1963 Report but is acceptable today. Should output 2. AT66:- This program tests test the precedence of integer operators. Should output 25. AT67:- This program is similar to 65 but should not execute. AT68-70:- These programs test that jumps into for lops are not allowed. Switches are used to confuse a poor compiler. None should execute. AT71:- This program tests the calling of fromal procedures. In order to call a formal procedure the compiler must know the number and type of parameters which need not be fixed according to the Report. Should output 5. Many compilers will not accept this program. AT72:- This program tests if variable numbers of parmeters can be passed to a formal procedure. Should not compile although it is not invalid Algol. AT73:- This program tests compiler performance on recusive procedure calls. Outputs the time per call calculated from varying numbers of calls. Most compilers should manage the call return sequence in 20-30 instructions giving a time of 5-7 musecs on Amdahl V7. AT74:- This program tests if the restriction in Para 5.2.4.2 of the REport is implemented correctly. Should fail to compile. AT75:- This program tests the input output routines INREAL&OUTREAL. THe program should be run twice the output from the first run being used as input to the second. The last three numbers output being an inequality matrix. Suitable data for the first run is in subfile ercc07:algtests_data75. AT76:- This program tests use before declaration. . Procedures and declaration must go at the head of a block. What happens if a procedure uses a variable that is declared after the body. The Report implies clearly that this correct. This test checks this feature being constructed with a similarly named global variable. Should output 0; incorrect use of the Global variable would give 100. AT77&78:- These programs test the parameter passing mechaninsm. There are140 possible Formal-Actual parameter combinations of which 26 are valid and 114 invalid. At77 exercises all the valid ones and should output0. AT78 has all 114 invalid combinations and should be rejected with 114 faults at compile time. AT79:- This program was written by NAUR to test the type checking in the GEIR Algol of 1965. It contains 27 type check errors and the compiler should find most of them. AT80&81:- A strange feture of the 1963 Report was that it appeared to allow the control variable of a for loop to be a subscripted variable. The Modified Report cleary bans this. These programs were written by Knuth to show the problems with subcripted for varaibles. Any number between 4 & 23 is valid as the answer to AT81!. Modern Compilers should fault both programs. AT82:- This program tests a highly dubious feature of Algol namely that functions can be called by a procedure statement. Should print 1. Compilers can hardly be blamed for warning or faulting this program. AT83:- This program tests a further very strange fature of Algol namely that out of bound switches are to be treated as dummy statements. THe 1963 Report was very insistent on this point although the Modified Report leaves the matter as undefined. This short but higly obscure Knuth program will calculate the 20th Fibonnaci number(6765) provide out of range switches are correctly implemented as dummies. AT84:- This program is the traditional GAMM performance measure. Outputs 26 numbers of which the 13th and 26th are the square root of 2, the 8th and 21st are 1.45423... and the remainder are loop timingr. AT85:- This program tests several unusual features including a procedure with a dummy body and redundant brackets in a Boolean expression. Should output -5.5. AT86:- This program tests several more unusual features including labels in odd places; An outer begin-end block has been added to avoid problems with a labelled program tested earlier in AT3&4. AT87:- This program is by Knuth and has a very odd loop. Knuth was trying to show that the Algol step until construct is inadequately defined for real variables. Most compilers seem to cope with this program and produce 25. AT88:- This program tests for side effects of functions. Since the order of evaluation of primariies is not specified there is no correct answer for this program. Strict left to right gives 0.333333.... If A is picked up last then the result is 4.5. Other answers are not formally incorrect. AT89:- This program is Knuths General Problem Solver as given by Randall & Russell. It tests call by name and should output 1.0 AT90:- This program tests some unusual features by having conditional expressions in unlike situations. Should print 9,4 &0. AT91:- This program tests a very odd switch and uses a for variable after loop exhaustion. Should print 0. AT92:- This program tests integer procedures as parameters. Should print 42. AT93:- This program tests performance of call by substitution. It is by Knuth and called Man or Boy since it was designed thus to classify compilers. It must be one of the most obscure 12 lines of code ever written. Outputs two times separated by the sum of a series which should be -67. AT94:- This program has several expressions with severe side effect. For this reason compilers can produce answers that differ from the expected value of 232 without being provably incorrect. A popular alternative is 133. AT95:- This program tests various formal procedure calls and should produce the answer 7. AT96:- This program tests gotos to labels in different block levels including one passed to a forma; procedure. Should produce the answer 5. AT97:- This program was written by Dijkstra to test Jensen's Device on the X1 compiler. It should produce the answer 16 for the double sum. AT98:- This program tests the recursive use of name parameters and should produce the answer 23. AT99:- This program tests arrays including arrays by vale. Should produce the answer 14. AT100-120:- These 21 programs test have minor syntactic errors typical of punching mistakes. The compiler should fault them all. These tests are useful in the early stages of compiler testing. AT121:-This program tests own variables in a simple way. Should output 3,6,12,24. AT122:-This program tests own variables in a simple way. Should output 3,0&0. AT123:-This program tests own variables in a simple way. It was invalid since it used an own without assigning a value; however the 1973 changes have turned it into a valid program which shoud output 4 four times. AT124-8:- These programs test the syntax of real numbers. They should all be faulted. AT129:-This program tests underflow on a constant. THe compiler should fault this although the alternative of regarding it as zero is tolerable. AT130:-This program tests gotos out of a recursive procedure. It is not disimilar to AT22. Should print 2,3,4,5,6,7,8,9,10,11,10,9,8,7,6,5,4,3,2. AT131:-This program was written to illustrate a fault in the Whetstone Algol Compiler which allows an array name to be passed as an integer. Should not compile. AT132:-This program tests the Boolean operators extensively using Jensens device. Should print the number 7. AT133:-This program tests heavily nested array subscripts. Should print 0. AT134:-This program tests arithmetic equalities and inequalities. Should output 0. AT135:-This program tests the priority of real operators. Should output 0. AT136-7:- These programs test that unary operators occurr once only. A poor syntax analyser may miss this but both programs should be faulted. AT138:-This program tests that a procedure called as a function is faulted. AT139:-This program tests that a compiler can cope with a function where the assignment to the function identifier is not detected. A careful run tim check is needed so the program should compile but fail at run time. A compile time check that there is an assigment is not good enough for this rather obscure fault. AT140:-This program tests that a dummy actual parameter is not allowed. This is one of the few places that a dummy is not acceptable. AT141:-A function can be called from the block in whcich it is declared but the the assignment to the function identifier must be within the function ie the scope of the name is different for call and assignment. This program tests That the compiler checks this correctly by having an assigment out of scope. Should fail to compile. AT142:-It is not stated in the report that formal parameters have to be distinct. This program investigates this point. It is hard to imagine what a compiler can make of the program if it does not elect to fault this construction! AT143:-This program tests that the compiler insists the names in the value list are a subset of those in the parameter list. Should fail to compile. AT144:-This program tests every instruction in the Whetstone interpretive Algol system. It should output the numbers 30 & 8. AT145:-This program tests a variant syntax for parameter specification apparently allowed by some European compilers. The program should be faulted. AT146:-This program tests the priority of unary operators. -A*B should be evaluated as -(A*B) not as (-A)*B. THis may seem a trivial point but errors can result in quite different rounding error. Should output 0 any other output shows rounding differences have been detcted. AT147-9:- These programs were written ti illustrate errors in IBMs Algol, Whetstone Algol & Kidsgrove Algol respectively. All three programs are syntactically invalid. AT150:-This program tests the consistency of real inequalities. Should print the number 9. Errors may well be hardware deficiencies. AT151:-This program tests Boolean comparisons and assignments. The first 5 statements are valid the last two are erroneous and should be faulted. AT152:-This program tests that the standard functions are properly implemented. Compilers often call special efficient assembler routnes for the standard functions which can not cope with being called formally or recursively. This program should produce the answer 6.4. AT153:-This program tests that a large number of explicit constants can be accepted without causing problems with addressing or overflowing the constant table. Should output 0.334346535.... AT154:-This program tests that a large number of explicit strings can be accepted without causing problems with addressing or overflowing the constant table. Should output 0. AT155:-This program tests that value list can only occur once unlike type lists. The program is invalid but its meaning is clear and should print 7 if it is not faulted. AT156:-This program tests the inverse of the previous one as it has a repeated type list. Should compile and output 7. AT157:-This contrived program tests 466 of the possible 472 pair of adjacent Algol basic symbols. It is unlikely to trouble a top down compiler but may cause problems for a poor bottom up syntax analyser. Should print 300010 with some rounding error. AT158-177:- These programs were written to test a specific adhoc syntax checker. They are all very simple and each has a single syntax fault. None should compile. AT178:-This program tests that a function identifier is disallowed as the control variable in a for statement. Should not compile. Mant compilers do run this program and produce the answer 22. AT179:-This program demonstrates a further error in Kidsgrove Algol syntax analyser. The program should be faulted. AT180:-This program uses call by name to calculate the first 25 primes. AT181:-This program tests all variants of arrays by value. No output if successfull. AT182:-This program tests -- AT183:-This program tests -- AT184:-This program tests -- AT185:-This program tests -- AT186:-This program tests -- AT187:-This program tests -- AT188:-This program tests -- AT189:-This program tests -- AT190:- This program tests --