[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A possible bug in the call-by-name implementation of MARST
From: |
Paulo S. L. M. Barreto |
Subject: |
A possible bug in the call-by-name implementation of MARST |
Date: |
Sat, 20 Jan 2001 10:27:01 -0200 |
Greetings,
I'm puzzling at an unexpected behaviour of the (otherwise excellent) MARST
Algol 60 translator. I've typed in J.W.J. Williams's HEAPSORT algorithm as it
is originally defined (CACM algorithm 232 - please see attached file), then
wrote a test procedure for it. The test goal is to generate a random array and
sort it (in decreasing order, to use the original algorithm's settings).
However, upon compiling and running the translation result MARST reports a
fault that is quite hard to understand (in the sense that it should not occur -
I've traced the call-by-name chain as accurately as I could, as I have done
many times using Unisys Extended Algol). Here's the error message:
fault: assignment to a real formal parameter called by name not possible
because final actual parameter is not variable
procedure SWOPHEAP, file 232.a60, line 56
procedure OUTHEAP, file 232.a60, line 110
procedure HEAPSORTTEST, file 232.a60, line 147
main program, file 232.a60, line 174
Aborted
Any hints as to why this happens? Shouldn't the code run as written?
Thanks in advance for your attention, and best regards.
Paulo Barreto.
232.a60
Description: Text Data
- A possible bug in the call-by-name implementation of MARST,
Paulo S. L. M. Barreto <=