I get confused about the following two declarations. For me, they describe the same thing: an integer variable x
.
(declare-const x Int)
(declare-fun x () Int)
Is there any context that make them different in performance or provide different model? Thanks.
Yes, (declare-const x Int)
is just syntax sugar (declare-fun x () Int)
. There is no difference in performance. Note that declare-const
is not part of the SMT-Lib 2.0 standard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With