From 50128d8f6f912b5c7846bbd9987365cc06a06062 Mon Sep 17 00:00:00 2001 From: vsc Date: Thu, 3 Jan 2002 06:26:15 +0000 Subject: [PATCH] fix infinite terms in DB git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@259 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/dbase.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/C/dbase.c b/C/dbase.c index 4c82536c4..8fd74d25a 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -626,6 +626,8 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end, ap2 = RepAppl(d0); #ifdef RATIONAL_TREES if (ap2 < (CELL *)((CELL)CodeMax-(CELL)tbase)) { + *lr++ = ToSmall((CELL)(StoPoint)-(CELL)(tbase)); + check_trail(lr); *StoPoint++ = d0; ++pt0; continue; @@ -761,6 +763,8 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end, #ifdef RATIONAL_TREES if (RepPair(d0) < (CELL *)((CELL)CodeMax-(CELL)tbase)) { *StoPoint++ = d0; + *lr++ = ToSmall((CELL)(StoPoint)-(CELL)(tbase)); + check_trail(lr); ++pt0; continue; } @@ -861,6 +865,8 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end, Term t[4]; int sz = to_visit-to_visit_base; + printf("visiting a constraint %p\n", ptd0); + H = (CELL *)to_visit; /* store the constraint away for now */ t[0] = (CELL)ptd0;