Skip to content

Fix double bounds in MinMax causing unsatisfiable constraints and false SAFE results#35

Open
shawshank-202 wants to merge 1 commit intovaibhavbsharma:svcompfrom
shawshank-202:additionalSupport01
Open

Fix double bounds in MinMax causing unsatisfiable constraints and false SAFE results#35
shawshank-202 wants to merge 1 commit intovaibhavbsharma:svcompfrom
shawshank-202:additionalSupport01

Conversation

@shawshank-202
Copy link
Copy Markdown

@shawshank-202 shawshank-202 commented Mar 29, 2026

Fixes #34
This PR corrects the bounds for symbolic double variables in MinMax, which resulted in an invalid range and unsound constraint generation.


Problem

Symbolic double bounds were defined as:

    symbolic.min_double = Double.MIN_VALUE
    symbolic.max_double = Double.MAX_VALUE

However, Double.MIN_VALUE is the smallest positive value (~4.9e-324), not the most negative value.
This excludes all negative values from the domain.


float-nonlinear-calculation/Optimization2, JPF generates constraints like:

    (assert (>= double0 (/ 1.0 0.0)))
    (assert (<= double0 0.0))

This leads to:

    double0 ≥ +∞ && double0 ≤ 0  → UNSAT

All explored path conditions become unsatisfiable:

    ### PCs: total:3 sat:0 unsat:3
    ***********Warning: everything false

Result Before Fix

SAFE

No paths are explored, leading to an incorrect SAFE verdict.


Results can be verified against
float-nonlinear-calculation/Optimization2
float-nonlinear-calculation/Optimization5
float-nonlinear-calculation/Optimization6
float-nonlinear-calculation/coral81
float-nonlinear-calculation/coral84

@shawshank-202
Copy link
Copy Markdown
Author

Hey @sohah @vaibhavbsharma can you have a look at this and kindly give your feedback, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant