Skip to content

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.

Plan

  • rewriting history

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 2 times, most recently from 32e4e64 to 541b5dc Compare July 8, 2025 12:25
@wadoon wadoon force-pushed the weigl/smtsolversjson branch from 541b5dc to 35c6661 Compare August 15, 2025 06:07
@wadoon wadoon force-pushed the weigl/smtsolversjson branch from 35c6661 to 20bf06a Compare August 23, 2025 13:22
@wadoon wadoon marked this pull request as draft August 24, 2025 15:23
@wadoon wadoon force-pushed the weigl/smtsolversjson branch 4 times, most recently from 2b635b8 to 00acecb Compare November 23, 2025 17:25
@wadoon
Copy link
Member Author

wadoon commented Nov 23, 2025

The page in key-docs: https://keyproject.github.io/key-docs/devel/AddingSMTSolvers/
needs to be revised.

Is done. I discovered that the preamble loading is stupid (only classpath), and made some extensions for files/URLs.

@wadoon wadoon marked this pull request as ready for review November 23, 2025 18:37
@wadoon wadoon enabled auto-merge November 23, 2025 18:38
@wadoon
Copy link
Member Author

wadoon commented Nov 23, 2025

@unp1 @Drodt it is ready now.

@wadoon wadoon requested a review from Drodt November 23, 2025 18:51
@wadoon wadoon force-pushed the weigl/smtsolversjson branch 2 times, most recently from 827d7d4 to 5394c41 Compare November 24, 2025 15:43
@flo2702 flo2702 requested review from flo2702 and removed request for Drodt and unp1 December 5, 2025 13:30
@Drodt Drodt self-requested a review January 7, 2026 15:26
@WolframPfeifer WolframPfeifer modified the milestones: v2.13.0, v3.0.0 Jan 7, 2026
* loading of additional config files
* fix migration of config from string to path
* adapt solver configuration to main version
* some handlerOption fixes
@flo2702 flo2702 force-pushed the weigl/smtsolversjson branch from 5394c41 to 2c559e9 Compare January 12, 2026 17:28
@wadoon wadoon force-pushed the weigl/smtsolversjson branch from 6a8ab8d to 9910926 Compare January 13, 2026 22:08
@wadoon wadoon added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main with commit ad77331 Jan 14, 2026
35 checks passed
@wadoon wadoon deleted the weigl/smtsolversjson branch January 14, 2026 00:24
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.

5 participants