Passing a reference to a constant literal, such as &(0), causes Prusti to reject the program with an unsupported constant type error. This prevents verification of otherwise simple programs that use reference-typed arguments.
To Reproduce
fn test(x: u64, y: &u64) -> u64 {
let y = *y;
x / y
}
fn main() {
test(1, &(0));
}
Actual Behavior
Prusti reports the following errors:
error: [Prusti: unsupported feature] unsupported constant type &'?5 u64
error: [Prusti: verification error] assertion might fail with "attempt to divide by zero"
Expected Behavior
Prusti should support reference-typed constant arguments such as &(0), instead of rejecting them as an unsupported constant type.
In this example, the relevant verification outcome is the division-by-zero error after dereferencing y. The reference constant itself should not prevent verification.
Passing a reference to a constant literal, such as
&(0), causes Prusti to reject the program with an unsupported constant type error. This prevents verification of otherwise simple programs that use reference-typed arguments.To Reproduce
Actual Behavior
Prusti reports the following errors:
error: [Prusti: unsupported feature] unsupported constant type &'?5 u64error: [Prusti: verification error] assertion might fail with "attempt to divide by zero"Expected Behavior
Prusti should support reference-typed constant arguments such as
&(0), instead of rejecting them as an unsupported constant type.In this example, the relevant verification outcome is the division-by-zero error after dereferencing
y. The reference constant itself should not prevent verification.