AntiAliasing limitation of consumed/owned mut
params
#154
Labels
enhancement
Improvement to an existing feature
imperative
Feature or bug related to imperative features
verification
Feature or bug with the verification phase
Stainless doesn't distinguish between owned objects and referenced/shared/borrowed objects, because on the JVM every object is a reference. Therefore,
AntiAliasing
in Stainless hinders the Rust frontend to pass such code:Which corresponds to the following in Scala (and is transformed to it by the Rust frontend's extraction). Internally, the
mut s: S
is translated to aLetVar
at the beginning of the function:But this is not allowed in Stainless, because Stainless can't see that the parameter
var0
is consumed/owned and can be modified at will. Neither does it see thatvar0
is not used after theLetVar
assignment. Finally, Stainless fails withIllegal Aliasing: var0
.The text was updated successfully, but these errors were encountered: