9

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.

sean
  • 1,632
  • 2
  • 15
  • 34

1 Answers1

10

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.

Leonardo de Moura
  • 21,065
  • 2
  • 47
  • 53
  • Thanks. So I guess the Z3 tutorial is old, since it illustrates with many declare-const. – sean Oct 26 '13 at 20:50