--
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/000501d69b4a%24008a09e0%24019e1da0%24%40ist.utl.pt.
> Double checking I understand the proposal:
>> If none of the conditions holds, the expression's value is undefined.
>
> Wouldn't there be a 4th case for:
> (assert (= x (choiceof (x (= x y)) (3 (bvule x y)) (0 (= y 42)))))
> - A "no matches" case where (not (= x y)), (not (bvule x y)), (not (= y 42)) and choiceof is undefined.
Right!
> There is then a question of what the value of the choiceof is for the no matches case.
For my case, it doesn’t matter, because the constraints guarantee that case isn’t observed. It can be any of the input values, for example.
BTW, since you mention udiv, I use Z3’s option to ignore the division by zero case, as it never happens with my constraints. I would rather get a warning from the solver saying I’m relying on the division by zero case (best effort) since that’s a bug in the encoding than having solving slowed down with that case being encoded with an UF internally (like Z3 does). I would be surprised if anyone relies on the SMT’s division by zero semantics.
> Given the syntax, I am guessing that the intention is for choiceof to be a function that goes from (A Bool)+ to A. Model assignments for this would need to be consistent. So I think there would also probably need to be some (= x <skolem>) condition where <skolem> is some type of skolem term for choiceof to handle congruence. (This is the div by 0 argument yet again.) Basically you need a consistent model assignment for the choiceof term so that:
> (assert (= x1 (choiceof (z1 b1))
> (assert (= x2 (choiceof (z2 b2))
> (assert (= z1 z2))
> (assert (= b1 b2))
> (assert (not (= x1 x2)))
> is unsat.
Yes, exactly!
As I mentioned, I can encode this right now with a quantified variable + a couple of ITEs, but having a “choiceof” operator would allow the solver to preprocess the formula much more easily.
This is somewhat close to a UF, but where the expression may yield more than one value for the same input. This is important for applications that encode refinement rather than equivalence.
Thanks,
Nuno
To view this discussion on the web visit https://groups.google.com/d/msgid/smt-lib/CAJ3tPC67TYpFxk6cP1s2c3wP9DBZ1bqt-poUbEnM_R0fPmH3cg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smt-lib/CAJ3tPC67TYpFxk6cP1s2c3wP9DBZ1bqt-poUbEnM_R0fPmH3cg%40mail.gmail.com.
Of course there’s a tradeoff between what SMT solvers should support and what’s the job of the application. SMT solver builders want the smallest possible language, while SMT solver users want the largest.. The truth is somewhere in between, but we need to make sure that it’s sufficiently large such that we don’t have everybody reinventing the wheel all the time in their applications.
I do run my fair share of SMT queries (many thousands every single day), and I feel there’s no forum where SMT solver builders & users can meet to discuss the SMT-LIB language. There are some parts of SMT-LIB that need improvement (e.g., FPA, arrays, UFs) and I don’t know where/if round tables between the different stakeholders occur.
Thanks,
Nuno
To view this discussion on the web visit https://groups.google.com/d/msgid/smt-lib/CABf5HMjyXYDi98e7G8duDKYtBXRreVpDNy3FgUHJjiVKYvSDiA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smt-lib/002a01d69da1%247891e0d0%2469b5a270%24%40ist.utl.pt.
--
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/c2ff3ef215979713928cdbc5a77a3064c2a6d120.camel%40cs.ox.ac.uk.