This list is closed, nobody may subscribe to it.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(23) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(3) |
Feb
(12) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
(3) |
Oct
(2) |
Nov
(1) |
Dec
(8) |
2008 |
Jan
(7) |
Feb
(5) |
Mar
(32) |
Apr
(15) |
May
(7) |
Jun
(6) |
Jul
(27) |
Aug
(14) |
Sep
(18) |
Oct
(7) |
Nov
|
Dec
(49) |
2009 |
Jan
(37) |
Feb
(20) |
Mar
(14) |
Apr
(22) |
May
(29) |
Jun
(20) |
Jul
(37) |
Aug
(6) |
Sep
(2) |
Oct
|
Nov
|
Dec
(10) |
2010 |
Jan
(5) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2021 |
Jan
(2) |
Feb
(6) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2024 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael v. A. <mi...@de...> - 2001-11-22 11:32:22
|
re...@in... writes: > > In general, Oberon 1 compiler that accepts ASSERT supersets the > > language. I offer to add in each test that contains ASSERT the > > following text just after const/var/type declarations: > > > > PROCEDURE ASSERT(condition:BOOLEAN); > > BEGIN > > IF ~condition THEN > > HALT(99); > > END; > > END ASSERT; > > > > The only trouble of this solution is that it does not accepts > > different error codes. But it is better than to expect implementation > > of ASSERT in Oberon 1 compiler. Furthermore, this procedure allows to > > count its calls in global variable and to show this number after test > > finish thus allowing to check if all ASSERTs were reached or not. > > This is of course a possible solution. If it would be up to me, > I would rather spend my time adding new tests to the test-suite. > Anyway such a change shall be submitted to the mailing-list, to see > if anybody has objections or comments to your proposal. Error codes are used extensively in some tests. Also, for some compilers ASSERT and HALT differ in the output shown to the user. For example, with oo2c ASSERT also dumps the code and a stack backtrace to stderr, while HALT only sets the program's exit code. -- mva |
From: <re...@in...> - 2001-11-22 11:25:59
|
Dear Fyodor, > I did not find a way to get the CVS archived copy. > Could you send me archive containing current files of the project? > I can then repeat testing and submit an official report. I can do. What kind of archive do you prefer? Can I send you a zip file containing the whole testsuite? It will be around 60KB. > In general, Oberon 1 compiler that accepts ASSERT supersets the > language. I offer to add in each test that contains ASSERT the > following text just after const/var/type declarations: > > PROCEDURE ASSERT(condition:BOOLEAN); > BEGIN > IF ~condition THEN > HALT(99); > END; > END ASSERT; > > The only trouble of this solution is that it does not accepts > different error codes. But it is better than to expect implementation > of ASSERT in Oberon 1 compiler. Furthermore, this procedure allows to > count its calls in global variable and to show this number after test > finish thus allowing to check if all ASSERTs were reached or not. This is of course a possible solution. If it would be up to me, I would rather spend my time adding new tests to the test-suite. Anyway such a change shall be submitted to the mailing-list, to see if anybody has objections or comments to your proposal. > How should author of a test for Hostess mention himself in test text? I usually put my name or initials in a comment after the module name. > Can creation date be mentioned? Sure! > Why test aim is not reflected in test text? The test aim is usually part of the test schedule testcases.xml, which describes the test, conformancy, and expected results. -Patrik -- Patrik Reali, re...@in... http://www.inf.ethz.ch/personal/reali/ http://www.oberon.ethz.ch/jaos/ http://www.oberon.ethz.ch/native/ |
From: <re...@in...> - 2001-11-21 13:19:19
|
Dear Fyodor, > Bugs found by the test suite the day before were killed. So now my > compiler passes all tests for O1 that do not contain FOR. Good. I'm glad the test suite was useful for you. > The general impression of test suite interface. I think it was not a > good idea to output nothing in the case of success. I even don't know > if the test reached its end or not. Furthermore even if I sure that > procedure Test was completed successfully I cannot be sure that any of > other procedure was called. I know. The problem are the libraries. I guess we could assume that something like Out.String must exists. I remember we didn't agree on Out.Open.... One consideration I had, is that the suite should also be useful when building a new compiler, by testing the single features one at the time. And importing is a very complex one which usually get implemented quite late. > I think it would be better to output something on start and end of each > procedure. Also it may be better to output intermediative results > explicitly than to use ASSERT. For example > ASSERT(i=5) > change into > Out.Int(i,16) > and then compare output generated by the program with the standard one. The test-suite is defined in a way that it is possible to specify a file containing the expected results. We just didn't use this feature very often. > Do you use any regular technics for creating tests? I can speak only for myself here: 1. when building the compiler I tried to test the single language features and the various code patterns (e.g. adding two constants using local variables, parameters, globals, constants), but there are still a features that are not tested yet. 2. when debugging I first write a test case for the erroneous feature to be sure the problem gets corrected. I've read about some techniques (G. Myers' book on testing is really enlightning), but the test suite is more a set of tests developed ad-hoc while building the compiler. > I have invented a way of creation of test suite on regular basis. Two > men (or groups) _independently_ (that is the most important word) > develop compilers of the language. Then each create test set that > executes every statement and expression in their compiler and yields > every possible error message of the compiler. After that they exchange > their tests and discuss differences. What do you think about this > method? This is similar to what we are trying to do with the test suite: we would like the oberon compilers developers to contribute the tests they wrote for their compilers to the suite, so that we get a good test diversity and coverage. From the experience with hostess (this suite): your strategy will probably point out all the spots in the language that are not clearly defined and where the groups made different assumptions. -Patrik -- Patrik Reali, re...@in... http://www.inf.ethz.ch/personal/reali/ http://www.oberon.ethz.ch/jaos/ http://www.oberon.ethz.ch/native/ |
From: <re...@in...> - 2001-11-21 10:51:57
|
Hi! I'm preparing a page which summarizes the known problems in the Oberon Language (seen with the compiler builder eye) http://www.inf.ethz.ch/personal/reali/hostess/problems.html If everybody agrees on it, I'll publish it on the hostess website. -Patrik -- Patrik Reali, re...@in... http://www.inf.ethz.ch/personal/reali/ http://www.oberon.ethz.ch/jaos/ http://www.oberon.ethz.ch/native/ |
From: Michael v. A. <mi...@de...> - 2001-11-20 17:39:31
|
re...@in... writes: > mf...@ma... writes: > > > 2. There are two ways of interpretation of constant expression. The > > first says that each literal have its own type assigned by its value. > > But according to this way expression 2000000000-2000000000 has type > > LONGINT (32 bit) but not SHORTINT as 0. Using this way one can define > > LONG and SHORT for constant expressions. The second interpretation is > > that the whole constant expression has type according to its value. > > And for this case it is impossible to change type of a constant > > expression, so LONG and SHORT cannot change expression's type and thus > > I did not implemented them for constants. I implemented the same logic in OOC, using the same arguments. Because an integer constant's type is always a function of its value, and SHORT and LONG are identity operations, they do not change the integer constant's type and are effectively noops. They are still supported, though, to allow expressions like "SHORT(LEN(a^))" for both open array and fixed array types of "a^" even if the compiler does constant folding during parsing. > > 3. Oberon language report. 6.2. "The number of elements of an array is > > called its length. The elements of the array are designated by indices, > > which are integers between 0 and the length minus 1." > > Let's apply this clause to lengths 0 and -1. > > For 0: The elements of the array are designated by indices, which are > > integers between 0 and -1. > > For -1: The elements of the array are designated by indices, which are > > integers between 0 and -2. > > These statements appear to be identical because second boundary for > > indices is less than the first. > > This is also not clearly specified (IMHO). It is impossible to access > the elements of the array (doing it causes an exception); some compilers > deduce that the type must also be illegal, but the report is not > explicit about this. An old favorite of mine ;-) If I can do "NEW(array,0)" (an expression which can be useful, but seems to be used more often in the Java camp), then declaring an array "TYPE A=ARRAY 0 OF CHAR" should not be illegal. I'm not in favour of negative array length, though, and would prefer to have an invariant "LEN(a)>=0" for all array variables `a'. -- mva |
From: <re...@in...> - 2001-11-20 16:28:44
|
Dear Fyodor, > I tested my Oberon compiler using this test suite yesterday. Now it > does not support ASSERT, so I did not run 29 tests that use it. But I > received rather interesting results. > A. Faults of my compiler This is what the test-suite is for! :-) I'm glad it helped you. > B. Inexactitudes of the test suite > 1. In tests HOTArray0, HOTCase0 and HOTConst2 statement FOR is used so > they are not suitable for Oberon 1, but if change them into WHILE they > will be suitable for Oberon 1. Fixed, FOR changed to WITH > 2. HOTRecErr1,HOTRecErr2,HOTRecErr3,HOTRecErr6,HOTRecErr7,HOTRecErr8 > do not check recursive type declaration, my compiler shows "Name is > not defined" error instead of recursive declaration error. Which is correct. The exact error message depends on the compiler, but in the Oberon-1 semantics, the declared type is not part of the declaration scope and thus not defined. Active Oberon compilers define the definition scope to be the same as the block (the "whole scope"), and thus must perform a recursive type check. I'm changing the comment to "invalid type declaration", which is more appropriate. > 3. HOTBuiltinASH2,HOTBuiltinCAP3 contain several errors which is not > suitable for a compiler that shows only one error. These errors are > repeated in HOTBuiltinASHErr? and HOTBuiltinCAPError? so HOTBuiltinASH2 > and HOTBuiltinCAP3 are not necessary. I removed HOTBuiltinASH2 and HOTBuiltinCAP3 from the suite. > 4. Files HOTSpecialExport1.A.Mod,HOTSpecialExport1.B.Mod > HOTSpecialExport2.A.Mod,HOTSpecialExport2.B.Mod have names that do not > match either test suite specification or my compiler convention that > module name and its file name must be the same. These are different versions of the same module, to test the symbol file generation. They are informal tests and can thus be skipped. > 5. HOTSpecialCast0 and HOTSysBuiltIn0 are not tests for O1,O2 or AO, > they are tests for ETH implementation of Oberon. These are also informal tests. Maybe we should keep the informal tests in a different test schedule (compiler version dependent?) > C. And there are several cases which are vexed questions. > 1. My compiler do not compile HOTBug1 and shows error "Function > procedure must contain RETURN" in the end of the empty function. I added a return statement to the function. The language report does not specify if this is a compile or a run-time error. > 2. HOTConst1 contains LONG(127), but my compiler does not work with > LONG and SHORT with constant arguments. > 3. HOTArray1 contains ARRAY 0 OF. For my compiler this is an error > "Array length must be positive". These are well known problems. I'm going to document it on the website. The language report doesn't specify this (LONG is just one case of constant folding, whose handling is greatly varying from compiler to compiler). > My comments on vexed questions. > > 1. In the case of functions logic of my compiler is the following. > Function must contain at least one RETURN compile-time. And at runtime > when program flow reaches the end of a function without using RETURN > the program is halted. > > 2. There are two ways of interpretation of constant expression. The > first says that each literal have its own type assigned by its value. > But according to this way expression 2000000000-2000000000 has type > LONGINT (32 bit) but not SHORTINT as 0. Using this way one can define > LONG and SHORT for constant expressions. The second interpretation is > that the whole constant expression has type according to its value. > And for this case it is impossible to change type of a constant > expression, so LONG and SHORT cannot change expression's type and thus > I did not implemented them for constants. > Although for REAL and LONGREAL constants LONG and SHORT can be used > because REAL literals have type independently of their values. This is a trouble spot in the language specification. Strictly following it, an expression like 64*1024 should throw an overflow exception, as the result should be an INTEGER (64 is SHORTINT, 1024 is INTEGER, result is the type that includes both operands). To my knowledge no compiler does this (not even Wirth's one). > 3. Oberon language report. 6.2. "The number of elements of an array is > called its length. The elements of the array are designated by indices, > which are integers between 0 and the length minus 1." > Let's apply this clause to lengths 0 and -1. > For 0: The elements of the array are designated by indices, which are > integers between 0 and -1. > For -1: The elements of the array are designated by indices, which are > integers between 0 and -2. > These statements appear to be identical because second boundary for > indices is less than the first. This is also not clearly specified (IMHO). It is impossible to access the elements of the array (doing it causes an exception); some compilers deduce that the type must also be illegal, but the report is not explicit about this. > Within the next few days I'll implement ASSERT especially for this > suite and inform you about the final results. > > Test HOTWITH1 was very useful. Thank you very much. -Patrik -- Patrik Reali, re...@in... http://www.inf.ethz.ch/personal/reali/ http://www.oberon.ethz.ch/jaos/ http://www.oberon.ethz.ch/native/ |
From: Patrik R. <pat...@us...> - 2001-11-20 16:22:45
|
Update of /cvsroot/hostess/hostess/oberon In directory usw-pr-cvs1:/tmp/cvs-serv5437 Modified Files: testcases.xml Log Message: Comments for HOTRecErr? improved Index: testcases.xml =================================================================== RCS file: /cvsroot/hostess/hostess/oberon/testcases.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** testcases.xml 2001/06/26 15:48:55 1.2 --- testcases.xml 2001/11/20 16:22:42 1.3 *************** *** 217,249 **** <test id="recerr1" type="reject" file= "HOTRecErr1.Mod"> ! recursive type declaration </test> <test id="recerr2" type="reject" file= "HOTRecErr2.Mod"> ! recursive type declaration </test> <test id="recerr3" type="reject" file= "HOTRecErr3.Mod"> ! recursive type declaration </test> <test id="recerr4" type="reject" file= "HOTRecErr4.Mod"> ! recursive type declaration </test> <test id="recerr5" type="reject" file= "HOTRecErr5.Mod"> ! recursive type declaration </test> <test id="recerr6" type="reject" file= "HOTRecErr6.Mod"> ! recursive type declaration </test> <test id="recerr7" type="reject" file= "HOTRecErr7.Mod"> ! recursive type declaration </test> <test id="recerr8" type="reject" file= "HOTRecErr8.Mod"> ! recursive type declaration </test> --- 217,249 ---- <test id="recerr1" type="reject" file= "HOTRecErr1.Mod"> ! invalid type declaration </test> <test id="recerr2" type="reject" file= "HOTRecErr2.Mod"> ! invalid type declaration </test> <test id="recerr3" type="reject" file= "HOTRecErr3.Mod"> ! invalid type declaration </test> <test id="recerr4" type="reject" file= "HOTRecErr4.Mod"> ! invalid type declaration </test> <test id="recerr5" type="reject" file= "HOTRecErr5.Mod"> ! invalid type declaration </test> <test id="recerr6" type="reject" file= "HOTRecErr6.Mod"> ! invalid type declaration </test> <test id="recerr7" type="reject" file= "HOTRecErr7.Mod"> ! invalid type declaration </test> <test id="recerr8" type="reject" file= "HOTRecErr8.Mod"> ! invalid type declaration </test> |
From: Patrik R. <pat...@us...> - 2001-11-20 16:07:54
|
Update of /cvsroot/hostess/hostess/oberon In directory usw-pr-cvs1:/tmp/cvs-serv320 Modified Files: HOTBug1.Mod Log Message: return added to the function Index: HOTBug1.Mod =================================================================== RCS file: /cvsroot/hostess/hostess/oberon/HOTBug1.Mod,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** HOTBug1.Mod 2001/04/06 22:10:36 1.2 --- HOTBug1.Mod 2001/11/20 16:07:51 1.3 *************** *** 2,6 **** PROCEDURE F(): INTEGER; ! BEGIN END F; --- 2,6 ---- PROCEDURE F(): INTEGER; ! BEGIN RETURN 0 END F; |
From: Patrik R. <pat...@us...> - 2001-11-20 15:59:23
|
Update of /cvsroot/hostess/hostess/oberon In directory usw-pr-cvs1:/tmp/cvs-serv29902 Removed Files: HOTBuiltinCAP3.Mod Log Message: removed; never used and tests are already included in HOTBuiltinCAPError?.Mod --- HOTBuiltinCAP3.Mod DELETED --- |
From: Patrik R. <pat...@us...> - 2001-11-20 15:58:30
|
Update of /cvsroot/hostess/hostess/oberon In directory usw-pr-cvs1:/tmp/cvs-serv29362 Removed Files: HOTBuiltinASH2.Mod Log Message: removed; never used and tests are already included in HOTBuiltinASHErr?.Mod --- HOTBuiltinASH2.Mod DELETED --- |
From: Patrik R. <pat...@us...> - 2001-11-20 15:44:26
|
Update of /cvsroot/hostess/hostess/oberon In directory usw-pr-cvs1:/tmp/cvs-serv24530 Modified Files: HOTCase0.Mod HOTConst2.Mod Log Message: use WITH insead of FOR (which is an Oberon-2 feature) Index: HOTCase0.Mod =================================================================== RCS file: /cvsroot/hostess/hostess/oberon/HOTCase0.Mod,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** HOTCase0.Mod 2001/04/06 22:10:36 1.2 --- HOTCase0.Mod 2001/11/20 15:44:23 1.3 *************** *** 5,9 **** VAR i, val: LONGINT; BEGIN ! FOR i := 0 TO 10 DO CASE i OF | 0: val := 10 --- 5,10 ---- VAR i, val: LONGINT; BEGIN ! i := 0; ! WHILE i <= 10 DO CASE i OF | 0: val := 10 *************** *** 18,24 **** ASSERT((ODD(i) & (val = i)) OR (~ODD(i) & (val = (10-i)))); ! END - END Test0; --- 19,24 ---- ASSERT((ODD(i) & (val = i)) OR (~ODD(i) & (val = (10-i)))); ! INC(i) END END Test0; Index: HOTConst2.Mod =================================================================== RCS file: /cvsroot/hostess/hostess/oberon/HOTConst2.Mod,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** HOTConst2.Mod 2001/04/09 08:19:27 1.1 --- HOTConst2.Mod 2001/11/20 15:44:23 1.2 *************** *** 7,13 **** BEGIN (* these three notations are equivalent: *) ! FOR len:=0 TO LEN(int)-1 DO END; ! FOR len:=0 TO SHORT(LEN(int)-1) DO END; ! FOR len:=0 TO SHORT(LEN(int))-1 DO END END Test; --- 7,13 ---- BEGIN (* these three notations are equivalent: *) ! len:=0; WHILE len < LEN(int) DO INC(len) END; ! len:=0; WHILE len <= SHORT(LEN(int)-1) DO INC(len) END; ! len:=0; WHILE len <= SHORT(LEN(int))-1 DO INC(len) END END Test; |
From: Patrik R. <pat...@us...> - 2001-11-20 15:38:35
|
Update of /cvsroot/hostess/hostess/oberon In directory usw-pr-cvs1:/tmp/cvs-serv22653 Modified Files: HOTArray0.Mod Log Message: use WHILE instead of FOR (which is an Oberon-2 feature) Index: HOTArray0.Mod =================================================================== RCS file: /cvsroot/hostess/hostess/oberon/HOTArray0.Mod,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** HOTArray0.Mod 2001/04/06 22:10:36 1.2 --- HOTArray0.Mod 2001/11/20 15:38:32 1.3 *************** *** 1,61 **** ! MODULE HOTArray0; (** prk **) TYPE ! LI = ARRAY 32 OF LONGINT; ! I = ARRAY 32 OF INTEGER; ! SI = ARRAY 32 OF SHORTINT; VAR ! gALI: ARRAY 32 OF LONGINT; ! gAI: ARRAY 32 OF INTEGER; ! gASI: ARRAY 32 OF SHORTINT; ! gLI: LI; gI: I; gSI: SI; ! PROCEDURE CheckGALI*; (* Check Global Anonymous array (LONGINT) *) VAR i: LONGINT; BEGIN ! FOR i := 0 TO 31 DO gALI[i] := 10*i; ASSERT(gALI[i] = 10*i) END; END CheckGALI; ! PROCEDURE CheckGAI*; (* Check Global Anonymous array (INTEGER) *) VAR i: INTEGER; BEGIN ! FOR i := 0 TO 31 DO gAI[i] := 5*i; ASSERT(gAI[i] = 5*i) END; END CheckGAI; ! PROCEDURE CheckGASI*; (* Check Global Anonymous array (SHORTINT) *) VAR i: SHORTINT; BEGIN ! FOR i := 0 TO 31 DO gASI[i] := i; ASSERT(gASI[i] = i) END; END CheckGASI; PROCEDURE TestGA*; ! BEGIN CheckGALI; CheckGAI; CheckGASI END TestGA; ! PROCEDURE CheckLALI*; (* Check Local Anonymous array (LONGINT) *) ! VAR i: LONGINT; lALI: ARRAY 32 OF LONGINT; BEGIN ! FOR i := 0 TO 31 DO lALI[i] := 9*i; ASSERT(lALI[i] = 9*i) END; END CheckLALI; ! PROCEDURE CheckLAI*; (* Check Local Anonymous array (INTEGER) *) ! VAR i: INTEGER; lAI: ARRAY 32 OF INTEGER; BEGIN ! FOR i := 0 TO 31 DO lAI[i] := 4*i; ASSERT(lAI[i] = 4*i) END; END CheckLAI; ! PROCEDURE CheckLASI*; (* Check Local Anonymous array (SHORTINT) *) ! VAR i: SHORTINT; lASI: ARRAY 32 OF SHORTINT; BEGIN ! FOR i := 0 TO 31 DO lASI[i] := 2*i; ASSERT(lASI[i] = 2*i) END; END CheckLASI; PROCEDURE TestLA*; ! BEGIN CheckLALI; CheckLAI; CheckLASI END TestLA; --- 1,67 ---- ! MODULE HOTArray0; (** prk **) TYPE ! LI = ARRAY 32 OF LONGINT; ! I = ARRAY 32 OF INTEGER; ! SI = ARRAY 32 OF SHORTINT; VAR ! gALI: ARRAY 32 OF LONGINT; ! gAI: ARRAY 32 OF INTEGER; ! gASI: ARRAY 32 OF SHORTINT; ! gLI: LI; gI: I; gSI: SI; ! PROCEDURE CheckGALI*; (* Check Global Anonymous array (LONGINT) *) VAR i: LONGINT; BEGIN ! i := 0; ! WHILE i < 32 DO gALI[i] := 10*i; ASSERT(gALI[i] = 10*i); INC(i) END; END CheckGALI; ! PROCEDURE CheckGAI*; (* Check Global Anonymous array (INTEGER) *) VAR i: INTEGER; BEGIN ! i := 0; ! WHILE i < 32 DO gAI[i] := 5*i; ASSERT(gAI[i] = 5*i); INC(i) END; END CheckGAI; ! PROCEDURE CheckGASI*; (* Check Global Anonymous array (SHORTINT) *) VAR i: SHORTINT; BEGIN ! i := 0; ! WHILE i < 32 DO gASI[i] := i; ASSERT(gASI[i] = i); INC(i) END; END CheckGASI; PROCEDURE TestGA*; ! BEGIN CheckGALI; CheckGAI; CheckGASI END TestGA; ! PROCEDURE CheckLALI*; (* Check Local Anonymous array (LONGINT) *) ! VAR i: LONGINT; lALI: ARRAY 32 OF LONGINT; BEGIN ! i := 0; ! WHILE i < 32 DO lALI[i] := 9*i; ASSERT(lALI[i] = 9*i); INC(i) END; END CheckLALI; ! PROCEDURE CheckLAI*; (* Check Local Anonymous array (INTEGER) *) ! VAR i: INTEGER; lAI: ARRAY 32 OF INTEGER; BEGIN ! i := 0; ! WHILE i < 32 DO lAI[i] := 4*i; ASSERT(lAI[i] = 4*i); INC(i) END; END CheckLAI; ! PROCEDURE CheckLASI*; (* Check Local Anonymous array (SHORTINT) *) ! VAR i: SHORTINT; lASI: ARRAY 32 OF SHORTINT; BEGIN ! i := 0; ! WHILE i < 32 DO lASI[i] := 2*i; ASSERT(lASI[i] = 2*i); INC(i) END; END CheckLASI; PROCEDURE TestLA*; ! BEGIN CheckLALI; CheckLAI; CheckLASI END TestLA; *************** *** 64,145 **** PROCEDURE TestGLI*; VAR i: LONGINT; ! PROCEDURE CompareGLI(a: LI); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gLI[i] = a[i]) END ! END CompareGLI; ! ! PROCEDURE CompareGLIV(VAR a: LI); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gLI[i] = a[i]) END ! END CompareGLIV; ! ! PROCEDURE CompareGOLI(a: ARRAY OF LONGINT); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gLI[i] = a[i]) END ! END CompareGOLI; ! ! PROCEDURE CompareGOLIV(VAR a: ARRAY OF LONGINT); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gLI[i] = a[i]) END ! END CompareGOLIV; BEGIN ! FOR i := 0 TO 31 DO gLI[i] := 8*i; ASSERT(gLI[i] = 8*i) END; ! CompareGLI(gLI); CompareGLIV(gLI); CompareGOLI(gLI); CompareGOLIV(gLI); END TestGLI; PROCEDURE TestGI*; VAR i: INTEGER; ! PROCEDURE CompareGI(a: I); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gI[i] = a[i]) END ! END CompareGI; ! ! PROCEDURE CompareGIV(VAR a: I); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gI[i] = a[i]) END ! END CompareGIV; ! ! PROCEDURE CompareGOI(a: ARRAY OF INTEGER); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gI[i] = a[i]) END ! END CompareGOI; ! ! PROCEDURE CompareGOIV(VAR a: ARRAY OF INTEGER); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gI[i] = a[i]) END ! END CompareGOIV; BEGIN ! FOR i := 0 TO 31 DO gI[i] := 3*i; ASSERT(gI[i] = 3*i) END; ! CompareGI(gI); CompareGIV(gI); CompareGOI(gI); CompareGOIV(gI) END TestGI; PROCEDURE TestGSI*; VAR i: SHORTINT; ! PROCEDURE CompareGSI(a: SI); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gSI[i] = a[i]) END ! END CompareGSI; ! ! PROCEDURE CompareGSIV(VAR a: SI); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gSI[i] = a[i]) END ! END CompareGSIV; ! ! PROCEDURE CompareGOSI(a: ARRAY OF SHORTINT); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gSI[i] = a[i]) END ! END CompareGOSI; ! ! PROCEDURE CompareGOSIV(VAR a: ARRAY OF SHORTINT); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(gSI[i] = a[i]) END ! END CompareGOSIV; BEGIN ! FOR i := 0 TO 31 DO gSI[i] := 3*i; ASSERT(gSI[i] = 3*i) END; ! CompareGSI(gSI); CompareGSIV(gSI); CompareGOSI(gSI); CompareGOSIV(gSI) END TestGSI; PROCEDURE TestG*; ! BEGIN TestGLI; TestGI; TestGSI END TestG; --- 70,151 ---- PROCEDURE TestGLI*; VAR i: LONGINT; ! PROCEDURE CompareGLI(a: LI); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gLI[i] = a[i]); INC(i) END ! END CompareGLI; ! ! PROCEDURE CompareGLIV(VAR a: LI); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gLI[i] = a[i]); INC(i) END ! END CompareGLIV; ! ! PROCEDURE CompareGOLI(a: ARRAY OF LONGINT); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gLI[i] = a[i]); INC(i) END ! END CompareGOLI; ! ! PROCEDURE CompareGOLIV(VAR a: ARRAY OF LONGINT); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gLI[i] = a[i]); INC(i) END ! END CompareGOLIV; BEGIN ! i := 0; WHILE i < 32 DO gLI[i] := 8*i; ASSERT(gLI[i] = 8*i); INC(i) END; ! CompareGLI(gLI); CompareGLIV(gLI); CompareGOLI(gLI); CompareGOLIV(gLI); END TestGLI; PROCEDURE TestGI*; VAR i: INTEGER; ! PROCEDURE CompareGI(a: I); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gI[i] = a[i]); INC(i) END ! END CompareGI; ! ! PROCEDURE CompareGIV(VAR a: I); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gI[i] = a[i]); INC(i) END ! END CompareGIV; ! ! PROCEDURE CompareGOI(a: ARRAY OF INTEGER); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gI[i] = a[i]); INC(i) END ! END CompareGOI; ! ! PROCEDURE CompareGOIV(VAR a: ARRAY OF INTEGER); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gI[i] = a[i]); INC(i) END ! END CompareGOIV; BEGIN ! i := 0; WHILE i < 32 DO gI[i] := 3*i; ASSERT(gI[i] = 3*i); INC(i) END; ! CompareGI(gI); CompareGIV(gI); CompareGOI(gI); CompareGOIV(gI) END TestGI; PROCEDURE TestGSI*; VAR i: SHORTINT; ! PROCEDURE CompareGSI(a: SI); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gSI[i] = a[i]); INC(i) END ! END CompareGSI; ! ! PROCEDURE CompareGSIV(VAR a: SI); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gSI[i] = a[i]); INC(i) END ! END CompareGSIV; ! ! PROCEDURE CompareGOSI(a: ARRAY OF SHORTINT); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gSI[i] = a[i]); INC(i) END ! END CompareGOSI; ! ! PROCEDURE CompareGOSIV(VAR a: ARRAY OF SHORTINT); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(gSI[i] = a[i]); INC(i) END ! END CompareGOSIV; BEGIN ! i := 0; WHILE i < 32 DO gSI[i] := 3*i; ASSERT(gSI[i] = 3*i); INC(i) END; ! CompareGSI(gSI); CompareGSIV(gSI); CompareGOSI(gSI); CompareGOSIV(gSI) END TestGSI; PROCEDURE TestG*; ! BEGIN TestGLI; TestGI; TestGSI END TestG; *************** *** 147,228 **** PROCEDURE TestLLI*; VAR i: LONGINT; lLI: LI; ! PROCEDURE CompareLLI(a: LI); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lLI[i] = a[i]) END ! END CompareLLI; ! ! PROCEDURE CompareLLIV(VAR a: LI); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lLI[i] = a[i]) END ! END CompareLLIV; ! ! PROCEDURE CompareLOLI(a: ARRAY OF LONGINT); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lLI[i] = a[i]) END ! END CompareLOLI; ! ! PROCEDURE CompareLOLIV(VAR a: ARRAY OF LONGINT); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lLI[i] = a[i]) END ! END CompareLOLIV; BEGIN ! FOR i := 0 TO 31 DO lLI[i] := 7*i; ASSERT(lLI[i] = 7*i) END; ! CompareLLI(lLI); CompareLLIV(lLI); CompareLOLI(lLI); CompareLOLIV(lLI) END TestLLI; PROCEDURE TestLI*; VAR i: INTEGER; lI: I; ! PROCEDURE CompareLI(a: I); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lI[i] = a[i]) END ! END CompareLI; ! ! PROCEDURE CompareLIV(VAR a: I); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lI[i] = a[i]) END ! END CompareLIV; ! ! PROCEDURE CompareLOI(a: ARRAY OF INTEGER); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lI[i] = a[i]) END ! END CompareLOI; ! ! PROCEDURE CompareLOIV(VAR a: ARRAY OF INTEGER); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lI[i] = a[i]) END ! END CompareLOIV; BEGIN ! FOR i := 0 TO 31 DO lI[i] := 2*i; ASSERT(lI[i] = 2*i) END; ! CompareLI(lI); CompareLIV(lI); CompareLOI(lI); CompareLOIV(lI) END TestLI; PROCEDURE TestLSI*; VAR i: SHORTINT; lSI: SI; ! PROCEDURE CompareLSI(a: SI); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lSI[i] = a[i]) END ! END CompareLSI; ! ! PROCEDURE CompareLSIV(VAR a: SI); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lSI[i] = a[i]) END ! END CompareLSIV; ! ! PROCEDURE CompareLOSI(a: ARRAY OF SHORTINT); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lSI[i] = a[i]) END ! END CompareLOSI; ! ! PROCEDURE CompareLOSIV(VAR a: ARRAY OF SHORTINT); ! VAR i: LONGINT; ! BEGIN FOR i := 0 TO 31 DO ASSERT(lSI[i] = a[i]) END ! END CompareLOSIV; BEGIN ! FOR i := 0 TO 31 DO lSI[i] := 4*i; ASSERT(lSI[i] = 4*i) END; ! CompareLSI(lSI); CompareLSIV(lSI); CompareLOSI(lSI); CompareLOSIV(lSI) END TestLSI; PROCEDURE TestL*; ! BEGIN TestLLI; TestLI; TestLSI END TestL; --- 153,234 ---- PROCEDURE TestLLI*; VAR i: LONGINT; lLI: LI; ! PROCEDURE CompareLLI(a: LI); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lLI[i] = a[i]); INC(i) END ! END CompareLLI; ! ! PROCEDURE CompareLLIV(VAR a: LI); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lLI[i] = a[i]); INC(i) END ! END CompareLLIV; ! ! PROCEDURE CompareLOLI(a: ARRAY OF LONGINT); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lLI[i] = a[i]); INC(i) END ! END CompareLOLI; ! ! PROCEDURE CompareLOLIV(VAR a: ARRAY OF LONGINT); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lLI[i] = a[i]); INC(i) END ! END CompareLOLIV; BEGIN ! i := 0; WHILE i < 32 DO lLI[i] := 7*i; ASSERT(lLI[i] = 7*i); INC(i) END; ! CompareLLI(lLI); CompareLLIV(lLI); CompareLOLI(lLI); CompareLOLIV(lLI) END TestLLI; PROCEDURE TestLI*; VAR i: INTEGER; lI: I; ! PROCEDURE CompareLI(a: I); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lI[i] = a[i]); INC(i) END ! END CompareLI; ! ! PROCEDURE CompareLIV(VAR a: I); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lI[i] = a[i]); INC(i) END ! END CompareLIV; ! ! PROCEDURE CompareLOI(a: ARRAY OF INTEGER); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lI[i] = a[i]); INC(i) END ! END CompareLOI; ! ! PROCEDURE CompareLOIV(VAR a: ARRAY OF INTEGER); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lI[i] = a[i]); INC(i) END ! END CompareLOIV; BEGIN ! i := 0; WHILE i < 32 DO lI[i] := 2*i; ASSERT(lI[i] = 2*i); INC(i) END; ! CompareLI(lI); CompareLIV(lI); CompareLOI(lI); CompareLOIV(lI) END TestLI; PROCEDURE TestLSI*; VAR i: SHORTINT; lSI: SI; ! PROCEDURE CompareLSI(a: SI); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lSI[i] = a[i]); INC(i) END ! END CompareLSI; ! ! PROCEDURE CompareLSIV(VAR a: SI); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lSI[i] = a[i]); INC(i) END ! END CompareLSIV; ! ! PROCEDURE CompareLOSI(a: ARRAY OF SHORTINT); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lSI[i] = a[i]); INC(i) END ! END CompareLOSI; ! ! PROCEDURE CompareLOSIV(VAR a: ARRAY OF SHORTINT); ! VAR i: LONGINT; ! BEGIN i := 0; WHILE i < 32 DO ASSERT(lSI[i] = a[i]); INC(i) END ! END CompareLOSIV; BEGIN ! i := 0; WHILE i < 32 DO lSI[i] := 4*i; ASSERT(lSI[i] = 4*i); INC(i) END; ! CompareLSI(lSI); CompareLSIV(lSI); CompareLOSI(lSI); CompareLOSIV(lSI) END TestLSI; PROCEDURE TestL*; ! BEGIN TestLLI; TestLI; TestLSI END TestL; *************** *** 232,236 **** PROCEDURE Test*; BEGIN ! TestGA; TestLA; TestG; TestL END Test; --- 238,242 ---- PROCEDURE Test*; BEGIN ! TestGA; TestLA; TestG; TestL END Test; |