Skip to content
Discussion options

You must be logged in to vote

In this concrete case, you could add a postcondition ensures \static_invariant_for(JMERuleErrorType) to produceEnum. However, this is not a general solution. I think, most of the time, it should be possible to add \static_invariant_for(JMERuleErrorType) to the non-static invariant (of the class UseCase in this example). Since in the enum everything is final, I think this could be sufficient. For static invariants in general, I am not sure if this is enough. Unfortunately, as far as I know it is not possible to define dependency contracts for static invariants. I was thinking about something like accessible \static_inv: <locset_term>, however, it is not supported.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@WolframPfeifer
Comment options

Answer selected by FliegendeWurst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants