-
I have just discovered Ciao and was trying a few things in the online playground. I was wondering about the rationale behind the Ciao top-level's use of no to express the failure/termination of a query. Specifically, why isn't the atom false used for this, which could then potentially be unified and used by other rules for further inference? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Answering yes/no to queries is actually the traditional response in Prolog and is done that way in many other Prolog systems (e.g., SICStus, XSB, eclipse, etc.). If people are interested and see a real advantage in having the system answer true/false instead it is easy enough to add this possibility. |
Beta Was this translation helpful? Give feedback.
-
Btw, note that Prolog does not 'return' yes or no (or true or false) like a function would. Rather, predicates succeed or fail. E.g., if you call |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
Answering yes/no to queries is actually the traditional response in Prolog and is done that way in many other Prolog systems (e.g., SICStus, XSB, eclipse, etc.). If people are interested and see a real advantage in having the system answer true/false instead it is easy enough to add this possibility.