Closed RCoeurjoly closed 2 years ago
This is a triggering problem on the SMT level.
The problem is that the quantifier that contains the permission (Forall(marked_execution_tree.children, lambda node: Acc(node.function_name))
) is not triggered by the expression that needs it; it will be triggered for any node.function_name
if the fact that node in marked_execution_tree.children
is directly mentioned somewhere.
If you rewrite the quantifier to Forall(int, lambda i: Implies(i >= 0 and i < len(marked_execution_tree.children), Acc(marked_execution_tree.children[i].function_name)))
, which is semantically equivalent, it will get triggered whenever you have an expression of the form marked_execution_tree.children[i].function_name
, so the function will verify.
I should add: While this is not obvious and requires some understanding of what's going on on the SMT level, this kind of behavior of quantifiers is expected and not a bug, and can be worked around by rewriting the quantifier as described above. I'm happy to answer any questions of course, but I'll close the issue for now.
Thanks!
nagini complaints about insufficient permissions, although I have given permissions to the marked_execution_tree.children list and also to all function_name with a Forall.
nagini output: