Rangarajan Krishnamoorthy
unread,Nov 19, 2018, 5:46:01 AM11/19/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ErgoAI, Flora-2, and XSB Users Forum
Hi,
I am trying to understand the "clause{}" construct.
Here is my code:
X [| value -> 10 |].
Y [| value -> 100 |].
\udf valueOf(?a^^X) := ?result \if ?result \is ?a.value + 1.
\udf valueOf(?a^^Y) := ?result \if ?result \is ?a.value + 2.
The query:
clause{@!{?id[type -> udf]} ?h, ?b}. // (1)
returns both UDF objects as expected.
But the query:
clause{@!{?id[type -> udf]} (valueOf(?a) := ?), ?}. // (2)
returns just the first UDF, while
clause{@!{?id[type -> udf]} (valueOf(?a^^X) := ?), ?}. // - (3)
returns none (fails with 'No').
Can you explain the difference in behavior?
Regards,
Rangarajan