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

Some top-level goodies maybe? #54

Open
Jean-Luc-Picard-2021 opened this issue Jul 11, 2022 · 4 comments
Open

Some top-level goodies maybe? #54

Jean-Luc-Picard-2021 opened this issue Jul 11, 2022 · 4 comments

Comments

@Jean-Luc-Picard-2021
Copy link

Jean-Luc-Picard-2021 commented Jul 11, 2022

In another ticket it was stated:

Note that atoms are still not quoted properly in the output. We'll fix that soon too.
#53

I got more ideas, like suppressing variables that did not get instantiated.
Currently I get in the Ciao WASM Playground:

?- forall(member(X,[1,4,3]), X > 0).
X=_8862 ? 
yes
?- forall(member(X,[1,4,3]), X > 1).
no

Many Prolog systems only show, like SWI-Prolog, which also
uses true/false instead yes/no, but the later doesn't matter:

?- forall(member(X,[1,4,3]), X > 0).
true.

?- forall(member(X,[1,4,3]), X > 1).
false.
@mherme
Copy link

mherme commented Jul 11, 2022

Thanks! Regarding the comments on the top level, the one in the standard distribution of Ciao Prolog also has most of those classic features of course. The issue here is that, for technical reasons, the playground currently only has a simplified top level. What we meant when we said it would be fixed soon is that we are planning on replacing that specialized top level with the full, standard one shortly, and hopefully all the classic features will come about automatically.

@jfmc
Copy link
Member

jfmc commented Jul 11, 2022

We've just updated the playground with the changes mentioned by Manuel. The toplevel reuses more code from the standard toplevel and most of the features are magically in:

  • suppressing variables that did not get instantiated

Regarding these two:

  • more compact layout, true/false vs yes/no
  • avoid '?' when there are no more choice points (automatic determinism detection)

we'll consider them. We played with more compact layouts in the past (and had some flags to enable them) and it looks nice but we must make sure that nothing breaks.

@mherme
Copy link

mherme commented Jul 11, 2022

Thanks to you for the very useful feedback, please keep it up!

@jfmc
Copy link
Member

jfmc commented May 3, 2024

Summary of pending tasks in issue:

  • implement forall/2
  • detect determinism (w.r.t. choicepoint) in toplevel queries

@jfmc jfmc reopened this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants