Closed zgrannan closed 7 months ago
It doesn't make sense to have old() expressions in postconditions of pure functions (since they don't modify the heap). Also, the PureFunctionEncoder can't handle them (resulting in internal/consistency errors).
old()
PureFunctionEncoder
This PR makes it an error to include old() in postconditions of pure functions. Resolves https://github.com/viperproject/prusti-dev/issues/1306
This PR also includes support for StubFunctionEncoder to handle bodyless functions (e.g. those from #[extern_spec])
StubFunctionEncoder
#[extern_spec]
It doesn't make sense to have
old()
expressions in postconditions of pure functions (since they don't modify the heap). Also, thePureFunctionEncoder
can't handle them (resulting in internal/consistency errors).This PR makes it an error to include
old()
in postconditions of pure functions. Resolves https://github.com/viperproject/prusti-dev/issues/1306This PR also includes support for
StubFunctionEncoder
to handle bodyless functions (e.g. those from#[extern_spec]
)