[eclipse-clp-users] Another compiler bug

From: Stephan Schiffel <stephan.schiffel_at_...69...>
Date: Mon, 23 Feb 2009 17:41:55 +0100
Hi all,

I think, I found another bug (tested with version 6.0#72).
The query p in the following program fails and prints "if" but neither "then" 
nor "else".

p :- q(a, 1).

q(A, C) :-
  equal([A], [B]),
  writeln("if"),
  (B=b, C=1 ->
    writeln("then")
  ;
    writeln("else")
  ).

equal(A, A).

The program works as expected, if the condition of the if-then-else part is 
replaced with
  (\+ (B\=b ; C\=1) ->
or 
  (\+ \+ (B=b, C=1) ->

Regards,
Stephan
Received on Mon Feb 23 2009 - 16:42:07 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 22 2024 - 18:13:20 CET