Merged
Conversation
d0aaa94 to
60e56c8
Compare
60e56c8 to
a24ce7b
Compare
44b2192 to
9b39f3d
Compare
a1f35a3 to
2aae43e
Compare
dd85e29 to
00a231d
Compare
c263c90 to
dbe8815
Compare
dbe8815 to
9eaa0f8
Compare
8d2ad1f to
a8c4314
Compare
a530560 to
2459cc9
Compare
ce6e704 to
f5b19b3
Compare
f5b19b3 to
8b9c5c2
Compare
8b9c5c2 to
aeb13df
Compare
mattulbrich
approved these changes
Sep 6, 2025
Member
mattulbrich
left a comment
There was a problem hiding this comment.
Nice.
Thanks for the comments. Appreciate that.
Made a few suggestions. Mostly on naming and documentation.
Have not actually run it, but since we plan to extend this to JML scripts, it will be tested thoroughly soon.
key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptCommandAst.java
Outdated
Show resolved
Hide resolved
key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptCommandAst.java
Outdated
Show resolved
Hide resolved
b1e0bec to
f8ac039
Compare
Member
Author
|
Removed the merge commit and rebased on |
f8ac039 to
559f4f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Synopsis
JMLScripts and KeY scripts use the same backend, but the ProofScriptEngine is currently bound to the KeY language's parser. This PR introduces a simple AST class to abstract the source of a script, which is a simple record containing the command name, positional and keyword arguments, sub-commands, and positional information.
classDiagram direction TB class ScriptCommandAst { name : String positionalArgs : List<Object> keywordArgs : Map<String,Object> loc : Location } ScriptCommandAst "*" <-- ScriptCommandAst : sub-commandsAlong the road, the interface of script commands is simplified: There is no need for preparing the parameter class instance anymore. Instead,
execute(..)is called directly, and any command implementation can deal with the AST as they like.classDiagram direction TB class ProofScriptCommand { execute(uiControl, cmdAst, engineState) getArguments() : List<ProofScriptArgument> getName() : String getAlias() : List<String> getDocumentation() }Also, proof script commands can announce a list of aliases. This allows the implementation of multiple (similar) commands with one implementation. The implementation can adapt its behavior using the given AST representation. For example, the
letcommand is also callable vialetf, the latter forces/overwrites the abbreviation.Using
List<Object>andMap<String,Object>for the representation inside of the AST allows the use within JML scripts, as custom objects can be provided within the AST. Later, theValueInjectorshould know the conversion rules to get from the custom object to the required types, e.g., how to come from aJMLTermto aJTerm.Builds upon: #3021
Intended Change
ProofScriptEngineis free of ANTLR classes.An AST for the execution of proof scripts exists, which is useable
Plan
Type of pull request
Refactoring (behaviour should not change or only minimally change)
breaks the internal API of proof script execution, and script commands.
There are changes to the (Java) code
Ensuring quality