WakeAttVar should only test if variables it is binding are in queue

ugraphs should not bind variable


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@441 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-04-13 04:39:03 +00:00
parent 13cb0c1e13
commit be3a996d1e
3 changed files with 15 additions and 13 deletions

View File

@ -170,13 +170,6 @@ WakeAttVar(CELL* pt1, CELL reg2)
CELL *myH = H;
CELL *bind_ptr;
if (!IsVarTerm(attv->Value) || !IsUnboundVar(attv->Value)) {
/* oops, our goal is on the queue to be woken */
if (!unify(attv->Value, reg2)) {
AddFailToQueue();
}
return;
}
if (IsVarTerm(reg2)) {
if (IsAttachedTerm(reg2)) {
attvar_record *susp2 = (attvar_record *)VarOfTerm(reg2);
@ -204,6 +197,13 @@ WakeAttVar(CELL* pt1, CELL reg2)
return;
}
}
if (!IsVarTerm(attv->Value) || !IsUnboundVar(attv->Value)) {
/* oops, our goal is on the queue to be woken */
if (!unify(attv->Value, reg2)) {
AddFailToQueue();
}
return;
}
bind_ptr = AddToQueue(attv);
if (IsNonVarTerm(reg2)) {
if (IsPairTerm(reg2) && RepPair(reg2) == myH)

View File

@ -244,7 +244,7 @@ p_to_s_group([Vertex|Vertices], EdgeSet, [Vertex-Neibs|G]) :-
p_to_s_group(Vertices, RestEdges, G).
p_to_s_group([V-X|Edges], V, [X|Neibs], RestEdges) :- !,
p_to_s_group([V1-X|Edges], V2, [X|Neibs], RestEdges) :- V1 == V2, !,
p_to_s_group(Edges, V, Neibs, RestEdges).
p_to_s_group(Edges, _, [], Edges).

View File

@ -386,18 +386,20 @@ print_message(Level, Mss) :-
'$dump_syntax_error_term'(I1,J1,R).
'$dump_error_token'(atom(A)) :- !,
'$format'(user_error," ~a", [A]).
'$format'(user_error,"~a", [A]).
'$dump_error_token'(number(N)) :- !,
'$format'(user_error," ~w", [N]).
'$format'(user_error,"~w", [N]).
'$dump_error_token'(var(_,S,_)) :- !,
'$format'(user_error," ~s ", [S]).
'$format'(user_error,"~s ", [S]).
'$dump_error_token'(string(S)) :- !,
'$format'(user_error," ""~s""", [S]).
'$format'(user_error,"""~s""", [S]).
'$dump_error_token'('(') :-
'$format'(user_error,"(", []).
'$dump_error_token'(')') :-
'$format'(user_error," )", []).
'$dump_error_token'(',') :-
'$format'(user_error," , ", []).
'$dump_error_token'(A) :-
'$format'(user_error," ~a", [A]).
'$format'(user_error," ~a ", [A]).