Conversation
This reverts commit 84e397c.
Copied from cpa tests. Revealed by: gobopt='--sets ana.activated[+] octApron' ./scripts/update_suite.rb
|
OctApron fails two new tests which I extracted from existing non-apron tests: branchIn the branch test, the octApron state in the if is flipped from what it should be! It states analyzer/src/cdomains/apron/octApronDomain.apron.ml Lines 272 to 278 in 134fd40 The != 0 extension shouldn't just be done to single variables, but whatever expression. Making it unconditional causes some stack overflow though. Maybe it needs to be somehow conditional like: if it's already a "boolean" expression, don't do it, otherwise do.
This is quite crucial because it's unsound. By constructing the linear constraint from floatI think octApron also tries to handle floats because Apron supposedly does. But it seems like it's oblivious to NaN, causing the same failure as varEq in #141. |
sim642
left a comment
There was a problem hiding this comment.
I think it should be in mergeable condition now. The optional Apron dependency and build seems to work. Octagon tests are skipped by default to not cause failures for anyone who doesn't build with Apron. Nevertheless, they can be explicitly executed (using the group "feature") and the CI also builds with Apron and runs them.
I realized just now that because Apron is included in the opam lockfile, such that the CI would install it for testing, it will also be installed thanks to the lockfile via make dev. So any new developers would still have Apron. But the optional dependency means that this PR at least doesn't cause build failures for existing developers. Not sure if we want to change that (remove apron from lockfile and install apron manually in CI script)?
You mean |
|
Something else that springs to mind: What is the relationship with the other octagon analysis made by a student when it comes to the tests? |
Probably yes. We could just have several lines starting with |
Sorry, yes,
Yes. User installations being without lockfile is an interesting idea too. Because if everyone's using the lockfile, then no dependency will ever get updated and we end up with unnecessarily ancient (and possibly more buggy) versions of things.
Yes, right now all of them are just used to test octApron instead. I can make the octApron tests a separate copy if that's desired. But realistically I think we won't end up maintaining that octagon analysis anyway. And currently the old apronDomain/poly stuff is also around, but given how octApronDomain/octApron is more or less a fixed copy, the old one should probably get removed as well (and the fixed one generalized to any Apron domain eventually).
I've thought about this for a while. But the octApron case is further complicated by the fact that the availability and testability of its configuration depends on whether apron is installed. |
I would go with this for now, given that afaik we have not tested the octApron for anything but toy examples?
I agree. Once we are happy with octApron we probably want to remove the other one. Ah, just saw you did that already |
|
|
||
| let branch ctx e b = | ||
| if D.is_bot ctx.local then | ||
| D.bot () |
There was a problem hiding this comment.
why not raise Deadcode?
There was a problem hiding this comment.
To be honest, every one of the transfer functions (already in poly) starts with if D.is_bot ctx.local then D.bot () for some reason. I don't know why this is because transfer functions shouldn't be called on already dead states anyway. For example, we don't do that sort of extra check in base.
Maybe @ivanazuzic knows why (or whether at all) these are necessary.
OctApronanalysis andOctApronDomainare addedUpdate_suite.rbdistinguishesUNKNOWN(can be unknown) andUNKNOWN!(must be unknown)AssertionResultAssertionResultis added as a new queryIntDomain.Sizebase.mltogoblintutil.mlbecause it's also used fromoctApron.ml