Open viper-admin opened 7 years ago
@mschwerhoff commented on 2017-04-04 13:40
I have a solution in mind, but I'll delay its implementation until we decided on how to handle heap-dependent triggers.
@mschwerhoff commented on 2017-04-04 13:46
Currently affected tests:
Silicon currently doesn't differentiate between regular program expressions and trigger expressions, i.e. they are symbolically evaluated alike. This can cause problems if partial functions (functions with preconditions) are used as triggers. Consider the following example:
Symbolically evaluating the trigger expression
xs[i]
would fail because indexi
might be invalid (out of bounds). However, sincexs[i]
also occurs in the quantifier body, in a context wherei
is constrained appropriately, this example does not pose a problem: instead of evaluating the trigger expression, simply reuses the result of the evaluation from the body.However, the problem remains for trigger expressions that do not occur in the quantifier body, as in the following example:
Another, less apparent problematic example is the following:
Out trigger generation code can rewrite this quantifier as follows:
Now, the trigger expression does not occur in the body and symbolically evaluating the trigger will fail.