Skip to content

Commit

Permalink
Disabled flexible Farkas itps for integers
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomaqa committed Nov 23, 2024
1 parent 71b7042 commit 5173223
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/tsolvers/lasolver/LASolver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ PTRef LASolver::interpolateUsingEngine(FarkasInterpolator & interpolator) const
auto itpAlgorithm = config.getLRAInterpolationAlgorithm();
if (itpAlgorithm == itp_lra_alg_strong) { return interpolator.getFarkasInterpolant(); }
else if (itpAlgorithm == itp_lra_alg_weak) { return interpolator.getDualFarkasInterpolant(); }
else if (itpAlgorithm == itp_lra_alg_factor) { return interpolator.getFlexibleInterpolant(Real(config.getLRAStrengthFactor())); }
else if (itpAlgorithm == itp_lra_alg_factor) { assert(not logic.hasIntegers()); return interpolator.getFlexibleInterpolant(Real(config.getLRAStrengthFactor())); }
else if (itpAlgorithm == itp_lra_alg_decomposing_strong) { return interpolator.getDecomposedInterpolant(); }
else if (itpAlgorithm == itp_lra_alg_decomposing_weak) { return interpolator.getDualDecomposedInterpolant(); }
else {
Expand Down
3 changes: 3 additions & 0 deletions src/tsolvers/lasolver/LIAInterpolator.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ struct LAExplanations {
class LIAInterpolator : public FarkasInterpolator {
public:
LIAInterpolator(ArithLogic & logic, LAExplanations liaExplanations);

// not implemented for integers
PTRef getFlexibleInterpolant(Real strengthFactor) = delete;
};
} // namespace opensmt

Expand Down
7 changes: 4 additions & 3 deletions test/unit/test_LIAInterpolation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ TEST_F(LIAInterpolationTest, test_InterpolationLRASat){
PTRef dualFarkasItp = interpolator.getDualFarkasInterpolant();
std::cout << logic.pp(dualFarkasItp) << std::endl;
EXPECT_TRUE(verifyInterpolant(leq1, leq2, dualFarkasItp));
PTRef halfFarkasItp = interpolator.getFlexibleInterpolant(Number(1,2));
std::cout << logic.pp(halfFarkasItp) << std::endl;
EXPECT_TRUE(verifyInterpolant(leq1, leq2, halfFarkasItp));
// not implemented for integers
// PTRef halfFarkasItp = interpolator.getFlexibleInterpolant(Number(1,2));
// std::cout << logic.pp(halfFarkasItp) << std::endl;
// EXPECT_TRUE(verifyInterpolant(leq1, leq2, halfFarkasItp));
}

TEST_F(LIAInterpolationTest, test_DecompositionInLIA){
Expand Down

0 comments on commit 5173223

Please sign in to comment.