From b30535b520a83dee0d1698d73257fdeb0af3e3d0 Mon Sep 17 00:00:00 2001 From: vsc Date: Fri, 28 Dec 2001 16:11:09 +0000 Subject: [PATCH] fix debugger not to see the bagof inside setof. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@243 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- pl/setof.yap | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pl/setof.yap b/pl/setof.yap index dcca405bc..73618dd3d 100644 --- a/pl/setof.yap +++ b/pl/setof.yap @@ -85,7 +85,7 @@ findall(Template, Generator, Answers, SoFar) :- setof(Template, Generator, Set) :- '$check_list'(Set, setof(Template, Generator, Set)), - bagof(Template, Generator, Bag), + '$bagof'(Template, Generator, Bag), '$sort'(Bag, Set). % And this is bagof @@ -93,7 +93,11 @@ setof(Template, Generator, Set) :- % Either we have excess of variables % and we need to find the solutions for each instantion % of these variables + bagof(Template, Generator, Bag) :- + '$bagof'(Template, Generator, Bag). + +'$bagof'(Template, Generator, Bag) :- '$check_list'(Bag, bagof(Template, Generator, Bag)), '$variables_in_term'(Template, [], TemplateV), '$excess_vars'(Generator, TemplateV, [], FreeVars), @@ -106,7 +110,7 @@ bagof(Template, Generator, Bag) :- '$keysort'(Bags0, Bags), '$pick'(Bags, Key, Bag). % or we just have a list of answers -bagof(Template, Generator, Bag) :- +'$bagof'(Template, Generator, Bag) :- '$init_db_queue'(Ref), '$findall'(Template, Generator, Ref, [], Bag0), Bag0 \== [],