Conversation
|
The unit tests are currently failing as the tests do not seem to correctly pick up the in-file configurations |
src/main/scala/viper/gobra/frontend/info/implementation/typing/ghost/GhostExprTyping.scala
Outdated
Show resolved
Hide resolved
| case (n: SIFRelExp, optMember) => | ||
| // it's unclear how to remove a `rel(_, _)` expressions while preserving well-typedness. Thus, | ||
| // we always report an error: | ||
| errs = errs :+ ConsistencyError("Rel expression found: $n", n.pos) |
There was a problem hiding this comment.
Maybe we can have a more informative error saying that rel expressions are still not supported by the LowGuardTransformer?
There was a problem hiding this comment.
GhostExprTyping already creates a type error for rel expressions so this error is basically dead code
Can you provide more details on the problem here? |
Co-authored-by: João Pereira <joaopereira.19@gmail.com>
There are several problems, such as:
|
|
Hmm, I see. Regarding the first two problems, I think we could be conservative and produce an error in the cases where there is no obvious translation. The example you provide is pretty illustrative and I think it shows why we should generate an error rather than trying to translate this expression in a way that may be surprising to the user. Likewise, I would produce an error in the second problem if we use the I guess an alternative to this could be to generate a precondition As for the third problem, I need to think some more about it. |
This PR adds support for
rel(e, i)expressions, whereeis an arbitrary expression andiis an int literal (either0or1), which denotes one of the two executions when reasoning hyper properties in whicheshould be evaluated.Since Viper's
relexpression is hidden behind a feature flag, Gobra also requires--enableExperimentalHyperFeaturesas well as theextendedhyper mode.@jcp19 I've started implementing
relfor the non-extended hyper mode as supporting this expressions in that mode should technically be possible. However, it wasn't immediately clear to me how to make it fit into the current implementation as the implementation requires, e.g., expressing a transformation to turn a hyper assertion into a unary assertion. For now, support in theextendedhyper mode seems sufficient but please let me know if you have thoughts on supporting the non-extended hyper mode.This PR now also removes the deprecated
silver-sif-extensiondependency and instead uses the SIF plugin that is now part ofsilver. The changes to the Dockerfile also resolve the warnings we have observed in the GitHub CI.