Open informatimago opened 3 years ago
Err, my example, need to be revised to be conforming, since ASSERT specifies that the The order of evaluation of the places is not specified; But it remains that the place should be evaluated unconditionnally when the test is false.
In a similar way to https://github.com/Clozure/ccl/issues/366 there's also an improper handling of places in ASSERT:
The semantics of :
are clear.
Assuming i = i₀ as pre-condition, it's equivalent to:
as can be check with:
And the postcondition is that i=i₀-1.
However, the macro-expansion of ASSERT above show that if the user doesn't give a new value for the first place (aref v i₀-2) designated by the first expresson (aref v (decf i)), then the wrong place will be modified by the second update code, the post condition won't be verified!
For example:
After selecting the continue restart and entering:
we have:
and the assert is not fulfilled, but now it's tested on the wrong places!
After selecting the continue restart and entering:
we have:
and the assert is still not fulfilled,
And we can only exit with luck since we reach an area of the vector where the condition is verified, but not thanks to our input.
If there wasn't a range of equal values, we'd go with negative I and an out-of-bound error.
I would advise a global revision of the missing cases of get-setf-expansion for place processing...