A Boolean method in Ergo is either true or false, like a predicate is true or false. It returns no value per se.
What you probably want to do is to define a method of type YourMeth(...) => Boolean and define
?x:Boolean :- isboolean{?x}.
If you want th type of that method to be checked, you can do it by setting up type constraint checks.
For boolean methods, is there any way to state that a frame's boolean method has the value false? Earlier, Michael gave an example of a boolean method returning false (https://groups.google.com/a/coherentknowledge.com/g/ergoai-xsb-forum/c/8WogOXeURKE/m/bi0VW7RsCQAJ), but it appears to rely on negation as failure. Is there a way to explicitly state that a boolean method (property) returns false, without using NAF?
This is a question of interest, rather than being urgent... A question raised by reading the manual chapter (12) on boolean methods.
--
You received this message because you are subscribed to the Google Groups "ErgoAI and XSB Users Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ErgoAI-XSB-for...@coherentknowledge.com.
To view this discussion visit https://groups.google.com/a/coherentknowledge.com/d/msgid/ErgoAI-XSB-forum/4963cbac-f8e8-4197-a75c-6748e6f75fden%40coherentknowledge.com.
you can state
\neg John[is_tall].
or even
John[\neg is_tall].
But the method is_tall doesn't have any values (truth values or other) by itself. Rather, the statement John[is_tall] may be true, false, or undefined. So, you can use Boolean methods or methods that return actual values, like
John[is_tall -> yes].
Here is_tall does have a value AND the statement John[is_tall -> yes] might be true, false or undefined.
Or you can use
John[is_tall-> \true] (or \false) and there are thousands of
other suitable alternatives. You need to choose what suits you
best in each concrete modeling situation and commit to that
style.
-- michael