Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apron analysis does not support trivial assertions #1610

Open
sim642 opened this issue Oct 30, 2024 · 3 comments
Open

Apron analysis does not support trivial assertions #1610

sim642 opened this issue Oct 30, 2024 · 3 comments
Labels
precision relational Relational analyses (Apron, affeq, lin2var)

Comments

@sim642
Copy link
Member

sim642 commented Oct 30, 2024

The output of

./regtest.sh 78 02 --trace apron

contains

%%% apron: assert_constraint 1 > 0 unsupported: Exp_not_supported
%%% apron: assert_constraint 1 < 0 unsupported: Exp_not_supported
[...]
%%% apron: assert_constraint 1 != 0 unsupported: Exp_not_supported

This is odd because there's nothing complicated or problematic (e.g. overflows) with them.
Asserting the first one is of course useless (it refines nothing), which is also what currently happens with unsupported expressions (but it would be nice to not have spurious messages like this).
Asserting the second one should refine to bottom, instead of remaining unchanged (we're missing the most precise possible result!).

@sim642 sim642 added precision relational Relational analyses (Apron, affeq, lin2var) labels Oct 30, 2024
@michael-schwarz
Copy link
Member

My guess is that our expression translation does simply not translate constants to assertions. I also don't know what we expect to find here, given that we almost never run Goblint without at least constant propagation enabled, and the refinement to bottom happens at the analysis product level.

@sim642
Copy link
Member Author

sim642 commented Oct 30, 2024

The program doesn't contain expressions like 1 > 0 though. These are something the relational analysis itself conjures up somewhere.

@michael-schwarz
Copy link
Member

I guess it's what happens with Pos(1) internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
precision relational Relational analyses (Apron, affeq, lin2var)
Projects
None yet
Development

No branches or pull requests

2 participants