Skip to content

fixed ite in msat with mixed int and real - #505

Open
osankur wants to merge 1 commit into
stanford-centaur:mainfrom
osankur:msat_ite_fix
Open

fixed ite in msat with mixed int and real#505
osankur wants to merge 1 commit into
stanford-centaur:mainfrom
osankur:msat_ite_fix

Conversation

@osankur

@osankur osankur commented May 13, 2026

Copy link
Copy Markdown

This commit fixes a small issue for MathSAT. This is illustrated in the newly added test tests/msat/msat-real-arithmetic.cpp.
Basically, the following calls create terms with types, respectively, integer and rational:

make_term("0.0", s->make_sort(smt::REAL));
make_term("0.1", s->make_sort(smt::REAL));

In other terms, MathSAT seems to recognize when a value simplifies to an integer and converts it to an integer.

But when two such terms are used in a ite expression with the ext_msat_make_ite function, this raises an exception since the two terms have different sorts.

To comply with MathSAT's behavior, and to allow working with real numbers that happen to be integers, this commit allows mixing real and int expressions in ITE expressions.

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