Skip to content
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

Cleanup: Removal of key.api package #3550

Merged
merged 1 commit into from
Feb 20, 2025
Merged

Cleanup: Removal of key.api package #3550

merged 1 commit into from
Feb 20, 2025

Conversation

wadoon
Copy link
Member

@wadoon wadoon commented Feb 15, 2025

Removal of the package key.api. This package once drove the development of the proof script debugger.

The package always lags behind its potential and is definitively not in shape or functional.

The better alternative is to use the classes directly. Or wait until the REST API arrives.

@wadoon wadoon marked this pull request as ready for review February 15, 2025 00:51
@wadoon wadoon self-assigned this Feb 15, 2025
@wadoon wadoon added the 🛠 Maintenance Code quality and related things w/o functional changes label Feb 15, 2025
@wadoon wadoon added this to the v2.12.4 milestone Feb 15, 2025
@wadoon wadoon enabled auto-merge February 15, 2025 00:52
@wadoon wadoon changed the title removal of key.api package Cleanup: Removal of key.api package Feb 15, 2025
@wadoon wadoon requested a review from mattulbrich February 19, 2025 20:01
@mattulbrich
Copy link
Member

What does it mean "use the classes directly"? Is there no functionality in this package currently needed anywhere? Is this type of Java API fully superseded by the REST-API?

@wadoon
Copy link
Member Author

wadoon commented Feb 20, 2025

What does it mean "use the classes directly"? Is there no functionality in this package currently needed anywhere? Is this type of Java API fully superseded by the REST-API?

We won't have a REST-API. We are introducing a JSON-RPC. A REST-API builds upon the HTTP methods.

key.api was a wrapper for some functionalities in KeY, needed in the ProofScriptDebugger. The idea was to have a simple API. But during the development of PSDBG it arose that an API hiding the internal information is not effective for complex applications.

In the future: If you are using a JVM language (Kotlin, Clojure, ...) you should use the KeY classes directly instead of the key.api, e.g., key.api.ProofManagement vs. Proof and ProofControl. For any non-JVM language, use JSON-RPC.

The key.api has one used functionality that was missing in key.core: getting the list of all contracts. This function was moved to KeYEnvironment.

There is also the "matcher" functionality used in the PSDBG (e.g., you remember f(... ?X ...)?), but in KeY it is unused and untested. Probably it is rotted now.

Copy link
Member

@mattulbrich mattulbrich left a comment

Choose a reason for hiding this comment

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

Alright. Thanks for the clarification.

The matching part may be relevant for proof scripts one day, but we can still find it in the history

@wadoon wadoon added this pull request to the merge queue Feb 20, 2025
Merged via the queue into main with commit 0e4a43a Feb 20, 2025
7 checks passed
@wadoon wadoon deleted the weigl/cleanup/keyapi branch February 20, 2025 23:17
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