Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with soft-if-then-else #660

Open
infradig opened this issue Jan 22, 2025 · 1 comment
Open

Problem with soft-if-then-else #660

infradig opened this issue Jan 22, 2025 · 1 comment

Comments

@infradig
Copy link
Contributor

I don't know if you like it but here is another discrepancy: (*->/2)

$ cat ite_3.pl
main :-
     member(X,[true,\+true]),
     ( member(X,[\+true,true,\+true]) *->
         write(here1)
     ; member(X,[true,\+true,true]) *->
         write(here2)
     ),
     write({X}), fail.

$ SWI, EcLiPsE
here1{true}here1{\+true}here1{\+true}

$ tpl ite3_pl # v2.63.25
?- main.
here1{true}here2{true}here2{true}here1{\+true}here1{\+true}

Originally posted by @flexoron in #651

@infradig infradig changed the title soft-if-then-else Problem with soft-if-then-else Jan 22, 2025
@infradig
Copy link
Contributor Author

infradig commented Jan 23, 2025

Simplify slightly...

main :-
     member(X,[true,false]),
     ( member(X,[false,true,false]) *->
         write(here1)
     ; write(here2)
     ),
     write({X}), fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant