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
Maybe I am doing something wrong but the congruence analysis doesn't seem to be able to track this.
Here I am getting a random value, telling goblint to assume the state of the LSB, and then immediately assert it, and goblint says the assertion status is unknown (in a real program of course the assertion would be far away from the assume call): https://gist.github.com/edwintorok/8c6f3de4f717a3145945705cdcbe863b
(I could attempt to implement an analysis specific to tracking the LSB bit, similar to the sign analysis, but if goblint already has code to handle something similar I'd prefer to reuse or perhaps fix that part. For context: tracking the state of this bit is useful for OCaml C stubs where Is_block() and Is_long() macros check the bit).
The text was updated successfully, but these errors were encountered:
Besides implementing bitand in the congruence domain, __goblint_assume(x&1) also requires specific changes to BaseInvariant to actually assume that information.
I tried using modulo (see updated gist), which seems to have some more code, but perhaps needs some improvement too for assume?
BTW I don't have to use assume, if there is another way to tell goblint the status of the low bit I'd be happy to change my code to do that (the goal is to tell goblint that memory allocated by OCaml is aligned to at least 2 bytes or not, when using OCaml integers).
Maybe I am doing something wrong but the congruence analysis doesn't seem to be able to track this.
Here I am getting a random value, telling goblint to assume the state of the LSB, and then immediately assert it, and goblint says the assertion status is unknown (in a real program of course the assertion would be far away from the assume call):
https://gist.github.com/edwintorok/8c6f3de4f717a3145945705cdcbe863b
(I could attempt to implement an analysis specific to tracking the LSB bit, similar to the sign analysis, but if goblint already has code to handle something similar I'd prefer to reuse or perhaps fix that part. For context: tracking the state of this bit is useful for OCaml C stubs where Is_block() and Is_long() macros check the bit).
The text was updated successfully, but these errors were encountered: