Skip to content

Don't register SMTInterpol for QF_NRA - #100

Merged
ondrik merged 1 commit into
masterfrom
fix/smtinterpol-nra
Oct 27, 2026
Merged

ondrik merged 1 commit into
masterfrom
fix/smtinterpol-nra

Conversation

@jkhav

@jkhav jkhav commented Oct 17, 2026

Copy link
Copy Markdown
Member

Bug: SMTInterpol is registered for QF_NRA, but it answers unknown to any nonlinear term, even x*y = 1 with x = 2.

  • A Classic (QF_NRA) synthesis with -a smtinterpol never finds a circuit and keeps deepening.
  • The pySMT NRA portfolio includes a solver that cannot answer.
  • With -c Classic, -a opensmt (not registered for QF_NRA) crashes with KeyError: 'opensmt'.

Fix:

  • SMTInterpol is registered for QF_LIA and QF_NIA only, and removed from the pySMT NRA portfolio list.
  • synthesis() rejects a solver that does not support the logic of the chosen representation, with ValueError: <solver> does not support <logic>. Without this check, dropping the registration alone would turn the endless search into a KeyError.
  • The solver table in docs/usage.md no longer lists SMTInterpol for Classic.

Tests: test_solver_without_nra_is_rejected_for_classic, for smtinterpol and opensmt.

  • With master's synth.py: the opensmt case fails with KeyError: 'opensmt', and the smtinterpol case is still searching when a 90 s timeout stops it.
  • With the fix: both pass, and the full suite passes locally (480 tests).

There is no issue for this; it was found while triaging the solver registrations.

@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/synth.py 75.0% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

SMTInterpol answers unknown to any nonlinear term, even x*y = 1 with
x = 2, but it was registered for QF_NRA. A Classic synthesis with
-a smtinterpol therefore never found a circuit and kept deepening, and
the pySMT NRA portfolio included a solver that cannot answer.

SMTInterpol is registered for QF_LIA and QF_NIA only, and it is no
longer in the pySMT NRA portfolio. A solver that does not support the
logic of the chosen representation is rejected up front with
"<solver> does not support <logic>"; without the check, dropping the
registration would turn the endless search into a KeyError. The same
check covers opensmt with Classic, which raised KeyError: 'opensmt'.
The solver table in docs/usage.md no longer lists SMTInterpol for
Classic.
@ondrik
ondrik force-pushed the fix/smtinterpol-nra branch from e6337f2 to 534753f Compare October 26, 2026 23:16
@ondrik
ondrik merged commit 7b678ab into master Oct 27, 2026
4 checks passed
@ondrik
ondrik deleted the fix/smtinterpol-nra branch October 27, 2026 08:49
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.

2 participants