usi-verification-and-security / opensmt

The opensmt solver
Other
78 stars 18 forks source link

ArithLogic: Fix handling of minus operator with more than two arguments #696

Closed blishko closed 7 months ago

blishko commented 7 months ago

According to the SMT-LIB definition of theory of Ints, operator minus is left associative. This means that it is allowed to create a function application of minus to more than two arguments. This is then a syntactic sugar that applies the operator recursively first to all the arguments except the last one and then apply the operator to the result and the last argument.

As @aehyvari pointed out, we can treat expression (- t1 t2 t3 ... tn) as (+ t1 (- t2) (- t3) ... (- tn)).

Fixes #690.