owi icon indicating copy to clipboard operation
owi copied to clipboard

add an "--add-assert-to-pc" option

Open Laplace-Demon opened this issue 1 year ago • 5 comments

When an assertion is done, add it to assume to boost symbolic execution

Laplace-Demon avatar Jul 09 '24 07:07 Laplace-Demon

added it in webassembly rac mode 123935903ed81999430c55154f2f903d4b6ecd89

Laplace-Demon avatar Aug 22 '24 11:08 Laplace-Demon

Actually, it would be something more like "adding assert to PC"

redianthus avatar May 09 '25 14:05 redianthus

I am also tempted to think this should be the default.

Or we could have two primitives, one that adds to the pc (called "assert_and_hint" or something) and one that does not. The first one should have a name that suggests that it can be used to help the SMT

redianthus avatar May 09 '25 14:05 redianthus

I agree, I think it's mostly better to have previous assertions available in path conditions.

If I recall right, this is an option of Weasel code generator, and Owi primitives are not exposed to the Wasm file. In that case, having assert_and_hint seems to only serve internal use, and does not make much difference. But I think it may be interesting in the setting where the user call owi_assert directly? (maybe in the C examples, I'm not sure)

Laplace-Demon avatar May 09 '25 15:05 Laplace-Demon

But I think it may be interesting in the setting where the user call owi_assert directly?

Yes, that's mostly what I'm thinking of. It would be useful to add to the PC to help solvers, but sometimes it may also hurt performances so we should let the user decide and try to find what's the best default.

redianthus avatar May 09 '25 15:05 redianthus