Closed kaiboy05 closed 2 years ago
Thanks for this. Have you tried using the SAT back-end?
@thomasspriggs This is a lovely example of type-unsafe things that are a pain in SMT back-ends.
Also @TGWDB who has been working on this.
Do you mean the normal invoke of cbmc like: "cbmc
Yes and that is good because it means that it is an SMT back-end issue rather than anything more serious.
CBMC version: (cbmc-5.35.0) 64-bit x86_64 linux Operating system: Ubuntu 20.04 (WSL 1, with windows 10) Exact command line resulting in the issue:
cbmc test.c --function totest --smt2 --outfile o
What behaviour did you expect: Generate the SMT What happened instead: Invariant check failedHi,
I was trying to do the union casting between the uint and the float numbers. However, when I tried to generate the smt, it gives the invariant check failed error. Here is the code that I checked with cbmc, and the error message that I got.
test.c:
Error message:
May I know am I not supposed to do the union casting like this?
Thank you very much.