Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions maraboupy/test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ def test_solve_round_and_clip_unsat():
assert(exitCode == "unsat")


def test_unsolvable_elimination():
""" Test that unsatisfiable variables are not eliminated """
ipq = MarabouCore.InputQuery()
ipq.setNumberOfVariables(1)

ipq.setLowerBound(0, 1.0)
ipq.setUpperBound(0, -1.0)

exitCode, variables, stats = MarabouCore.solve(ipq, OPT)
print(variables)
assert(exitCode == "unsat")


def test_solve_round_and_clip_sat():
"""
-1 <= x0 <= 0
Expand Down
5 changes: 5 additions & 0 deletions src/engine/Preprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,11 @@ void Preprocessor::collectFixedValues()
{
_fixedVariables[i] = getLowerBound( i );
}
else if ( getLowerBound( i ) > getUpperBound( i ) )
{
// Insatifisfiable variable, don't eliminate
continue;
}
else if ( !usedVariables.exists( i ) )
{
// If possible, choose a value that matches the debugging
Expand Down
Loading