diff options
| author | Alasdair Armstrong | 2019-02-14 20:14:31 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2019-02-14 20:14:31 +0000 |
| commit | 7d34e41566f9c6a22debdcadc3a54c4b3b016b80 (patch) | |
| tree | d57b0bfef1038bdca2d876eeecc9c0d6d74fdeaf /language/bytecode.ott | |
| parent | 5a51f3f958bd66fd305af4268e43568474f34ac9 (diff) | |
Fix issues for versions of z3 confused by 2^n
Some versions of z3 do not like any constraints with the form 2^f(n),
even when such constraints are completely trivial, or only exist in
the environment yet no bearing on the current goal. Unfortunately the
z3 in Ubuntu LTS has these issues.
We can mitigate these issues somewhat by removing any 2^f(n)
containing conjuncts from the environment when z3 returns unknown, and
attempting to reprove the goal. In practice Type_check.prove only
guarantees that the goal is provable when it returns true, and does
not guarantee that it is false when it returns false, only that it
wasn't provable in the specified timeout. Similarly for
Type_check.solve. Mostly this is fine, because prove returning false
usually triggers a type error, or e.g. in the C optimizer always has a
sensible fallback (where it just won't optimize that specific
case). What is slightly concerning is that this z3 issues means that
Sail written using the latest z3 from git may not compile using Ubuntu
LTS z3.
We could if we wanted to put additional restrictions on Nexp_exp to
avoid this issue. We should also look over uses of Type_check.prove in
Sail to make sure callers are using it correctly.
Diffstat (limited to 'language/bytecode.ott')
0 files changed, 0 insertions, 0 deletions
