You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to generate tests for the following code, I get an exception:
voidpreserve(unsigned longsize, int*p)
/*@ requires take a1 = each(u64 i; i <= 0u64 && i < size) { Owned<int>(array_shift<int>(p,i)) };ensures take a2 = each(u64 i; i <= 0u64 && i < size) { Owned<int>(array_shift<int>(p,i)) };@*/
{
}
This throws:
Failure("TODO rearrange_start_inequality at 6:25")
Raised at Stdlib.failwith in file "stdlib.ml", line 29, characters 17-33
Called from Cn__Cn_internal_to_ail.generate_start_expr in file "backend/cn/lib/cn_internal_to_ail.ml", line 533, characters 11-53
Another example that leads to the same exception is if you make the size an int, and add a cast:
takea1=each(u64i; i <= 0u64&&i< (u64)size) { Owned<int>(array_shift<int>(p,i)) };
Another variation, if we remove the redundant 0 <= 0u64 constraint:
cn: internal error, uncaught exception:
Failure("Not of correct form (unlikely case - i's not matching)")
Raised at Stdlib.failwith in file "stdlib.ml", line 29, characters 17-33
Called from Cn__Cn_internal_to_ail.generate_start_expr in file "backend/cn/lib/cn_internal_to_ail.ml", line 530, characters 8-73
The only version I was able to run without exceptions is to use int as the size:
When I try to generate tests for the following code, I get an exception:
This throws:
Another example that leads to the same exception is if you make the size an
int
, and add a cast:Another variation, if we remove the redundant
0 <= 0u64
constraint:This throws:
The only version I was able to run without exceptions is to use
int
as the size:This, however, leads to warnings from
cn
saying thateach
expects au64
.The text was updated successfully, but these errors were encountered: