-
Notifications
You must be signed in to change notification settings - Fork 29
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
Introducing some structure for model method bodies #3571
base: main
Are you sure you want to change the base?
Conversation
restricted to ifs and intermediate variables
and spotlessing
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3571 +/- ##
============================================
- Coverage 38.39% 38.39% -0.01%
- Complexity 17238 17239 +1
============================================
Files 2098 2098
Lines 127324 127346 +22
Branches 21442 21444 +2
============================================
+ Hits 48886 48891 +5
- Misses 72427 72441 +14
- Partials 6011 6014 +3 ☔ View full report in Codecov by Sentry. |
My questions would also be:
Maybe we should add a |
Because thus jml model method bodies can remain purely logical expressions and their definition can be directly expanded into the sequent. That is a fundamental asset of model methods as they are implemented in KeY (like related constructs in other verification frameworks). Dealing with loops in particular would make this impossible. This was driven by trying to relax notation while keeping the verification-system power of the type definitions. How does the JavaDL-definition axiom or taclet for model methods look like in jmlparser?
I think actually, it does. In KeY, however, the expansion mechanism for non-model methods, is conservative and uses [] box-semantics to be on the safe side.
I would refrain from putting jml model methods into modalities, It's their power to define functions directly. I would be happy to intrdoduce ghost methods that can use any code. They do not even need to be pure. |
Intended Change
This is a new feature request by users that wanted to use model methods.
The PR introduces method bodies that allow some statements. It is limited to
This is still rather limited but allows you to structure your code already quite a bit.
The restrictions are:
var
(due to a restriction in the lexer/parser)The only thing that needs to be done is then to interpret these structures into a term.
My running example is the following which explains itself:
Plan
Type of pull request
Ensuring quality
Additional information and contact(s)
The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.