Merge branch 'master' of git.dcc.fc.up.pt:yap-6.3

This commit is contained in:
Ricardo Rocha 2012-05-22 14:47:52 +01:00
commit 5b074e894a
2 changed files with 9 additions and 7 deletions

View File

@ -3762,9 +3762,10 @@ YAP_AttsOfVar(Term t)
t = Deref(t); t = Deref(t);
if (!IsVarTerm(t)) if (!IsVarTerm(t))
return TermNil; return TermNil;
if (IsAttVar(VarOfTerm(t))) if(!IsAttVar(VarOfTerm(t)))
return TermNil; return TermNil;
attv = (attvar_record *)VarOfTerm(t); attv = RepAttVar(VarOfTerm(t));
Yap_DebugPlWrite(attv->Atts);
return attv->Atts; return attv->Atts;
} }

View File

@ -125,12 +125,13 @@ void *RtreeUdiSearch (control_t *control)
/*RTreePrint ((*control)[0].tree);*/ /*RTreePrint ((*control)[0].tree);*/
for (i = 0; i < NARGS && (*control)[i].arg != 0 ; i++) for (i = 0; i < NARGS && (*control)[i].arg != 0 ; i++) {
if (YAP_IsAttVar(YAP_A((*control)[i].arg))) YAP_Term t = YAP_A((*control)[i].arg);
if (YAP_IsAttVar(t))
{ {
fprintf(stderr,"i=%ld\n",i);
/*get the constraits rect*/ /*get the constraits rect*/
Constraints = YAP_AttsOfVar(YAP_A((*control)[i].arg)); Constraints = YAP_AttsOfVar(t);
/* Yap_DebugPlWrite(Constraints); */ /* Yap_DebugPlWrite(Constraints); */
r = RectOfTerm(YAP_ArgOfTerm(2,Constraints)); r = RectOfTerm(YAP_ArgOfTerm(2,Constraints));
@ -155,7 +156,7 @@ void *RtreeUdiSearch (control_t *control)
return Yap_ClauseListCode(c->cl); return Yap_ClauseListCode(c->cl);
} }
}
return NULL; /*YAP FALLBACK*/ return NULL; /*YAP FALLBACK*/
} }