Jan Wielemaker | 5 Oct 13:30
Favicon

Re: 5.7.X : problem with attributed variables and memberchk ?

Hi Ulrich,

On Sunday 05 October 2008 02:01:33 Ulrich Neumerkel wrote:
> The current bug is that a syntactically failing unification still
> invokes accumulated unification-hooks in stead of failing.
>
> Sometimes this works, and sometimes not.
>
> g3> /opt/gupu/pl-57x/bin/pl -f none
> Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.7.1-46-g32a4502)
> ...
> ?- put_attr(V1,user,10),(V1,4)=(0,1).
> ERROR: uhook/3: Undefined procedure: attr_unify_hook/2

Is this a bug? Nobody says it is not allowed to call the wakeup in the
middle of a unify. I think implementations are allowed to do many things
with this code, including replacing it by 'fail'. SWI-Prolog 5.7 already
does a few of these. E.g. "_ = something" is simply replaced by `true'.
I'm still considering GCC-like warnings here, such as

    'Goal has no effect'
    'Goal always fails'

That was my first intuition and I still think that is a valid
observation, but a little digging showed this should not be the case
here and the bug was diagnosed as an error due to changes of handling
the wakeup list. Only applies to 5.7.x. Fixed.

	Cheers --- Jan

_______________________________________________
SWI-Prolog mailing list
SWI-Prolog <at> iai.uni-bonn.de
https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog


Gmane