-
Notifications
You must be signed in to change notification settings - Fork 39
Add Polymorphic Sorts and Functions #3652
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
base: main
Are you sure you want to change the base?
Conversation
|
I added an example with polymorphic sequences (based on heap/simple/seq.key) and completed the proof. That should show that the matching logic works |
|
Hmm, the slicing tests fail due to a parser error, seemingly in sliced proof files. @WolframPfeifer do you interact at all with the |
|
I tested some of the runAllProofs tests that fail on the CI. They work on my machine. I don't know what the issue is |
|
All tests pass now. This PR is ready for review. |
Related Issue
Based on #3384. Thanks, @mattulbrich @wadoon
Intended Change
Adds polymorphic sorts as proposed by Ulbrich and Weigl and adds polymorphic functions as an obvious extension. This PR also adds matching logic, which has been tested in RustyKeY and JavaKeY.
The syntax is very verbose right now. Generic parameters are written as
<[E1, E2, E3]>. As an example, see polymorphic sequences:In the future, the syntax may be simplified and parameters may be partially inferred.
Additionally, polymorphic datatypes are supported:
The taclet generation for data types is changed accordingly.
To allow for taclets where an input is required (e.g., induction over
List<[int]>), we had to modify the input for terms and instantiations in proof files to allow sort specification, i.e.,x:List<[int]>. Consequently, the sort is also now emitted for all instantiations in all proof files.Plan
Remove SortDependingFunction? (Also simplifies grammar!)(Future work)Make sequences, sets, etc. polymorphic?(Future work)Type of pull request
Ensuring quality
.github/workflows/tests.ymlAdditional information and contact(s)
The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.