[Ecls-list] About type propagation...
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Tue Aug 4 21:20:16 UTC 2009
I am finding problems with certain libraries and programs, due to the
new code for propagating types and inferring the expected types of
The problem is that there are assingments and function calls that
violate what would be the type proclamations of variables and
Take for instance, Maxima, which was calling, on one branch of code
(CAR (LOGIOR ...)), for instance, or flexi-streams, which has the
equivalent of (CODE-CHAR (IF (SOMETHING) (expression generating an
integer ...) NIL)) (I am oversimplifying a complicated expression).
Somehow Maxima works because that code branch is never executed
(nobody actually knows what it is for), but the funny thing is that in
flexi-stream there is an implicit assumption that given the invariants
of the program the invalid branch will never be executed, so that the
"practical" type of the expression is INT
So the thing is ECL reasons about the types of expresions and finds
that those are formally wrong, and right now it stops compilation.
Since that is currently unnacceptable, given the number of libraries
that depend on those, I have committed a patch that transforms the
error from the second case into a warning.
But I am not happy about it.
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
More information about the ecl-devel