ciao-lang / ciao

Ciao is a modern Prolog implementation that builds up from a logic-based simple kernel designed to be portable, extensible, and modular.
https://ciao-lang.org
GNU Lesser General Public License v3.0
272 stars 21 forks source link

Some top-level goodies maybe? #54

Open Jean-Luc-Picard-2021 opened 2 years ago

Jean-Luc-Picard-2021 commented 2 years ago

In another ticket it was stated:

Note that atoms are still not quoted properly in the output. We'll fix that soon too. https://github.com/ciao-lang/ciao/issues/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 commented 2 years ago

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 commented 2 years ago

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:

Regarding these two:

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 commented 2 years ago

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

jfmc commented 6 months ago

Summary of pending tasks in issue: