Skip to content

SMTChecker: Fix usage of Eldarica with SMT callback #14906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

blishko
Copy link
Contributor

@blishko blishko commented Mar 5, 2024

Previously, CHC engine with SMT interface would always call Eldarica if
it was present in the system, regardless whether user specified
model-checker-solver as smtlib2 or eld.
Here we make sure Eldarica is called only when it is specified as the
solver of choice.

The proposed solution is to make SMTSolverCommand modifiable and set it
up properly based on the user settings. This requires changes also in
UniversalCallback, because in the compiler we must be able to check if
the given callback is UniversalCallback provided by CommandLineInterface.

This mechanism can be used to migrate also other solvers to the SMTLIB
interface by further extending/adapting SMTSolverCommand.
Its advantage is that meaning of the callback stays the same, thus there
is not need to change anything on the side of solc-js.

@blishko blishko changed the title SMTChecker: Only run callback for Eldarica in CHC engine SMTChecker: Test Eldarica in command-line tests Mar 5, 2024
@blishko blishko force-pushed the smt-eldarica branch 2 times, most recently from 692c306 to 65c6658 Compare March 7, 2024 22:50
@blishko blishko marked this pull request as ready for review March 7, 2024 23:11
@blishko blishko changed the title SMTChecker: Test Eldarica in command-line tests SMTChecker: Fix usage of Eldarica with SMT callback Mar 7, 2024
@blishko blishko requested a review from ekpyron March 7, 2024 23:49
Copy link
Member

@ekpyron ekpyron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a changelog entry?
This will slightly change the behaviour if eldarica is installed, maybe that's worth a small note in the changelog.

Previously, CHC engine with SMT interface would always call Eldarica if
it was present in the system, regardless whether user specified
model-checker-solver as smtlib2 or eld.
Here we make sure Eldarica is called only when it is specified as the
solver of choice.

The proposed solution is to make SMTSolverCommand modifiable and set it
up properly based on the user settings. This requires changes also in
UniversalCallback, because in the compiler we must be able to check if
the given callback is UniversalCallback provided by CommandLineInterface.

This mechanism can be used to migrate also other solvers to the SMTLIB
interface by further extending/adapting SMTSolverCommand.
Its advantage is that meaning of the callback stays the same, thus there
is not need to change anything on the side of solc-js.
@blishko
Copy link
Contributor Author

blishko commented Mar 11, 2024

Changelog entry added.

@blishko blishko merged commit 759089b into develop Mar 11, 2024
@blishko blishko deleted the smt-eldarica branch March 11, 2024 14:01
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.

3 participants