Hello,
The current definition of get-model in the SMT-LIB standard does not
have a syntax to specify everything that you may want in every logic.
When we added the model validation track to SMT-COMP, we only
supported theories where the model can be fully expressed using the
syntax in the SMT-LIB standard. And we would need to solve these
problems when extending the track to more theories/logics. So to
answer your question: z3 behavior contradicts the standard, but there
is no standard conform way to give a model in certain logics, in
particular for the first example.
ad 1st example. Your first point is mainly for "undefined" parts of
theory-defined functions. There is no standard syntax in get-model to
specify what something like (div 5 0) should be. The SMT-LIB theory
for integers/real specifically says that division by 0 should be
treated as if it was an uninterpreted function, i.e. the solver should
search for an interpretation of the function that satisfies the
formula. But there is no way to communicate the found interpretation
back to the user/application.
This not only affects division by 0 in non-linear arithmetic, but also
some floating point operations and selector functions in the theory of
datatypes like "(car (as nil (List Int)))". Even the "select" function
in the array theory is uninterpreted, if you use model values (or is
this the array model value that is uninterpreted?).
Without giving these additional definitions, it would require an SMT
solver just to check that the "model" given by the solver can be
satisfied by choosing the right interpretation for the "theory-defined
functions".
ad 2nd example. My interpretation of the "can" in "Solvers can use
them respectively as identifiers for abstract values" is that the
solver doesn't have to use abstract values. But since there is no
other way to specify a value in the case of uninterpreted sorts, the
only standard conforming way would be to use them. In particular the
standard doesn't support "declare-fun" in the answer to the get-model
command that z3 currently gives.
There is another area where the SMT-LIB standard for models is
currently lacking: specify constraints on user-defined sorts or array
sorts. You cannot specify a cardinality constraint on uninterpreted
sorts, which are necessary to satisfy certain quantified formulas.
Likewise the formula "(assert (forall ((a (Array Int Int))) (exists
((x Int)) (not (= (select a x) 0)))))" is satisfiable but only if the
"constant 0" array is not an element of the array sort domain. Of
course, checking whether a quantified formula is satisfied by a
concrete model needs a kind of solver anyways and is undecidable in
some logics like NIA.
I'm not sure if a solver may answer "sat" if you give it a Gödel-sentence...
Regards,
Jochen
> --
> You received this message because you are subscribed to the Google Groups "SMT-LIB" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
smt-lib+u...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/smt-lib/c43f781a-dffb-455c-8c2f-ff89718e3a71n%40googlegroups.com.
--
Jochen Hoenicke,
Email:
hoen...@informatik.uni-freiburg.de Tel:
+49 761 203 8243