diff options
author | Tim King <taking@google.com> | 2015-10-26 12:21:42 -0700 |
---|---|---|
committer | Tim King <taking@google.com> | 2015-10-26 12:48:53 -0700 |
commit | 0f66dd16f35eac64149919f0f4048b422345c5eb (patch) | |
tree | c37007e7e0b69ac6065f1928a29be54f648158b9 /src/theory | |
parent | 52b8d1508d91a2284c29e3fae02a22307e42a476 (diff) |
This commit fixes a bug related to a public header depending on a compiler flag. This resulted in user code seeing a different size for the SmtEngine class than what was compiled in the library. Proofs are enabled by default again. See http://cvc4.cs.nyu.edu/bugs/show_bug.cgi?id=688 for more information.
Diffstat (limited to 'src/theory')
-rw-r--r-- | src/theory/arith/constraint.cpp | 8 | ||||
-rw-r--r-- | src/theory/arith/constraint.h | 24 |
2 files changed, 17 insertions, 15 deletions
diff --git a/src/theory/arith/constraint.cpp b/src/theory/arith/constraint.cpp index f1cac9044..4acf86d43 100644 --- a/src/theory/arith/constraint.cpp +++ b/src/theory/arith/constraint.cpp @@ -615,10 +615,10 @@ bool Constraint::wellFormedFarkasProof() const { ConstraintCP antecedent = d_database->d_antecedents[p]; if(antecedent == NullConstraint) { return false; } -#ifdef CVC4_PROOF +#if IS_PROOFS_BUILD if(!PROOF_ON()){ return cr.d_farkasCoefficients == RationalVectorCPSentinel; } Assert(PROOF_ON()); - + if(cr.d_farkasCoefficients == RationalVectorCPSentinel){ return false; } if(cr.d_farkasCoefficients->size() < 2){ return false; } @@ -717,9 +717,9 @@ bool Constraint::wellFormedFarkasProof() const { (lhs.isNull() || Constant::isMember(lhs) && Constant(lhs).isZero() ) && rhs.sgn() < 0; -#else +#else /* IS_PROOFS_BUILD */ return true; -#endif +#endif /* IS_PROOFS_BUILD */ } ConstraintP Constraint::makeNegation(ArithVar v, ConstraintType t, const DeltaRational& r){ diff --git a/src/theory/arith/constraint.h b/src/theory/arith/constraint.h index 0e0b35020..877546da8 100644 --- a/src/theory/arith/constraint.h +++ b/src/theory/arith/constraint.h @@ -88,6 +88,8 @@ #include "theory/arith/constraint_forward.h" #include "theory/arith/callbacks.h" +#include "util/configuration_private.h" + #include <vector> #include <list> #include <set> @@ -299,17 +301,17 @@ struct ConstraintRule { * There is no requirement that the proof is minimal. * We do however use all of the constraints by requiring non-zero coefficients. */ -#ifdef CVC4_PROOF +#if IS_PROOFS_BUILD RationalVectorCP d_farkasCoefficients; -#endif +#endif /* IS_PROOFS_BUILD */ ConstraintRule() : d_constraint(NullConstraint) , d_proofType(NoAP) , d_antecedentEnd(AntecedentIdSentinel) { -#ifdef CVC4_PROOF +#if IS_PROOFS_BUILD d_farkasCoefficients = RationalVectorCPSentinel; -#endif +#endif /* IS_PROOFS_BUILD */ } ConstraintRule(ConstraintP con, ArithProofType pt) @@ -317,18 +319,18 @@ struct ConstraintRule { , d_proofType(pt) , d_antecedentEnd(AntecedentIdSentinel) { -#ifdef CVC4_PROOF +#if IS_PROOFS_BUILD d_farkasCoefficients = RationalVectorCPSentinel; -#endif +#endif /* IS_PROOFS_BUILD */ } ConstraintRule(ConstraintP con, ArithProofType pt, AntecedentId antecedentEnd) : d_constraint(con) , d_proofType(pt) , d_antecedentEnd(antecedentEnd) { -#ifdef CVC4_PROOF +#if IS_PROOFS_BUILD d_farkasCoefficients = RationalVectorCPSentinel; -#endif +#endif /* IS_PROOFS_BUILD */ } ConstraintRule(ConstraintP con, ArithProofType pt, AntecedentId antecedentEnd, RationalVectorCP coeffs) @@ -337,11 +339,11 @@ struct ConstraintRule { , d_antecedentEnd(antecedentEnd) { Assert(PROOF_ON() || coeffs == RationalVectorCPSentinel); -#ifdef CVC4_PROOF +#if IS_PROOFS_BUILD d_farkasCoefficients = coeffs; -#endif +#endif /* IS_PROOFS_BUILD */ } - + void print(std::ostream& out) const; void debugPrint() const; }; /* class ConstraintRule */ |