Closed amigalemming closed 1 month ago
How will this work with extended values?
Prelude Data.SBV> optimize Lexicographic $ do x <- sInteger "x"; maximize "x" x
Optimal in an extension field:
x_0 = oo :: Integer
One reason I left this a bit under-developed was precisely because optimization might result in infinities or epsilons for unbounded domains. (Integers and Reals.)
Is this an issue here?
Guess you lost interest in this, and I don't immediately see how to make this fit with the current schema due to the existence of infinities and epsilons. Feel free to reopen the ticket if you have further issues/ideas.
This is a follow-up to https://github.com/LeventErkok/sbv/issues/707 . Currently I have to retrieve optimization results from dynamically typed
SMTResult
. I propose an alternative tooptimize
:SBV tuple
is the result of combining variables of typeSBool
,SInteger
etc. viaApplicative
. It has two advantage overSMTResult
: 1. SBV knows that the variable exists inmodelAssocs
. 2. SBV knows its type, namelyBool
. Hm, the typeIO (result, tuple)
could be more precise, such that it is either an optimization error or a resulttuple
.