fix YAP_LeaveGoal (again)

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1972 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2007-11-01 20:50:31 +00:00
parent b5c8c9bad3
commit 6c3aee8c63
3 changed files with 15 additions and 5 deletions

View File

@ -10,8 +10,11 @@
* File: c_interface.c * * File: c_interface.c *
* comments: c_interface primitives definition * * comments: c_interface primitives definition *
* * * *
* Last rev: $Date: 2007-10-29 22:48:54 $,$Author: vsc $ * * Last rev: $Date: 2007-11-01 20:50:31 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $ * $Log: not supported by cvs2svn $
* Revision 1.101 2007/10/29 22:48:54 vsc
* small fixes
*
* Revision 1.100 2007/10/28 00:54:09 vsc * Revision 1.100 2007/10/28 00:54:09 vsc
* new version of viterbi implementation * new version of viterbi implementation
* fix all:atvars reporting bad info * fix all:atvars reporting bad info
@ -1311,13 +1314,18 @@ YAP_LeaveGoal(int backtrack, YAP_dogoalinfo *dgi)
choiceptr myB; choiceptr myB;
myB = (choiceptr)(LCL0-dgi->b); myB = (choiceptr)(LCL0-dgi->b);
if (B >= myB) { if (B > myB) {
/* someone cut us */
return FALSE; return FALSE;
} }
/* prune away choicepoints */
if (B != myB) {
#ifdef YAPOR #ifdef YAPOR
CUT_prune_to(myB); CUT_prune_to(myB);
#endif #endif
B = myB; B = myB;
}
/* if backtracking asked for, recover space and bindings */
if (backtrack) { if (backtrack) {
P = FAILCODE; P = FAILCODE;
Yap_exec_absmi(TRUE); Yap_exec_absmi(TRUE);

View File

@ -17,6 +17,8 @@
<h2>Yap-5.1.3:</h2> <h2>Yap-5.1.3:</h2>
<ul> <ul>
<li> FIXED: YAP_LeaveGoal should always backtrack, if asked for, for
deterministic computations (obs from Trevor Walker).</li>
<li> FIXED: in_this_file_before should check predicate module, not <li> FIXED: in_this_file_before should check predicate module, not
current module.</li> current module.</li>
<li> FIXED: overflow when copying constraints.</li> <li> FIXED: overflow when copying constraints.</li>

View File

@ -1,7 +1,7 @@
#/bin/bash #/bin/bash
# Guess what: this code works for me! # Guess what: this code works for me!
version="Yap-5.1.2" version="Yap-5.1.3"
splat splat
cd C cd C
splat splat