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.
Along 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.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.
Using
List<Object>
andMap<String,Object>
allows the use within JML scripts, as custom objects can be provided within the AST. Later, theValueInjector
should know the conversion rules to get fromthe custom object to the required types, e.g., how to come from aJMLTerm
to aJTerm
.Builds upon: #3021
Intended Change
ProofScriptEngine
is 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