1 Revised and "added to" summary of Praxis tests2 The fixed or resolved test are listed at the end.# #'s preceded by "n" are new tests. To: J Duffy/C R Morgan From: J R Greenwood; Subject: Summary of Errors in Sept-81 Praxis Compilers as/ detected by the Praxis test suite.GThe following is a list of the various facilities that are incorrect orJgiving trouble in the Praxis compilers. This list derives from the Praxis@test suite. The test suite resides on the Nova VAX in directoryKDBC1:[praxistst.suite]. The routine names listed after each brief problem>description are in that directory with an extension of ".PRX".H The test suite can be run by the command file "suite.com". Individual0tests can be run easily if you do the following: $ sui" $ @symbols ! define suite symbols7 $ p p001abc ! runs test of VAX compiler on p001abc.prx; $ pe p002abc ! runs test of PDP-11 compiler on p002abc.prxEA couple of command files in the suite directory do most of the work. James R Greenwood Nova/Novette ConsultantCn1) - Arm/disarm - An ARM x_range_error followed later by a DIsarm/ causes "x_range_error" to be multiply defined. prchk001An2) - Range checking on cardinals doesn't generate the JSB or JSR to the PRX$range routine. prchk002Fn3) - Lexical computations which are valid and near the min and max of@ 16 bit integers cause a x_range_error to be raised incorrectly.: The pdp-11 compiler fails in the check. The VAX compiler" incorrectly raises the exception. prchk003/ prchk004 PDP-11 gets lexical constant to largeQn4 - Range checking on integers specified with a range on the variable definition prchk005 prchk006 prchk007Kn5 - SYntax error recovery. An integer as first character in a file causes, a syntax error and then blows the compiler. plexi001.n6 - Range checking for array bounds checking. prchk008 prchk009xxxx)The list of unresolved problems is below:M-----------------------------------------------------------------------------E0) - INfinite loops. The following tests infinite loop the compiler. x005flex f01subscr f03subscr) m01cvrul1, m01cvrul5, m01cvrra, p01cvrraD1)- Expressions as actual parameters to predefined functions: Floor, round, ceiling, etc. P001round p001floor F3a - (pdp-11 only) 32 bit constants initializing 32 bit cardinals and  integers blows 11 compiler. p01bases>4)- 36 bit size is allowed in VAX compiler. Should fail. The" 11 compiler catches it however. f03bases f04basesF6)- The range spec doesn't allow [1..1]. It gives error(18) expression required. p005range<7) - Many dimensioned arrays( 17 or more). Bombs compilers. p01subscr p02subscr ( fails ) p03subscr ( fails )E10a)- Scoping problem - Interference between an outer scope name and- an inner scope name when used with pointers. p2p2d3I11) - Scoping of names. The order of declarations of in a declare block? interacts with the block nesting scope. This causes confusingD definitions and violates that all type definitions within a declare block are simultaneous. p2p2d4 p2p2d4TF12) - Named constants in new constant declarations cannot be used with; arithmetic operators. pi = 3.124, then mpi = - pi fails.  p3d1H13 - Variant checking is not implemented. Therefore the following tests% fail by typing "error not detected". p4p3p3d5 p4p3p3d6 p4p3p3d7 p4p3p3d8M14 - Set inclusion, intersection etc operators don't work yet. ( <=, >= etc.) P4p3p4d2H14a - (pdp-11 only) Registers exhausted error. Just gives up then finds bad stack at semi-colon. p4p3p4d5C15a - Range checking not implemented on PDP-11. Hits BPT and bombs the 11 compiler. p4p6d4 p4p6d6E16 - The "arm x_nil_pointer" which should enable nil pointer checkingA ( if it was implemented) causes "incorrect object module" error.F VAX Compiler gets very sick. PDP-11 compiler seems ok but references9 the symbol: PRX$NI which I assume stands for NIL_check.r p5p4d1  p5p4d2M17a - Long_real on PDP-11s. Long_real(3.114) causes "unimplemented feature"e error. p6p2d3S p6p6p2d1rM18 - Functions returning large items generates bad code such that the routineiD bombs at run-time. One item returned is a SET so this may be a set9 implementation problem. (seems to only bomb Vax version)i p6p2d4fM19- Function type checking error. Function specified as a type, and the typeE defines the formal paramter, doesn't match the actual when supplied.b% ( vax generates error, Pdp-11 bombs)  p6p3p1d5 by REF fails p6p3p3d1 by VAL passesbI20- Vax run-time support for FREE should check for NIL pointer and raisef exception if its bad news.s" p6p5p3d3 freeing nil pointer testJ21 - Syntax errors when semi-colons used in various places in the declareD block and in the param/endparam block. I'm not sure what exactly causes this.d p6p5p4d1oI22 - Fortran routines on VAX. The word Fortran on the VAX version shouldC do nothing. Second order on the VAX the Fortran should tell it torC pass the ?N value by REF not VAL since it is easier to fake on theB VAX fortran routines.( don't need to say %val) The pdp-11 rulesE for Fortran stuff should remain the same. The passing of a routinewE in or out of Fortran routines on the 11 should be changed to requirerH it by VAL, not REF since thats how fortran actually does it. Right now& we force all parameters to be by REF.I We should dicuss the rules for general as well, to make sure we get what  we want/need.I23a - Real arithmetic. PDP-11 version gives unimplemented feature error. Then gives "x_failed_assertion" p6p6p2d3aM24- The functions floor,ceiling,round, and integer give the compiler trouble.o Bad stack at semicolon. p6p6p3d1iN25 - Long_real constants are handled. That is " x = long_real(3.9)" doesn't( define a long_real constant called "x". Blows 11 compiler up. p7p1d2LO26 - Arithmetic exception checks aren't implemented. The"arm x_zero_divide" andlH and other checking for arithmetic exceptions on Vax and 11; do nothing. p7p2p2d3 integers p7p2p2d3C cardinals p7p2p2d8 MOD with zero argtJ27 - Set operations ( + , - , = , * ) don't work and cause the compiler to* raise the "x_failed_assertion" exception. p7p2p4d3aK28 - Set operations ( <=, >, <, >= ) don't work. Gives type compatibility e problems. p7p2p5d2aH31 - Real and long_real FOR loops. When the index of a FOR loop is realB or long_real loop should start on the actual first value, and the@ tests should be against the actual final value using the actualC index value. It appears that the tests truncate the values givings= mixed results depending on the actual real numbers employed.n p8p3p9d10 reale+ p8p3p9d10L long_real ( blows 11 compiler)nP35a - (pdp-11 only) 32 bit arith operations. * and ** . This module bombs 11 compiler. p001operaI36 - Constant folding with ** operator. We don't handle constant foldingn* on things of the form " a = 0.114 ** 5 " i p001expon@37 - STARTING doesn't work. Always raises "x_failed_assertion". p001start p002start p003start p004start p005start p006start p007start p008start p009start p010start p011start38a - Size/range conflicts. n p005sized p009sizeeV40 - Multiple sized cardinal arithmetic. Blows compiler. Causes "x_failed_assertion" d p001cards p002cards# p003cards (PDP-11 only, ok on Vax)oN41 - EXPLICIT. Explicit is undefined. We never deleted it. where did it go. p001expltO43 - Operations on Packed aggregates. The following modules fail a compilcated 7 series of tests of Packed structure and packed arrays.( ( some have been fixed: see 43a below)! p006pack (Pdp-11 bad, ok on VAX)s! p008pack (pdp-11 bad, ok on Vax)! p009pack (pdp-11 bad, ok on Vax)n! p010pack (pdp-11 bad, ok on Vax)XL47 - FREE of big blocks. PRXLIB is wrong! Can't FREE a block greater than  100 bytes long on the VAX.f p007allocN51 - Flexible arrays: This feature is not totally implemented. The following features don't work. , a)- Having the lower bound only be flexible2 b)- Having both lower and upper bound be flexibleD c)- specifying a negative flexible bound. ( ie [-20..?N] and N=-10)D d)- Error reporting if flexy parameter not specified by REF is very confusing.G e)- Flexible array as last element of a strucure. THis is needed badlye7 to do a viable string package, and for other reasons.c w x001flexd x002flexg x003flexr x004flexb?51a - More Flexy problems. These are simpler tests then above.V p009flexu p010flexR p012flexh p013flex M52 - Sets and For loops. Iterating through a set with a for loop. Compiler  get bad stack a semicolon n x001setssL53 - Sets of Cardinals. Type checking error. The literals specified in theI set constructor don't appear to be forced to type cardinal from integer.rH Says type 96 doesn't match type 97. Also poor error diagnostic. Should0 say the predefined type names, not the numbers.H Also blows the compiler with "x_failed_assertion"; but this may be form7 the set operations being unimplemented for large sets.  x002sets type checkings fD54 - SEts - More problems with sets. Large ones and set operations. x003setss x004setssL55 - Interlocks in pointer structures. The ADD_to_queue example from Jan's D manual fails. Most other interlock aspects pass fairly good tests.D x004locks (pdp-11 only -> "inconsistent stack address assignments)" x006locks x007locksL55a - RAISE FINISHING - A raise finishing of an interlock doesn't always getK handled correctly. The VAX version generates bad code, the Pdp-11 version,< generates the error "inconsistent stack address assignment"( p001fini fails VAX, 11 is incon.. stack. p002fini passes Vax, 11 is inconsistent stack- p003fini fails vax, 11 is inconsistent stackx58 - HIDDEN - many problemsp/ x001hidn Can't specify hidden on variable specl( x002hidn Can't specify hidden on a type x003hidnk x004hidnt3 x005hidn Import into nested module- blows compilerp1 x006hidn Funny nested module - fails at run-timei2 x007hidn Funny nested module - what should it do?E60 - FOR loop indice is assignable. One can write the for loop indexe@ when within the for loop. This is suppose to be illegal. AlsoC one can pass it to an out formal parameter. Both these operations1# are illegal and should be caught. nC r8p3p9d16 these tests should be "P" tests. I'll change them later.e r8p3p9d19 r8p3p9d2d r8p3p9d3sJ61 - REAL - The PDP-11 code generation messes up the handling of registersC on various floating point operations. It seems to confuse regularp7 registers with floating point accumulators(registers).01 Praxmath macro assemble catches the bad code gen p001when  p6p2d1  p6p2d6 p6p6p2d3p p6p6p2d4 p6p6p2d5 p6p6p2d6 p6p6p2d7cJ62 - M01cvrul1,P01cvrra etc - Infinite loop the 11 compiler. Uses 32 bit cardinals in p01cvvra. F63 - Exports within procedures/functions give a poor error diagnostic. fexport01J64 - Constant constaructoirs exported and then imported and used to define8 another constant do not get the initialization correct. mexpagg01 pexpagg01M*****************************************************************************i@The following are FAIL routines which give the compiler trouble.I2- f4p1d3 - fails to detect a structure field referencing itself, due to+ the name being defined in an outer scope.vU4 - f7p2p4d1 - Overlapping sets. Should compiler detect the use of overlapping sets?TL5 - f001size - Fails to detect specification of a 37 bit and 36 bit integer.M6 - f001const - Constant literals should be checked at compile-time to insure ? that they fit in the size object. Especially for the defaultp> size things like integers etc. Placing large literals into/ a 16 bit integer on the pdp-11 is not caught. N7 - f001init - Initializing an array with a constructure which has the indices8 wrong for the underlying type is not caught. That isA for an array[1..272] we use a constructure with [1..545]:$a andoF the compiler doesn't choke. I don't know what code is generated for! the copy into the actual array.lJ8 - f005optnl - the initially clause type on an optional parameter spec isB not type checked with the formal. THus one can say as a formal:' x : optional boolean initially 3.114a) with no error. Who knows what it does.fL----------------------------------------------------------------------------L----------------------------------------------------------------------------Resolved tests:hK---------------------------------------------------------------------------o0) - ** FIXED **A INfinite loops. The following tests infinite loop the compiler.T p6p6p2d9e f001names ( interesting) f002namesL2) - ** NOT allowed in implementation ** ( needs to give error in m02seper) e Modules= Grouping definitions by importing and then exporting. failsp p01seper m01seper m02seperu 3)- ** Improved error message ** x2 Trailing semicolon after endmodule - Syntax error p01semicn p02semicn!5)- ** Needs to be done at BBN **eF The ".." notation is not allowed anymore in the FOR loop. That is) FOR K in 5..6 do gives an error message.-- A range type howevere is ok in the above.q P001range8) - ** fixed **A Lexical mistake. Real constants must have decimal point followl< by a digit. Not true in implementation- 1234. is legal. p1p5d4sR9) - ** language misunderstanding ** Test changed to reflect language definitionK Is a subrange of characters compatible with the character data type?s? Subranges of integers are compatible with integers; so why not"> subranges of characters? Also same argument for subranges of@ enumerations. Test becomes relevant when attempting to assign? a quoted string to a packed array of a subrange of characters.p P1p7d7n210)- ** TRue,false,nil,unlocked ARE reserved. ***I Are true, false, unlocked, nil reserved words. As implemented yes!m@ Is this what we want. I believe so. If so change the tests to fail ones.t p2p2d2 --> changed to F2p2d2=15 - ** Test changed to be appropriate aspect ** Passes nown> Are different sets of compatible base types compatible?/ Compiler implements NO. Is this what we want?. P4p5d9e717 - ** Fixed ** Intervening Forward messed things up.pE Dynamic ( on the stack) declarations are lost by intervening routine98 declarations. That is scope and extent get messed up.  p6p1d4s520A- ** pointer tests** Not part of language design.iF These tests would be vaild if Praxis was design to thoroughly protectE the user from using pointers wrong. However, for efficiency reasonsdC the design is such that the user is responsible for pointer usage.p, p6p5p3d4 freeing uninitialized pointer test, p6p5p3d5 pointer aliasing test( not caught)A29 - ** assignment evaluation is always left to right. period! **cI Evaluation order. When pointers are involved, the left side of an nA asignment gets evaluated before the right side? Is this what weoG want? What about when volatile is used? With volatile stuff this ISgF relevant. Also when EXPLICIT is used what do we have? We don't haveC an EXPLICIT for the whole asignment statement, so I feel the rule iG be definite. For non-pointer operations it appears that the right sideg& of the assignment is evaluated first. p8p2p2d2rB30 - ** Language design ** Probably should be changed but too bad.F Tests were changed to see if Default construct does the job. It does.L Select/case statement. When a select statement does not contain a constantE of the selected value, we just ignore it and go merily on. I think bG this should raise an exception. It is too easy to forget one elementaG in specifiying the case elements. If we don't raise an exception, we F are leaving a very error prone construct in the language. If the guyE does one this effect he can get it by specifying an empty Default: .  p8p3p5d5. p8p3p5d6 732 - ** Language design ** evaluation is left to right.tD Order of evaluation of limits in a FOR statement. What is Praxis'sA definition here? Should it always be that the first expressioni@ is done first? I think so, since the language purposely allowsC aliasing. What happens if the expressions have volatile variables in them. . p8p3p9d15:33- ** Language implementation restriction ** On purpose!C FOR loop nesting. THe FOR loops can't nest deeper than 15 levels.-F Why not? Should we leave this? Perhaps if we also get 15 levels on the PDP-11.6 p8p3p9d20 test changed to check up to 15 levels only.I34 - ** Can't do much here without screwing up code gen in most cases **TE Extremal FOR loops. When the indices either integer or cardinal runoD up to either the smallest or largest numbers the for loops INFINITEG loop. I don't know of a simple fix for this. We certainly don't wantpF to glop up the code gen in general. We should test this in Fortran!* How does Fortran handle the same problem? p8p3p9d7i/ p8p3p9d7D ( x_failed_assertion on 11 compiler)* p8p3p9d7E0 p7p3p9d7C ( x_failed_assertion on 11 compiler )G38 - ** works - ** 1 bit boolean not allowed. Other 1 bit things ok.e! tests changed to reflect design.PI Size specification on individual variables. Saying " a : 1 bit logical"dF or " b : 1 bit boolean" doesn't work for single variables. They workB within structures, but not alone. These used to work before you  completely upgraded packing.e p003size 1 bit in variables p004size 1 bit in type =39 - ** not part of language design *** (fell thru the crack)iE Size on enumerations. WE had decided to allow size on enumerations.m? Apparantly thats not implemented. Shall we leave it that way? ! p010size test deleted from suitegL42 - ** Packed structure is not same as structure of packed fields as far asF type checking is concerned. In many cases however the actual storage allocation is the same.J PACKED. A PACKED structure should be the same as a structure of Packed A components. Or should it? Both manuals talk about PACKED in atH very confused manner. We need to sit down a rigidly define the packingH rules, since you now believe them to be correct. ( I hope! ). With theH PDP-10 compiler forcing a redo of Packed, the rules have changed. Lets1 get the manuals up-to-date to reflect the rules.a2 p001pack test changed to reflect language design.943 - ** some fixed ones below ** mostly initially problem-K Operations on Packed aggregates. The following modules fail a compilcatedl7 series of tests of Packed structure and packed arrays.r p002packt p003pack p004packr p005pack p007packt=---- Allocates *** Various things fixed ------------------p----0---- Compile-time allocates not yet implemented.D---- Thus allocates on static and allocates on constants don't work.E---- Also allocates on fields of structures etc don't work since theye,---- are effectively compile-time allocates.----044 - ALLOCATE - nested allocates in constructors! Gives Error(99): compiler error.e o p002alloc compile-time allocateM45 - ALLOCATE Static and compile-time allocates don't work. Cause compilereC errors and breakpoint traps. Gives out error(99): compiler error.i4 p003alloc constant & static - compile-time allocate46 - ** fixed **0 ALLOCATE block initialization done incorrectly. p006allocL48 - Allocates on initiallys of fields of a type. The allocate specified onE a type initially causes bad code generation, and subsequent crash ofe the program.e p008alloc compile-time allocate748a - Allocate on type initially. compile-time allocater+ p009alloc blows both Vax and 11 compilers.t049 - ** language by design doesn't allow this **K Allocate of flex array doesn't allow initialization using the flex length.gD This I guess is a language implementation restriction. Ok for now.) p007flex Test changed. to reflect designpE50 - ** test corrected to not try initilization of allocated flexy **eK Pointers to flex arrays as parameters with an allocate inside the routine.n Compiler botches this somehow. p008flexd056 - ** assignments always done left to right **# Bad test- test deleted from suite. H Volatile - The right side of an assignment should be evaluated first if- the expression contains a voltile component.* x001volatP57 - ** Variadic - Now has a new syntax. The LRM and Tutorial are incorrect. **B New form is: " x : variadic type_def" and the number of args/ specified is gotten by the function "High(x)".p* p001vari Shows new form. Works correctly p002vari new form , okd-59 - ** READONLY can appear only on a type **c change test.t generates a syntax error.c x001reado test changed.L---------------------------------------------------------------------------- failing routinesL----------------------------------------------------------------------------+1- ** fixed - compiler now catches this ** w; F1p5d5 - lexical problem with " a=1 234" or "b = 0 .1234"d# Compiler gets an acess violation.r"3 - ** subranges are compatible **H f4p5d2 - Are subranges of the same enumeration, compatible types? ThisC tests says that they are. Others elsewhere showed that they were S not.