For example,
$ z3 -in
(declare-fun f (Int Real) Int)
(assert (= f f))
(check-sat)
sat
This is OK.
However, I'd like to qualify it by as
?
$ z3 -in
(declare-fun f (Int Real) Int)
(assert (= (as f ???) (as f ???)))
(check-sat)
sat
What should I fill in ???
?
It must be a sort, but what sort should I use?
I have tried ((Int Real) Int)
or (-> (Int Real) Int)
or (_ (Int Real) Int)
, but none of them are correct.
Is it possible to declare a function sort in smtlib?
If there is impossible to declare a function sort, how to disambiguate f
in the following program:
$ z3 -in
(declare-fun f (Int Real) Real)
(declare-fun f (Int Bool) Real)
(assert (= f f))
(error "line 3 column 11: ambiguous constant reference, more than one constant with the same sort, use a qualified expression (as <symbol> <sort>) to disambigua
te f")
Note that if I don’t use functions, it’s no problem:
$ z3 -in
(declare-fun f () Int)
(assert (= (as f Int) (as f Int)))
(check-sat)
sat
Thanks.