Skip to content

Commit

Permalink
improved xor performance for SAT
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Felix committed Feb 20, 2024
1 parent 0f52b83 commit f2d2efa
Show file tree
Hide file tree
Showing 2 changed files with 2,043 additions and 2,059 deletions.
5 changes: 2 additions & 3 deletions SATInterface/BoolExpr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ public override string ToString()

if (ReferenceEquals(lhsS, rhsS))
return Model.True;
//if (lhsS is BoolVar a && rhsS is BoolVar b && a.Id == -b.Id)
// return Model.False;

if (ReferenceEquals(lhsS, Model.True))
return rhsS;
Expand All @@ -132,7 +130,8 @@ public override string ToString()

lhsS = lhsS.Flatten();
rhsS = rhsS.Flatten();
return lhsS.GetModel()!.ITE(lhsS, rhsS, !rhsS);

return lhsS.GetModel()!.ITE(lhsS, rhsS, !rhsS);
}

public static BoolExpr operator !=(BoolExpr lhs, BoolExpr rhs) => !(lhs == rhs);
Expand Down
Loading

0 comments on commit f2d2efa

Please sign in to comment.