Currently, we are treating existing invariants as an exhale-inhale pair. As a result we are inferring an infinite amount of permission for the access paths a.f and a.f.f in the following example.
The reason for this is the following: Whenever there is an exhale, the alias analysis havocs the corresponding access path. Thus, it will tell us that the receivers of a.f and a.f.f may alias. Consequently, exhaling acc(a.f) in the permission inference will also exhale full permission for the access path a.f.f (and vice-versa). This means, in every loop iteration we exhale twice the amount of permission that is inhaled. Since the widening is not implemented yet, the analysis does not terminate. Once the widening is there this would cause the inference to infer an infinite amount of permission.
It is a bit odd that we treat the inferred invariants differently: In the following example, we infer the invariants invariant acc(a.f) and invariant acc(a.f.f). And if we run the inference on the output we are in the situation described above.
Currently, we are treating existing invariants as an exhale-inhale pair. As a result we are inferring an infinite amount of permission for the access paths
a.f
anda.f.f
in the following example.The reason for this is the following: Whenever there is an exhale, the alias analysis havocs the corresponding access path. Thus, it will tell us that the receivers of
a.f
anda.f.f
may alias. Consequently, exhalingacc(a.f)
in the permission inference will also exhale full permission for the access patha.f.f
(and vice-versa). This means, in every loop iteration we exhale twice the amount of permission that is inhaled. Since the widening is not implemented yet, the analysis does not terminate. Once the widening is there this would cause the inference to infer an infinite amount of permission.It is a bit odd that we treat the inferred invariants differently: In the following example, we infer the invariants
invariant acc(a.f)
andinvariant acc(a.f.f)
. And if we run the inference on the output we are in the situation described above.