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
This commit is contained in:
parent
b9af9bc08c
commit
b30535b520
@ -85,7 +85,7 @@ findall(Template, Generator, Answers, SoFar) :-
|
|||||||
|
|
||||||
setof(Template, Generator, Set) :-
|
setof(Template, Generator, Set) :-
|
||||||
'$check_list'(Set, setof(Template, Generator, Set)),
|
'$check_list'(Set, setof(Template, Generator, Set)),
|
||||||
bagof(Template, Generator, Bag),
|
'$bagof'(Template, Generator, Bag),
|
||||||
'$sort'(Bag, Set).
|
'$sort'(Bag, Set).
|
||||||
|
|
||||||
% And this is bagof
|
% And this is bagof
|
||||||
@ -93,7 +93,11 @@ setof(Template, Generator, Set) :-
|
|||||||
% Either we have excess of variables
|
% Either we have excess of variables
|
||||||
% and we need to find the solutions for each instantion
|
% and we need to find the solutions for each instantion
|
||||||
% of these variables
|
% of these variables
|
||||||
|
|
||||||
bagof(Template, Generator, Bag) :-
|
bagof(Template, Generator, Bag) :-
|
||||||
|
'$bagof'(Template, Generator, Bag).
|
||||||
|
|
||||||
|
'$bagof'(Template, Generator, Bag) :-
|
||||||
'$check_list'(Bag, bagof(Template, Generator, Bag)),
|
'$check_list'(Bag, bagof(Template, Generator, Bag)),
|
||||||
'$variables_in_term'(Template, [], TemplateV),
|
'$variables_in_term'(Template, [], TemplateV),
|
||||||
'$excess_vars'(Generator, TemplateV, [], FreeVars),
|
'$excess_vars'(Generator, TemplateV, [], FreeVars),
|
||||||
@ -106,7 +110,7 @@ bagof(Template, Generator, Bag) :-
|
|||||||
'$keysort'(Bags0, Bags),
|
'$keysort'(Bags0, Bags),
|
||||||
'$pick'(Bags, Key, Bag).
|
'$pick'(Bags, Key, Bag).
|
||||||
% or we just have a list of answers
|
% or we just have a list of answers
|
||||||
bagof(Template, Generator, Bag) :-
|
'$bagof'(Template, Generator, Bag) :-
|
||||||
'$init_db_queue'(Ref),
|
'$init_db_queue'(Ref),
|
||||||
'$findall'(Template, Generator, Ref, [], Bag0),
|
'$findall'(Template, Generator, Ref, [], Bag0),
|
||||||
Bag0 \== [],
|
Bag0 \== [],
|
||||||
|
Reference in New Issue
Block a user