usi-verification-and-security / opensmt

The opensmt solver
Other
78 stars 18 forks source link

OpenSMT does not remove term names from context after pop #726

Closed blishko closed 4 months ago

blishko commented 5 months ago

OpenSMT reports error on the following example, which is deemed valid by other solvers, such as z3 and cvc5.

(set-logic QF_LIA)
(declare-fun o () Int)
(declare-fun i () Bool)
(push 1)
(assert (! (< o 0) :named c0))
(pop 1)
(assert (! i :named c0))
(check-sat)

The problem is, that OpenSMT does not remove term names from its context after pop, and when reusing the name c0, it reports an error, because the it remembers the first use of c0 in its context.