fix: handle panics for bit_vector#2334
Conversation
4586acc to
375858d
Compare
PoCand Logand |
|
Could we refine the error message here? 'Unsupported' might be interpreted by users as a permanent restriction. Phrasing it as 'not yet supported' would be more encouraging and accurately reflect the status. |
381d057 to
6b64f88
Compare
Update the error message. |
|
i'm not sure about the logic for putting the checks in ast_to_sst. bitvector_to_air is the source of truth for what's supported. There are already a large number of checks there, anyway, and it doesn't make sense to split them up without a good reason (like if the check was easier to do elsewhere, but that doesn't seem to be the case here). It is true that earlier is better, usually, but not if it decreases maintainability, and anyway, there's not much difference between bitvector_to_air and ast_to_sst. A better (i.e., earlier) would be well_formed.rs, or possibly modes.rs, but even then, it seems unnecessary to me. |
6b64f88 to
6a3159b
Compare
Removed the checks in |
|
I have another question: Does this PR need to add test? |
6a3159b to
0f6398f
Compare
0f6398f to
ce72524
Compare
Fix reachable panic for
bit_vector.I modify the panic code in
source/vir/src/bitvector_to_air.rs.However, codex suggests that it shall be handled in the early stage, and it adds check code in
source/vir/src/ast_to_sst.rs.PoCs:
and
Logs
and
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.