Skip to content

KeY/JSON config for SMT solvers #3597

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

KeY/JSON config for SMT solvers #3597

wants to merge 8 commits into from

Conversation

wadoon
Copy link
Member

@wadoon wadoon commented Apr 14, 2025

Intended Change

The SMT solvers are defined in unstructured untyped properties files. In the meantime, we have updated our KeY config to a JSON-like format, we should also update our SMT solvers definition files.

This comes with this PR.

Type of pull request

  • Refactoring (behaviour should not change or only minimally change)

Ensuring quality

  • CI

@wadoon wadoon added the 🛠 Maintenance Code quality and related things w/o functional changes label Apr 14, 2025
@wadoon wadoon added this to the v2.12.4 milestone Apr 14, 2025
@wadoon wadoon requested a review from WolframPfeifer April 14, 2025 12:39
@wadoon wadoon self-assigned this Apr 14, 2025
@wadoon wadoon force-pushed the weigl/smtsolversjson branch from fc40dda to b718f0b Compare April 14, 2025 12:41
@wadoon wadoon changed the title KeY config for SMT solvers KeY/JSON config for SMT solvers Apr 14, 2025
@wadoon wadoon mentioned this pull request Apr 14, 2025
4 tasks
@wadoon
Copy link
Member Author

wadoon commented May 9, 2025

KaKeY: Go ahead.

@mattulbrich
Copy link
Member

Agreed at meeting: Good idea, but let's have individual json files (to allow for additions)

@wadoon wadoon force-pushed the weigl/smtsolversjson branch 3 times, most recently from f829b84 to 5f223dd Compare June 8, 2025 13:57
@wadoon wadoon force-pushed the weigl/smtsolversjson branch from 43ffe19 to 90c3865 Compare June 14, 2025 02:05
@wadoon
Copy link
Member Author

wadoon commented Jun 14, 2025

Agreed at meeting: Good idea, but let's have individual json files (to allow for additions)

After re-considering this: This suggestion makes no sense. The addition of new SMT solvers is independent of single/multiple solvers in a config file. Also, as Java has no built-in discovery of resources in a classpath destination, this is unimplementable without great effort or external libraries.

The current implementation uses an index file. The user needs to create the folder ROOT/de/uka/ilkd/key/smt/solvertypes/ with the solvers.txt and the properties file of the SMT solver. Then, KeY needs to be loaded with java -cp key-exe.jar:ROOT/ <main>.

The new resolution of SMT solvers is described in the javadoc, and allows addition and overriding SMT solver configs using files in $HOME/.key/smt-solvers.json and <cwd>/smt-solvers.json.

@wadoon wadoon requested review from unp1 and removed request for WolframPfeifer June 14, 2025 03:35
@wadoon wadoon marked this pull request as ready for review June 14, 2025 03:35
@wadoon
Copy link
Member Author

wadoon commented Jun 14, 2025

Two errors should remain:

  1. spotlessApply does not fix the formatting locally.
  2. EOFException b/c Stream is closed when sending (get-unsat-core) to Z3.

@wadoon wadoon force-pushed the weigl/smtsolversjson branch from f49372b to 32e4e64 Compare July 2, 2025 19:00
@wadoon wadoon force-pushed the weigl/smtsolversjson branch from 32e4e64 to 541b5dc Compare July 8, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠 Maintenance Code quality and related things w/o functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants