Skip to content

Commit

Permalink
Merge pull request #25 from AdrienChampion/master
Browse files Browse the repository at this point in the history
bugfix in data propagation
  • Loading branch information
AdrienChampion authored Oct 21, 2018
2 parents f65ad3c + 67b65ad commit 30199ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -805,9 +805,11 @@ impl Data {
profile! { self mark "add cstr", "pre-checks" }
profile! { self "trivial constraints" => add 1 }
// Positive, constraint is trivial.
log! { @5 "rhs positive, trivial" }
return Ok(None);
} else if args.set_subsumed(&self.neg[pred]) {
// Negative, ignore.
log! { @5 "rhs negative, discarding rhs" }
None
} else {
Some(args)
Expand All @@ -832,7 +834,7 @@ impl Data {
if args.set_subsumed(&self.pos[pred]) {
self.register_raw_sample_dep(pred, &args, &nu_rhs)?;
// Is this the last (positive) sample in a `... => false` constraint?
if nu_rhs.is_none() && lhs.is_empty() {
if nu_rhs.is_none() && lhs.is_empty() && nu_lhs.is_empty() {
// Then register as negative to record the conflict.
self.add_neg(clause, pred, args);
unsat!("by `true => false` in constraint (data, prune_cstr)")
Expand Down

0 comments on commit 30199ec

Please sign in to comment.