[M3devel] Open CM3 regression tests
Olaf Wagner
wagner at elegosoft.com
Sun Jan 27 15:03:27 CET 2008
Quoting Tony Hosking <hosking at cs.purdue.edu>:
> The set operations are all coded as external C functions -- should be
> easy enough to fix those. Or are there type issues too?
Sorry for the long delay. I'm afraid I don't really understand how
set operations are implemented after a quick look. I thought it was
all done in the Word modules, but these seem to be only self-referring
M3 definitions. I'm sure you can point me to the correct location for
the >= operation faster than I'll need to find it; I'll have a look at
it then.
Thanks in advance,
Olaf
>> --- p155 --- operations on small sets
>> --- p1/p155/stderr.pgm 2008-01-20 00:48:16.000000000 +0100
>> +++ ../src/p1/p155/stderr.pgm 2008-01-13 00:55:56.000000000 +0100
>> @@ -2,7 +2,6 @@
>> check set q = {}
>> check set r = {a, b}
>> check set x = {a, b, e}
>> -************************ ERROR: check (NOT (p >= x)) failed
>>
>>> This concerns the >= operation on sets. The language definition
>>> says:
>>>
>>> infix <=, >= (x,y: Ordinal) : BOOLEAN
>>> (x,y: Float) : BOOLEAN
>>> (x,y: ADDRESS) : BOOLEAN
>>> (x,y: Set) : BOOLEAN
>>>
>>> In the first three cases, <= returns TRUE if x is at most as large as
>>> y. In the last case, <= returns TRUE if every element of x is an
>>> element of y. In all cases, it is a static error if the type of x is
>>> not assignable to the type of y, or vice versa. The expression x >= y
>>> is equivalent to y <= x.
>>>
>>> So the implementation seems to be plainly wrong. I think the test
>>> for the previous operation <= only succeeds accidentally.
--
Olaf Wagner -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
More information about the M3devel
mailing list