Should retract((a:-true)) retract the fact a?

Given:

?- assertz(a).

In the current version of SWI-Prolog (8.5.0) this does not retract the fact a:

?- retract((a:-true)).

But former versions, such as 8.2.4, and other Prolog’s (e.g., SICStus) do.

I am also curious about this. I see the same behaviour as @fsaenzperez in 8.4.0 as well. @jan, is this an intentional departure from ISO Prolog or a regression?

Sorry. I missed this. Had a mail hickup last week :frowning: No. This is not intentional. I would have warned with a MODIFIED in that case. I don’t see anything wrong with the ISO specs here. It is a regression after introducing the => rules.

Pushed a fix with a test. Will be backported to 8.4.1.

Thanks for (re-)reporting!

3 Likes

For those wanting to see the patch which includes test cases.

1 Like