[FEATURE] Interval analysis to improve a..b
konnov opened this issue · 0 comments
konnov commented
Apalache translates the range operator a..b
to SMT only if a
and b
are
constant expressions. This annoys the users: #425, #150.
The standard workaround is to find two constants c
and d
such that
c <= a /\ b <= d
in all states. Then the user can rewrite the range operator
a..b
as {i \in c..d: a <= i /\ i <= b}
. This works in Apalache, as the
range c..d
is constant.
We could do it better. By running interval analysis, we could automatically
compute c
and d
, if such constants exist. Moreover, the static
analyzer could give the user better feedback, as it does not have to be as
local as the SMT rewriter.