1
0
Fork 0

Merge pull request #331 from naderman/fix-rule-parent-path

Correct the parent path in the watch tree, after moving a rule out of the path
pull/333/merge
Jordi Boggiano 2012-02-19 10:22:15 -08:00
commit 716d9dc80a
1 changed files with 4 additions and 2 deletions

View File

@ -1266,7 +1266,7 @@ class Solver
}
if ($prevRule) {
if ($prevRule->watch1 === $literal->getId()) {
if ($prevRule->next1 == $rule) {
$prevRule->next1 = $nextRule;
} else {
$prevRule->next2 = $nextRule;
@ -1276,6 +1276,8 @@ class Solver
}
$this->watches[$ruleLiteral->getId()] = $rule;
$rule = $prevRule;
continue 2;
}
}
@ -1506,7 +1508,7 @@ class Solver
}
$why = count($this->learnedPool) - 1;
assert($learnedLiterals[0] !== null);
$newRule = new Rule($learnedLiterals, self::RULE_LEARNED, $why);
return array($ruleLevel, $newRule, $why);