Hi,
I'm programming Eiffel for about 15 years, now and then, and I put great
hopes
in the freely available ISE Eiffel, but trying to produce some freeware, I
found out:
ISE Eiffel 5.7 on Linux (openSUSE 10.2) is severely broken, because it
generates incorrect code (Really. Incremental compilation produced code
that
gets a SIGSEGV, while a full recompilation runs fine. Built-in BIT did not
work as expected, and a replacement class (override) also became instable
when
some unrelated code in another calss had been changed).
For example, the following code does not raise any assertion violation
when
being run with full assertion checks on:
-- A space- and time-efficient representation for a set of digits; BIT_9
-- had failed before.
expanded class
DIGITS
inherit ANY
redefine
out
end
--...--
set_digit(digit : INTEGER) is
-- set `item' to `value'
require
valid_digit: digit >= 1 and digit <= 9
do
item := item | bit_value(digit)
ensure
digit_set: has_digit(digit)
end -- set_item
--...--
end -- class DIGITS
However, when being used, the caller gets this assertion violation:
solution.item(digit).set_digit(col + 1)
check
solution.item(digit).has_digit(col + 1)
end
Also, as reported a long time ago, when being incrementally compiled, the
system receives a SIGSEGV at some un-guilty code. To make things worse,
the
code above worked until some completely unrelated code of a different
class
had been changed.
As a matter of fact, this makes the compiler completely unusable and moved
me
to consider Java (which I tried to avoid). How can a language designed for
correctness produce such buggy compilers? A proof of concept: It doesn't
work,
or what?
Regards,
Ulrich


|