Rule is running forever in listener

5 views
Skip to first unread message

Robert Goldman

unread,
Sep 26, 2025, 12:16:35 PMSep 26
to ErgoAI and XSB Users Forum
I wrote a rule to extract information about frame method types in Ergo, as follows:

method_types(?Type, ?Mod, ?Xs) :- isground{?Type}, isground{?Mod},
?Xs = setof{ ?X | ?Type[| ?fr => ?type |]@?Mod,
                      naf (?Type[| ?fr => ?type2 |], 
                           ?type2::?type)@?Mod, 
                     ?X = type(?fr, ?type)}.

This works, sort of.

When I issue this query:

method_types(Person, main, ?Xs)@frames.

I get the results I expect, 

?Xs = [type(age,\integer), type(hasParent,Person), type(has_role,Role), type(is_an_associate_of,Person), type(name,\symbol), type(plays_position,Position), type(subordinate_to,Person)]

but the query does not terminate.  I get left with the listener input pane shaded yellow and displaying "Running..."

P.S. should I be doing something differently to put code in here?  The Google Groups message composer does not seem to offer a code block option or support Markdown.


Robert Goldman

unread,
Sep 26, 2025, 12:18:15 PMSep 26
to ErgoAI and XSB Users Forum
PPS The \one directive doesn't seem to work in the Listener window, either.

Robert Goldman

unread,
Sep 26, 2025, 12:22:17 PMSep 26
to ErgoAI and XSB Users Forum, Robert Goldman
OK, sorry -- I see.  I got myself somehow wedged in `\one` mode.  The "Running..." prompt is a little misleading in this context, though.  The user has to infer that they should use the Prolog interaction keys (RET for done, semicolon for "get another answer").

Michael Kifer

unread,
Sep 27, 2025, 3:54:56 AMSep 27
to ErgoAI-X...@coherentknowledge.com

OK, so this is resolved then. I will mention in the manual that one should type ; to get more answers.

Also will put it in the \help. command.

-- michael

--
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/e8f0ac41-df54-41b6-9640-2e9f9af45a84n%40coherentknowledge.com.
Reply all
Reply to author
Forward
0 new messages