This commit is contained in:
Mark Thom
2020-05-09 14:26:22 -06:00
4 changed files with 44 additions and 31 deletions

View File

@@ -3064,10 +3064,12 @@ is_false(var(X)) :- nonvar(X).
:- dynamic(goal_expansion/1).
user:goal_expansion(Goal0, Goal) :-
\+ goal_expansion(false),
clpz_expandable(Goal0),
clpz_expansion(Goal0, Goal).
% goal expansion is disabled for now, until #445 is resolved
%
% user:goal_expansion(Goal0, Goal) :-
% \+ goal_expansion(false),
% clpz_expandable(Goal0),
% clpz_expansion(Goal0, Goal).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@@ -10,7 +10,7 @@ shift(Ball) :-
'$nextEP'(first, E, P),
get_chunks(E, P, L),
( L == [] ->
Cont = none
Cont = cont(true)
; Cont = cont(call_continuation(L))
),
'$write_cont_and_term'(_, _, Cont, Ball),

View File

@@ -136,18 +136,14 @@ activate(Wrapper,Worker,T) :-
delim(Wrapper,Worker,Table) :-
% debug(tabling, 'ACT: ~p on ~p', [Wrapper, Table]),
reset(Worker,SourceCall,Continuation),
( Continuation == none, var(SourceCall) ->
( Continuation = none ->
( add_answer(Table,Wrapper)
-> true %debug(tabling, 'ADD: ~p', [Wrapper])
; %debug(tabling, 'DUP: ~p', [Wrapper]),
fail
)
;
( Continuation = cont(Cont) ->
true
; Continuation = none ->
Cont = true
),
Continuation = cont(Cont),
SourceCall = call_info(_,SourceTable),
TargetCall = call_info(Wrapper,Table),
Dependency = dependency(SourceCall,Cont,TargetCall),