packages feed

sbv 10.12 → 11.0

raw patch · 542 files changed

+6921/−4441 lines, 542 filesdep ~base

Dependency ranges changed: base

Files

CHANGES.md view
@@ -1,6 +1,55 @@ * Hackage: <http://hackage.haskell.org/package/sbv> * GitHub:  <http://github.com/LeventErkok/sbv> +### Version 11.0, 2024-11-06++  * [BACKWARDS COMPATIBILITY] SBV now handles arrays in a much more uniform way, unifying+    their use with all the other symbolic types. This required some back-wards compatibility+    changes, mostly around replacing calls to newArray with sArray. I expect there to be+    no semantic changes, only syntactic ones. Please do get in touch if you have trouble+    porting your old code using arrays to the new API.++  * Turn on support for floats and uninterpreted sorts/functions in Bitwuzla.++  * Add Data.SBV.Tools.KnuckleDragger, inspired by and modeled after Philip Zucker's tool+    (https://github.com/philzook58/knuckledragger) by the same name.++  * Added several KnuckleDragger proof examples, see Documentation.SBV.Examples.KnuckleDragger modules.+    Amongst the proofs are the irrationality of square-root of 2, several list lemmas, and a few+    inductive proofs over naturals, amongst others.++  * Add sDivides, which takes a concrete integer and a (possibly symbolic), and returns sTrue+    if the first argument divides the second. It is essentially equivalent to @a `sMod` n .== 0`,+    but it translates to the built-in divisibility predicate in SMTLib, which (might) perform better.+    Note that the @n@ argument is concrete, and must be > 0.++  * Clarified SSet, SList, and SArray: keys/contents: In SMTLib, the semantics of these containers+    use object-equality. In Haskell, they use instances of the Eq class. Usually this is just fine,+    except when it isn't: Floats! Since NaN /= NaN, and +0 is distinguished from -0, what holds+    in Haskell doesn't in the SMTLib logic. So, we define the semantics of equality to follow+    the SMTLib semantics. If you are not using floats, then this doesn't matter. If you do, bear+    in mind that the values will be treated with object equality; which (honestly) is easier to understand.++  * SBV now prints the elements of uninterpreted sorts more simply for z3. Previously, we simply used the+    name z3 produced, which looked like @T!val!i@ for the uninterpreted type @T@, we know convert it to @T_i@.++  * Added Documentation/SBV/Examples/Puzzles/DieHard.hs, which solves the die-hard jug-water problem using+    a BMC style search.++  * [BACKWARDS COMPATIBILITY] Changed the signature of the functions bmc (and bmcWith), induct (and inductWith)+    functions, so they take the transition as a relation, instead of a function returning multiple values. This+    generalizes the use cases, and it is easy to translate from existing applications. Simply change your old+    'State -> [State]' function to 'State -> State -> SBool', which can be achieved by +    'newTrans s1 s2 = s2 `sElem` oldTrans s1', though you probably want to code this in a more readable way+    depending on the actual transition relation you want to model. Furthermore, the function bmc is now+    split into two bmcRefute and bmcCover, to indicate use cases more clearly.++  * [BACKWARDS COMPATIBILITY] Removed the Fresh class, which was used as a proxy for the Queriable class as+    an easier to instantiate version. The extra functionality unfortunately made writing custom Queriable+    instances harder, and it is usually not harder to write Queriable in the first place.+    If you were using the Fresh class, instead define Queriable, the definition should be fairly+    simple. Please contact if you have difficulty using the Queriable interface.+ ### Version 10.12, 2024-08-11    * Fix a few custom-floating-point format conversion bugs. Thanks to Sirui Lu for the patch.
Data/SBV.hs view
@@ -145,13 +145,15 @@ -- get in touch if there is a solver you'd like to see included. ----------------------------------------------------------------------------- -{-# LANGUAGE DataKinds            #-}-{-# LANGUAGE FlexibleContexts     #-}-{-# LANGUAGE FlexibleInstances    #-}-{-# LANGUAGE ScopedTypeVariables  #-}-{-# LANGUAGE TypeApplications     #-}-{-# LANGUAGE TypeFamilies         #-}-{-# LANGUAGE TypeOperators        #-}+{-# LANGUAGE DataKinds             #-}+{-# LANGUAGE DefaultSignatures     #-}+{-# LANGUAGE FlexibleContexts      #-}+{-# LANGUAGE FlexibleInstances     #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE ScopedTypeVariables   #-}+{-# LANGUAGE TypeApplications      #-}+{-# LANGUAGE TypeFamilies          #-}+{-# LANGUAGE TypeOperators         #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -185,6 +187,7 @@   , SFPSingle, FPSingle   , SFPDouble, FPDouble   , SFPQuad, FPQuad+  , fpFromInteger   -- ** Rationals   , SRational   -- ** Algebraic reals@@ -204,7 +207,7 @@   -- ** Sets   , RCSet(..), SSet   -- * Arrays of symbolic values-  , SymArray(readArray, writeArray, mergeArrays, sListArray), newArray_, newArray, SArray, lambdaAsArray+  , SArray, sArray, sArray_, sArrays, readArray, writeArray, lambdaArray, listArray    -- * Creating symbolic values   -- ** Single value@@ -266,7 +269,7 @@   -- * Division and Modulus   , SDivisible(..)   -- $euclidianNote-  , sEDivMod, sEDiv, sEMod+  , sEDivMod, sEDiv, sEMod, sDivides   -- * Bit-vector operations   -- ** Conversions   , sFromIntegral@@ -420,6 +423,9 @@   , isConcrete, isSymbolic, isConcretely, mkSymVal   , MonadSymbolic(..), Symbolic, SymbolicT, label, output, runSMT, runSMTWith +  -- * Queriable values+  , Queriable(..), freshVar, freshVar_, getValue+   -- * Module exports   -- $moduleExportIntro @@ -429,12 +435,13 @@   , module Data.Ratio   ) where -import Control.Monad (when)+import Control.Monad       (when)+import Control.Monad.Trans (MonadIO)  import Data.SBV.Core.AlgReals import Data.SBV.Core.Data       hiding (free, free_, mkFreeVars,                                         output, symbolic, symbolics, mkSymVal,-                                        newArray, newArray_, bvExtract, bvDrop, bvTake, (#))+                                        bvExtract, bvDrop, bvTake, (#)) import Data.SBV.Core.Model      hiding (assertWithPenalty, minimize, maximize,                                         solve, sBool, sBool_, sBools, sChar, sChar_, sChars,                                         sDouble, sDouble_, sDoubles, sFloat, sFloat_, sFloats,@@ -450,6 +457,7 @@                                         sWord8, sWord8_, sWord8s, sWord16, sWord16_, sWord16s,                                         sWord32, sWord32_, sWord32s, sWord64, sWord64_, sWord64s,                                         sMaybe, sMaybe_, sMaybes, sEither, sEither_, sEithers, sSet, sSet_, sSets,+                                        sArray, sArray_, sArrays,                                         sBarrelRotateLeft, sBarrelRotateRight, zeroExtend, signExtend, sObserve)  import qualified Data.SBV.Core.Model as M  (sBarrelRotateLeft, sBarrelRotateRight, zeroExtend, signExtend)@@ -486,11 +494,14 @@ import Data.Word  import Data.SBV.SMT.Utils (SBVException(..))+ import Data.SBV.Control.Types (SMTReasonUnknown(..), Logic(..))+import Data.SBV.Control.Utils (getValue, freshVar, freshVar_)  import qualified Data.SBV.Utils.CrackNum as CN  import Data.Proxy (Proxy(..))+import Data.Kind  (Type) import GHC.TypeLits (KnownNat, type (<=), type (+), type (-))  import Prelude hiding((+), (-)) -- to avoid the haddock ambiguity@@ -1749,5 +1760,35 @@      IndependentResult r -> pure r      _                   -> error $ "An independent optimization call resulted in a bad result:"                                   ++ "\n" ++ show res++-- | An queriable value: Mapping between concrete/symbolic values. If your type is traversable and simply embeds+-- symbolic equivalents for one type, then you can simply define 'create'. (Which is the most common case.)+class Queriable m a where+  type QueryResult a :: Type++  -- | ^ Create a new symbolic value of type @a@+  create  :: QueryT m a++  -- | ^ Extract the current value in a SAT context+  project :: a -> QueryT m (QueryResult a)++  -- | ^ Create a literal value. Morally, 'embed' and 'project' are inverses of each other+  -- via the 'QueryT' monad transformer.+  embed   :: QueryResult a -> QueryT m a++  default project :: (a ~ t (SBV e), QueryResult a ~ t e, Traversable t, MonadIO m, SymVal e) => a -> QueryT m (QueryResult a)+  project = mapM project++  default embed :: (a ~ t (SBV e), QueryResult a ~ t e, Traversable t, MonadIO m, SymVal e) => QueryResult a -> QueryT m a+  embed = mapM embed+  {-# MINIMAL create #-}++-- | Generic 'Queriable' instance for 'SymVal' values+instance {-# OVERLAPPABLE #-} (MonadIO m, SymVal a) => Queriable m (SBV a) where+  type QueryResult (SBV a) = a++  create  = freshVar_+  project = getValue+  embed   = return . literal  {- HLint ignore module "Use import/export shortcut" -}
Data/SBV/Client/BaseIO.hs view
@@ -24,12 +24,12 @@  module Data.SBV.Client.BaseIO where -import Data.SBV.Core.Data      (HasKind, Kind, Outputtable, Penalty, SymArray,+import Data.SBV.Core.Data      (Kind, Outputtable, Penalty,                                 SymVal, SBool, SBV, SChar, SDouble, SFloat, SWord, SInt,                                 SFPHalf, SFPBFloat, SFPSingle, SFPDouble, SFPQuad, SFloatingPoint,                                 SInt8, SInt16, SInt32, SInt64, SInteger, SList,                                 SReal, SString, SV, SWord8, SWord16, SWord32,-                                SWord64, SEither, SRational, SMaybe, SSet, constrain, (.==))+                                SWord64, SEither, SRational, SMaybe, SSet, SArray, constrain, (.==)) import Data.SBV.Core.Sized     (IntN, WordN) import Data.SBV.Core.Kind      (BVIsNonZero, ValidFloat) import Data.SBV.Core.Model     (Metric(..), SymTuple)@@ -279,18 +279,6 @@ mkSymVal :: SymVal a => VarContext -> Maybe String -> Symbolic (SBV a) mkSymVal = Trans.mkSymVal --- | Create a new anonymous array, possibly with a default initial value.------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.newArray_'-newArray_ :: (SymArray array, HasKind a, HasKind b) => Maybe (SBV b) -> Symbolic (array a b)-newArray_ = Trans.newArray_---- | Create a named new array, possibly with a default initial value.------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.newArray'-newArray :: (SymArray array, HasKind a, HasKind b) => String -> Maybe (SBV b) -> Symbolic (array a b)-newArray = Trans.newArray- -- Data.SBV.Core.Model:  -- | Generically make a symbolic var@@ -820,6 +808,24 @@ -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sSets' sSets :: (Ord a, SymVal a) => [String] -> Symbolic [SSet a] sSets = Trans.sSets++-- | Declare a named 'SArray'+--+-- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sArray'+sArray :: (SymVal a, SymVal b) => String -> Symbolic (SArray a b)+sArray = Trans.sArray++-- | Declare an unnamed 'SArray'+--+-- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sArray_'+sArray_ :: (SymVal a, SymVal b) => Symbolic (SArray a b)+sArray_ = Trans.sArray_++-- | Declare a list of 'SArray' values.+--+-- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sArrays'+sArrays :: (SymVal a, SymVal b) => [String] -> Symbolic [SArray a b]+sArrays = Trans.sArrays  -- | Form the symbolic conjunction of a given list of boolean conditions. Useful in expressing -- problems with constraints, like the following:
Data/SBV/Compilers/C.hs view
@@ -208,12 +208,13 @@                      KChar         -> text "%c"                      KRational     -> die   "rational sort"                      KFP{}         -> die   "arbitrary float sort"-                     KList k       -> die $ "list sort: " ++ show k-                     KSet  k       -> die $ "set sort: " ++ show k-                     KUserSort s _ -> die $ "user sort: " ++ s-                     KTuple k      -> die $ "tuple sort: " ++ show k+                     KList k       -> die $ "list sort: "   ++ show k+                     KSet  k       -> die $ "set sort: "    ++ show k+                     KUserSort s _ -> die $ "user sort: "   ++ s+                     KTuple k      -> die $ "tuple sort: "  ++ show k                      KMaybe  k     -> die $ "maybe sort: "  ++ show k                      KEither k1 k2 -> die $ "either sort: " ++ show (k1, k2)+                     KArray  k1 k2 -> die $ "array sort: "  ++ show (k1, k2)   where u8InHex = cgShowU8InHex cfg          spec :: (Bool, Int) -> Doc@@ -448,7 +449,7 @@  -- | Generate the C program genCProg :: CgConfig -> String -> Doc -> Result -> [(String, CgVal)] -> [(String, CgVal)] -> Maybe SV -> Doc -> ([Doc], [String])-genCProg cfg fn proto (Result pinfo kindInfo _tvals _ovals cgs topInps (_, preConsts) tbls arrs _uis axioms (SBVPgm asgns) cstrs origAsserts _) inVars outVars mbRet extDecls+genCProg cfg fn proto (Result pinfo kindInfo _tvals _ovals cgs topInps (_, preConsts) tbls _uis axioms (SBVPgm asgns) cstrs origAsserts _) inVars outVars mbRet extDecls   | isNothing (cgInteger cfg) && KUnbounded `Set.member` kindInfo   = error $ "SBV->C: Unbounded integers are not supported by the C compiler."           ++ "\nUse 'cgIntegerSize' to specify a fixed size for SInteger representation."@@ -481,8 +482,6 @@   = error "SBV->C: Cannot compile in the presence of 'smtFunction' definitions, use 'compileToCLib' instead."   | not (null cstrs)   = tbd "Explicit constraints"-  | not (null arrs)-  = tbd "User specified arrays"   | True   = ([pre, header, post], flagsNeeded)  where notyet m = error $ "SBV->C: " ++ m ++ " are currently not supported by the C compiler. Please get in touch if you'd like support for this feature!"@@ -545,11 +544,12 @@                       len (KBounded True  n) = 4 + length (show n) -- SIntN                       len KRational{}        = die   "Rational."                       len KFP{}              = die   "Arbitrary float."-                      len (KList s)          = die $ "List sort: " ++ show s-                      len (KSet  s)          = die $ "Set sort: " ++ show s-                      len (KTuple s)         = die $ "Tuple sort: " ++ show s-                      len (KMaybe k)         = die $ "Maybe sort: " ++ show k+                      len (KList s)          = die $ "List sort: "   ++ show s+                      len (KSet  s)          = die $ "Set sort: "    ++ show s+                      len (KTuple s)         = die $ "Tuple sort: "  ++ show s+                      len (KMaybe k)         = die $ "Maybe sort: "  ++ show k                       len (KEither k1 k2)    = die $ "Either sort: " ++ show (k1, k2)+                      len (KArray  k1 k2)    = die $ "Array sort:  " ++ show (k1, k2)                       len (KUserSort s _)    = die $ "Uninterpreted sort: " ++ s                        getMax 8 _      = 8  -- 8 is the max we can get with SInteger, so don't bother looking any further@@ -760,8 +760,8 @@         hd w []    = error $ "Data.SBV.C.ppExpr: Impossible happened: " ++ w ++ ", received empty list!"          p :: Op -> [Doc] -> Doc-        p (ArrRead _)       _  = tbd "User specified arrays (ArrRead)"-        p (ArrEq _ _)       _  = tbd "User specified arrays (ArrEq)"+        p ReadArray{}       _  = tbd "User specified arrays (ReadArray)"+        p WriteArray{}      _  = tbd "User specified arrays (WriteArray)"         p (Label s)        [a] = a <+> text "/*" <+> text s <+> text "*/"         p (IEEEFP w)         as = handleIEEE w  consts (zip opArgs as) var         p (PseudoBoolean pb) as = handlePB pb as@@ -811,11 +811,12 @@                                                KUnbounded      -> case cgInteger cfg of                                                                     Nothing -> (True, True) -- won't matter, it'll be rejected later                                                                     Just i  -> (True, canOverflow True i)-                                               KList     s     -> die $ "List sort " ++ show s-                                               KSet      s     -> die $ "Set sort " ++ show s-                                               KTuple    s     -> die $ "Tuple sort " ++ show s-                                               KMaybe    ek    -> die $ "Maybe sort " ++ show ek+                                               KList     s     -> die $ "List sort "   ++ show s+                                               KSet      s     -> die $ "Set sort "    ++ show s+                                               KTuple    s     -> die $ "Tuple sort "  ++ show s+                                               KMaybe    ek    -> die $ "Maybe sort "  ++ show ek                                                KEither   k1 k2 -> die $ "Either sort " ++ show (k1, k2)+                                               KArray    k1 k2 -> die $ "Array  sort " ++ show (k1, k2)                                                KUserSort s _   -> die $ "Uninterpreted sort: " ++ s          -- Div/Rem should be careful on 0, in the SBV world x `div` 0 is 0, x `rem` 0 is x
Data/SBV/Control.hs view
@@ -9,28 +9,20 @@ -- Control sublanguage for interacting with SMT solvers. ----------------------------------------------------------------------------- -{-# LANGUAGE ConstraintKinds #-}- {-# OPTIONS_GHC -Wall -Werror #-}  module Data.SBV.Control (      -- $queryIntro       -- * User queries-       ExtractIO(..), MonadQuery(..), Queriable(..), Fresh(..), Query, query--     -- * Create a fresh variable-     , freshVar_, freshVar--     -- * Create a fresh array-     , freshArray_, freshArray+       ExtractIO(..), MonadQuery(..), Query, query       -- * Checking satisfiability      , CheckSatResult(..), checkSat, ensureSat, checkSatUsing, checkSatAssuming, checkSatAssumingWithUnsatisfiableSet       -- * Querying the solver      -- ** Extracting values-     , getValue, registerUISMTFunction, getFunction, getUninterpretedValue, getModel, getAssignment, getSMTResult, getUnknownReason, getObservables+     , registerUISMTFunction, registerSMTType, getFunction, getUninterpretedValue, getModel, getAssignment, getSMTResult, getUnknownReason, getObservables       -- ** Extracting the unsat core      , getUnsatCore@@ -79,28 +71,10 @@      , SMTOption(..)      ) where -import Data.SBV.Core.Symbolic (MonadQuery(..), Query, Queriable(..), Fresh(..), Symbolic, QueryContext(..))--import Data.SBV.Control.BaseIO-import Data.SBV.Control.Query hiding (  getInfo, getOption, getUnknownReason, getObservables-                                      , getSMTResult, getLexicographicOptResults-                                      , getIndependentOptResults-                                      , getParetoOptResults, getModel-                                      , checkSatAssuming-                                      , checkSatAssumingWithUnsatisfiableSet-                                      , getAssertionStackDepth-                                      , inNewAssertionStack, push, pop-                                      , caseSplit, resetAssertions, echo, exit-                                      , getUnsatCore, getProof, getInterpolantMathSAT, getInterpolantZ3-                                      , getAbduct, getAbductNext-                                      , getAssertions, getAssignment-                                      , mkSMTResult, freshVar_, freshVar-                                      , freshArray, freshArray_, checkSat, ensureSat-                                      , checkSatUsing, getValue-                                      , getUninterpretedValue, timeout, io)-import Data.SBV.Control.Utils (registerUISMTFunction)+import Data.SBV.Core.Symbolic (Symbolic, QueryContext(..)) -import Data.SBV.Utils.ExtractIO (ExtractIO(..))+import Data.SBV.Trans.Control hiding (query)+import Data.SBV.Control.Utils (registerUISMTFunction, registerSMTType)  import qualified Data.SBV.Control.Utils as Trans 
Data/SBV/Control/BaseIO.hs view
@@ -20,16 +20,14 @@ import Data.SBV.Control.Query (Assignment) import Data.SBV.Control.Types (CheckSatResult, SMTInfoFlag, SMTInfoResponse, SMTOption, SMTReasonUnknown) import Data.SBV.Core.Concrete (CV)-import Data.SBV.Core.Data     (HasKind, Symbolic, SymArray, SymVal, SBool, SBV, SBVType, Lambda(..))-import Data.SBV.Core.Symbolic (Query, QueryContext, QueryState, State, SMTModel, SMTResult, SV, Name, SymbolicT)+import Data.SBV.Core.Data     (HasKind, Symbolic, SymVal, SBool, SBV, SBVType)+import Data.SBV.Core.Symbolic (Query, QueryContext, QueryState, State, SMTModel, SMTResult, SV, Name)  import qualified Data.SBV.Control.Query as Trans import qualified Data.SBV.Control.Utils as Trans  import Data.SBV.Utils.SExpr (SExpr) --- Data.SBV.Control.Query- -- | Ask solver for info. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.Control.getInfo'@@ -398,31 +396,6 @@ -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.Control.freshVar' freshVar :: SymVal a => String -> Query (SBV a) freshVar = Trans.freshVar---- | Similar to 'freshArray', except creates unnamed array.------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.Control.freshArray_'-freshArray_ :: (SymArray array, HasKind a, HasKind b) => Maybe (SBV b) -> Query (array a b)-freshArray_ = Trans.freshArray_---- | Create a fresh array in query mode. Again, you should prefer--- creating arrays before the queries start using 'Data.SBV.newArray', but this--- method can come in handy in occasional cases where you need a new array--- after you start the query based interaction.------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.Control.freshArray'-freshArray :: (SymArray array, HasKind a, HasKind b) => String -> Maybe (SBV b) -> Query (array a b)-freshArray = Trans.freshArray---- | Create a fresh lambda array--- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.Control.freshLambdaArray'-freshLambdaArray :: (HasKind a, HasKind b, Lambda (SymbolicT IO) (a -> b), SymArray array) => String -> (a -> b) -> Query (array a b)-freshLambdaArray = Trans.freshLambdaArray---- | Create a fresh lambda array, unnamed--- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.Control.freshLambdaArray_'-freshLambdaArray_ :: (HasKind a, HasKind b, Lambda (SymbolicT IO) (a -> b), SymArray array) => (a -> b) -> Query (array a b)-freshLambdaArray_ = Trans.freshLambdaArray_  -- | If 'Data.SBV.verbose' is 'True', print the message, useful for debugging messages -- in custom queries. Note that 'Data.SBV.redirectVerbose' will be respected: If a
Data/SBV/Control/Query.hs view
@@ -23,9 +23,8 @@        send, ask, retrieveResponse      , CheckSatResult(..), checkSat, checkSatUsing, checkSatAssuming, checkSatAssumingWithUnsatisfiableSet      , getUnsatCore, getProof, getInterpolantMathSAT, getInterpolantZ3, getAbduct, getAbductNext, getAssignment, getOption-     , freshVar, freshVar_, freshArray, freshArray_, freshLambdaArray, freshLambdaArray_      , push, pop, getAssertionStackDepth-     , inNewAssertionStack, echo, caseSplit, resetAssertions, exit, getAssertions, getValue, getUninterpretedValue, getModel, getSMTResult+     , inNewAssertionStack, echo, caseSplit, resetAssertions, exit, getAssertions, getUninterpretedValue, getModel, getSMTResult      , getLexicographicOptResults, getIndependentOptResults, getParetoOptResults, getAllSatResult, getUnknownReason, getObservables, ensureSat      , SMTOption(..), SMTInfoFlag(..), SMTErrorBehavior(..), SMTReasonUnknown(..), SMTInfoResponse(..), getInfo      , Logic(..), Assignment(..)@@ -40,11 +39,10 @@  import Data.IORef (readIORef) -import qualified Data.Map.Strict    as M-import qualified Data.IntMap.Strict as IM-import qualified Data.Sequence      as S-import qualified Data.Text          as T-import qualified Data.Foldable      as F+import qualified Data.Map.Strict as M+import qualified Data.Sequence   as S+import qualified Data.Text       as T+import qualified Data.Foldable   as F   import Data.Char      (toLower)@@ -484,11 +482,8 @@ restoreTablesAndArrays = do st <- queryState                              tCount <- M.size  <$> (io . readIORef) (rtblMap   st)-                            aCount <- IM.size <$> (io . readIORef) (rArrayMap st) -                            let tInits = [ "table"  ++ show i ++ "_initializer" | i <- [0 .. tCount - 1]]-                                aInits = [ "array_" ++ show i ++ "_initializer" | i <- [0 .. aCount - 1]]-                                inits  = tInits ++ aInits+                            let inits = [ "table"  ++ show i ++ "_initializer" | i <- [0 .. tCount - 1]]                              case inits of                               []  -> return ()   -- Nothing to do
Data/SBV/Control/Utils.hs view
@@ -29,11 +29,11 @@        io      , ask, send, getValue, getFunction, getUninterpretedValue      , getValueCV, getUICVal, getUIFunCVAssoc, getUnsatAssumptions-     , SMTFunction(..), registerUISMTFunction+     , SMTFunction(..), registerUISMTFunction, registerSMTType      , getQueryState, modifyQueryState, getConfig, getObjectives, getUIs      , getSBVAssertions, getSBVPgm, getObservables      , checkSat, checkSatUsing, getAllSatResult-     , inNewContext, freshVar, freshVar_, freshArray, freshArray_, freshLambdaArray, freshLambdaArray_+     , inNewContext, freshVar, freshVar_      , getTopLevelInputs, parse, unexpected      , timeout, queryDebug, retrieveResponse, recoverKindedValue, runProofOn, executeQuery      ) where@@ -48,7 +48,6 @@  import qualified Data.Foldable      as F (toList) import qualified Data.Map.Strict    as Map-import qualified Data.IntMap.Strict as IMap import qualified Data.Sequence      as S import qualified Data.Text          as T @@ -68,21 +67,21 @@                               , HasKind(..), mkConstCV, CVal(..), SMTResult(..)                               , NamedSymVar, SMTConfig(..), SMTModel(..)                               , QueryState(..), SVal(..), cache-                              , newExpr, SBVExpr(..), Op(..), FPOp(..), SBV(..), SymArray(..)+                              , newExpr, SBVExpr(..), Op(..), FPOp(..), SBV(..)                               , SolverContext(..), SBool, Objective(..), SolverCapabilities(..), capabilities                               , Result(..), SMTProblem(..), trueSV, SymVal(..), SBVPgm(..), SMTSolver(..), SBVRunMode(..)                               , SBVType(..), forceSVArg, RoundingMode(RoundNearestTiesToEven), (.=>)-                              , RCSet(..), Lambda(..), QuantifiedBool(..)+                              , RCSet(..), QuantifiedBool(..), ArrayModel(..)                               )  import Data.SBV.Core.Symbolic ( IncState(..), withNewIncState, State(..), svToSV, symbolicEnv, SymbolicT-                              , MonadQuery(..), QueryContext(..), Queriable(..), Fresh(..), VarContext(..)+                              , MonadQuery(..), QueryContext(..), VarContext(..)                               , registerLabel, svMkSymVar, validationRequested                               , isSafetyCheckingIStage, isSetupIStage, isRunIStage, IStage(..), QueryT(..)                               , extractSymbolicSimulationState, MonadSymbolic(..), newUninterpreted                               , UserInputs, getSV, NamedSymVar(..), lookupInput, getUserName'                               , Name, CnstMap, UICodeKind(UINone), smtDefGivenName, Inputs(..), ProgInfo(..)-                              , mustIgnoreVar+                              , mustIgnoreVar, registerKind                               )  import Data.SBV.Core.AlgReals    (mergeAlgReals, AlgReal(..), RealPoint(..))@@ -99,8 +98,6 @@ import Data.SBV.Utils.SExpr import Data.SBV.Utils.PrettyNum (cvToSMTLib) -import Data.SBV.Lambda- import Data.SBV.Control.Types  import qualified Data.Set as Set (empty, fromList, toAscList)@@ -176,7 +173,6 @@                            arrange (i, (at, rt, es)) = ((i, at, rt), es)                        inps        <- reverse <$> readIORef (rNewInps is)                        ks          <- readIORef (rNewKinds is)-                       arrs        <- IMap.toAscList <$> readIORef (rNewArrs is)                        tbls        <- map arrange . sortBy cmp . map swap . Map.toList <$> readIORef (rNewTbls is)                        uis         <- Map.toAscList <$> readIORef (rNewUIs is)                        as          <- readIORef (rNewAsgns is)@@ -184,7 +180,7 @@                         let cnsts = sortBy cmp . map swap . Map.toList $ newConsts -                       return $ toIncSMTLib cfg progInfo inps ks (allConsts, cnsts) arrs tbls uis as constraints cfg+                       return $ toIncSMTLib cfg progInfo inps ks (allConsts, cnsts) tbls uis as constraints cfg         mapM_ (send True) $ mergeSExpr ls  -- | Retrieve the query context@@ -218,20 +214,6 @@                       syncUpSolver progInfo rconstMap is                       return r --- | Generic 'Queriable' instance for 'SymVal' values-instance {-# OVERLAPPABLE #-} (MonadIO m, SymVal a) => Queriable m (SBV a) where-  type QueryResult (SBV a) = a-  create  = freshVar_-  project = getValue-  embed   = return . literal---- | Generic 'Queriable' instance for things that are 'Fresh' and look like containers:-instance {-# OVERLAPPABLE #-} (MonadIO m, SymVal a, Foldable t, Traversable t, Fresh m (t (SBV a))) => Queriable m (t (SBV a)) where-  type QueryResult (t (SBV a)) = t a-  create  = fresh-  project = mapM getValue-  embed   = return . fmap literal- -- | Generalization of 'Data.SBV.Control.freshVar_' freshVar_ :: forall a m. (MonadIO m, MonadQuery m, SymVal a) => m (SBV a) freshVar_ = inNewContext $ fmap SBV . svMkSymVar QueryVar k Nothing@@ -242,32 +224,6 @@ freshVar nm = inNewContext $ fmap SBV . svMkSymVar QueryVar k (Just nm)   where k = kindOf (Proxy @a) --- | Generalization of 'Data.SBV.Control.freshArray_'-freshArray_ :: (MonadIO m, MonadQuery m, SymArray array, HasKind a, HasKind b) => Maybe (SBV b) -> m (array a b)-freshArray_ = mkFreshArray Nothing---- | Generalization of 'Data.SBV.Control.freshArray'-freshArray :: (MonadIO m, MonadQuery m, SymArray array, HasKind a, HasKind b) => String -> Maybe (SBV b) -> m (array a b)-freshArray nm = mkFreshArray (Just nm)---- | Creating arrays, internal use only.-mkFreshArray :: (MonadIO m, MonadQuery m, SymArray array, HasKind a, HasKind b) => Maybe String -> Maybe (SBV b) -> m (array a b)-mkFreshArray mbNm mbVal = inNewContext $ newArrayInState mbNm (Left mbVal)---- | Generalization of 'Data.SBV.Control.freshLambdaArray_'-freshLambdaArray_ :: (MonadIO m, MonadQuery m, SymArray array, HasKind a, HasKind b, Lambda (SymbolicT IO) (a -> b)) => (a -> b) -> m (array a b)-freshLambdaArray_ = mkFreshLambdaArray Nothing---- | Generalization of 'Data.SBV.Control.freshLambdaArray'-freshLambdaArray :: (MonadIO m, MonadQuery m, SymArray array, HasKind a, HasKind b, Lambda (SymbolicT IO) (a -> b)) => String -> (a -> b) -> m (array a b)-freshLambdaArray nm = mkFreshLambdaArray (Just nm)---- | Creating arrays, internal use only.-mkFreshLambdaArray :: forall m array a b. (MonadIO m, MonadQuery m, SymArray array, HasKind a, HasKind b, Lambda (SymbolicT IO) (a -> b)) => Maybe String -> (a -> b) -> m (array a b)-mkFreshLambdaArray mbNm f = inNewContext $ \st -> do-                                lam <- lambdaStr st (kindOf (Proxy @b)) f-                                newArrayInState mbNm (Right lam) st- -- | Generalization of 'Data.SBV.Control.queryDebug' queryDebug :: (MonadIO m, MonadQuery m) => [String] -> m () queryDebug msgs = do QueryState{queryConfig} <- getQueryState@@ -475,12 +431,19 @@  -- | Registering an uninterpreted SMT function. This is typically not necessary as uses of the UI -- function itself will register it automatically. But there are cases where doing this explicitly can--- come in handy.+-- come in handy, typically in query contexts. registerUISMTFunction :: (MonadIO m, SolverContext m) => SMTFunction fun a r => fun -> m () registerUISMTFunction f = do st                <- contextState                              (nmas, isCurried) <- smtFunName f                              io $ newUninterpreted st nmas (smtFunType f) (UINone isCurried) +-- | Register a kind with the solver. Like 'registerUISMTFunction', this is typically not necessary+-- since SBV will register kinds as it encounters them automatically. But there are cases+-- where doing this can explicitly can come handy, typically in query contexts.+registerSMTType :: forall a m. (MonadIO m, SolverContext m, HasKind a) => Proxy a -> m ()+registerSMTType _ = do st <- contextState+                       liftIO $ registerKind st (kindOf (Proxy @a))+ -- | Pointwise function value extraction. If we get unlucky and can't parse z3's output (happens -- when we have all booleans and z3 decides to spit out an expression), just brute force our -- way out of it. Note that we only do this if we have a pure boolean type, as otherwise we'd blow@@ -923,6 +886,7 @@         cvt (KTuple ks)      = CTuple $ map cvt ks         cvt (KMaybe _)       = CMaybe Nothing         cvt (KEither k1 _)   = CEither . Left $ cvt k1     -- why not?+        cvt (KArray  _  k2)  = CArray $ ArrayModel [] (cvt k2)          -- Tricky case of uninterpreted         uninterp _ (Just (c:_)) = CUserSort (Just 1, c)@@ -951,7 +915,7 @@                                        | EReal i     <- e      -> Just $ CV KReal (CAlgReal i)                                        | True                  -> interpretInterval e -                           KUserSort{} | ECon s <- e           -> Just $ CV k $ CUserSort (getUIIndex k s, s)+                           KUserSort{} | ECon s <- e           -> Just $ CV k $ CUserSort (getUIIndex k s, trim s)                                        | True                  -> Nothing                             KFloat      | ENum (i, _) <- e      -> Just $ mkConstCV k i@@ -974,23 +938,24 @@                            KString     | ECon s      <- e      -> Just $ CV KString $ CString $ interpretString s                                        | True                  -> Nothing -                           KRational                           -> Just $ CV k $ CRational $ interpretRational e--                           KList ek                            -> Just $ CV k $ CList $ interpretList ek e--                           KSet ek                             -> Just $ CV k $ CSet $ interpretSet ek e--                           KTuple{}                            -> Just $ CV k $ CTuple $ interpretTuple e--                           KMaybe{}                            -> Just $ CV k $ CMaybe $ interpretMaybe k e--                           KEither{}                           -> Just $ CV k $ CEither $ interpretEither k e+                           KRational                           -> Just $ CV k $ CRational $ interpretRational       e+                           KList ek                            -> Just $ CV k $ CList     $ interpretList ek        e+                           KSet ek                             -> Just $ CV k $ CSet      $ interpretSet ek         e+                           KTuple{}                            -> Just $ CV k $ CTuple    $ interpretTuple          e+                           KMaybe{}                            -> Just $ CV k $ CMaybe    $ interpretMaybe    k     e+                           KEither{}                           -> Just $ CV k $ CEither   $ interpretEither   k     e+                           KArray k1 k2                        -> Just $ CV k $ CArray    $ interpretArray    k1 k2 e    where getUIIndex (KUserSort  _ (Just xs)) i = i `elemIndex` xs         getUIIndex _                        _ = Nothing          stringLike xs = length xs >= 2 && "\"" `isPrefixOf` xs && "\"" `isSuffixOf` xs +        -- z3 prints uninterpreted values like this: T!val!4. Turn that into T_4+        trim "" = ""+        trim ('!':'v':'a':'l':'!':rest) = '_' : trim rest+        trim (c:cs) = c : trim cs+         -- Make sure strings are really strings         interpretString xs           | not (stringLike xs)@@ -1142,7 +1107,29 @@                 border b (CV KReal (CAlgReal (AlgRational True v))) = pure $ b v                 border _ other                                      = error $ "Data.SBV.interpretInterval.border: Expected a real-valued sexp, but received: " ++ show other +        -- Essentially treat sets as functions, since we do allow for store associations+        interpretArray k1 k2 expr = case parseSExprFunction expr of+                                      Just (Right ascs) -> decode ascs+                                      _                 -> tbd "Expected a set value, but couldn't decipher the solver output." +           where tbd :: String -> a+                 tbd w = error $ unlines [ ""+                                         , "*** Data.SBV.interpretArray: Unable to process solver output."+                                         , "***"+                                         , "*** Kind    : " ++ show k+                                         , "*** Received: " ++ show e+                                         , "*** Reason  : " ++ w+                                         , "***"+                                         , "*** This is either a bug or something SBV currently does not support."+                                         , "*** Please report this as a feature request!"+                                         ]++                 decode (args, d) = ArrayModel [(cvt k1 l, cvt k2 [r]) | (l, r) <- args] (cvt k2 [d])+                   where cvt ek [v] = case recoverKindedValue ek v of+                                         Just (CV _ x) -> x+                                         _             -> tbd $ "Cannot convert value: " ++ show v+                         cvt _ vs   = tbd $ "Unexpected function-like-value as array index" ++ show vs+ -- | Generalization of 'Data.SBV.Control.getValueCV' getValueCV :: (MonadIO m, MonadQuery m) => Maybe Int -> SV -> m CV getValueCV mbi s@@ -1839,7 +1826,7 @@  -- | Convert a query result to an SMT Problem runProofOn :: SBVRunMode -> QueryContext -> [String] -> Result -> SMTProblem-runProofOn rm context comments res@(Result progInfo ki _qcInfo _observables _codeSegs is consts tbls arrs uis defns pgm cstrs _assertions outputs) =+runProofOn rm context comments res@(Result progInfo ki _qcInfo _observables _codeSegs is consts tbls uis defns pgm cstrs _assertions outputs) =      let (config, isSat, isSafe, isSetup) = case rm of                                               SMTMode _ stage s c -> (c, s, isSafetyCheckingIStage stage, isSetupIStage stage)                                               _                   -> error $ "runProofOn: Unexpected run mode: " ++ show rm@@ -1857,7 +1844,7 @@                                                , "*** Check calls to \"output\", they are typically not needed!"                                                ] -     in SMTProblem { smtLibPgm = toSMTLib config context progInfo ki isSat comments is consts tbls arrs uis defns pgm cstrs o }+     in SMTProblem { smtLibPgm = toSMTLib config context progInfo ki isSat comments is consts tbls uis defns pgm cstrs o }  -- | Generalization of 'Data.SBV.Control.executeQuery' executeQuery :: forall m a. ExtractIO m => QueryContext -> QueryT m a -> SymbolicT m a
Data/SBV/Core/Concrete.hs view
@@ -72,23 +72,36 @@ instance HasKind a => HasKind (RCSet a) where   kindOf _ = KSet (kindOf (Proxy @a)) +-- | Underlying type for SMTLib arrays, as a list of key-value pairs, with a default for unmapped+-- elements. Note that this type matches the typical models returned by SMT-solvers.+-- When we store the array, we do not bother removing earlier writes, so there might be duplicates.+-- That is, we store the history of the writes. The earlier a pair is in the list, the "later" it+-- is done, i.e., it takes precedence over the latter entries.+data ArrayModel a b = ArrayModel [(a, b)] b+                     deriving G.Data++-- | The kind of an ArrayModel+instance (HasKind a, HasKind b) => HasKind (ArrayModel a b) where+   kindOf _ = KArray (kindOf (Proxy @a)) (kindOf (Proxy @b))+ -- | A constant value. -- Note: If you add a new constructor here, make sure you add the -- corresponding equality in the instance "Eq CVal" and "Ord CVal"!-data CVal = CAlgReal  !AlgReal             -- ^ Algebraic real-          | CInteger  !Integer             -- ^ Bit-vector/unbounded integer-          | CFloat    !Float               -- ^ Float-          | CDouble   !Double              -- ^ Double-          | CFP       !FP                  -- ^ Arbitrary float-          | CRational Rational             -- ^ Rational-          | CChar     !Char                -- ^ Character-          | CString   !String              -- ^ String-          | CList     ![CVal]              -- ^ List-          | CSet      !(RCSet CVal)        -- ^ Set. Can be regular or complemented.-          | CUserSort !(Maybe Int, String) -- ^ Value of an uninterpreted/user kind. The Maybe Int shows index position for enumerations-          | CTuple    ![CVal]              -- ^ Tuple-          | CMaybe    !(Maybe CVal)        -- ^ Maybe-          | CEither   !(Either CVal CVal)  -- ^ Disjoint union+data CVal = CAlgReal  !AlgReal                -- ^ Algebraic real+          | CInteger  !Integer                -- ^ Bit-vector/unbounded integer+          | CFloat    !Float                  -- ^ Float+          | CDouble   !Double                 -- ^ Double+          | CFP       !FP                     -- ^ Arbitrary float+          | CRational Rational                -- ^ Rational+          | CChar     !Char                   -- ^ Character+          | CString   !String                 -- ^ String+          | CList     ![CVal]                 -- ^ List+          | CSet      !(RCSet CVal)           -- ^ Set. Can be regular or complemented.+          | CUserSort !(Maybe Int, String)    -- ^ Value of an uninterpreted/user kind. The Maybe Int shows index position for enumerations+          | CTuple    ![CVal]                 -- ^ Tuple+          | CMaybe    !(Maybe CVal)           -- ^ Maybe+          | CEither   !(Either CVal CVal)     -- ^ Disjoint union+          | CArray    !(ArrayModel CVal CVal) -- ^ Arrays are backed by look-up tables concretely           deriving G.Data  -- | Assign a rank to constant values, this is structural and helps with ordering@@ -107,8 +120,9 @@ cvRank CTuple    {} = 11 cvRank CMaybe    {} = 12 cvRank CEither   {} = 13+cvRank CArray    {} = 14 --- | Eq instance for CVVal. Note that we cannot simply derive Eq/Ord, since CVAlgReal doesn't have proper+-- | Eq instance for CVal. Note that we cannot simply derive Eq/Ord, since CVAlgReal doesn't have proper -- instances for these when values are infinitely precise reals. However, we do -- need a structural eq/ord for Map indexes; so define custom ones here: instance Eq CVal where@@ -126,6 +140,10 @@   CTuple    a == CTuple    b = a == b   CMaybe    a == CMaybe    b = a == b   CEither   a == CEither   b = a == b++  -- This is legit since we don't use this equality for actual semantic" equality, but rather as an index into maps+  CArray    (ArrayModel a1 d1) == CArray (ArrayModel a2 d2) = (a1, d1) == (a2, d2)+   a           == b           = if cvRank a == cvRank b                                   then error $ unlines [ ""                                                        , "*** Data.SBV.Eq.CVal: Impossible happened: same rank in comparison fallthru"@@ -136,7 +154,7 @@                                                        ]                                   else False --- | Ord instance for VWVal. Same comments as the 'Eq' instance why this cannot be derived.+-- | Ord instance for CVal. Same comments as the 'Eq' instance why this cannot be derived. instance Ord CVal where   CAlgReal  a `compare` CAlgReal  b = a `algRealStructuralCompare` b   CInteger  a `compare` CInteger  b = a `compare`                  b@@ -152,6 +170,10 @@   CTuple    a `compare` CTuple    b = a `compare`                  b   CMaybe    a `compare` CMaybe    b = a `compare`                  b   CEither   a `compare` CEither   b = a `compare`                  b++  -- This is legit since we don't use this equality for actual semantic order, but rather as an index into maps+  CArray    (ArrayModel a1 d1) `compare` CArray (ArrayModel a2 d2) = (a1, d1) `compare` (a2, d2)+   a           `compare` b           = let ra = cvRank a                                           rb = cvRank b                                       in if ra == rb@@ -280,69 +302,6 @@ trueCV :: CV trueCV  = CV KBool (CInteger 1) --- | Lift a unary function through a 'CV'.-liftCV :: (AlgReal             -> b)-       -> (Integer             -> b)-       -> (Float               -> b)-       -> (Double              -> b)-       -> (FP                  -> b)-       -> (Rational            -> b)-       -> (Char                -> b)-       -> (String              -> b)-       -> ((Maybe Int, String) -> b)-       -> ([CVal]              -> b)-       -> (RCSet CVal          -> b)-       -> ([CVal]              -> b)-       -> (Maybe CVal          -> b)-       -> (Either CVal CVal    -> b)-       -> CV-       -> b-liftCV f _ _ _ _ _ _ _ _ _ _ _ _ _ (CV _ (CAlgReal  v)) = f v-liftCV _ f _ _ _ _ _ _ _ _ _ _ _ _ (CV _ (CInteger  v)) = f v-liftCV _ _ f _ _ _ _ _ _ _ _ _ _ _ (CV _ (CFloat    v)) = f v-liftCV _ _ _ f _ _ _ _ _ _ _ _ _ _ (CV _ (CDouble   v)) = f v-liftCV _ _ _ _ f _ _ _ _ _ _ _ _ _ (CV _ (CFP       v)) = f v-liftCV _ _ _ _ _ f _ _ _ _ _ _ _ _ (CV _ (CRational v)) = f v-liftCV _ _ _ _ _ _ f _ _ _ _ _ _ _ (CV _ (CChar     v)) = f v-liftCV _ _ _ _ _ _ _ f _ _ _ _ _ _ (CV _ (CString   v)) = f v-liftCV _ _ _ _ _ _ _ _ f _ _ _ _ _ (CV _ (CUserSort v)) = f v-liftCV _ _ _ _ _ _ _ _ _ f _ _ _ _ (CV _ (CList     v)) = f v-liftCV _ _ _ _ _ _ _ _ _ _ f _ _ _ (CV _ (CSet      v)) = f v-liftCV _ _ _ _ _ _ _ _ _ _ _ f _ _ (CV _ (CTuple    v)) = f v-liftCV _ _ _ _ _ _ _ _ _ _ _ _ f _ (CV _ (CMaybe    v)) = f v-liftCV _ _ _ _ _ _ _ _ _ _ _ _ _ f (CV _ (CEither   v)) = f v---- | Lift a binary function through a 'CV'.-liftCV2 :: (AlgReal             -> AlgReal             -> b)-        -> (Integer             -> Integer             -> b)-        -> (Float               -> Float               -> b)-        -> (Double              -> Double              -> b)-        -> (FP                  -> FP                  -> b)-        -> (Rational            -> Rational            -> b)-        -> (Char                -> Char                -> b)-        -> (String              -> String              -> b)-        -> ([CVal]              -> [CVal]              -> b)-        -> ([CVal]              -> [CVal]              -> b)-        -> (Maybe CVal          -> Maybe CVal          -> b)-        -> (Either CVal CVal    -> Either CVal CVal    -> b)-        -> ((Maybe Int, String) -> (Maybe Int, String) -> b)-        -> CV                   -> CV                  -> b-liftCV2 r i f d af ra c s u v m e w x y = case (cvVal x, cvVal y) of-                                           (CAlgReal   a, CAlgReal   b) -> r  a b-                                           (CInteger   a, CInteger   b) -> i  a b-                                           (CFloat     a, CFloat     b) -> f  a b-                                           (CDouble    a, CDouble    b) -> d  a b-                                           (CFP        a, CFP        b) -> af a b-                                           (CRational  a, CRational  b) -> ra a b-                                           (CChar      a, CChar      b) -> c  a b-                                           (CString    a, CString    b) -> s  a b-                                           (CList      a, CList      b) -> u  a b-                                           (CTuple     a, CTuple     b) -> v  a b-                                           (CMaybe     a, CMaybe     b) -> m  a b-                                           (CEither    a, CEither    b) -> e  a b-                                           (CUserSort  a, CUserSort  b) -> w  a b-                                           _                            -> error $ "SBV.liftCV2: impossible, incompatible args received: " ++ show (x, y)- -- | Map a unary function through a 'CV'. mapCV :: (AlgReal             -> AlgReal)       -> (Integer             -> Integer)@@ -350,26 +309,23 @@       -> (Double              -> Double)       -> (FP                  -> FP)       -> (Rational            -> Rational)-      -> (Char                -> Char)-      -> (String              -> String)-      -> ((Maybe Int, String) -> (Maybe Int, String))-      -> CV-      -> CV-mapCV r i f d af ra c s u x  = normCV $ CV (kindOf x) $ case cvVal x of-                                                          CAlgReal  a -> CAlgReal  (r  a)-                                                          CInteger  a -> CInteger  (i  a)-                                                          CFloat    a -> CFloat    (f  a)-                                                          CDouble   a -> CDouble   (d  a)-                                                          CFP       a -> CFP       (af a)-                                                          CRational a -> CRational (ra a)-                                                          CChar     a -> CChar     (c  a)-                                                          CString   a -> CString   (s  a)-                                                          CUserSort a -> CUserSort (u  a)-                                                          CList{}     -> error "Data.SBV.mapCV: Unexpected call through mapCV with lists!"-                                                          CSet{}      -> error "Data.SBV.mapCV: Unexpected call through mapCV with sets!"-                                                          CTuple{}    -> error "Data.SBV.mapCV: Unexpected call through mapCV with tuples!"-                                                          CMaybe{}    -> error "Data.SBV.mapCV: Unexpected call through mapCV with maybe!"-                                                          CEither{}   -> error "Data.SBV.mapCV: Unexpected call through mapCV with either!"+      -> CV                   -> CV+mapCV r i f d af ra x  = normCV $ CV (kindOf x) $ case cvVal x of+                                                    CAlgReal  a -> CAlgReal  (r  a)+                                                    CInteger  a -> CInteger  (i  a)+                                                    CFloat    a -> CFloat    (f  a)+                                                    CDouble   a -> CDouble   (d  a)+                                                    CFP       a -> CFP       (af a)+                                                    CRational a -> CRational (ra a)+                                                    CChar{}     -> error "Data.SBV.mapCV: Unexpected call through mapCV with chars!"+                                                    CString{}   -> error "Data.SBV.mapCV: Unexpected call through mapCV with strings!"+                                                    CUserSort{} -> error "Data.SBV.mapCV: Unexpected call through mapCV with uninterpreted sorts!"+                                                    CList{}     -> error "Data.SBV.mapCV: Unexpected call through mapCV with lists!"+                                                    CSet{}      -> error "Data.SBV.mapCV: Unexpected call through mapCV with sets!"+                                                    CTuple{}    -> error "Data.SBV.mapCV: Unexpected call through mapCV with tuples!"+                                                    CMaybe{}    -> error "Data.SBV.mapCV: Unexpected call through mapCV with maybe!"+                                                    CEither{}   -> error "Data.SBV.mapCV: Unexpected call through mapCV with either!"+                                                    CArray{}    -> error "Data.SBV.mapCV: Unexpected call through mapCV with arrays!"  -- | Map a binary function through a 'CV'. mapCV2 :: (AlgReal             -> AlgReal             -> AlgReal)@@ -378,27 +334,26 @@        -> (Double              -> Double              -> Double)        -> (FP                  -> FP                  -> FP)        -> (Rational            -> Rational            -> Rational)-       -> (Char                -> Char                -> Char)-       -> (String              -> String              -> String)-       -> ((Maybe Int, String) -> (Maybe Int, String) -> (Maybe Int, String))-       -> CV-       -> CV-       -> CV-mapCV2 r i f d af ra c s u x y = case (cvSameType x y, cvVal x, cvVal y) of-                                  (True, CAlgReal  a, CAlgReal  b) -> normCV $ CV (kindOf x) (CAlgReal  (r  a b))-                                  (True, CInteger  a, CInteger  b) -> normCV $ CV (kindOf x) (CInteger  (i  a b))-                                  (True, CFloat    a, CFloat    b) -> normCV $ CV (kindOf x) (CFloat    (f  a b))-                                  (True, CDouble   a, CDouble   b) -> normCV $ CV (kindOf x) (CDouble   (d  a b))-                                  (True, CFP       a, CFP       b) -> normCV $ CV (kindOf x) (CFP       (af a b))-                                  (True, CRational a, CRational b) -> normCV $ CV (kindOf x) (CRational (ra a b))-                                  (True, CChar     a, CChar     b) -> normCV $ CV (kindOf x) (CChar     (c  a b))-                                  (True, CString   a, CString   b) -> normCV $ CV (kindOf x) (CString   (s  a b))-                                  (True, CUserSort a, CUserSort b) -> normCV $ CV (kindOf x) (CUserSort (u  a b))-                                  (True, CList{},     CList{})     -> error "Data.SBV.mapCV2: Unexpected call through mapCV2 with lists!"-                                  (True, CTuple{},    CTuple{})    -> error "Data.SBV.mapCV2: Unexpected call through mapCV2 with tuples!"-                                  (True, CMaybe{},    CMaybe{})    -> error "Data.SBV.mapCV2: Unexpected call through mapCV2 with maybes!"-                                  (True, CEither{},   CEither{})   -> error "Data.SBV.mapCV2: Unexpected call through mapCV2 with eithers!"-                                  _                                -> error $ "Data.SBV.mapCV2: impossible, incompatible args received: " ++ show (x, y)+       -> CV                   -> CV                  -> CV+mapCV2 r i f d af ra x y = case (cvSameType x y, cvVal x, cvVal y) of+                            (True, CAlgReal  a, CAlgReal  b) -> normCV $ CV (kindOf x) (CAlgReal  (r  a b))+                            (True, CInteger  a, CInteger  b) -> normCV $ CV (kindOf x) (CInteger  (i  a b))+                            (True, CFloat    a, CFloat    b) -> normCV $ CV (kindOf x) (CFloat    (f  a b))+                            (True, CDouble   a, CDouble   b) -> normCV $ CV (kindOf x) (CDouble   (d  a b))+                            (True, CFP       a, CFP       b) -> normCV $ CV (kindOf x) (CFP       (af a b))+                            (True, CRational a, CRational b) -> normCV $ CV (kindOf x) (CRational (ra a b))+                            (True, CChar{},     CChar{})     -> unexpected "chars!"+                            (True, CString{},   CString{})   -> unexpected "strings!"+                            (True, CUserSort{}, CUserSort{}) -> unexpected "uninterpreted constants!"+                            (True, CList{},     CList{})     -> unexpected "lists!"+                            (True, CTuple{},    CTuple{})    -> unexpected "tuples!"+                            (True, CMaybe{},    CMaybe{})    -> unexpected "maybes!"+                            (True, CEither{},   CEither{})   -> unexpected "eithers!"+                            _                                -> unexpected $ "incompatible args: " ++ show (x, y)+   where unexpected w = error $ unlines [ ""+                                        , "*** Data.SBV.mapCV2: Unexpected call through mapCV2 with " ++ w+                                        , "*** Please report this as a bug!"+                                        ]  -- | Show instance for 'CV'. instance Show CV where@@ -412,55 +367,76 @@ -- | Show a CV, with kind info if bool is True showCV :: Bool -> CV -> String showCV shk w | isBoolean w = show (cvToBool w) ++ (if shk then " :: Bool" else "")-showCV shk w               = liftCV show show show show show show show show snd shL shS shT shMaybe shEither w ++ kInfo-      where kw = kindOf w+showCV shk w = sh (cvVal w) ++ kInfo+  where kInfo | shk  = " :: " ++ showBaseKind wk+              | True = "" -            kInfo | shk  = " :: " ++ showBaseKind kw-                  | True = ""+        wk = kindOf w -            shL xs = "[" ++ intercalate "," (map (showCV False . CV ke) xs) ++ "]"-              where ke = case kw of-                           KList k -> k-                           _       -> error $ "Data.SBV.showCV: Impossible happened, expected list, got: " ++ show kw+        sh (CAlgReal  v) = show v+        sh (CInteger  v) = show v+        sh (CFloat    v) = show v+        sh (CDouble   v) = show v+        sh (CFP       v) = show v+        sh (CRational v) = show v+        sh (CChar     v) = show v+        sh (CString   v) = show v+        sh (CUserSort v) = snd  v+        sh (CList     v) = shL  v+        sh (CSet      v) = shS  v+        sh (CTuple    v) = shT  v+        sh (CMaybe    v) = shM  v+        sh (CEither   v) = shE  v+        sh (CArray    v) = shA  v -            -- we represent complements as @U - set@. This might be confusing, but is utterly cute!-            shS :: RCSet CVal -> String-            shS eru = case eru of-                        RegularSet    e              -> sh e-                        ComplementSet e | Set.null e -> "U"-                                        | True       -> "U - " ++ sh e-              where sh xs = "{" ++ intercalate "," (map (showCV False . CV ke) (Set.toList xs)) ++ "}"-                    ke = case kw of-                           KSet k -> k-                           _      -> error $ "Data.SBV.showCV: Impossible happened, expected set, got: " ++ show kw+        shL xs = "[" ++ intercalate "," (map (showCV False . CV ke) xs) ++ "]"+          where ke = case wk of+                       KList k -> k+                       _       -> error $ "Data.SBV.showCV: Impossible happened, expected list, got: " ++ show wk -            shT :: [CVal] -> String-            shT xs = "(" ++ intercalate "," xs' ++ ")"-              where xs' = case kw of-                            KTuple ks | length ks == length xs -> zipWith (\k x -> showCV False (CV k x)) ks xs-                            _   -> error $ "Data.SBV.showCV: Impossible happened, expected tuple (of length " ++ show (length xs) ++ "), got: " ++ show kw+        -- we represent complements as @U - set@. This might be confusing, but is utterly cute!+        shS :: RCSet CVal -> String+        shS eru = case eru of+                    RegularSet    e              -> set e+                    ComplementSet e | Set.null e -> "U"+                                    | True       -> "U - " ++ set e+          where set xs = "{" ++ intercalate "," (map (showCV False . CV ke) (Set.toList xs)) ++ "}"+                ke = case wk of+                       KSet k -> k+                       _      -> error $ "Data.SBV.showCV: Impossible happened, expected set, got: " ++ show wk -            shMaybe :: Maybe CVal -> String-            shMaybe c = case (c, kw) of-                          (Nothing, KMaybe{}) -> "Nothing"-                          (Just x,  KMaybe k) -> "Just " ++ paren (showCV False (CV k x))-                          _                   -> error $ "Data.SBV.showCV: Impossible happened, expected maybe, got: " ++ show kw+        shT :: [CVal] -> String+        shT xs = "(" ++ intercalate "," xs' ++ ")"+          where xs' = case wk of+                        KTuple ks | length ks == length xs -> zipWith (\k x -> showCV False (CV k x)) ks xs+                        _   -> error $ "Data.SBV.showCV: Impossible happened, expected tuple (of length " ++ show (length xs) ++ "), got: " ++ show wk -            shEither :: Either CVal CVal -> String-            shEither val-              | KEither k1 k2 <- kw = case val of-                                        Left  x -> "Left "  ++ paren (showCV False (CV k1 x))-                                        Right y -> "Right " ++ paren (showCV False (CV k2 y))-              | True                = error $ "Data.SBV.showCV: Impossible happened, expected sum, got: " ++ show kw+        shM :: Maybe CVal -> String+        shM c = case (c, wk) of+                  (Nothing, KMaybe{}) -> "Nothing"+                  (Just x,  KMaybe k) -> "Just " ++ paren (showCV False (CV k x))+                  _                   -> error $ "Data.SBV.showCV: Impossible happened, expected maybe, got: " ++ show wk -            -- kind of crude, but works ok-            paren v-              | needsParen = '(' : v ++ ")"-              | True       = v-              where needsParen = case dropWhile isSpace v of-                                   []         -> False-                                   rest@(x:_) -> x == '-' || (any isSpace rest && x `notElem` "{[(")+        shE :: Either CVal CVal -> String+        shE val+          | KEither k1 k2 <- wk = case val of+                                    Left  x -> "Left "  ++ paren (showCV False (CV k1 x))+                                    Right y -> "Right " ++ paren (showCV False (CV k2 y))+          | True                = error $ "Data.SBV.showCV: Impossible happened, expected sum, got: " ++ show wk +        shA :: ArrayModel CVal CVal -> String+        shA (ArrayModel assocs def)+          | KArray k1 k2 <- wk = "([" ++ intercalate "," [showCV False (CV (KTuple [k1, k2]) (CTuple [a, b])) | (a, b) <- assocs] ++ "], " ++ showCV False (CV k2 def) ++ ")"+          | True               = error $ "Data.SBV.showCV: Impossible happened, expected array, got: " ++ show wk++        -- kind of crude, but works ok+        paren v+          | needsParen = '(' : v ++ ")"+          | True       = v+          where needsParen = case dropWhile isSpace v of+                               []         -> False+                               rest@(x:_) -> x == '-' || (any isSpace rest && x `notElem` "{[(")+ -- | Create a constant word from an integral. mkConstCV :: Integral a => Kind -> a -> CV mkConstCV KBool           a = normCV $ CV KBool      (CInteger  (toInteger a))@@ -479,6 +455,7 @@ mkConstCV k@KTuple{}      a = error $ "Unexpected call to mkConstCV (" ++ show k ++ ") with value: " ++ show (toInteger a) mkConstCV k@KMaybe{}      a = error $ "Unexpected call to mkConstCV (" ++ show k ++ ") with value: " ++ show (toInteger a) mkConstCV k@KEither{}     a = error $ "Unexpected call to mkConstCV (" ++ show k ++ ") with value: " ++ show (toInteger a)+mkConstCV k@KArray{}      a = error $ "Unexpected call to mkConstCV (" ++ show k ++ ") with value: " ++ show (toInteger a)  -- | Generate a random constant value ('CVal') of the correct kind. randomCVal :: Kind -> IO CVal@@ -519,6 +496,11 @@                              if i                                 then CEither . Left  <$> randomCVal k1                                 else CEither . Right <$> randomCVal k2+    KArray k1 k2       -> do l   <- randomRIO (0, 100)+                             ks  <- replicateM l (randomCVal k1)+                             vs  <- replicateM l (randomCVal k2)+                             def <- randomCVal k2+                             return $ CArray $ ArrayModel (zip ks vs) def   where     bounds :: Bool -> Int -> (Integer, Integer)     bounds False w = (0, 2^w - 1)
Data/SBV/Core/Data.hs view
@@ -34,7 +34,7 @@  , SWord, SInt, WordN, IntN  , SRational  , SChar, SString, SList- , SEither, SMaybe+ , SEither, SMaybe, SArray, ArrayModel(..)  , STuple, STuple2, STuple3, STuple4, STuple5, STuple6, STuple7, STuple8  , RCSet(..), SSet  , nan, infinity, sNaN, sInfinity, RoundingMode(..), SRoundingMode@@ -42,15 +42,14 @@  , sRNE, sRNA, sRTP, sRTN, sRTZ  , SymVal(..)  , CV(..), CVal(..), AlgReal(..), AlgRealPoly(..), ExtCV(..), GeneralizedCV(..), isRegularCV, cvSameType, cvToBool- , mkConstCV ,liftCV2, mapCV, mapCV2+ , mkConstCV , mapCV, mapCV2  , SV(..), trueSV, falseSV, trueCV, falseCV, normCV  , SVal(..)  , sTrue, sFalse, sNot, (.&&), (.||), (.<+>), (.~&), (.~|), (.=>), (.<=>), sAnd, sOr, sAny, sAll, fromBool  , SBV(..), NodeId(..), mkSymSBV- , ArrayContext(..), ArrayInfo, SymArray(..), SArray(..)  , sbvToSV, sbvToSymSV, forceSVArg  , SBVExpr(..), newExpr- , cache, Cached, uncache, uncacheAI, HasKind(..)+ , cache, Cached, uncache, HasKind(..)  , Op(..), PBOp(..), FPOp(..), StrOp(..), RegExOp(..), SeqOp(..), RegExp(..), NamedSymVar(..), OvOp(..), getTableIndex  , SBVPgm(..), Symbolic, runSymbolic, State, getPathCondition, extendPathCondition  , inSMTMode, SBVRunMode(..), Kind(..), Outputtable(..), Result(..)@@ -63,7 +62,7 @@  , SMTScript(..), Solver(..), SMTSolver(..), SMTResult(..), SMTModel(..), SMTConfig(..)  , OptimizeStyle(..), Penalty(..), Objective(..)  , QueryState(..), QueryT(..), SMTProblem(..), Constraint(..), Lambda(..), Forall(..), Exists(..), ExistsUnique(..), ForallN(..), ExistsN(..)- , QuantifiedBool(..), EqSymbolic(..), QNot(..), Skolemize(skolemize, taggedSkolemize)+ , QuantifiedBool(..), EqSymbolic(..), QNot(..), Skolemize(SkolemsTo, skolemize, taggedSkolemize)  , bvExtract, (#), bvDrop, bvTake  ) where @@ -87,9 +86,6 @@ import qualified GHC.Generics  as G import qualified Data.Generics as G (Data(..)) -import qualified Data.IORef         as R    (readIORef)-import qualified Data.IntMap.Strict as IMap (size, insert)- import System.Random  import Data.SBV.Core.AlgReals@@ -209,9 +205,20 @@ -- | Symbolic 'Maybe' type SMaybe a = SBV (Maybe a) +-- | Symbolic arrays. A symbolic array is more akin to a function in SMTLib (and thus in SBV),+-- as opposed to contagious-storage with a finite range as found in many programming languages.+-- Additionally, the domain uses object-equality in the SMTLib semantics. Object equality is+-- the same as regular equality for most types, except for IEEE-Floats, where @NaN@ doesn't compare+-- equal to itself and @+0@ and @-0@ are not distinguished. So, if your index type is a float,+-- then @NaN@ can be stored correctly, and @0@ and @-0@ will be distinguished. If you don't use+-- floats, then you can treat this the same as regular equality in Haskell.+type SArray a b = SBV (ArrayModel a b)+ -- | Symbolic 'Data.Set'. Note that we use 'RCSet', which supports -- both regular sets and complements, i.e., those obtained from the--- universal set (of the right type) by removing elements.+-- universal set (of the right type) by removing elements. Similar to 'SArray'+-- the contents are stored with object equality, which makes a difference if the+-- underlying type contains IEEE Floats. type SSet a = SBV (RCSet a)  -- | Symbolic 2-tuple. NB. 'STuple' and 'STuple2' are equivalent.@@ -675,105 +682,20 @@                        _                  -> error "SBV.Random: Cannot generate random values with symbolic bounds"   random         g = let (v, g') = random g in (literal (v :: a) , g') ------------------------------------------------------------------------------------- * Symbolic Arrays-------------------------------------------------------------------------------------- | Arrays of symbolic values--- An @array a b@ is an array indexed by the type @'SBV' a@, with elements of type @'SBV' b@.------ If a default value is supplied, then all the array elements will be initialized to this value.--- Otherwise, they will be left unspecified, i.e., a read from an unwritten location will produce--- an uninterpreted constant.------ The reason for this class is rather historic. In the past, SBV provided two different kinds of--- arrays: an `SArray` abstraction that mapped directly to SMTLib arrays  (which is still available--- today), and a functional notion of arrays that used internal caching, called @SFunArray@. The latter--- has been removed as the code turned out to be rather tricky and hard to maintain; so we only--- have one instance of this class. But end users can add their own instances, if needed.------ NB. 'sListArray' insists on a concrete initializer, because not having one would break--- referential transparency. See https://github.com/LeventErkok/sbv/issues/553 for details.-class SymArray array where-  -- | Generalization of 'Data.SBV.newArray_'-  newArray_ :: (MonadSymbolic m, HasKind a, HasKind b) => Maybe (SBV b) -> m (array a b)--  -- | Generalization of 'Data.SBV.newArray'-  newArray  :: (MonadSymbolic m, HasKind a, HasKind b) => String -> Maybe (SBV b) -> m (array a b)--  -- | Create a literal array-  sListArray :: (HasKind a, SymVal b) => b -> [(SBV a, SBV b)] -> array a b--  -- | Read the array element at @a@-  readArray :: array a b -> SBV a -> SBV b--  -- | Update the element at @a@ to be @b@-  writeArray :: SymVal b => array a b -> SBV a -> SBV b -> array a b--  -- | Merge two given arrays on the symbolic condition-  -- Intuitively: @mergeArrays cond a b = if cond then a else b@.-  -- Merging pushes the if-then-else choice down on to elements-  mergeArrays :: SymVal b => SBV Bool -> array a b -> array a b -> array a b--  -- | Internal function, not exported to the user-  newArrayInState :: (HasKind a, HasKind b) => Maybe String -> Either (Maybe (SBV b)) String -> State -> IO (array a b)--  {-# MINIMAL readArray, writeArray, mergeArrays, ((newArray_, newArray) | newArrayInState), sListArray #-}-  newArray_   mbVal = symbolicEnv >>= liftIO . newArrayInState Nothing   (Left mbVal)-  newArray nm mbVal = symbolicEnv >>= liftIO . newArrayInState (Just nm) (Left mbVal)--  -- Despite our MINIMAL pragma and default implementations for newArray_ and-  -- newArray, we must provide a dummy implementation for newArrayInState:-  newArrayInState = error "undefined: newArrayInState"---- | Arrays implemented in terms of SMT-arrays: <https://smt-lib.org/theories-ArraysEx.shtml>------   * Maps directly to SMT-lib arrays------   * Reading from an uninitialized value is OK. If the default value is given in 'newArray', it will---     be the result. Otherwise, the read yields an uninterpreted constant.------   * Can check for equality of these arrays------   * Cannot be used in code-generation (i.e., compilation to C)------   * Cannot quick-check theorems using @SArray@ values-newtype SArray a b = SArray { unSArray :: SArr }--instance (HasKind a, HasKind b) => Show (SArray a b) where-  show SArray{} = "SArray<" ++ showType (Proxy @a) ++ ":" ++ showType (Proxy @b) ++ ">"--instance SymArray SArray where-  readArray   (SArray arr) (SBV a)               = SBV (readSArr arr a)-  writeArray  (SArray arr) (SBV a)    (SBV b)    = SArray (writeSArr arr a b)-  mergeArrays (SBV t)      (SArray a) (SArray b) = SArray (mergeSArr t a b)--  sListArray :: forall a b. (HasKind a, SymVal b) => b -> [(SBV a, SBV b)] -> SArray a b-  sListArray initializer = foldl (uncurry . writeArray) arr-    where arr = SArray $ SArr ks $ cache r-           where ks   = (kindOf (Proxy @a), kindOf (Proxy @b))-                 r st = do amap <- R.readIORef (rArrayMap st)--                           let k    = ArrayIndex (IMap.size amap) (sbvContext st)-                               iVal = literal initializer--                           iSV <- sbvToSV st iVal--                           let upd  = IMap.insert (unArrayIndex k) ("array_" ++ show k, ks, ArrayFree (Left (Just iSV)))--                           k `seq` modifyState st rArrayMap upd $ modifyIncState st rNewArrs upd-                           return k--  newArrayInState :: forall a b. (HasKind a, HasKind b) => Maybe String -> Either (Maybe (SBV b)) String -> State -> IO (SArray a b)-  newArrayInState mbNm eiVal st = do mapM_ (registerKind st) [aknd, bknd]-                                     SArray <$> newSArr st (aknd, bknd) (mkNm mbNm) (either (Left . (unSBV <$>)) Right eiVal)-     where mkNm Nothing   t = "array_" ++ show t-           mkNm (Just nm) _ = nm-           aknd = kindOf (Proxy @a)-           bknd = kindOf (Proxy @b)- -- | Symbolic Equality. Note that we can't use Haskell's 'Eq' class since Haskell insists on returning Bool -- Comparing symbolic values will necessarily return a symbolic value.+--+-- NB. Equality is a built-in notion in SMTLib, and is object-equality. While this mostly matches Haskell's+-- notion of equality, the correspondence isn't exact. This mostly shows up in containers with floats inside,+-- such as sequences of floats, sets of doubles, and arrays of doubles. While SBV tries to maintain Haskell+-- semantics, it does resort to container equality for compound types. For instance, for an IEEE-float,+-- -0 == 0. But for an SMTLib sequence, equals is done over objects. i.e., @[0] == [-0]@ in Haskell, but+-- @literal [0] ./= literal [-0]@ when used as SMTLib sequences. The rabbit-hole goes deep here, especially+-- when @NaN@ is involved, which does not compare equal to itself per IEEE-semantics.+--+-- If you are not using floats, then you can ignore all this. If you do, then SBV will do the right thing for+-- them when checking equality directly, but not when you use containers with floating-point elements. In the+-- latter case, object-equality will be used. -- -- Minimal complete definition: None, if the type is instance of @Generic@. Otherwise '(.==)'. infix 4 .==, ./=, .===, ./==
Data/SBV/Core/Kind.hs view
@@ -28,6 +28,7 @@           Kind(..), HasKind(..), constructUKind, smtType, hasUninterpretedSorts         , BVIsNonZero, ValidFloat, intOfProxy         , showBaseKind, needsFlattening, RoundingMode(..), smtRoundingMode+        , eqCheckIsObjectEq         ) where  import qualified Data.Generics as G (Data(..), DataType, dataTypeName, dataTypeOf, tyconUQname, dataTypeConstrs, constrFields)@@ -41,7 +42,7 @@ import Data.Proxy import Data.Kind -import Data.List (isPrefixOf, intercalate)+import Data.List (isPrefixOf, intercalate, nub, sort)  import Data.Typeable (Typeable) import Data.Type.Bool@@ -51,6 +52,8 @@  import Data.SBV.Utils.Lib (isKString) +import qualified Data.Generics.Uniplate.Data as G+ -- | Kind of symbolic value data Kind = KBool           | KBounded !Bool !Int@@ -68,8 +71,13 @@           | KMaybe  Kind           | KRational           | KEither Kind Kind+          | KArray  Kind Kind           deriving (Eq, Ord, G.Data) +-- Expand such that the resulting list has all the kinds we touch+expandKinds :: Kind -> [Kind]+expandKinds = nub . sort . G.universe+ -- | The interesting about the show instance is that it can tell apart two kinds nicely; since it conveniently -- ignores the enumeration constructors. Also, when we construct a 'KUserSort', we make sure we don't use any of -- the reserved names; see 'constructUKind' for details.@@ -88,9 +96,10 @@   show (KList e)          = "[" ++ show e ++ "]"   show (KSet  e)          = "{" ++ show e ++ "}"   show (KTuple m)         = "(" ++ intercalate ", " (show <$> m) ++ ")"+  show KRational          = "SRational"   show (KMaybe k)         = "SMaybe "  ++ kindParen (showBaseKind k)   show (KEither k1 k2)    = "SEither " ++ kindParen (showBaseKind k1) ++ " " ++ kindParen (showBaseKind k2)-  show KRational          = "SRational"+  show (KArray k1 k2)     = "SArray "  ++ kindParen (showBaseKind k1) ++ " " ++ kindParen (showBaseKind k2)  -- | A version of show for kinds that says Bool instead of SBool showBaseKind :: Kind -> String@@ -112,6 +121,7 @@         sh (KTuple ks)        = "(" ++ intercalate ", " (map sh ks) ++ ")"         sh (KMaybe k)         = "Maybe "  ++ kindParen (sh k)         sh (KEither k1 k2)    = "Either " ++ kindParen (sh k1) ++ " " ++ kindParen (sh k2)+        sh (KArray  k1 k2)    = "Array "  ++ kindParen (sh k1) ++ " " ++ kindParen (sh k2)          -- Drop the initial S if it's there         noS ('S':s) = s@@ -149,6 +159,7 @@ smtType KRational       = "SBVRational" smtType (KMaybe k)      = "(SBVMaybe " ++ smtType k ++ ")" smtType (KEither k1 k2) = "(SBVEither "  ++ smtType k1 ++ " " ++ smtType k2 ++ ")"+smtType (KArray  k1 k2) = "(Array "      ++ smtType k1 ++ " " ++ smtType k2 ++ ")"  instance Eq  G.DataType where    a == b = G.tyconUQname (G.dataTypeName a) == G.tyconUQname (G.dataTypeName b)@@ -174,6 +185,7 @@                     KTuple{}     -> False                     KMaybe{}     -> False                     KEither{}    -> False+                    KArray{}     -> False  -- | Construct an uninterpreted/enumerated kind from a piece of data; we distinguish simple enumerations as those -- are mapped to proper SMT-Lib2 data-types; while others go completely uninterpreted@@ -232,6 +244,7 @@   isTuple     :: a -> Bool   isMaybe     :: a -> Bool   isEither    :: a -> Bool+  isArray     :: a -> Bool   showType    :: a -> String   -- defaults   hasSign x = kindHasSign (kindOf x)@@ -248,11 +261,12 @@                   KUserSort s _ -> error $ "SBV.HasKind.intSizeOf: Uninterpreted sort: " ++ s                   KString       -> error "SBV.HasKind.intSizeOf((S)Double)"                   KChar         -> error "SBV.HasKind.intSizeOf((S)Char)"-                  KList ek      -> error $ "SBV.HasKind.intSizeOf((S)List)" ++ show ek-                  KSet  ek      -> error $ "SBV.HasKind.intSizeOf((S)Set)"  ++ show ek-                  KTuple tys    -> error $ "SBV.HasKind.intSizeOf((S)Tuple)" ++ show tys-                  KMaybe k      -> error $ "SBV.HasKind.intSizeOf((S)Maybe)" ++ show k+                  KList ek      -> error $ "SBV.HasKind.intSizeOf((S)List)"   ++ show ek+                  KSet  ek      -> error $ "SBV.HasKind.intSizeOf((S)Set)"    ++ show ek+                  KTuple tys    -> error $ "SBV.HasKind.intSizeOf((S)Tuple)"  ++ show tys+                  KMaybe k      -> error $ "SBV.HasKind.intSizeOf((S)Maybe)"  ++ show k                   KEither k1 k2 -> error $ "SBV.HasKind.intSizeOf((S)Either)" ++ show (k1, k2)+                  KArray  k1 k2 -> error $ "SBV.HasKind.intSizeOf((S)Array)"  ++ show (k1, k2)    isBoolean       (kindOf -> KBool{})      = True   isBoolean       _                        = False@@ -302,6 +316,9 @@   isEither        (kindOf -> KEither{})    = True   isEither        _                        = False +  isArray         (kindOf -> KArray{})     = True+  isArray         _                        = False+   showType = show . kindOf    -- default signature for uninterpreted/enumerated kinds@@ -349,25 +366,22 @@         r :: Int         r  = fromEnum iv +-- | Is this a type we can safely do equality on? Essentially it avoids floats (@NaN@ /= @NaN@, @+0 = -0@), and reals (due+-- to the possible presence of non-exact rationals.+eqCheckIsObjectEq :: Kind -> Bool+eqCheckIsObjectEq = not . any bad . expandKinds+  where bad KFloat  = True+        bad KDouble = True+        bad KFP{}   = True+        bad KReal   = True+        bad _       = False+ -- | Do we have a completely uninterpreted sort lying around anywhere? hasUninterpretedSorts :: Kind -> Bool-hasUninterpretedSorts KBool                  = False-hasUninterpretedSorts KBounded{}             = False-hasUninterpretedSorts KUnbounded             = False-hasUninterpretedSorts KReal                  = False-hasUninterpretedSorts (KUserSort _ (Just _)) = False  -- These are the enumerated sorts, and they are perfectly fine-hasUninterpretedSorts (KUserSort _ Nothing)  = True   -- These are the completely uninterpreted sorts, which we are looking for here-hasUninterpretedSorts KFloat                 = False-hasUninterpretedSorts KDouble                = False-hasUninterpretedSorts KFP{}                  = False-hasUninterpretedSorts KRational              = False-hasUninterpretedSorts KChar                  = False-hasUninterpretedSorts KString                = False-hasUninterpretedSorts (KList k)              = hasUninterpretedSorts k-hasUninterpretedSorts (KSet k)               = hasUninterpretedSorts k-hasUninterpretedSorts (KTuple ks)            = any hasUninterpretedSorts ks-hasUninterpretedSorts (KMaybe k)             = hasUninterpretedSorts k-hasUninterpretedSorts (KEither k1 k2)        = any hasUninterpretedSorts [k1, k2]+hasUninterpretedSorts = any check . expandKinds+  where check (KUserSort _ Nothing)  = True   -- These are the completely uninterpreted sorts, which we are looking for here+        check (KUserSort _ (Just{})) = False  -- These are the enumerated sorts, and they are perfectly fine+        check _                      = False  instance (Typeable a, HasKind a) => HasKind [a] where    kindOf x | isKString @[a] x = KString@@ -406,26 +420,33 @@ instance HasKind a => HasKind (Maybe a) where   kindOf _ = KMaybe (kindOf (Proxy @a)) +instance (HasKind a, HasKind b) => HasKind (a -> b) where+  kindOf _ = KArray (kindOf (Proxy @a)) (kindOf (Proxy @b))+ -- | Should we ask the solver to flatten the output? This comes in handy so output is parseable -- Essentially, we're being conservative here and simply requesting flattening anything that has -- some structure to it. needsFlattening :: Kind -> Bool-needsFlattening KBool       = False-needsFlattening KBounded{}  = False-needsFlattening KUnbounded  = False-needsFlattening KReal       = False-needsFlattening KUserSort{} = False-needsFlattening KFloat      = False-needsFlattening KDouble     = False-needsFlattening KFP{}       = False-needsFlattening KRational   = False-needsFlattening KChar       = False-needsFlattening KString     = False-needsFlattening KList{}     = True-needsFlattening KSet{}      = True-needsFlattening KTuple{}    = True-needsFlattening KMaybe{}    = True-needsFlattening KEither{}   = True+needsFlattening = any check . expandKinds+  where check KList{}     = True+        check KSet{}      = True+        check KTuple{}    = True+        check KMaybe{}    = True+        check KEither{}   = True+        check KArray{}    = True++        -- no need to expand bases+        check KBool       = False+        check KBounded{}  = False+        check KUnbounded  = False+        check KReal       = False+        check KUserSort{} = False+        check KFloat      = False+        check KDouble     = False+        check KFP{}       = False+        check KChar       = False+        check KString     = False+        check KRational   = False  -- | Catch 0-width cases type BVZeroWidth = 'Text "Zero-width bit-vectors are not allowed."
Data/SBV/Core/Model.hs view
@@ -11,11 +11,13 @@  {-# LANGUAGE BangPatterns            #-} {-# LANGUAGE ConstrainedClassMethods #-}+{-# LANGUAGE CPP                     #-} {-# LANGUAGE DataKinds               #-} {-# LANGUAGE DefaultSignatures       #-} {-# LANGUAGE DeriveFunctor           #-} {-# LANGUAGE FlexibleContexts        #-} {-# LANGUAGE FlexibleInstances       #-}+{-# LANGUAGE InstanceSigs            #-} {-# LANGUAGE Rank2Types              #-} {-# LANGUAGE ScopedTypeVariables     #-} {-# LANGUAGE TypeApplications        #-}@@ -34,7 +36,7 @@   , sWord64, sWord64_, sWord64s, sInt8, sInt8_, sInt8s, sInt16, sInt16_, sInt16s, sInt32, sInt32_, sInt32s, sInt64, sInt64_   , sInt64s, sInteger, sInteger_, sIntegers, sReal, sReal_, sReals, sFloat, sFloat_, sFloats, sDouble, sDouble_, sDoubles   , sWord, sWord_, sWords, sInt, sInt_, sInts-  , sFPHalf, sFPHalf_, sFPHalfs, sFPBFloat, sFPBFloat_, sFPBFloats, sFPSingle, sFPSingle_, sFPSingles, sFPDouble, sFPDouble_, sFPDoubles, sFPQuad, sFPQuad_, sFPQuads+  , sFPHalf, sFPHalf_, sFPHalfs, sFPBFloat, sFPBFloat_, sFPBFloats, sFPSingle, sFPSingle_, sFPSingles, sFPDouble, sFPDouble_, sFPDoubles, sFPQuad, sFPQuad_, sFPQuads, sArray, sArray_, sArrays   , sFloatingPoint, sFloatingPoint_, sFloatingPoints   , sChar, sChar_, sChars, sString, sString_, sStrings, sList, sList_, sLists   , sRational, sRational_, sRationals@@ -42,6 +44,7 @@   , sEither, sEither_, sEithers, sMaybe, sMaybe_, sMaybes   , sSet, sSet_, sSets   , sEDivMod, sEDiv, sEMod+  , sDivides   , solve   , slet   , sRealToSInteger, label, observe, observeIf, sObserve@@ -49,7 +52,8 @@   , liftQRem, liftDMod, symbolicMergeWithKind   , genLiteral, genFromCV, genMkSymVar   , zeroExtend, signExtend-  , sbvQuickCheck, lambdaAsArray+  , sbvQuickCheck+  , readArray, writeArray, lambdaArray, listArray   )   where @@ -61,9 +65,14 @@ import qualified GHC.Generics as G  import GHC.Stack-import GHC.TypeLits hiding (SChar)+import GHC.TypeLits+#if MIN_VERSION_base(4,18,0)+                    hiding(SChar)+#endif -import Data.Array  (Array, Ix, listArray, elems, bounds, rangeSize)+import Data.Array  (Array, Ix, elems, bounds, rangeSize)+import qualified Data.Array as DA (listArray)+ import Data.Bits   (Bits(..)) import Data.Int    (Int8, Int16, Int32, Int64) import Data.Kind   (Type)@@ -318,6 +327,21 @@   fromCV (CV (KMaybe k) (CMaybe (Just x))) = Just $ fromCV $ CV k x   fromCV bad                               = error $ "SymVal.fromCV (Maybe): Malformed sum received: " ++ show bad +instance (HasKind a, HasKind b, SymVal a, SymVal b) => SymVal (ArrayModel a b) where+  mkSymVal = genMkSymVar (KArray (kindOf (Proxy @a)) (kindOf (Proxy @b)))++  -- If the table has duplicate entries for keys, then the first one takes precedence.+  -- That is, [(a, v1), (a, v2)] is equivalent to [(a, v1)]. The best way to think about+  -- this is as a "stack" of writes. [(a, v1), (a, v2)] means we first "wrote" v2 at+  -- a, and then wrote v1 at the same address; so the first write of v2 got overwritten.+  literal (ArrayModel tbl def) = SBV . SVal knd . Left . CV knd $ CArray $ ArrayModel [(toCV k, toCV v) | (k, v) <- tbl] (toCV def)+    where knd = kindOf (Proxy @(ArrayModel a b))++  fromCV (CV (KArray k1 k2) (CArray (ArrayModel assocs def))) = ArrayModel [(fromCV (CV k1 a), fromCV (CV k2 b)) | (a, b) <- assocs]+                                                                           (fromCV (CV k2 def))++  fromCV bad = error $ "SymVal.fromCV (SArray): Malformed array received: " ++ show bad+ instance (Ord a, SymVal a) => SymVal (RCSet a) where   mkSymVal = genMkSymVar (kindOf (Proxy @(RCSet a))) @@ -683,6 +707,18 @@ sLists :: (SymVal a, MonadSymbolic m) => [String] -> m [SList a] sLists = symbolics +-- | Generalization of 'Data.SBV.sAray'+sArray :: (SymVal a, SymVal b, MonadSymbolic m) => String -> m (SArray a b)+sArray = symbolic++-- | Generalization of 'Data.SBV.sList_'+sArray_ :: (SymVal a, SymVal b, MonadSymbolic m) => m (SArray a b)+sArray_ = free_++-- | Generalization of 'Data.SBV.sLists'+sArrays :: (SymVal a, SymVal b, MonadSymbolic m) => [String] -> m [SArray a b]+sArrays = symbolics+ -- | Identify tuple like things. Note that there are no methods, just instances to control type inference class SymTuple a instance SymTuple ()@@ -788,6 +824,9 @@ -- counter-example. The same works for quick-check as well. Useful when we want to see intermediate values, or expected/obtained -- pairs in a particular run. Note that an observed expression is always symbolic, i.e., it won't be constant folded. Compare this to 'label' -- which is used for putting a label in the generated SMTLib-C code.+--+-- NB. If the observed expression happens under a SBV-lambda expression, then it is silently ignored; since+-- there's no way to access the value of such a value. observeIf :: SymVal a => (a -> Bool) -> String -> SBV a -> SBV a observeIf cond m x   | Just bad <- checkObservableName m@@ -795,7 +834,7 @@   | True   = SBV $ SVal k $ Right $ cache r   where k = kindOf x-        r st = do xsv <- sbvToSV st x+        r st = do xsv <- sbvToSV st (label ("Observing: " ++ m) x)                   recordObservable st m (cond . fromCV) xsv                   return xsv @@ -851,7 +890,7 @@ -- It is tempting to put in an @Eq a@ superclass here. But doing so -- is complicated, as it requires all underlying types to have equality, -- which is at best shaky for algebraic reals and sets. So, leave it out.-instance EqSymbolic (SBV a) where+instance (HasKind a, SymVal a) => EqSymbolic (SBV a) where   SBV x .== SBV y = SBV (svEqual x y)   SBV x ./= SBV y = SBV (svNotEqual x y) @@ -891,10 +930,9 @@           isBool _                    = False    -- Custom version of distinctExcept that generates better code for base types-  -- We essentially keep track of an array and count cardinalities as we walk along.-  distinctExcept []            _       = sTrue-  distinctExcept [_]           _       = sTrue-  distinctExcept es@(firstE:_) ignored+  distinctExcept []  _       = sTrue+  distinctExcept [_] _       = sTrue+  distinctExcept es  ignored     | all isConc (es ++ ignored)     = distinct (filter ignoreConc es)     | True@@ -903,24 +941,35 @@                            SBV (SVal KBool (Left cv)) -> cvToBool cv                            _                          -> error $ "distinctExcept: Impossible happened, concrete sElem failed: " ++ show (es, ignored, x) -          ek = case firstE of-                 SBV (SVal k _) -> k--          r st = do let zero = 0 :: SInteger--                    arr <- SArray <$> newSArr st (ek, KUnbounded) (\i -> "array_" ++ show i) (Left (Just (unSBV zero)))+          r st = do let incr x table = ite (x `sElem` ignored) (0 :: SInteger) (1 + readArrayNoEq table x) -                    let incr x table = ite (x `sElem` ignored) zero (1 + readArray table x)+                        initArray :: SArray a Integer+                        initArray = lambdaArray (const 0) -                        finalArray = foldl (\table x -> writeArray table x (incr x table)) arr es+                        finalArray = foldl (\table x -> writeArrayNoKnd table x (incr x table)) initArray es -                    sbvToSV st $ sAll (\e -> readArray finalArray e .<= 1) es+                    sbvToSV st $ sAll (\e -> readArrayNoEq finalArray e .<= (1 :: SInteger)) es            -- Sigh, we can't use isConcrete since that requires SymVal           -- constraint that we don't have here. (To support SBools.)           isConc (SBV (SVal _ (Left _))) = True           isConc _                       = False +          -- Version of readArray that doesn't have the Eq constraint, since we don't have it here+          readArrayNoEq array key = SBV . SVal KUnbounded . Right $ cache g+             where g st = do f <- sbvToSV st array+                             k <- sbvToSV st key+                             newExpr st KUnbounded (SBVApp ReadArray [f, k])++          writeArrayNoKnd :: forall key. HasKind key => SArray key Integer -> SBV key -> SInteger -> SArray key Integer+          writeArrayNoKnd array key value = SBV . SVal k . Right $ cache g+              where k  = KArray (kindOf (Proxy @key)) KUnbounded++                    g st = do arr    <- sbvToSV st array+                              keyVal <- sbvToSV st key+                              val    <- sbvToSV st value+                              newExpr st k (SBVApp WriteArray [arr, keyVal, val])+ -- | If comparison is over something SMTLib can handle, just translate it. Otherwise desugar. instance (Ord a, SymVal a) => OrdSymbolic (SBV a) where   a@(SBV x) .<  b@(SBV y) | smtComparable "<"   a b = SBV (svLessThan x y)@@ -959,6 +1008,7 @@       KTuple     {} -> False       KMaybe     {} -> False       KEither    {} -> False+      KArray     {} -> True  where k    = kindOf x        nope = error $ "Data.SBV.OrdSymbolic: SMTLib does not support " ++ op ++ " for " ++ show k @@ -1416,6 +1466,7 @@                       k@KTuple{}    -> error $ "Unexpected Fractional case for: " ++ show k                       k@KMaybe{}    -> error $ "Unexpected Fractional case for: " ++ show k                       k@KEither{}   -> error $ "Unexpected Fractional case for: " ++ show k+                      k@KArray{}    -> error $ "Unexpected Fractional case for: " ++ show k  -- | Define Floating instance on SBV's; only for base types that are already floating; i.e., 'SFloat', 'SDouble', and 'SReal'. -- (See the separate definition below for 'SFloatingPoint'.)  Note that unless you use delta-sat via 'Data.SBV.Provers.dReal' on 'SReal', most@@ -1844,6 +1895,15 @@   sQuotRem = liftQRem   sDivMod  = liftDMod +-- | Does the concrete positive number n divide the given integer?+sDivides :: Integer -> SInteger -> SBool+sDivides n v+  | n < 0+  = error $ "svDivides: First argument must be a strictly positive integer. Received: " ++ show n+  | Just x <- unliteral v+  = if x `mod` n == 0 then sTrue else sFalse+  | True+  = SBV $ svDivides n (unSBV v)  -- | Lift 'quotRem' to symbolic words. Division by 0 is defined s.t. @x/0 = 0@; which -- holds even when @x@ is @0@ itself.@@ -2118,7 +2178,7 @@ -- Arrays instance (Ix a, Mergeable b) => Mergeable (Array a b) where   symbolicMerge f t a b-    | ba == bb = listArray ba (zipWith (symbolicMerge f t) (elems a) (elems b))+    | ba == bb = DA.listArray ba (zipWith (symbolicMerge f t) (elems a) (elems b))     | True     = cannotMerge "'Array' values"                              ("Branches produce different ranges: " ++ show (k ba, k bb))                              "Consider using SBV's native 'SArray' abstraction."@@ -2312,17 +2372,6 @@   minBound = literal minBound   maxBound = literal maxBound --- Arrays---- SArrays are both "EqSymbolic" and "Mergeable"-instance EqSymbolic (SArray a b) where-  SArray a .== SArray b = SBV (a `eqSArr` b)---- When merging arrays; we'll ignore the force argument. This is arguably--- the right thing to do as we've too many things and likely we want to keep it efficient.-instance SymVal b => Mergeable (SArray a b) where-  symbolicMerge _ = mergeArrays- -- | SMT definable constants and functions, which can also be uninterpeted. -- This class captures functions that we can generate standalone-code for -- in the SMT solver. Note that we also allow uninterpreted constants and@@ -2480,7 +2529,7 @@                                                         newExpr st ka $ SBVApp (Uninterpreted nm) []  -- Functions of one argument-instance (SymVal b, HasKind a) => SMTDefinable (SBV b -> SBV a) where+instance (SymVal b, SymVal a, HasKind a) => SMTDefinable (SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \b -> fn b .== fn b    sbvDefineValue nm mbArgs uiKind = f@@ -2500,7 +2549,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0]  -- Functions of two arguments-instance (SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV c -> SBV b -> SBV a) where+instance (SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable (SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \c b -> fn c b .== fn c b    sbvDefineValue nm mbArgs uiKind = f@@ -2522,7 +2571,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1]  -- Functions of three arguments-instance (SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV d -> SBV c -> SBV b -> SBV a) where+instance (SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable (SBV d -> SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \d c b -> fn d c b .== fn d c b    sbvDefineValue nm mbArgs uiKind = f@@ -2546,7 +2595,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2]  -- Functions of four arguments-instance (SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where+instance (SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \e d c b -> fn e d c b .== fn e d c b    sbvDefineValue nm mbArgs uiKind = f@@ -2572,7 +2621,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3]  -- Functions of five arguments-instance (SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where+instance (SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \f e d c b -> fn f e d c b .== fn f e d c b    sbvDefineValue nm mbArgs uiKind = f@@ -2600,7 +2649,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4]  -- Functions of six arguments-instance (SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where+instance (SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \f g e d c b -> fn g f e d c b .== fn g f e d c b    sbvDefineValue nm mbArgs uiKind = f@@ -2630,7 +2679,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4, sw5]  -- Functions of seven arguments-instance (SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \h g f e d c b -> fn h g f e d c b .== fn h g f e d c b @@ -2663,7 +2712,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4, sw5, sw6]  -- Functions of eight arguments-instance (SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, SymVal a, HasKind a)             => SMTDefinable (SBV i -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \i h g f e d c b -> fn i h g f e d c b .== fn i h g f e d c b @@ -2698,7 +2747,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4, sw5, sw6, sw7]  -- Functions of nine arguments-instance (SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable (SBV j -> SBV i -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \j i h g f e d c b -> fn j i h g f e d c b .== fn j i h g f e d c b @@ -2735,7 +2784,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4, sw5, sw6, sw7, sw8]  -- Functions of ten arguments-instance (SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable (SBV k -> SBV j -> SBV i -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \k j i h g f e d c b -> fn k j i h g f e d c b .== fn k j i h g f e d c b @@ -2774,7 +2823,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4, sw5, sw6, sw7, sw8, sw9]  -- Functions of eleven arguments-instance (SymVal l, SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal l, SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable (SBV l -> SBV k -> SBV j -> SBV i -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \l k j i h g f e d c b -> fn l k j i h g f e d c b .== fn l k j i h g f e d c b @@ -2815,7 +2864,7 @@                                                                newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4, sw5, sw6, sw7, sw8, sw9, sw10]  -- Functions of twelve arguments-instance (SymVal m, SymVal l, SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal m, SymVal l, SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable (SBV m -> SBV l -> SBV k -> SBV j -> SBV i -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where   sbv2smt fn = defs2smt $ \m l k j i h g f e d c b -> fn m l k j i h g f e d c b .== fn m l k j i h g f e d c b @@ -2864,20 +2913,20 @@ mkUncurried (UICodeC a) = UICodeC a  -- Uncurried functions of two arguments-instance (SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV c, SBV b) -> SBV a) where+instance (SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p    sbvDefineValue nm mbArgs uiKind = let f = sbvDefineValue nm mbArgs (curry <$> mkUncurried uiKind) in uncurry f  -- Uncurried functions of three arguments-instance (SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV d, SBV c, SBV b) -> SBV a) where+instance (SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV d, SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p    sbvDefineValue nm mbArgs uiKind = let f = sbvDefineValue nm mbArgs (uc3 <$> mkUncurried uiKind) in \(arg0, arg1, arg2) -> f arg0 arg1 arg2     where uc3 fn a b c = fn (a, b, c)  -- Uncurried functions of four arguments-instance (SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable ((SBV e, SBV d, SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p @@ -2885,7 +2934,7 @@     where uc4 fn a b c d = fn (a, b, c, d)  -- Uncurried functions of five arguments-instance (SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p @@ -2893,7 +2942,7 @@     where uc5 fn a b c d e = fn (a, b, c, d, e)  -- Uncurried functions of six arguments-instance (SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p @@ -2901,7 +2950,7 @@     where uc6 fn a b c d e f = fn (a, b, c, d, e, f)  -- Uncurried functions of seven arguments-instance (SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p @@ -2909,7 +2958,7 @@     where uc7 fn a b c d e f g = fn (a, b, c, d, e, f, g)  -- Uncurried functions of eight arguments-instance (SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable ((SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p @@ -2917,7 +2966,7 @@     where uc8 fn a b c d e f g h = fn (a, b, c, d, e, f, g, h)  -- Uncurried functions of nine arguments-instance (SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable ((SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p @@ -2925,7 +2974,7 @@     where uc9 fn a b c d e f g h i = fn (a, b, c, d, e, f, g, h, i)  -- Uncurried functions of ten arguments-instance (SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable ((SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p @@ -2933,7 +2982,7 @@     where uc10 fn a b c d e f g h i j = fn (a, b, c, d, e, f, g, h, i, j)  -- Uncurried functions of eleven arguments-instance (SymVal l, SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal l, SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable ((SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p @@ -2941,7 +2990,7 @@     where uc11 fn a b c d e f g h i j k = fn (a, b, c, d, e, f, g, h, i, j, k)  -- Uncurried functions of twelve arguments-instance (SymVal m, SymVal l, SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a)+instance (SymVal m, SymVal l, SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a)             => SMTDefinable ((SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where   sbv2smt fn = defs2smt $ \p -> fn p .== fn p @@ -3191,15 +3240,45 @@ instance {-# OVERLAPPABLE #-} (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> z) where   k === l = prove $ \a b c d e f g -> k (a, b, c, d, e, f, g) .== l (a, b, c, d, e, f, g) --- | Using a lambda as an array-lambdaAsArray :: forall a b. (SymVal a, HasKind b) => (SBV a -> SBV b) -> SArray a b-lambdaAsArray f = SArray $ SArr (kindOf (Proxy @a), kindOf (Proxy @b)) $ cache g-  where g st = do def  <- lambdaStr st (kindOf (Proxy @b)) f+-- | Reading a value from an array.+readArray :: forall key val. (Eq key, SymVal key, SymVal val, HasKind val) => SArray key val -> SBV key -> SBV val+readArray array key+   | eqCheckIsObjectEq ka, Just (ArrayModel tbl def) <- unliteral array, Just k <- unliteral key+   = literal $ fromMaybe def (k `lookup` tbl) -- return the first value, since we don't bother deleting previous writes+   | True+   = symRes+   where symRes = SBV . SVal kb . Right $ cache g+         ka = kindOf (Proxy @key)+         kb = kindOf (Proxy @val)+         g st = do f <- sbvToSV st array+                   k <- sbvToSV st key+                   newExpr st kb (SBVApp ReadArray [f, k]) -                  let extract :: SArray a b -> IO ArrayIndex-                      extract (SArray (SArr _ ci)) = uncacheAI ci st+-- | Writing a value to an array. For the concrete case, we don't bother deleting earlier entries, we keep a history. The earlier a value is in the list, the "later" it happened; in a stack fashion.+writeArray :: forall key val. (HasKind key, SymVal key, SymVal val, HasKind val) => SArray key val -> SBV key -> SBV val -> SArray key val+writeArray array key value+   | Just (ArrayModel tbl def) <- unliteral array, Just keyVal <- unliteral key, Just val <- unliteral value+   = literal $ ArrayModel ((keyVal, val) : tbl) def  -- It's important that we "cons" the value here, since it takes precedence in a read+   | True+   = SBV . SVal k . Right $ cache g+   where k  = KArray (kindOf (Proxy @key)) (kindOf (Proxy @val)) -                  extract =<< newArrayInState Nothing (Right def) st+         g st = do arr    <- sbvToSV st array+                   keyVal <- sbvToSV st key+                   val    <- sbvToSV st value+                   newExpr st k (SBVApp WriteArray [arr, keyVal, val]) -{- HLint ignore module   "Reduce duplication" -}-{- HLint ignore module   "Eta reduce"         -}+-- | Using a lambda as an array.+lambdaArray :: forall a b. (SymVal a, HasKind b) => (SBV a -> SBV b) -> SArray a b+lambdaArray f = SBV . SVal k . Right $ cache g+  where k = KArray (kindOf (Proxy @a)) (kindOf (Proxy @b))++        g st = do def <- lambdaStr st (kindOf (Proxy @b)) f+                  newExpr st k (SBVApp (ArrayLambda def) [])++-- | Turn a constant association-list and a default into a symbolic array.+listArray :: (SymVal a, SymVal b) => [(a, b)] -> b -> SArray a b+listArray ascs def = literal $ ArrayModel ascs def++{- HLint ignore module "Reduce duplication" -}+{- HLint ignore module "Eta reduce"         -}
Data/SBV/Core/Operations.hs view
@@ -9,7 +9,9 @@ -- Constructors and basic operations on symbolic values ----------------------------------------------------------------------------- -{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE BangPatterns        #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TupleSections       #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -22,8 +24,8 @@   , svAsBool, svAsInteger, svNumerator, svDenominator   -- ** Basic operations   , svPlus, svTimes, svMinus, svUNeg, svAbs, svSignum-  , svDivide, svQuot, svRem, svQuotRem-  , svEqual, svNotEqual, svStrongEqual, svImplies, svSetEqual+  , svDivide, svQuot, svRem, svQuotRem, svDivides+  , svEqual, svNotEqual, svStrongEqual, svImplies   , svLessThan, svGreaterThan, svLessEq, svGreaterEq, svStructuralLessThan   , svAnd, svOr, svXOr, svNot   , svShl, svShr, svRol, svRor@@ -42,8 +44,6 @@   , svBlastLE, svBlastBE   , svAddConstant, svIncrement, svDecrement   , svFloatAsSWord32, svDoubleAsSWord64, svFloatingPointAsSWord-  -- ** Basic array operations-  , SArr(..), readSArr, writeSArr, mergeSArr, newSArr, eqSArr   -- Utils   , mkSymOp   )@@ -51,10 +51,7 @@  import Prelude hiding (Foldable(..)) import Data.Bits (Bits(..))-import Data.List (genericIndex, genericLength, genericTake, foldr, length, foldl')--import qualified Data.IORef         as R    (readIORef)-import qualified Data.IntMap.Strict as IMap (size, insert)+import Data.List (genericIndex, genericLength, genericTake, foldr, length, foldl', elem, nub, sort)  import Data.SBV.Core.AlgReals import Data.SBV.Core.Kind@@ -200,6 +197,16 @@    where idiv x 0 = x          idiv x y = x `div` y +-- | Divides predicate+svDivides :: Integer -> SVal -> SVal+svDivides n v+  | n <= 0 = error $ "svDivides: The first argument must be a strictly positive number, received: " ++ show n+  | True   = case v of+              SVal KUnbounded (Left (CV KUnbounded (CInteger val))) -> svBool (val `mod` n == 0)+              _                                                     -> SVal KBool $ Right $ cache c+  where c st = do sva <- svToSV st v+                  newExpr st KBool (SBVApp (Divides n) [sva])+ -- | Exponentiation. svExp :: SVal -> SVal -> SVal svExp b e@@ -294,68 +301,21 @@ svQuotRem :: SVal -> SVal -> (SVal, SVal) svQuotRem x y = (x `svQuot` y, x `svRem` y) --- | Optimize away x == true and x /= false to x; otherwise just do eqOpt-eqOptBool :: Op -> SV -> SV -> SV -> Maybe SV-eqOptBool op w x y-  | k == KBool && op == Equal    && x == trueSV  = Just y         -- true  .== y     --> y-  | k == KBool && op == Equal    && y == trueSV  = Just x         -- x     .== true  --> x-  | k == KBool && op == NotEqual && x == falseSV = Just y         -- false ./= y     --> y-  | k == KBool && op == NotEqual && y == falseSV = Just x         -- x     ./= false --> x-  | True                                         = eqOpt w x y    -- fallback-  where k = swKind x---- | Equality.-svEqual :: SVal -> SVal -> SVal-svEqual a b-  | isSet a && isSet b-  = svSetEqual a b-  | True-  = liftSym2B (mkSymOpSC (eqOptBool Equal trueSV) Equal) rationalCheck (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) a b- -- | Implication. Only for booleans. svImplies :: SVal -> SVal -> SVal svImplies a b-  |    isConcreteZero a -- false implies everything-    || isConcreteOne  b -- true is implied by everything-  = svTrue-  | any (\x -> kindOf x /= KBool) [a, b]-  = bad-  | True-  = liftSym2B (mkSymOpSC (eqOpt trueSV) Implies) rationalCheck bad imp bad bad bad bad bad bad bad bad bad bad bad a b-  where bad = error $ "Data.SBV.svImplies: Unexpected arguments: " ++ show (a, kindOf a, b, kindOf b)-        imp :: Integer -> Integer -> Bool-        imp 0 0 = True-        imp 0 1 = True-        imp 1 0 = False-        imp 1 1 = True-        imp x y = error $ "Data.SBV.svImplies: Called on unreduced arguments: " ++ show (x, y, a, kindOf a, b, kindOf b)---- | Inequality.-svNotEqual :: SVal -> SVal -> SVal-svNotEqual a b-  | isSet a && isSet b-  = svNot $ svEqual a b-  | True-  = liftSym2B (mkSymOpSC (eqOptBool NotEqual falseSV) NotEqual) rationalCheck (/=) (/=) (/=) (/=) (/=) (/=) (/=) (/=) (/=) (/=) (/=) (/=) (/=) a b---- | Set equality. Note that we only do constant folding if we get both a regular or both a--- complement set. Otherwise we get a symbolic value even if they might be completely concrete.-svSetEqual :: SVal -> SVal -> SVal-svSetEqual sa sb-  | not (isSet sa && isSet sb && kindOf sa == kindOf sb)-  = error $ "Data.SBV.svSetEqual: Called on ill-typed args: " ++ show (kindOf sa, kindOf sb)-  | Just (RegularSet a)    <- getSet sa, Just (RegularSet b)    <- getSet sb-  = svBool (a == b)-  | Just (ComplementSet a) <- getSet sa, Just (ComplementSet b) <- getSet sb-  = svBool (a == b)-  | True-  = SVal KBool $ Right $ cache r-  where getSet (SVal _ (Left (CV _ (CSet s)))) = Just s-        getSet _                               = Nothing--        r st = do sva <- svToSV st sa-                  svb <- svToSV st sb-                  newExpr st KBool $ SBVApp (SetOp SetEqual) [sva, svb]+  | any (\x -> kindOf x /= KBool) [a, b] = error $ "Data.SBV.svImplies: Unexpected arguments: " ++ show (a, kindOf a, b, kindOf b)+  | isConcreteZero a                     = svTrue  -- F -> _ = T+  |                     isConcreteOne  b = svTrue  -- _ -> T = T+  | isConcreteOne  a && isConcreteZero b = svFalse -- T -> F = F+  | isConcreteOne  a && isConcreteOne  b = svTrue  -- T -> T = T+  | True                                 = SVal KBool $ Right $ cache c+  where c st = do sva <- svToSV st a+                  svb <- svToSV st b+                  -- One final optimization, equal args is just True!+                  if sva == svb+                     then pure trueSV+                     else newExpr st KBool (SBVApp Implies [sva, svb])  -- | Strong equality. Only matters on floats, where it says @NaN@ equals @NaN@ and @+0@ and @-0@ are different. -- Otherwise equivalent to `svEqual`.@@ -378,33 +338,256 @@                   sy <- svToSV st y                   newExpr st KBool (SBVApp (IEEEFP FP_ObjEqual) [sx, sy]) +-- Comparisons have to be careful in making sure we don't rely on CVal ord/eq instance.+compareSV :: Op -> SVal -> SVal -> SVal+compareSV op x y+  -- Make sure we don't get anything we can't handle or expect+  | op `notElem` [Equal, NotEqual, LessThan, GreaterThan, LessEq, GreaterEq] = error $ "Unexpected call to compareSV: "              ++ show (op, x, y)+  | kx /= ky                                                                 = error $ "Mismatched kinds in call to compareSV:"      ++ show (op, x, kindOf x, kindOf y)+  | (isSet kx || isArray ky) && op `notElem` [Equal, NotEqual]               = error $ "Unexpected Set/Array not-equal comparison: " ++ show (op, x, k)++  -- Boolean equality optimizations+  | k == KBool, op == Equal,    SVal _ (Left xv) <- x, xv == trueCV  = y         -- true  .== y     --> y+  | k == KBool, op == Equal,    SVal _ (Left yv) <- y, yv == trueCV  = x         -- x     .== true  --> x+  | k == KBool, op == Equal,    SVal _ (Left xv) <- x, xv == falseCV = svNot y   -- false .== y     --> svNot y+  | k == KBool, op == Equal,    SVal _ (Left yv) <- y, yv == falseCV = svNot x   -- x     .== false --> svNot x++  | k == KBool, op == NotEqual, SVal _ (Left xv) <- x, xv == trueCV  = svNot y   -- true  ./= y     --> svNot y+  | k == KBool, op == NotEqual, SVal _ (Left yv) <- y, yv == trueCV  = svNot x   -- x     ./= true  --> svNot x+  | k == KBool, op == NotEqual, SVal _ (Left xv) <- x, xv == falseCV = y         -- false ./= y     --> y+  | k == KBool, op == NotEqual, SVal _ (Left yv) <- y, yv == falseCV = x         -- x     ./= false --> x++  -- Comparison optimizations if one operand is min/max bit-vector+  | op == LessThan,    isConcreteMax x = svFalse   -- MAX <  _+  | op == LessThan,    isConcreteMin y = svFalse   -- _   <  MIN++  | op == GreaterThan, isConcreteMin x = svFalse   -- MIN >  _+  | op == GreaterThan, isConcreteMax y = svFalse   -- _   > MAX++  | op == LessEq,      isConcreteMin x = svTrue    -- MIN <= _+  | op == LessEq,      isConcreteMax y = svTrue    -- _   <= MAX++  | op == GreaterEq,   isConcreteMax x = svTrue    -- MAX >= _+  | op == GreaterEq,   isConcreteMin y = svTrue    -- _   >= MIN++  -- General constant folding, but be careful not to be too smart here.+  | SVal _ (Left xv) <- x, SVal _ (Left yv) <- y+  = case cCompare k op (cvVal xv) (cvVal yv) of+      Nothing -> -- cCompare is conservative on floats. Give those one more chance, only at the top-level.+                 -- (i.e., if stored under a Maybe/Either/List etc., we'll resort to a symbolic result.)+                 case (k, cvVal xv, cvVal yv) of+                    (KFloat,   CFloat  a, CFloat  b) -> svBool (a `cOp` b)+                    (KDouble,  CDouble a, CDouble b) -> svBool (a `cOp` b)+                    (KFP{}  ,  CFP     a, CFP     b) -> svBool (a `cOp` b)+                    _                                  -> symResult+      Just r  -> svBool $ case op of+                            Equal       -> r == EQ+                            NotEqual    -> r /= EQ+                            LessThan    -> r == LT+                            GreaterThan -> r == GT+                            LessEq      -> r `elem` [EQ, LT]+                            GreaterEq   -> r `elem` [EQ, GT]+                            _           -> error $ "Unexpected call to compareSV: " ++ show (op, x, y)++   -- No constant folding opportunities, turn symbolic+   | True+   = symResult+   where kx = kindOf x+         ky = kindOf y+         k  = kx       -- only used after we ensured kx == ky++         symResult = SVal KBool $ Right $ cache res+          where res st = do svx :: SV <- svToSV st x+                            svy :: SV <- svToSV st y++                            -- We might be able to further optimize if we+                            -- know these are the same nodes, provided we+                            -- don't have a float case. (Recall that NaN doesn't+                            -- compare equal to itself, so avoid that.)+                            if svx == svy && not (isFloat k || isDouble k || isFP k)+                               then case op of+                                       Equal       -> pure trueSV+                                       LessEq      -> pure trueSV+                                       GreaterEq   -> pure trueSV+                                       NotEqual    -> pure falseSV+                                       LessThan    -> pure falseSV+                                       GreaterThan -> pure falseSV+                                       _           -> error $ "Unexpected call to compareSV, equal SV case: " ++ show (op, svx)+                               else newExpr st KBool (SBVApp op [svx, svy])++         a `cOp` b = case op of+                      Equal       -> a == b+                      NotEqual    -> a /= b+                      LessThan    -> a <  b+                      GreaterThan -> a >  b+                      LessEq      -> a <= b+                      GreaterEq   -> a >= b+                      _           -> error $ "Unexpected call to cOp: " ++ show op++-- Compare two CVals; if we can. We're being conservative here and deferring to a symbolic result if we get something complicated.+cCompare :: Kind -> Op -> CVal -> CVal -> Maybe Ordering+cCompare k op x y =+    case (x, y) of++      -- The presence of NaN's throw this off. Why? Because @NaN `compare` x = GT@ in Haskell. But that's just the wrong thing to do here.+      -- So protect against NaN's. And a similar story for -0/0.+      (CFloat  a, CFloat  b) | any (nanOrZero k) [x, y] -> Nothing+                             | True                     -> Just $ a `compare` b++      (CDouble a, CDouble b) | any (nanOrZero k) [x, y] -> Nothing+                             | True                     -> Just $ a `compare` b++      (CFP     a, CFP     b) | any (nanOrZero k) [x, y] -> Nothing+                             | True                      -> Just $ a `compare` b++      -- Simple cases+      (CInteger  a, CInteger  b) -> Just $ a `compare` b+      (CRational a, CRational b) -> Just $ a `compare` b+      (CChar     a, CChar     b) -> Just $ a `compare` b+      (CString   a, CString   b) -> Just $ a `compare` b++      -- We can handle algreal, so long as they are exact-rationals+      (CAlgReal     a, CAlgReal  b) | isExactRational a && isExactRational b -> Just $ a `compare` b+                                    | True                                   -> Nothing++      -- Structural cases+      (CMaybe       a, CMaybe    b) -> case (a, b) of+                                         (Nothing, Nothing) -> Just EQ+                                         (Nothing, Just{})  -> Just LT+                                         (Just{},  Nothing) -> Just GT+                                         (Just av, Just bv) -> case k of+                                                                 KMaybe ke -> cCompare ke op av bv+                                                                 _         -> error $ "Unexpected kind in cCompare for maybe's: " ++ show k++      (CEither      a, CEither   b) -> let (kl, kr) = case k of+                                                        KEither l r -> (l, r)+                                                        _           -> error $ "Unexpected kind in cCompare for either's: " ++ show k+                                       in case (a, b) of+                                            (Left{},   Right{})  -> Just LT+                                            (Right{},  Left{})   -> Just GT+                                            (Left av,  Left  bv) -> cCompare kl op av bv+                                            (Right av, Right bv) -> cCompare kr op av bv++      -- Uninterpreted sorts use the index+      (CUserSort    a, CUserSort b) -> case (a, b) of+                                         ((Just i, _), (Just j, _)) -> Just $ i `compare` j+                                         _                          -> error $ "cCompare: Impossible happened while trying to compare: " ++ show (op, a, b)++      -- Lists and tuples use lexicographic ordering+      (CList        a, CList b) -> case k of+                                     KList ke -> lexCmp (map (ke,) a) (map (ke,) b)+                                     _        -> error $ "cCompare: Unexpected kind in cCompare for List: " ++ show k++      (CTuple       a, CTuple b) | length a == length b -> case k of+                                                             KTuple ks | length ks == length a -> lexCmp (zip ks a) (zip ks b)+                                                             _                                 -> error "cCompare: Unexpected kind in cCompare for tuples"+                                 | True                 -> error $ "cCompare: Received tuples of differing size: " ++ show (op, length a, length b, k)++      -- Arrays and sets only support equality/inequality. And they have object-equality semantics. So+      -- if there are any floats or non-exact-rationals down in the index or element kinds, we bail+      (CSet a, CSet b)     | op `elem` [Equal, NotEqual]+                           , KSet ke <- k+                           -> case svSetEqual ke a b of+                                 Nothing    -> Nothing  -- We don't know+                                 Just True  -> Just EQ  -- They're equal+                                 Just False -> Just $ if op == Equal+                                                         then GT  -- Pick GT, So equality    test will fail+                                                         else EQ  -- Pick EQ, So in-equality test will fail+                           | True+                           -> error $ "cCompare: Received unexpected set comparison: " ++ show (op, k)++      (CArray a, CArray b) | op `elem` [Equal, NotEqual]+                           , KArray k1 k2 <- k+                           -> case svArrEqual k1 k2 a b of+                                Nothing    -> Nothing  -- We don't know+                                Just True  -> Just EQ  -- They're equal+                                Just False -> Just $ if op == Equal+                                                        then GT  -- Pick GT, So equality    test will fail+                                                        else EQ  -- Pick EQ, So in-equality test will fail+                           | True+                           -> error $ "cCompare: Received unexpected array comparison: " ++ show (op, k)++      _ -> error $ unlines [ ""+                           , "*** Data.SBV.cCompare: Bug in SBV: Unhandled rank in comparison fallthru"+                           , "***"+                           , "***   Ranks Received: " ++ show (cvRank x, cvRank y)+                           , "***"+                           , "*** Please report this as a bug!"+                           ]+  where -- lexicographic+        lexCmp :: [(Kind, CVal)] -> [(Kind, CVal)] -> Maybe Ordering+        lexCmp []     []     = Just EQ+        lexCmp []     (_:_)  = Just LT+        lexCmp (_:_)  []     = Just GT+        lexCmp ((k1, a):as) ((k2, b):bs)+          | k1 == k2+          = case cCompare k1 op a b of+              Just EQ -> as `lexCmp` bs+              other   -> other+          | True+          = error $ "Mismatching kinds in lexicographic comparison: " ++ show (k1, k2)++        nanOrZero KFloat      (CFloat  v) = isNaN v || v == 0+        nanOrZero KDouble     (CDouble v) = isNaN v || v == 0+        nanOrZero (KFP eb sb) (CFP     v) = isNaN v || v == fpFromInteger eb sb 0+        nanOrZero knd         _           = error $ "Unexpected arguments to nanOrZero: " ++ show knd++        -- | Set equality. We return Nothing if the result is too complicated for us to concretely calculate.+        -- Why? Because the Eq instance of CVal is a bit iffy; it's designed to work as an index into maps, not as+        -- a means of checking this sort of equality+        svSetEqual :: Kind -> RCSet CVal -> RCSet CVal -> Maybe Bool+        svSetEqual ek sa sb+          | eqCheckIsObjectEq ek, RegularSet a    <- sa, RegularSet b    <- sb = Just $ a == b+          | eqCheckIsObjectEq ek, ComplementSet a <- sa, ComplementSet b <- sb = Just $ a == b+          | True                                                               = Nothing++        -- | Array equality. See above comments.+        svArrEqual :: Kind -> Kind -> ArrayModel CVal CVal -> ArrayModel CVal CVal -> Maybe Bool+        svArrEqual k1 k2 (ArrayModel asc1 def1) (ArrayModel asc2 def2)+         | not (all eqCheckIsObjectEq [k1, k2])+         = Nothing+         | True+         = let -- Use of lookup is safe here, because we already made sure equality is *not* problematic above+               keysMatch = and [key `lookup` asc1 == key `lookup` asc2 | key <- nub (sort (map fst (asc1 ++ asc2)))]+               defsMatch = def1 == def2++               -- Check if keys cover everything. Clearly, we can't do this for all kinds; but only finite ones+               -- For the time being, we're retricting ourselves to bool only. Might want to extend this later.+               complete  = case k1 of+                             KBool -> let bools       = map cvVal [falseCV, trueCV]+                                          covered asc = all (`elem` map fst asc) bools+                                      in covered asc1 && covered asc2+                             _     -> False++           in case (keysMatch, defsMatch, complete) of+                (False, _   ,  _)    -> Just False -- keys mismatch. Nothing else matters.+                (True,  True,  _)    -> Just True  -- keys match, def matches; so all is good. Complete doesn't matter.+                (True,  False, True) -> Just True  -- keys match, but defs don't. But we keys are complete, so def mismatch is OK+                _                    -> Nothing    -- otherwise, we don't really know. So, remain symbolic.++-- | Equality.+svEqual :: SVal -> SVal -> SVal+svEqual = compareSV Equal++-- | Inequality.+svNotEqual :: SVal -> SVal -> SVal+svNotEqual = compareSV NotEqual+ -- | Less than. svLessThan :: SVal -> SVal -> SVal-svLessThan x y-  | isConcreteMax x = svFalse-  | isConcreteMin y = svFalse-  | True            = liftSym2B (mkSymOpSC (eqOpt falseSV) LessThan) rationalCheck (<) (<) (<) (<) (<) (<) (<) (<) (<) (<) (<) (<) (uiLift "<" (<)) x y+svLessThan = compareSV LessThan  -- | Greater than. svGreaterThan :: SVal -> SVal -> SVal-svGreaterThan x y-  | isConcreteMin x = svFalse-  | isConcreteMax y = svFalse-  | True            = liftSym2B (mkSymOpSC (eqOpt falseSV) GreaterThan) rationalCheck (>) (>) (>) (>) (>) (>) (>) (>) (>) (>) (>) (>) (uiLift ">"  (>)) x y+svGreaterThan = compareSV GreaterThan  -- | Less than or equal to. svLessEq :: SVal -> SVal -> SVal-svLessEq x y-  | isConcreteMin x = svTrue-  | isConcreteMax y = svTrue-  | True            = liftSym2B (mkSymOpSC (eqOpt trueSV) LessEq) rationalCheck (<=) (<=) (<=) (<=) (<=) (<=) (<=) (<=) (<=) (<=) (<=) (<=) (uiLift "<=" (<=)) x y+svLessEq = compareSV LessEq  -- | Greater than or equal to. svGreaterEq :: SVal -> SVal -> SVal-svGreaterEq x y-  | isConcreteMax x = svTrue-  | isConcreteMin y = svTrue-  | True            = liftSym2B (mkSymOpSC (eqOpt trueSV) GreaterEq) rationalCheck (>=) (>=) (>=) (>=) (>=) (>=) (>=) (>=) (>=) (>=) (>=) (>=) (uiLift ">=" (>=)) x y+svGreaterEq = compareSV GreaterEq  -- | Bitwise and. svAnd :: SVal -> SVal -> SVal@@ -1052,114 +1235,17 @@                     sy <- svToSV st y                     newExpr st KBool $ SBVApp (OverflowOp o) [sx, sy] ------------------------------------------------------------------------------------- * Symbolic Arrays-------------------------------------------------------------------------------------- | Arrays in terms of SMT-Lib arrays-data SArr = SArr (Kind, Kind) (Cached ArrayIndex)---- | Read the array element at @a@-readSArr :: SArr -> SVal -> SVal-readSArr (SArr (_, bk) f) a = SVal bk $ Right $ cache r-  where r st = do arr <- uncacheAI f st-                  i   <- svToSV st a--                  let actx = unArrayContext arr-                  checkCompatibleContext actx (contextOfSV i)--                  newExpr st bk (SBVApp (ArrRead arr) [i])---- | Update the element at @a@ to be @b@-writeSArr :: SArr -> SVal -> SVal -> SArr-writeSArr (SArr ainfo f) a b = SArr ainfo $ cache g-  where g st = do arr  <- uncacheAI f st-                  addr <- svToSV st a-                  val  <- svToSV st b-                  amap <- R.readIORef (rArrayMap st)--                  let actx = unArrayContext arr-                  checkCompatibleContext actx (contextOfSV addr)-                  checkCompatibleContext actx (contextOfSV val)--                  let j   = ArrayIndex (IMap.size amap) actx-                      upd = IMap.insert (unArrayIndex j) ("array_" ++ show j, ainfo, ArrayMutate arr addr val)--                  j `seq` modifyState st rArrayMap upd $ modifyIncState st rNewArrs upd-                  return j---- | Merge two given arrays on the symbolic condition--- Intuitively: @mergeArrays cond a b = if cond then a else b@.--- Merging pushes the if-then-else choice down on to elements-mergeSArr :: SVal -> SArr -> SArr -> SArr-mergeSArr t (SArr ainfo a) (SArr _ b) = SArr ainfo $ cache h-  where h st = do ai <- uncacheAI a st-                  bi <- uncacheAI b st-                  ts <- svToSV st t--                  let ctx = sbvContext st-                  checkCompatibleContext (unArrayContext ai) ctx-                  checkCompatibleContext (unArrayContext bi) ctx-                  checkCompatibleContext (contextOfSV    ts) ctx--                  amap <- R.readIORef (rArrayMap st)--                  let k   = ArrayIndex (IMap.size amap) (sbvContext st)-                      upd = IMap.insert (unArrayIndex k) ("array_" ++ show k, ainfo, ArrayMerge ts ai bi)--                  k `seq` modifyState st rArrayMap upd $ modifyIncState st rNewArrs upd-                  return k---- | Create a named new array-newSArr :: State -> (Kind, Kind) -> (Int -> String) -> Either (Maybe SVal) String -> IO SArr-newSArr st ainfo mkNm mbVal = do-    amap <- R.readIORef $ rArrayMap st--    mbSWDef <- case mbVal of-                 Left mbSV -> case mbSV of-                                Nothing -> pure (Left Nothing)-                                Just sv -> Left . Just <$> svToSV st sv-                 Right lam -> pure (Right lam)--    let i   = ArrayIndex (IMap.size amap) (sbvContext st)-        nm  = mkNm (unArrayIndex i)-        upd = IMap.insert (unArrayIndex i) (nm, ainfo, ArrayFree mbSWDef)--    registerLabel "SArray declaration" st nm--    modifyState st rArrayMap upd $ modifyIncState st rNewArrs upd-    return $ SArr ainfo $ cache $ const $ return i---- | Compare two arrays for equality-eqSArr :: SArr -> SArr -> SVal-eqSArr (SArr _ a) (SArr _ b) = SVal KBool $ Right $ cache c-  where c st = do ai <- uncacheAI a st-                  bi <- uncacheAI b st-                  newExpr st KBool (SBVApp (ArrEq ai bi) [])- -------------------------------------------------------------------------------- -- Utility functions -noUnint  :: (Maybe Int, String) -> a-noUnint x = error $ "Unexpected operation called on uninterpreted/enumerated value: " ++ show x--noUnint2 :: (Maybe Int, String) -> (Maybe Int, String) -> a-noUnint2 x y = error $ "Unexpected binary operation called on uninterpreted/enumerated values: " ++ show (x, y)--noCharLift :: Char -> a-noCharLift x = error $ "Unexpected operation called on char: " ++ show x--noStringLift :: String -> a-noStringLift x = error $ "Unexpected operation called on string: " ++ show x--noCharLift2 :: Char -> Char -> a-noCharLift2 x y = error $ "Unexpected binary operation called on chars: " ++ show (x, y)--noStringLift2 :: String -> String -> a-noStringLift2 x y = error $ "Unexpected binary operation called on strings: " ++ show (x, y)--liftSym1 :: (State -> Kind -> SV -> IO SV) -> (AlgReal -> AlgReal) -> (Integer -> Integer) -> (Float -> Float) -> (Double -> Double) -> (FP -> FP) ->(Rational -> Rational) -> SVal -> SVal-liftSym1 _   opCR opCI opCF opCD opFP opRA   (SVal k (Left a)) = SVal k . Left  $! mapCV opCR opCI opCF opCD opFP opRA noCharLift noStringLift noUnint a+liftSym1 :: (State -> Kind -> SV -> IO SV) -> (AlgReal  -> AlgReal)+                                           -> (Integer  -> Integer)+                                           -> (Float    -> Float)+                                           -> (Double   -> Double)+                                           -> (FP       -> FP)+                                           -> (Rational -> Rational)+                                           -> SVal      -> SVal+liftSym1 _   opCR opCI opCF opCD opFP opRA   (SVal k (Left a)) = SVal k . Left  $! mapCV opCR opCI opCF opCD opFP opRA a liftSym1 opS _    _    _    _    _    _    a@(SVal k _)        = SVal k $ Right $ cache c    where c st = do sva <- svToSV st a                    opS st k sva@@ -1225,28 +1311,9 @@          -> (FP       -> FP      -> FP)          -> (Rational -> Rational-> Rational)          -> SVal      -> SVal    -> SVal-liftSym2 _   okCV opCR opCI opCF opCD opFP opRA (SVal k (Left a)) (SVal _ (Left b)) | and [f a b | f <- okCV] = SVal k . Left  $! mapCV2 opCR opCI opCF opCD opFP opRA noCharLift2 noStringLift2 noUnint2 a b+liftSym2 _   okCV opCR opCI opCF opCD opFP opRA (SVal k (Left a)) (SVal _ (Left b)) | and [f a b | f <- okCV] = SVal k . Left  $! mapCV2 opCR opCI opCF opCD opFP opRA a b liftSym2 opS _    _    _    _    _    _  _      a@(SVal k _)      b                                           = SVal k $ Right $  liftSV2 opS k a b -liftSym2B :: (State -> Kind -> SV -> SV -> IO SV)-          -> (CV                  -> CV                  -> Bool)-          -> (AlgReal             -> AlgReal             -> Bool)-          -> (Integer             -> Integer             -> Bool)-          -> (Float               -> Float               -> Bool)-          -> (Double              -> Double              -> Bool)-          -> (FP                  -> FP                  -> Bool)-          -> (Rational            -> Rational            -> Bool)-          -> (Char                -> Char                -> Bool)-          -> (String              -> String              -> Bool)-          -> ([CVal]              -> [CVal]              -> Bool)-          -> ([CVal]              -> [CVal]              -> Bool)-          -> (Maybe  CVal         -> Maybe  CVal         -> Bool)-          -> (Either CVal CVal    -> Either CVal CVal    -> Bool)-          -> ((Maybe Int, String) -> (Maybe Int, String) -> Bool)-          -> SVal                 -> SVal                -> SVal-liftSym2B _   okCV opCR opCI opCF opCD opAF opAR opCC opCS opCSeq opCTup opCMaybe opCEither opUI (SVal _ (Left a)) (SVal _ (Left b)) | okCV a b = svBool (liftCV2 opCR opCI opCF opCD opAF opAR opCC opCS opCSeq opCTup opCMaybe opCEither opUI a b)-liftSym2B opS _    _    _    _    _    _    _    _    _    _      _      _        _         _    a                 b                            = SVal KBool $ Right $ liftSV2 opS KBool a b- -- | Create a symbolic two argument operation; with shortcut optimizations mkSymOpSC :: (SV -> SV -> Maybe SV) -> Op -> State -> Kind -> SV -> SV -> IO SV mkSymOpSC shortCut op st k a b = maybe (newExpr st k (SBVApp op [a, b])) return (shortCut a b)@@ -1261,22 +1328,6 @@ mkSymOp1 :: Op -> State -> Kind -> SV -> IO SV mkSymOp1 = mkSymOp1SC (const Nothing) --- | eqOpt says the references are to the same SV, thus we can optimize. Note that--- we explicitly disallow KFloat/KDouble/KFloat here. Why? Because it's *NOT* true that--- NaN == NaN, NaN >= NaN, and so-forth. So, we have to make sure we don't optimize--- floats and doubles, in case the argument turns out to be NaN.-eqOpt :: SV -> SV -> SV -> Maybe SV-eqOpt w x y = case swKind x of-                KFloat  -> Nothing-                KDouble -> Nothing-                KFP{}   -> Nothing-                _       -> if x == y then Just w else Nothing---- For uninterpreted/enumerated values, we carefully lift through the constructor index for comparisons:-uiLift :: String -> (Int -> Int -> Bool) -> (Maybe Int, String) -> (Maybe Int, String) -> Bool-uiLift _ cmp (Just i, _) (Just j, _) = i `cmp` j-uiLift w _   a           b           = error $ "Data.SBV.Core.Operations: Impossible happened while trying to lift " ++ w ++ " over " ++ show (a, b)- -- | Predicate to check if a value is concrete isConcrete :: SVal -> Bool isConcrete (SVal _ Left{}) = True@@ -1339,34 +1390,34 @@ rationalSBVCheck (SVal KReal (Left a)) (SVal KReal (Left b)) = rationalCheck a b rationalSBVCheck _                     _                     = True -noReal :: String -> AlgReal -> AlgReal -> AlgReal+noReal :: String -> AlgReal -> AlgReal -> a noReal o a b = error $ "SBV.AlgReal." ++ o ++ ": Unexpected arguments: " ++ show (a, b) -noFloat :: String -> Float -> Float -> Float+noFloat :: String -> Float -> Float -> a noFloat o a b = error $ "SBV.Float." ++ o ++ ": Unexpected arguments: " ++ show (a, b) -noDouble :: String -> Double -> Double -> Double+noDouble :: String -> Double -> Double -> a noDouble o a b = error $ "SBV.Double." ++ o ++ ": Unexpected arguments: " ++ show (a, b) -noFP :: String -> FP -> FP -> FP+noFP :: String -> FP -> FP -> a noFP o a b = error $ "SBV.FPR." ++ o ++ ": Unexpected arguments: " ++ show (a, b) -noRat:: String -> Rational -> Rational -> Rational+noRat:: String -> Rational -> Rational -> a noRat o a b = error $ "SBV.Rational." ++ o ++ ": Unexpected arguments: " ++ show (a, b) -noRealUnary :: String -> AlgReal -> AlgReal+noRealUnary :: String -> AlgReal -> a noRealUnary o a = error $ "SBV.AlgReal." ++ o ++ ": Unexpected argument: " ++ show a -noFloatUnary :: String -> Float -> Float+noFloatUnary :: String -> Float -> a noFloatUnary o a = error $ "SBV.Float." ++ o ++ ": Unexpected argument: " ++ show a -noDoubleUnary :: String -> Double -> Double+noDoubleUnary :: String -> Double -> a noDoubleUnary o a = error $ "SBV.Double." ++ o ++ ": Unexpected argument: " ++ show a -noFPUnary :: String -> FP -> FP+noFPUnary :: String -> FP -> a noFPUnary o a = error $ "SBV.FPR." ++ o ++ ": Unexpected argument: " ++ show a -noRatUnary :: String -> Rational -> Rational+noRatUnary :: String -> Rational -> a noRatUnary o a = error $ "SBV.Rational." ++ o ++ ": Unexpected argument: " ++ show a  -- | Given a composite structure, figure out how to compare for less than
Data/SBV/Core/SizedFloats.hs view
@@ -263,13 +263,13 @@  -- | Num instance for big-floats instance Num FP where-  (+)         = lift2 BF.bfAdd-  (-)         = lift2 BF.bfSub-  (*)         = lift2 BF.bfMul-  abs         = lift1 BF.bfAbs-  signum      = lift1 bfSignum-  fromInteger = error "FP.fromInteger: Not supported for arbitrary floats. Use fpFromInteger instead, specifying the precision"-  negate      = lift1 BF.bfNeg+  (+)           = lift2 BF.bfAdd+  (-)           = lift2 BF.bfSub+  (*)           = lift2 BF.bfMul+  abs           = lift1 BF.bfAbs+  signum        = lift1 bfSignum+  fromInteger i = error $ "FP.fromInteger: Not supported for arbitrary floats. Use fpFromInteger instead, specifying the precision. Called on: " ++ show i+  negate        = lift1 BF.bfNeg  -- | Fractional instance for big-floats instance Fractional FP where
Data/SBV/Core/Symbolic.hs view
@@ -12,9 +12,11 @@ {-# LANGUAGE BangPatterns               #-} {-# LANGUAGE CPP                        #-} {-# LANGUAGE DefaultSignatures          #-}+{-# LANGUAGE DeriveAnyClass             #-} {-# LANGUAGE DeriveDataTypeable         #-} {-# LANGUAGE DeriveFunctor              #-} {-# LANGUAGE DeriveGeneric              #-}+{-# LANGUAGE DerivingStrategies         #-} {-# LANGUAGE FlexibleInstances          #-} {-# LANGUAGE GADTs                      #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}@@ -42,11 +44,9 @@   , SBVType(..), svUninterpreted, svUninterpretedNamedArgs, newUninterpreted   , SVal(..)   , svMkSymVar, sWordN, sWordN_, sIntN, sIntN_-  , ArrayContext(..), ArrayInfo   , svToSV, svToSymSV, forceSVArg   , SBVExpr(..), newExpr, isCodeGenMode, isSafetyCheckingIStage, isRunIStage, isSetupIStage   , Cached, cache, uncache, modifyState, modifyIncState-  , ArrayIndex(..), uncacheAI   , NamedSymVar(..), Name, UserInputs, Inputs(..), getSV, swNodeId, namedNodeId   , addInternInput, addUserInput   , getUserName', getUserName@@ -60,7 +60,7 @@   , SolverCapabilities(..)   , extractSymbolicSimulationState, CnstMap   , OptimizeStyle(..), Objective(..), Penalty(..), objectiveName, addSValOptGoal-  , MonadQuery(..), QueryT(..), Query, Queriable(..), Fresh(..), QueryState(..), QueryContext(..)+  , MonadQuery(..), QueryT(..), Query, QueryState(..), QueryContext(..)   , SMTScript(..), Solver(..), SMTSolver(..), SMTResult(..), SMTModel(..), SMTConfig(..), SMTEngine   , validationRequested, outputSVal, ProgInfo(..), mustIgnoreVar, getRootState   ) where@@ -74,12 +74,11 @@ import Control.Monad.Trans         (MonadIO(liftIO), MonadTrans(lift)) import Control.Monad.Trans.Maybe   (MaybeT) import Control.Monad.Writer.Strict (MonadWriter)-import Data.Char                   (isAlpha, isAlphaNum, toLower)+import Data.Char                   (isAlpha, isAlphaNum, toLower, isSpace) import Data.IORef                  (IORef, newIORef, readIORef) import Data.List                   (intercalate, sortBy, isPrefixOf, isSuffixOf, nub) import Data.Maybe                  (fromMaybe, mapMaybe) import Data.String                 (IsString(fromString))-import Data.Kind                   (Type)  import Data.Time (getCurrentTime, UTCTime) @@ -97,7 +96,7 @@ import qualified Data.IORef                  as R    (modifyIORef') import qualified Data.Generics               as G    (Data(..)) import qualified Data.Generics.Uniplate.Data as G-import qualified Data.IntMap.Strict          as IMap (IntMap, empty, toAscList, lookup, insertWith)+import qualified Data.IntMap.Strict          as IMap (IntMap, empty, lookup, insertWith) import qualified Data.Map.Strict             as Map  (Map, empty, toList, lookup, insert, size) import qualified Data.Set                    as Set  (Set, empty, toList, insert, member) import qualified Data.Foldable               as F    (toList)@@ -151,7 +150,7 @@      | True      = n1 == n2 --- | A symbolic word, tracking it's signedness and size.+-- | A symbolic word, tracking its kind and node representing it data SV = SV !Kind !NodeId         deriving G.Data @@ -225,16 +224,15 @@         | Shr         | Rol Int         | Ror Int+        | Divides Integer                       -- divides k n is True if k divides n. k must be > 0 constant         | Extract Int Int                       -- Extract i j: extract bits i to j. Least significant bit is 0 (big-endian)         | Join                                  -- Concat two words to form a bigger one, in the order given         | ZeroExtend Int         | SignExtend Int         | LkUp (Int, Kind, Kind, Int) !SV !SV   -- (table-index, arg-type, res-type, length of the table) index out-of-bounds-value-        | ArrEq   ArrayIndex ArrayIndex         -- Array equality-        | ArrRead ArrayIndex         | KindCast Kind Kind         | Uninterpreted String-        | QuantifiedBool String                 -- When we generate a forall/exists (nested etc.) boolean value+        | QuantifiedBool [Op] String            -- When we generate a forall/exists (nested etc.) boolean value         | SpecialRelOp Kind SpecialRelOp        -- Generate the equality to the internal operation         | Label String                          -- Essentially no-op; useful for code generation to emit comments.         | IEEEFP FPOp                           -- Floating-point ops, categorized separately@@ -254,7 +252,10 @@         | MaybeConstructor Kind Bool            -- Construct a maybe value; False: Nothing, True: Just         | MaybeIs Kind Bool                     -- Maybe tester; False: nothing, True: just         | MaybeAccess                           -- Maybe branch access; grab the contents of the just-        deriving (Eq, Ord, G.Data)+        | ArrayLambda String                    -- An array value, created from a lambda+        | ReadArray                             -- Reading an array value+        | WriteArray                            -- Writing to an array+        deriving (Eq, Ord, Generic, G.Data, NFData)  -- | Special relations supported by z3 data SpecialRelOp = IsPartialOrder         String@@ -292,7 +293,7 @@           | FP_IsNaN           | FP_IsNegative           | FP_IsPositive-          deriving (Eq, Ord, G.Data)+          deriving (Eq, Ord, G.Data, NFData, Generic)  -- Note that the show instance maps to the SMTLib names. We need to make sure -- this mapping stays correct through SMTLib changes. The only exception@@ -339,7 +340,7 @@           | NR_Exp           | NR_Log           | NR_Pow-          deriving (Eq, Ord, G.Data)+          deriving (Eq, Ord, G.Data, NFData, Generic)  -- | The show instance carefully arranges for these to be printed as it can be understood by dreal instance Show NROp where@@ -364,7 +365,7 @@           | PB_Le      [Int] Int  -- ^ At most k,  with coefficients given. Generalizes PB_AtMost           | PB_Ge      [Int] Int  -- ^ At least k, with coefficients given. Generalizes PB_AtLeast           | PB_Eq      [Int] Int  -- ^ Exactly k,  with coefficients given. Generalized PB_Exactly-          deriving (Eq, Ord, Show, G.Data)+          deriving (Eq, Ord, Show, G.Data, NFData, Generic)  -- | Overflow operations data OvOp = PlusOv Bool           -- ^ Addition    overflow.    Bool is True if signed.@@ -372,7 +373,7 @@           | MulOv  Bool           -- ^ Multiplication overflow. Bool is True if signed.           | DivOv                 -- ^ Division overflow.       Only signed, since unsigned division does not overflow.           | NegOv                 -- ^ Unary negation overflow. Only signed, since unsigned negation does not overflow.-          deriving (Eq, Ord, G.Data)+          deriving (Eq, Ord, G.Data, NFData, Generic)  -- | Show instance. It's important that these follow the SMTLib names. instance Show OvOp where@@ -398,12 +399,12 @@            | StrToCode       -- ^ Equivalent to Haskell's ord            | StrFromCode     -- ^ Equivalent to Haskell's chr            | StrInRe RegExp  -- ^ Check if string is in the regular expression-           deriving (Eq, Ord, G.Data)+           deriving (Eq, Ord, G.Data, NFData, Generic)  -- | Regular-expression operators. The only thing we can do is to compare for equality/disequality. data RegExOp = RegExEq  RegExp RegExp              | RegExNEq RegExp RegExp-             deriving (Eq, Ord, G.Data)+             deriving (Eq, Ord, G.Data, NFData, Generic)  -- | Regular expressions. Note that regular expressions themselves are -- concrete, but the 'Data.SBV.RegExp.match' function from the 'Data.SBV.RegExp.RegExpMatchable' class@@ -427,7 +428,7 @@             | Power Int     RegExp -- ^ Exactly @n@ repetitions, i.e., nth power             | Union [RegExp]       -- ^ Union of regular expressions             | Inter RegExp RegExp  -- ^ Intersection of regular expressions-            deriving (Eq, Ord, G.Data)+            deriving (Eq, Ord, G.Data, Generic, NFData)  -- | With overloaded strings, we can have direct literal regular expressions. instance IsString RegExp where@@ -534,7 +535,7 @@            | SeqFoldLeft  String  -- ^ Folding of sequences            | SeqFoldLeftI String  -- ^ Folding of sequences with offset            | SBVReverse Kind      -- ^ Reversal of sequences. NB. Also works for strings; hence the name.-  deriving (Eq, Ord, G.Data)+  deriving (Eq, Ord, G.Data, NFData, Generic)  -- | Show instance for SeqOp. Again, mapping is important. instance Show SeqOp where@@ -554,7 +555,10 @@   show (SeqFoldLeftI s) = "seq.foldli " ++ s    -- Note: This isn't part of SMTLib, we explicitly handle it-  show (SBVReverse k) = "sbv.reverse[" ++ show k ++ "]"+  show (SBVReverse k) = let sk = show k+                            ssk | any isSpace sk = '(' : sk ++ ")"+                                | True           = sk+                        in "sbv.reverse @" ++ ssk  -- | Set operations. data SetOp = SetEqual@@ -566,7 +570,7 @@            | SetSubset            | SetDifference            | SetComplement-        deriving (Eq, Ord, G.Data)+        deriving (Eq, Ord, G.Data, NFData, Generic)  -- The show instance for 'SetOp' is merely for debugging, we map them separately so -- the mapped strings are less important here.@@ -596,12 +600,9 @@         = "lookup(" ++ tinfo ++ ", " ++ show i ++ ", " ++ show e ++ ")"         where tinfo = "table" ++ show ti ++ "(" ++ show at ++ " -> " ++ show rt ++ ", " ++ show l ++ ")" -  show (ArrEq i j)          = "array_" ++ show i ++ " == array_" ++ show j-  show (ArrRead i)          = "select array_" ++ show i-   show (KindCast fr to)     = "cast_" ++ show fr ++ "_" ++ show to   show (Uninterpreted i)    = "[uninterpreted] " ++ i-  show (QuantifiedBool i)   = "[quantified boolean] " ++ i+  show (QuantifiedBool _ i) = "[quantified boolean] " ++ i    show (Label s)            = "[label] " ++ s @@ -637,10 +638,13 @@   show (MaybeIs          k False)       = "(_ is (nothing_SBVMaybe () "              ++ show (KMaybe k) ++ "))"   show (MaybeIs          k True )       = "(_ is (just_SBVMaybe (" ++ show k ++ ") " ++ show (KMaybe k) ++ "))"   show MaybeAccess                      = "get_just_SBVMaybe"+  show (ArrayLambda s)                  = s+  show ReadArray                        = "select"+  show WriteArray                       = "store"    show op     | Just s <- op `lookup` syms = s-    | True                       = error "impossible happened; can't find op!"+    | True                       = error "impossible happened; can't find op!" -- NB. Can't display the OP here! it's the show instance after all.     where syms = [ (Plus, "+"), (Times, "*"), (Minus, "-"), (UNeg, "-"), (Abs, "abs")                  , (Quot, "quot")                  , (Rem,  "rem")@@ -692,16 +696,25 @@  -- Show instance for 'SBVExpr'. Again, only for debugging purposes. instance Show SBVExpr where-  show (SBVApp Ite [t, a, b])             = unwords ["if", show t, "then", show a, "else", show b]-  show (SBVApp Shl     [a, i])            = unwords [show a, "<<", show i]-  show (SBVApp Shr     [a, i])            = unwords [show a, ">>", show i]-  show (SBVApp (Rol i) [a])               = unwords [show a, "<<<", show i]-  show (SBVApp (Ror i) [a])               = unwords [show a, ">>>", show i]-  show (SBVApp (PseudoBoolean pb) args)   = unwords (show pb : map show args)-  show (SBVApp (OverflowOp op)    args)   = unwords (show op : map show args)-  show (SBVApp op                 [a, b]) = unwords [show a, show op, show b]-  show (SBVApp op                 args)   = unwords (show op : map show args)+  show (SBVApp Ite [t, a, b])           = unwords ["if", show t, "then", show a, "else", show b]+  show (SBVApp Shl     [a, i])          = unwords [show a, "<<", show i]+  show (SBVApp Shr     [a, i])          = unwords [show a, ">>", show i]+  show (SBVApp (Rol i) [a])             = unwords [show a, "<<<", show i]+  show (SBVApp (Ror i) [a])             = unwords [show a, ">>>", show i]+  show (SBVApp (PseudoBoolean pb) args) = unwords (show pb : map show args)+  show (SBVApp (OverflowOp op)    args) = unwords (show op : map show args) +  show (SBVApp op args) | showOpInfix op, length args == 2 = unwords (map show (take 1 args) ++ show op : map show (drop 1 args))+                        | True                             = unwords (show op : map show args)++-- | Should we display this Op infix?+showOpInfix :: Op -> Bool+showOpInfix = (`elem` infixOps)+  where infixOps = [ Plus, Times, Minus, Quot, Rem, Implies+                   , Equal, NotEqual, LessThan, GreaterThan, LessEq, GreaterEq+                   , And, Or, XOr, Join+                   ]+ -- | A program is a sequence of assignments newtype SBVPgm = SBVPgm {pgmAssignments :: S.Seq (SV, SBVExpr)}                deriving G.Data@@ -802,7 +815,7 @@ -- | A query is a user-guided mechanism to directly communicate and extract -- results from the solver. A generalization of 'Data.SBV.Query'. newtype QueryT m a = QueryT { runQueryT :: ReaderT State m a }-    deriving (Applicative, Functor, Monad, MonadIO, MonadTrans,+    deriving newtype (Applicative, Functor, Monad, MonadIO, MonadTrans,               MonadError e, MonadState s, MonadWriter w)  instance Monad m => MonadQuery (QueryT m) where@@ -812,27 +825,6 @@ mapQueryT f = QueryT . f . runQueryT {-# INLINE mapQueryT #-} --- | Create a fresh variable of some type in the underlying query monad transformer.--- For further control on how these variables are projected and embedded, see the--- 'Queriable' class.-class Fresh m a where-  fresh :: QueryT m a---- | An queriable value. This is a generalization of the 'Fresh' class, in case one needs--- to be more specific about how projections/embeddings are done.-class Queriable m a where-  type QueryResult a :: Type--  -- | ^ Create a new symbolic value of type @a@-  create  :: QueryT m a--  -- | ^ Extract the current value in a SAT context-  project :: a -> QueryT m (QueryResult a)--  -- | ^ Create a literal value. Morally, 'embed' and 'project' are inverses of each other-  -- via the 'QueryT' monad transformer.-  embed   :: QueryResult a -> QueryT m a- -- Have to define this one by hand, because we use ReaderT in the implementation instance MonadReader r m => MonadReader r (QueryT m) where   ask = lift ask@@ -888,7 +880,6 @@                      , resParams      :: ResultInp                                    -- ^ top-inputs or lambda params                      , resConsts      :: (CnstMap, [(SV, CV)])                        -- ^ constants                      , resTables      :: [((Int, Kind, Kind), [SV])]                  -- ^ tables (automatically constructed) (tableno, index-type, result-type) elts-                     , resArrays      :: [(Int, ArrayInfo)]                           -- ^ arrays (user specified)                      , resUIConsts    :: [(String, (Bool, Maybe [String], SBVType))]  -- ^ uninterpreted constants                      , resDefinitions :: [(SMTDef, SBVType)]                          -- ^ definitions created via smtFunction or lambda                      , resAsgns       :: SBVPgm                                       -- ^ assignments@@ -906,7 +897,7 @@   show Result{resConsts=(_, cs), resOutputs=[r]}     | Just c <- r `lookup` cs     = show c-  show (Result _ kinds _ _ cgs params (_, cs) ts as uis defns xs cstrs asserts os) = intercalate "\n" $+  show (Result _ kinds _ _ cgs params (_, cs) ts uis defns xs cstrs asserts os) = intercalate "\n" $                    (if null usorts then [] else "SORTS" : map ("  " ++) usorts)                 ++ (case params of                       ResultTopInps (i, t) -> "INPUTS" : map shn i ++ (if null t then [] else "TRACKER VARS" : map shn t)@@ -916,8 +907,6 @@                 ++ concatMap shc cs                 ++ ["TABLES"]                 ++ map sht ts-                ++ ["ARRAYS"]-                ++ map sha as                 ++ ["UNINTERPRETED CONSTANTS"]                 ++ map shui uis                 ++ ["USER GIVEN CODE SEGMENTS"]@@ -959,12 +948,6 @@            shq (q, v) = shn v ++ ", " ++ if q == ALL then "universal" else "existential" -          sha (i, (nm, (ai, bi), ctx)) = "  " ++ ni ++ " :: " ++ show ai ++ " -> " ++ show bi ++ alias-                                       ++ "\n     Context: "     ++ show ctx-            where ni = "array_" ++ show i-                  alias | ni == nm = ""-                        | True     = ", aliasing " ++ show nm-           shui (nm, t) = "  [uninterpreted] " ++ nm ++ " :: " ++ show t            shCstr (isSoft, [], c)               = soft isSoft ++ show c@@ -982,19 +965,6 @@ #endif                 stk ++ ": " ++ show p --- | The context of a symbolic array as created-data ArrayContext = ArrayFree   (Either (Maybe SV) String) -- ^ A new array, the contents are initialized with the given value, if any, or the custom lambda given-                  | ArrayMutate ArrayIndex SV SV           -- ^ An array created by mutating another array at a given cell-                  | ArrayMerge  SV ArrayIndex ArrayIndex   -- ^ An array created by symbolically merging two other arrays-                  deriving G.Data--instance Show ArrayContext where-  show (ArrayFree (Left Nothing))   = " initialized with random elements"-  show (ArrayFree (Left (Just sv))) = " initialized with " ++ show sv-  show (ArrayFree (Right lambda))   = " initialized with " ++ show lambda-  show (ArrayMutate i a b)   = " cloned from array_" ++ show i ++ " with " ++ show a ++ " :: " ++ show (swKind a) ++ " |-> " ++ show b ++ " :: " ++ show (swKind b)-  show (ArrayMerge  s i j)   = " merged arrays " ++ show i ++ " and " ++ show j ++ " on condition " ++ show s- -- | Expression map, used for hash-consing type ExprMap = Map.Map SBVExpr SV @@ -1007,12 +977,6 @@ -- | Tables generated during a symbolic run type TableMap = Map.Map (Kind, Kind, [SV]) Int --- | Representation for symbolic arrays-type ArrayInfo = (String, (Kind, Kind), ArrayContext)---- | SMT Arrays generated during a symbolic run-type ArrayMap = IMap.IntMap ArrayInfo- -- | Uninterpreted-constants generated during a symbolic run type UIMap = Map.Map String (Bool, Maybe [String], SBVType)   -- If Bool is true, then this is a curried function @@ -1081,7 +1045,6 @@ data IncState = IncState { rNewInps        :: IORef [NamedSymVar]   -- always existential!                          , rNewKinds       :: IORef KindSet                          , rNewConsts      :: IORef CnstMap-                         , rNewArrs        :: IORef ArrayMap                          , rNewTbls        :: IORef TableMap                          , rNewUIs         :: IORef UIMap                          , rNewAsgns       :: IORef SBVPgm@@ -1094,7 +1057,6 @@         is    <- newIORef []         ks    <- newIORef Set.empty         nc    <- newIORef Map.empty-        am    <- newIORef IMap.empty         tm    <- newIORef Map.empty         ui    <- newIORef Map.empty         pgm   <- newIORef (SBVPgm S.empty)@@ -1102,7 +1064,6 @@         return IncState { rNewInps        = is                         , rNewKinds       = ks                         , rNewConsts      = nc-                        , rNewArrs        = am                         , rNewTbls        = tm                         , rNewUIs         = ui                         , rNewAsgns       = pgm@@ -1193,10 +1154,12 @@ data SMTDef = SMTDef String           -- ^ Defined functions -- name                      Kind             -- ^ Final kind of the definition (resulting kind, not the params)                      [String]         -- ^ other definitions it refers to+                     [Op]             -- ^ ops used in it, in case we need to generate extra defs                      (Maybe String)   -- ^ parameter string                      (Int -> String)  -- ^ Body, in SMTLib syntax, given the tab amount             | SMTLam Kind             -- ^ Final kind of the definition (resulting kind, not the params)                      [String]         -- ^ Anonymous function -- other definitions it refers to+                     [Op]             -- ^ ops used in it, in case we need to generate extra defs                      (Maybe String)   -- ^ parameter string                      (Int -> String)  -- ^ Body, in SMTLib syntax, given the tab amount             deriving G.Data@@ -1204,8 +1167,8 @@ -- | For debug purposes instance Show SMTDef where   show d = case d of-             SMTDef nm fk frees p body -> shDef (Just nm) fk frees p body-             SMTLam    fk frees p body -> shDef Nothing   fk frees p body+             SMTDef nm fk frees _ p body -> shDef (Just nm) fk frees p body+             SMTLam    fk frees _ p body -> shDef Nothing   fk frees p body     where shDef mbNm fk frees p body = unlines [ "-- User defined function: " ++ fromMaybe "Anonymous" mbNm                                                , "-- Final return type    : " ++ show fk                                                , "-- Refers to            : " ++ intercalate ", " frees@@ -1216,13 +1179,13 @@  -- The name of this definition smtDefGivenName :: SMTDef -> Maybe String-smtDefGivenName (SMTDef n _ _ _ _) = Just n-smtDefGivenName SMTLam{}           = Nothing+smtDefGivenName (SMTDef n _ _ _ _ _) = Just n+smtDefGivenName SMTLam{}             = Nothing  -- | NFData instance for SMTDef instance NFData SMTDef where-  rnf (SMTDef n fk frees params body) = rnf n `seq` rnf fk `seq` rnf frees `seq` rnf params `seq` rnf body-  rnf (SMTLam   fk frees params body) =             rnf fk `seq` rnf frees `seq` rnf params `seq` rnf body+  rnf (SMTDef n fk frees ops params body) = rnf n `seq` rnf fk `seq` rnf frees `seq` rnf ops `seq` rnf params `seq` rnf body+  rnf (SMTLam   fk frees ops params body) =             rnf fk `seq` rnf frees `seq` rnf ops `seq` rnf params `seq` rnf body  -- | The state of the symbolic interpreter data State  = State { sbvContext          :: SBVContext@@ -1247,7 +1210,6 @@                     , spgm                :: IORef SBVPgm                     , rconstMap           :: IORef CnstMap                     , rexprMap            :: IORef ExprMap-                    , rArrayMap           :: IORef ArrayMap                     , rUIMap              :: IORef UIMap                     , rUserFuncs          :: IORef (Set.Set String) -- Functions that the user wanted explicit code generation for                     , rCgMap              :: IORef CgMap@@ -1257,7 +1219,6 @@                     , rAsserts            :: IORef [(String, Maybe CallStack, SV)]                     , rOutstandingAsserts :: IORef Bool            -- Did we send an assert after the last check-sat call?                     , rSVCache            :: IORef (Cache SV)-                    , rAICache            :: IORef (Cache ArrayIndex)                     , rQueryState         :: IORef (Maybe QueryState)                     , parentState         :: Maybe State  -- Pointer to our parent if we're in a sublevel                     }@@ -1538,6 +1499,7 @@          KTuple    eks   -> mapM_ (registerKind st) eks          KMaybe    ke    -> registerKind st ke          KEither   k1 k2 -> mapM_ (registerKind st) [k1, k2]+         KArray    k1 k2 -> mapM_ (registerKind st) [k1, k2]  -- | Register a new label with the system, making sure they are unique and have no '|'s in them registerLabel :: String -> State -> String -> IO ()@@ -1663,7 +1625,7 @@  -- | A generalization of 'Data.SBV.Symbolic'. newtype SymbolicT m a = SymbolicT { runSymbolicT :: ReaderT State m a }-                   deriving ( Applicative, Functor, Monad, MonadIO, MonadTrans+                   deriving newtype ( Applicative, Functor, Monad, MonadIO, MonadTrans                             , MonadError e, MonadState s, MonadWriter w #if MIN_VERSION_base(4,11,0)                             , Fail.MonadFail@@ -1684,7 +1646,7 @@   ask = lift ask   local f = mapSymbolicT $ mapReaderT $ local f --- | `Symbolic` is specialization of `SymbolicT` to the `IO` monad. Unless you are using+-- | 'Symbolic' is specialization of 'SymbolicT' to the `IO` monad. Unless you are using -- transformers explicitly, this is the type you should prefer. type Symbolic = SymbolicT IO @@ -1872,13 +1834,11 @@      lambdaInps         <- newIORef mempty      outs               <- newIORef []      tables             <- newIORef Map.empty-     arrays             <- newIORef IMap.empty      userFuncs          <- newIORef Set.empty      uis                <- newIORef Map.empty      cgs                <- newIORef Map.empty      defns              <- newIORef []      swCache            <- newIORef IMap.empty-     aiCache            <- newIORef IMap.empty      usedKinds          <- newIORef Set.empty      usedLbls           <- newIORef Set.empty      cstrs              <- newIORef S.empty@@ -1909,14 +1869,12 @@                   , rtblMap             = tables                   , spgm                = pgm                   , rconstMap           = cmap-                  , rArrayMap           = arrays                   , rexprMap            = emap                   , rUserFuncs          = userFuncs                   , rUIMap              = uis                   , rCgMap              = cgs                   , rDefns              = defns                   , rSVCache            = swCache-                  , rAICache            = aiCache                   , rConstraints        = cstrs                   , rPartitionVars      = pvs                   , rSMTOptions         = smtOpts@@ -1974,7 +1932,7 @@ -- | Grab the program from a running symbolic simulation state. extractSymbolicSimulationState :: State -> IO Result extractSymbolicSimulationState st@State{ runMode=rrm-                                       , spgm=pgm, rinps=inps, rlambdaInps=linps, routs=outs, rtblMap=tables, rArrayMap=arrays+                                       , spgm=pgm, rinps=inps, rlambdaInps=linps, routs=outs, rtblMap=tables                                        , rUIMap=uis, rDefns=defns                                        , rAsserts=asserts, rUsedKinds=usedKinds, rCgMap=cgs, rCInfo=cInfo, rConstraints=cstrs                                        , rObservables=observes, rProgInfo=progInfo@@ -2021,7 +1979,6 @@    let cnsts = sortBy cmp . map swap . Map.toList $ constMap     tbls  <- map arrange . sortBy cmp . map swap . Map.toList <$> readIORef tables-   arrs  <- IMap.toAscList <$> readIORef arrays    ds    <- reverse <$> readIORef defns    unint <- do unints <- Map.toList <$> readIORef uis                -- drop those that has a definition associated with it@@ -2038,7 +1995,7 @@     pinfo <- readIORef progInfo -   return $ Result pinfo knds traceVals observables cgMap inpsO (constMap, cnsts) tbls arrs unint ds (SBVPgm rpgm) extraCstrs assertions outsO+   return $ Result pinfo knds traceVals observables cgMap inpsO (constMap, cnsts) tbls unint ds (SBVPgm rpgm) extraCstrs assertions outsO  -- | Generalization of 'Data.SBV.addNewSMTOption' addNewSMTOption :: MonadSymbolic m => SMTOption -> m ()@@ -2146,20 +2103,6 @@ uncache :: Cached SV -> State -> IO SV uncache = uncacheGen rSVCache --- | An SMT array index is simply an int value, and the context this array was created in-data ArrayIndex = ArrayIndex { unArrayIndex   :: Int-                             , unArrayContext :: SBVContext-                             }-               deriving (Eq, Ord, G.Data)---- | We simply show indexes as the underlying integer-instance Show ArrayIndex where-  show = show . unArrayIndex---- | Uncache, retrieving SMT array indexes-uncacheAI :: Cached ArrayIndex -> State -> IO ArrayIndex-uncacheAI = uncacheGen rAICache- -- | Generic uncaching. Note that this is entirely safe, since we do it in the IO monad. uncacheGen :: (State -> IORef (Cache a)) -> Cached a -> State -> IO a uncacheGen getCache (Cached f) st = do@@ -2212,14 +2155,12 @@   rnf (NamedSymVar s n) = rnf s `seq` rnf n  instance NFData Result where-  rnf (Result hasQuants kindInfo qcInfo obs cgs inps consts tbls arrs uis axs pgm cstr asserts outs)-        = rnf hasQuants `seq` rnf kindInfo `seq` rnf qcInfo `seq` rnf obs    `seq` rnf cgs-                        `seq` rnf inps     `seq` rnf consts `seq` rnf tbls-                        `seq` rnf arrs     `seq` rnf uis    `seq` rnf axs-                        `seq` rnf pgm      `seq` rnf cstr   `seq` rnf asserts-                        `seq` rnf outs+  rnf (Result hasQuants kindInfo qcInfo obs cgs inps consts tbls uis axs pgm cstr asserts outs)+        = rnf hasQuants `seq` rnf kindInfo `seq` rnf qcInfo  `seq` rnf obs    `seq` rnf cgs+                        `seq` rnf inps     `seq` rnf consts  `seq` rnf tbls+                        `seq` rnf uis      `seq` rnf axs     `seq` rnf pgm+                        `seq` rnf cstr     `seq` rnf asserts `seq` rnf outs instance NFData Kind         where rnf a          = seq a ()-instance NFData ArrayContext where rnf a          = seq a () instance NFData SV           where rnf a          = seq a () instance NFData SBVExpr      where rnf a          = seq a () instance NFData Quantifier   where rnf a          = seq a ()@@ -2310,6 +2251,7 @@        , solverSetOptions            :: [SMTOption]         -- ^ Options to set as we start the solver        , ignoreExitCode              :: Bool                -- ^ If true, we shall ignore the exit code upon exit. Otherwise we require ExitSuccess.        , redirectVerbose             :: Maybe FilePath      -- ^ Redirect the verbose output to this file if given. If Nothing, stdout is implied.+       , kdRibbonLength              :: Int                 -- ^ Line length for KD proofs        }  -- | Ignore internal names and those the user told us to
Data/SBV/Dynamic.hs view
@@ -21,8 +21,6 @@   -- *** Abstract symbolic value type     SVal   , HasKind(..), Kind(..), CV(..), CVal(..), cvToBool-  -- *** SMT Arrays of symbolic values-  , SArr, readSArr, writeSArr, mergeSArr, newSArr, eqSArr   -- ** Creating a symbolic variable   , Symbolic   , Quantifier(..)
Data/SBV/Lambda.hs view
@@ -15,6 +15,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-} {-# LANGUAGE ScopedTypeVariables   #-}+{-# LANGUAGE TupleSections         #-} {-# LANGUAGE UndecidableInstances  #-}  {-# OPTIONS_GHC -Wall -Werror -fno-warn-orphans #-}@@ -25,6 +26,7 @@           , constraint,  constraintStr         ) where + import Control.Monad       (join) import Control.Monad.Trans (liftIO, MonadIO) @@ -33,19 +35,19 @@ import Data.SBV.SMT.SMTLib2 import Data.SBV.Utils.PrettyNum -import           Data.SBV.Core.Symbolic hiding   (mkNewState, fresh)+import           Data.SBV.Core.Symbolic hiding   (mkNewState) import qualified Data.SBV.Core.Symbolic as     S (mkNewState)  import Data.IORef (readIORef, modifyIORef') import Data.List -import qualified Data.Foldable      as F-import qualified Data.Map.Strict    as M+import qualified Data.Foldable as F  import qualified Data.Generics.Uniplate.Data as G  data Defn = Defn [String]                        -- The uninterpreted names referred to in the body                  (Maybe [(Quantifier, String)])  -- Param declaration groups, if any+                 [Op]                            -- All ops used in the definition                  (Int -> String)                 -- Body, given the tab amount.  -- | Maka a new substate from the incoming state, sharing parts as necessary@@ -96,8 +98,6 @@                    , rctr                = fresh rctr                    , rLambdaLevel        = fresh rLambdaLevel                    , rtblMap             = fresh rtblMap-                   , rArrayMap           = fresh rArrayMap-                   , rAICache            = fresh rAICache                    , rinps               = fresh rinps                    , rlambdaInps         = fresh rlambdaInps                    , rConstraints        = fresh rConstraints@@ -132,13 +132,13 @@ -- | Create an SMTLib lambda, in the given state. lambda :: (MonadIO m, Lambda (SymbolicT m) a) => State -> Kind -> a -> m SMTDef lambda inState fk = lambdaGen mkLam inState fk-   where mkLam (Defn frees params body) = SMTLam fk frees (extractAllUniversals <$> params) body+   where mkLam (Defn frees params ops body) = SMTLam fk frees ops (extractAllUniversals <$> params) body  -- | Create an anonymous lambda, rendered as n SMTLib string lambdaStr :: (MonadIO m, Lambda (SymbolicT m) a) => State -> Kind -> a -> m String lambdaStr = lambdaGen mkLam-   where mkLam (Defn _frees Nothing       body) = body 0-         mkLam (Defn _frees (Just params) body) = "(lambda " ++ extractAllUniversals params ++ "\n" ++ body 2 ++ ")"+   where mkLam (Defn _frees Nothing       _ops body) = body 0+         mkLam (Defn _frees (Just params) _ops body) = "(lambda " ++ extractAllUniversals params ++ "\n" ++ body 2 ++ ")"  -- | Generaic creator for named functions, namedLambdaGen :: (MonadIO m, Lambda (SymbolicT m) a) => (Defn -> b) -> State -> Kind -> a -> m b@@ -147,26 +147,26 @@ -- | Create a named SMTLib function, in the given state. namedLambda :: (MonadIO m, Lambda (SymbolicT m) a) => State -> String -> Kind -> a -> m SMTDef namedLambda inState nm fk = namedLambdaGen mkDef inState fk-   where mkDef (Defn frees params body) = SMTDef nm fk frees (extractAllUniversals <$> params) body+   where mkDef (Defn frees params ops body) = SMTDef nm fk frees ops (extractAllUniversals <$> params) body  -- | Create a named SMTLib function, in the given state, string version namedLambdaStr :: (MonadIO m, Lambda (SymbolicT m) a) => State -> String -> SBVType -> a -> m String namedLambdaStr inState nm t = namedLambdaGen mkDef inState fk-   where mkDef (Defn frees params body) = concat $ declUserFuns [(SMTDef nm fk frees (extractAllUniversals <$> params) body, t)]+   where mkDef (Defn frees params ops body) = concat $ declUserFuns [(SMTDef nm fk frees ops (extractAllUniversals <$> params) body, t)]          fk = case t of                 SBVType [] -> error $ "namedLambdaStr: Invalid type for " ++ show nm ++ ", empty!"                 SBVType xs -> last xs  -- | Generic constraint generator.-constraintGen :: (MonadIO m, Constraint (SymbolicT m) a) => ([String] -> (Int -> String) -> b) -> State -> a -> m b+constraintGen :: (MonadIO m, Constraint (SymbolicT m) a) => ([String] -> [Op] -> (Int -> String) -> b) -> State -> a -> m b constraintGen trans inState@State{rProgInfo} f = do    -- indicate we have quantifiers    liftIO $ modifyIORef' rProgInfo (\u -> u{hasQuants = True}) -   let mkDef (Defn deps Nothing       body) = trans deps body-       mkDef (Defn deps (Just params) body) = trans deps $ \i -> unwords (map mkGroup params) ++ "\n"-                                                              ++ body (i + 2)-                                                              ++ replicate (length params) ')'+   let mkDef (Defn deps Nothing       ops body) = trans deps ops body+       mkDef (Defn deps (Just params) ops body) = trans deps ops $ \i -> unwords (map mkGroup params) ++ "\n"+                                                                      ++ body (i + 2)+                                                                      ++ replicate (length params) ')'        mkGroup (ALL, s) = "(forall " ++ s        mkGroup (EX,  s) = "(exists " ++ s @@ -180,14 +180,14 @@ -- | Generate a constraint. constraint :: (MonadIO m, Constraint (SymbolicT m) a) => State -> a -> m SV constraint st = join . constraintGen mkSV st-   where mkSV _deps d = liftIO $ newExpr st KBool (SBVApp (QuantifiedBool (d 0)) [])+   where mkSV _deps ops d = liftIO $ newExpr st KBool (SBVApp (QuantifiedBool ops (d 0)) [])  -- | Generate a constraint, string version constraintStr :: (MonadIO m, Constraint (SymbolicT m) a) => State -> a -> m String constraintStr = constraintGen toStr-   where toStr deps body = intercalate "\n" [ "; user defined axiom: " ++ depInfo deps-                                            , "(assert " ++ body 2 ++ ")"-                                            ]+   where toStr deps _ body = intercalate "\n" [ "; user defined axiom: " ++ depInfo deps+                                              , "(assert " ++ body 2 ++ ")"+                                              ]           depInfo [] = ""          depInfo ds = "[Refers to: " ++ intercalate ", " ds ++ "]"@@ -197,11 +197,12 @@ convert st expectedKind comp = do    ((), res)   <- runSymbolicInState st comp    curProgInfo <- liftIO $ readIORef (rProgInfo st)-   pure $ toLambda curProgInfo (stCfg st) expectedKind res+   level       <- liftIO $ readIORef (rLambdaLevel st)+   pure $ toLambda level curProgInfo (stCfg st) expectedKind res  -- | Convert the result of a symbolic run to a more abstract representation-toLambda :: ProgInfo -> SMTConfig -> Kind -> Result -> Defn-toLambda curProgInfo cfg expectedKind result@Result{resAsgns = SBVPgm asgnsSeq} = sh result+toLambda :: Int -> ProgInfo -> SMTConfig -> Kind -> Result -> Defn+toLambda level curProgInfo cfg expectedKind result@Result{resAsgns = SBVPgm asgnsSeq} = sh result  where tbd xs = error $ unlines $ "*** Data.SBV.lambda: Unsupported construct." : map ("*** " ++) ("" : xs ++ ["", report])        bad xs = error $ unlines $ "*** Data.SBV.lambda: Impossible happened."   : map ("*** " ++) ("" : xs ++ ["", bugReport])        report    = "Please request this as a feature at https://github.com/LeventErkok/sbv/issues"@@ -214,7 +215,7 @@                    _qcInfo       -- Quickcheck info, does not apply, ignored -                  observables   -- Observables: There's no way to display these, so ignore+                  _observables  -- Observables: There's no way to display these, so ignore                    _codeSegs     -- UI code segments: Again, shouldn't happen; if present, error out @@ -226,7 +227,6 @@                    tbls          -- Tables -                  _arrs         -- Arrays                : nothing to do with them                   _uis          -- Uninterpeted constants: nothing to do with them                   _axs          -- Axioms definitions    : nothing to do with them @@ -245,10 +245,15 @@          = tbd [ "Assertions."                , "  Saw: " ++ intercalate ", " [n | (n, _, _) <- assertions]                ]++         {- Simply ignore the observables, instead of choking on them,+          - This allows for more robust coding, though it might be confusing.          | not (null observables)          = tbd [ "Observables."                , "  Saw: " ++ intercalate ", " [n | (n, _, _) <- observables]                ]+         -}+          | kindOf out /= expectedKind          = bad [ "Expected kind and final kind do not match"                , "   Saw     : " ++ show (kindOf out)@@ -258,7 +263,8 @@          = res          where res = Defn (nub [nm | Uninterpreted nm <- G.universeBi asgnsSeq])                           mbParam-                          (intercalate "\n" . body)+                          (nub (sort (G.universeBi asgnsSeq)))+                          body                 params = case is of                           ResultTopInps as -> bad [ "Top inputs"@@ -275,18 +281,22 @@                body tabAmnt                  | null constTables                  , null nonConstTables-                 , Just e <- simpleBody (constBindings ++ svBindings) out-                 = [tab ++ e]+                 , Just e <- simpleBody (map (, Nothing) constBindings ++ svBindings) out+                 = tab ++ e                  | True-                 = map (tab ++) $   [mkLet sv  | sv <- constBindings]-                                 ++ [mkTable t | t  <- constTables]-                                 ++ walk svBindings nonConstTables-                                 ++ [show out ++ replicate totalClose ')']+                 = intercalate "\n" $ map (tab ++) $  [mkLet sv  | sv <- constBindings]+                                                   ++ [mkTable t | t  <- constTables]+                                                   ++ walk svBindings nonConstTables+                                                   ++ [shift ++ show out ++ replicate totalClose ')'] -                 where tab          = replicate tabAmnt ' '-                       mkBind l r   = "(let ((" ++ l ++ " " ++ r ++ "))"+                 where tab  = replicate tabAmnt ' '++                       mkBind l r   = shift ++ "(let ((" ++ l ++ " " ++ r ++ "))"                        mkLet (s, v) = mkBind (show s) v +                       -- Align according to level.+                       shift = replicate (24 + 16 * (level - 1)) ' '+                        mkTable (((i, ak, rk), elts), _) = mkBind nm (lambdaTable (map (const ' ') nm) ak rk elts)                           where nm = "table" ++ show i @@ -297,30 +307,38 @@                         walk []  []        = []                        walk []  remaining = error $ "Data.SBV: Impossible: Ran out of bindings, but tables remain: " ++ show remaining-                       walk (cur@(SV _ nd, _) : rest)  remaining =  map (mkTable . snd) ready-                                                                 ++ [mkLet cur]-                                                                 ++ walk rest notReady+                       walk (cur@((SV _ nd, _), _) : rest)  remaining =  map (mkTable . snd) ready+                                                                      ++ [mkLocalBind cur]+                                                                      ++ walk rest notReady                           where (ready, notReady) = partition (\(need, _) -> need < getLLI nd) remaining+                                mkLocalBind (b, Nothing) = mkLet b+                                mkLocalBind (b, Just l)  = mkLet b ++ " ; " ++ l                 getLLI :: NodeId -> (Int, Int)                getLLI (NodeId (_, l, i)) = (l, i) -               -- if we have just one definition returning it, simplify-               simpleBody :: [(SV, String)] -> SV -> Maybe String-               simpleBody [(v, e)] o | v == o = Just e-               simpleBody _        _          = Nothing+               -- if we have just one definition returning it, and if the expression itself is simple enough (single-line), simplify+               simpleBody :: [((SV, String), Maybe String)] -> SV -> Maybe String+               simpleBody [((v, e), Nothing)] o | v == o, '\n' `notElem` e = Just e+               simpleBody _                   _                            = Nothing                 assignments = F.toList (pgmAssignments pgm)                 constants = filter ((`notElem` [falseSV, trueSV]) . fst) consts -               constBindings, svBindings :: [(SV, String)]+               constBindings :: [(SV, String)]                constBindings = map mkConst constants-               svBindings    = map mkAsgn assignments+                 where mkConst :: (SV, CV) -> (SV, String)+                       mkConst (sv, cv) = (sv, cvToSMTLib (roundingMode cfg) cv) -               mkConst :: (SV, CV) -> (SV, String)-               mkConst (sv, cv) = (sv, cvToSMTLib (roundingMode cfg) cv)+               svBindings :: [((SV, String), Maybe String)]+               svBindings = map mkAsgn assignments+                 where mkAsgn (sv, e@(SBVApp (Label l) _)) = ((sv, converter e), Just l)+                       mkAsgn (sv, e)                      = ((sv, converter e), Nothing) +                       converter = cvtExp curProgInfo (capabilities (solver cfg)) rm tableMap++                out :: SV                out = case outputs of                        [o] -> o@@ -359,10 +377,5 @@                                            ++ show x ++ space                                            ++ chain (i+1) xs                                            ++ ")"--               mkAsgn (sv, e) = (sv, converter e)-               converter = cvtExp curProgInfo solverCaps rm tableMap funcMap-                 where solverCaps = capabilities (solver cfg)-                       funcMap    = M.empty  {- HLint ignore module "Use second" -}
Data/SBV/List.hs view
@@ -48,6 +48,7 @@                        notElem, reverse, (++), (!!), map, foldl, foldr, zip, zipWith, filter, all, any) import qualified Prelude as P +import Data.SBV.Core.Kind import Data.SBV.Core.Data hiding (StrOp(..)) import Data.SBV.Core.Model @@ -80,7 +81,7 @@ -- >>> prove $ \(l1 :: SList Word16) (l2 :: SList Word16) -> length l1 + length l2 .== length (l1 ++ l2) -- Q.E.D. length :: SymVal a => SList a -> SInteger-length = lift1 SeqLen (Just (fromIntegral . P.length))+length = lift1 False SeqLen (Just (fromIntegral . P.length))  -- | @`null` s@ is True iff the list is empty --@@ -139,7 +140,7 @@ -- >>> prove $ \(x :: SInteger) -> length (singleton x) .== 1 -- Q.E.D. singleton :: SymVal a => SBV a -> SList a-singleton = lift1 SeqUnit (Just (: []))+singleton = lift1 False SeqUnit (Just (: []))  -- | @`listToListAt` l offset@. List of length 1 at @offset@ in @l@. Unspecified if -- index is out of bounds.@@ -162,7 +163,7 @@   | Just xs <- unliteral l, Just ci <- unliteral i, ci >= 0, ci < genericLength xs, let x = xs `genericIndex` ci   = literal x   | True-  = lift2 SeqNth Nothing l i+  = lift2 False SeqNth Nothing l i  -- | Short cut for 'elemAt' (!!) :: SymVal a => SList a -> SInteger -> SBV a@@ -206,7 +207,7 @@ (++) :: SymVal a => SList a -> SList a -> SList a x ++ y | isConcretelyEmpty x = y        | isConcretelyEmpty y = x-       | True                = lift2 SeqConcat (Just (P.++)) x y+       | True                = lift2 False SeqConcat (Just (P.++)) x y  -- | @`elem` e l@. Does @l@ contain the element @e@? elem :: (Eq a, SymVal a) => SBV a -> SList a -> SBool@@ -227,7 +228,7 @@   | isConcretelyEmpty sub   = literal True   | True-  = lift2 SeqContains (Just (flip L.isInfixOf)) l sub -- NB. flip, since `SeqContains` takes args in rev order!+  = lift2 True SeqContains (Just (flip L.isInfixOf)) l sub -- NB. flip, since `SeqContains` takes args in rev order!  -- | @`isPrefixOf` pre l@. Is @pre@ a prefix of @l@? --@@ -240,7 +241,7 @@   | isConcretelyEmpty pre   = literal True   | True-  = lift2 SeqPrefixOf (Just L.isPrefixOf) pre l+  = lift2 True SeqPrefixOf (Just L.isPrefixOf) pre l  -- | @`isSuffixOf` suf l@. Is @suf@ a suffix of @l@? --@@ -253,7 +254,7 @@   | isConcretelyEmpty suf   = literal True   | True-  = lift2 SeqSuffixOf (Just L.isSuffixOf) suf l+  = lift2 True SeqSuffixOf (Just L.isSuffixOf) suf l  -- | @`take` len l@. Corresponds to Haskell's `take` on symbolic lists. --@@ -300,7 +301,7 @@   , valid $ o + sz                           -- we don't overrun   = literal $ genericTake sz $ genericDrop o c   | True                                     -- either symbolic, or something is out-of-bounds-  = lift3 SeqSubseq Nothing l offset len+  = lift3 False SeqSubseq Nothing l offset len  -- | @`replace` l src dst@. Replace the first occurrence of @src@ by @dst@ in @s@ --@@ -308,22 +309,25 @@ -- Q.E.D. -- >>> prove $ \(l1 :: SList Integer) l2 l3 -> length l2 .> length l1 .=> replace l1 l2 l3 .== l1 -- Q.E.D.-replace :: (Eq a, SymVal a) => SList a -> SList a -> SList a -> SList a+replace :: forall a. (Eq a, SymVal a) => SList a -> SList a -> SList a -> SList a replace l src dst   | Just b <- unliteral src, P.null b   -- If src is null, simply prepend   = dst ++ l-  | Just a <- unliteral l+  | eqCheckIsObjectEq ka+  , Just a <- unliteral l   , Just b <- unliteral src   , Just c <- unliteral dst   = literal $ walk a b c   | True-  = lift3 SeqReplace Nothing l src dst+  = lift3 True SeqReplace Nothing l src dst   where walk haystack needle newNeedle = go haystack   -- note that needle is guaranteed non-empty here.            where go []       = []                  go i@(c:cs)                   | needle `L.isPrefixOf` i = newNeedle P.++ genericDrop (genericLength needle :: Integer) i                   | True                    = c : go cs +        ka = kindOf (Proxy @a)+ -- | @`indexOf` l sub@. Retrieves first position of @sub@ in @l@, @-1@ if there are no occurrences. -- Equivalent to @`offsetIndexOf` l sub 0@. --@@ -341,9 +345,10 @@ -- Q.E.D. -- >>> prove $ \(l :: SList Int8) sub i -> i .> length l .=> offsetIndexOf l sub i .== -1 -- Q.E.D.-offsetIndexOf :: (Eq a, SymVal a) => SList a -> SList a -> SInteger -> SInteger+offsetIndexOf :: forall a. (Eq a, SymVal a) => SList a -> SList a -> SInteger -> SInteger offsetIndexOf s sub offset-  | Just c <- unliteral s        -- a constant list+  | eqCheckIsObjectEq ka+  , Just c <- unliteral s        -- a constant list   , Just n <- unliteral sub      -- a constant search pattern   , Just o <- unliteral offset   -- at a constant offset   , o >= 0, o <= genericLength c        -- offset is good@@ -351,7 +356,8 @@       (i:_) -> literal i       _     -> -1   | True-  = lift3 SeqIndexOf Nothing s sub offset+  = lift3 True SeqIndexOf Nothing s sub offset+  where ka = kindOf (Proxy @a)  -- | @`reverse` s@ reverses the sequence. --@@ -578,9 +584,9 @@ filter f = foldl (\sofar e -> sofar ++ ite (f e) (singleton e) []) []  -- | Lift a unary operator over lists.-lift1 :: forall a b. (SymVal a, SymVal b) => SeqOp -> Maybe (a -> b) -> SBV a -> SBV b-lift1 w mbOp a-  | Just cv <- concEval1 mbOp a+lift1 :: forall a b. (SymVal a, SymVal b) => Bool -> SeqOp -> Maybe (a -> b) -> SBV a -> SBV b+lift1 simpleEq w mbOp a+  | Just cv <- concEval1 simpleEq mbOp a   = cv   | True   = SBV $ SVal k $ Right $ cache r@@ -589,9 +595,9 @@                   newExpr st k (SBVApp (SeqOp w) [sva])  -- | Lift a binary operator over lists.-lift2 :: forall a b c. (SymVal a, SymVal b, SymVal c) => SeqOp -> Maybe (a -> b -> c) -> SBV a -> SBV b -> SBV c-lift2 w mbOp a b-  | Just cv <- concEval2 mbOp a b+lift2 :: forall a b c. (SymVal a, SymVal b, SymVal c) => Bool -> SeqOp -> Maybe (a -> b -> c) -> SBV a -> SBV b -> SBV c+lift2 simpleEq w mbOp a b+  | Just cv <- concEval2 simpleEq mbOp a b   = cv   | True   = SBV $ SVal k $ Right $ cache r@@ -601,9 +607,9 @@                   newExpr st k (SBVApp (SeqOp w) [sva, svb])  -- | Lift a ternary operator over lists.-lift3 :: forall a b c d. (SymVal a, SymVal b, SymVal c, SymVal d) => SeqOp -> Maybe (a -> b -> c -> d) -> SBV a -> SBV b -> SBV c -> SBV d-lift3 w mbOp a b c-  | Just cv <- concEval3 mbOp a b c+lift3 :: forall a b c d. (SymVal a, SymVal b, SymVal c, SymVal d) => Bool -> SeqOp -> Maybe (a -> b -> c -> d) -> SBV a -> SBV b -> SBV c -> SBV d+lift3 simpleEq w mbOp a b c+  | Just cv <- concEval3 simpleEq mbOp a b c   = cv   | True   = SBV $ SVal k $ Right $ cache r@@ -614,16 +620,22 @@                   newExpr st k (SBVApp (SeqOp w) [sva, svb, svc])  -- | Concrete evaluation for unary ops-concEval1 :: (SymVal a, SymVal b) => Maybe (a -> b) -> SBV a -> Maybe (SBV b)-concEval1 mbOp a = literal <$> (mbOp <*> unliteral a)+concEval1 :: forall a b. (SymVal a, SymVal b) => Bool -> Maybe (a -> b) -> SBV a -> Maybe (SBV b)+concEval1 simpleEq mbOp a+  | not simpleEq || eqCheckIsObjectEq (kindOf (Proxy @a)) = literal <$> (mbOp <*> unliteral a)+  | True                                                  = Nothing  -- | Concrete evaluation for binary ops-concEval2 :: (SymVal a, SymVal b, SymVal c) => Maybe (a -> b -> c) -> SBV a -> SBV b -> Maybe (SBV c)-concEval2 mbOp a b = literal <$> (mbOp <*> unliteral a <*> unliteral b)+concEval2 :: forall a b c. (SymVal a, SymVal b, SymVal c) => Bool -> Maybe (a -> b -> c) -> SBV a -> SBV b -> Maybe (SBV c)+concEval2 simpleEq mbOp a b+  | not simpleEq || eqCheckIsObjectEq (kindOf (Proxy @a)) = literal <$> (mbOp <*> unliteral a <*> unliteral b)+  | True                                                  = Nothing  -- | Concrete evaluation for ternary ops-concEval3 :: (SymVal a, SymVal b, SymVal c, SymVal d) => Maybe (a -> b -> c -> d) -> SBV a -> SBV b -> SBV c -> Maybe (SBV d)-concEval3 mbOp a b c = literal <$> (mbOp <*> unliteral a <*> unliteral b <*> unliteral c)+concEval3 :: forall a b c d. (SymVal a, SymVal b, SymVal c, SymVal d) => Bool -> Maybe (a -> b -> c -> d) -> SBV a -> SBV b -> SBV c -> Maybe (SBV d)+concEval3 simpleEq mbOp a b c+  | not simpleEq || eqCheckIsObjectEq (kindOf (Proxy @a)) = literal <$> (mbOp <*> unliteral a <*> unliteral b <*> unliteral c)+  | True                                                  = Nothing  -- | Is the list concretely known empty? isConcretelyEmpty :: SymVal a => SList a -> Bool
Data/SBV/Provers/Bitwuzla.hs view
@@ -31,13 +31,13 @@                               , supportsDefineFun          = True                               , supportsDistinct           = True                               , supportsBitVectors         = True-                              , supportsUninterpretedSorts = False+                              , supportsUninterpretedSorts = True                               , supportsUnboundedInts      = False                               , supportsInt2bv             = False                               , supportsReals              = False                               , supportsApproxReals        = False                               , supportsDeltaSat           = Nothing-                              , supportsIEEE754            = False+                              , supportsIEEE754            = True                               , supportsSets               = False                               , supportsOptimization       = False                               , supportsPseudoBooleans     = False
Data/SBV/Provers/Prover.hs view
@@ -62,6 +62,8 @@ import Data.SBV.Utils.ExtractIO import Data.SBV.Utils.TDiff +import Data.SBV.Lambda () -- instances only+ import qualified Data.SBV.Trans.Control as Control import qualified Data.SBV.Control.Query as Control import qualified Data.SBV.Control.Utils as Control@@ -104,6 +106,7 @@                                             , solverSetOptions            = startOpts                                             , ignoreExitCode              = False                                             , redirectVerbose             = Nothing+                                            , kdRibbonLength              = 40                                             }  -- | If supported, this makes all output go to stdout, which works better with SBV@@ -505,7 +508,7 @@                                                 Nothing            -> Nothing                                                 Just (SBVApp o as) -> case o of                                                                         Uninterpreted v  -> Just $ "The value depends on the uninterpreted constant " ++ show v ++ "."-                                                                        QuantifiedBool _ -> Just "The value depends on a quantified variable."+                                                                        QuantifiedBool{} -> Just "The value depends on a quantified variable."                                                                         IEEEFP FP_FMA    -> Just "Floating point FMA operation is not supported concretely."                                                                         IEEEFP _         -> Just "Not all floating point operations are supported concretely."                                                                         OverflowOp _     -> Just "Overflow-checking is not done concretely."@@ -619,6 +622,9 @@ instance ExtractIO m => SatisfiableM m SBool where satArgReduce   = return instance ExtractIO m => ProvableM    m SBool where proofArgReduce = return +instance {-# OVERLAPPABLE #-} (ExtractIO m, SatisfiableM m a) => SatisfiableM m (SymbolicT m a) where satArgReduce   a = a >>= satArgReduce+instance {-# OVERLAPPABLE #-} (ExtractIO m, ProvableM    m a) => ProvableM    m (SymbolicT m a) where proofArgReduce a = a >>= proofArgReduce+ instance (ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (Forall nm a -> r) where   satArgReduce = satArgReduce . quantifiedBool @@ -671,13 +677,6 @@  instance (SymVal a, ProvableM m p) => ProvableM m (SBV a -> p) where   proofArgReduce fn = mkArg >>= \a -> proofArgReduce $ fn a---- Arrays-instance (HasKind a, HasKind b, SatisfiableM m p) => SatisfiableM m (SArray a b -> p) where-  satArgReduce fn = newArray_ Nothing >>= \a -> satArgReduce $ fn a--instance (HasKind a, HasKind b, ProvableM m p) => ProvableM m (SArray a b -> p) where-  proofArgReduce fn = newArray_ Nothing >>= \a -> proofArgReduce $ fn a  -- 2 Tuple instance (SymVal a, SymVal b, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b) -> p) where
Data/SBV/SMT/SMTLib.hs view
@@ -36,10 +36,10 @@ -- | Convert to SMTLib-2 format toSMTLib2 :: SMTLibConverter SMTLibPgm toSMTLib2 = cvt SMTLib2-  where cvt v ctx progInfo kindInfo isSat comments qinps consts tbls arrs uis axs asgnsSeq cstrs out config = SMTLibPgm v pgm defs+  where cvt v ctx progInfo kindInfo isSat comments qinps consts tbls uis axs asgnsSeq cstrs out config = SMTLibPgm v pgm defs          where converter   = case v of                                SMTLib2 -> SMT2.cvt-               (pgm, defs) = converter ctx progInfo kindInfo isSat comments qinps consts tbls arrs uis axs asgnsSeq cstrs out config+               (pgm, defs) = converter ctx progInfo kindInfo isSat comments qinps consts tbls uis axs asgnsSeq cstrs out config  -- | Convert to SMTLib-2 format toIncSMTLib2 :: SMTLibIncConverter [String]
Data/SBV/SMT/SMTLib2.hs view
@@ -33,7 +33,7 @@ import Data.SBV.SMT.Utils import Data.SBV.Control.Types -import Data.SBV.Core.Symbolic ( QueryContext(..), SetOp(..), CnstMap, getUserName', getSV, regExpToSMTString+import Data.SBV.Core.Symbolic ( QueryContext(..), SetOp(..), getUserName', getSV, regExpToSMTString                               , SMTDef(..), ResultInp(..), ProgInfo(..), SpecialRelOp(..)                               ) @@ -43,30 +43,28 @@  import qualified Data.Graph as DG -tbd :: String -> a-tbd e = error $ "SBV.SMTLib2: Not-yet-supported: " ++ e- -- | Translate a problem into an SMTLib2 script cvt :: SMTLibConverter ([String], [String])-cvt ctx curProgInfo kindInfo isSat comments allInputs (allConsts, consts) tbls arrs uis defs (SBVPgm asgnsSeq) cstrs out cfg = (pgm, exportedDefs)-  where hasInteger     = KUnbounded `Set.member` kindInfo+cvt ctx curProgInfo kindInfo isSat comments allInputs (_, consts) tbls uis defs (SBVPgm asgnsSeq) cstrs out cfg = (pgm, exportedDefs)+  where allKinds       = Set.toList kindInfo++        hasInteger     = KUnbounded `Set.member` kindInfo+        hasArrays      = not (null [() | KArray{}     <- allKinds])+        hasNonBVArrays = not (null [() | KArray k1 k2 <- allKinds, not (isBounded k1 && isBounded k2)])         hasReal        = KReal      `Set.member` kindInfo-        hasFP          =  not (null [() | KFP{} <- Set.toList kindInfo])+        hasFP          =  not (null [() | KFP{} <- allKinds])                        || KFloat     `Set.member` kindInfo                        || KDouble    `Set.member` kindInfo         hasString      = KString     `Set.member` kindInfo         hasRegExp      = (not . null) [() | (_ :: RegExOp) <- G.universeBi asgnsSeq]         hasChar        = KChar      `Set.member` kindInfo         hasRounding    = not $ null [s | (s, _) <- usorts, s == "RoundingMode"]-        hasBVs         = not (null [() | KBounded{} <- Set.toList kindInfo])-        usorts         = [(s, dt) | KUserSort s dt <- Set.toList kindInfo]+        hasBVs         = not (null [() | KBounded{} <- allKinds])+        usorts         = [(s, dt) | KUserSort s dt <- allKinds]         trueUSorts     = [s | (s, _) <- usorts, s /= "RoundingMode"]         tupleArities   = findTupleArities kindInfo-        hasNonBVArrays = (not . null) [() | (_, (_, (k1, k2), _)) <- arrs, not (isBounded k1 && isBounded k2)]-        hasArrayInits  = (not . null) $  [() | (_, (_, _, ArrayFree (Left  (Just _)))) <- arrs]-                                      ++ [() | (_, (_, _, ArrayFree (Right _       ))) <- arrs]         hasOverflows   = (not . null) [() | (_ :: OvOp) <- G.universeBi asgnsSeq]-        hasQuantBools  = (not . null) [() | QuantifiedBool _ <- G.universeBi asgnsSeq]+        hasQuantBools  = (not . null) [() | QuantifiedBool{} <- G.universeBi asgnsSeq]         hasList        = any isList kindInfo         hasSets        = any isSet kindInfo         hasTuples      = not . null $ tupleArities@@ -153,7 +151,6 @@            | hasChar               = setAll "has chars"            | hasString             = setAll "has strings"            | hasRegExp             = setAll "has regular expressions"-           | hasArrayInits         = setAll "has array initializers"            | hasOverflows          = setAll "has overflow checks"            | hasQuantBools         = setAll "has quantified booleans" @@ -175,7 +172,7 @@                                 else ["(set-logic ALL)"] -- fall-thru           where qs  | not needsQuantifiers  = "QF_"                     | True                  = ""-                as  | null arrs             = ""+                as  | not hasArrays         = ""                     | True                  = "A"                 ufs | null uis && null tbls = ""     -- we represent tables as UFs                     | True                  = "UF"@@ -232,8 +229,6 @@              ++ concatMap (uncurry (:) . mkTable) constTables              ++ [ "; --- non-constant tables ---" ]              ++ map nonConstTable nonConstTables-             ++ [ "; --- arrays ---" ]-             ++ concat arrayConstants              ++ [ "; --- uninterpreted constants ---" ]              ++ concatMap (declUI curProgInfo) uis              ++ [ "; --- SBV Function definitions" | not (null funcMap) ]@@ -241,11 +236,7 @@              ++ [ "; --- user defined functions ---"]              ++ userDefs              ++ [ "; --- assignments ---" ]-             ++ concatMap (declDef curProgInfo cfg tableMap funcMap) asgns-             ++ [ "; --- arrayDelayeds ---" ]-             ++ concat arrayDelayeds-             ++ [ "; --- arraySetups ---" ]-             ++ concat arraySetups+             ++ concatMap (declDef curProgInfo cfg tableMap) asgns              ++ [ "; --- delayedEqualities ---" ]              ++ map (\s -> "(assert " ++ s ++ ")") delayedEqualities              ++ [ "; --- formula ---" ]@@ -261,7 +252,6 @@          (tableMap, constTables, nonConstTables) = constructTables rm consts tbls -        (arrayConstants, arrayDelayeds, arraySetups) = unzip3 $ map (declArray cfg allConsts) arrs         delayedEqualities = concatMap snd nonConstTables          finalAssert@@ -300,9 +290,8 @@                   | True         = Just $ Left s          -- SBV only functions.-        funcMap = M.fromList reverses-          where reverses = zip (nub [op | op@(SeqOp SBVReverse{}) <- G.universeBi asgnsSeq])-                               ["sbv.reverse_" ++ show i | i <- [(0::Int)..]]+        funcMap = M.fromList [(op, "|sbv.reverse_" ++ show k ++ "|") | (op, k) <- revs]+          where revs = nub [(op, k) | op@(SeqOp (SBVReverse k)) <- G.universeBi asgnsSeq]          asgns = F.toList asgnsSeq @@ -464,7 +453,7 @@ -- for a list of what we include, in case something doesn't show up -- and you need it! cvtInc :: SMTLibIncConverter [String]-cvtInc curProgInfo inps newKs (allConsts, consts) arrs tbls uis (SBVPgm asgnsSeq) cstrs cfg =+cvtInc curProgInfo inps newKs (_, consts) tbls uis (SBVPgm asgnsSeq) cstrs cfg =             -- any new settings?                settings             -- sorts@@ -478,34 +467,22 @@             ++ concatMap (declConst cfg) consts             -- inputs             ++ concatMap declInp inps-            -- arrays-            ++ concat arrayConstants             -- uninterpreteds             ++ concatMap (declUI curProgInfo) uis             -- table declarations             ++ tableDecls             -- expressions-            ++ concatMap (declDef curProgInfo cfg tableMap funcMap) (F.toList asgnsSeq)-            -- delayed equalities-            ++ concat arrayDelayeds+            ++ concatMap (declDef curProgInfo cfg tableMap) (F.toList asgnsSeq)             -- table setups             ++ concat tableAssigns-            -- array setups-            ++ concat arraySetups             -- extra constraints             ++ map (\(isSoft, attr, v) -> "(assert" ++ (if isSoft then "-soft " else " ") ++ addAnnotations attr (cvtSV v) ++ ")") (F.toList cstrs)-  where -- The following is not really kosher; if it happens that a "new" variant of a function is used only incrementally.-        -- But we'll punt on this for now, as it should be rare and can be "worked-around" if necessary.-        funcMap = M.empty--        rm = roundingMode cfg+  where rm = roundingMode cfg          newKinds = Set.toList newKs          declInp (getSV -> s) = declareFun s (SBVType [kindOf s]) Nothing -        (arrayConstants, arrayDelayeds, arraySetups) = unzip3 $ map (declArray cfg allConsts) arrs-         (tableMap, allTables) = (tm, ct ++ nct)             where (tm, ct, nct) = constructTables rm consts tbls @@ -519,11 +496,11 @@           = []           where solverCaps = capabilities (solver cfg) -declDef :: ProgInfo -> SMTConfig -> TableMap -> FunctionMap -> (SV, SBVExpr) -> [String]-declDef curProgInfo cfg tableMap funcMap (s, expr) =+declDef :: ProgInfo -> SMTConfig -> TableMap -> (SV, SBVExpr) -> [String]+declDef curProgInfo cfg tableMap (s, expr) =         case expr of-          SBVApp  (Label m) [e] -> defineFun cfg (s, cvtSV                                       e) (Just m)-          e                     -> defineFun cfg (s, cvtExp curProgInfo caps rm tableMap funcMap e) Nothing+          SBVApp  (Label m) [e] -> defineFun cfg (s, cvtSV                               e) (Just m)+          e                     -> defineFun cfg (s, cvtExp curProgInfo caps rm tableMap e) Nothing   where caps = capabilities (solver cfg)         rm   = roundingMode cfg @@ -585,11 +562,11 @@   where mkNode d = (d, getKey d, getDeps d)          getKey (d, _) = case d of-                         SMTDef n _ _ _ _ -> n-                         SMTLam{}         -> error $ "Data.SBV.declFuns: Unexpected definition kind: " ++ show d+                         SMTDef n _ _ _ _ _ -> n+                         SMTLam{}           -> error $ "Data.SBV.declFuns: Unexpected definition kind: " ++ show d -        getDeps (SMTDef _ _ d _ _, _) = d-        getDeps (l@SMTLam{}, t)       = error $ "Data.SBV.declFuns: Unexpected definition: " ++ show (l, t)+        getDeps (SMTDef _ _ d _ _ _, _) = d+        getDeps (l@SMTLam{}, t)         = error $ "Data.SBV.declFuns: Unexpected definition: " ++ show (l, t)          mkDecl Nothing  rt = "() "    ++ rt         mkDecl (Just p) rt = p ++ " " ++ rt@@ -603,7 +580,7 @@                                          xs  -> declUserDefMulti xs          declUserDef _ d@(SMTLam{}, _) = error $ "Data.SBV.declFuns: Unexpected anonymous lambda in user-defined functions: " ++ show d-        declUserDef isRec (SMTDef nm fk deps param body, ty) = ("; " ++ nm ++ " :: " ++ show ty ++ recursive ++ frees ++ "\n") ++ s+        declUserDef isRec (SMTDef nm fk deps _ops param body, ty) = ("; " ++ nm ++ " :: " ++ show ty ++ recursive ++ frees ++ "\n") ++ s            where (recursive, definer) | isRec = (" [Recursive]", "define-fun-rec")                                       | True  = ("",             "define-fun") @@ -618,7 +595,7 @@         -- declare a bunch of mutually-recursive functions         declUserDefMulti bs = render $ map collect bs           where collect d@(SMTLam{}, _) = error $ "Data.SBV.declFuns: Unexpected lambda in user-defined mutual-recursion group: " ++ show d-                collect (SMTDef nm fk deps param body, ty) = (deps, nm, ty, '(' : nm ++ " " ++  decl ++ ")", body 3)+                collect (SMTDef nm fk deps _ops param body, ty) = (deps, nm, ty, '(' : nm ++ " " ++  decl ++ ")", body 3)                   where decl = mkDecl param (smtType fk)                  render defs = intercalate "\n" $@@ -696,56 +673,6 @@          constsSet = Set.fromList consts --- Declare arrays-declArray :: SMTConfig -> CnstMap -> (Int, ArrayInfo) -> ([String], [String], [String])-declArray cfg consts (i, (_, (aKnd, bKnd), ctx)) = ( adecl : zipWith wrap [(0::Int)..] (map snd pre)-                                                   , zipWith wrap [lpre..] (map snd post)-                                                   , setup-                                                   )-  where constMapping = M.fromList [(s, c) | (c, s) <- M.assocs consts]-        constNames   = M.keys constMapping-        (pre, post) = partition fst ctxInfo-        nm = "array_" ++ show i--        atyp  = "(Array " ++ smtType aKnd ++ " " ++ smtType bKnd ++ ")"--        adecl = case ctx of-                  ArrayFree (Right lam)     -> "(define-fun "  ++ nm ++ " () " ++ atyp ++ " " ++ lam ++ ")"-                  ArrayFree (Left (Just v)) -> "(define-fun "  ++ nm ++ " () " ++ atyp ++ " ((as const " ++ atyp ++ ") " ++ constInit v ++ "))"-                  ArrayFree (Left Nothing)-                    | bKnd == KChar  ->  -- Can't support yet, because we need to make sure all the elements are length-1 strings. So, punt for now.-                                         tbd "Free array declarations containing SChars"-                  _                  -> "(declare-fun " ++ nm ++ " () " ++ atyp ++                                                  ")"--        -- CVC4 chokes if the initializer is not a constant. (Z3 is ok with it.) So, print it as-        -- a constant if we have it in the constants; otherwise, we merely print it and hope for the best.-        constInit v = case v `M.lookup` constMapping of-                        Nothing -> cvtSV v                    -- Z3 will work, CVC4 will choke. Others don't even support this.-                        Just c  -> cvtCV (roundingMode cfg) c -- Z3 and CVC4 will work. Other's don't support this.--        ctxInfo = case ctx of-                    ArrayFree _       -> []-                    ArrayMutate j a b -> [(all (`elem` constNames) [a, b], "(= " ++ nm ++ " (store array_" ++ show j ++ " " ++ cvtSV a ++ " " ++ cvtSV b ++ "))")]-                    ArrayMerge  t j k -> [(t `elem` constNames,            "(= " ++ nm ++ " (ite " ++ cvtSV t ++ " array_" ++ show j ++ " array_" ++ show k ++ "))")]--        -- Arrange for initializers-        mkInit idx    = "array_" ++ show i ++ "_initializer_" ++ show (idx :: Int)-        initializer   = "array_" ++ show i ++ "_initializer"--        wrap index s = "(define-fun " ++ mkInit index ++ " () Bool " ++ s ++ ")"--        lpre          = length pre-        lAll          = lpre + length post--        setup-          | lAll == 0 = [ "(define-fun " ++ initializer ++ " () Bool true) ; no initialization needed" ]-          | lAll == 1 = [ "(define-fun " ++ initializer ++ " () Bool " ++ mkInit 0 ++ ")"-                        , "(assert " ++ initializer ++ ")"-                        ]-          | True      = [ "(define-fun " ++ initializer ++ " () Bool (and " ++ unwords (map mkInit [0..lAll - 1]) ++ "))"-                        , "(assert " ++ initializer ++ ")"-                        ]- svType :: SV -> String svType s = smtType (kindOf s) @@ -758,7 +685,6 @@   where (body, ret) = (init xs, last xs)  type TableMap    = IM.IntMap String-type FunctionMap = M.Map Op String  -- Present an SV, simply show cvtSV :: SV -> String@@ -772,8 +698,8 @@   | Just tn <- i `IM.lookup` m = tn   | True                       = "table" ++ show i  -- constant tables are always named this way -cvtExp :: ProgInfo -> SolverCapabilities -> RoundingMode -> TableMap -> FunctionMap -> SBVExpr -> String-cvtExp curProgInfo caps rm tableMap functionMap expr@(SBVApp _ arguments) = sh expr+cvtExp :: ProgInfo -> SolverCapabilities -> RoundingMode -> TableMap -> SBVExpr -> String+cvtExp curProgInfo caps rm tableMap expr@(SBVApp _ arguments) = sh expr   where hasPB       = supportsPseudoBooleans caps         hasInt2bv   = supportsInt2bv         caps         hasDistinct = supportsDistinct       caps@@ -912,6 +838,7 @@                               KBool         -> (2::Integer) > fromIntegral l                               KBounded _ n  -> (2::Integer)^n > fromIntegral l                               KUnbounded    -> True+                              KUserSort s _ -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected uninterpreted valued index: " ++ s                               KReal         -> error "SBV.SMT.SMTLib2.cvtExp: unexpected real valued index"                               KFloat        -> error "SBV.SMT.SMTLib2.cvtExp: unexpected float valued index"                               KDouble       -> error "SBV.SMT.SMTLib2.cvtExp: unexpected double valued index"@@ -924,7 +851,7 @@                               KTuple k      -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected tuple valued: " ++ show k                               KMaybe k      -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected maybe valued: " ++ show k                               KEither k1 k2 -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected sum valued: " ++ show (k1, k2)-                              KUserSort s _ -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected uninterpreted valued index: " ++ s+                              KArray  k1 k2 -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected array valued: " ++ show (k1, k2)                  lkUp = "(" ++ getTable tableMap t ++ " " ++ cvtSV i ++ ")" @@ -943,12 +870,13 @@                                 KFP{}         -> ("fp.lt", "fp.leq")                                 KChar         -> error "SBV.SMT.SMTLib2.cvtExp: unexpected string valued index"                                 KString       -> error "SBV.SMT.SMTLib2.cvtExp: unexpected string valued index"+                                KUserSort s _ -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected uninterpreted valued index: " ++ s                                 KList k       -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected sequence valued index: " ++ show k                                 KSet  k       -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected set valued index: " ++ show k                                 KTuple k      -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected tuple valued index: " ++ show k                                 KMaybe k      -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected maybe valued index: " ++ show k                                 KEither k1 k2 -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected sum valued index: " ++ show (k1, k2)-                                KUserSort s _ -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected uninterpreted valued index: " ++ s+                                KArray  k1 k2 -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected array valued index: " ++ show (k1, k2)                  mkCnst = cvtCV rm . mkConstCV (kindOf i)                 le0  = "(" ++ less ++ " " ++ cvtSV i ++ " " ++ mkCnst 0 ++ ")"@@ -956,14 +884,16 @@          sh (SBVApp (KindCast f t) [a]) = handleKindCast hasInt2bv f t (cvtSV a) -        sh (SBVApp (ArrEq i j) [])  = "(= array_" ++ show i ++ " array_" ++ show j ++")"-        sh (SBVApp (ArrRead i) [a]) = "(select array_" ++ show i ++ " " ++ cvtSV a ++ ")"+        sh (SBVApp (ArrayLambda s) [])        = s+        sh (SBVApp ReadArray       [a, i])    = "(select " ++ cvtSV a ++ " " ++ cvtSV i ++ ")"+        sh (SBVApp WriteArray      [a, i, e]) = "(store "  ++ cvtSV a ++ " " ++ cvtSV i ++ " " ++ cvtSV e ++ ")"          sh (SBVApp (Uninterpreted nm) [])   = nm         sh (SBVApp (Uninterpreted nm) args) = "(" ++ nm ++ " " ++ unwords (map cvtSV args) ++ ")"-        sh (SBVApp (QuantifiedBool i) [])   = i-        sh (SBVApp (QuantifiedBool i) args) = error $ "SBV.SMT.SMTLib2.cvtExp: unexpected arguments to quantified boolean: " ++ show (i, args) +        sh (SBVApp (QuantifiedBool _ i) [])   = i+        sh (SBVApp (QuantifiedBool _ i) args) = error $ "SBV.SMT.SMTLib2.cvtExp: unexpected arguments to quantified boolean: " ++ show (i, args)+         sh a@(SBVApp (SpecialRelOp k o) args)           | not (null args)           = error $ "SBV.SMT.SMTLib2.cvtExp: unexpected arguments to special op: " ++ show a@@ -980,6 +910,8 @@                  IsTreeOrder            nm -> asrt nm "tree-order"                  IsPiecewiseLinearOrder nm -> asrt nm "piecewise-linear-order" +        sh (SBVApp (Divides n) [a]) = "((_ divisible " ++ show n ++ ") " ++ cvtSV a ++ ")"+         sh (SBVApp (Extract i j) [a]) | ensureBV = "((_ extract " ++ show i ++ " " ++ show j ++ ") " ++ cvtSV a ++ ")"          sh (SBVApp (Rol i) [a])@@ -1043,10 +975,7 @@         sh (SBVApp (RegExOp o@RegExNEq{}) []) = show o          -- Reverse is special, since we need to generate call to the internally generated function-        sh inp@(SBVApp op@(SeqOp SBVReverse{}) args) = "(" ++ ops ++ " " ++ unwords (map cvtSV args) ++ ")"-          where ops = case op `M.lookup` functionMap of-                        Just s  -> s-                        Nothing -> error $ "*** SBV.SMT.SMTLib2.cvtExp.sh: impossible happened; can't translate: " ++ show inp+        sh (SBVApp (SeqOp (SBVReverse k)) args) = "(|sbv.reverse_" ++ show k ++ "| " ++ unwords (map cvtSV args) ++ ")"          sh (SBVApp (SeqOp op) args) = "(" ++ show op ++ " " ++ unwords (map cvtSV args) ++ ")" @@ -1269,9 +1198,9 @@                 cstr KRational nm = ["(< 0 (sbv.rat.denominator " ++ nm ++ "))"]                 cstr _         _  = [] -        mkAnd []  = "true"-        mkAnd [c] = c-        mkAnd cs  = "(and " ++ unwords cs ++ ")"+        mkAnd [] _context = []+        mkAnd [c] context = context c+        mkAnd cs  context = context $ "(and " ++ unwords cs ++ ")"          walk :: Int -> String -> (Kind -> String -> [String]) -> Kind -> [String]         walk _d nm f k@KBool     {}         = f k nm@@ -1289,12 +1218,12 @@           | charRatFree k                 = []           | True                          = let fnm   = "seq" ++ show d                                                 cstrs = walk (d+1) ("(seq.nth " ++ nm ++ " " ++ fnm ++ ")") f k-                                            in ["(forall ((" ++ fnm ++ " " ++ smtType KUnbounded ++ ")) " ++ "(=> (and (>= " ++ fnm ++ " 0) (< " ++ fnm ++ " (seq.len " ++ nm ++ "))) " ++ mkAnd cstrs ++ "))"]+                                            in mkAnd cstrs $ \hole -> ["(forall ((" ++ fnm ++ " " ++ smtType KUnbounded ++ ")) (=> (and (>= " ++ fnm ++ " 0) (< " ++ fnm ++ " (seq.len " ++ nm ++ "))) " ++ hole ++ "))"]         walk  d  nm f (KSet k)           | charRatFree k                 = []           | True                          = let fnm    = "set" ++ show d                                                 cstrs  = walk (d+1) nm (\sk snm -> ["(=> (select " ++ snm ++ " " ++ fnm ++ ") " ++ c ++ ")" | c <- f sk fnm]) k-                                            in ["(forall ((" ++ fnm ++ " " ++ smtType k ++ ")) " ++ mkAnd cstrs ++ ")"]+                                            in mkAnd cstrs $ \hole -> ["(forall ((" ++ fnm ++ " " ++ smtType k ++ ")) " ++ hole ++ ")"]         walk  d  nm  f (KTuple ks)        = let tt        = "SBVTuple" ++ show (length ks)                                                 project i = "(proj_" ++ show i ++ "_" ++ tt ++ " " ++ nm ++ ")"                                                 nmks      = [(project i, k) | (i, k) <- zip [1::Int ..] ks]@@ -1306,6 +1235,11 @@                                                 c1 = ["(=> " ++ "((_ is (left_SBVEither ("  ++ smtType k1 ++ ") " ++ smtType ke ++ ")) " ++ nm ++ ") " ++ c ++ ")" | c <- walk (d+1) n1 f k1]                                                 c2 = ["(=> " ++ "((_ is (right_SBVEither (" ++ smtType k2 ++ ") " ++ smtType ke ++ ")) " ++ nm ++ ") " ++ c ++ ")" | c <- walk (d+1) n2 f k2]                                             in c1 ++ c2+        walk d  nm f  (KArray k1 k2)+          | all charRatFree [k1, k2]      = []+          | True                          = let fnm   = "array" ++ show d+                                                cstrs = walk (d+1) ("(select " ++ nm ++ " " ++ fnm ++ ")") f k2+                                            in mkAnd cstrs $ \hole -> ["(forall ((" ++ fnm ++ " " ++ smtType k1 ++ ")) " ++ hole ++ ")"]  ----------------------------------------------------------------------------------------------- -- Casts supported by SMTLib. (From: <https://smt-lib.org/theories-FloatingPoint.shtml>)
Data/SBV/SMT/Utils.hs view
@@ -49,7 +49,6 @@                        -> ResultInp                                      -- ^ inputs or params                        -> (CnstMap, [(SV, CV)])                          -- ^ constants. The map, and as rendered in order                        -> [((Int, Kind, Kind), [SV])]                    -- ^ auto-generated tables-                       -> [(Int, ArrayInfo)]                             -- ^ user specified arrays                        -> [(String, (Bool, Maybe [String], SBVType))]    -- ^ uninterpreted functions/constants                        -> [(SMTDef, SBVType)]                            -- ^ user given axioms/definitions                        -> SBVPgm                                         -- ^ assignments@@ -63,7 +62,6 @@                           -> [NamedSymVar]                               -- ^ inputs                           -> Set.Set Kind                                -- ^ new kinds                           -> (CnstMap, [(SV, CV)])                       -- ^ all constants sofar, and new constants-                          -> [(Int, ArrayInfo)]                          -- ^ newly created arrays                           -> [((Int, Kind, Kind), [SV])]                 -- ^ newly created tables                           -> [(String, (Bool, Maybe [String], SBVType))] -- ^ newly created uninterpreted functions/constants                           -> SBVPgm                                      -- ^ assignments
Data/SBV/Set.hs view
@@ -54,6 +54,8 @@ import Data.SBV.Core.Model () -- instances only import Data.SBV.Core.Symbolic (SetOp(..)) +import Data.SBV.Core.Kind+ import qualified Data.Generics.Uniplate.Data as G  -- $setup@@ -123,13 +125,11 @@                     , "*** If you run into this issue, please comment on the above ticket for"                     , "*** possible improvements."                     ]-  | Just (RegularSet rs) <- unliteral ss-  = literal $ ComplementSet rs-  | Just (ComplementSet cs) <- unliteral ss-  = literal $ RegularSet cs-  | True-  = SBV $ SVal k $ Right $ cache r-  where k = KSet (kindOf (Proxy @a))+  | eqCheckIsObjectEq ek, Just (RegularSet rs)    <- unliteral ss = literal $ ComplementSet rs+  | eqCheckIsObjectEq ek, Just (ComplementSet cs) <- unliteral ss = literal $ RegularSet cs+  | True                                                          = SBV $ SVal k $ Right $ cache r+  where ek = kindOf (Proxy @a)+        k  = KSet ek          r st = do svs <- sbvToSV st ss                   newExpr st k $ SBVApp (SetOp SetComplement) [svs]@@ -160,11 +160,11 @@ insert :: forall a. (Ord a, SymVal a) => SBV a -> SSet a -> SSet a insert se ss   -- Case 1: Constant regular set, just add it:-  | Just e <- unliteral se, Just (RegularSet rs) <- unliteral ss+  | eqCheckIsObjectEq ka, Just e <- unliteral se, Just (RegularSet rs) <- unliteral ss   = literal $ RegularSet $ e `Set.insert` rs    -- Case 2: Constant complement set, with element in the complement, just remove it:-  | Just e <- unliteral se, Just (ComplementSet cs) <- unliteral ss, e `Set.member` cs+  | eqCheckIsObjectEq ka, Just e <- unliteral se, Just (ComplementSet cs) <- unliteral ss, e `Set.member` cs   = literal $ ComplementSet $ e `Set.delete` cs    -- Otherwise, go symbolic@@ -203,11 +203,11 @@ delete :: forall a. (Ord a, SymVal a) => SBV a -> SSet a -> SSet a delete se ss   -- Case 1: Constant regular set, just remove it:-  | Just e <- unliteral se, Just (RegularSet rs) <- unliteral ss+  | eqCheckIsObjectEq ka, Just e <- unliteral se, Just (RegularSet rs) <- unliteral ss   = literal $ RegularSet $ e `Set.delete` rs    -- Case 2: Constant complement set, with element missing in the complement, just add it:-  | Just e <- unliteral se, Just (ComplementSet cs) <- unliteral ss, e `Set.notMember` cs+  | eqCheckIsObjectEq ka, Just e <- unliteral se, Just (ComplementSet cs) <- unliteral ss, e `Set.notMember` cs   = literal $ ComplementSet $ e `Set.insert` cs    -- Otherwise, go symbolic@@ -230,14 +230,14 @@ -- -- >>> prove $ \x -> x `member` (full :: SSet Integer) -- Q.E.D.-member :: (Ord a, SymVal a) => SBV a -> SSet a -> SBool+member :: forall a. (Ord a, SymVal a) => SBV a -> SSet a -> SBool member se ss   -- Case 1: Constant regular set, just check:-  | Just e <- unliteral se, Just (RegularSet rs) <- unliteral ss+  | eqCheckIsObjectEq ka, Just e <- unliteral se, Just (RegularSet rs) <- unliteral ss   = literal $ e `Set.member` rs    -- Case 2: Constant complement set, check for non-member-  | Just e <- unliteral se, Just (ComplementSet cs) <- unliteral ss+  | eqCheckIsObjectEq ka, Just e <- unliteral se, Just (ComplementSet cs) <- unliteral ss   = literal $ e `Set.notMember` cs    -- Otherwise, go symbolic@@ -247,6 +247,8 @@                   sve <- sbvToSV st se                   newExpr st KBool $ SBVApp (SetOp SetMember) [sve, svs] +        ka = kindOf (Proxy @a)+ -- | Test for non-membership. -- -- >>> prove $ \x -> x `notMember` observe "set" (singleton (x :: SInteger))@@ -276,11 +278,11 @@ -- Note how we have to call `Data.SBV.prove` in the last case since dealing -- with infinite sets requires a call to the solver and cannot be -- constant folded.-null :: HasKind a => SSet a -> SBool+null :: (Ord a, SymVal a, HasKind a) => SSet a -> SBool null = (.== empty)  -- | Synonym for 'Data.SBV.Set.null'.-isEmpty :: HasKind a => SSet a -> SBool+isEmpty :: (Ord a, SymVal a, HasKind a) => SSet a -> SBool isEmpty = null  -- | Is this the full set?@@ -299,11 +301,11 @@ -- Note how we have to call `Data.SBV.prove` in the first case since dealing -- with infinite sets requires a call to the solver and cannot be -- constant folded.-isFull :: HasKind a => SSet a -> SBool+isFull :: (Ord a, SymVal a, HasKind a) => SSet a -> SBool isFull = (.== full)  -- | Synonym for 'Data.SBV.Set.isFull'.-isUniversal :: HasKind a => SSet a -> SBool+isUniversal :: (Ord a, SymVal a, HasKind a) => SSet a -> SBool isUniversal = isFull  -- | Subset test.@@ -316,14 +318,14 @@ -- -- >>> prove $ \x (s :: SSet Integer) -> (x `delete` s) `isSubsetOf` s -- Q.E.D.-isSubsetOf :: (Ord a, SymVal a) => SSet a -> SSet a -> SBool+isSubsetOf :: forall a. (Ord a, SymVal a) => SSet a -> SSet a -> SBool isSubsetOf sa sb   -- Case 1: Constant regular sets, just check:-  | Just (RegularSet a) <- unliteral sa, Just (RegularSet b) <- unliteral sb+  | eqCheckIsObjectEq ka, Just (RegularSet a) <- unliteral sa, Just (RegularSet b) <- unliteral sb   = literal $ a `Set.isSubsetOf` b    -- Case 2: Constant complement sets, check in the reverse direction:-  | Just (ComplementSet a) <- unliteral sa, Just (ComplementSet b) <- unliteral sb+  | eqCheckIsObjectEq ka, Just (ComplementSet a) <- unliteral sa, Just (ComplementSet b) <- unliteral sb   = literal $ b `Set.isSubsetOf` a    -- Otherwise, go symbolic@@ -333,6 +335,8 @@                   svb <- sbvToSV st sb                   newExpr st KBool $ SBVApp (SetOp SetSubset) [sva, svb] +        ka = kindOf (Proxy @a)+ -- | Proper subset test. -- -- >>> prove $ empty `isProperSubsetOf` (full :: SSet Integer)@@ -395,14 +399,14 @@ -- Q.E.D. -- >>> prove $ \(a :: SSet Integer) -> a `union` complement a .== full -- Q.E.D.-union :: (Ord a, SymVal a) => SSet a -> SSet a -> SSet a+union :: forall a. (Ord a, SymVal a) => SSet a -> SSet a -> SSet a union sa sb   -- Case 1: Constant regular sets, just compute-  | Just (RegularSet a) <- unliteral sa, Just (RegularSet b) <- unliteral sb+  | eqCheckIsObjectEq ka, Just (RegularSet a) <- unliteral sa, Just (RegularSet b) <- unliteral sb   = literal $ RegularSet $ a `Set.union` b    -- Case 2: Constant complement sets, complement the intersection:-  | Just (ComplementSet a) <- unliteral sa, Just (ComplementSet b) <- unliteral sb+  | eqCheckIsObjectEq ka, Just (ComplementSet a) <- unliteral sa, Just (ComplementSet b) <- unliteral sb   = literal $ ComplementSet $ a `Set.intersection` b    -- Otherwise, go symbolic@@ -413,6 +417,8 @@                   svb <- sbvToSV st sb                   newExpr st k $ SBVApp (SetOp SetUnion) [sva, svb] +        ka = kindOf (Proxy @a)+ -- | Unions. Equivalent to @'foldr' 'union' 'empty'@. -- -- >>> prove $ unions [] .== (empty :: SSet Integer)@@ -436,14 +442,14 @@ -- Q.E.D. -- >>> prove $ \(a :: SSet Integer) b -> a `disjoint` b .=> a `intersection` b .== empty -- Q.E.D.-intersection :: (Ord a, SymVal a) => SSet a -> SSet a -> SSet a+intersection :: forall a. (Ord a, SymVal a) => SSet a -> SSet a -> SSet a intersection sa sb   -- Case 1: Constant regular sets, just compute-  | Just (RegularSet a) <- unliteral sa, Just (RegularSet b) <- unliteral sb+  | eqCheckIsObjectEq ka, Just (RegularSet a) <- unliteral sa, Just (RegularSet b) <- unliteral sb   = literal $ RegularSet $ a `Set.intersection` b    -- Case 2: Constant complement sets, complement the union:-  | Just (ComplementSet a) <- unliteral sa, Just (ComplementSet b) <- unliteral sb+  | eqCheckIsObjectEq ka, Just (ComplementSet a) <- unliteral sa, Just (ComplementSet b) <- unliteral sb   = literal $ ComplementSet $ a `Set.union` b    -- Otherwise, go symbolic@@ -454,6 +460,8 @@                   svb <- sbvToSV st sb                   newExpr st k $ SBVApp (SetOp SetIntersect) [sva, svb] +        ka = kindOf (Proxy @a)+ -- | Intersections. Equivalent to @'foldr' 'intersection' 'full'@. Note that -- Haskell's 'Data.Set' does not support this operation as it does not have a -- way of representing universal sets.@@ -473,10 +481,10 @@ -- Q.E.D. -- >>> prove $ \(a :: SSet Integer) -> a `difference` a .== empty -- Q.E.D.-difference :: (Ord a, SymVal a) => SSet a -> SSet a -> SSet a+difference :: forall a. (Ord a, SymVal a) => SSet a -> SSet a -> SSet a difference sa sb   -- Only constant fold the regular case, others are left symbolic-  | Just (RegularSet a) <- unliteral sa, Just (RegularSet b) <- unliteral sb+  | eqCheckIsObjectEq ka, Just (RegularSet a) <- unliteral sa, Just (RegularSet b) <- unliteral sb   = literal $ RegularSet $ a `Set.difference` b    -- Otherwise, go symbolic@@ -486,6 +494,8 @@         r st = do sva <- sbvToSV st sa                   svb <- sbvToSV st sb                   newExpr st k $ SBVApp (SetOp SetDifference) [sva, svb]++        ka = kindOf (Proxy @a)  -- | Synonym for 'Data.SBV.Set.difference'. infixl 9 \\
Data/SBV/Tools/BMC.hs view
@@ -17,7 +17,7 @@ {-# OPTIONS_GHC -Wall -Werror #-}  module Data.SBV.Tools.BMC (-         bmc, bmcWith+         bmcRefute, bmcRefuteWith, bmcCover, bmcCoverWith        ) where  import Data.SBV@@ -25,51 +25,96 @@  import Control.Monad (when) --- | Bounded model checking, using the default solver. See "Documentation.SBV.Examples.ProofTools.BMC"--- for an example use case.------ Note that the BMC engine does *not* guarantee that the solution is unique. However, if it does--- find a solution at depth @i@, it is guaranteed that there are no shorter solutions.-bmc :: (EqSymbolic st, Queriable IO st, res ~ QueryResult st)+-- | Are we covering or refuting?+data BMCKind = Refute+             | Cover++-- | Refutation using bounded model checking, using the default solver. This version tries to refute the goal+-- in a depth-first fashion. Note that this method can find a refutation, but will never find a "proof."+-- If it finds a refutation, it will be the shortest, though not necessarily unique.+bmcRefute :: (Queriable IO st, res ~ QueryResult st)     => Maybe Int                            -- ^ Optional bound     -> Bool                                 -- ^ Verbose: prints iteration count     -> Symbolic ()                          -- ^ Setup code, if necessary. (Typically used for 'Data.SBV.setOption' calls. Pass @return ()@ if not needed.)     -> (st -> SBool)                        -- ^ Initial condition-    -> (st -> [st])                         -- ^ Transition relation+    -> (st -> st -> SBool)                  -- ^ Transition relation     -> (st -> SBool)                        -- ^ Goal to cover, i.e., we find a set of transitions that satisfy this predicate.     -> IO (Either String (Int, [res]))      -- ^ Either a result, or a satisfying path of given length and intermediate observations.-bmc = bmcWith defaultSMTCfg+bmcRefute = bmcRefuteWith defaultSMTCfg --- | Bounded model checking, configurable with the solver-bmcWith :: (EqSymbolic st, Queriable IO st, res ~ QueryResult st)-        => SMTConfig-        -> Maybe Int-        -> Bool-        -> Symbolic ()-        -> (st -> SBool)-        -> (st -> [st])-        -> (st -> SBool)+-- | Refutation using a given solver.+bmcRefuteWith :: (Queriable IO st, res ~ QueryResult st)+    => SMTConfig                            -- ^ Solver to use+    -> Maybe Int                            -- ^ Optional bound+    -> Bool                                 -- ^ Verbose: prints iteration count+    -> Symbolic ()                          -- ^ Setup code, if necessary. (Typically used for 'Data.SBV.setOption' calls. Pass @return ()@ if not needed.)+    -> (st -> SBool)                        -- ^ Initial condition+    -> (st -> st -> SBool)                  -- ^ Transition relation+    -> (st -> SBool)                        -- ^ Goal to cover, i.e., we find a set of transitions that satisfy this predicate.+    -> IO (Either String (Int, [res]))      -- ^ Either a result, or a satisfying path of given length and intermediate observations.+bmcRefuteWith = bmcWith Refute++-- | Covers using bounded model checking, using the default solver. This version tries to cover the goal+-- in a depth-first fashion. Note that this method can find a cover, but will never find determine that a goal is+-- not coverable. If it finds a cover, it will be the shortest, though not necessarily unique.+bmcCover :: (Queriable IO st, res ~ QueryResult st)+    => Maybe Int                            -- ^ Optional bound+    -> Bool                                 -- ^ Verbose: prints iteration count+    -> Symbolic ()                          -- ^ Setup code, if necessary. (Typically used for 'Data.SBV.setOption' calls. Pass @return ()@ if not needed.)+    -> (st -> SBool)                        -- ^ Initial condition+    -> (st -> st -> SBool)                  -- ^ Transition relation+    -> (st -> SBool)                        -- ^ Goal to cover, i.e., we find a set of transitions that satisfy this predicate.+    -> IO (Either String (Int, [res]))      -- ^ Either a result, or a satisfying path of given length and intermediate observations.+bmcCover = bmcCoverWith defaultSMTCfg++-- | Cover using a given solver.+bmcCoverWith :: (Queriable IO st, res ~ QueryResult st)+    => SMTConfig                            -- ^ Solver to use+    -> Maybe Int                            -- ^ Optional bound+    -> Bool                                 -- ^ Verbose: prints iteration count+    -> Symbolic ()                          -- ^ Setup code, if necessary. (Typically used for 'Data.SBV.setOption' calls. Pass @return ()@ if not needed.)+    -> (st -> SBool)                        -- ^ Initial condition+    -> (st -> st -> SBool)                  -- ^ Transition relation+    -> (st -> SBool)                        -- ^ Goal to cover, i.e., we find a set of transitions that satisfy this predicate.+    -> IO (Either String (Int, [res]))      -- ^ Either a result, or a satisfying path of given length and intermediate observations.+bmcCoverWith = bmcWith Cover++-- | Bounded model checking, configurable with the solver. Not exported; use 'bmcCover', 'bmcRefute' and their "with" variants.+bmcWith :: (Queriable IO st, res ~ QueryResult st)+        => BMCKind -> SMTConfig -> Maybe Int -> Bool -> Symbolic () -> (st -> SBool) -> (st -> st -> SBool) -> (st -> SBool)         -> IO (Either String (Int, [res]))-bmcWith cfg mbLimit chatty setup initial trans goal+bmcWith kind cfg mbLimit chatty setup initial trans goal   = runSMTWith cfg $ do setup                         query $ do state <- create                                    constrain $ initial state                                    go 0 state []-   where go i _ _+   where (what, badResult, goodResult) = case kind of+                                           Cover  -> ("BMC Cover",  "Cover can't be established.", "Satisfying")+                                           Refute -> ("BMC Refute", "Cannot refute the claim.",    "Failing")++         go i _ _           | Just l <- mbLimit, i >= l-          = return $ Left $ "BMC limit of " ++ show l ++ " reached"-         go i curState sofar = do when chatty $ io $ putStrLn $ "BMC: Iteration: " ++ show i+          = return $ Left $ what ++ " limit of " ++ show l ++ " reached. " ++ badResult++         go i curState sofar = do when chatty $ io $ putStrLn $ what ++ ": Iteration: " ++ show i+                                   push 1-                                  constrain $ goal curState++                                  let g = goal curState+                                  constrain $ case kind of+                                                Cover  ->      g   -- Covering the goal+                                                Refute -> sNot g   -- Trying to refute the goal, so satisfy the negation+                                   cs <- checkSat+                                   case cs of-                                    DSat{} -> error "BMC: Solver returned an unexpected delta-sat result."-                                    Sat    -> do when chatty $ io $ putStrLn $ "BMC: Solution found at iteration " ++ show i+                                    DSat{} -> error $ what ++ ": Solver returned an unexpected delta-sat result."+                                    Sat    -> do when chatty $ io $ putStrLn $ what ++ ": " ++ goodResult ++ " state found at iteration " ++ show i                                                  ms <- mapM project (curState : sofar)                                                  return $ Right (i, reverse ms)-                                    Unk    -> do when chatty $ io $ putStrLn $ "BMC: Backend solver said unknown at iteration " ++ show  i-                                                 return $ Left $ "BMC: Solver said unknown in iteration " ++ show i+                                    Unk    -> do when chatty $ io $ putStrLn $ what ++ ": Backend solver said unknown at iteration " ++ show  i+                                                 return $ Left $ what ++ ": Solver said unknown in iteration " ++ show i                                     Unsat  -> do pop 1                                                  nextState <- create-                                                 constrain $ sAny (nextState .==) (trans curState)+                                                 constrain $ curState `trans` nextState                                                  go (i+1) nextState (curState : sofar)
Data/SBV/Tools/GenTest.hs view
@@ -160,7 +160,8 @@                   KUserSort us _    -> error $ "SBV.renderTest: Unsupported uninterpreted sort: " ++ us                   k@KTuple{}        -> error $ "SBV.renderTest: Unsupported tuple: " ++ show k                   k@KMaybe{}        -> error $ "SBV.renderTest: Unsupported maybe: " ++ show k-                  k@KEither{}       -> error $ "SBV.renderTest: Unsupported sum: " ++ show k+                  k@KEither{}       -> error $ "SBV.renderTest: Unsupported sum: "   ++ show k+                  k@KArray{}        -> error $ "SBV.renderTest: Unsupported array: " ++ show k  c :: String -> [([CV], [CV])] -> String c n vs = intercalate "\n" $@@ -250,10 +251,11 @@                         KReal             -> error "SBV.renderTest: Real values are not supported when generating C test-cases."                         KUserSort us _    -> error $ "SBV.renderTest: Unsupported uninterpreted sort: " ++ us                         k@KList{}         -> error $ "SBV.renderTest: Unsupported list sort: "   ++ show k-                        k@KSet{}          -> error $ "SBV.renderTest: Unsupported set sort: "   ++ show k+                        k@KSet{}          -> error $ "SBV.renderTest: Unsupported set sort: "    ++ show k                         k@KTuple{}        -> error $ "SBV.renderTest: Unsupported tuple sort: "  ++ show k                         k@KMaybe{}        -> error $ "SBV.renderTest: Unsupported maybe sort: "  ++ show k                         k@KEither{}       -> error $ "SBV.renderTest: Unsupported either sort: " ++ show k+                        k@KArray{}        -> error $ "SBV.renderTest: Unsupported array sort: "  ++ show k           mkLine (is, os) = "{{" ++ intercalate ", " (map v is) ++ "}, {" ++ intercalate ", " (map v os) ++ "}}"@@ -272,9 +274,10 @@                   k@KSet{}         -> error $ "SBV.renderTest: Unsupported set sort!" ++ show k                   KUserSort us _   -> error $ "SBV.renderTest: Unsupported uninterpreted sort: " ++ us                   KReal            -> error "SBV.renderTest: Real values are not supported when generating C test-cases."-                  k@KTuple{}       -> error $ "SBV.renderTest: Unsupported tuple sort!" ++ show k-                  k@KMaybe{}       -> error $ "SBV.renderTest: Unsupported maybe sort!" ++ show k-                  k@KEither{}      -> error $ "SBV.renderTest: Unsupported sum sort!" ++ show k+                  k@KTuple{}       -> error $ "SBV.renderTest: Unsupported tuple sort: " ++ show k+                  k@KMaybe{}       -> error $ "SBV.renderTest: Unsupported maybe sort: " ++ show k+                  k@KEither{}      -> error $ "SBV.renderTest: Unsupported sum sort: "   ++ show k+                  k@KArray{}       -> error $ "SBV.renderTest: Unsupported sum sort: "   ++ show k          outLine           | null vs = "printf(\"\");"@@ -360,12 +363,13 @@         xlt _ (CChar     r)  = error $ "SBV.renderTest.Forte: Unexpected char value: "             ++ show r         xlt _ (CString   r)  = error $ "SBV.renderTest.Forte: Unexpected string value: "           ++ show r         xlt _ (CAlgReal  r)  = error $ "SBV.renderTest.Forte: Unexpected real value: "             ++ show r+        xlt _ (CUserSort r)  = error $ "SBV.renderTest.Forte: Unexpected uninterpreted value: "    ++ show r         xlt _ CList{}        = error   "SBV.renderTest.Forte: Unexpected list value!"         xlt _ CSet{}         = error   "SBV.renderTest.Forte: Unexpected set value!"         xlt _ CTuple{}       = error   "SBV.renderTest.Forte: Unexpected list value!"         xlt _ CMaybe{}       = error   "SBV.renderTest.Forte: Unexpected maybe value!"         xlt _ CEither{}      = error   "SBV.renderTest.Forte: Unexpected sum value!"-        xlt _ (CUserSort r)  = error $ "SBV.renderTest.Forte: Unexpected uninterpreted value: " ++ show r+        xlt _  CArray{}      = error   "SBV.renderTest.Forte: Unexpected array value!"          mkLine  (i, o) = "("  ++ mkTuple (form (fst ss) (concatMap blast i)) ++ ", " ++ mkTuple (form (snd ss) (concatMap blast o)) ++ ")"         mkTuple []  = "()"
Data/SBV/Tools/Induction.hs view
@@ -69,7 +69,7 @@ --    * A 'Failed' result in a 'PartialCorrectness' step means that the invariant holds, but assuming the --      termination condition the goal still does not follow. That is, the partial correctness --      does not hold.-data InductionResult a = Failed InductionStep a+data InductionResult a = Failed InductionStep (a, a)                        | Proven  -- | Show instance for 'InductionResult', diagnostic purposes only.@@ -86,7 +86,7 @@        => Bool                             -- ^ Verbose mode        -> Symbolic ()                      -- ^ Setup code, if necessary. (Typically used for 'Data.SBV.setOption' calls. Pass @return ()@ if not needed.)        -> (st -> SBool)                    -- ^ Initial condition-       -> (st -> [st])                     -- ^ Transition relation+       -> (st -> st -> SBool)              -- ^ Transition relation        -> [(String, st -> SBool)]          -- ^ Strengthenings, if any. The @String@ is a simple tag.        -> (st -> SBool)                    -- ^ Invariant that ensures the goal upon termination        -> (st -> (SBool, SBool))           -- ^ Termination condition and the goal to establish@@ -99,21 +99,21 @@            -> Bool            -> Symbolic ()            -> (st -> SBool)-           -> (st -> [st])+           -> (st -> st -> SBool)            -> [(String, st -> SBool)]            -> (st -> SBool)            -> (st -> (SBool, SBool))            -> IO (InductionResult res) inductWith cfg chatty setup initial trans strengthenings inv goal =      try "Proving initiation"-         (\s -> initial s .=> inv s)+         (\s _ -> initial s .=> inv s)          (Failed (Initiation Nothing))          $ strengthen strengthenings          $ try "Proving consecution"-               (\s -> sAnd (inv s : [st s | (_, st) <- strengthenings]) .=> sAll inv (trans s))+               (\s s' -> sAnd (inv s : s `trans` s' : [st s | (_, st) <- strengthenings]) .=> inv s')                (Failed (Consecution Nothing))                $ try "Proving partial correctness"-                     (\s -> let (term, result) = goal s in inv s .&& term .=> result)+                     (\s _ -> let (term, result) = goal s in inv s .&& term .=> result)                      (Failed PartialCorrectness)                      (msg "Done" >> return Proven) @@ -127,24 +127,28 @@          check p = runSMTWith cfg $ do                         setup-                        query $ do st <- create-                                   constrain $ sNot (p st)+                        query $ do s  <- create+                                   s' <- create+                                   constrain $ sNot (p s s')                                     cs <- checkSat                                    case cs of                                      Unk    -> error "Solver said unknown"                                      DSat{} -> error "Solver returned a delta-sat result"                                      Unsat  -> return Nothing-                                     Sat    -> do io $ msg "Failed:"-                                                  ex <- project st-                                                  io $ msg $ show ex-                                                  return $ Just ex+                                     Sat    -> do io $ msg "Failed in state:"+                                                  exS  <- project s+                                                  io $ msg $ show exS+                                                  io $ msg "Transitioning to:"+                                                  exS' <- project s'+                                                  io $ msg $ show exS'+                                                  return $ Just (exS, exS')          strengthen []             cont = cont         strengthen ((nm, st):sts) cont = try ("Proving strengthening initiation  : " ++ nm)-                                             (\s -> initial s .=> st s)+                                             (\s _ -> initial s .=> st s)                                              (Failed (Initiation (Just nm)))                                              $ try ("Proving strengthening consecution: " ++ nm)-                                                   (\s -> st s .=> sAll st (trans s))+                                                   (\s s' -> sAnd [st s, s `trans` s'] .=> st s')                                                    (Failed (Consecution (Just nm)))                                                    (strengthen sts cont)
+ Data/SBV/Tools/KDKernel.hs view
@@ -0,0 +1,307 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Data.SBV.Tools.KDKernel+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Kernel of the KnuckleDragger prover API.+-----------------------------------------------------------------------------++{-# LANGUAGE ConstraintKinds      #-}+{-# LANGUAGE FlexibleContexts     #-}+{-# LANGUAGE FlexibleInstances    #-}+{-# LANGUAGE NamedFieldPuns       #-}+{-# LANGUAGE ScopedTypeVariables  #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Data.SBV.Tools.KDKernel (+         Proposition,  Proof+       , axiom+       , lemma,        lemmaWith,   lemmaGen+       , theorem,      theoremWith+       , Induction(..)+       , sorry+       ) where++import Control.Monad.Trans  (liftIO)+import Control.Monad.Reader (ask)++import Data.List (intercalate, sort, nub)++import Data.SBV+import Data.SBV.Core.Data (Constraint)++import Data.SBV.Tools.KDUtils++import qualified Data.SBV.List as SL++-- | A proposition is something SBV is capable of proving/disproving. We capture this+-- with a set of constraints. This type might look scary, but for the most part you+-- can ignore it and treat it as anything you can pass to 'prove' or 'sat' in SBV.+type Proposition a = ( QuantifiedBool a+                     , QNot a+                     , Skolemize (NegatesTo a)+                     , Satisfiable (Symbolic (SkolemsTo (NegatesTo a)))+                     , Constraint  Symbolic  (SkolemsTo (NegatesTo a))+                     )++-- | Keeping track of where the sorry originates from. Used in displaying dependencies.+data RootOfTrust = None        -- ^ Trusts nothing (aside from SBV, underlying solver etc.)+                 | Self        -- ^ Trusts itself, i.e., established by a call to sorry+                 | Prop String -- ^ Trusts a parent that itself trusts something else. Note the name here is the+                               --   name of the proposition itself, not the parent that's trusted.++-- | Proof for a property. This type is left abstract, i.e., the only way to create on is via a+-- call to 'lemma'/'theorem' etc., ensuring soundness. (Note that the trusted-code base here+-- is still large: The underlying solver, SBV, and KnuckleDragger kernel itself. But this+-- mechanism ensures we can't create proven things out of thin air, following the standard LCF+-- methodology.)+data Proof = Proof { rootOfTrust :: RootOfTrust -- ^ Root of trust, described above.+                   , isUserAxiom :: Bool        -- ^ Was this an axiom given by the user?+                   , getProof    :: SBool       -- ^ Get the underlying boolean+                   , proofName   :: String      -- ^ User given name+                   }++-- | Show instance for 'Proof'+instance Show Proof where+  show Proof{rootOfTrust, isUserAxiom, proofName} = '[' : tag ++ "] " ++ proofName+     where tag | isUserAxiom = "Axiom"+               | True        = case rootOfTrust of+                                 None   -> "Proven"+                                 Self   -> "Sorry"+                                 Prop s -> "Modulo: " ++ s++-- | Accept the given definition as a fact. Usually used to introduce definitial axioms,+-- giving meaning to uninterpreted symbols. Note that we perform no checks on these propositions,+-- if you assert nonsense, then you get nonsense back. So, calls to 'axiom' should be limited to+-- definitions, or basic axioms (like commutativity, associativity) of uninterpreted function symbols.+axiom :: Proposition a => String -> a -> KD Proof+axiom nm p = do start False "Axiom" [nm] >>= finish "Axiom."++                pure (internalAxiom nm p) { isUserAxiom = True }++-- | Internal axiom generator; so we can keep truck of KnuckleDrugger's trusted axioms, vs. user given axioms.+-- Not exported.+internalAxiom :: Proposition a => String -> a -> Proof+internalAxiom nm p = Proof { rootOfTrust = None+                           , isUserAxiom = False+                           , getProof    = label nm (quantifiedBool p)+                           , proofName   = nm+                           }++-- | A manifestly false theorem. This is useful when we want to prove a theorem that the underlying solver+-- cannot deal with, or if we want to postpone the proof for the time being. KnuckleDragger will keep+-- track of the uses of 'sorry' and will print them appropriately while printing proofs.+sorry :: Proof+sorry = Proof { rootOfTrust = Self+              , isUserAxiom = False+              , getProof    = label "sorry" (quantifiedBool p)+              , proofName   = "sorry"+              }+  where -- ideally, I'd rather just use +        --   p = sFalse+        -- but then SBV constant folds the boolean, and the generated script+        -- doesn't contain the actual contents, as SBV determines unsatisfiability+        -- itself. By using the following proposition (which is easy for the backend+        -- solver to determine as false, we avoid the constant folding.+        p (Forall (x :: SBool)) = label "SORRY: KnuckleDragger, proof uses \"sorry\"" x++-- | Helper to generate lemma/theorem statements.+lemmaGen :: Proposition a => SMTConfig -> String -> [String] -> a -> [Proof] -> KD Proof+lemmaGen cfg@SMTConfig{verbose} what nms inputProp by = do+    tab <- start verbose what nms++    let nm = intercalate "." nms++        -- What to do if all goes well+        good = do finish ("Q.E.D." ++ modulo) tab+                  pure Proof { rootOfTrust = ros+                             , isUserAxiom = False+                             , getProof    = label nm (quantifiedBool inputProp)+                             , proofName   = nm+                             }++          where parentRoots = map rootOfTrust by+                hasSelf     = not $ null [() | Self <- parentRoots]+                depNames    = nub $ sort [p | Prop p <- parentRoots]++                -- What's the root-of-trust for this node?+                -- If there are no "sorry" parents, and no parent nodes+                -- that are marked with a root of trust, then we don't have it either.+                -- Otherwise, mark it accordingly.+                (ros, modulo)+                   | not hasSelf && null depNames = (None,    "")+                   | True                         = (Prop nm, " [Modulo: " ++ why ++ "]")+                   where why | hasSelf = "sorry"+                             | True    = intercalate ", " depNames++        -- What to do if the proof fails+        cex  = liftIO $ do putStrLn $ "\n*** Failed to prove " ++ nm ++ "."++                           -- When trying to get a counter-example, only include in the+                           -- implication those facts that are user-given axioms. This+                           -- way our counter-example will be more likely to be relevant+                           -- to the proposition we're currently proving. (Hopefully.)+                           -- Remember that we first have to negate, and then skolemize!+                           SatResult res <- satWith cfg $ do+                                               mapM_ constrain [getProof | Proof{isUserAxiom, getProof} <- by, isUserAxiom] :: Symbolic ()+                                               pure $ skolemize (qNot inputProp)++                           print $ ThmResult res+                           error "Failed"++        -- bailing out+        failed r = liftIO $ do putStrLn $ "\n*** Failed to prove " ++ nm ++ "."+                               print r+                               error "Failed"++    pRes <- liftIO $ proveWith cfg $ do+                mapM_ (constrain . getProof) by :: Symbolic ()+                pure $ skolemize (quantifiedBool inputProp)++    case pRes of+      ThmResult Unsatisfiable{} -> good+      ThmResult Satisfiable{}   -> cex+      ThmResult DeltaSat{}      -> cex+      ThmResult SatExtField{}   -> cex+      ThmResult Unknown{}       -> failed pRes+      ThmResult ProofError{}    -> failed pRes++-- | Prove a given statement, using auxiliaries as helpers. Using the default solver.+lemma :: Proposition a => String -> a -> [Proof] -> KD Proof+lemma nm f by = do cfg <- ask+                   lemmaWith cfg nm f by++-- | Prove a given statement, using auxiliaries as helpers. Using the given solver.+lemmaWith :: Proposition a => SMTConfig -> String -> a -> [Proof] -> KD Proof+lemmaWith cfg nm = lemmaGen cfg "Lemma" [nm]++-- | Prove a given statement, using auxiliaries as helpers. Essentially the same as 'lemma', except for the name, using the default solver.+theorem :: Proposition a => String -> a -> [Proof] -> KD Proof+theorem nm f by = do cfg <- ask+                     theoremWith cfg nm f by++-- | Prove a given statement, using auxiliaries as helpers. Essentially the same as 'lemmaWith', except for the name.+theoremWith :: Proposition a => SMTConfig -> String -> a -> [Proof] -> KD Proof+theoremWith cfg nm = lemmaGen cfg "Theorem" [nm]++-- | Given a predicate, return an induction principle for it. Typically, we only have one viable+-- induction principle for a given type, but we allow for alternative ones.+class Induction a where+  induct     :: a -> Proof+  inductAlt1 :: a -> Proof+  inductAlt2 :: a -> Proof++  -- The second and third principles are the same as first by default, unless we provide them explicitly.+  inductAlt1 = induct+  inductAlt2 = induct++-- | Induction over SInteger. We provide various induction principles here: The first one+-- is over naturals, will only prove predicates that explicitly restrict the argument to >= 0.+-- The second and third ones are induction over the entire range of integers, two different+-- principles that might work better for different problems.+instance Induction (SInteger -> SBool) where++   -- | Induction over naturals. Will prove predicates of the form @\n -> n >= 0 .=> predicate n@.+   induct p = internalAxiom "Nat.induct" principle+      where qb = quantifiedBool++            principle =       p 0 .&& qb (\(Forall n) -> (n .>= 0 .&& p n) .=> p (n+1))+                      .=> qb -----------------------------------------------------------+                                        (\(Forall n) -> n .>= 0 .=> p n)+++   -- | Induction over integers, using the strategy that @P(n)@ is equivalent to @P(n+1)@+   -- (i.e., not just @P(n) => P(n+1)@), thus covering the entire range.+   inductAlt1 p = internalAxiom "Integer.inductAlt1" principle+     where qb = quantifiedBool++           principle =           p 0+                             .&& qb (\(Forall i) -> p i .== p (i+1))+                     .=> qb -----------------------------------------+                                 (\(Forall i) -> p i)++   -- | Induction over integers, using the strategy that @P(n) => P(n+1)@ and @P(n) => P(n-1)@.+   inductAlt2 p = internalAxiom "Integer.inductAlt2" principle+     where qb = quantifiedBool++           principle =           p 0+                             .&& qb (\(Forall i) -> p i .=> p (i+1) .&& p (i-1))+                     .=> qb -----------------------------------------------------+                                 (\(Forall i) -> p i)++-- | Induction over two argument predicates, with the last argument SInteger.+instance SymVal a => Induction (SBV a -> SInteger -> SBool) where+  induct p = internalAxiom "Nat.induct2" principle+     where qb a = quantifiedBool a++           principle =           qb (\(Forall a) -> p a 0)+                             .&& qb (\(Forall a) (Forall n) -> (n .>= 0 .&& p a n) .=> p a (n+1))+                     .=> qb ----------------------------------------------------------------------+                                 (\(Forall a) (Forall n) -> n .>= 0 .=> p a n)++-- | Induction over three argument predicates, with last argument SInteger.+instance (SymVal a, SymVal b) => Induction (SBV a -> SBV b -> SInteger -> SBool) where+  induct p = internalAxiom "Nat.induct3" principle+     where qb a = quantifiedBool a++           principle =           qb (\(Forall a) (Forall b) -> p a b 0)+                             .&& qb (\(Forall a) (Forall b) (Forall n) -> (n .>= 0 .&& p a b n) .=> p a b (n+1))+                     .=> qb -------------------------------------------------------------------------------------+                                 (\(Forall a) (Forall b) (Forall n) -> n .>= 0 .=> p a b n)++-- | Induction over four argument predicates, with last argument SInteger.+instance (SymVal a, SymVal b, SymVal c) => Induction (SBV a -> SBV b -> SBV c -> SInteger -> SBool) where+  induct p = internalAxiom "Nat.induct4" principle+     where qb a = quantifiedBool a++           principle =           qb (\(Forall a) (Forall b) (Forall c) -> p a b c 0)+                             .&& qb (\(Forall a) (Forall b) (Forall c) (Forall n) -> (n .>= 0 .&& p a b c n) .=> p a b c (n+1))+                     .=> qb ----------------------------------------------------------------------------------------------------+                                 (\(Forall a) (Forall b) (Forall c) (Forall n) -> n .>= 0 .=> p a b c n)+++-- | Induction over lists+instance SymVal a => Induction (SList a -> SBool) where+  induct p = internalAxiom "List(a).induct" principle+    where qb a = quantifiedBool a++          principle =           p SL.nil+                            .&& qb (\(Forall x) (Forall xs) -> p xs .=> p (x SL..: xs))+                    .=> qb -------------------------------------------------------------+                                (\(Forall xs) -> p xs)++-- | Induction over two argument predicates, with last argument a list.+instance (SymVal a, SymVal e) => Induction (SBV a -> SList e -> SBool) where+  induct p = internalAxiom "List(a).induct2" principle+    where qb a = quantifiedBool a++          principle =           qb (\(Forall a) -> p a SL.nil)+                            .&& qb (\(Forall a) (Forall e) (Forall es) -> p a es .=> p a (e SL..: es))+                    .=> qb ------------------------------------------------------------------------------+                                (\(Forall a) (Forall es) -> p a es)++-- | Induction over three argument predicates, with last argument a list.+instance (SymVal a, SymVal b, SymVal e) => Induction (SBV a -> SBV b -> SList e -> SBool) where+  induct p = internalAxiom "List(a).induct3" principle+    where qb a = quantifiedBool a++          principle =           qb (\(Forall a) (Forall b) -> p a b SL.nil)+                            .&& qb (\(Forall a) (Forall b) (Forall e) (Forall es) -> p a b es .=> p a b (e SL..: es))+                    .=> qb -------------------------------------------------------------------------------------------+                                (\(Forall a) (Forall b) (Forall xs) -> p a b xs)++-- | Induction over four argument predicates, with last argument a list.+instance (SymVal a, SymVal b, SymVal c, SymVal e) => Induction (SBV a -> SBV b -> SBV c -> SList e -> SBool) where+  induct p = internalAxiom "List(a).induct4" principle+    where qb a = quantifiedBool a++          principle =           qb (\(Forall a) (Forall b) (Forall c) -> p a b c SL.nil)+                            .&& qb (\(Forall a) (Forall b) (Forall c) (Forall e) (Forall es) -> p a b c es .=> p a b c (e SL..: es))+                    .=> qb ----------------------------------------------------------------------------------------------------------+                                (\(Forall a) (Forall b) (Forall c) (Forall xs) -> p a b c xs)++{- HLint ignore module "Eta reduce" -}
+ Data/SBV/Tools/KDUtils.hs view
@@ -0,0 +1,57 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Data.SBV.Tools.KDUtils+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Various KnuckleDrugger machinery.+-----------------------------------------------------------------------------++{-# LANGUAGE DerivingStrategies         #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE NamedFieldPuns             #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Data.SBV.Tools.KDUtils (+         KD, runKD, runKDWith+       , start, finish+       ) where++import Control.Monad.Reader (ReaderT, runReaderT, ask, MonadReader)+import Control.Monad.Trans  (MonadIO(liftIO))++import Data.List (intercalate)+import System.IO (hFlush, stdout)++import Data.SBV.Core.Symbolic  (SMTConfig)+import Data.SBV.Provers.Prover (defaultSMTCfg, SMTConfig(..))++-- | Monad for running KnuckleDragger proofs in.+newtype KD a = KD (ReaderT SMTConfig IO a)+            deriving newtype (Applicative, Functor, Monad, MonadIO, MonadReader SMTConfig, MonadFail)++-- | Run a KD proof, using the default configuration.+runKD :: KD a -> IO a+runKD = runKDWith defaultSMTCfg++-- | Run a KD proof, using the given configuration.+runKDWith :: SMTConfig -> KD a -> IO a+runKDWith cfg (KD f) = runReaderT f cfg++-- | Start a proof. We return the number of characters we printed, so the finisher can align the result.+start :: Bool -> String -> [String] -> KD Int+start newLine what nms = liftIO $ do putStr $ line ++ if newLine then "\n" else ""+                                     hFlush stdout+                                     return (length line)+  where tab    = 2 * length (drop 1 nms)+        indent = replicate tab ' '+        tag    = what ++ ": " ++ intercalate "." nms+        line   = indent ++ tag++-- | Finish a proof. First argument is what we got from the call of 'start' above.+finish :: String -> Int -> KD ()+finish what skip = do SMTConfig{kdRibbonLength} <- ask+                      liftIO $ putStrLn $ replicate (kdRibbonLength - skip) ' ' ++ what
+ Data/SBV/Tools/KnuckleDragger.hs view
@@ -0,0 +1,175 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Data.SBV.Tools.KnuckleDragger+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- A lightweight theorem proving like interface, built on top of SBV.+-- Inspired by and modeled after Philip Zucker's tool with the same+-- name, see <http://github.com/philzook58/knuckledragger>.+--+-- See the directory Documentation.SBV.Examples.KnuckleDragger for various examples.+-----------------------------------------------------------------------------++{-# LANGUAGE ConstraintKinds            #-}+{-# LANGUAGE DataKinds                  #-}+{-# LANGUAGE DerivingStrategies         #-}+{-# LANGUAGE FlexibleContexts           #-}+{-# LANGUAGE FlexibleInstances          #-}+{-# LANGUAGE FunctionalDependencies     #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE MultiParamTypeClasses      #-}+{-# LANGUAGE NamedFieldPuns             #-}+{-# LANGUAGE TypeAbstractions           #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Data.SBV.Tools.KnuckleDragger (+       -- * Propositions and their proofs+         Proposition, Proof+       -- * Adding axioms/definitions+       , axiom+       -- * Basic proofs+       , lemma,        lemmaWith+       , theorem,      theoremWith+       -- * Chain of reasoning+       , chainLemma,   chainLemmaWith+       , chainTheorem, chainTheoremWith+       -- * Induction+       , Induction(..)+       -- * Faking proofs+       , sorry+       -- * Running KnuckleDragger proofs+       , KD, runKD, runKDWith+       ) where++import Control.Monad.Trans (liftIO)++import Data.SBV+import Data.SBV.Tools.KDKernel+import Data.SBV.Tools.KDUtils++import Control.Monad        (when)+import Control.Monad.Reader (ask)++-- | A class for doing equational reasoning style chained proofs. Use 'chainLemma' to prove a given theorem+-- as a sequence of equalities, each step following from the previous.+class ChainLemma steps step | steps -> step where++  -- | Prove a property via a series of equality steps, using the default solver.+  -- Let @H@ be a list of already established lemmas. Let @P@ be a property we wanted to prove, named @name@.+  -- Consider a call of the form @chainLemma name P [A, B, C, D] H@. Note that @H@ is+  -- a list of already proven facts, ensured by the type signature. We proceed as follows:+  --+  --    * Prove: @H -> A == B@+  --    * Prove: @H && A == B -> B == C@+  --    * Prove: @H && A == B && B == C -> C == D@+  --    * Prove: @H && A == B && B == C && C == D -> P@+  --    * If all of the above steps succeed, conclude @P@.+  --+  -- Note that if the type of steps (i.e., @A@ .. @D@ above) is 'SBool', then we use implication+  -- as opposed to equality; which better captures line of reasoning.+  --+  -- So, chain-lemma is essentially modus-ponens, applied in a sequence of stepwise equality reasoning in the case of+  -- non-boolean steps.+  --+  -- If there are no helpers given (i.e., if @H@ is empty), then this call is equivalent to 'lemmaWith'.+  -- If @H@ is a singleton, then we error-out. A single step in @H@ indicates a user-error, since there's+  -- no sequence of steps to reason about.+  chainLemma :: Proposition a => String -> a -> steps -> [Proof] -> KD Proof++  -- | Same as chainLemma, except tagged as Theorem+  chainTheorem :: Proposition a => String -> a -> steps -> [Proof] -> KD Proof++  -- | Prove a property via a series of equality steps, using the given solver.+  chainLemmaWith :: Proposition a => SMTConfig -> String -> a -> steps -> [Proof] -> KD Proof++  -- | Same as chainLemmaWith, except tagged as Theorem+  chainTheoremWith :: Proposition a => SMTConfig -> String -> a -> steps -> [Proof] -> KD Proof++  -- | Internal, shouldn't be needed outside the library+  makeSteps :: steps -> [step]+  makeInter :: steps -> step -> step -> SBool++  chainLemma nm p steps by = do cfg <- ask+                                chainLemmaWith cfg nm p steps by++  chainTheorem nm p steps by = do cfg <- ask+                                  chainTheoremWith cfg nm p steps by++  chainLemmaWith   = chainGeneric False+  chainTheoremWith = chainGeneric True++  chainGeneric :: Proposition a => Bool -> SMTConfig -> String -> a -> steps -> [Proof] -> KD Proof+  chainGeneric taggedTheorem cfg nm result steps base = do+        liftIO $ putStrLn $ "Chain: " ++ nm+        let proofSteps = makeSteps steps+            len        = length proofSteps++        when (len == 1) $+         error $ unlines $ [ "Incorrect use of chainLemma on " ++ show nm ++ ":"+                           , "**   There must be either none, or at least two steps."+                           , "**   Was given only one step."+                           ]++        go (1 :: Int) base (zipWith (makeInter steps) proofSteps (drop 1 proofSteps))++     where go _ sofar []+              | taggedTheorem = theoremWith cfg nm result sofar+              | True          = lemmaWith   cfg nm result sofar+           go i sofar (p:ps)+            | True+            = do step <- lemmaGen cfg "Lemma" ([nm, show i]) p sofar+                 go (i+1) (step : sofar) ps++-- | Chaining lemmas that depend on a single quantified variable.+instance (SymVal a, EqSymbolic z) => ChainLemma (SBV a -> [z]) (SBV a -> z) where+   makeSteps steps = [\a -> steps a !! i | i <- [0 .. length (steps undefined) - 1]]+   makeInter _ x y = quantifiedBool $ \(Forall @"a" a) -> x a .== y a++-- | Chaining lemmas that depend on two quantified variables.+instance (SymVal a, SymVal b, EqSymbolic z) => ChainLemma (SBV a -> SBV b -> [z]) (SBV a -> SBV b -> z) where+   makeSteps steps = [\a b -> steps a b !! i | i <- [0 .. length (steps undefined undefined) - 1]]+   makeInter _ x y = quantifiedBool $ \(Forall @"a" a) (Forall @"b" b) -> x a b .== y a b++-- | Chaining lemmas that depend on three quantified variables.+instance (SymVal a, SymVal b, SymVal c, EqSymbolic z) => ChainLemma (SBV a -> SBV b -> SBV c -> [z]) (SBV a -> SBV b -> SBV c -> z) where+   makeSteps steps = [\a b c -> steps a b c !! i | i <- [0 .. length (steps undefined undefined undefined) - 1]]+   makeInter _ x y = quantifiedBool $ \(Forall @"a" a) (Forall @"b" b) (Forall @"c" c) -> x a b c .== y a b c++-- | Chaining lemmas that depend on four quantified variables.+instance (SymVal a, SymVal b, SymVal c, SymVal d, EqSymbolic z) => ChainLemma (SBV a -> SBV b -> SBV c -> SBV d -> [z]) (SBV a -> SBV b -> SBV c -> SBV d -> z) where+   makeSteps steps = [\a b c d -> steps a b c d !! i | i <- [0 .. length (steps undefined undefined undefined undefined) - 1]]+   makeInter _ x y = quantifiedBool $ \(Forall @"a" a) (Forall @"b" b) (Forall @"c" c) (Forall @"d" d) -> x a b c d .== y a b c d++-- | Chaining lemmas that depend on five quantified variables.+instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, EqSymbolic z) => ChainLemma (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> [z]) (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> z) where+   makeSteps steps = [\a b c d e -> steps a b c d e !! i | i <- [0 .. length (steps undefined undefined undefined undefined undefined) - 1]]+   makeInter _ x y = quantifiedBool $ \(Forall @"a" a) (Forall @"b" b) (Forall @"c" c) (Forall @"d" d) (Forall @"e" e) -> x a b c d e .== y a b c d e++-- | Chaining lemmas that depend on a single quantified variable. Overlapping version for 'SBool' that uses implication.+instance {-# OVERLAPPING #-} SymVal a => ChainLemma (SBV a -> [SBool]) (SBV a -> SBool) where+   makeSteps steps = [\a -> steps a !! i | i <- [0 .. length (steps undefined) - 1]]+   makeInter _ x y = quantifiedBool $ \(Forall @"a" a) -> x a .=> y a++-- | Chaining lemmas that depend on two quantified variables. Overlapping version for 'SBool' that uses implication.+instance {-# OVERLAPPING #-} (SymVal a, SymVal b) => ChainLemma (SBV a -> SBV b -> [SBool]) (SBV a -> SBV b -> SBool) where+   makeSteps steps = [\a b -> steps a b !! i | i <- [0 .. length (steps undefined undefined) - 1]]+   makeInter _ x y = quantifiedBool $ \(Forall @"a" a) (Forall @"b" b) -> x a b .=> y a b++-- | Chaining lemmas that depend on three quantified variables. Overlapping version for 'SBool' that uses implication.+instance {-# OVERLAPPING #-} (SymVal a, SymVal b, SymVal c) => ChainLemma (SBV a -> SBV b -> SBV c -> [SBool]) (SBV a -> SBV b -> SBV c -> SBool) where+   makeSteps steps = [\a b c -> steps a b c !! i | i <- [0 .. length (steps undefined undefined undefined) - 1]]+   makeInter _ x y = quantifiedBool $ \(Forall @"a" a) (Forall @"b" b) (Forall @"c" c) -> x a b c .=> y a b c++-- | Chaining lemmas that depend on four quantified variables. Overlapping version for 'SBool' that uses implication.+instance {-# OVERLAPPING #-} (SymVal a, SymVal b, SymVal c, SymVal d) => ChainLemma (SBV a -> SBV b -> SBV c -> SBV d -> [SBool]) (SBV a -> SBV b -> SBV c -> SBV d -> SBool) where+   makeSteps steps = [\a b c d -> steps a b c d !! i | i <- [0 .. length (steps undefined undefined undefined undefined) - 1]]+   makeInter _ x y = quantifiedBool $ \(Forall @"a" a) (Forall @"b" b) (Forall @"c" c) (Forall @"d" d) -> x a b c d .=> y a b c d++-- | Chaining lemmas that depend on five quantified variables. Overlapping version for 'SBool' that uses implication.+instance {-# OVERLAPPING #-} (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e) => ChainLemma (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> [SBool]) (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBool) where+   makeSteps steps = [\a b c d e -> steps a b c d e !! i | i <- [0 .. length (steps undefined undefined undefined undefined undefined) - 1]]+   makeInter _ x y = quantifiedBool $ \(Forall @"a" a) (Forall @"b" b) (Forall @"c" c) (Forall @"d" d) (Forall @"e" e) -> x a b c d e .=> y a b c d e
Data/SBV/Tools/Range.hs view
@@ -35,7 +35,7 @@ -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV--- >>> :set -XScopedTypeVariables+-- >>> :set -XScopedTypeVariables -XDataKinds  -- | A boundary value data Boundary a = Unbounded -- ^ Unbounded@@ -97,8 +97,8 @@ -- [[0.0,oo)] -- >>> ranges $ \x -> x .<= (0::SReal) -- [(-oo,0.0]]--- >>> ranges $ \(x :: SWord8) -> 2*x .== 4--- [[2,3),(129,130]]+-- >>> ranges $ \(x :: SWord 4) -> 2*x .== 4+-- [[2,3),(9,10]] ranges :: forall a. (Ord a, Num a, SymVal a,  SatModel a, Metric a, SymVal (MetricSpace a), SatModel (MetricSpace a)) => (SBV a -> SBool) -> IO [Range a] ranges = rangesWith defaultSMTCfg 
Data/SBV/Trans.hs view
@@ -39,14 +39,14 @@   -- ** Symbolic lists   , SList   -- * Arrays of symbolic values-  , SymArray(newArray_, newArray, readArray, writeArray, mergeArrays), SArray+  , readArray, writeArray, SArray    -- * Creating symbolic values   -- ** Single value-  , sBool, sWord8, sWord16, sWord32, sWord64, sWord, sInt8, sInt16, sInt32, sInt64, sInt, sInteger, sReal, sFloat, sDouble, sChar, sString, sList+  , sBool, sWord8, sWord16, sWord32, sWord64, sWord, sInt8, sInt16, sInt32, sInt64, sInt, sInteger, sReal, sFloat, sDouble, sChar, sString, sList, sArray    -- ** List of values-  , sBools, sWord8s, sWord16s, sWord32s, sWord64s, sWords, sInt8s, sInt16s, sInt32s, sInt64s, sInts, sIntegers, sReals, sFloats, sDoubles, sChars, sStrings, sLists+  , sBools, sWord8s, sWord16s, sWord32s, sWord64s, sWords, sInt8s, sInt16s, sInt32s, sInt64s, sInts, sIntegers, sReals, sFloats, sDoubles, sChars, sStrings, sLists, sArrays    -- * Symbolic Equality and Comparisons   , EqSymbolic(..), OrdSymbolic(..), Equality(..)
Data/SBV/Trans/Control.hs view
@@ -17,18 +17,12 @@      -- * User queries        ExtractIO(..), MonadQuery(..), QueryT, Query, query -     -- * Create a fresh variable-     , freshVar_, freshVar--     -- * Create a fresh array-     , freshArray_, freshArray, freshLambdaArray_, freshLambdaArray-      -- * Checking satisfiability      , CheckSatResult(..), checkSat, ensureSat, checkSatUsing, checkSatAssuming, checkSatAssumingWithUnsatisfiableSet       -- * Querying the solver      -- ** Extracting values-     , getValue, getFunction, getUninterpretedValue, getModel, getAssignment, getSMTResult, getUnknownReason, getObservables+     , getFunction, getUninterpretedValue, getModel, getAssignment, getSMTResult, getUnknownReason, getObservables       -- ** Extracting the unsat core      , getUnsatCore
Data/SBV/Utils/CrackNum.hs view
@@ -54,6 +54,7 @@                                KMaybe     {}  -> Nothing                                KEither    {}  -> Nothing                                KRational  {}  -> Nothing+                               KArray     {}  -> Nothing                                 -- Actual crackables                                KFloat{}       -> Just $ let CFloat   f = cvVal cv in float verbose mbIV f
Data/SBV/Utils/PrettyNum.hs view
@@ -437,6 +437,9 @@   | isMaybe x        , CMaybe mc        <- cvVal x = smtLibMaybe  (kindOf x) mc   | isEither x       , CEither ec       <- cvVal x = smtLibEither (kindOf x) ec +  -- Arrays become sequence of stores+  | isArray x        , CArray ac       <- cvVal x = smtLibArray (kindOf x) ac+   | True = error $ "SBV.cvtCV: Impossible happened: Kind/Value disagreement on: " ++ show (kindOf x, x)   where roundModeConvert s = fromMaybe s (listToMaybe [smtRoundingMode m | m <- [minBound .. maxBound] :: [RoundingMode], show m == s])         -- Carefully code hex numbers, SMTLib is picky about lengths of hex constants. For the time@@ -489,6 +492,19 @@         smtLibEither ke@(KEither  k _) (Left c)  = dtConstructor "left_SBVEither"  [cvToSMTLib rm (CV k c)] ke         smtLibEither ke@(KEither  _ k) (Right c) = dtConstructor "right_SBVEither" [cvToSMTLib rm (CV k c)] ke         smtLibEither k                 _         = error $ "SBV.cvToSMTLib: Impossible case (smtLibEither), received kind: " ++ show k++        -- Remember that in an ArrayModel we keep a history; i.e., the earlier elements are written later. So, we reverse the assocs+        smtLibArray :: Kind -> ArrayModel CVal CVal -> String+        smtLibArray k@(KArray k1 k2) (ArrayModel assocs def) = mkStoreChain k k1 k2 (reverse assocs) def+        smtLibArray k              _                         = error $ "SBV.cvToSMTLib: Impossible case (smtLibArray), received non-matching kind: " ++ show k++        mkStoreChain k k1 k2 writes def = walk writes base+          where base = "((as const " ++ smtType k ++ ") " ++ cvToSMTLib rm (CV k2 def) ++ ")"++                walk []                  sofar = sofar+                walk ((key, val) : rest) sofar = walk rest (store key val sofar)++                store key val sofar = "(store " ++ sofar ++ " " ++ cvToSMTLib rm (CV k1 key) ++ " " ++ cvToSMTLib rm (CV k2 val) ++ ")"          -- anomaly at the 2's complement min value! Have to use binary notation here         -- as there is no positive value we can provide to make the bvneg work.. (see above)
Data/SBV/Utils/SExpr.hs view
@@ -380,10 +380,16 @@ -- be flexible, this is certainly not a full fledged parser. But hopefully it'll -- cover everything z3 will throw at it. parseLambdaExpression :: SExpr -> Maybe ([([SExpr], SExpr)], SExpr)-parseLambdaExpression funExpr = case funExpr of+parseLambdaExpression funExpr = case squashLambdas funExpr of                                   EApp [ECon "lambda", EApp params, body] -> mapM getParam params >>= flip lambda body >>= chainAssigns                                   _                                       -> Nothing-  where getParam (EApp [ECon v, ECon ty]) = Just (v, ty == "Bool")+  where -- convert (lambda p1 (lambda p2 body)) to (lambda (p1 ++ p2) body)+        squashLambdas (EApp  [ECon "lambda", EApp p1+                                           , EApp [ECon "lambda", EApp p2, body]])+                            = squashLambdas $ EApp [ECon "lambda", EApp (p1 ++ p2), body]+        squashLambdas other = other++        getParam (EApp [ECon v, ECon ty]) = Just (v, ty == "Bool")         getParam (EApp [ECon v, _      ]) = Just (v, False)         getParam _                        = Nothing @@ -491,6 +497,7 @@           vals _                                                                        = Nothing  -- | Turn a sequence of left-right chain assignments (condition + free) into a single chain+-- NB. We make sure the results here are unique, i.e., there's only one assignment to each unique entry chainAssigns :: [Either ([SExpr], SExpr) SExpr] -> Maybe ([([SExpr], SExpr)], SExpr) chainAssigns chain = regroup $ partitionEithers chain   where regroup (vs, [d]) = Just (checkDup vs, d)@@ -503,6 +510,8 @@         -- then we need to drop the 1->2 assignment!         --         -- The way we parse these, the first assignment wins.+        -- NB. I'm not sure if solvers actually would return duplicate assignments, but just being safe here. (i.e.,+        -- this duplication may actually never happen in practice.)         checkDup :: [([SExpr], SExpr)] -> [([SExpr], SExpr)]         checkDup []              = []         checkDup (a@(key, _):as) = a : checkDup [r | r@(key', _) <- as, not (key `sameKey` key')]@@ -515,15 +524,16 @@         -- We don't want to derive Eq; as this is more careful on floats and such         same :: SExpr -> SExpr -> Bool         same x y = case (x, y) of-                     (ECon a,      ECon b)       -> a == b-                     (ENum (i, _), ENum (j, _))  -> i == j-                     (EReal a,     EReal b)      -> algRealStructuralEqual a b-                     (EFloat  f1,  EFloat  f2)   -> fpIsEqualObjectH f1 f2-                     (EDouble d1,  EDouble d2)   -> fpIsEqualObjectH d1 d2-                     (EApp as,     EApp bs)      -> length as == length bs && and (zipWith same as bs)-                     (e1,          e2)           -> if eRank e1 == eRank e2-                                                    then error $ "Data.SBV: You've found a bug in SBV! Please report: SExpr(same): " ++ show (e1, e2)-                                                    else False+                     (ECon a,            ECon b)            -> a == b+                     (ENum (i, _),       ENum (j, _))       -> i == j+                     (EReal a,           EReal b)           -> algRealStructuralEqual a b+                     (EFloat  f1,        EFloat  f2)        -> fpIsEqualObjectH f1 f2+                     (EDouble d1,        EDouble d2)        -> fpIsEqualObjectH d1 d2+                     (EFloatingPoint a1, EFloatingPoint a2) -> fpIsEqualObjectH a1 a2+                     (EApp as,           EApp bs)           -> length as == length bs && and (zipWith same as bs)+                     (e1,                e2)                -> if eRank e1 == eRank e2+                                                               then error $ "Data.SBV: You've found a bug in SBV! Please report: SExpr(same): " ++ show (e1, e2)+                                                          else False         -- Defensive programming: It's too long to list all pair up, so we use this function and         -- GHC's pattern-match completion warning to catch cases we might've forgotten. If         -- you ever get the error line above fire, because you must've disabled the pattern-match
Documentation/SBV/Examples/BitPrecise/BrokenSearch.hs view
@@ -10,6 +10,8 @@ --     <http://ai.googleblog.com/2006/06/extra-extra-read-all-about-it-nearly.html> ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.BitPrecise.BrokenSearch where@@ -17,15 +19,17 @@ import Data.SBV import Data.SBV.Tools.Overflow +#ifndef HADDOCK -- $setup -- >>> import Data.SBV -- >>> import Data.Int+#endif  -- | Model the mid-point computation of the binary search, which is broken due to arithmetic overflow. -- Note how we use the overflow checking variants of the arithmetic operators. We have: -- -- >>> checkArithOverflow midPointBroken--- ./Documentation/SBV/Examples/BitPrecise/BrokenSearch.hs:39:32:+!: SInt32 addition overflows: Violated. Model:+-- ./Documentation/SBV/Examples/BitPrecise/BrokenSearch.hs:43:32:+!: SInt32 addition overflows: Violated. Model: --   low  = 1073741832 :: Int32 --   high = 1107296257 :: Int32 --
Documentation/SBV/Examples/BitPrecise/PEXT_PDEP.hs view
@@ -35,6 +35,7 @@ -- do the reverse: We distribute the bits from the bottom of the source to the destination according to the mask. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                 #-} {-# LANGUAGE DataKinds           #-} {-# LANGUAGE Rank2Types          #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -47,10 +48,12 @@ import Data.SBV import GHC.TypeLits (KnownNat) +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV--- >>> :set -XDataKinds+-- >>> :set -XDataKinds -XTypeApplications+#endif  -------------------------------------------------------------------------------------------------- -- * Parallel extraction@@ -130,33 +133,33 @@ -- ; Automatically generated by SBV. Do not modify! -- ; pext_2 :: SWord 2 -> SWord 2 -> SWord 2 -- (define-fun pext_2 ((l1_s0 (_ BitVec 2)) (l1_s1 (_ BitVec 2))) (_ BitVec 2)---   (let ((l1_s3 #b0))---   (let ((l1_s7 #b01))---   (let ((l1_s8 #b00))---   (let ((l1_s20 #b10))---   (let ((l1_s2 ((_ extract 1 1) l1_s1)))---   (let ((l1_s4 (distinct l1_s2 l1_s3)))---   (let ((l1_s5 ((_ extract 0 0) l1_s1)))---   (let ((l1_s6 (distinct l1_s3 l1_s5)))---   (let ((l1_s9 (ite l1_s6 l1_s7 l1_s8)))---   (let ((l1_s10 (= l1_s7 l1_s9)))---   (let ((l1_s11 (bvlshr l1_s0 l1_s7)))---   (let ((l1_s12 ((_ extract 0 0) l1_s11)))---   (let ((l1_s13 (distinct l1_s3 l1_s12)))---   (let ((l1_s14 (= l1_s8 l1_s9)))---   (let ((l1_s15 ((_ extract 0 0) l1_s0)))---   (let ((l1_s16 (distinct l1_s3 l1_s15)))---   (let ((l1_s17 (ite l1_s16 l1_s7 l1_s8)))---   (let ((l1_s18 (ite l1_s6 l1_s17 l1_s8)))---   (let ((l1_s19 (bvor l1_s7 l1_s18)))---   (let ((l1_s21 (bvand l1_s18 l1_s20)))---   (let ((l1_s22 (ite l1_s13 l1_s19 l1_s21)))---   (let ((l1_s23 (ite l1_s14 l1_s22 l1_s18)))---   (let ((l1_s24 (bvor l1_s20 l1_s23)))---   (let ((l1_s25 (bvand l1_s7 l1_s23)))---   (let ((l1_s26 (ite l1_s13 l1_s24 l1_s25)))---   (let ((l1_s27 (ite l1_s10 l1_s26 l1_s23)))---   (let ((l1_s28 (ite l1_s4 l1_s27 l1_s18)))---   l1_s28))))))))))))))))))))))))))))+--                           (let ((l1_s3 #b0))+--                           (let ((l1_s7 #b01))+--                           (let ((l1_s8 #b00))+--                           (let ((l1_s20 #b10))+--                           (let ((l1_s2 ((_ extract 1 1) l1_s1)))+--                           (let ((l1_s4 (distinct l1_s2 l1_s3)))+--                           (let ((l1_s5 ((_ extract 0 0) l1_s1)))+--                           (let ((l1_s6 (distinct l1_s3 l1_s5)))+--                           (let ((l1_s9 (ite l1_s6 l1_s7 l1_s8)))+--                           (let ((l1_s10 (= l1_s7 l1_s9)))+--                           (let ((l1_s11 (bvlshr l1_s0 l1_s7)))+--                           (let ((l1_s12 ((_ extract 0 0) l1_s11)))+--                           (let ((l1_s13 (distinct l1_s3 l1_s12)))+--                           (let ((l1_s14 (= l1_s8 l1_s9)))+--                           (let ((l1_s15 ((_ extract 0 0) l1_s0)))+--                           (let ((l1_s16 (distinct l1_s3 l1_s15)))+--                           (let ((l1_s17 (ite l1_s16 l1_s7 l1_s8)))+--                           (let ((l1_s18 (ite l1_s6 l1_s17 l1_s8)))+--                           (let ((l1_s19 (bvor l1_s7 l1_s18)))+--                           (let ((l1_s21 (bvand l1_s18 l1_s20)))+--                           (let ((l1_s22 (ite l1_s13 l1_s19 l1_s21)))+--                           (let ((l1_s23 (ite l1_s14 l1_s22 l1_s18)))+--                           (let ((l1_s24 (bvor l1_s20 l1_s23)))+--                           (let ((l1_s25 (bvand l1_s7 l1_s23)))+--                           (let ((l1_s26 (ite l1_s13 l1_s24 l1_s25)))+--                           (let ((l1_s27 (ite l1_s10 l1_s26 l1_s23)))+--                           (let ((l1_s28 (ite l1_s4 l1_s27 l1_s18)))+--                           l1_s28)))))))))))))))))))))))))))) pext_2 :: SWord 2 -> SWord 2 -> SWord 2 pext_2 = smtFunction "pext_2" (pext @2)
Documentation/SBV/Examples/BitPrecise/PrefixSum.hs view
@@ -12,6 +12,7 @@ -- and <http://www.cs.utexas.edu/~plaxton/c/337/05f/slides/ParallelRecursion-4.pdf>. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                 #-} {-# LANGUAGE Rank2Types          #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -21,9 +22,11 @@  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  ---------------------------------------------------------------------- -- * Formalizing power-lists
Documentation/SBV/Examples/CodeGeneration/GCD.hs view
@@ -13,6 +13,8 @@ -- enforce termination by using a recursion depth counter. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.CodeGeneration.GCD where@@ -20,10 +22,12 @@ import Data.SBV import Data.SBV.Tools.CodeGen +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV -- >>> import Data.SBV.Tools.CodeGen+#endif  ----------------------------------------------------------------------------- -- * Computing GCD
Documentation/SBV/Examples/CodeGeneration/PopulationCount.hs view
@@ -10,6 +10,8 @@ -- generating C code. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.CodeGeneration.PopulationCount where@@ -17,9 +19,11 @@ import Data.SBV import Data.SBV.Tools.CodeGen +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  ----------------------------------------------------------------------------- -- * Reference: Slow but /obviously/ correct
Documentation/SBV/Examples/CodeGeneration/Uninterpreted.hs view
@@ -13,6 +13,7 @@ -- purposes, such as efficiency, or reliability. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP              #-} {-# LANGUAGE FlexibleContexts #-}  {-# OPTIONS_GHC -Wall -Werror #-}@@ -24,9 +25,11 @@ import Data.SBV import Data.SBV.Tools.CodeGen +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | A definition of shiftLeft that can deal with variable length shifts. -- (Note that the ``shiftL`` method from the 'Bits' class requires an 'Int' shift
Documentation/SBV/Examples/Crypto/AES.hs view
@@ -52,9 +52,11 @@  import Test.QuickCheck hiding (verbose) +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  ----------------------------------------------------------------------------- -- * Formalizing GF(2^8)
Documentation/SBV/Examples/Crypto/Prince.hs view
@@ -10,6 +10,7 @@ -- <https://eprint.iacr.org/2012/529.pdf> ----------------------------------------------------------------------------- +{-# LANGUAGE CPP              #-} {-# LANGUAGE DataKinds        #-} {-# LANGUAGE ParallelListComp #-} @@ -23,9 +24,11 @@ import Data.SBV import Data.SBV.Tools.CodeGen +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- * Types -- | Section 2: Prince is essentially a 64-bit cipher, with 128-bit key, coming in two parts.
+ Documentation/SBV/Examples/KnuckleDragger/AppendRev.hs view
@@ -0,0 +1,101 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.KnuckleDragger.AppendRev+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Example use of the KnuckleDragger, on list append and reverses.+-----------------------------------------------------------------------------++{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE DeriveAnyClass      #-}+{-# LANGUAGE DeriveDataTypeable  #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE StandaloneDeriving  #-}+{-# LANGUAGE TemplateHaskell     #-}+{-# LANGUAGE TypeAbstractions    #-}+{-# LANGUAGE TypeApplications    #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.KnuckleDragger.AppendRev where++import Prelude hiding (reverse, (++))++import Data.SBV+import Data.SBV.Tools.KnuckleDragger++import Data.SBV.List ((.:), (++), reverse)+import qualified Data.SBV.List as SL++-- | Use an uninterpreted type for the elements+data Elt+mkUninterpretedSort ''Elt++-- | @xs ++ [] == xs@+--+-- We have:+--+-- >>> appendNull+-- Lemma: appendNull                       Q.E.D.+-- [Proven] appendNull+appendNull :: IO Proof+appendNull = runKD $ lemma "appendNull"+                           (\(Forall @"xs" (xs :: SList Elt)) -> xs ++ SL.nil .== xs)+                           []++-- | @(x : xs) ++ ys == x : (xs ++ ys)@+--+-- We have:+--+-- >>> consApp+-- Lemma: consApp                          Q.E.D.+-- [Proven] consApp+consApp :: IO Proof+consApp = runKD $ lemma "consApp"+                        (\(Forall @"x" (x :: SElt)) (Forall @"xs" xs) (Forall @"ys" ys) -> (x .: xs) ++ ys .== x .: (xs ++ ys))+                        []++-- | @(xs ++ ys) ++ zs == xs ++ (ys ++ zs)@+--+-- We have:+--+-- >>> appendAssoc+-- Lemma: appendAssoc                      Q.E.D.+-- [Proven] appendAssoc+appendAssoc :: IO Proof+appendAssoc = runKD $ do+   let p :: SymVal a => SList a -> SList a -> SList a -> SBool+       p xs ys zs = xs ++ (ys ++ zs) .== (xs ++ ys) ++ zs++   lemma "appendAssoc"+         (\(Forall @"xs" (xs :: SList Elt)) (Forall @"ys" ys) (Forall @"zs" zs) -> p xs ys zs)+         []++-- | @reverse (reverse xs) == xs@+--+-- We have:+--+-- >>> reverseReverse+-- Lemma: revApp                           Q.E.D.+-- Lemma: reverseReverse                   Q.E.D.+-- [Proven] reverseReverse+reverseReverse :: IO Proof+reverseReverse = runKD $ do++   -- Helper lemma: @reverse (xs ++ ys) .== reverse ys ++ reverse xs@+   let ra :: SymVal a => SList a -> SList a -> SBool+       ra xs ys = reverse (xs ++ ys) .== reverse ys ++ reverse xs++   revApp <- lemma "revApp" (\(Forall @"xs" (xs :: SList Elt)) (Forall @"ys" ys) -> ra xs ys)+                   -- induction is always done on the last argument, so flip to make sure we induct on xs+                   [induct (flip (ra @Elt))]++   let p :: SymVal a => SList a -> SBool+       p xs = reverse (reverse xs) .== xs++   lemma "reverseReverse"+         (\(Forall @"xs" (xs :: SList Elt)) -> p xs)+         [induct (p @Elt), revApp]
+ Documentation/SBV/Examples/KnuckleDragger/Basics.hs view
@@ -0,0 +1,179 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.KnuckleDragger.Basics+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Some basic KD usage.+-----------------------------------------------------------------------------++{-# LANGUAGE CPP                #-}+{-# LANGUAGE DataKinds          #-}+{-# LANGUAGE DeriveAnyClass     #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE TemplateHaskell    #-}+{-# LANGUAGE TypeAbstractions   #-}+{-# LANGUAGE StandaloneDeriving #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.KnuckleDragger.Basics where++import Data.SBV+import Data.SBV.Tools.KnuckleDragger++#ifndef HADDOCK+-- $setup+-- >>> -- For doctest purposes only:+-- >>> :set -XScopedTypeVariables+-- >>> import Control.Exception+#endif++-- | @sTrue@ is provable.+--+-- We have:+--+-- >>> trueIsProvable+-- Lemma: true                             Q.E.D.+-- [Proven] true+trueIsProvable :: IO Proof+trueIsProvable = runKD $ lemma "true" sTrue []++-- | @sFalse@ isn't provable.+--+-- We have:+--+-- >>> falseIsn'tProvable `catch` (\(_ :: SomeException) -> pure ())+-- Lemma: sFalse+-- *** Failed to prove sFalse.+-- Falsifiable+falseIsn'tProvable :: IO ()+falseIsn'tProvable = runKD $ do+        _won'tGoThrough <- lemma "sFalse" sFalse []+        pure ()++-- | Basic quantification example: For every integer, there's a larger integer.+--+-- We have:+-- >>> largerIntegerExists+-- Lemma: largerIntegerExists              Q.E.D.+-- [Proven] largerIntegerExists+largerIntegerExists :: IO Proof+largerIntegerExists = runKD $ lemma "largerIntegerExists"+                                    (\(Forall @"x" x) (Exists @"y" y) -> x .< (y :: SInteger))+                                    []++-- | Use an uninterpreted type for the domain+data T+mkUninterpretedSort ''T++-- | Pushing a universal through conjunction. We have:+--+-- >>> forallConjunction+-- Lemma: forallConjunction                Q.E.D.+-- [Proven] forallConjunction+forallConjunction :: IO Proof+forallConjunction = runKD $ do+    let p, q :: ST -> SBool+        p = uninterpret "p"+        q = uninterpret "q"++        qb = quantifiedBool++    lemma "forallConjunction"+           (      (qb (\(Forall @"x" x) -> p x) .&& qb (\(Forall @"x" x) -> q x))+            .<=> -----------------------------------------------------------------+                          qb (\(Forall @"x" x) -> p x .&& q x)+           )+           []++-- | Pushing an existential through disjunction. We have:+--+-- >>> existsDisjunction+-- Lemma: existsDisjunction                Q.E.D.+-- [Proven] existsDisjunction+existsDisjunction :: IO Proof+existsDisjunction = runKD $ do+    let p, q :: ST -> SBool+        p = uninterpret "p"+        q = uninterpret "q"++        qb = quantifiedBool++    lemma "existsDisjunction"+           (      (qb (\(Exists @"x" x) -> p x) .|| qb (\(Exists @"x" x) -> q x))+            .<=> -----------------------------------------------------------------+                          qb (\(Exists @"x" x) -> p x .|| q x)+           )+           []++-- | We cannot push a universal through a disjunction. We have:+--+-- >>> forallDisjunctionNot `catch` (\(_ :: SomeException) -> pure ())+-- Lemma: forallConjunctionNot+-- *** Failed to prove forallConjunctionNot.+-- Falsifiable. Counter-example:+--   p :: T -> Bool+--   p T_2 = True+--   p T_0 = True+--   p _   = False+-- <BLANKLINE>+--   q :: T -> Bool+--   q T_2 = False+--   q T_0 = False+--   q _   = True+--+-- Note how @p@ assigns two selected values to @True@ and everything else to @False@, while @q@ does the exact opposite.+-- So, there is no common value that satisfies both, providing a counter-example. (It's not clear why the solver finds+-- a model with two distinct values, as one would have sufficed. But it is still a valud model.)+forallDisjunctionNot :: IO ()+forallDisjunctionNot = runKD $ do+    let p, q :: ST -> SBool+        p = uninterpret "p"+        q = uninterpret "q"++        qb = quantifiedBool++    -- This won't prove!+    _won'tGoThrough <- lemma "forallConjunctionNot"+                             (      (qb (\(Forall @"x" x) -> p x) .|| qb (\(Forall @"x" x) -> q x))+                              .<=> -----------------------------------------------------------------+                                              qb (\(Forall @"x" x) -> p x .|| q x)+                             )+                             []++    pure ()++-- | We cannot push an existential through conjunction. We have:+--+-- >>> existsConjunctionNot `catch` (\(_ :: SomeException) -> pure ())+-- Lemma: existsConjunctionNot+-- *** Failed to prove existsConjunctionNot.+-- Falsifiable. Counter-example:+--   p :: T -> Bool+--   p T_1 = False+--   p _   = True+-- <BLANKLINE>+--   q :: T -> Bool+--   q T_1 = True+--   q _   = False+--+-- In this case, we again have a predicate That disagree at every point, providing a counter-example.+existsConjunctionNot :: IO ()+existsConjunctionNot = runKD $ do+    let p, q :: ST -> SBool+        p = uninterpret "p"+        q = uninterpret "q"++        qb = quantifiedBool++    _wont'GoThrough <- lemma "existsConjunctionNot"+                             (      (qb (\(Exists @"x" x) -> p x) .&& qb (\(Exists @"x" x) -> q x))+                              .<=> -----------------------------------------------------------------+                                              qb (\(Exists @"x" x) -> p x .&& q x)+                             )+                            []++    pure ()
+ Documentation/SBV/Examples/KnuckleDragger/CaseSplit.hs view
@@ -0,0 +1,91 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.KnuckleDragger.CaseSplit+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Use KnuckleDragger to prove @2n^2 + n + 1@ is never divisible by @3@.+-----------------------------------------------------------------------------++{-# LANGUAGE DataKinds        #-}+{-# LANGUAGE TypeAbstractions #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.KnuckleDragger.CaseSplit where++import Prelude hiding (sum, length)++import Data.SBV+import Data.SBV.Tools.KnuckleDragger++-- | The default settings for z3 have trouble running this proof out-of-the-box.+-- We have to pass auto_config=false to z3!+z3NoAutoConfig :: SMTConfig+z3NoAutoConfig = z3{extraArgs = ["auto_config=false"]}++-- | Prove that @2n^2 + n + 1@ is not divisible by @3@.+--+-- We have:+--+-- >>> notDiv3+-- Chain: case_n_mod_3_eq_0+--   Lemma: case_n_mod_3_eq_0.1            Q.E.D.+--   Lemma: case_n_mod_3_eq_0.2            Q.E.D.+-- Lemma: case_n_mod_3_eq_0                Q.E.D.+-- Chain: case_n_mod_3_eq_1+--   Lemma: case_n_mod_3_eq_1.1            Q.E.D.+--   Lemma: case_n_mod_3_eq_1.2            Q.E.D.+-- Lemma: case_n_mod_3_eq_1                Q.E.D.+-- Chain: case_n_mod_3_eq_2+--   Lemma: case_n_mod_3_eq_2.1            Q.E.D.+--   Lemma: case_n_mod_3_eq_2.2            Q.E.D.+-- Lemma: case_n_mod_3_eq_2                Q.E.D.+-- Lemma: notDiv3                          Q.E.D.+-- [Proven] notDiv3+notDiv3 :: IO Proof+notDiv3 = runKDWith z3NoAutoConfig $ do++   let s n = 2 * n * n + n + 1+       p n = s n `sEMod` 3 ./= 0++   -- Do the proof in 3 phases; one each for the possible value of n `mod` 3 being 0, 1, and 2+   -- Note that we use the euclidian definition of division/modulus.++   -- Case 0: n = 0 (mod 3)+   case0 <- chainLemma "case_n_mod_3_eq_0"+                       (\(Forall @"n" n) -> (n `sEMod` 3 .== 0) .=> p n)+                       (\n -> let k = n `sEDiv` 3+                              in [ n `sEMod` 3 .== 0+                                 , n .== 3 * k+                                 , s n .== s (3 * k)+                                 ])+                       []++   -- Case 1: n = 1 (mod 3)+   case1 <- chainLemma "case_n_mod_3_eq_1"+                       (\(Forall @"n" n) -> (n `sEMod` 3 .== 1) .=> p n)+                       (\n -> let k = n `sEDiv` 3+                              in [ n `sEMod` 3 .== 1+                                 , n .== 3 * k + 1+                                 , s n .== s (3 * k + 1)+                                 ])+                       []++   -- Case 2: n = 2 (mod 3)+   case2 <- chainLemma "case_n_mod_3_eq_2"+                       (\(Forall @"n" n) -> (n `sEMod` 3 .== 2) .=> p n)+                       (\n -> let k = n `sEDiv` 3+                              in [ n `sEMod` 3 .== 2+                                 , n .== 3 * k + 2+                                 , s n .== s (3 * k + 2)+                                 ])+                       []++   -- Note that z3 is smart enough to figure out the above cases are complete, so+   -- no extra completeness helper is needed.+   lemma "notDiv3"+         (\(Forall @"n" n) -> p n)+         [case0, case1, case2]
+ Documentation/SBV/Examples/KnuckleDragger/Induction.hs view
@@ -0,0 +1,106 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.KnuckleDragger.Induction+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Example use of the KnuckleDragger, for some inductive proofs+-----------------------------------------------------------------------------++{-# LANGUAGE DataKinds        #-}+{-# LANGUAGE TypeAbstractions #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.KnuckleDragger.Induction where++import Prelude hiding (sum, length)++import Data.SBV+import Data.SBV.Tools.KnuckleDragger++-- | Prove that sum of constants @c@ from @0@ to @n@ is @n*c@.+--+-- We have:+--+-- >>> sumConstProof+-- Lemma: sumConst_correct                 Q.E.D.+-- [Proven] sumConst_correct+sumConstProof :: IO Proof+sumConstProof = runKD $ do+   let sum :: SInteger -> SInteger -> SInteger+       sum = smtFunction "sum" $ \c n -> ite (n .== 0) 0 (c + sum c (n-1))++       spec :: SInteger -> SInteger -> SInteger+       spec c n = c * n++       p :: SInteger -> SInteger -> SBool+       p c n = observe "imp" (sum c n) .== observe "spec" (spec c n)++   lemma "sumConst_correct" (\(Forall @"c" c) (Forall @"n" n) -> n .>= 0 .=> p c n) [induct p]++-- | Prove that sum of numbers from @0@ to @n@ is @n*(n-1)/2@.+--+-- We have:+--+-- >>> sumProof+-- Lemma: sum_correct                      Q.E.D.+-- [Proven] sum_correct+sumProof :: IO Proof+sumProof = runKD $ do+   let sum :: SInteger -> SInteger+       sum = smtFunction "sum" $ \n -> ite (n .== 0) 0 (n + sum (n - 1))++       spec :: SInteger -> SInteger+       spec n = (n * (n+1)) `sDiv` 2++       p :: SInteger -> SBool+       p n = observe "imp" (sum n) .== observe "spec" (spec n)++   lemma "sum_correct" (\(Forall @"n" n) -> n .>= 0 .=> p n) [induct p]++-- | Prove that sum of square of numbers from @0@ to @n@ is @n*(n+1)*(2n+1)/6@.+--+-- We have:+--+-- >>> sumSquareProof+-- Lemma: sumSquare_correct                Q.E.D.+-- [Proven] sumSquare_correct+sumSquareProof :: IO Proof+sumSquareProof = runKD $ do+   let sumSquare :: SInteger -> SInteger+       sumSquare = smtFunction "sumSquare" $ \n -> ite (n .== 0) 0 (n * n + sumSquare (n - 1))++       spec :: SInteger -> SInteger+       spec n = (n * (n+1) * (2*n+1)) `sDiv` 6++       p :: SInteger -> SBool+       p n = observe "imp" (sumSquare n) .== observe "spec" (spec n)++   lemma "sumSquare_correct" (\(Forall @"n" n) -> n .>= 0 .=> p n) [induct p]++-- | Prove that @11^n - 4^n@ is always divisible by 7. Note that power operator is hard for+-- SMT solvers to deal with due to non-linearity. For this example, we use cvc5 to discharge+-- the final goal, where z3 can't converge on it.+--+-- We have:+--+-- >>> elevenMinusFour+-- Lemma: pow0                             Q.E.D.+-- Lemma: powN                             Q.E.D.+-- Lemma: elevenMinusFour                  Q.E.D.+-- [Proven] elevenMinusFour+elevenMinusFour :: IO Proof+elevenMinusFour = runKD $ do+   let pow :: SInteger -> SInteger -> SInteger+       pow = smtFunction "pow" $ \x y -> ite (y .== 0) 1 (x * pow x (y - 1))++       emf :: SInteger -> SBool+       emf n = 7 `sDivides` (11 `pow` n - 4 `pow` n)++   pow0 <- lemma "pow0" (\(Forall @"x" x)                 ->             x `pow` 0     .== 1)             []+   powN <- lemma "powN" (\(Forall @"x" x) (Forall @"n" n) -> n .>= 0 .=> x `pow` (n+1) .== x * x `pow` n) []++   lemmaWith cvc5 "elevenMinusFour" (\(Forall @"n" n) -> n .>= 0 .=> emf n) [pow0, powN, induct emf]
+ Documentation/SBV/Examples/KnuckleDragger/Kleene.hs view
@@ -0,0 +1,142 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.KnuckleDragger.Kleene+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Example use of the KnuckleDragger layer, proving some Kleene algebra theorems.+--+-- Based on <http://www.philipzucker.com/bryzzowski_kat/>+-----------------------------------------------------------------------------++{-# LANGUAGE DataKinds            #-}+{-# LANGUAGE DeriveAnyClass       #-}+{-# LANGUAGE DeriveDataTypeable   #-}+{-# LANGUAGE FlexibleInstances    #-}+{-# LANGUAGE ScopedTypeVariables  #-}+{-# LANGUAGE StandaloneDeriving   #-}+{-# LANGUAGE TemplateHaskell      #-}+{-# LANGUAGE TypeAbstractions     #-}+{-# LANGUAGE TypeSynonymInstances #-}++{-# OPTIONS_GHC -Wall -Werror -Wno-unused-matches #-}++module Documentation.SBV.Examples.KnuckleDragger.Kleene where++import Prelude hiding((<=))++import Data.SBV+import Data.SBV.Tools.KnuckleDragger++-- | An uninterpreted sort, corresponding to the type of Kleene algebra strings.+data Kleene+mkUninterpretedSort ''Kleene++-- | Star operator over kleene algebras. We're leaving this uninterpreted.+star :: SKleene -> SKleene+star = uninterpret "star"++-- | The 'Num' instance for Kleene makes it easy to write regular expressions+-- in the more familiar form.+instance Num SKleene where+  (+) = uninterpret "par"+  (*) = uninterpret "seq"++  abs    = error "SKleene: not defined: abs"+  signum = error "SKleene: not defined: signum"+  negate = error "SKleene: not defined: signum"++  fromInteger 0 = uninterpret "zero"+  fromInteger 1 = uninterpret "one"+  fromInteger n = error $ "SKleene: not defined: fromInteger " ++ show n++-- | The set of strings matched by one regular expression is a subset of the second,+-- if adding it to the second doesn't change the second set.+(<=) :: SKleene -> SKleene -> SBool+x <= y = x + y .== y++-- | A sequence of Kleene algebra proofs. See <http://www.cs.cornell.edu/~kozen/Papers/ka.pdf>+--+-- We have:+--+-- >>> kleeneProofs+-- Axiom: par_assoc                        Axiom.+-- Axiom: par_comm                         Axiom.+-- Axiom: par_idem                         Axiom.+-- Axiom: par_zero                         Axiom.+-- Axiom: seq_assoc                        Axiom.+-- Axiom: seq_zero                         Axiom.+-- Axiom: seq_one                          Axiom.+-- Axiom: rdistrib                         Axiom.+-- Axiom: ldistrib                         Axiom.+-- Axiom: unfold                           Axiom.+-- Axiom: least_fix                        Axiom.+-- Lemma: par_lzero                        Q.E.D.+-- Lemma: par_monotone                     Q.E.D.+-- Lemma: seq_monotone                     Q.E.D.+-- Chain: star_star_1+--   Lemma: star_star_1.1                  Q.E.D.+--   Lemma: star_star_1.2                  Q.E.D.+--   Lemma: star_star_1.3                  Q.E.D.+--   Lemma: star_star_1.4                  Q.E.D.+-- Lemma: star_star_1                      Q.E.D.+-- Lemma: subset_eq                        Q.E.D.+-- Lemma: star_star_2_2                    Q.E.D.+-- Lemma: star_star_2_3                    Q.E.D.+-- Lemma: star_star_2_1                    Q.E.D.+-- Lemma: star_star_2                      Q.E.D.+kleeneProofs :: IO ()+kleeneProofs = runKD $ do++  -- Kozen axioms+  par_assoc <- axiom "par_assoc" $ \(Forall @"x" (x :: SKleene)) (Forall @"y" y) (Forall @"z" z) -> x + (y + z) .== (x + y) + z+  par_comm  <- axiom "par_comm"  $ \(Forall @"x" (x :: SKleene)) (Forall @"y" y)                 -> x + y       .== y + x+  par_idem  <- axiom "par_idem"  $ \(Forall @"x" (x :: SKleene))                                 -> x + x       .== x+  par_zero  <- axiom "par_zero"  $ \(Forall @"x" (x :: SKleene))                                 -> x + 0       .== x++  seq_assoc <- axiom "seq_assoc" $ \(Forall @"x" (x :: SKleene)) (Forall @"y" y) (Forall @"z" z) -> x * (y * z) .== (x * y) * z+  seq_zero  <- axiom "seq_zero"  $ \(Forall @"x" (x :: SKleene))                                 -> x * 0       .== 0+  seq_one   <- axiom "seq_one"   $ \(Forall @"x" (x :: SKleene))                                 -> x * 1       .== x++  rdistrib  <- axiom "rdistrib"  $ \(Forall @"x" (x :: SKleene)) (Forall @"y" y) (Forall @"z" z) -> x * (y + z) .== x * y + x * z+  ldistrib  <- axiom "ldistrib"  $ \(Forall @"x" (x :: SKleene)) (Forall @"y" y) (Forall @"z" z) -> (y + z) * x .== y * x + z * x++  unfold    <- axiom "unfold"    $ \(Forall @"e" e) -> star e .== 1 + e * star e++  least_fix <- axiom "least_fix" $ \(Forall @"x" x) (Forall @"e" e) (Forall @"f" f) -> ((f + e * x) <= x) .=> ((star e * f) <= x)++  -- Collect the basic axioms in a list for easy reference+  let kleene = [ par_assoc,  par_comm, par_idem, par_zero+               , seq_assoc,  seq_zero, seq_one+               , ldistrib,   rdistrib+               , unfold+               , least_fix+               ]++  -- Various proofs:+  par_lzero    <- lemma "par_lzero" (\(Forall @"x" (x :: SKleene)) -> 0 + x .== x) kleene+  par_monotone <- lemma "par_monotone" (\(Forall @"x" (x :: SKleene)) (Forall @"y" y) (Forall @"z" z) -> x <= y .=> ((x + z) <= (y + z))) kleene+  seq_monotone <- lemma "seq_monotone" (\(Forall @"x" (x :: SKleene)) (Forall @"y" y) (Forall @"z" z) -> x <= y .=> ((x * z) <= (y * z))) kleene++  -- This one requires a chain of reasoning: x* x* == x*+  star_star_1  <- chainLemma "star_star_1" (\(Forall @"x" (x :: SKleene)) -> star x * star x .== star x)+                                           (\x -> [ star x * star x+                                                  , (1 + x * star x) * (1 + x * star x)+                                                  , (1 + 1) + (x * star x + x * star x)+                                                  , 1 + x * star x+                                                  , star x+                                                  ])+                                           kleene++  subset_eq   <- lemma "subset_eq" (\(Forall @"x" x) (Forall @"y" y) -> (x .== y) .== (x <= y .&& y <= x)) kleene++  -- Prove: x** = x*+  star_star_2 <- do _1 <- lemma "star_star_2_2" (\(Forall @"x" x) -> ((star x * star x + 1) <= star x) .=> star (star x) <= star x) kleene+                    _2 <- lemma "star_star_2_3" (\(Forall @"x" x) -> star (star x) <= star x)                                       (kleene ++ [_1])+                    _3 <- lemma "star_star_2_1" (\(Forall @"x" x) -> star x        <= star (star x))                                kleene++                    lemma "star_star_2" (\(Forall @"x" (x :: SKleene)) -> star (star x) .== star x) [subset_eq, _2, _3]++  pure ()
+ Documentation/SBV/Examples/KnuckleDragger/ListLen.hs view
@@ -0,0 +1,119 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.KnuckleDragger.ListLen+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Example use of the KnuckleDragger, about lenghts of lists+-----------------------------------------------------------------------------++{-# LANGUAGE CPP                 #-}+{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE DeriveAnyClass      #-}+{-# LANGUAGE DeriveDataTypeable  #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE StandaloneDeriving  #-}+{-# LANGUAGE TemplateHaskell     #-}+{-# LANGUAGE TypeAbstractions    #-}+{-# LANGUAGE TypeApplications    #-}++{-# OPTIONS_GHC -Wall -Werror -Wno-unused-do-bind #-}++module Documentation.SBV.Examples.KnuckleDragger.ListLen where++import Prelude hiding (sum, length, reverse, (++))++import Data.SBV+import Data.SBV.Tools.KnuckleDragger++import qualified Data.SBV.List as SL++#ifndef HADDOCK+-- $setup+-- >>> -- For doctest purposes only:+-- >>> :set -XScopedTypeVariables+-- >>> import Control.Exception+#endif++-- | Use an uninterpreted type for the elements+data Elt+mkUninterpretedSort ''Elt++-- | Prove that the length of a list is one more than the length of its tail.+--+-- We have:+--+-- >>> listLengthProof+-- Lemma: length_correct                   Q.E.D.+-- [Proven] length_correct+listLengthProof :: IO Proof+listLengthProof = runKD $ do+   let length :: SList Elt -> SInteger+       length = smtFunction "length" $ \xs -> ite (SL.null xs) 0 (1 + length (SL.tail xs))++       spec :: SList Elt -> SInteger+       spec = SL.length++       p :: SList Elt -> SBool+       p xs = observe "imp" (length xs) .== observe "spec" (spec xs)++   lemma "length_correct" (\(Forall @"xs" xs) -> p xs) [induct p]++-- | It is instructive to see what kind of counter-example we get if a lemma fails to prove.+-- Below, we do a variant of the 'listLengthProof', but with a bad implementation over integers,+-- and see the counter-example. Our implementation returns an incorrect answer if the given list is longer+-- than 5 elements and have 42 in it. We have:+--+-- >>> badProof `catch` (\(_ :: SomeException) -> pure ())+-- Lemma: bad+-- *** Failed to prove bad.+-- Falsifiable. Counter-example:+--   xs   = [8,25,26,27,28,42] :: [Integer]+--   imp  =                 42 :: Integer+--   spec =                  6 :: Integer+badProof :: IO ()+badProof = runKD $ do+   let length :: SList Integer -> SInteger+       length = smtFunction "length" $ \xs -> ite (SL.null xs) 0 (1 + length (SL.tail xs))++       badLength :: SList Integer -> SInteger+       badLength xs = ite (SL.length xs .> 5 .&& 42 `SL.elem` xs) 42 (length xs)++       spec :: SList Integer -> SInteger+       spec = SL.length++       p :: SList Integer -> SBool+       p xs = observe "imp" (badLength xs) .== observe "spec" (spec xs)++   lemma "bad" (\(Forall @"xs" xs) -> p xs) [induct p]++   pure ()++-- | @length (xs ++ ys) == length xs + length ys@+--+-- We have:+--+-- >>> lenAppend+-- Lemma: lenAppend                        Q.E.D.+-- [Proven] lenAppend+lenAppend :: IO Proof+lenAppend = runKD $ lemma "lenAppend"+                           (\(Forall @"xs" (xs :: SList Elt)) (Forall @"ys" ys) ->+                                 SL.length (xs SL.++ ys) .== SL.length xs + SL.length ys)+                           []++-- | @length xs == length ys -> length (xs ++ ys) == 2 * length xs@+--+-- We have:+--+-- >>> lenAppend2+-- Lemma: lenAppend2                       Q.E.D.+-- [Proven] lenAppend2+lenAppend2 :: IO Proof+lenAppend2 = runKD $ lemma "lenAppend2"+                           (\(Forall @"xs" (xs :: SList Elt)) (Forall @"ys" ys) ->+                                     SL.length xs .== SL.length ys+                                 .=> SL.length (xs SL.++ ys) .== 2 * SL.length xs)+                           []
+ Documentation/SBV/Examples/KnuckleDragger/RevLen.hs view
@@ -0,0 +1,79 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.KnuckleDragger.RevLen+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Proof that reversing a list does not change its length.+-----------------------------------------------------------------------------++{-# LANGUAGE CPP                 #-}+{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE DeriveAnyClass      #-}+{-# LANGUAGE DeriveDataTypeable  #-}+{-# LANGUAGE StandaloneDeriving  #-}+{-# LANGUAGE TemplateHaskell     #-}+{-# LANGUAGE TypeAbstractions    #-}++{-# OPTIONS_GHC -Wall -Werror -Wno-unused-do-bind #-}++module Documentation.SBV.Examples.KnuckleDragger.RevLen where++import Prelude hiding (length, reverse)++import Data.SBV+import Data.SBV.Tools.KnuckleDragger++import Data.SBV.List (reverse, length)++#ifndef HADDOCK+-- $setup+-- >>> -- For doctest purposes only:+-- >>> :set -XScopedTypeVariables+-- >>> import Control.Exception+#endif++-- | Use an uninterpreted type for the elements+data Elt+mkUninterpretedSort ''Elt++-- | @length xs == length (reverse xs)@+--+-- We have:+--+-- >>> revLen+-- Lemma: revLen                           Q.E.D.+-- [Proven] revLen+revLen :: IO Proof+revLen = runKD $ do+   let p :: SList Elt -> SBool+       p xs = length (reverse xs) .== length xs++   lemma "revLen"+         (\(Forall @"xs" xs) -> p xs)+         [induct p]++-- | An example where we attempt to prove a non-theorem. Notice the counter-example+-- generated for:+--+-- @length xs = ite (length xs .== 3) 5 (length xs)@+--+-- We have:+--+-- >>> badRevLen `catch` (\(_ :: SomeException) -> pure ())+-- Lemma: badRevLen+-- *** Failed to prove badRevLen.+-- Falsifiable. Counter-example:+--   xs = [Elt_1,Elt_2,Elt_1] :: [Elt]+badRevLen :: IO ()+badRevLen = runKD $ do+   let p :: SList Elt -> SBool+       p xs = length (reverse xs) .== ite (length xs .== 3) 5 (length xs)++   lemma "badRevLen"+         (\(Forall @"xs" xs) -> p xs)+         [induct p]++   pure ()
+ Documentation/SBV/Examples/KnuckleDragger/Sqrt2IsIrrational.hs view
@@ -0,0 +1,111 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.KnuckleDragger.Sqrt2IsIrrational+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Prove that square-root of 2 is irrational.+-----------------------------------------------------------------------------++{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeAbstractions    #-}++{-# OPTIONS_GHC -Wall -Werror -Wno-unused-matches #-}++module Documentation.SBV.Examples.KnuckleDragger.Sqrt2IsIrrational where++import Prelude hiding (even, odd)++import Data.SBV+import Data.SBV.Tools.KnuckleDragger++-- | Prove that square-root of @2@ is irrational. That is, we can never find @a@ and @b@ such that+-- @sqrt 2 == a / b@ and @a@ and @b@ are co-prime.+--+-- In order not to deal with reals and square-roots, we prove the integer-only alternative:+-- If @a^2 = 2b^2@, then @a@ and @b@ cannot be co-prime. We proceed by establishing the+-- following helpers first:+--+--   (1) An odd number squared is odd: @odd x -> odd x^2@+--   (2) An even number that is a perfect square must be the square of an even number: @even x^2 -> even x@.+--   (3) If a number is even, then its square must be a multiple of 4: @even x .=> x*x % 4 == 0@.+--+--  Using these helpers, we can argue:+--+--   (4)  Start with the premise @a^2 = 2b^2@.+--   (5)  Thus, @a^2@ must be even. (Since it equals @2b^2@ by a.)+--   (6)  Thus, @a@ must be even. (Using 2 and b.)+--   (7)  Thus, @a^2@ must be divisible by @4@. (Using 3 and c. That is, 2b^2 == 4*K for someK.)+--   (8)  Thus, @b^2@ must be even. (Using d, b^2 = 2K.)+--   (9)  Thus, @b@ must be even. (Using 2 and e.)+--   (10) Since @a@ and @b@ are both even, they cannot be co-prime. (Using c and f.)+--+-- Note that our proof is mostly about the first 3 facts above, then z3 and KnuckleDragger fills in the rest.+--+-- We have:+--+-- >>> sqrt2IsIrrational+-- Chain: oddSquaredIsOdd+--   Lemma: oddSquaredIsOdd.1              Q.E.D.+--   Lemma: oddSquaredIsOdd.2              Q.E.D.+-- Lemma: oddSquaredIsOdd                  Q.E.D.+-- Lemma: squareEvenImpliesEven            Q.E.D.+-- Chain: evenSquaredIsMult4+--   Lemma: evenSquaredIsMult4.1           Q.E.D.+-- Lemma: evenSquaredIsMult4               Q.E.D.+-- Lemma: sqrt2IsIrrational                Q.E.D.+-- [Proven] sqrt2IsIrrational+sqrt2IsIrrational :: IO Proof+sqrt2IsIrrational = runKD $ do+    let even, odd :: SInteger -> SBool+        even = (2 `sDivides`)+        odd  = sNot . even++        sq :: SInteger -> SInteger+        sq x = x * x++    -- Prove that an odd number squared gives you an odd number.+    -- We need to help the solver by guiding it through how it can+    -- be decomposed as @2k+1@.+    --+    -- Interestingly, the solver doesn't need the analogous theorem that even number+    -- squared is even, possibly because the even/odd definition above is enough for+    -- it to deduce that fact automatically.+    oddSquaredIsOdd <- chainLemma "oddSquaredIsOdd"+                                  (\(Forall @"a" a) -> odd a .=> odd (sq a))+                                  (\a -> let k = a `sDiv` 2+                                         in [ odd a+                                            , sq a .== sq (2 * k + 1)+                                            , a .== 2 * k + 1+                                            ])+                                  []++    -- Prove that if a perfect square is even, then it be the square of an even number. For z3, the above proof+    -- is enough to establish this.+    squareEvenImpliesEven <- lemma "squareEvenImpliesEven"+                                   (\(Forall @"a" a) -> even (sq a) .=> even a)+                                   [oddSquaredIsOdd]++    -- Prove that if @a@ is an even number, then its square is four times the square of another.+    -- Happily, z3 needs nchainLemma helpers to establish this all on its own.+    evenSquaredIsMult4 <- chainLemma "evenSquaredIsMult4"+                                      (\(Forall @"a" a) -> even a .=> 4 `sDivides` sq a)+                                      (\a -> let k = a `sDiv` 2+                                             in [ even a+                                                , sq a .== sq (k * 2)+                                                ])+                                      []++    -- Define what it means to be co-prime. Note that we use euclidian notion of modulus here+    -- as z3 deals with that much better. Two numbers are co-prime if 1 is their only common divisor.+    let coPrime :: SInteger -> SInteger -> SBool+        coPrime x y = quantifiedBool (\(Forall @"z" z) -> (x `sEMod` z .== 0 .&& y `sEMod` z .== 0) .=> z .== 1)++    -- Prove that square-root of 2 is irrational. We do this by showing for all pairs of integers @a@ and @b@+    -- such that @a*a == 2*b*b@, it must be the case that @a@ and @b@ are not be co-prime:+    lemma "sqrt2IsIrrational"+        (\(Forall @"a" a) (Forall @"b" b) -> ((sq a .== 2 * sq b) .=> sNot (coPrime a b)))+        [squareEvenImpliesEven, evenSquaredIsMult4]
+ Documentation/SBV/Examples/KnuckleDragger/Tao.hs view
@@ -0,0 +1,62 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.KnuckleDragger.Tao+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Proves a problem originating in algebra:+--   https://mathoverflow.net/questions/450890/is-there-an-identity-between-the-commutative-identity-and-the-constant-identity/+--+-- Apparently this was posed by Terrence Tao: https://mathstodon.xyz/@tao/110736805384878353+--+-- Essentially, for an arbitrary binary operation op, we prove that+--+-- @+--    (x op x) op y == y op x+-- @+--+-- Implies that @op@ must be commutative.+-----------------------------------------------------------------------------+++{-# LANGUAGE DeriveAnyClass     #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DataKinds          #-}+{-# LANGUAGE TypeAbstractions   #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE TemplateHaskell    #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.KnuckleDragger.Tao where++import Data.SBV+import Data.SBV.Tools.KnuckleDragger++-- | Create an uninterpreted type to do the proofs over.+data T+mkUninterpretedSort ''T++-- | Prove that:+--+--  @+--    (x op x) op y == y op x+--  @+--+--  means that @op@ is commutative.+--+-- We have:+--+-- >>> tao+-- Lemma: tao                              Q.E.D.+-- [Proven] tao+tao :: IO Proof+tao = runKD $ do+   let op :: ST -> ST -> ST+       op = uninterpret "op"++   lemma "tao" (    quantifiedBool (\(Forall @"x" x) (Forall @"y" y) -> ((x `op` x) `op` y) .== y `op` x)+                .=> quantifiedBool (\(Forall @"x" x) (Forall @"y" y) -> (x `op` y) .== (y `op` x)))+               []
Documentation/SBV/Examples/Misc/FirstOrderLogic.hs view
@@ -29,10 +29,12 @@  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only, ignore. -- >>> import Data.SBV -- >>> :set -XDataKinds -XScopedTypeVariables+#endif  -- | An uninterpreted sort for demo purposes, named 'U' data U@@ -130,20 +132,20 @@ >>> prove $ (qe (\(Forall x) -> p x) .|| qe (\(Forall x) -> q x)) .<=> qe (\(Forall x) -> p x .|| q x) Falsifiable. Counter-example:   P :: U -> Bool-  P U!val!2 = True-  P U!val!0 = True-  P _       = False+  P U_2 = True+  P U_0 = True+  P _   = False <BLANKLINE>   Q :: U -> Bool-  Q U!val!2 = False-  Q U!val!0 = False-  Q _       = True+  Q U_0 = False+  Q U_2 = False+  Q _   = True  The solver found us a falsifying instance: Pick a domain with at least three elements. We'll call-the first element @U!val!2@, and the second element @U!val!0@, without naming the others. (Unfortunately the solver picks nonintuitive names, but you can substitute better names if you like. They're just names of two distinct+the first element @U_2@, and the second element @U_0@, without naming the others. (Unfortunately the solver picks nonintuitive names, but you can substitute better names if you like. They're just names of two distinct objects that belong to the domain \(U\) with no other meaning.) -Arrange so that \(P\) is true on @U!val!2@ and @U!val!0@, but false for everything else.+Arrange so that \(P\) is true on @U_2@ and @U_0@, but false for everything else. Also arrange so that \(Q\) is false on these two elements, but true for everything else.  With this
Documentation/SBV/Examples/Misc/Floating.hs view
@@ -17,6 +17,7 @@ -- the presence of @NaN@ is always something to look out for. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                 #-} {-# LANGUAGE DataKinds           #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -26,9 +27,11 @@  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  ----------------------------------------------------------------------------- -- * FP addition is not associative@@ -66,21 +69,21 @@ -- -- >>> assocPlusRegular -- Falsifiable. Counter-example:---   x = -1.7478492e-21 :: Float---   y =   9.693523e-27 :: Float---   z =   5.595795e-20 :: Float+--   x = 4.4272205e21 :: Float+--   y = 2.9514347e20 :: Float+--   z = 4.4676022e15 :: Float -- -- Indeed, we have: ----- >>> let x = -1.7478492e-21 :: Float--- >>> let y =   9.693523e-27 :: Float--- >>> let z =   5.595795e-20 :: Float+-- >>> let x = 4.4272205e21 :: Float+-- >>> let y = 2.9514347e20 :: Float+-- >>> let z = 4.4676022e15 :: Float -- >>> x + (y + z)--- 5.4210105e-20+-- 4.722369e21 -- >>> (x + y) + z--- 5.421011e-20+-- 4.722368e21 ----- Note the difference in the results!+-- Note the significant difference in the results! assocPlusRegular :: IO ThmResult assocPlusRegular = prove $ do [x, y, z] <- sFloats ["x", "y", "z"]                               let lhs = x+(y+z)@@ -100,13 +103,13 @@ -- -- >>> nonZeroAddition -- Falsifiable. Counter-example:---   a = 7.135861e-8 :: Float---   b = 8.57579e-39 :: Float+--   a = 2.9670994e34 :: Float+--   b = -7.208359e-5 :: Float -- -- Indeed, we have: ----- >>> let a = 7.135861e-8 :: Float--- >>> let b = 8.57579e-39 :: Float+-- >>> let a = 2.9670994e34 :: Float+-- >>> let b = -7.208359e-5 :: Float -- >>> a + b == a -- True -- >>> b == 0@@ -155,30 +158,28 @@ -- -- >>> roundingAdd -- Satisfiable. Model:---   rm = RoundTowardZero :: RoundingMode---   x  =       1.7499695 :: Float---   y  =       1.2539366 :: Float+--   rm = RoundTowardPositive :: RoundingMode+--   x  =          -4.0039067 :: Float+--   y  =            131076.0 :: Float -- -- (Note that depending on your version of Z3, you might get a different result.) -- Unfortunately Haskell floats do not allow computation with arbitrary rounding modes, but SBV's -- 'SFloatingPoint' type does. We have: ----- >>> sat $ \x -> x .== (fpAdd sRoundTowardZero 1.7499695 1.2539366 :: SFloat)--- Satisfiable. Model:---   s0 = 3.003906 :: Float--- >>> sat $ \x -> x .== (fpAdd sRoundNearestTiesToEven  1.7499695 1.2539366 :: SFloat)+-- >>> sat $ \x -> x .== (fpAdd sRoundTowardPositive (-4.0039067) 131076.0 :: SFloat) -- Satisfiable. Model:---   s0 = 3.0039063 :: Float+--   s0 = 131072.0 :: Float+-- >>> (-4.0039067) + 131076.0 :: Float+-- 131071.99 ----- We can see why these two results are indeed different: The 'RoundTowardZero'--- (which rounds towards the origin) produces a smaller result, closer to 0. Indeed, if we treat these numbers--- as 'Double' values, we get:+-- We can see why these two results are indeed different: The 'RoundTowardPositive+-- (which rounds towards positive infinity) produces a larger result. ----- >>>  1.7499695 + 1.2539366 :: Double--- 3.0039061+-- >>> (-4.0039067) + 131076.0 :: Double+-- 131071.9960933 ----- we see that the "more precise" result is smaller than what the 'Float' value is, justifying the--- smaller value with 'RoundTowardZero. A more detailed study is beyond our current scope, so we'll+-- we see that the "more precise" result is larger than what the 'Float' value is, justifying the+-- larger value with 'RoundTowardPositive. A more detailed study is beyond our current scope, so we'll -- merely note that floating point representation and semantics is indeed a thorny -- subject, and point to <http://ece.uwaterloo.ca/~dwharder/NumericalAnalysis/02Numerics/Double/paper.pdf> as -- an excellent guide.
Documentation/SBV/Examples/Misc/LambdaArray.hs view
@@ -18,7 +18,7 @@ -- | Given an array, and bounds on it, initialize it within the bounds to the element given. -- Otherwise, leave it untouched. memset :: SArray Integer Integer -> SInteger -> SInteger -> SInteger -> SArray Integer Integer-memset mem lo hi newVal = lambdaAsArray update+memset mem lo hi newVal = lambdaArray update   where update :: SInteger -> SInteger         update idx = let oldVal = readArray mem idx                      in ite (lo .<= idx .&& idx .<= hi) newVal oldVal@@ -29,8 +29,7 @@ -- Q.E.D. memsetExample :: IO ThmResult memsetExample = prove $ do-   mem  <- newArray "mem" Nothing-+   mem  <- sArray   "mem"    lo   <- sInteger "lo"    hi   <- sInteger "hi"    zero <- sInteger "zero"@@ -46,15 +45,15 @@ -- -- >>> outOfInit -- Satisfiable. Model:---   Read = 1 :: Integer---   lo   = 0 :: Integer---   hi   = 0 :: Integer---   zero = 0 :: Integer---   idx  = 1 :: Integer+--   Read =       1 :: Integer+--   mem  = ([], 1) :: Array Integer Integer+--   lo   =       0 :: Integer+--   hi   =       0 :: Integer+--   zero =       0 :: Integer+--   idx  =       1 :: Integer outOfInit :: IO SatResult outOfInit = sat $ do-   mem  <- newArray "mem" Nothing-+   mem  <- sArray "mem"    lo   <- sInteger "lo"    hi   <- sInteger "hi"    zero <- sInteger "zero"
Documentation/SBV/Examples/Misc/NestedArray.hs view
@@ -27,7 +27,7 @@ nestedArray :: IO (Integer, Integer) nestedArray = runSMT $ do   idx <- sInteger "idx"-  arr <- newArray_ Nothing :: Symbolic (SArray (Integer, Integer) Integer)+  arr <- sArray_ :: Symbolic (SArray (Integer, Integer) Integer)    -- we'll assert that arr[idx][idx] = 10   let val = readArray arr (tuple (idx, idx))
Documentation/SBV/Examples/Misc/Newtypes.hs view
@@ -11,19 +11,23 @@ -- their wrapped type. ----------------------------------------------------------------------------- -{-# OPTIONS_GHC -Wall -Werror           #-}+{-# LANGUAGE CPP                        #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ScopedTypeVariables        #-} +{-# OPTIONS_GHC -Wall -Werror           #-}+ module Documentation.SBV.Examples.Misc.Newtypes where  import Prelude hiding (ceiling) import Data.SBV import qualified Data.SBV.Internals as SI +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | A 'Metres' is a newtype wrapper around 'Integer'. newtype Metres = Metres Integer deriving (Real, Integral, Num, Enum, Eq, Ord)
Documentation/SBV/Examples/Misc/SetAlgebra.hs view
@@ -10,17 +10,21 @@ -- prove all come from <http://en.wikipedia.org/wiki/Algebra_of_sets>. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.Misc.SetAlgebra where  import Data.SBV hiding (complement) +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV hiding (complement) -- >>> import Data.SBV.Set -- >>> :set -XScopedTypeVariables+#endif  -- | Abbreviation for set of integers. For convenience only in monomorphising the properties. type SI = SSet Integer
Documentation/SBV/Examples/Optimization/ExtField.hs view
@@ -9,15 +9,18 @@ -- Demonstrates the extension field (@oo@/@epsilon@) optimization results. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.Optimization.ExtField where  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | Optimization goals where min/max values might require assignments -- to values that are infinite (integer case), or infinite/epsilon (real case).
Documentation/SBV/Examples/Optimization/LinearOpt.hs view
@@ -9,15 +9,19 @@ -- Simple linear optimization example, as found in operations research texts. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.Optimization.LinearOpt where  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | Taken from <http://people.brunel.ac.uk/~mastjjb/jeb/or/morelp.html> --
Documentation/SBV/Examples/Optimization/Production.hs view
@@ -9,15 +9,19 @@ -- Solves a simple linear optimization problem ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.Optimization.Production where  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | Taken from <http://people.brunel.ac.uk/~mastjjb/jeb/or/morelp.html> --
Documentation/SBV/Examples/Optimization/VM.hs view
@@ -9,15 +9,19 @@ -- Solves a VM allocation problem using optimization features ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.Optimization.VM where  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | Computer allocation problem: --
Documentation/SBV/Examples/ProofTools/AddHorn.hs view
@@ -24,6 +24,7 @@ -- indeed is a sufficient invariant to establish correctness. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP       #-} {-# LANGUAGE DataKinds #-}  {-# OPTIONS_GHC -Wall -Werror #-}@@ -32,9 +33,11 @@  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | Helper type synonym for the invariant. type Inv = (SInteger, SInteger, SInteger, SInteger) -> SBool
Documentation/SBV/Examples/ProofTools/BMC.hs view
@@ -22,6 +22,7 @@ {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE TypeFamilies          #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -29,13 +30,11 @@  import Data.SBV import Data.SBV.Tools.BMC-import Data.SBV.Control  -- * System state  -- | System state, containing the two integers.-data S a = S { x :: a, y :: a }-         deriving (Functor, Foldable, Traversable)+data S a = S { x :: a, y :: a } deriving (Traversable, Functor, Foldable)  -- | Show the state as a pair instance Show a => Show (S a) where@@ -45,15 +44,16 @@ instance EqSymbolic a => EqSymbolic (S a) where    S {x = x1, y = y1} .== S {x = x2, y = y2} = x1 .== x2 .&& y1 .== y2 --- | 'Fresh' instance for our state-instance Fresh IO (S SInteger) where-  fresh = S <$> freshVar_ <*> freshVar_+-- | 'Queriable instance for our state+instance Queriable IO (S SInteger) where+  type QueryResult (S SInteger) = S Integer+  create = S <$> freshVar_ <*> freshVar_  -- * Encoding the problem  -- | We parameterize over the initial state for different variations. problem :: Int -> (S SInteger -> SBool) -> IO (Either String (Int, [S Integer]))-problem lim initial = bmc (Just lim) True setup initial trans goal+problem lim initial = bmcCover (Just lim) True setup initial trans goal   where         -- This is where we would put solver options, typically via         -- calls to 'Data.SBV.setOption'. We do not need any for this problem,@@ -63,10 +63,10 @@          -- Transition relation: At each step we either         -- get to increase @x@ by 2, or decrement @y@ by 4:-        trans :: S SInteger -> [S SInteger]-        trans S{x, y} = [ S { x = x + 2, y = y     }-                        , S { x = x,     y = y - 4 }-                        ]+        trans :: S SInteger -> S SInteger -> SBool+        trans S{x, y} next = next `sElem` [ S { x = x + 2, y = y     }+                                          , S { x = x,     y = y - 4 }+                                          ]          -- Goal state is when @x@ equals @y@:         goal :: S SInteger -> SBool@@ -77,11 +77,11 @@ -- | Example 1: We start from @x=0@, @y=10@, and search up to depth @10@. We have: -- -- >>> ex1--- BMC: Iteration: 0--- BMC: Iteration: 1--- BMC: Iteration: 2--- BMC: Iteration: 3--- BMC: Solution found at iteration 3+-- BMC Cover: Iteration: 0+-- BMC Cover: Iteration: 1+-- BMC Cover: Iteration: 2+-- BMC Cover: Iteration: 3+-- BMC Cover: Satisfying state found at iteration 3 -- Right (3,[(0,10),(0,6),(0,2),(2,2)]) -- -- As expected, there's a solution in this case. Furthermore, since the BMC engine@@ -97,17 +97,17 @@ -- | Example 2: We start from @x=0@, @y=11@, and search up to depth @10@. We have: -- -- >>> ex2--- BMC: Iteration: 0--- BMC: Iteration: 1--- BMC: Iteration: 2--- BMC: Iteration: 3--- BMC: Iteration: 4--- BMC: Iteration: 5--- BMC: Iteration: 6--- BMC: Iteration: 7--- BMC: Iteration: 8--- BMC: Iteration: 9--- Left "BMC limit of 10 reached"+-- BMC Cover: Iteration: 0+-- BMC Cover: Iteration: 1+-- BMC Cover: Iteration: 2+-- BMC Cover: Iteration: 3+-- BMC Cover: Iteration: 4+-- BMC Cover: Iteration: 5+-- BMC Cover: Iteration: 6+-- BMC Cover: Iteration: 7+-- BMC Cover: Iteration: 8+-- BMC Cover: Iteration: 9+-- Left "BMC Cover limit of 10 reached. Cover can't be established." -- -- As expected, there's no solution in this case. While SBV (and BMC) cannot establish -- that there is no solution at a larger depth, you can see that this will never be the
Documentation/SBV/Examples/ProofTools/Fibonacci.hs view
@@ -22,12 +22,11 @@ -- uninterpreted function. ----------------------------------------------------------------------------- -{-# LANGUAGE DeriveAnyClass        #-}-{-# LANGUAGE DeriveGeneric         #-} {-# LANGUAGE DeriveTraversable     #-} {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE TypeFamilies          #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -35,20 +34,17 @@  import Data.SBV import Data.SBV.Tools.Induction-import Data.SBV.Control -import GHC.Generics hiding (S)- -- * System state  -- | System state. We simply have two components, parameterized -- over the type so we can put in both concrete and symbolic values.-data S a = S { i :: a, k :: a, m :: a, n :: a }-         deriving (Show, Mergeable, Generic, Functor, Foldable, Traversable)+data S a = S { i :: a, k :: a, m :: a, n :: a } deriving (Show, Traversable, Functor, Foldable) --- | 'Fresh' instance for our state-instance Fresh IO (S SInteger) where-   fresh = S <$> freshVar_ <*> freshVar_ <*> freshVar_ <*> freshVar_+-- | 'Queriable instance for our state+instance Queriable IO (S SInteger) where+  type QueryResult (S SInteger) = S Integer+  create = S <$> freshVar_ <*> freshVar_ <*> freshVar_ <*> freshVar_  -- | Encoding partial correctness of the sum algorithm. We have: --@@ -81,11 +77,10 @@         initial S{i, k, m, n} = i .== 0 .&& k .== 1 .&& m .== 0 .&& n .>= 0          -- We code the algorithm almost literally in SBV notation:-        trans :: S SInteger -> [S SInteger]-        trans st@S{i, k, m, n} = [ite (i .< n)-                                      st { i = i + 1, k = m + k, m = k }-                                      st-                                 ]+        trans :: S SInteger -> S SInteger -> SBool+        trans S{i, k, m, n} S{i = i', k = k', m = m', n = n'} = (i', k', m', n') .== ite (i .< n)+                                                                                         (i+1, m+k, k, n)+                                                                                         (i,   k,   m, n)          -- No strengthenings needed for this problem!         strengthenings :: [(String, S SInteger -> SBool)]
Documentation/SBV/Examples/ProofTools/Strengthen.hs view
@@ -33,6 +33,7 @@ {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE TypeFamilies          #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -40,24 +41,23 @@  import Data.SBV import Data.SBV.Tools.Induction-import Data.SBV.Control  -- * System state  -- | System state. We simply have two components, parameterized -- over the type so we can put in both concrete and symbolic values.-data S a = S { x :: a, y :: a }-         deriving (Show, Functor, Foldable, Traversable)+data S a = S { x :: a, y :: a } deriving (Show, Traversable, Functor, Foldable) --- | 'Fresh' instance for our state-instance Fresh IO (S SInteger) where-  fresh = S <$> freshVar_ <*> freshVar_+-- | 'Queriable instance for our state+instance Queriable IO (S SInteger) where+  type QueryResult (S SInteger) = S Integer+  create = S <$> freshVar_ <*> freshVar_  -- * Encoding the problem  -- | We parameterize over the transition relation and the strengthenings to -- investigate various combinations.-problem :: (S SInteger -> [S SInteger]) -> [(String, S SInteger -> SBool)] -> IO (InductionResult (S Integer))+problem :: (S SInteger -> S SInteger -> SBool) -> [(String, S SInteger -> SBool)] -> IO (InductionResult (S Integer)) problem trans strengthenings = induct chatty setup initial trans strengthenings inv goal   where -- Set this to True for SBV to print steps as it proceeds         -- through the inductive proof@@ -83,12 +83,12 @@         goal _ = (sTrue, sTrue)  -- | The first program, coded as a transition relation:-pgm1 :: S SInteger -> [S SInteger]-pgm1 S{x, y} = [S{x = x+1, y = y+x}]+pgm1 :: S SInteger -> S SInteger -> SBool+pgm1 S{x, y} S{x = x', y = y'} = x' .== x+1 .&& y' .== y+x  -- | The second program, coded as a transition relation:-pgm2 :: S SInteger -> [S SInteger]-pgm2 S{x, y} = [S{x = x+y, y = y+x}]+pgm2 :: S SInteger -> S SInteger -> SBool+pgm2 S{x, y} S{x = x', y = y'} = x' .== x+y .&& y' .== y+x  -- * Examples @@ -97,7 +97,7 @@ -- >>> ex1 -- Failed while establishing consecution. -- Counter-example to inductiveness:---   S {x = -1, y = 1}+--   (S {x = -1, y = 1},S {x = 0, y = 0}) ex1 :: IO (InductionResult (S Integer)) ex1 = problem pgm1 strengthenings   where strengthenings :: [(String, S SInteger -> SBool)]@@ -117,7 +117,7 @@ -- >>> ex3 -- Failed while establishing consecution. -- Counter-example to inductiveness:---   S {x = -1, y = 1}+--   (S {x = -1, y = 1},S {x = 0, y = 0}) ex3 :: IO (InductionResult (S Integer)) ex3 = problem pgm2 strengthenings   where strengthenings :: [(String, S SInteger -> SBool)]@@ -128,7 +128,7 @@ -- >>> ex4 -- Failed while establishing consecution for strengthening "x >= 0". -- Counter-example to inductiveness:---   S {x = 0, y = -1}+--   (S {x = 0, y = -1},S {x = -1, y = -1}) ex4 :: IO (InductionResult (S Integer)) ex4 = problem pgm2 strengthenings   where strengthenings :: [(String, S SInteger -> SBool)]@@ -139,7 +139,7 @@ -- >>> ex5 -- Failed while establishing consecution for strengthening "x >= 0". -- Counter-example to inductiveness:---   S {x = 0, y = -1}+--   (S {x = 0, y = -1},S {x = -1, y = -1}) -- -- Note how this was sufficient in 'ex2' to establish the invariant for the first -- program, but fails for the second.
Documentation/SBV/Examples/ProofTools/Sum.hs view
@@ -21,12 +21,11 @@ -- @s@ is the sum of all numbers up to and including @n@ upon termination. ----------------------------------------------------------------------------- -{-# LANGUAGE DeriveAnyClass        #-}-{-# LANGUAGE DeriveGeneric         #-} {-# LANGUAGE DeriveTraversable     #-} {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE TypeFamilies          #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -34,19 +33,17 @@  import Data.SBV import Data.SBV.Tools.Induction-import Data.SBV.Control -import GHC.Generics hiding (S)- -- * System state  -- | System state. We simply have two components, parameterized -- over the type so we can put in both concrete and symbolic values.-data S a = S { s :: a, i :: a, n :: a } deriving (Show, Mergeable, Generic, Functor, Foldable, Traversable)+data S a = S { s :: a, i :: a, n :: a } deriving (Show, Traversable, Functor, Foldable) --- | 'Fresh' instance for our state-instance Fresh IO (S SInteger) where-  fresh  = S <$> freshVar_  <*> freshVar_  <*> freshVar_+-- | 'Queriable instance for our state+instance Queriable IO (S SInteger) where+  type QueryResult (S SInteger) = S Integer+  create = S <$> freshVar_ <*> freshVar_ <*> freshVar_  -- | Encoding partial correctness of the sum algorithm. We have: --@@ -70,11 +67,10 @@         initial S{s, i, n} = s .== 0 .&& i .== 0 .&& n .>= 0          -- We code the algorithm almost literally in SBV notation:-        trans :: S SInteger -> [S SInteger]-        trans st@S{s, i, n} = [ite (i .<= n)-                                   st { s = s+i, i = i+1 }-                                   st-                              ]+        trans :: S SInteger -> S SInteger -> SBool+        trans S{s, i, n} S{s = s', i = i', n = n'} = (s', i', n') .== ite (i .<= n)+                                                                          (s+i, i+1, n)+                                                                          (s  , i  , n)          -- No strengthenings needed for this problem!         strengthenings :: [(String, S SInteger -> SBool)]
+ Documentation/SBV/Examples/Puzzles/DieHard.hs view
@@ -0,0 +1,114 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.Puzzles.DieHard+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Solves the die-hard riddle: In the movie Die Hard 3, the heroes must obtain+-- exactly 4 gallons of water using a 5 gallon jug, a 3 gallon jug, and a water faucet.+-- We use a bounded-model-checking style search to find a solution.+-----------------------------------------------------------------------------++{-# LANGUAGE DeriveAnyClass        #-}+{-# LANGUAGE DeriveDataTypeable    #-}+{-# LANGUAGE FlexibleInstances     #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE StandaloneDeriving    #-}+{-# LANGUAGE OverloadedRecordDot   #-}+{-# LANGUAGE TemplateHaskell       #-}+{-# LANGUAGE TypeFamilies          #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.Puzzles.DieHard where++import Data.SBV+import Data.SBV.Tools.BMC++-- | Possible actions+data Action = Initial | FillBig | FillSmall | EmptyBig | EmptySmall | BigToSmall | SmallToBig++mkSymbolicEnumeration ''Action++-- | We represent the state with two quantities, the amount of water in each jug. The+-- action is how we got into this state.+data State a b = State { big    :: a+                       , small  :: a+                       , action :: b+                       }++-- | Show instance+instance (Show a, Show b) => Show (State a b) where+  show s = "Big: " ++ show s.big ++ ", Small: " ++ show s.small ++ " (" ++ show s.action ++ ")"++-- | Fully symbolic state+type SState = State SInteger SAction++-- | Fully concrete state+type CState = State Integer Action++-- | 'Queriable' instance needed for running bmc+instance Queriable IO SState where+  type QueryResult SState = CState++  create                = State <$> freshVar_ <*> freshVar_ <*> freshVar_+  project (State b s a) = State <$> project b <*> project s <*> project a+  embed   (State b s a) = State <$> embed   b <*> embed   s <*> embed   a++-- | Solve the problem using a BMC search. We have:+--+-- >>> dieHard+-- BMC Cover: Iteration: 0+-- BMC Cover: Iteration: 1+-- BMC Cover: Iteration: 2+-- BMC Cover: Iteration: 3+-- BMC Cover: Iteration: 4+-- BMC Cover: Iteration: 5+-- BMC Cover: Iteration: 6+-- BMC Cover: Satisfying state found at iteration 6+-- Big: 0, Small: 0 (Initial)+-- Big: 5, Small: 0 (FillBig)+-- Big: 2, Small: 3 (BigToSmall)+-- Big: 2, Small: 0 (EmptySmall)+-- Big: 0, Small: 2 (BigToSmall)+-- Big: 5, Small: 2 (FillBig)+-- Big: 4, Small: 3 (BigToSmall)+dieHard :: IO ()+dieHard = display =<< bmcCover Nothing True (pure ()) initial trans goal+  where -- we start from empty jugs, and try to reach a state where big has 4 gallons+        initial State{big, small, action} = (big, small, action) .== (0, 0, sInitial)+        goal    State{big}                = big .== 4++        -- Valid actions as a transition relation:+        trans :: SState -> SState -> SBool+        trans fromState toState = go actions+          where go []                = sFalse+                go ((act, f) : rest) = ite (toState.action .== act) (f fromState `matches` toState) (go rest)++                matches :: SState -> SState -> SBool+                p `matches` q = p.big .== q.big .&& p.small .== q.small++                infix 1 |=>+                a |=> f = (a, f)++                actions = [ sFillBig    |=> \st -> st{big   = 5}+                          , sFillSmall  |=> \st -> st{small = 3}++                          , sEmptyBig   |=> \st -> st{big   = 0}+                          , sEmptySmall |=> \st -> st{small = 0}++                          , sBigToSmall |=> \st -> let space = 3 - st.small+                                                       xfer  = space `smin` st.big+                                                   in st{big = st.big - xfer, small = st.small + xfer}++                          , sSmallToBig |=> \st -> let space = 5 - st.big+                                                       xfer  = space `smin` st.small+                                                   in st{big = st.big + xfer, small = st.small - xfer}+                          ]++        display :: Either String (Int, [CState]) -> IO ()+        display (Left e)        = error e+        display (Right (_, as)) = mapM_ print as
Documentation/SBV/Examples/Puzzles/HexPuzzle.hs view
@@ -83,8 +83,9 @@ -- | Iteratively search at increasing depths of button-presses to see if we can -- transform from the initial board position to a final board position. search :: [Color] -> [Color] -> IO ()-search initial final = runSMT $ do emptyGrid :: Grid <- newArray "emptyGrid" (Just sBlack)-                                   let initGrid = foldr (\(i, c) a -> writeArray a (literal i) (literal c)) emptyGrid (zip [1..] initial)+search initial final = runSMT $ do registerUISMTFunction (uninterpret "unused_" :: SColor -> SColor)+                                   let emptyGrid = lambdaArray (const sBlack)+                                       initGrid  = foldr (\(i, c) a -> writeArray a (literal i) (literal c)) emptyGrid (zip [1..] initial)                                    query $ loop (0 :: Int) initGrid []    where loop i g sofar = do io $ putStrLn $ "Searching at depth: " ++ show i@@ -130,8 +131,8 @@ -- Searching at depth: 4 -- Searching at depth: 5 -- Searching at depth: 6--- Found: [10,10,11,9,14,6] -- Found: [10,10,9,11,14,6]+-- Found: [10,10,11,9,14,6] -- There are no more solutions. example :: IO () example = search initBoard finalBoard
Documentation/SBV/Examples/Puzzles/Murder.hs view
@@ -26,6 +26,7 @@ {-# LANGUAGE NamedFieldPuns     #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell    #-}+ {-# OPTIONS_GHC -Wall -Werror   #-}  module Documentation.SBV.Examples.Puzzles.Murder where
Documentation/SBV/Examples/Puzzles/Orangutans.hs view
@@ -9,6 +9,7 @@ -- Based on <http://github.com/goldfirere/video-resources/blob/main/2022-08-12-java/Haskell.hs> ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                 #-} {-# LANGUAGE DeriveAnyClass      #-} {-# LANGUAGE DeriveDataTypeable  #-} {-# LANGUAGE DeriveGeneric       #-}@@ -24,9 +25,11 @@ import Data.SBV import GHC.Generics (Generic) +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | Orangutans in the puzzle. data Orangutan = Merah   | Ofallo  | Quirrel  | Shamir   deriving (Enum, Bounded)
Documentation/SBV/Examples/Puzzles/Sudoku.hs view
@@ -175,8 +175,7 @@           , [ 0, 2, 0,   6, 0, 0,   3, 5, 0]           , [ 0, 5, 4,   0, 0, 8,   0, 7, 0] ] --- | The following is nefarious according to--- <http://haskell.org/haskellwiki/Sudoku>+-- | Another example puzzle6 :: Puzzle puzzle6 = [ [0, 0, 0,   0, 6, 0,   0, 8, 0]           , [0, 2, 0,   0, 0, 0,   0, 0, 0]
Documentation/SBV/Examples/Queries/CaseSplit.hs view
@@ -52,7 +52,7 @@                                         ]                    case mbR of-                    Nothing     -> error "Cannot find a FP number x such that x == x + 1"  -- Won't happen!+                    Nothing     -> error "Cannot find a FP number x such that x /= x"  -- Won't happen!                     Just (s, _) -> do xv <- getValue x                                       return (s, xv) 
Documentation/SBV/Examples/Queries/Interpolants.hs view
@@ -14,6 +14,8 @@ -- to demonstrate the usage. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.Queries.Interpolants where@@ -21,10 +23,12 @@ import Data.SBV import Data.SBV.Control +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV -- >>> import Data.SBV.Control+#endif  -- | MathSAT example. Compute the interpolant for the following sets of formulas: --
Documentation/SBV/Examples/Strings/SQLInjection.hs view
@@ -138,7 +138,7 @@      -- Create an initial environment that returns the symbolic     -- value my_topicid only, and unspecified for all other variables-    emptyEnv :: SArray String String <- newArray "emptyEnv" Nothing+    emptyEnv :: SArray String String <- sArray "emptyEnv"      let env = writeArray emptyEnv "my_topicid" badTopic 
Documentation/SBV/Examples/Transformers/SymbolicEval.hs view
@@ -30,6 +30,8 @@  module Documentation.SBV.Examples.Transformers.SymbolicEval where +import Data.SBV (getValue)+ import Control.Monad.Except   (Except, ExceptT, MonadError, mapExceptT, runExceptT, throwError) import Control.Monad.Identity (Identity(runIdentity)) import Control.Monad.IO.Class (MonadIO)
Documentation/SBV/Examples/Uninterpreted/AUF.hs view
@@ -6,7 +6,7 @@ -- Maintainer: erkokl@gmail.com -- Stability : experimental ----- Formalizes and proves the following theorem, about arithmetic,+-- Formalizes and proves the following theorem about arithmetic, -- uninterpreted functions, and arrays. (For reference, see <http://research.microsoft.com/en-us/um/redmond/projects/z3/fmcad06-slides.pdf> -- slide number 24): --@@ -27,6 +27,7 @@ -- The function @read@ and @write@ are usual array operations. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                 #-} {-# LANGUAGE ScopedTypeVariables #-}  {-# OPTIONS_GHC -Wall -Werror #-}@@ -35,30 +36,22 @@  import Data.SBV ------------------------------------------------------------------ * Model using functional arrays---------------------------------------------------------------+#ifndef HADDOCK+-- $setup+-- >>> -- For doctest purposes only:+-- >>> import Data.SBV+#endif  -- | Uninterpreted function in the theorem f :: SWord32 -> SWord64 f = uninterpret "f" --- | Correctness theorem. We state it for all values of @x@, @y@, and--- the given array @a@. Note that we're being generic in the type of--- array we're expecting.-thm :: SymArray a => SWord32 -> SWord32 -> a Word32 Word32 -> SBool+-- | Correctness theorem. We state it for all values of @x@, @y@, and the given array @a@. We have:+--+-- >>> prove thm+-- Q.E.D.+thm :: SWord32 -> SWord32 -> SArray Word32 Word32 -> SBool thm x y a = lhs .=> rhs   where lhs = x + 2 .== y         rhs =     f (readArray (writeArray a x 3) (y - 2))               .== f (y - x + 1)---- | Prove it using SMT-Lib arrays.------ >>> proveSArray--- Q.E.D.-proveSArray :: IO ThmResult-proveSArray = prove $ do-                x <- free "x"-                y <- free "y"-                a :: SArray Word32 Word32 <- newArray_ Nothing-                return $ thm x y a
Documentation/SBV/Examples/Uninterpreted/Function.hs view
@@ -9,15 +9,19 @@ -- Demonstrates function counter-examples ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.Uninterpreted.Function where  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | An uninterpreted function f :: SWord8 -> SWord8 -> SWord16
Documentation/SBV/Examples/Uninterpreted/Multiply.hs view
@@ -10,6 +10,7 @@ -- a simple two-bit multiplier. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                 #-} {-# LANGUAGE ScopedTypeVariables #-}  {-# OPTIONS_GHC -Wall -Werror -Wno-incomplete-uni-patterns #-}@@ -18,9 +19,11 @@  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | The uninterpreted implementation of our 2x2 multiplier. We simply -- receive two 2-bit values, and return the high and the low bit of the
Documentation/SBV/Examples/Uninterpreted/Sort.hs view
@@ -39,10 +39,10 @@ -- -- >>> t1 -- Satisfiable. Model:---   x = Q!val!0 :: Q+--   x = Q_0 :: Q -- <BLANKLINE> --   f :: Q -> Q---   f _ = Q!val!1+--   f _ = Q_1 t1 :: IO SatResult t1 = sat $ do x <- free "x"               return $ f x ./= x
Documentation/SBV/Examples/Uninterpreted/UISortAllSat.hs view
@@ -10,6 +10,7 @@ -- Thanks to Eric Seidel for the idea. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                #-} {-# LANGUAGE DeriveAnyClass     #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE StandaloneDeriving #-}@@ -21,9 +22,11 @@  import Data.SBV +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- | A "list-like" data type, but one we plan to uninterpret at the SMT level. -- The actual shape is really immaterial for us.@@ -51,35 +54,35 @@ -- -- >>> allSat genLs -- Solution #1:---   l  = L!val!2 :: L---   l0 = L!val!0 :: L---   l1 = L!val!1 :: L---   l2 = L!val!2 :: L+--   l  = L_2 :: L+--   l0 = L_0 :: L+--   l1 = L_1 :: L+--   l2 = L_2 :: L -- <BLANKLINE> --   classify :: L -> Integer---   classify L!val!2 = 2---   classify L!val!1 = 1---   classify _       = 0+--   classify L_2 = 2+--   classify L_1 = 1+--   classify _   = 0 -- Solution #2:---   l  = L!val!1 :: L---   l0 = L!val!0 :: L---   l1 = L!val!1 :: L---   l2 = L!val!2 :: L+--   l  = L_1 :: L+--   l0 = L_0 :: L+--   l1 = L_1 :: L+--   l2 = L_2 :: L -- <BLANKLINE> --   classify :: L -> Integer---   classify L!val!2 = 2---   classify L!val!1 = 1---   classify _       = 0+--   classify L_2 = 2+--   classify L_1 = 1+--   classify _   = 0 -- Solution #3:---   l  = L!val!0 :: L---   l0 = L!val!0 :: L---   l1 = L!val!1 :: L---   l2 = L!val!2 :: L+--   l  = L_0 :: L+--   l0 = L_0 :: L+--   l1 = L_1 :: L+--   l2 = L_2 :: L -- <BLANKLINE> --   classify :: L -> Integer---   classify L!val!2 = 2---   classify L!val!1 = 1---   classify _       = 0+--   classify L_2 = 2+--   classify L_1 = 1+--   classify _   = 0 -- Found 3 different solutions. genLs :: Predicate genLs = do [l, l0, l1, l2] <- symbolics ["l", "l0", "l1", "l2"]
Documentation/SBV/Examples/WeakestPreconditions/Append.hs view
@@ -13,6 +13,7 @@  {-# LANGUAGE DeriveAnyClass        #-} {-# LANGUAGE DeriveGeneric         #-}+{-# LANGUAGE DeriveTraversable     #-} {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}@@ -24,7 +25,7 @@ module Documentation.SBV.Examples.WeakestPreconditions.Append where  import Data.SBV-import Data.SBV.Control+import Data.SBV.Tools.WeakestPreconditions  import Prelude hiding ((++)) import qualified Prelude as P@@ -32,43 +33,29 @@ import           Data.SBV.List ((++)) import qualified Data.SBV.List as L -import Data.SBV.Tools.WeakestPreconditions- import GHC.Generics (Generic)  -- * Program state  -- | The state of the length program, paramaterized over the element type @a@-data AppS a = AppS { xs :: SList a  -- ^ The first input list-                   , ys :: SList a  -- ^ The second input list-                   , ts :: SList a  -- ^ Temporary variable-                   , zs :: SList a  -- ^ Output+data AppS a = AppS { xs :: a  -- ^ The first input list+                   , ys :: a  -- ^ The second input list+                   , ts :: a  -- ^ Temporary variable+                   , zs :: a  -- ^ Output                    }-                   deriving (Generic, Mergeable)---- | The concrete counterpart of 'AppS'. Again, we can't simply use the duality between--- @SBV a@ and @a@ due to the difference between @SList a@ and @[a]@.-data AppC a = AppC [a] [a] [a] [a]---- | Show instance for 'AppS'. The above deriving clause would work just as well,--- but we want it to be a little prettier here, and hence the @OVERLAPS@ directive.-instance {-# OVERLAPS #-} (SymVal a, Show a) => Show (AppS a) where-  show (AppS xs ys ts zs) = "{xs = " P.++ sh xs P.++ ", ys = " P.++ sh ys P.++ ", ts = " P.++ sh ts P.++ ", zs = " P.++ sh zs P.++ "}"-    where sh v = maybe "<symbolic>" show (unliteral v)+                   deriving (Generic, Mergeable, Traversable, Functor, Foldable)  -- | Show instance, a bit more prettier than what would be derived:-instance Show a => Show (AppC a) where-  show (AppC xs ys ts zs) = "{xs = " P.++ show xs P.++ ", ys = " P.++ show ys P.++ ", ts = " P.++ show ts P.++ ", zs = " P.++ show zs P.++ "}"+instance Show (f a) => Show (AppS (f a)) where+  show AppS{xs, ys, ts, zs} = "{xs = " P.++ show xs P.++ ", ys = " P.++ show ys P.++ ", ts = " P.++ show ts P.++ ", zs = " P.++ show zs P.++ "}"  -- | 'Queriable' instance for the program state-instance Queriable IO (AppS Integer) where-  type QueryResult (AppS Integer) = AppC Integer-  create                     = AppS <$> freshVar_   <*> freshVar_   <*> freshVar_   <*> freshVar_-  project (AppS xs ys ts zs) = AppC <$> getValue xs <*> getValue ys <*> getValue ts <*> getValue zs-  embed   (AppC xs ys ts zs) = return $ AppS (literal xs) (literal ys) (literal ts) (literal zs)+instance Queriable IO (AppS (SList Integer)) where+  type QueryResult (AppS (SList Integer)) = AppS [Integer]+  create = AppS <$> freshVar_  <*> freshVar_  <*> freshVar_  <*> freshVar_  -- | Helper type synonym-type A = AppS Integer+type A = AppS (SList Integer)  -- * The algorithm @@ -122,5 +109,5 @@ -- >>> correctness -- Total correctness is established. -- Q.E.D.-correctness :: IO (ProofResult (AppC Integer))+correctness :: IO (ProofResult (AppS [Integer])) correctness = wpProveWith defaultWPCfg{wpVerbose=True} imperativeAppend
Documentation/SBV/Examples/WeakestPreconditions/Basics.hs view
@@ -11,29 +11,31 @@ -- an example. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                   #-} {-# LANGUAGE DeriveAnyClass        #-} {-# LANGUAGE DeriveGeneric         #-} {-# LANGUAGE DeriveTraversable     #-} {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE TypeFamilies          #-}  {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.WeakestPreconditions.Basics where  import Data.SBV-import Data.SBV.Control- import Data.SBV.Tools.WeakestPreconditions  import GHC.Generics (Generic) +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV -- >>> import Data.SBV.Control -- >>> import Data.SBV.Tools.WeakestPreconditions+#endif  -- * Program state @@ -41,7 +43,7 @@ data IncS a = IncS { x :: a    -- ^ Input value                    , y :: a    -- ^ Output                    }-                   deriving (Show, Generic, Mergeable, Functor, Foldable, Traversable)+                   deriving (Show, Generic, Mergeable, Traversable, Functor, Foldable)  -- | Show instance for 'IncS'. The above deriving clause would work just as well, -- but we want it to be a little prettier here, and hence the @OVERLAPS@ directive.@@ -49,9 +51,10 @@    show (IncS x y) = "{x = " ++ sh x ++ ", y = " ++ sh y ++ "}"      where sh v = maybe "<symbolic>" show (unliteral v) --- | 'Fresh' instance for the program state-instance SymVal a => Fresh IO (IncS (SBV a)) where-  fresh = IncS <$> freshVar_  <*> freshVar_+-- | 'Queriable instance for our state+instance Queriable IO (IncS SInteger) where+  type QueryResult (IncS SInteger) = IncS Integer+  create = IncS <$> freshVar_ <*> freshVar_  -- | Helper type synonym type I = IncS SInteger
Documentation/SBV/Examples/WeakestPreconditions/Fib.hs view
@@ -12,29 +12,31 @@ -- and proper axioms to complete the proof. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                   #-} {-# LANGUAGE DeriveAnyClass        #-} {-# LANGUAGE DeriveGeneric         #-} {-# LANGUAGE DeriveTraversable     #-} {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE TypeFamilies          #-}  {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.WeakestPreconditions.Fib where  import Data.SBV-import Data.SBV.Control- import Data.SBV.Tools.WeakestPreconditions  import GHC.Generics (Generic) +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV -- >>> import Data.SBV.Control -- >>> import Data.SBV.Tools.WeakestPreconditions+#endif  -- * Program state @@ -44,7 +46,7 @@                    , k :: a    -- ^ tracks @fib (i+1)@                    , m :: a    -- ^ tracks @fib i@                    }-                   deriving (Show, Generic, Mergeable, Functor, Foldable, Traversable)+                   deriving (Show, Generic, Mergeable, Traversable, Functor, Foldable)  -- | Show instance for 'FibS'. The above deriving clause would work just as well, -- but we want it to be a little prettier here, and hence the @OVERLAPS@ directive.@@ -52,9 +54,10 @@    show (FibS n i k m) = "{n = " ++ sh n ++ ", i = " ++ sh i ++ ", k = " ++ sh k ++ ", m = " ++ sh m ++ "}"      where sh v = maybe "<symbolic>" show (unliteral v) --- | 'Fresh' instance for the program state-instance SymVal a => Fresh IO (FibS (SBV a)) where-  fresh = FibS <$> freshVar_  <*> freshVar_  <*> freshVar_ <*> freshVar_+-- | 'Queriable instance for our state+instance Queriable IO (FibS SInteger) where+  type QueryResult (FibS SInteger) = FibS Integer+  create = FibS <$> freshVar_  <*> freshVar_ <*> freshVar_ <*> freshVar_  -- | Helper type synonym type F = FibS SInteger
Documentation/SBV/Examples/WeakestPreconditions/GCD.hs view
@@ -14,20 +14,20 @@ -- specifications for WP proofs. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                   #-} {-# LANGUAGE DeriveAnyClass        #-} {-# LANGUAGE DeriveGeneric         #-} {-# LANGUAGE DeriveTraversable     #-} {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE TypeFamilies          #-}  {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.WeakestPreconditions.GCD where  import Data.SBV-import Data.SBV.Control- import Data.SBV.Tools.WeakestPreconditions  import GHC.Generics (Generic)@@ -36,11 +36,13 @@ import Prelude hiding (gcd) import qualified Prelude as P (gcd) +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV -- >>> import Data.SBV.Control -- >>> import Data.SBV.Tools.WeakestPreconditions+#endif  -- * Program state @@ -50,7 +52,7 @@                    , i :: a    -- ^ Copy of x to be modified                    , j :: a    -- ^ Copy of y to be modified                    }-                   deriving (Show, Generic, Mergeable, Functor, Foldable, Traversable)+                   deriving (Show, Generic, Mergeable, Traversable, Functor, Foldable)  -- | Show instance for 'GCDS'. The above deriving clause would work just as well, -- but we want it to be a little prettier here, and hence the @OVERLAPS@ directive.@@ -58,9 +60,10 @@    show (GCDS x y i j) = "{x = " ++ sh x ++ ", y = " ++ sh y ++ ", i = " ++ sh i ++ ", j = " ++ sh j ++ "}"      where sh v = maybe "<symbolic>" show (unliteral v) --- | 'Fresh' instance for the program state-instance SymVal a => Fresh IO (GCDS (SBV a)) where-  fresh = GCDS <$> freshVar_  <*> freshVar_  <*> freshVar_ <*> freshVar_+-- | 'Queriable instance for our state+instance Queriable IO (GCDS SInteger) where+  type QueryResult (GCDS SInteger) = GCDS Integer+  create = GCDS <$> freshVar_ <*> freshVar_ <*> freshVar_ <*> freshVar_  -- | Helper type synonym type G = GCDS SInteger
Documentation/SBV/Examples/WeakestPreconditions/IntDiv.hs view
@@ -17,14 +17,13 @@ {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE TypeFamilies          #-}  {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.WeakestPreconditions.IntDiv where  import Data.SBV-import Data.SBV.Control- import Data.SBV.Tools.WeakestPreconditions  import GHC.Generics (Generic)@@ -37,7 +36,7 @@                    , q :: a   -- ^ The quotient                    , r :: a   -- ^ The remainder                    }-                   deriving (Show, Generic, Mergeable, Functor, Foldable, Traversable)+                   deriving (Show, Generic, Mergeable, Traversable, Functor, Foldable)  -- | Show instance for 'DivS'. The above deriving clause would work just as well, -- but we want it to be a little prettier here, and hence the @OVERLAPS@ directive.@@ -45,9 +44,10 @@    show (DivS x y q r) = "{x = " ++ sh x ++ ", y = " ++ sh y ++ ", q = " ++ sh q ++ ", r = " ++ sh r ++ "}"      where sh v = maybe "<symbolic>" show (unliteral v) --- | 'Fresh' instance for the program state-instance SymVal a => Fresh IO (DivS (SBV a)) where-  fresh = DivS <$> freshVar_  <*> freshVar_ <*> freshVar_ <*> freshVar_+-- | 'Queriable' instance for the program state+instance SymVal a => Queriable IO (DivS (SBV a)) where+  type QueryResult (DivS (SBV a)) = DivS a+  create = DivS <$> freshVar_  <*> freshVar_ <*> freshVar_ <*> freshVar_  -- | Helper type synonym type D = DivS SInteger
Documentation/SBV/Examples/WeakestPreconditions/IntSqrt.hs view
@@ -19,14 +19,13 @@ {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE TypeFamilies          #-}  {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.WeakestPreconditions.IntSqrt where  import Data.SBV-import Data.SBV.Control- import Data.SBV.Tools.WeakestPreconditions  import GHC.Generics (Generic)@@ -41,7 +40,7 @@                      , i    :: a   -- ^ Successive squares, as the sum of j's                      , j    :: a   -- ^ Successive odds                      }-                     deriving (Show, Generic, Mergeable, Functor, Foldable, Traversable)+                     deriving (Show, Generic, Mergeable, Traversable, Functor, Foldable)  -- | Show instance for 'SqrtS'. The above deriving clause would work just as well, -- but we want it to be a little prettier here, and hence the @OVERLAPS@ directive.@@ -49,9 +48,10 @@    show (SqrtS x sqrt i j) = "{x = " ++ sh x ++ ", sqrt = " ++ sh sqrt ++ ", i = " ++ sh i ++ ", j = " ++ sh j ++ "}"      where sh v = maybe "<symbolic>" show (unliteral v) --- | 'Fresh' instance for the program state-instance SymVal a => Fresh IO (SqrtS (SBV a)) where-  fresh = SqrtS <$> freshVar_  <*> freshVar_ <*> freshVar_ <*> freshVar_+-- | 'Queriable instance for the program state+instance SymVal a => Queriable IO (SqrtS (SBV a)) where+  type QueryResult (SqrtS (SBV a)) = SqrtS a+  create = SqrtS <$> freshVar_  <*> freshVar_ <*> freshVar_ <*> freshVar_  -- | Helper type synonym type S = SqrtS SInteger
Documentation/SBV/Examples/WeakestPreconditions/Length.hs view
@@ -23,50 +23,35 @@ module Documentation.SBV.Examples.WeakestPreconditions.Length where  import Data.SBV-import Data.SBV.Control+import Data.SBV.Tools.WeakestPreconditions  import qualified Data.SBV.List as L -import Data.SBV.Tools.WeakestPreconditions- import GHC.Generics (Generic)  -- * Program state  -- | The state of the length program, paramaterized over the element type @a@-data LenS a = LenS { xs :: SList a  -- ^ The input list-                   , ys :: SList a  -- ^ Copy of input-                   , l  :: SInteger -- ^ Running length-                   }-                   deriving (Generic, Mergeable)---- | The concrete counterpart to 'LenS'. Note that we can no longer use the duality--- between @SBV a@ and @a@ as in other examples and just use one datatype for both.--- This is because @SList a@ and @[a]@ are fundamentally different types. This can--- be a bit confusing at first, but the point is that it is the list that is symbolic--- in case of an @SList a@, not that we have a concrete list with symbolic elements--- in it. Subtle difference, but it is important to keep these two separate.-data LenC a = LenC [a] [a] Integer+data LenS a b = LenS { xs :: a  -- ^ The input list+                     , ys :: a  -- ^ Copy of input+                     , l  :: b  -- ^ Running length+                     }+                     deriving (Generic, Mergeable)  -- | Show instance: A simplified version of what would otherwise be generated.-instance (SymVal a, Show a) => Show (LenS a) where-  show (LenS xs ys l) = "{xs = " ++ sh xs ++ ", ys = " ++ sh ys ++ ", l = " ++ sh l ++ "}"-    where sh v = maybe "<symbolic>" show (unliteral v)+instance (SymVal a, Show (f a), Show b) => Show (LenS (f a) b) where+  show LenS{xs, ys, l} = "{xs = " ++ show xs ++ ", ys = " ++ show ys ++ ", l = " ++ show l ++ "}" --- | Show instance: Similarly, we want to be a bit more concise here.-instance Show a => Show (LenC a) where-  show (LenC xs ys l) = "{xs = " ++ show xs ++ ", ys = " ++ show ys ++ ", l = " ++ show l ++ "}"+-- | Injection/projection from concrete and symbolic values.+instance Queriable IO (LenS (SList Integer) SInteger) where+  type QueryResult (LenS (SList Integer) SInteger) = LenS [Integer] Integer --- | We have to write the bijection between 'LenS' and 'LenC' explicitly. Luckily, the--- definition is more or less boilerplate.-instance Queriable IO (LenS Integer) where-  type QueryResult (LenS Integer) = LenC Integer-  create                 = LenS <$> freshVar_   <*> freshVar_   <*> freshVar_-  project (LenS xs ys l) = LenC <$> getValue xs <*> getValue ys <*> getValue l-  embed   (LenC xs ys l) = return $ LenS (literal xs) (literal ys) (literal l)+  create                 = LenS <$> freshVar_  <*> freshVar_  <*> freshVar_+  project (LenS xs ys l) = LenS <$> project xs <*> project ys <*> project l+  embed   (LenS xs ys l) = LenS <$> embed   xs <*> embed   ys <*> embed   l  -- | Helper type synonym-type S = LenS Integer+type S = LenS (SList Integer) SInteger  -- * The algorithm 
Documentation/SBV/Examples/WeakestPreconditions/Sum.hs view
@@ -11,27 +11,29 @@ -- different versions lead to proofs and failures. ----------------------------------------------------------------------------- +{-# LANGUAGE CPP                   #-} {-# LANGUAGE DeriveAnyClass        #-} {-# LANGUAGE DeriveGeneric         #-} {-# LANGUAGE DeriveTraversable     #-} {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE TypeFamilies          #-}  {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.WeakestPreconditions.Sum where  import Data.SBV-import Data.SBV.Control- import Data.SBV.Tools.WeakestPreconditions  import GHC.Generics (Generic) +#ifndef HADDOCK -- $setup -- >>> -- For doctest purposes only: -- >>> import Data.SBV+#endif  -- * Program state @@ -40,7 +42,7 @@                    , i :: a    -- ^ Loop counter                    , s :: a    -- ^ Running sum                    }-                   deriving (Show, Generic, Mergeable, Functor, Foldable, Traversable)+                   deriving (Show, Generic, Mergeable, Traversable, Functor, Foldable)  -- | Show instance for 'SumS'. The above deriving clause would work just as well, -- but we want it to be a little prettier here, and hence the @OVERLAPS@ directive.@@ -48,9 +50,10 @@    show (SumS n i s) = "{n = " ++ sh n ++ ", i = " ++ sh i ++ ", s = " ++ sh s ++ "}"      where sh v = maybe "<symbolic>" show (unliteral v) --- | 'Fresh' instance for the program state-instance SymVal a => Fresh IO (SumS (SBV a)) where-  fresh = SumS <$> freshVar_  <*> freshVar_  <*> freshVar_+-- | 'Queriable instance for our state+instance Queriable IO (SumS SInteger) where+  type QueryResult (SumS SInteger) = SumS Integer+  create = SumS <$> freshVar_ <*> freshVar_ <*> freshVar_  -- | Helper type synonym type S = SumS SInteger@@ -234,18 +237,14 @@ >>> let invariant SumS{n, i, s} = s .== (i*(i+1)) `sDiv` 2 .&& i .<= n >>> let measure   SumS{n, i}    = [n + i] >>> void $ correctness invariant (Just measure)-Following proof obligations failed:-===================================-  Measure for loop "i < n" is negative:-    State  : SumS {n = -1, i = -2, s = 1}-    Measure: -3+Following proof obligation failed:+==================================   Measure for loop "i < n" does not decrease:-    Before : SumS {n = -1, i = -2, s = 1}-    Measure: -3-    After  : SumS {n = -1, i = -1, s = 0}-    Measure: -2+    Before : SumS {n = 1, i = 0, s = 0}+    Measure: 1+    After  : SumS {n = 1, i = 1, s = 1}+    Measure: 2 -Clearly, as @i@ increases, so does our bogus measure @n+i@. Note that in this case the counterexample has-@i@ and @n@ as a negative value, as the SMT solver finds a counter-example to induction, not-necessarily a reachable state. Obviously, all such failures need to be addressed for the full proof.+Clearly, as @i@ increases, so does our bogus measure @n+i@. (Note that in this case the counterexample might have @i@ and @n@ as negative values, as the SMT solver finds a counter-example to induction, not+necessarily a reachable state. Obviously, all such failures need to be addressed for the full proof.) -}
SBVBenchSuite/BenchSuite/ProofTools/Sum.hs view
@@ -25,5 +25,5 @@ benchmarks :: Runner benchmarks = runIO "Sum.Correctness" sumCorrect -instance NFData a => NFData (S a)+instance NFData a => NFData (S a) where rnf a = seq a () instance NFData a => NFData (InductionResult a) where rnf a = seq a ()
SBVBenchSuite/BenchSuite/Uninterpreted/AUF.hs view
@@ -26,5 +26,5 @@   ]   where array = do x <- free "x"                    y <- free "y"-                   a :: SArray Word32 Word32 <- newArray_ Nothing+                   a :: SArray Word32 Word32 <- sArray_                    return $ thm x y a
SBVBenchSuite/BenchSuite/WeakestPreconditions/Append.hs view
@@ -22,7 +22,7 @@   -- | orphaned instance for benchmarks-instance NFData a => NFData (AppC a) where rnf x = seq x ()+instance NFData a => NFData (AppS a) where rnf x = seq x ()  benchmarks :: Runner benchmarks = runIO "Correctness.Append" correctness
SBVBenchSuite/BenchSuite/WeakestPreconditions/Length.hs view
@@ -16,12 +16,8 @@  import Documentation.SBV.Examples.WeakestPreconditions.Length -import Control.DeepSeq import BenchSuite.Bench.Bench import BenchSuite.WeakestPreconditions.Instances()--instance NFData a => NFData (LenS a)-  benchmarks :: Runner benchmarks = runIO "Correctness.Length" correctness
SBVTestSuite/GoldFiles/allSat1.gold view
@@ -1,4 +1,4 @@ Solution #1:-  x = Q!val!0 :: Q-  y = Q!val!0 :: Q+  x = Q_0 :: Q+  y = Q_0 :: Q This is the only solution.
SBVTestSuite/GoldFiles/allSat2.gold view
@@ -1,9 +1,9 @@ Solution #1:-  x = Q!val!0 :: Q-  y = Q!val!0 :: Q-  z = Q!val!1 :: Q+  x = Q_0 :: Q+  y = Q_0 :: Q+  z = Q_1 :: Q Solution #2:-  x = Q!val!0 :: Q-  y = Q!val!0 :: Q-  z = Q!val!0 :: Q+  x = Q_0 :: Q+  y = Q_0 :: Q+  z = Q_0 :: Q Found 2 different solutions.
SBVTestSuite/GoldFiles/allSat6.gold view
@@ -1,10 +1,10 @@ Solution #1:-  x = 1 :: Word8-  y = 2 :: Word8-Solution #2:   x = 0 :: Word8   y = 2 :: Word8-Solution #3:+Solution #2:   x = 0 :: Word8   y = 1 :: Word8+Solution #3:+  x = 1 :: Word8+  y = 2 :: Word8 Found 3 different solutions.
SBVTestSuite/GoldFiles/allSat7.gold view
@@ -18,7 +18,6 @@ [GOOD] (declare-fun s2 () Int) ; tracks user variable "z" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -32,8 +31,6 @@ [GOOD] (define-fun s12 () Bool (<= s2 s5)) [GOOD] (define-fun s13 () Bool (and s11 s12)) [GOOD] (define-fun s14 () Bool (distinct s0 s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s7)
SBVTestSuite/GoldFiles/allSat8.gold view
@@ -13,19 +13,16 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun f (Int) Int) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int))-         (let ((l1_s2 1))-         (let ((l1_s1 (f l1_s0)))-         (let ((l1_s3 (+ l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 1))+                                 (let ((l1_s1 (f l1_s0)))+                                 (let ((l1_s3 (+ l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)@@ -63,4 +60,4 @@ *** NB. If this is a use case you'd like SBV to support, please get in touch!  CallStack (from HasCallStack):-  error, called at ./Data/SBV/Control/Utils.hs:1660:57 in sbv-10.12-inplace:Data.SBV.Control.Utils+  error, called at ./Data/SBV/Control/Utils.hs:1647:57 in sbv-11.0-inplace:Data.SBV.Control.Utils
SBVTestSuite/GoldFiles/arrayGetValTest1.gold view
@@ -5,38 +5,31 @@ [GOOD] (set-option :smtlib2_compliant true) [GOOD] (set-option :diagnostic-output-channel "stdout") [GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      ) [GOOD] (set-logic ALL) ; has unbounded values, using catch-all. [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array Int Int)) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays ----[GOOD] (declare-fun array_0 () (Array Int Int)) [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat-[GOOD] (define-fun s0 () Int 1)-[GOOD] (define-fun s1 () Int 2)-[GOOD] (declare-fun array_1 () (Array Int Int))-[GOOD] (define-fun array_1_initializer_0 () Bool (= array_1 (store array_0 s0 s1)))-[GOOD] (define-fun s2 () Int (select array_1 s0))-[GOOD] (define-fun array_1_initializer () Bool array_1_initializer_0)-[GOOD] (assert array_1_initializer)-[NOTE] getValue: There are outstanding asserts. Ensuring we're still sat.-[SEND] (check-sat)-[RECV] sat-[SEND] (get-value (s2))-[RECV] ((s2 2))+[GOOD] (define-fun s1 () Int 1)+[GOOD] (define-fun s2 () Int 2)+[GOOD] (define-fun s3 () (Array Int Int) (store s0 s1 s2))+[GOOD] (define-fun s4 () Int (select s3 s1))+[SEND] (get-value (s4))+[RECV] ((s4 2)) *** Solver   : Z3 *** Exit code: ExitSuccess 
SBVTestSuite/GoldFiles/array_caching_01.gold view
@@ -5,52 +5,43 @@ [GOOD] (set-option :smtlib2_compliant true) [GOOD] (set-option :diagnostic-output-channel "stdout") [GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      ) [GOOD] (set-logic ALL) ; has unbounded values, using catch-all. [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s0 () Int 0)-[GOOD] (define-fun s3 () Int 2)-[GOOD] (define-fun s4 () Int 1)+[GOOD] (define-fun s1 () Int 0)+[GOOD] (define-fun s4 () Int 2)+[GOOD] (define-fun s6 () Int 1) [GOOD] ; --- top level inputs ----[GOOD] (declare-fun s1 () Int) ; tracks user variable "x"+[GOOD] (declare-fun s0 () Int) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays ----[GOOD] (define-fun array_0 () (Array Int Int) ((as const (Array Int Int)) 0))-[GOOD] (declare-fun array_1 () (Array Int Int))-[GOOD] (define-fun array_1_initializer_0 () Bool (= array_1 (store array_0 s0 s3)))-[GOOD] (declare-fun array_2 () (Array Int Int))-[GOOD] (declare-fun array_3 () (Array Int Int)) [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] (define-fun s5 () Int (+ s1 s4))-[GOOD] (define-fun s6 () Int (select array_1 s5))-[GOOD] (define-fun s7 () Int (select array_2 s0))-[GOOD] (define-fun s8 () Int (select array_3 s0))-[GOOD] (define-fun s9 () Int (ite s2 s7 s8))-[GOOD] (define-fun s10 () Bool (= s4 s9))-[GOOD] ; --- arrayDelayeds ----[GOOD] (define-fun array_2_initializer_0 () Bool (= array_2 (store array_1 s0 s6)))-[GOOD] (define-fun array_3_initializer_0 () Bool (= array_3 (store array_1 s5 s4)))-[GOOD] ; --- arraySetups ----[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed-[GOOD] (define-fun array_1_initializer () Bool array_1_initializer_0)-[GOOD] (assert array_1_initializer)-[GOOD] (define-fun array_2_initializer () Bool array_2_initializer_0)-[GOOD] (assert array_2_initializer)-[GOOD] (define-fun array_3_initializer () Bool array_3_initializer_0)-[GOOD] (assert array_3_initializer)+[GOOD] (define-fun s3 () (Array Int Int) (lambda ((l1_s0 Int))+         0))+[GOOD] (define-fun s5 () (Array Int Int) (store s3 s1 s4))+[GOOD] (define-fun s7 () Int (+ s0 s6))+[GOOD] (define-fun s8 () Int (select s5 s7))+[GOOD] (define-fun s9 () (Array Int Int) (store s5 s1 s8))+[GOOD] (define-fun s10 () Int (select s9 s1))+[GOOD] (define-fun s11 () (Array Int Int) (store s5 s7 s6))+[GOOD] (define-fun s12 () Int (select s11 s1))+[GOOD] (define-fun s13 () Int (ite s2 s10 s12))+[GOOD] (define-fun s14 () Bool (= s6 s13)) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert s10)+[GOOD] (assert s14) [SEND] (check-sat) [RECV] sat-[SEND] (get-value (s1))-[RECV] ((s1 (- 1)))+[SEND] (get-value (s0))+[RECV] ((s0 (- 1))) *** Solver   : Z3 *** Exit code: ExitSuccess 
SBVTestSuite/GoldFiles/array_caching_02.gold view
@@ -5,52 +5,43 @@ [GOOD] (set-option :smtlib2_compliant true) [GOOD] (set-option :diagnostic-output-channel "stdout") [GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      ) [GOOD] (set-logic ALL) ; has unbounded values, using catch-all. [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s0 () Int 0)-[GOOD] (define-fun s3 () Int 2)-[GOOD] (define-fun s4 () Int 1)+[GOOD] (define-fun s1 () Int 0)+[GOOD] (define-fun s4 () Int 2)+[GOOD] (define-fun s6 () Int 1) [GOOD] ; --- top level inputs ----[GOOD] (declare-fun s1 () Int) ; tracks user variable "x"+[GOOD] (declare-fun s0 () Int) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays ----[GOOD] (define-fun array_0 () (Array Int Int) ((as const (Array Int Int)) 0))-[GOOD] (declare-fun array_1 () (Array Int Int))-[GOOD] (define-fun array_1_initializer_0 () Bool (= array_1 (store array_0 s0 s3)))-[GOOD] (declare-fun array_2 () (Array Int Int))-[GOOD] (declare-fun array_3 () (Array Int Int)) [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] (define-fun s5 () Int (+ s1 s4))-[GOOD] (define-fun s6 () Int (select array_2 s0))-[GOOD] (define-fun s7 () Int (select array_1 s5))-[GOOD] (define-fun s8 () Int (select array_3 s0))-[GOOD] (define-fun s9 () Int (ite s2 s6 s8))-[GOOD] (define-fun s10 () Bool (= s4 s9))-[GOOD] ; --- arrayDelayeds ----[GOOD] (define-fun array_2_initializer_0 () Bool (= array_2 (store array_1 s5 s4)))-[GOOD] (define-fun array_3_initializer_0 () Bool (= array_3 (store array_1 s0 s7)))-[GOOD] ; --- arraySetups ----[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed-[GOOD] (define-fun array_1_initializer () Bool array_1_initializer_0)-[GOOD] (assert array_1_initializer)-[GOOD] (define-fun array_2_initializer () Bool array_2_initializer_0)-[GOOD] (assert array_2_initializer)-[GOOD] (define-fun array_3_initializer () Bool array_3_initializer_0)-[GOOD] (assert array_3_initializer)+[GOOD] (define-fun s3 () (Array Int Int) (lambda ((l1_s0 Int))+         0))+[GOOD] (define-fun s5 () (Array Int Int) (store s3 s1 s4))+[GOOD] (define-fun s7 () Int (+ s0 s6))+[GOOD] (define-fun s8 () (Array Int Int) (store s5 s7 s6))+[GOOD] (define-fun s9 () Int (select s8 s1))+[GOOD] (define-fun s10 () Int (select s5 s7))+[GOOD] (define-fun s11 () (Array Int Int) (store s5 s1 s10))+[GOOD] (define-fun s12 () Int (select s11 s1))+[GOOD] (define-fun s13 () Int (ite s2 s9 s12))+[GOOD] (define-fun s14 () Bool (= s6 s13)) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert s10)+[GOOD] (assert s14) [SEND] (check-sat) [RECV] sat-[SEND] (get-value (s1))-[RECV] ((s1 (- 1)))+[SEND] (get-value (s0))+[RECV] ((s0 (- 1))) *** Solver   : Z3 *** Exit code: ExitSuccess 
+ SBVTestSuite/GoldFiles/array_misc_1.gold view
@@ -0,0 +1,36 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array Bool Int) (store (store ((as const (Array Bool Int)) 3) false 0) true 1))+[GOOD] (define-fun s3 () Int 1)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Bool)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s2 () Int (select s1 s0))+[GOOD] (define-fun s4 () Bool (<= s2 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert (not s4))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Q.E.D.
+ SBVTestSuite/GoldFiles/array_misc_11.gold view
@@ -0,0 +1,42 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] (declare-datatypes ((SBVTuple2 2)) ((par (T1 T2)+                                           ((mkSBVTuple2 (proj_1_SBVTuple2 T1)+                                                         (proj_2_SBVTuple2 T2))))))+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (SBVTuple2 Int Int) (mkSBVTuple2 1 2))+[GOOD] (define-fun s3 () Int 3)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array (SBVTuple2 Int Int) Int))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s2 () Int (select s0 s1))+[GOOD] (define-fun s4 () Bool (= s2 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 ((as const (Array (SBVTuple2 Int Int) Int)) 3)))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = ([], 3) :: Array (Integer, Integer) Integer
+ SBVTestSuite/GoldFiles/array_misc_12.gold view
@@ -0,0 +1,42 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] (declare-datatypes ((SBVTuple2 2)) ((par (T1 T2)+                                           ((mkSBVTuple2 (proj_1_SBVTuple2 T1)+                                                         (proj_2_SBVTuple2 T2))))))+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () Int 3)+[GOOD] (define-fun s3 () (SBVTuple2 Int Int) (mkSBVTuple2 1 2))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array Int (SBVTuple2 Int Int)))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s2 () (SBVTuple2 Int Int) (select s0 s1))+[GOOD] (define-fun s4 () Bool (= s2 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 ((as const (Array Int (SBVTuple2 Int Int))) (mkSBVTuple2 1 2))))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = ([], (1,2)) :: Array Integer (Integer, Integer)
+ SBVTestSuite/GoldFiles/array_misc_13.gold view
@@ -0,0 +1,41 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] (declare-datatypes ((SBVTuple2 2)) ((par (T1 T2)+                                           ((mkSBVTuple2 (proj_1_SBVTuple2 T1)+                                                         (proj_2_SBVTuple2 T2))))))+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (SBVTuple2 Int Int) (mkSBVTuple2 1 2))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array (SBVTuple2 Int Int) (SBVTuple2 Int Int)))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s2 () (SBVTuple2 Int Int) (select s0 s1))+[GOOD] (define-fun s3 () Bool (= s1 s2))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 ((as const (Array (SBVTuple2 Int Int) (SBVTuple2 Int Int))) (mkSBVTuple2 1 2))))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = ([], (1,2)) :: Array (Integer, Integer) (Integer, Integer)
+ SBVTestSuite/GoldFiles/array_misc_14.gold view
@@ -0,0 +1,38 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () Int 2)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array Int (_ FloatingPoint  8 24)))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s2 () (_ FloatingPoint  8 24) (select s0 s1))+[GOOD] (define-fun s3 () Bool (fp.isNaN s2))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 ((as const (Array Int (_ FloatingPoint 8 24))) (_ NaN 8 24))))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = ([], NaN) :: Array Integer Float
+ SBVTestSuite/GoldFiles/array_misc_15.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (_ FloatingPoint  8 24) (_ NaN 8 24))+[GOOD] (define-fun s3 () Int 3)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array (_ FloatingPoint  8 24) Int))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s2 () Int (select s0 s1))+[GOOD] (define-fun s4 () Bool (= s2 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 ((as const (Array (_ FloatingPoint 8 24) Int)) 3)))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = ([], 3) :: Array Float Integer
+ SBVTestSuite/GoldFiles/array_misc_16.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint  8 24) Int) (store ((as const (Array (_ FloatingPoint  8 24) Int)) 3) (_ +zero 8 24) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint  8 24) (_ +zero 8 24))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 12))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 12 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_17.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint 11 53) Int) (store ((as const (Array (_ FloatingPoint 11 53) Int)) 3) (_ +zero 11 53) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint 11 53) (_ +zero 11 53))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 12))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 12 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_18.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint 10 4) Int) (store ((as const (Array (_ FloatingPoint 10 4) Int)) 3) (_ +zero 10 4) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint 10 4) (_ +zero 10 4))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 12))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 12 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_19.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint  8 24) Int) (store ((as const (Array (_ FloatingPoint  8 24) Int)) 3) (_ +zero 8 24) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint  8 24) (_ -zero 8 24))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 3))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 3 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_2.gold view
@@ -0,0 +1,58 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s5 () Int 4)+[GOOD] (define-fun s8 () Int 5)+[GOOD] (define-fun s11 () Int 12)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array Int Int))+[GOOD] (declare-fun s1 () Int)+[GOOD] (declare-fun s2 () Int)+[GOOD] (declare-fun s3 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s4 () Int (select s0 s1))+[GOOD] (define-fun s6 () Bool (= s4 s5))+[GOOD] (define-fun s7 () Int (select s0 s2))+[GOOD] (define-fun s9 () Bool (= s7 s8))+[GOOD] (define-fun s10 () Int (select s0 s3))+[GOOD] (define-fun s12 () Bool (= s10 s11))+[GOOD] (define-fun s13 () Bool (and s9 s12))+[GOOD] (define-fun s14 () Bool (and s6 s13))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s14)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 (store (store ((as const (Array Int Int)) 4) 6 12) 3 5)))+[SEND] (get-value (s1))+[RECV] ((s1 2))+[SEND] (get-value (s2))+[RECV] ((s2 3))+[SEND] (get-value (s3))+[RECV] ((s3 6))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = ([(3,5),(6,12)], 4) :: Array Integer Integer+  s1 =                   2 :: Integer+  s2 =                   3 :: Integer+  s3 =                   6 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_20.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint 11 53) Int) (store ((as const (Array (_ FloatingPoint 11 53) Int)) 3) (_ +zero 11 53) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint 11 53) (_ -zero 11 53))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 3))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 3 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_21.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint 10 4) Int) (store ((as const (Array (_ FloatingPoint 10 4) Int)) 3) (_ +zero 10 4) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint 10 4) (_ -zero 10 4))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 3))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 3 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_22.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint  8 24) Int) (store ((as const (Array (_ FloatingPoint  8 24) Int)) 3) (_ NaN 8 24) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint  8 24) (_ NaN 8 24))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 12))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 12 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_23.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint 11 53) Int) (store ((as const (Array (_ FloatingPoint 11 53) Int)) 3) (_ NaN 11 53) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint 11 53) (_ NaN 11 53))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 12))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 12 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_24.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint 10 4) Int) (store ((as const (Array (_ FloatingPoint 10 4) Int)) 3) (_ NaN 10 4) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint 10 4) (_ NaN 10 4))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 12))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 12 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_25.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint  8 24) Int) (store ((as const (Array (_ FloatingPoint  8 24) Int)) 3) (_ +oo 8 24) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint  8 24) (_ +oo 8 24))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 12))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 12 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_26.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint 11 53) Int) (store ((as const (Array (_ FloatingPoint 11 53) Int)) 3) (_ +oo 11 53) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint 11 53) (_ +oo 11 53))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 12))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 12 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_27.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint 10 4) Int) (store ((as const (Array (_ FloatingPoint 10 4) Int)) 3) (_ +oo 10 4) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint 10 4) (_ +oo 10 4))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 12))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 12 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_28.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint  8 24) Int) (store ((as const (Array (_ FloatingPoint  8 24) Int)) 3) (_ +oo 8 24) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint  8 24) (_ -oo 8 24))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 3))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 3 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_29.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint 11 53) Int) (store ((as const (Array (_ FloatingPoint 11 53) Int)) 3) (_ +oo 11 53) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint 11 53) (_ -oo 11 53))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 3))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 3 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_3.gold view
@@ -0,0 +1,28 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-logic QF_BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert false)+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Q.E.D.
+ SBVTestSuite/GoldFiles/array_misc_30.gold view
@@ -0,0 +1,39 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () (Array (_ FloatingPoint 10 4) Int) (store ((as const (Array (_ FloatingPoint 10 4) Int)) 3) (_ +oo 10 4) 12))+[GOOD] (define-fun s2 () (_ FloatingPoint 10 4) (_ -oo 10 4))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s3 () Int (select s1 s2))+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 3))+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Satisfiable. Model:+  s0 = 3 :: Integer
+ SBVTestSuite/GoldFiles/array_misc_31.gold view
@@ -0,0 +1,28 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-logic QF_BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert false)+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Q.E.D.
+ SBVTestSuite/GoldFiles/array_misc_32.gold view
@@ -0,0 +1,34 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s0 () (Array Int (_ FloatingPoint 11 53)) (store (store ((as const (Array Int (_ FloatingPoint 11 53))) ((_ to_fp 11 53) roundNearestTiesToEven (/ 5.0 1.0))) 3 ((_ to_fp 11 53) roundNearestTiesToEven (/ 4.0 1.0))) 1 ((_ to_fp 11 53) roundNearestTiesToEven (/ 2.0 1.0))))+[GOOD] (define-fun s1 () (Array Int (_ FloatingPoint 11 53)) (store (store ((as const (Array Int (_ FloatingPoint 11 53))) ((_ to_fp 11 53) roundNearestTiesToEven (/ 5.0 1.0))) 1 ((_ to_fp 11 53) roundNearestTiesToEven (/ 2.0 1.0))) 3 ((_ to_fp 11 53) roundNearestTiesToEven (/ 4.0 1.0))))+[GOOD] ; --- top level inputs ---+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s2 () Bool (= s0 s1))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert (not s2))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Q.E.D.
+ SBVTestSuite/GoldFiles/array_misc_33.gold view
@@ -0,0 +1,34 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s0 () (Array Int (_ FloatingPoint 11 53)) (store (store ((as const (Array Int (_ FloatingPoint 11 53))) ((_ to_fp 11 53) roundNearestTiesToEven (/ 5.0 1.0))) 3 ((_ to_fp 11 53) roundNearestTiesToEven (/ 1.0 1.0))) 1 ((_ to_fp 11 53) roundNearestTiesToEven (/ 2.0 1.0))))+[GOOD] (define-fun s1 () (Array Int (_ FloatingPoint 11 53)) (store (store ((as const (Array Int (_ FloatingPoint 11 53))) ((_ to_fp 11 53) roundNearestTiesToEven (/ 5.0 1.0))) 1 ((_ to_fp 11 53) roundNearestTiesToEven (/ 2.0 1.0))) 3 ((_ to_fp 11 53) roundNearestTiesToEven (/ 4.0 1.0))))+[GOOD] ; --- top level inputs ---+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s2 () Bool (= s0 s1))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert (not s2))+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Falsifiable
+ SBVTestSuite/GoldFiles/array_misc_34.gold view
@@ -0,0 +1,34 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s0 () (Array Int (_ FloatingPoint 11 53)) (store (store ((as const (Array Int (_ FloatingPoint 11 53))) ((_ to_fp 11 53) roundNearestTiesToEven (/ 5.0 1.0))) 3 ((_ to_fp 11 53) roundNearestTiesToEven (/ 1.0 1.0))) 1 ((_ to_fp 11 53) roundNearestTiesToEven (/ 2.0 1.0))))+[GOOD] (define-fun s1 () (Array Int (_ FloatingPoint 11 53)) (store (store ((as const (Array Int (_ FloatingPoint 11 53))) ((_ to_fp 11 53) roundNearestTiesToEven (/ 5.0 1.0))) 1 ((_ to_fp 11 53) roundNearestTiesToEven (/ 2.0 1.0))) 3 ((_ to_fp 11 53) roundNearestTiesToEven (/ 4.0 1.0))))+[GOOD] ; --- top level inputs ---+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s2 () Bool (distinct s0 s1))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert (not s2))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Q.E.D.
+ SBVTestSuite/GoldFiles/array_misc_5.gold view
@@ -0,0 +1,34 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; NB. User specified.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s0 () (Array (_ BitVec 2) (_ BitVec 2)) (store (store (store (store ((as const (Array (_ BitVec 2) (_ BitVec 2))) #b00) #b11 #b11) #b10 #b10) #b01 #b01) #b00 #b00))+[GOOD] (define-fun s1 () (Array (_ BitVec 2) (_ BitVec 2)) (store (store (store (store ((as const (Array (_ BitVec 2) (_ BitVec 2))) #b01) #b11 #b11) #b10 #b10) #b01 #b01) #b00 #b00))+[GOOD] ; --- top level inputs ---+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s2 () Bool (= s0 s1))+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert (not s2))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Q.E.D.
+ SBVTestSuite/GoldFiles/array_misc_7.gold view
@@ -0,0 +1,28 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-logic QF_BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert false)+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Q.E.D.
+ SBVTestSuite/GoldFiles/array_misc_9.gold view
@@ -0,0 +1,27 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-logic QF_BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++FINAL OUTPUT:+Falsifiable
SBVTestSuite/GoldFiles/auf-1.gold view
@@ -1,32 +1,29 @@ INPUTS-  s0 :: SWord32, aliasing "x"-  s1 :: SWord32, aliasing "y"+  s0 :: SArray Word32 Word32, aliasing "a"+  s1 :: SWord32, aliasing "x"+  s2 :: SWord32, aliasing "y" CONSTANTS-  s2 = 2 :: Word32-  s5 = 3 :: Word32-  s10 = 1 :: Word32+  s3 = 2 :: Word32+  s6 = 3 :: Word32+  s12 = 1 :: Word32 TABLES-ARRAYS-  array_0 :: SWord32 -> SWord32, aliasing "a"-     Context:  initialized with random elements-  array_1 :: SWord32 -> SWord32-     Context:  cloned from array_0 with s0 :: SWord32 |-> s5 :: SWord32 UNINTERPRETED CONSTANTS   [uninterpreted] f :: (True,Nothing,SWord32 -> SWord64) USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS DEFINE-  s3 :: SWord32 = s0 + s2-  s4 :: SBool = s1 == s3-  s6 :: SWord32 = s1 - s2-  s7 :: SWord32 = select array_1 s6-  s8 :: SWord64 = [uninterpreted] f s7-  s9 :: SWord32 = s1 - s0-  s11 :: SWord32 = s9 + s10-  s12 :: SWord64 = [uninterpreted] f s11-  s13 :: SBool = s8 == s12-  s14 :: SBool = s4 => s13+  s4 :: SWord32 = s1 + s3+  s5 :: SBool = s2 == s4+  s7 :: SArray Word32 Word32 = store s0 s1 s6+  s8 :: SWord32 = s2 - s3+  s9 :: SWord32 = select s7 s8+  s10 :: SWord64 = [uninterpreted] f s9+  s11 :: SWord32 = s2 - s1+  s13 :: SWord32 = s11 + s12+  s14 :: SWord64 = [uninterpreted] f s13+  s15 :: SBool = s10 == s14+  s16 :: SBool = s5 => s15 CONSTRAINTS ASSERTIONS OUTPUTS-  s14+  s16
SBVTestSuite/GoldFiles/barrelRotate_Left_Int16_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_left 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x0010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int16_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_left 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x00000010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int16_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_left 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x0000000000000010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int16_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_left 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x10 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s13))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int32_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_left 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x0020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int32_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_left 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x00000020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int32_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_left 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x0000000000000020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int32_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_left 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x20 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s15))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int64_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_left 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x0040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int64_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_left 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x00000040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int64_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_left 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x0000000000000040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int64_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_left 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x40 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s17))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int8_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_left 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x0008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int8_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_left 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x00000008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int8_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_left 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x0000000000000008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Left_Int8_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_left 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x08 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s11))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word16_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_left 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x0010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word16_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_left 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x00000010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word16_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_left 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x0000000000000010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word16_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_left 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x10 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s13))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word32_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_left 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x0020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word32_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_left 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x00000020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word32_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_left 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x0000000000000020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word32_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_left 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x20 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s15))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word64_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_left 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x0040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word64_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_left 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x00000040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word64_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_left 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x0000000000000040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word64_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_left 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x40 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s17))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word8_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_left 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x0008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word8_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_left 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x00000008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word8_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_left 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x0000000000000008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Left_Word8_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_left 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x08 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s11))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int16_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_right 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x0010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int16_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_right 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x00000010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int16_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_right 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x0000000000000010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int16_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_right 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x10 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s13))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int32_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_right 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x0020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int32_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_right 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x00000020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int32_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_right 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x0000000000000020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int32_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_right 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x20 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s15))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int64_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_right 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x0040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int64_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_right 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x00000040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int64_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_right 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x0000000000000040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int64_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_right 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x40 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s17))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int8_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_right 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x0008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int8_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_right 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x00000008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int8_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_right 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x0000000000000008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Right_Int8_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_right 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x08 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s11))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word16_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_right 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x0010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word16_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_right 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x00000010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word16_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_right 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x0000000000000010 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s13))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word16_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 16))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -55,8 +54,6 @@ [GOOD] (define-fun s34 () (_ BitVec 16) ((_ rotate_right 15) s0)) [GOOD] (define-fun s36 () (_ BitVec 16) (ite (bvule #x10 s3) s35 (table0 s3))) [GOOD] (define-fun s37 () Bool (= s20 s36))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s13))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word32_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_right 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x0020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word32_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_right 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x00000020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word32_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_right 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x0000000000000020 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s15))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word32_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 32))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -75,8 +74,6 @@ [GOOD] (define-fun s54 () (_ BitVec 32) ((_ rotate_right 31) s0)) [GOOD] (define-fun s56 () (_ BitVec 32) (ite (bvule #x20 s3) s55 (table0 s3))) [GOOD] (define-fun s57 () Bool (= s24 s56))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s15))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word64_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_right 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x0040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word64_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_right 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x00000040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word64_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_right 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x0000000000000040 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s17))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word64_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 64))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -111,8 +110,6 @@ [GOOD] (define-fun s90 () (_ BitVec 64) ((_ rotate_right 63) s0)) [GOOD] (define-fun s92 () (_ BitVec 64) (ite (bvule #x40 s3) s91 (table0 s3))) [GOOD] (define-fun s93 () Bool (= s28 s92))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s17))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word8_Word16.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_right 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x0008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word8_Word32.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_right 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x00000008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word8_Word64.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_right 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x0000000000000008 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s11))
SBVTestSuite/GoldFiles/barrelRotate_Right_Word8_Word8.gold view
@@ -18,7 +18,6 @@ [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 8))-[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,8 +42,6 @@ [GOOD] (define-fun s22 () (_ BitVec 8) ((_ rotate_right 7) s0)) [GOOD] (define-fun s24 () (_ BitVec 8) (ite (bvule #x08 s3) s23 (table0 s3))) [GOOD] (define-fun s25 () Bool (= s16 s24))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s11))
SBVTestSuite/GoldFiles/basic-2_1.gold view
@@ -3,7 +3,6 @@ CONSTANTS   s1 = 3 :: Word8 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-2_2.gold view
@@ -3,7 +3,6 @@ CONSTANTS   s1 = 9 :: Word8 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-2_3.gold view
@@ -3,7 +3,6 @@ CONSTANTS   s1 = 3 :: Word8 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-2_4.gold view
@@ -3,7 +3,6 @@ CONSTANTS   s1 = 3 :: Word8 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-3_1.gold view
@@ -3,7 +3,6 @@   s1 :: SWord8, aliasing "y" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-3_2.gold view
@@ -3,7 +3,6 @@   s1 :: SWord8, aliasing "y" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-3_3.gold view
@@ -3,7 +3,6 @@   s1 :: SWord8, aliasing "y" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-3_4.gold view
@@ -3,7 +3,6 @@   s1 :: SWord8, aliasing "y" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-3_5.gold view
@@ -4,7 +4,6 @@ CONSTANTS   s2 = 1 :: Word8 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-4_1.gold view
@@ -2,7 +2,6 @@   s0 :: SWord8, aliasing "x" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-4_2.gold view
@@ -2,7 +2,6 @@   s0 :: SWord8, aliasing "x" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-4_3.gold view
@@ -2,7 +2,6 @@   s0 :: SWord8, aliasing "x" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-4_4.gold view
@@ -2,7 +2,6 @@   s0 :: SWord8, aliasing "x" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-4_5.gold view
@@ -3,7 +3,6 @@ CONSTANTS   s1 = 1 :: Word8 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-5_1.gold view
@@ -3,7 +3,6 @@   s1 :: SWord8, aliasing "q" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-5_2.gold view
@@ -3,7 +3,6 @@   s1 :: SWord8, aliasing "q" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-5_3.gold view
@@ -3,7 +3,6 @@   s1 :: SWord8, aliasing "q" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-5_4.gold view
@@ -3,7 +3,6 @@   s1 :: SWord8, aliasing "q" CONSTANTS TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/basic-5_5.gold view
@@ -4,7 +4,6 @@ CONSTANTS   s2 = 1 :: Word8 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/ccitt.gold view
@@ -72,7 +72,6 @@   s2054 = 1 :: Word8   s2182 = 3 :: Word8 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/charConstr00.gold view
@@ -16,13 +16,10 @@ [GOOD] (assert (= 1 (str.len s0))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/charConstr01.gold view
@@ -15,7 +15,6 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun cf (Int) String) [GOOD] (assert (forall ((a1 Int))@@ -26,8 +25,6 @@ [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () String (cf s0)) [GOOD] (define-fun s3 () Bool (distinct s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/charConstr02.gold view
@@ -22,7 +22,6 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun cf3 (Int) (SBVTuple3 String String String)) [GOOD] (assert (forall ((a1 Int))@@ -36,8 +35,6 @@ [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () (SBVTuple3 String String String) (cf3 s0)) [GOOD] (define-fun s3 () Bool (distinct s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/charConstr03.gold view
@@ -24,13 +24,10 @@                )) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/charConstr04.gold view
@@ -22,13 +22,10 @@ [GOOD] (assert (=> ((_ is (right_SBVEither (String) (SBVEither Int String))) s0) (= 1 (str.len (get_right_SBVEither s0))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/charConstr05.gold view
@@ -22,13 +22,10 @@ [GOOD] (assert (=> ((_ is (left_SBVEither (String) (SBVEither String Int))) s0) (= 1 (str.len (get_left_SBVEither s0))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/charConstr06.gold view
@@ -24,13 +24,10 @@                )) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/charConstr07.gold view
@@ -22,7 +22,6 @@ [GOOD] (assert (=> ((_ is (just_SBVMaybe (String) (SBVMaybe String))) s0) (= 1 (str.len (get_just_SBVMaybe s0))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -30,8 +29,6 @@ [GOOD] (define-fun s2 () Bool (ite s1 false true)) [GOOD] (define-fun s4 () Bool (distinct s0 s3)) [GOOD] (define-fun s5 () Bool (and s2 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/charConstr08.gold view
@@ -20,7 +20,6 @@ [GOOD] (assert (forall ((set0 String)) (=> (select s0 set0) (= 1 (str.len set0))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -28,8 +27,6 @@ [GOOD] (define-fun s4 () Bool (select s0 s3)) [GOOD] (define-fun s5 () Bool (not s4)) [GOOD] (define-fun s6 () Bool (and s2 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s6)
SBVTestSuite/GoldFiles/charConstr09.gold view
@@ -22,14 +22,11 @@ [GOOD] (assert (forall ((seq0 Int)) (=> (and (>= seq0 0) (< seq0 (seq.len s0))) (and (= 1 (str.len (proj_1_SBVTuple2 (proj_1_SBVTuple2 (seq.nth s0 seq0))))) (= 1 (str.len (proj_2_SBVTuple2 (proj_1_SBVTuple2 (seq.nth s0 seq0))))))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (seq.len s0)) [GOOD] (define-fun s3 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/charConstr10.gold view
@@ -24,7 +24,6 @@ [GOOD] (assert (forall ((seq0 Int)) (=> (and (>= seq0 0) (< seq0 (seq.len s0))) (and (= 1 (str.len (proj_1_SBVTuple2 (proj_1_SBVTuple2 (seq.nth s0 seq0))))) (= 1 (str.len (proj_2_SBVTuple2 (proj_1_SBVTuple2 (seq.nth s0 seq0))))))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -34,8 +33,6 @@ [GOOD] (define-fun s6 () (SBVTuple2 String String) (proj_1_SBVTuple2 s5)) [GOOD] (define-fun s7 () String (proj_1_SBVTuple2 s6)) [GOOD] (define-fun s9 () Bool (= s7 s8))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/charConstr11.gold view
@@ -23,7 +23,6 @@ [GOOD] (assert (= 1 (str.len s1))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun cf4 (Int String) (Seq (SBVTuple2 (SBVTuple2 String String) (Seq Int)))) [GOOD] (assert (forall ((a1 Int) (a2 String))@@ -35,8 +34,6 @@ [GOOD] (define-fun s2 () (Seq (SBVTuple2 (SBVTuple2 String String) (Seq Int))) (cf4 s0 s1)) [GOOD] (define-fun s3 () Int (seq.len s2)) [GOOD] (define-fun s5 () Bool (= s3 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/check1.gold view
@@ -17,15 +17,12 @@ [GOOD] (declare-fun s3 () (_ BitVec 16)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s4 () Bool (= s0 s2)) [GOOD] (define-fun s5 () Bool (= s1 s3)) [GOOD] (define-fun s6 () Bool (and s4 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s6))
SBVTestSuite/GoldFiles/check2.gold view
@@ -15,12 +15,9 @@ [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/coins.gold view
@@ -16,7 +16,6 @@   s88 = 95 :: Word16   s551 = 115 :: Word16 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/concreteFoldl.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/concreteFoldr.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/concreteReverse.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/concreteSort.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/constArr2_SArray.gold view
@@ -5,6 +5,9 @@ [GOOD] (set-option :smtlib2_compliant true) [GOOD] (set-option :diagnostic-output-channel "stdout") [GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      ) [GOOD] (set-logic ALL) ; has unbounded values, using catch-all. [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples ---@@ -14,24 +17,12 @@ [GOOD] (define-fun s5 () Int 2) [GOOD] (define-fun s7 () Int 3) [GOOD] (define-fun s9 () Int 75)-[GOOD] (define-fun s14 () Int 12)-[GOOD] (define-fun s15 () Int 5)-[GOOD] (define-fun s16 () Int 6)+[GOOD] (define-fun s14 () (Array Int Int) (store (store (store (store ((as const (Array Int Int)) 2) 75 5) 3 6) 2 5) 1 12)) [GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "i" [GOOD] (declare-fun s1 () Int) ; tracks user variable "j" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays ----[GOOD] (define-fun array_0 () (Array Int Int) ((as const (Array Int Int)) 2))-[GOOD] (declare-fun array_1 () (Array Int Int))-[GOOD] (define-fun array_1_initializer_0 () Bool (= array_1 (store array_0 s3 s14)))-[GOOD] (declare-fun array_2 () (Array Int Int))-[GOOD] (define-fun array_2_initializer_0 () Bool (= array_2 (store array_1 s5 s15)))-[GOOD] (declare-fun array_3 () (Array Int Int))-[GOOD] (define-fun array_3_initializer_0 () Bool (= array_3 (store array_2 s7 s16)))-[GOOD] (declare-fun array_4 () (Array Int Int))-[GOOD] (define-fun array_4_initializer_0 () Bool (= array_4 (store array_3 s9 s15))) [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -43,25 +34,14 @@ [GOOD] (define-fun s11 () Bool (or s8 s10)) [GOOD] (define-fun s12 () Bool (or s6 s11)) [GOOD] (define-fun s13 () Bool (or s4 s12))-[GOOD] (define-fun s17 () Int (select array_4 s0))-[GOOD] (define-fun s18 () Int (select array_4 s1))-[GOOD] (define-fun s19 () Bool (= s17 s18))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed-[GOOD] (define-fun array_1_initializer () Bool array_1_initializer_0)-[GOOD] (assert array_1_initializer)-[GOOD] (define-fun array_2_initializer () Bool array_2_initializer_0)-[GOOD] (assert array_2_initializer)-[GOOD] (define-fun array_3_initializer () Bool array_3_initializer_0)-[GOOD] (assert array_3_initializer)-[GOOD] (define-fun array_4_initializer () Bool array_4_initializer_0)-[GOOD] (assert array_4_initializer)+[GOOD] (define-fun s15 () Int (select s14 s0))+[GOOD] (define-fun s16 () Int (select s14 s1))+[GOOD] (define-fun s17 () Bool (= s15 s16)) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (assert s13)-[GOOD] (assert s19)+[GOOD] (assert s17) [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))
SBVTestSuite/GoldFiles/constArr_SArray.gold view
@@ -5,6 +5,9 @@ [GOOD] (set-option :smtlib2_compliant true) [GOOD] (set-option :diagnostic-output-channel "stdout") [GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      ) [GOOD] (set-logic ALL) ; has unbounded values, using catch-all. [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples ---@@ -14,25 +17,12 @@ [GOOD] (define-fun s5 () Int 2) [GOOD] (define-fun s7 () Int 3) [GOOD] (define-fun s9 () Int 75)-[GOOD] (define-fun s14 () Int 7)-[GOOD] (define-fun s15 () Int 12)-[GOOD] (define-fun s16 () Int 5)-[GOOD] (define-fun s17 () Int 6)+[GOOD] (define-fun s14 () (Array Int Int) (store (store (store (store ((as const (Array Int Int)) 7) 75 5) 3 6) 2 5) 1 12)) [GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "i" [GOOD] (declare-fun s1 () Int) ; tracks user variable "j" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays ----[GOOD] (define-fun array_0 () (Array Int Int) ((as const (Array Int Int)) 7))-[GOOD] (declare-fun array_1 () (Array Int Int))-[GOOD] (define-fun array_1_initializer_0 () Bool (= array_1 (store array_0 s3 s15)))-[GOOD] (declare-fun array_2 () (Array Int Int))-[GOOD] (define-fun array_2_initializer_0 () Bool (= array_2 (store array_1 s5 s16)))-[GOOD] (declare-fun array_3 () (Array Int Int))-[GOOD] (define-fun array_3_initializer_0 () Bool (= array_3 (store array_2 s7 s17)))-[GOOD] (declare-fun array_4 () (Array Int Int))-[GOOD] (define-fun array_4_initializer_0 () Bool (= array_4 (store array_3 s9 s16))) [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -44,25 +34,14 @@ [GOOD] (define-fun s11 () Bool (or s8 s10)) [GOOD] (define-fun s12 () Bool (or s6 s11)) [GOOD] (define-fun s13 () Bool (or s4 s12))-[GOOD] (define-fun s18 () Int (select array_4 s0))-[GOOD] (define-fun s19 () Int (select array_4 s1))-[GOOD] (define-fun s20 () Bool (= s18 s19))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed-[GOOD] (define-fun array_1_initializer () Bool array_1_initializer_0)-[GOOD] (assert array_1_initializer)-[GOOD] (define-fun array_2_initializer () Bool array_2_initializer_0)-[GOOD] (assert array_2_initializer)-[GOOD] (define-fun array_3_initializer () Bool array_3_initializer_0)-[GOOD] (assert array_3_initializer)-[GOOD] (define-fun array_4_initializer () Bool array_4_initializer_0)-[GOOD] (assert array_4_initializer)+[GOOD] (define-fun s15 () Int (select s14 s0))+[GOOD] (define-fun s16 () Int (select s14 s1))+[GOOD] (define-fun s17 () Bool (= s15 s16)) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (assert s13)-[GOOD] (assert s20)+[GOOD] (assert s17) [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))
SBVTestSuite/GoldFiles/counts.gold view
@@ -23,7 +23,6 @@   s1360 = 8 :: Word8   s1521 = 9 :: Word8 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS
SBVTestSuite/GoldFiles/dsat01.gold view
@@ -18,14 +18,11 @@ [ISSUE] (declare-fun s2 () Bool) ; tracks user variable "b0" [ISSUE] ; --- constant tables --- [ISSUE] ; --- non-constant tables ----[ISSUE] ; --- arrays --- [ISSUE] ; --- uninterpreted constants --- [ISSUE] ; --- user defined functions --- [ISSUE] ; --- assignments --- [ISSUE] (define-fun s4 () Bool (> s0 s3)) [ISSUE] (define-fun s6 () Bool (<= s0 s5))-[ISSUE] ; --- arrayDelayeds ----[ISSUE] ; --- arraySetups --- [ISSUE] ; --- delayedEqualities --- [ISSUE] ; --- formula --- [ISSUE] (assert s4)
SBVTestSuite/GoldFiles/exceptionLocal1.gold view
@@ -14,7 +14,6 @@ [GOOD] (declare-fun s0 () (_ BitVec 32)) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---
SBVTestSuite/GoldFiles/foldlABC1.gold view
@@ -20,7 +20,6 @@ [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -39,8 +38,6 @@ [GOOD] (define-fun s16 () Int (+ s0 s1)) [GOOD] (define-fun s17 () Int (+ s2 s16)) [GOOD] (define-fun s18 () Bool (= s15 s17))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/foldlABC2.gold view
@@ -21,7 +21,6 @@ [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -47,8 +46,6 @@ [GOOD] (define-fun s24 () Int (+ s0 s1)) [GOOD] (define-fun s25 () Int (+ s2 s24)) [GOOD] (define-fun s26 () Bool (= s23 s25))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/foldlABC3.gold view
@@ -21,7 +21,6 @@ [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -54,8 +53,6 @@ [GOOD] (define-fun s31 () Int (+ s0 s1)) [GOOD] (define-fun s32 () Int (+ s2 s31)) [GOOD] (define-fun s33 () Bool (= s30 s32))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/foldrAB1.gold view
@@ -19,7 +19,6 @@ [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -34,8 +33,6 @@ [GOOD] (define-fun s11 () Int (ite s9 s2 s10)) [GOOD] (define-fun s12 () Int (+ s0 s1)) [GOOD] (define-fun s13 () Bool (= s11 s12))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/foldrAB2.gold view
@@ -20,7 +20,6 @@ [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -42,8 +41,6 @@ [GOOD] (define-fun s19 () Int (ite s9 s2 s18)) [GOOD] (define-fun s20 () Int (+ s0 s1)) [GOOD] (define-fun s21 () Bool (= s19 s20))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/foldrAB3.gold view
@@ -20,7 +20,6 @@ [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -49,8 +48,6 @@ [GOOD] (define-fun s26 () Int (ite s9 s2 s25)) [GOOD] (define-fun s27 () Int (+ s0 s1)) [GOOD] (define-fun s28 () Bool (= s26 s27))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/freshVars.gold view
@@ -17,13 +17,10 @@ [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)@@ -94,59 +91,57 @@ [GOOD] (assert s47) [GOOD] (define-fun s48 () Bool (fp.isPositive s17)) [GOOD] (assert s48)-[GOOD] (declare-fun array_0 () (Array Int Int))-[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed-[GOOD] (declare-fun s49 () Int)-[GOOD] (declare-fun s50 () Bool)-[GOOD] (define-fun s52 () Int 2)-[GOOD] (define-fun s51 () Int (select array_0 s49))-[GOOD] (define-fun s53 () Bool (= s51 s52))-[GOOD] (assert s53)-[GOOD] (define-fun s54 () Int 42)-[GOOD] (define-fun array_1 () (Array Int Int) ((as const (Array Int Int)) 42))-[GOOD] (define-fun array_1_initializer () Bool true) ; no initialization needed+[GOOD] (declare-fun s49 () (Array Int Int))+[GOOD] (declare-fun s50 () Int)+[GOOD] (declare-fun s51 () Bool)+[GOOD] (define-fun s53 () Int 2)+[GOOD] (define-fun s52 () Int (select s49 s50))+[GOOD] (define-fun s54 () Bool (= s52 s53))+[GOOD] (assert s54) [GOOD] (declare-fun s55 () Int)-[GOOD] (define-fun s56 () Int 96)-[GOOD] (define-fun s57 () Int (select array_1 s56))-[GOOD] (define-fun s58 () Bool (= s55 s57))-[GOOD] (assert s58)-[GOOD] (define-fun s59 () Int 1)-[GOOD] (define-fun s60 () Bool (= s49 s59))-[GOOD] (assert s60)-[GOOD] (define-fun s61 () Bool (not s50))+[GOOD] (define-fun s57 () Int 96)+[GOOD] (define-fun s56 () (Array Int Int) (lambda ((l1_s0 Int))+         42))+[GOOD] (define-fun s58 () Int (select s56 s57))+[GOOD] (define-fun s59 () Bool (= s55 s58))+[GOOD] (assert s59)+[GOOD] (define-fun s60 () Int 1)+[GOOD] (define-fun s61 () Bool (= s50 s60)) [GOOD] (assert s61)-[GOOD] (declare-fun s62 () String)+[GOOD] (define-fun s62 () Bool (not s51))+[GOOD] (assert s62)+[GOOD] (declare-fun s63 () String) [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295) [GOOD] (set-option :model.inline_def  true      )-[GOOD] (declare-fun s63 () (Seq Int))+[GOOD] (declare-fun s64 () (Seq Int)) [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295) [GOOD] (set-option :model.inline_def  true      )-[GOOD] (declare-fun s64 () (Seq (Seq Int)))+[GOOD] (declare-fun s65 () (Seq (Seq Int))) [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295) [GOOD] (set-option :model.inline_def  true      )-[GOOD] (declare-fun s65 () (Seq (_ BitVec 8)))+[GOOD] (declare-fun s66 () (Seq (_ BitVec 8))) [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295) [GOOD] (set-option :model.inline_def  true      )-[GOOD] (declare-fun s66 () (Seq (Seq (_ BitVec 16))))-[GOOD] (define-fun s67 () String "hello")-[GOOD] (define-fun s68 () Bool (= s62 s67))-[GOOD] (assert s68)-[GOOD] (define-fun s69 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4)))-[GOOD] (define-fun s70 () Bool (= s63 s69))-[GOOD] (assert s70)-[GOOD] (define-fun s71 () (Seq (Seq Int)) (seq.++ (seq.unit (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3))) (seq.unit (seq.++ (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7)))))-[GOOD] (define-fun s72 () Bool (= s64 s71))-[GOOD] (assert s72)-[GOOD] (define-fun s73 () (Seq (_ BitVec 8)) (seq.++ (seq.unit #x01) (seq.unit #x02)))-[GOOD] (define-fun s74 () Bool (= s65 s73))-[GOOD] (assert s74)-[GOOD] (define-fun s75 () (Seq (Seq (_ BitVec 16))) (seq.++ (seq.unit (seq.++ (seq.unit #x0001) (seq.unit #x0002) (seq.unit #x0003))) (seq.unit (as seq.empty (Seq (_ BitVec 16)))) (seq.unit (seq.++ (seq.unit #x0004) (seq.unit #x0005) (seq.unit #x0006)))))-[GOOD] (define-fun s76 () Bool (= s66 s75))-[GOOD] (assert s76)+[GOOD] (declare-fun s67 () (Seq (Seq (_ BitVec 16))))+[GOOD] (define-fun s68 () String "hello")+[GOOD] (define-fun s69 () Bool (= s63 s68))+[GOOD] (assert s69)+[GOOD] (define-fun s70 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4)))+[GOOD] (define-fun s71 () Bool (= s64 s70))+[GOOD] (assert s71)+[GOOD] (define-fun s72 () (Seq (Seq Int)) (seq.++ (seq.unit (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3))) (seq.unit (seq.++ (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7)))))+[GOOD] (define-fun s73 () Bool (= s65 s72))+[GOOD] (assert s73)+[GOOD] (define-fun s74 () (Seq (_ BitVec 8)) (seq.++ (seq.unit #x01) (seq.unit #x02)))+[GOOD] (define-fun s75 () Bool (= s66 s74))+[GOOD] (assert s75)+[GOOD] (define-fun s76 () (Seq (Seq (_ BitVec 16))) (seq.++ (seq.unit (seq.++ (seq.unit #x0001) (seq.unit #x0002) (seq.unit #x0003))) (seq.unit (as seq.empty (Seq (_ BitVec 16)))) (seq.unit (seq.++ (seq.unit #x0004) (seq.unit #x0005) (seq.unit #x0006)))))+[GOOD] (define-fun s77 () Bool (= s67 s76))+[GOOD] (assert s77) [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))@@ -185,22 +180,24 @@ [SEND] (get-value (s16)) [RECV] ((s16 Plus)) [SEND] (get-value (s49))-[RECV] ((s49 1))+[RECV] ((s49 ((as const (Array Int Int)) 2))) [SEND] (get-value (s50))-[RECV] ((s50 false))+[RECV] ((s50 1))+[SEND] (get-value (s51))+[RECV] ((s51 false)) [SEND] (get-value (s55)) [RECV] ((s55 42))-[SEND] (get-value (s62))-[RECV] ((s62 "hello")) [SEND] (get-value (s63))-[RECV] ((s63 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4))))+[RECV] ((s63 "hello")) [SEND] (get-value (s64))-[RECV] ((s64 (seq.++ (seq.unit (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3)))-               (seq.unit (seq.++ (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7))))))+[RECV] ((s64 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4)))) [SEND] (get-value (s65))-[RECV] ((s65 (seq.++ (seq.unit #x01) (seq.unit #x02))))+[RECV] ((s65 (seq.++ (seq.unit (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3)))+               (seq.unit (seq.++ (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7)))))) [SEND] (get-value (s66))-[RECV] ((s66 (seq.++ (seq.unit (seq.++ (seq.unit #x0001) (seq.unit #x0002) (seq.unit #x0003)))+[RECV] ((s66 (seq.++ (seq.unit #x01) (seq.unit #x02))))+[SEND] (get-value (s67))+[RECV] ((s67 (seq.++ (seq.unit (seq.++ (seq.unit #x0001) (seq.unit #x0002) (seq.unit #x0003)))                (seq.unit (as seq.empty (Seq (_ BitVec 16))))                (seq.unit (seq.++ (seq.unit #x0004) (seq.unit #x0005) (seq.unit #x0006)))))) [SEND] (get-value (s17))@@ -226,6 +223,7 @@   s14      =                 11.0 :: Real   vInteger =                   12 :: Integer   vBinOp   =                 Plus :: BinOp+  vSArray  =              ([], 2) :: Array Integer Integer   i1       =                    1 :: Integer   i2       =                False :: Bool   mustBe42 =                   42 :: Integer
SBVTestSuite/GoldFiles/genBenchMark1.gold view
@@ -11,14 +11,11 @@ (declare-fun s0 () (_ BitVec 8)) ; --- constant tables --- ; --- non-constant tables ----; --- arrays --- ; --- uninterpreted constants --- ; --- user defined functions --- ; --- assignments --- (define-fun s2 () (_ BitVec 8) (bvadd s0 s1)) (define-fun s3 () Bool (= s0 s2))-; --- arrayDelayeds ----; --- arraySetups --- ; --- delayedEqualities --- ; --- formula --- (assert (not s3))
SBVTestSuite/GoldFiles/genBenchMark2.gold view
@@ -11,14 +11,11 @@ (declare-fun s0 () (_ BitVec 8)) ; --- constant tables --- ; --- non-constant tables ----; --- arrays --- ; --- uninterpreted constants --- ; --- user defined functions --- ; --- assignments --- (define-fun s2 () (_ BitVec 8) (bvadd s0 s1)) (define-fun s3 () Bool (= s0 s2))-; --- arrayDelayeds ----; --- arraySetups --- ; --- delayedEqualities --- ; --- formula --- (assert s3)
SBVTestSuite/GoldFiles/lambda02.gold view
@@ -1,4 +1,4 @@ (lambda ((l1_s0 Int))-  (let ((l1_s1 1))-  (let ((l1_s2 (+ l1_s0 l1_s1)))-  l1_s2)))+                          (let ((l1_s1 1))+                          (let ((l1_s2 (+ l1_s0 l1_s1)))+                          l1_s2)))
SBVTestSuite/GoldFiles/lambda03.gold view
@@ -1,5 +1,5 @@ (lambda ((l1_s0 Int) (l1_s1 Int))-  (let ((l1_s2 2))-  (let ((l1_s3 (* l1_s1 l1_s2)))-  (let ((l1_s4 (+ l1_s0 l1_s3)))-  l1_s4))))+                          (let ((l1_s2 2))+                          (let ((l1_s3 (* l1_s1 l1_s2)))+                          (let ((l1_s4 (+ l1_s0 l1_s3)))+                          l1_s4))))
SBVTestSuite/GoldFiles/lambda04.gold view
@@ -19,16 +19,13 @@ [GOOD] (declare-fun s1 () (Seq Bool)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (Seq Bool) (seq.map (lambda ((l1_s0 Int))-         false) s0))+                                 false) s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda05.gold view
@@ -19,22 +19,19 @@ [GOOD] (declare-fun s1 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (Seq Int) (seq.map (lambda ((l1_s0 Int))-         (let ((l1_s1 2))-         (let ((l1_s2 (+ l1_s0 l1_s1)))-         l1_s2))) s0))+                                 (let ((l1_s1 2))+                                 (let ((l1_s2 (+ l1_s0 l1_s1)))+                                 l1_s2))) s0)) [GOOD] (define-fun s5 () (Seq Int) (seq.map (lambda ((l1_s0 Int))-         (let ((l1_s1 1))-         (let ((l1_s2 (+ l1_s0 l1_s1)))-         l1_s2))) s4))+                                 (let ((l1_s1 1))+                                 (let ((l1_s2 (+ l1_s0 l1_s1)))+                                 l1_s2))) s4)) [GOOD] (define-fun s6 () Bool (= s1 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda06.gold view
@@ -19,34 +19,31 @@ [GOOD] (declare-fun s1 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (Seq Int) (seq.map (lambda ((l1_s0 Int))-         (let ((l1_s1 (* l1_s0 l1_s0)))-         (let ((l1_s2 (+ l1_s0 l1_s1)))-         (let ((l1_s3 (* l1_s0 l1_s1)))-         (let ((l1_s4 (+ l1_s2 l1_s3)))-         (let ((l1_s5 (* l1_s1 l1_s1)))-         (let ((l1_s6 (+ l1_s4 l1_s5)))-         (let ((l1_s7 (* l1_s0 l1_s5)))-         (let ((l1_s8 (+ l1_s6 l1_s7)))-         (let ((l1_s9 (* l1_s1 l1_s5)))-         (let ((l1_s10 (+ l1_s8 l1_s9)))-         (let ((l1_s11 (* l1_s0 l1_s9)))-         (let ((l1_s12 (+ l1_s10 l1_s11)))-         (let ((l1_s13 (* l1_s5 l1_s5)))-         (let ((l1_s14 (+ l1_s12 l1_s13)))-         (let ((l1_s15 (* l1_s0 l1_s13)))-         (let ((l1_s16 (+ l1_s14 l1_s15)))-         (let ((l1_s17 (* l1_s1 l1_s13)))-         (let ((l1_s18 (+ l1_s16 l1_s17)))-         l1_s18))))))))))))))))))) s0))+                                 (let ((l1_s1 (* l1_s0 l1_s0)))+                                 (let ((l1_s2 (+ l1_s0 l1_s1)))+                                 (let ((l1_s3 (* l1_s0 l1_s1)))+                                 (let ((l1_s4 (+ l1_s2 l1_s3)))+                                 (let ((l1_s5 (* l1_s1 l1_s1)))+                                 (let ((l1_s6 (+ l1_s4 l1_s5)))+                                 (let ((l1_s7 (* l1_s0 l1_s5)))+                                 (let ((l1_s8 (+ l1_s6 l1_s7)))+                                 (let ((l1_s9 (* l1_s1 l1_s5)))+                                 (let ((l1_s10 (+ l1_s8 l1_s9)))+                                 (let ((l1_s11 (* l1_s0 l1_s9)))+                                 (let ((l1_s12 (+ l1_s10 l1_s11)))+                                 (let ((l1_s13 (* l1_s5 l1_s5)))+                                 (let ((l1_s14 (+ l1_s12 l1_s13)))+                                 (let ((l1_s15 (* l1_s0 l1_s13)))+                                 (let ((l1_s16 (+ l1_s14 l1_s15)))+                                 (let ((l1_s17 (* l1_s1 l1_s13)))+                                 (let ((l1_s18 (+ l1_s16 l1_s17)))+                                 l1_s18))))))))))))))))))) s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda07.gold view
@@ -20,21 +20,18 @@ [GOOD] (declare-fun s1 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s5 () (Seq Int) (seq.map (lambda ((l1_s0 (Seq Int)))-         (let ((l1_s1 0))-         (let ((l1_s2 (seq.foldl (lambda ((l2_s0 Int) (l2_s1 Int))+                                 (let ((l1_s1 0))+                                 (let ((l1_s2 (seq.foldl (lambda ((l2_s0 Int) (l2_s1 Int))          (+ l2_s0 l2_s1)) l1_s1 l1_s0)))-         l1_s2))) s0))+                                 l1_s2))) s0)) [GOOD] (define-fun s6 () Int (seq.foldl (lambda ((l1_s0 Int) (l1_s1 Int))          (+ l1_s0 l1_s1)) s4 s5)) [GOOD] (define-fun s7 () Bool (= s1 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda08.gold view
@@ -19,18 +19,15 @@ [GOOD] (declare-fun s1 () (Seq (_ FloatingPoint  8 24))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (Seq (_ FloatingPoint  8 24)) (seq.map (lambda ((l1_s0 (_ FloatingPoint  8 24)))-         (let ((l1_s1 ((_ to_fp 8 24) roundNearestTiesToEven (/ 1.0 1.0))))-         (let ((l1_s2 (fp.add roundNearestTiesToEven l1_s0 l1_s1)))-         l1_s2))) s0))+                                 (let ((l1_s1 ((_ to_fp 8 24) roundNearestTiesToEven (/ 1.0 1.0))))+                                 (let ((l1_s2 (fp.add roundNearestTiesToEven l1_s0 l1_s1)))+                                 l1_s2))) s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda09.gold view
@@ -19,18 +19,15 @@ [GOOD] (declare-fun s1 () (Seq (_ BitVec 8))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (Seq (_ BitVec 8)) (seq.map (lambda ((l1_s0 (_ BitVec 8)))-         (let ((l1_s1 #x01))-         (let ((l1_s2 (bvadd l1_s0 l1_s1)))-         l1_s2))) s0))+                                 (let ((l1_s1 #x01))+                                 (let ((l1_s2 (bvadd l1_s0 l1_s1)))+                                 l1_s2))) s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda10.gold view
@@ -19,18 +19,15 @@ [GOOD] (declare-fun s1 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (Seq Int) (seq.map (lambda ((l1_s0 Int))-         (let ((l1_s1 1))-         (let ((l1_s2 (+ l1_s0 l1_s1)))-         l1_s2))) s0))+                                 (let ((l1_s1 1))+                                 (let ((l1_s2 (+ l1_s0 l1_s1)))+                                 l1_s2))) s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda11.gold view
@@ -19,18 +19,15 @@ [GOOD] (declare-fun s1 () (Seq (_ BitVec 8))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (Seq (_ BitVec 8)) (seq.map (lambda ((l1_s0 (_ BitVec 8)))-         (let ((l1_s1 #x01))-         (let ((l1_s2 (bvadd l1_s0 l1_s1)))-         l1_s2))) s0))+                                 (let ((l1_s1 #x01))+                                 (let ((l1_s2 (bvadd l1_s0 l1_s1)))+                                 l1_s2))) s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda12.gold view
@@ -19,7 +19,6 @@ [GOOD] (declare-fun s1 () (Seq (Seq Int))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -27,8 +26,6 @@ [GOOD] (define-fun s4 () (Seq (Seq Int)) (seq.map (lambda ((l1_s0 Int))          (seq.unit l1_s0)) s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda13.gold view
@@ -22,19 +22,16 @@ [GOOD] (declare-fun s1 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (Seq Int) (seq.map (lambda ((l1_s0 (SBVTuple2 Int Int)))-         (let ((l1_s1 (proj_1_SBVTuple2 l1_s0)))-         (let ((l1_s2 (proj_2_SBVTuple2 l1_s0)))-         (let ((l1_s3 (+ l1_s1 l1_s2)))-         l1_s3)))) s0))+                                 (let ((l1_s1 (proj_1_SBVTuple2 l1_s0)))+                                 (let ((l1_s2 (proj_2_SBVTuple2 l1_s0)))+                                 (let ((l1_s3 (+ l1_s1 l1_s2)))+                                 l1_s3)))) s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda14.gold view
@@ -20,7 +20,6 @@ [GOOD] (declare-fun s1 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -28,8 +27,6 @@ [GOOD] (define-fun s5 () (Seq Int) (seq.mapi (lambda ((l1_s0 Int) (l1_s1 Int))          (+ l1_s0 l1_s1)) s4 s0)) [GOOD] (define-fun s6 () Bool (= s1 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda15.gold view
@@ -20,7 +20,6 @@ [GOOD] (declare-fun s1 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -28,8 +27,6 @@ [GOOD] (define-fun s5 () Int (seq.foldl (lambda ((l1_s0 Int) (l1_s1 Int))          (+ l1_s0 l1_s1)) s4 s0)) [GOOD] (define-fun s6 () Bool (= s1 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda16.gold view
@@ -20,7 +20,6 @@ [GOOD] (declare-fun s1 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -28,8 +27,6 @@ [GOOD] (define-fun s5 () Int (seq.foldl (lambda ((l1_s0 Int) (l1_s1 Int))          (* l1_s0 l1_s1)) s4 s0)) [GOOD] (define-fun s6 () Bool (= s1 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda17.gold view
@@ -20,18 +20,15 @@ [GOOD] (declare-fun s1 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s5 () (Seq Int) (seq.foldl (lambda ((l1_s0 (Seq Int)) (l1_s1 Int))-         (let ((l1_s2 (seq.unit l1_s1)))-         (let ((l1_s3 (seq.++ l1_s2 l1_s0)))-         l1_s3))) s4 s0))+                                 (let ((l1_s2 (seq.unit l1_s1)))+                                 (let ((l1_s3 (seq.++ l1_s2 l1_s0)))+                                 l1_s3))) s4 s0)) [GOOD] (define-fun s6 () Bool (= s1 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda18.gold view
@@ -21,18 +21,15 @@ [GOOD] (declare-fun s1 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s6 () Int (seq.foldli (lambda ((l1_s0 Int) (l1_s1 Int) (l1_s2 Int))-         (let ((l1_s3 (+ l1_s0 l1_s1)))-         (let ((l1_s4 (+ l1_s2 l1_s3)))-         l1_s4))) s4 s5 s0))+                                 (let ((l1_s3 (+ l1_s0 l1_s1)))+                                 (let ((l1_s4 (+ l1_s2 l1_s3)))+                                 l1_s4))) s4 s5 s0)) [GOOD] (define-fun s7 () Bool (= s1 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda19.gold view
@@ -20,22 +20,19 @@ [GOOD] (declare-fun s1 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- SBV Function definitions-[GOOD] (define-fun-rec sbv.reverse_0 ((lst (Seq Int))) (Seq Int)+[GOOD] (define-fun-rec |sbv.reverse_[SInteger]| ((lst (Seq Int))) (Seq Int)                        (ite (= lst (as seq.empty (Seq Int)))                             (as seq.empty (Seq Int))-                            (seq.++ (sbv.reverse_0 (seq.extract lst 1 (- (seq.len lst) 1))) (seq.unit (seq.nth lst 0)))))+                            (seq.++ (|sbv.reverse_[SInteger]| (seq.extract lst 1 (- (seq.len lst) 1))) (seq.unit (seq.nth lst 0))))) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2))-[GOOD] (define-fun s5 () (Seq Int) (sbv.reverse_0 s0))+[GOOD] (define-fun s5 () (Seq Int) (|sbv.reverse_[SInteger]| s0)) [GOOD] (define-fun s6 () Int (seq.foldl (lambda ((l1_s0 Int) (l1_s1 Int))          (+ l1_s0 l1_s1)) s4 s5)) [GOOD] (define-fun s7 () Bool (= s1 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda20.gold view
@@ -20,22 +20,19 @@ [GOOD] (declare-fun s1 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- SBV Function definitions-[GOOD] (define-fun-rec sbv.reverse_0 ((lst (Seq Int))) (Seq Int)+[GOOD] (define-fun-rec |sbv.reverse_[SInteger]| ((lst (Seq Int))) (Seq Int)                        (ite (= lst (as seq.empty (Seq Int)))                             (as seq.empty (Seq Int))-                            (seq.++ (sbv.reverse_0 (seq.extract lst 1 (- (seq.len lst) 1))) (seq.unit (seq.nth lst 0)))))+                            (seq.++ (|sbv.reverse_[SInteger]| (seq.extract lst 1 (- (seq.len lst) 1))) (seq.unit (seq.nth lst 0))))) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2))-[GOOD] (define-fun s5 () (Seq Int) (sbv.reverse_0 s0))+[GOOD] (define-fun s5 () (Seq Int) (|sbv.reverse_[SInteger]| s0)) [GOOD] (define-fun s6 () Int (seq.foldl (lambda ((l1_s0 Int) (l1_s1 Int))          (* l1_s0 l1_s1)) s4 s5)) [GOOD] (define-fun s7 () Bool (= s1 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda21.gold view
@@ -20,24 +20,21 @@ [GOOD] (declare-fun s1 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- SBV Function definitions-[GOOD] (define-fun-rec sbv.reverse_0 ((lst (Seq Int))) (Seq Int)+[GOOD] (define-fun-rec |sbv.reverse_[SInteger]| ((lst (Seq Int))) (Seq Int)                        (ite (= lst (as seq.empty (Seq Int)))                             (as seq.empty (Seq Int))-                            (seq.++ (sbv.reverse_0 (seq.extract lst 1 (- (seq.len lst) 1))) (seq.unit (seq.nth lst 0)))))+                            (seq.++ (|sbv.reverse_[SInteger]| (seq.extract lst 1 (- (seq.len lst) 1))) (seq.unit (seq.nth lst 0))))) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2))-[GOOD] (define-fun s5 () (Seq Int) (sbv.reverse_0 s0))+[GOOD] (define-fun s5 () (Seq Int) (|sbv.reverse_[SInteger]| s0)) [GOOD] (define-fun s6 () (Seq Int) (seq.foldl (lambda ((l1_s0 (Seq Int)) (l1_s1 Int))-         (let ((l1_s2 (seq.unit l1_s1)))-         (let ((l1_s3 (seq.++ l1_s0 l1_s2)))-         l1_s3))) s4 s5))+                                 (let ((l1_s2 (seq.unit l1_s1)))+                                 (let ((l1_s3 (seq.++ l1_s0 l1_s2)))+                                 l1_s3))) s4 s5)) [GOOD] (define-fun s7 () Bool (= s1 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda22.gold view
@@ -26,7 +26,6 @@ [GOOD] (declare-fun s2 () (Seq (SBVTuple2 Int Int))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -42,14 +41,12 @@ [GOOD] (define-fun s16 () (Seq (SBVTuple2 Int Int)) (seq.mapi (lambda ((l1_s0 Int) (l1_s1 Int))          ((as mkSBVTuple2 (SBVTuple2 Int Int)) l1_s0 l1_s1)) s7 s15)) [GOOD] (define-fun s17 () (Seq (SBVTuple2 Int Int)) (seq.map (lambda ((l1_s0 (SBVTuple2 Int Int)))-         (let ((l1_s1 (proj_2_SBVTuple2 l1_s0)))-         (let ((l1_s2 (proj_1_SBVTuple2 l1_s0)))-         (let ((l1_s3 (seq.nth s1 l1_s2)))-         (let ((l1_s4 ((as mkSBVTuple2 (SBVTuple2 Int Int)) l1_s1 l1_s3)))-         l1_s4))))) s16))+                                 (let ((l1_s1 (proj_2_SBVTuple2 l1_s0)))+                                 (let ((l1_s2 (proj_1_SBVTuple2 l1_s0)))+                                 (let ((l1_s3 (seq.nth s1 l1_s2)))+                                 (let ((l1_s4 ((as mkSBVTuple2 (SBVTuple2 Int Int)) l1_s1 l1_s3)))+                                 l1_s4))))) s16)) [GOOD] (define-fun s18 () Bool (= s2 s17))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/lambda23.gold view
@@ -26,13 +26,12 @@ [GOOD] (declare-fun s2 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- SBV Function definitions-[GOOD] (define-fun-rec sbv.reverse_0 ((lst (Seq Int))) (Seq Int)+[GOOD] (define-fun-rec |sbv.reverse_[SInteger]| ((lst (Seq Int))) (Seq Int)                        (ite (= lst (as seq.empty (Seq Int)))                             (as seq.empty (Seq Int))-                            (seq.++ (sbv.reverse_0 (seq.extract lst 1 (- (seq.len lst) 1))) (seq.unit (seq.nth lst 0)))))+                            (seq.++ (|sbv.reverse_[SInteger]| (seq.extract lst 1 (- (seq.len lst) 1))) (seq.unit (seq.nth lst 0))))) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s4 () Bool (= s0 s3))@@ -47,22 +46,20 @@ [GOOD] (define-fun s16 () (Seq (SBVTuple2 Int Int)) (seq.mapi (lambda ((l1_s0 Int) (l1_s1 Int))          ((as mkSBVTuple2 (SBVTuple2 Int Int)) l1_s0 l1_s1)) s7 s15)) [GOOD] (define-fun s17 () (Seq (SBVTuple2 Int Int)) (seq.map (lambda ((l1_s0 (SBVTuple2 Int Int)))-         (let ((l1_s1 (proj_2_SBVTuple2 l1_s0)))-         (let ((l1_s2 (proj_1_SBVTuple2 l1_s0)))-         (let ((l1_s3 (seq.nth s1 l1_s2)))-         (let ((l1_s4 ((as mkSBVTuple2 (SBVTuple2 Int Int)) l1_s1 l1_s3)))-         l1_s4))))) s16))+                                 (let ((l1_s1 (proj_2_SBVTuple2 l1_s0)))+                                 (let ((l1_s2 (proj_1_SBVTuple2 l1_s0)))+                                 (let ((l1_s3 (seq.nth s1 l1_s2)))+                                 (let ((l1_s4 ((as mkSBVTuple2 (SBVTuple2 Int Int)) l1_s1 l1_s3)))+                                 l1_s4))))) s16)) [GOOD] (define-fun s18 () (Seq Int) (seq.map (lambda ((l1_s0 (SBVTuple2 Int Int)))-         (let ((l1_s1 (proj_1_SBVTuple2 l1_s0)))-         (let ((l1_s2 (proj_2_SBVTuple2 l1_s0)))-         (let ((l1_s3 (+ l1_s1 l1_s2)))-         l1_s3)))) s17))-[GOOD] (define-fun s19 () (Seq Int) (sbv.reverse_0 s18))+                                 (let ((l1_s1 (proj_1_SBVTuple2 l1_s0)))+                                 (let ((l1_s2 (proj_2_SBVTuple2 l1_s0)))+                                 (let ((l1_s3 (+ l1_s1 l1_s2)))+                                 l1_s3)))) s17))+[GOOD] (define-fun s19 () (Seq Int) (|sbv.reverse_[SInteger]| s18)) [GOOD] (define-fun s20 () Int (seq.foldl (lambda ((l1_s0 Int) (l1_s1 Int))          (+ l1_s0 l1_s1)) s7 s19)) [GOOD] (define-fun s21 () Bool (= s2 s20))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/lambda24.gold view
@@ -26,7 +26,6 @@ [GOOD] (declare-fun s2 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -42,14 +41,12 @@ [GOOD] (define-fun s16 () (Seq (SBVTuple2 Int Int)) (seq.mapi (lambda ((l1_s0 Int) (l1_s1 Int))          ((as mkSBVTuple2 (SBVTuple2 Int Int)) l1_s0 l1_s1)) s7 s15)) [GOOD] (define-fun s17 () (Seq Int) (seq.map (lambda ((l1_s0 (SBVTuple2 Int Int)))-         (let ((l1_s1 (proj_2_SBVTuple2 l1_s0)))-         (let ((l1_s2 (proj_1_SBVTuple2 l1_s0)))-         (let ((l1_s3 (seq.nth s1 l1_s2)))-         (let ((l1_s4 (+ l1_s1 l1_s3)))-         l1_s4))))) s16))+                                 (let ((l1_s1 (proj_2_SBVTuple2 l1_s0)))+                                 (let ((l1_s2 (proj_1_SBVTuple2 l1_s0)))+                                 (let ((l1_s3 (seq.nth s1 l1_s2)))+                                 (let ((l1_s4 (+ l1_s1 l1_s3)))+                                 l1_s4))))) s16)) [GOOD] (define-fun s18 () Bool (= s2 s17))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/lambda25.gold view
@@ -26,13 +26,12 @@ [GOOD] (declare-fun s2 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- SBV Function definitions-[GOOD] (define-fun-rec sbv.reverse_0 ((lst (Seq Int))) (Seq Int)+[GOOD] (define-fun-rec |sbv.reverse_[SInteger]| ((lst (Seq Int))) (Seq Int)                        (ite (= lst (as seq.empty (Seq Int)))                             (as seq.empty (Seq Int))-                            (seq.++ (sbv.reverse_0 (seq.extract lst 1 (- (seq.len lst) 1))) (seq.unit (seq.nth lst 0)))))+                            (seq.++ (|sbv.reverse_[SInteger]| (seq.extract lst 1 (- (seq.len lst) 1))) (seq.unit (seq.nth lst 0))))) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s4 () Bool (= s0 s3))@@ -47,17 +46,15 @@ [GOOD] (define-fun s16 () (Seq (SBVTuple2 Int Int)) (seq.mapi (lambda ((l1_s0 Int) (l1_s1 Int))          ((as mkSBVTuple2 (SBVTuple2 Int Int)) l1_s0 l1_s1)) s7 s15)) [GOOD] (define-fun s17 () (Seq Int) (seq.map (lambda ((l1_s0 (SBVTuple2 Int Int)))-         (let ((l1_s1 (proj_2_SBVTuple2 l1_s0)))-         (let ((l1_s2 (proj_1_SBVTuple2 l1_s0)))-         (let ((l1_s3 (seq.nth s1 l1_s2)))-         (let ((l1_s4 (+ l1_s1 l1_s3)))-         l1_s4))))) s16))-[GOOD] (define-fun s18 () (Seq Int) (sbv.reverse_0 s17))+                                 (let ((l1_s1 (proj_2_SBVTuple2 l1_s0)))+                                 (let ((l1_s2 (proj_1_SBVTuple2 l1_s0)))+                                 (let ((l1_s3 (seq.nth s1 l1_s2)))+                                 (let ((l1_s4 (+ l1_s1 l1_s3)))+                                 l1_s4))))) s16))+[GOOD] (define-fun s18 () (Seq Int) (|sbv.reverse_[SInteger]| s17)) [GOOD] (define-fun s19 () Int (seq.foldl (lambda ((l1_s0 Int) (l1_s1 Int))          (+ l1_s0 l1_s1)) s7 s18)) [GOOD] (define-fun s20 () Bool (= s2 s19))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/lambda26.gold view
@@ -20,7 +20,6 @@ [GOOD] (declare-fun s1 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -28,8 +27,6 @@ [GOOD] (define-fun s5 () (Seq Int) (seq.foldl (lambda ((l1_s0 (Seq Int)) (l1_s1 (Seq Int)))          (seq.++ l1_s0 l1_s1)) s4 s0)) [GOOD] (define-fun s6 () Bool (= s1 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda27.gold view
@@ -19,36 +19,33 @@ [GOOD] (declare-fun s1 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Bool (seq.foldl (lambda ((l1_s0 Bool) (l1_s1 Int))-         (let ((l1_s2 2))-         (let ((l1_s4 0))-         (let ((l1_s8 1))-         (let ((l1_s14 (- 1)))-         (let ((l1_s3 (mod l1_s1 l1_s2)))-         (let ((l1_s5 (>= l1_s1 l1_s4)))-         (let ((l1_s6 (= l1_s3 l1_s4)))-         (let ((l1_s7 (or l1_s5 l1_s6)))-         (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))-         (let ((l1_s10 (* l1_s2 l1_s9)))-         (let ((l1_s11 (- l1_s3 l1_s10)))-         (let ((l1_s12 (> l1_s11 l1_s4)))-         (let ((l1_s13 (< l1_s11 l1_s4)))-         (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))-         (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))-         (let ((l1_s17 (= l1_s14 l1_s16)))-         (let ((l1_s18 (+ l1_s2 l1_s11)))-         (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))-         (let ((l1_s20 (= l1_s4 l1_s19)))-         (let ((l1_s21 (and l1_s0 l1_s20)))-         l1_s21))))))))))))))))))))) true s0))+                                 (let ((l1_s2 2))+                                 (let ((l1_s4 0))+                                 (let ((l1_s8 1))+                                 (let ((l1_s14 (- 1)))+                                 (let ((l1_s3 (mod l1_s1 l1_s2)))+                                 (let ((l1_s5 (>= l1_s1 l1_s4)))+                                 (let ((l1_s6 (= l1_s3 l1_s4)))+                                 (let ((l1_s7 (or l1_s5 l1_s6)))+                                 (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))+                                 (let ((l1_s10 (* l1_s2 l1_s9)))+                                 (let ((l1_s11 (- l1_s3 l1_s10)))+                                 (let ((l1_s12 (> l1_s11 l1_s4)))+                                 (let ((l1_s13 (< l1_s11 l1_s4)))+                                 (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))+                                 (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))+                                 (let ((l1_s17 (= l1_s14 l1_s16)))+                                 (let ((l1_s18 (+ l1_s2 l1_s11)))+                                 (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))+                                 (let ((l1_s20 (= l1_s4 l1_s19)))+                                 (let ((l1_s21 (and l1_s0 l1_s20)))+                                 l1_s21))))))))))))))))))))) true s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda28.gold view
@@ -19,36 +19,33 @@ [GOOD] (declare-fun s1 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Bool (seq.foldl (lambda ((l1_s0 Bool) (l1_s1 Int))-         (let ((l1_s2 2))-         (let ((l1_s4 0))-         (let ((l1_s8 1))-         (let ((l1_s14 (- 1)))-         (let ((l1_s3 (mod l1_s1 l1_s2)))-         (let ((l1_s5 (>= l1_s1 l1_s4)))-         (let ((l1_s6 (= l1_s3 l1_s4)))-         (let ((l1_s7 (or l1_s5 l1_s6)))-         (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))-         (let ((l1_s10 (* l1_s2 l1_s9)))-         (let ((l1_s11 (- l1_s3 l1_s10)))-         (let ((l1_s12 (> l1_s11 l1_s4)))-         (let ((l1_s13 (< l1_s11 l1_s4)))-         (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))-         (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))-         (let ((l1_s17 (= l1_s14 l1_s16)))-         (let ((l1_s18 (+ l1_s2 l1_s11)))-         (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))-         (let ((l1_s20 (= l1_s4 l1_s19)))-         (let ((l1_s21 (and l1_s0 l1_s20)))-         l1_s21))))))))))))))))))))) true s0))+                                 (let ((l1_s2 2))+                                 (let ((l1_s4 0))+                                 (let ((l1_s8 1))+                                 (let ((l1_s14 (- 1)))+                                 (let ((l1_s3 (mod l1_s1 l1_s2)))+                                 (let ((l1_s5 (>= l1_s1 l1_s4)))+                                 (let ((l1_s6 (= l1_s3 l1_s4)))+                                 (let ((l1_s7 (or l1_s5 l1_s6)))+                                 (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))+                                 (let ((l1_s10 (* l1_s2 l1_s9)))+                                 (let ((l1_s11 (- l1_s3 l1_s10)))+                                 (let ((l1_s12 (> l1_s11 l1_s4)))+                                 (let ((l1_s13 (< l1_s11 l1_s4)))+                                 (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))+                                 (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))+                                 (let ((l1_s17 (= l1_s14 l1_s16)))+                                 (let ((l1_s18 (+ l1_s2 l1_s11)))+                                 (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))+                                 (let ((l1_s20 (= l1_s4 l1_s19)))+                                 (let ((l1_s21 (and l1_s0 l1_s20)))+                                 l1_s21))))))))))))))))))))) true s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda29.gold view
@@ -19,36 +19,33 @@ [GOOD] (declare-fun s1 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Bool (seq.foldl (lambda ((l1_s0 Bool) (l1_s1 Int))-         (let ((l1_s2 2))-         (let ((l1_s4 0))-         (let ((l1_s8 1))-         (let ((l1_s14 (- 1)))-         (let ((l1_s3 (mod l1_s1 l1_s2)))-         (let ((l1_s5 (>= l1_s1 l1_s4)))-         (let ((l1_s6 (= l1_s3 l1_s4)))-         (let ((l1_s7 (or l1_s5 l1_s6)))-         (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))-         (let ((l1_s10 (* l1_s2 l1_s9)))-         (let ((l1_s11 (- l1_s3 l1_s10)))-         (let ((l1_s12 (> l1_s11 l1_s4)))-         (let ((l1_s13 (< l1_s11 l1_s4)))-         (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))-         (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))-         (let ((l1_s17 (= l1_s14 l1_s16)))-         (let ((l1_s18 (+ l1_s2 l1_s11)))-         (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))-         (let ((l1_s20 (distinct l1_s4 l1_s19)))-         (let ((l1_s21 (or l1_s0 l1_s20)))-         l1_s21))))))))))))))))))))) false s0))+                                 (let ((l1_s2 2))+                                 (let ((l1_s4 0))+                                 (let ((l1_s8 1))+                                 (let ((l1_s14 (- 1)))+                                 (let ((l1_s3 (mod l1_s1 l1_s2)))+                                 (let ((l1_s5 (>= l1_s1 l1_s4)))+                                 (let ((l1_s6 (= l1_s3 l1_s4)))+                                 (let ((l1_s7 (or l1_s5 l1_s6)))+                                 (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))+                                 (let ((l1_s10 (* l1_s2 l1_s9)))+                                 (let ((l1_s11 (- l1_s3 l1_s10)))+                                 (let ((l1_s12 (> l1_s11 l1_s4)))+                                 (let ((l1_s13 (< l1_s11 l1_s4)))+                                 (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))+                                 (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))+                                 (let ((l1_s17 (= l1_s14 l1_s16)))+                                 (let ((l1_s18 (+ l1_s2 l1_s11)))+                                 (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))+                                 (let ((l1_s20 (distinct l1_s4 l1_s19)))+                                 (let ((l1_s21 (or l1_s0 l1_s20)))+                                 l1_s21))))))))))))))))))))) false s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda30.gold view
@@ -19,36 +19,33 @@ [GOOD] (declare-fun s1 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Bool (seq.foldl (lambda ((l1_s0 Bool) (l1_s1 Int))-         (let ((l1_s2 2))-         (let ((l1_s4 0))-         (let ((l1_s8 1))-         (let ((l1_s14 (- 1)))-         (let ((l1_s3 (mod l1_s1 l1_s2)))-         (let ((l1_s5 (>= l1_s1 l1_s4)))-         (let ((l1_s6 (= l1_s3 l1_s4)))-         (let ((l1_s7 (or l1_s5 l1_s6)))-         (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))-         (let ((l1_s10 (* l1_s2 l1_s9)))-         (let ((l1_s11 (- l1_s3 l1_s10)))-         (let ((l1_s12 (> l1_s11 l1_s4)))-         (let ((l1_s13 (< l1_s11 l1_s4)))-         (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))-         (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))-         (let ((l1_s17 (= l1_s14 l1_s16)))-         (let ((l1_s18 (+ l1_s2 l1_s11)))-         (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))-         (let ((l1_s20 (= l1_s4 l1_s19)))-         (let ((l1_s21 (or l1_s0 l1_s20)))-         l1_s21))))))))))))))))))))) false s0))+                                 (let ((l1_s2 2))+                                 (let ((l1_s4 0))+                                 (let ((l1_s8 1))+                                 (let ((l1_s14 (- 1)))+                                 (let ((l1_s3 (mod l1_s1 l1_s2)))+                                 (let ((l1_s5 (>= l1_s1 l1_s4)))+                                 (let ((l1_s6 (= l1_s3 l1_s4)))+                                 (let ((l1_s7 (or l1_s5 l1_s6)))+                                 (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))+                                 (let ((l1_s10 (* l1_s2 l1_s9)))+                                 (let ((l1_s11 (- l1_s3 l1_s10)))+                                 (let ((l1_s12 (> l1_s11 l1_s4)))+                                 (let ((l1_s13 (< l1_s11 l1_s4)))+                                 (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))+                                 (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))+                                 (let ((l1_s17 (= l1_s14 l1_s16)))+                                 (let ((l1_s18 (+ l1_s2 l1_s11)))+                                 (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))+                                 (let ((l1_s20 (= l1_s4 l1_s19)))+                                 (let ((l1_s21 (or l1_s0 l1_s20)))+                                 l1_s21))))))))))))))))))))) false s0)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda31.gold view
@@ -20,39 +20,36 @@ [GOOD] (declare-fun s1 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s5 () (Seq Int) (seq.foldl (lambda ((l1_s0 (Seq Int)) (l1_s1 Int))-         (let ((l1_s2 2))-         (let ((l1_s4 0))-         (let ((l1_s8 1))-         (let ((l1_s14 (- 1)))-         (let ((l1_s22 (as seq.empty (Seq Int))))-         (let ((l1_s3 (mod l1_s1 l1_s2)))-         (let ((l1_s5 (>= l1_s1 l1_s4)))-         (let ((l1_s6 (= l1_s3 l1_s4)))-         (let ((l1_s7 (or l1_s5 l1_s6)))-         (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))-         (let ((l1_s10 (* l1_s2 l1_s9)))-         (let ((l1_s11 (- l1_s3 l1_s10)))-         (let ((l1_s12 (> l1_s11 l1_s4)))-         (let ((l1_s13 (< l1_s11 l1_s4)))-         (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))-         (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))-         (let ((l1_s17 (= l1_s14 l1_s16)))-         (let ((l1_s18 (+ l1_s2 l1_s11)))-         (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))-         (let ((l1_s20 (= l1_s4 l1_s19)))-         (let ((l1_s21 (seq.unit l1_s1)))-         (let ((l1_s23 (ite l1_s20 l1_s21 l1_s22)))-         (let ((l1_s24 (seq.++ l1_s0 l1_s23)))-         l1_s24)))))))))))))))))))))))) s4 s0))+                                 (let ((l1_s2 2))+                                 (let ((l1_s4 0))+                                 (let ((l1_s8 1))+                                 (let ((l1_s14 (- 1)))+                                 (let ((l1_s22 (as seq.empty (Seq Int))))+                                 (let ((l1_s3 (mod l1_s1 l1_s2)))+                                 (let ((l1_s5 (>= l1_s1 l1_s4)))+                                 (let ((l1_s6 (= l1_s3 l1_s4)))+                                 (let ((l1_s7 (or l1_s5 l1_s6)))+                                 (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))+                                 (let ((l1_s10 (* l1_s2 l1_s9)))+                                 (let ((l1_s11 (- l1_s3 l1_s10)))+                                 (let ((l1_s12 (> l1_s11 l1_s4)))+                                 (let ((l1_s13 (< l1_s11 l1_s4)))+                                 (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))+                                 (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))+                                 (let ((l1_s17 (= l1_s14 l1_s16)))+                                 (let ((l1_s18 (+ l1_s2 l1_s11)))+                                 (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))+                                 (let ((l1_s20 (= l1_s4 l1_s19)))+                                 (let ((l1_s21 (seq.unit l1_s1)))+                                 (let ((l1_s23 (ite l1_s20 l1_s21 l1_s22)))+                                 (let ((l1_s24 (seq.++ l1_s0 l1_s23)))+                                 l1_s24)))))))))))))))))))))))) s4 s0)) [GOOD] (define-fun s6 () Bool (= s1 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda32.gold view
@@ -20,39 +20,36 @@ [GOOD] (declare-fun s1 () (Seq Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s5 () (Seq Int) (seq.foldl (lambda ((l1_s0 (Seq Int)) (l1_s1 Int))-         (let ((l1_s2 2))-         (let ((l1_s4 0))-         (let ((l1_s8 1))-         (let ((l1_s14 (- 1)))-         (let ((l1_s22 (as seq.empty (Seq Int))))-         (let ((l1_s3 (mod l1_s1 l1_s2)))-         (let ((l1_s5 (>= l1_s1 l1_s4)))-         (let ((l1_s6 (= l1_s3 l1_s4)))-         (let ((l1_s7 (or l1_s5 l1_s6)))-         (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))-         (let ((l1_s10 (* l1_s2 l1_s9)))-         (let ((l1_s11 (- l1_s3 l1_s10)))-         (let ((l1_s12 (> l1_s11 l1_s4)))-         (let ((l1_s13 (< l1_s11 l1_s4)))-         (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))-         (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))-         (let ((l1_s17 (= l1_s14 l1_s16)))-         (let ((l1_s18 (+ l1_s2 l1_s11)))-         (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))-         (let ((l1_s20 (distinct l1_s4 l1_s19)))-         (let ((l1_s21 (seq.unit l1_s1)))-         (let ((l1_s23 (ite l1_s20 l1_s21 l1_s22)))-         (let ((l1_s24 (seq.++ l1_s0 l1_s23)))-         l1_s24)))))))))))))))))))))))) s4 s0))+                                 (let ((l1_s2 2))+                                 (let ((l1_s4 0))+                                 (let ((l1_s8 1))+                                 (let ((l1_s14 (- 1)))+                                 (let ((l1_s22 (as seq.empty (Seq Int))))+                                 (let ((l1_s3 (mod l1_s1 l1_s2)))+                                 (let ((l1_s5 (>= l1_s1 l1_s4)))+                                 (let ((l1_s6 (= l1_s3 l1_s4)))+                                 (let ((l1_s7 (or l1_s5 l1_s6)))+                                 (let ((l1_s9 (ite l1_s7 l1_s4 l1_s8)))+                                 (let ((l1_s10 (* l1_s2 l1_s9)))+                                 (let ((l1_s11 (- l1_s3 l1_s10)))+                                 (let ((l1_s12 (> l1_s11 l1_s4)))+                                 (let ((l1_s13 (< l1_s11 l1_s4)))+                                 (let ((l1_s15 (ite l1_s13 l1_s14 l1_s11)))+                                 (let ((l1_s16 (ite l1_s12 l1_s8 l1_s15)))+                                 (let ((l1_s17 (= l1_s14 l1_s16)))+                                 (let ((l1_s18 (+ l1_s2 l1_s11)))+                                 (let ((l1_s19 (ite l1_s17 l1_s18 l1_s11)))+                                 (let ((l1_s20 (distinct l1_s4 l1_s19)))+                                 (let ((l1_s21 (seq.unit l1_s1)))+                                 (let ((l1_s23 (ite l1_s20 l1_s21 l1_s22)))+                                 (let ((l1_s24 (seq.++ l1_s0 l1_s23)))+                                 l1_s24)))))))))))))))))))))))) s4 s0)) [GOOD] (define-fun s6 () Bool (= s1 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda34.gold view
@@ -1,4 +1,4 @@ (lambda ((l1_s0 (_ BitVec 8)))-  (let ((l1_s1 #x01))-  (let ((l1_s2 (bvadd l1_s0 l1_s1)))-  l1_s2)))+                          (let ((l1_s1 #x01))+                          (let ((l1_s2 (bvadd l1_s0 l1_s1)))+                          l1_s2)))
SBVTestSuite/GoldFiles/lambda36.gold view
@@ -1,3 +1,3 @@ ; user defined axiom:  (assert (forall ((l1_s0 Bool))-    true))+                            true))
SBVTestSuite/GoldFiles/lambda38.gold view
@@ -1,6 +1,6 @@ ; user defined axiom:  (assert (forall ((l1_s0 Int) (l1_s1 Bool))-    (let ((l1_s2 0))-    (let ((l1_s3 (= l1_s0 l1_s2)))-    (let ((l1_s4 (or l1_s1 l1_s3)))-    l1_s4)))))+                            (let ((l1_s2 0))+                            (let ((l1_s3 (= l1_s0 l1_s2)))+                            (let ((l1_s4 (or l1_s1 l1_s3)))+                            l1_s4)))))
SBVTestSuite/GoldFiles/lambda41.gold view
@@ -1,5 +1,5 @@ ; lambda41 :: SInteger -> SInteger (define-fun lambda41 ((l1_s0 Int)) Int-  (let ((l1_s1 1))-  (let ((l1_s2 (+ l1_s0 l1_s1)))-  l1_s2)))+                          (let ((l1_s1 1))+                          (let ((l1_s2 (+ l1_s0 l1_s1)))+                          l1_s2)))
SBVTestSuite/GoldFiles/lambda44.gold view
@@ -1,5 +1,5 @@ ; lambda44 :: SWord32 -> SWord32 (define-fun lambda44 ((l1_s0 (_ BitVec 32))) (_ BitVec 32)-  (let ((l1_s1 #x00000001))-  (let ((l1_s2 (bvadd l1_s0 l1_s1)))-  l1_s2)))+                          (let ((l1_s1 #x00000001))+                          (let ((l1_s2 (bvadd l1_s0 l1_s1)))+                          l1_s2)))
SBVTestSuite/GoldFiles/lambda46.gold view
@@ -15,19 +15,16 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; add1 :: SInteger -> SInteger [GOOD] (define-fun add1 ((l1_s0 Int)) Int-         (let ((l1_s1 1))-         (let ((l1_s2 (+ l1_s0 l1_s1)))-         l1_s2)))+                                 (let ((l1_s1 1))+                                 (let ((l1_s2 (+ l1_s0 l1_s1)))+                                 l1_s2))) [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (add1 s0)) [GOOD] (define-fun s3 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/lambda47.gold view
@@ -16,26 +16,23 @@ [GOOD] (declare-fun s1 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; sumToN :: SInteger -> SInteger [Recursive] [GOOD] (define-fun-rec sumToN ((l1_s0 Int)) Int-         (let ((l1_s1 0))-         (let ((l1_s3 1))-         (let ((l1_s2 (<= l1_s0 l1_s1)))-         (let ((l1_s4 (- l1_s0 l1_s3)))-         (let ((l1_s5 (sumToN l1_s4)))-         (let ((l1_s6 (+ l1_s0 l1_s5)))-         (let ((l1_s7 (ite l1_s2 l1_s1 l1_s6)))-         l1_s7))))))))+                                 (let ((l1_s1 0))+                                 (let ((l1_s3 1))+                                 (let ((l1_s2 (<= l1_s0 l1_s1)))+                                 (let ((l1_s4 (- l1_s0 l1_s3)))+                                 (let ((l1_s5 (sumToN l1_s4)))+                                 (let ((l1_s6 (+ l1_s0 l1_s5)))+                                 (let ((l1_s7 (ite l1_s2 l1_s1 l1_s6)))+                                 l1_s7)))))))) [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Int (sumToN s0)) [GOOD] (define-fun s5 () Bool (= s1 s4)) [GOOD] (define-fun s6 () Bool (and s3 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s6)
SBVTestSuite/GoldFiles/lambda47_c.gold view
@@ -15,13 +15,10 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/lambda48.gold view
@@ -19,28 +19,25 @@ [GOOD] (declare-fun s1 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; list_length :: [SInteger] -> SInteger [Recursive] [GOOD] (define-fun-rec list_length ((l1_s0 (Seq Int))) Int-         (let ((l1_s2 0))-         (let ((l1_s4 1))-         (let ((l1_s1 (seq.len l1_s0)))-         (let ((l1_s3 (= l1_s1 l1_s2)))-         (let ((l1_s5 (- l1_s1 l1_s4)))-         (let ((l1_s6 (seq.extract l1_s0 l1_s4 l1_s5)))-         (let ((l1_s7 (list_length l1_s6)))-         (let ((l1_s8 (+ l1_s4 l1_s7)))-         (let ((l1_s9 (ite l1_s3 l1_s2 l1_s8)))-         l1_s9))))))))))+                                 (let ((l1_s2 0))+                                 (let ((l1_s4 1))+                                 (let ((l1_s1 (seq.len l1_s0)))+                                 (let ((l1_s3 (= l1_s1 l1_s2)))+                                 (let ((l1_s5 (- l1_s1 l1_s4)))+                                 (let ((l1_s6 (seq.extract l1_s0 l1_s4 l1_s5)))+                                 (let ((l1_s7 (list_length l1_s6)))+                                 (let ((l1_s8 (+ l1_s4 l1_s7)))+                                 (let ((l1_s9 (ite l1_s3 l1_s2 l1_s8)))+                                 l1_s9)))))))))) [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Int (list_length s0)) [GOOD] (define-fun s5 () Bool (= s1 s4)) [GOOD] (define-fun s6 () Bool (and s3 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s6)
SBVTestSuite/GoldFiles/lambda48_c.gold view
@@ -15,13 +15,10 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/lambda49.gold view
@@ -22,34 +22,31 @@ [GOOD] (declare-fun s1 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; isEvenOdd :: SInteger -> (SBool, SBool) [Recursive] [GOOD] (define-fun-rec isEvenOdd ((l1_s0 Int)) (SBVTuple2 Bool Bool)-         (let ((l1_s1 0))-         (let ((l1_s6 (mkSBVTuple2 true false)))-         (let ((l1_s7 1))-         (let ((l1_s2 (< l1_s0 l1_s1)))-         (let ((l1_s3 (- l1_s0)))-         (let ((l1_s4 (isEvenOdd l1_s3)))-         (let ((l1_s5 (= l1_s0 l1_s1)))-         (let ((l1_s8 (- l1_s0 l1_s7)))-         (let ((l1_s9 (isEvenOdd l1_s8)))-         (let ((l1_s10 (proj_2_SBVTuple2 l1_s9)))-         (let ((l1_s11 (proj_1_SBVTuple2 l1_s9)))-         (let ((l1_s12 ((as mkSBVTuple2 (SBVTuple2 Bool Bool)) l1_s10 l1_s11)))-         (let ((l1_s13 (ite l1_s5 l1_s6 l1_s12)))-         (let ((l1_s14 (ite l1_s2 l1_s4 l1_s13)))-         l1_s14)))))))))))))))+                                 (let ((l1_s1 0))+                                 (let ((l1_s6 (mkSBVTuple2 true false)))+                                 (let ((l1_s7 1))+                                 (let ((l1_s2 (< l1_s0 l1_s1)))+                                 (let ((l1_s3 (- l1_s0)))+                                 (let ((l1_s4 (isEvenOdd l1_s3)))+                                 (let ((l1_s5 (= l1_s0 l1_s1)))+                                 (let ((l1_s8 (- l1_s0 l1_s7)))+                                 (let ((l1_s9 (isEvenOdd l1_s8)))+                                 (let ((l1_s10 (proj_2_SBVTuple2 l1_s9)))+                                 (let ((l1_s11 (proj_1_SBVTuple2 l1_s9)))+                                 (let ((l1_s12 ((as mkSBVTuple2 (SBVTuple2 Bool Bool)) l1_s10 l1_s11)))+                                 (let ((l1_s13 (ite l1_s5 l1_s6 l1_s12)))+                                 (let ((l1_s14 (ite l1_s2 l1_s4 l1_s13)))+                                 l1_s14))))))))))))))) [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (SBVTuple2 Bool Bool) (isEvenOdd s0)) [GOOD] (define-fun s5 () Bool (proj_1_SBVTuple2 s4)) [GOOD] (define-fun s6 () Bool (= s1 s5)) [GOOD] (define-fun s7 () Bool (and s3 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s7)
SBVTestSuite/GoldFiles/lambda49_c.gold view
@@ -14,12 +14,9 @@ [GOOD] (declare-fun s0 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda50.gold view
@@ -22,34 +22,31 @@ [GOOD] (declare-fun s1 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; isEvenOdd :: SInteger -> (SBool, SBool) [Recursive] [GOOD] (define-fun-rec isEvenOdd ((l1_s0 Int)) (SBVTuple2 Bool Bool)-         (let ((l1_s1 0))-         (let ((l1_s6 (mkSBVTuple2 true false)))-         (let ((l1_s7 1))-         (let ((l1_s2 (< l1_s0 l1_s1)))-         (let ((l1_s3 (- l1_s0)))-         (let ((l1_s4 (isEvenOdd l1_s3)))-         (let ((l1_s5 (= l1_s0 l1_s1)))-         (let ((l1_s8 (- l1_s0 l1_s7)))-         (let ((l1_s9 (isEvenOdd l1_s8)))-         (let ((l1_s10 (proj_2_SBVTuple2 l1_s9)))-         (let ((l1_s11 (proj_1_SBVTuple2 l1_s9)))-         (let ((l1_s12 ((as mkSBVTuple2 (SBVTuple2 Bool Bool)) l1_s10 l1_s11)))-         (let ((l1_s13 (ite l1_s5 l1_s6 l1_s12)))-         (let ((l1_s14 (ite l1_s2 l1_s4 l1_s13)))-         l1_s14)))))))))))))))+                                 (let ((l1_s1 0))+                                 (let ((l1_s6 (mkSBVTuple2 true false)))+                                 (let ((l1_s7 1))+                                 (let ((l1_s2 (< l1_s0 l1_s1)))+                                 (let ((l1_s3 (- l1_s0)))+                                 (let ((l1_s4 (isEvenOdd l1_s3)))+                                 (let ((l1_s5 (= l1_s0 l1_s1)))+                                 (let ((l1_s8 (- l1_s0 l1_s7)))+                                 (let ((l1_s9 (isEvenOdd l1_s8)))+                                 (let ((l1_s10 (proj_2_SBVTuple2 l1_s9)))+                                 (let ((l1_s11 (proj_1_SBVTuple2 l1_s9)))+                                 (let ((l1_s12 ((as mkSBVTuple2 (SBVTuple2 Bool Bool)) l1_s10 l1_s11)))+                                 (let ((l1_s13 (ite l1_s5 l1_s6 l1_s12)))+                                 (let ((l1_s14 (ite l1_s2 l1_s4 l1_s13)))+                                 l1_s14))))))))))))))) [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (SBVTuple2 Bool Bool) (isEvenOdd s0)) [GOOD] (define-fun s5 () Bool (proj_1_SBVTuple2 s4)) [GOOD] (define-fun s6 () Bool (= s1 s5)) [GOOD] (define-fun s7 () Bool (and s3 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s7)
SBVTestSuite/GoldFiles/lambda50_c.gold view
@@ -14,18 +14,15 @@ [GOOD] (declare-fun s0 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] (define-fun s1 () Bool (= false s0))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+[GOOD] (define-fun s1 () Bool (not s0)) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s1) [GOOD] (declare-fun s2 () Bool)-[GOOD] (define-fun s3 () Bool (= false s2))+[GOOD] (define-fun s3 () Bool (not s2)) [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/lambda51.gold view
@@ -22,34 +22,31 @@ [GOOD] (declare-fun s1 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; isEvenOdd :: SInteger -> (SBool, SBool) [Recursive] [GOOD] (define-fun-rec isEvenOdd ((l1_s0 Int)) (SBVTuple2 Bool Bool)-         (let ((l1_s1 0))-         (let ((l1_s6 (mkSBVTuple2 true false)))-         (let ((l1_s7 1))-         (let ((l1_s2 (< l1_s0 l1_s1)))-         (let ((l1_s3 (- l1_s0)))-         (let ((l1_s4 (isEvenOdd l1_s3)))-         (let ((l1_s5 (= l1_s0 l1_s1)))-         (let ((l1_s8 (- l1_s0 l1_s7)))-         (let ((l1_s9 (isEvenOdd l1_s8)))-         (let ((l1_s10 (proj_2_SBVTuple2 l1_s9)))-         (let ((l1_s11 (proj_1_SBVTuple2 l1_s9)))-         (let ((l1_s12 ((as mkSBVTuple2 (SBVTuple2 Bool Bool)) l1_s10 l1_s11)))-         (let ((l1_s13 (ite l1_s5 l1_s6 l1_s12)))-         (let ((l1_s14 (ite l1_s2 l1_s4 l1_s13)))-         l1_s14)))))))))))))))+                                 (let ((l1_s1 0))+                                 (let ((l1_s6 (mkSBVTuple2 true false)))+                                 (let ((l1_s7 1))+                                 (let ((l1_s2 (< l1_s0 l1_s1)))+                                 (let ((l1_s3 (- l1_s0)))+                                 (let ((l1_s4 (isEvenOdd l1_s3)))+                                 (let ((l1_s5 (= l1_s0 l1_s1)))+                                 (let ((l1_s8 (- l1_s0 l1_s7)))+                                 (let ((l1_s9 (isEvenOdd l1_s8)))+                                 (let ((l1_s10 (proj_2_SBVTuple2 l1_s9)))+                                 (let ((l1_s11 (proj_1_SBVTuple2 l1_s9)))+                                 (let ((l1_s12 ((as mkSBVTuple2 (SBVTuple2 Bool Bool)) l1_s10 l1_s11)))+                                 (let ((l1_s13 (ite l1_s5 l1_s6 l1_s12)))+                                 (let ((l1_s14 (ite l1_s2 l1_s4 l1_s13)))+                                 l1_s14))))))))))))))) [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (SBVTuple2 Bool Bool) (isEvenOdd s0)) [GOOD] (define-fun s5 () Bool (proj_2_SBVTuple2 s4)) [GOOD] (define-fun s6 () Bool (= s1 s5)) [GOOD] (define-fun s7 () Bool (and s3 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s7)
SBVTestSuite/GoldFiles/lambda51_c.gold view
@@ -14,18 +14,15 @@ [GOOD] (declare-fun s0 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] (define-fun s1 () Bool (= false s0))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+[GOOD] (define-fun s1 () Bool (not s0)) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s1) [GOOD] (declare-fun s2 () Bool)-[GOOD] (define-fun s3 () Bool (= false s2))+[GOOD] (define-fun s3 () Bool (not s2)) [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/lambda52.gold view
@@ -22,34 +22,31 @@ [GOOD] (declare-fun s1 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; isEvenOdd :: SInteger -> (SBool, SBool) [Recursive] [GOOD] (define-fun-rec isEvenOdd ((l1_s0 Int)) (SBVTuple2 Bool Bool)-         (let ((l1_s1 0))-         (let ((l1_s6 (mkSBVTuple2 true false)))-         (let ((l1_s7 1))-         (let ((l1_s2 (< l1_s0 l1_s1)))-         (let ((l1_s3 (- l1_s0)))-         (let ((l1_s4 (isEvenOdd l1_s3)))-         (let ((l1_s5 (= l1_s0 l1_s1)))-         (let ((l1_s8 (- l1_s0 l1_s7)))-         (let ((l1_s9 (isEvenOdd l1_s8)))-         (let ((l1_s10 (proj_2_SBVTuple2 l1_s9)))-         (let ((l1_s11 (proj_1_SBVTuple2 l1_s9)))-         (let ((l1_s12 ((as mkSBVTuple2 (SBVTuple2 Bool Bool)) l1_s10 l1_s11)))-         (let ((l1_s13 (ite l1_s5 l1_s6 l1_s12)))-         (let ((l1_s14 (ite l1_s2 l1_s4 l1_s13)))-         l1_s14)))))))))))))))+                                 (let ((l1_s1 0))+                                 (let ((l1_s6 (mkSBVTuple2 true false)))+                                 (let ((l1_s7 1))+                                 (let ((l1_s2 (< l1_s0 l1_s1)))+                                 (let ((l1_s3 (- l1_s0)))+                                 (let ((l1_s4 (isEvenOdd l1_s3)))+                                 (let ((l1_s5 (= l1_s0 l1_s1)))+                                 (let ((l1_s8 (- l1_s0 l1_s7)))+                                 (let ((l1_s9 (isEvenOdd l1_s8)))+                                 (let ((l1_s10 (proj_2_SBVTuple2 l1_s9)))+                                 (let ((l1_s11 (proj_1_SBVTuple2 l1_s9)))+                                 (let ((l1_s12 ((as mkSBVTuple2 (SBVTuple2 Bool Bool)) l1_s10 l1_s11)))+                                 (let ((l1_s13 (ite l1_s5 l1_s6 l1_s12)))+                                 (let ((l1_s14 (ite l1_s2 l1_s4 l1_s13)))+                                 l1_s14))))))))))))))) [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () (SBVTuple2 Bool Bool) (isEvenOdd s0)) [GOOD] (define-fun s5 () Bool (proj_2_SBVTuple2 s4)) [GOOD] (define-fun s6 () Bool (= s1 s5)) [GOOD] (define-fun s7 () Bool (and s3 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s7)
SBVTestSuite/GoldFiles/lambda52_c.gold view
@@ -14,12 +14,9 @@ [GOOD] (declare-fun s0 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda53.gold view
@@ -14,7 +14,6 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; foo :: SInteger -> SInteger@@ -23,8 +22,6 @@ [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (foo s0)) [GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/lambda54.gold view
@@ -14,27 +14,24 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; bar :: SInteger -> SInteger [GOOD] (define-fun bar ((l1_s0 Int)) Int-         (let ((l1_s1 1))-         (let ((l1_s2 (+ l1_s0 l1_s1)))-         l1_s2)))+                                 (let ((l1_s1 1))+                                 (let ((l1_s2 (+ l1_s0 l1_s1)))+                                 l1_s2))) [GOOD] ; foo :: SInteger -> SInteger [Refers to: bar] [GOOD] (define-fun foo ((l1_s0 Int)) Int-         (let ((l1_s2 1))-         (let ((l1_s1 (bar l1_s0)))-         (let ((l1_s3 (+ l1_s1 l1_s2)))-         l1_s3))))+                                 (let ((l1_s2 1))+                                 (let ((l1_s1 (bar l1_s0)))+                                 (let ((l1_s3 (+ l1_s1 l1_s2)))+                                 l1_s3)))) [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (bar s0)) [GOOD] (define-fun s2 () Int (foo s0)) [GOOD] (define-fun s3 () Int (+ s1 s2)) [GOOD] (define-fun s4 () Bool (= s0 s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/lambda55.gold view
@@ -14,27 +14,24 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; bar :: SInteger -> SInteger [GOOD] (define-fun bar ((l2_s0 Int)) Int-         (let ((l2_s1 1))-         (let ((l2_s2 (+ l2_s0 l2_s1)))-         l2_s2)))+                                                 (let ((l2_s1 1))+                                                 (let ((l2_s2 (+ l2_s0 l2_s1)))+                                                 l2_s2))) [GOOD] ; foo :: SInteger -> SInteger [Refers to: bar] [GOOD] (define-fun foo ((l1_s0 Int)) Int-         (let ((l1_s2 1))-         (let ((l1_s1 (bar l1_s0)))-         (let ((l1_s3 (+ l1_s1 l1_s2)))-         l1_s3))))+                                 (let ((l1_s2 1))+                                 (let ((l1_s1 (bar l1_s0)))+                                 (let ((l1_s3 (+ l1_s1 l1_s2)))+                                 l1_s3)))) [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (foo s0)) [GOOD] (define-fun s2 () Int (bar s0)) [GOOD] (define-fun s3 () Int (+ s1 s2)) [GOOD] (define-fun s4 () Bool (= s0 s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/lambda56.gold view
@@ -14,7 +14,6 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; bar :: SInteger -> SInteger, foo :: SInteger -> SInteger@@ -22,22 +21,20 @@          ((bar ((l2_s0 Int)) Int)           (foo ((l1_s0 Int)) Int))          (; Definition of: bar :: SInteger -> SInteger. [Refers to: foo]-          (let ((l2_s2 1))-          (let ((l2_s1 (foo l2_s0)))-          (let ((l2_s3 (+ l2_s1 l2_s2)))-          l2_s3)))+                                                  (let ((l2_s2 1))+                                                  (let ((l2_s1 (foo l2_s0)))+                                                  (let ((l2_s3 (+ l2_s1 l2_s2)))+                                                  l2_s3)))           ; Definition of: foo :: SInteger -> SInteger. [Refers to: bar]-          (let ((l1_s2 1))-          (let ((l1_s1 (bar l1_s0)))-          (let ((l1_s3 (+ l1_s1 l1_s2)))-          l1_s3)))))+                                  (let ((l1_s2 1))+                                  (let ((l1_s1 (bar l1_s0)))+                                  (let ((l1_s3 (+ l1_s1 l1_s2)))+                                  l1_s3))))) [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (foo s0)) [GOOD] (define-fun s2 () Int (bar s0)) [GOOD] (define-fun s3 () Int (+ s1 s2)) [GOOD] (define-fun s4 () Bool (= s0 s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/lambda57.gold view
@@ -14,7 +14,6 @@ [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; f1 :: SWord8 -> SWord8, f2 :: SWord8 -> SWord8, f3 :: SWord8 -> SWord8, f4 :: SWord8 -> SWord8@@ -24,62 +23,60 @@           (f3 ((l3_s0 (_ BitVec 8))) (_ BitVec 8))           (f4 ((l4_s0 (_ BitVec 8))) (_ BitVec 8)))          (; Definition of: f1 :: SWord8 -> SWord8. [Refers to: f1, f2]-          (let ((l1_s1 #x00))-          (let ((l1_s3 #x01))-          (let ((l1_s6 #x02))-          (let ((l1_s2 (= l1_s0 l1_s1)))-          (let ((l1_s4 (bvsub l1_s0 l1_s3)))-          (let ((l1_s5 (f1 l1_s4)))-          (let ((l1_s7 (bvsub l1_s0 l1_s6)))-          (let ((l1_s8 (f2 l1_s7)))-          (let ((l1_s9 (bvadd l1_s5 l1_s8)))-          (let ((l1_s10 (bvadd l1_s3 l1_s9)))-          (let ((l1_s11 (ite l1_s2 l1_s1 l1_s10)))-          l1_s11)))))))))))+                                  (let ((l1_s1 #x00))+                                  (let ((l1_s3 #x01))+                                  (let ((l1_s6 #x02))+                                  (let ((l1_s2 (= l1_s0 l1_s1)))+                                  (let ((l1_s4 (bvsub l1_s0 l1_s3)))+                                  (let ((l1_s5 (f1 l1_s4)))+                                  (let ((l1_s7 (bvsub l1_s0 l1_s6)))+                                  (let ((l1_s8 (f2 l1_s7)))+                                  (let ((l1_s9 (bvadd l1_s5 l1_s8)))+                                  (let ((l1_s10 (bvadd l1_s3 l1_s9)))+                                  (let ((l1_s11 (ite l1_s2 l1_s1 l1_s10)))+                                  l1_s11)))))))))))           ; Definition of: f2 :: SWord8 -> SWord8. [Refers to: f2, f3]-          (let ((l2_s1 #x00))-          (let ((l2_s3 #x01))-          (let ((l2_s6 #x02))-          (let ((l2_s2 (= l2_s0 l2_s1)))-          (let ((l2_s4 (bvsub l2_s0 l2_s3)))-          (let ((l2_s5 (f2 l2_s4)))-          (let ((l2_s7 (bvsub l2_s0 l2_s6)))-          (let ((l2_s8 (f3 l2_s7)))-          (let ((l2_s9 (bvadd l2_s5 l2_s8)))-          (let ((l2_s10 (bvadd l2_s3 l2_s9)))-          (let ((l2_s11 (ite l2_s2 l2_s1 l2_s10)))-          l2_s11)))))))))))+                                                  (let ((l2_s1 #x00))+                                                  (let ((l2_s3 #x01))+                                                  (let ((l2_s6 #x02))+                                                  (let ((l2_s2 (= l2_s0 l2_s1)))+                                                  (let ((l2_s4 (bvsub l2_s0 l2_s3)))+                                                  (let ((l2_s5 (f2 l2_s4)))+                                                  (let ((l2_s7 (bvsub l2_s0 l2_s6)))+                                                  (let ((l2_s8 (f3 l2_s7)))+                                                  (let ((l2_s9 (bvadd l2_s5 l2_s8)))+                                                  (let ((l2_s10 (bvadd l2_s3 l2_s9)))+                                                  (let ((l2_s11 (ite l2_s2 l2_s1 l2_s10)))+                                                  l2_s11)))))))))))           ; Definition of: f3 :: SWord8 -> SWord8. [Refers to: f3, f4]-          (let ((l3_s1 #x00))-          (let ((l3_s3 #x01))-          (let ((l3_s6 #x02))-          (let ((l3_s2 (= l3_s0 l3_s1)))-          (let ((l3_s4 (bvsub l3_s0 l3_s3)))-          (let ((l3_s5 (f3 l3_s4)))-          (let ((l3_s7 (bvsub l3_s0 l3_s6)))-          (let ((l3_s8 (f4 l3_s7)))-          (let ((l3_s9 (bvadd l3_s5 l3_s8)))-          (let ((l3_s10 (bvadd l3_s3 l3_s9)))-          (let ((l3_s11 (ite l3_s2 l3_s1 l3_s10)))-          l3_s11)))))))))))+                                                                  (let ((l3_s1 #x00))+                                                                  (let ((l3_s3 #x01))+                                                                  (let ((l3_s6 #x02))+                                                                  (let ((l3_s2 (= l3_s0 l3_s1)))+                                                                  (let ((l3_s4 (bvsub l3_s0 l3_s3)))+                                                                  (let ((l3_s5 (f3 l3_s4)))+                                                                  (let ((l3_s7 (bvsub l3_s0 l3_s6)))+                                                                  (let ((l3_s8 (f4 l3_s7)))+                                                                  (let ((l3_s9 (bvadd l3_s5 l3_s8)))+                                                                  (let ((l3_s10 (bvadd l3_s3 l3_s9)))+                                                                  (let ((l3_s11 (ite l3_s2 l3_s1 l3_s10)))+                                                                  l3_s11)))))))))))           ; Definition of: f4 :: SWord8 -> SWord8. [Refers to: f4, f1]-          (let ((l4_s1 #x00))-          (let ((l4_s3 #x01))-          (let ((l4_s6 #x02))-          (let ((l4_s2 (= l4_s0 l4_s1)))-          (let ((l4_s4 (bvsub l4_s0 l4_s3)))-          (let ((l4_s5 (f4 l4_s4)))-          (let ((l4_s7 (bvsub l4_s0 l4_s6)))-          (let ((l4_s8 (f1 l4_s7)))-          (let ((l4_s9 (bvadd l4_s5 l4_s8)))-          (let ((l4_s10 (bvadd l4_s3 l4_s9)))-          (let ((l4_s11 (ite l4_s2 l4_s1 l4_s10)))-          l4_s11)))))))))))))+                                                                                  (let ((l4_s1 #x00))+                                                                                  (let ((l4_s3 #x01))+                                                                                  (let ((l4_s6 #x02))+                                                                                  (let ((l4_s2 (= l4_s0 l4_s1)))+                                                                                  (let ((l4_s4 (bvsub l4_s0 l4_s3)))+                                                                                  (let ((l4_s5 (f4 l4_s4)))+                                                                                  (let ((l4_s7 (bvsub l4_s0 l4_s6)))+                                                                                  (let ((l4_s8 (f1 l4_s7)))+                                                                                  (let ((l4_s9 (bvadd l4_s5 l4_s8)))+                                                                                  (let ((l4_s10 (bvadd l4_s3 l4_s9)))+                                                                                  (let ((l4_s11 (ite l4_s2 l4_s1 l4_s10)))+                                                                                  l4_s11))))))))))))) [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () (_ BitVec 8) (f1 s0)) [GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/lambda58.gold view
@@ -1,5 +1,5 @@ ; user defined axiom:  (assert (forall ((l1_s0 Bool)) (exists ((l1_s1 Bool))-    (let ((l1_s2 (not l1_s0)))-    (let ((l1_s3 (or l1_s1 l1_s2)))-    l1_s3)))))+                            (let ((l1_s2 (not l1_s0)))+                            (let ((l1_s3 (or l1_s1 l1_s2)))+                            l1_s3)))))
SBVTestSuite/GoldFiles/lambda59.gold view
@@ -1,6 +1,6 @@ ; user defined axiom:  (assert (forall ((l1_s0 Int)) (exists ((l1_s1 Bool))-    (let ((l1_s2 0))-    (let ((l1_s3 (= l1_s0 l1_s2)))-    (let ((l1_s4 (or l1_s1 l1_s3)))-    l1_s4))))))+                            (let ((l1_s2 0))+                            (let ((l1_s3 (= l1_s0 l1_s2)))+                            (let ((l1_s4 (or l1_s1 l1_s3)))+                            l1_s4))))))
SBVTestSuite/GoldFiles/lambda60.gold view
@@ -13,16 +13,13 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int)) (exists ((l1_s1 Int) (l1_s2 Int))-         (let ((l1_s3 (+ l1_s0 l1_s2)))-         (let ((l1_s4 (> l1_s1 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s3 (+ l1_s0 l1_s2)))+                                 (let ((l1_s4 (> l1_s1 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda61.gold view
@@ -13,14 +13,11 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8))) (exists ((l1_s1 (_ BitVec 8)))          (bvugt l1_s1 l1_s0))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda62.gold view
@@ -15,18 +15,15 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun D (P) Bool) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 P)) (forall ((l1_s1 P))-         (let ((l1_s2 (D l1_s0)))-         (let ((l1_s3 (D l1_s1)))-         (let ((l1_s4 (=> l1_s2 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (D l1_s0)))+                                 (let ((l1_s3 (D l1_s1)))+                                 (let ((l1_s4 (=> l1_s2 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/lambda63.gold view
@@ -13,15 +13,12 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun R (Int Int) Bool) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int))          (R l1_s0 l1_s0)))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/lambda64.gold view
@@ -13,23 +13,20 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun R (Int Int) Bool) [GOOD] (declare-fun __internal_sbv_IsPartialOrder__poR_ (Int Int) Bool) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int) (l1_s1 Int))-         (let ((l1_s2 (R l1_s0 l1_s1)))-         (let ((l1_s3 (__internal_sbv_IsPartialOrder__poR_ l1_s0 l1_s1)))-         (let ((l1_s4 (= l1_s2 l1_s3)))-         l1_s4)))))+                                 (let ((l1_s2 (R l1_s0 l1_s1)))+                                 (let ((l1_s3 (__internal_sbv_IsPartialOrder__poR_ l1_s0 l1_s1)))+                                 (let ((l1_s4 (= l1_s2 l1_s3)))+                                 l1_s4))))) [GOOD] (define-fun s1 () Bool (forall ((x Int) (y Int)) (= (__internal_sbv_IsPartialOrder__poR_ x y) ((_ partial-order 0) x y)))) [GOOD] (define-fun s2 () Bool (forall ((l1_s0 Int))          (R l1_s0 l1_s0))) [GOOD] (define-fun s3 () Bool (=> s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda65.gold view
@@ -13,7 +13,6 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun __internal_sbv_IsPartialOrder__poI_ (Int Int) Bool) [GOOD] ; --- user defined functions ---@@ -22,16 +21,14 @@          (<= l2_s0 l2_s1)) [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int) (l1_s1 Int))-         (let ((l1_s2 (leq l1_s0 l1_s1)))-         (let ((l1_s3 (__internal_sbv_IsPartialOrder__poI_ l1_s0 l1_s1)))-         (let ((l1_s4 (= l1_s2 l1_s3)))-         l1_s4)))))+                                 (let ((l1_s2 (leq l1_s0 l1_s1)))+                                 (let ((l1_s3 (__internal_sbv_IsPartialOrder__poI_ l1_s0 l1_s1)))+                                 (let ((l1_s4 (= l1_s2 l1_s3)))+                                 l1_s4))))) [GOOD] (define-fun s1 () Bool (forall ((x Int) (y Int)) (= (__internal_sbv_IsPartialOrder__poI_ x y) ((_ partial-order 0) x y)))) [GOOD] (define-fun s2 () Bool (forall ((l1_s0 Int))          (leq l1_s0 l1_s0))) [GOOD] (define-fun s3 () Bool (=> s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda66.gold view
@@ -13,7 +13,6 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun U (Int Int) Bool) [GOOD] (declare-fun __internal_sbv__TransitiveClosure_tcU_ (Int Int) Bool)@@ -22,19 +21,17 @@ [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int) (l1_s1 Int))-         (let ((l1_s2 (U l1_s0 l1_s1)))-         (let ((l1_s3 (__internal_sbv__TransitiveClosure_tcU_ l1_s0 l1_s1)))-         (let ((l1_s4 (= l1_s2 l1_s3)))-         l1_s4)))))+                                 (let ((l1_s2 (U l1_s0 l1_s1)))+                                 (let ((l1_s3 (__internal_sbv__TransitiveClosure_tcU_ l1_s0 l1_s1)))+                                 (let ((l1_s4 (= l1_s2 l1_s3)))+                                 l1_s4))))) [GOOD] (define-fun s1 () Bool (forall ((l1_s0 Int) (l1_s1 Int) (l1_s2 Int))-         (let ((l1_s3 (U l1_s0 l1_s1)))-         (let ((l1_s4 (U l1_s1 l1_s2)))-         (let ((l1_s5 (and l1_s3 l1_s4)))-         (let ((l1_s6 (tcU l1_s0 l1_s2)))-         (let ((l1_s7 (=> l1_s5 l1_s6)))-         l1_s7)))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s3 (U l1_s0 l1_s1)))+                                 (let ((l1_s4 (U l1_s1 l1_s2)))+                                 (let ((l1_s5 (and l1_s3 l1_s4)))+                                 (let ((l1_s6 (tcU l1_s0 l1_s2)))+                                 (let ((l1_s7 (=> l1_s5 l1_s6)))+                                 l1_s7))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda67.gold view
@@ -13,7 +13,6 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun U ((_ BitVec 8) (_ BitVec 8)) Bool) [GOOD] (declare-fun __internal_sbv__TransitiveClosure_tcU_ ((_ BitVec 8) (_ BitVec 8)) Bool)@@ -22,19 +21,17 @@ [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (U l1_s0 l1_s1)))-         (let ((l1_s3 (__internal_sbv__TransitiveClosure_tcU_ l1_s0 l1_s1)))-         (let ((l1_s4 (= l1_s2 l1_s3)))-         l1_s4)))))+                                 (let ((l1_s2 (U l1_s0 l1_s1)))+                                 (let ((l1_s3 (__internal_sbv__TransitiveClosure_tcU_ l1_s0 l1_s1)))+                                 (let ((l1_s4 (= l1_s2 l1_s3)))+                                 l1_s4))))) [GOOD] (define-fun s1 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)) (l1_s2 (_ BitVec 8)))-         (let ((l1_s3 (U l1_s0 l1_s1)))-         (let ((l1_s4 (U l1_s1 l1_s2)))-         (let ((l1_s5 (and l1_s3 l1_s4)))-         (let ((l1_s6 (tcU l1_s0 l1_s2)))-         (let ((l1_s7 (=> l1_s5 l1_s6)))-         l1_s7)))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s3 (U l1_s0 l1_s1)))+                                 (let ((l1_s4 (U l1_s1 l1_s2)))+                                 (let ((l1_s5 (and l1_s3 l1_s4)))+                                 (let ((l1_s6 (tcU l1_s0 l1_s2)))+                                 (let ((l1_s7 (=> l1_s5 l1_s6)))+                                 l1_s7))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda68.gold view
@@ -13,21 +13,18 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun F (Int) Int) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int))-         (let ((l1_s2 2))-         (let ((l1_s4 3))-         (let ((l1_s1 (F l1_s0)))-         (let ((l1_s3 (* l1_s0 l1_s2)))-         (let ((l1_s5 (+ l1_s3 l1_s4)))-         (let ((l1_s6 (= l1_s1 l1_s5)))-         l1_s6))))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 2))+                                 (let ((l1_s4 3))+                                 (let ((l1_s1 (F l1_s0)))+                                 (let ((l1_s3 (* l1_s0 l1_s2)))+                                 (let ((l1_s5 (+ l1_s3 l1_s4)))+                                 (let ((l1_s6 (= l1_s1 l1_s5)))+                                 l1_s6)))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda69.gold view
@@ -13,22 +13,19 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun F (Int Int) Int) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int) (l1_s1 Int))-         (let ((l1_s3 2))-         (let ((l1_s5 3))-         (let ((l1_s2 (F l1_s0 l1_s1)))-         (let ((l1_s4 (* l1_s0 l1_s3)))-         (let ((l1_s6 (- l1_s5 l1_s1)))-         (let ((l1_s7 (+ l1_s4 l1_s6)))-         (let ((l1_s8 (= l1_s2 l1_s7)))-         l1_s8)))))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s3 2))+                                 (let ((l1_s5 3))+                                 (let ((l1_s2 (F l1_s0 l1_s1)))+                                 (let ((l1_s4 (* l1_s0 l1_s3)))+                                 (let ((l1_s6 (- l1_s5 l1_s1)))+                                 (let ((l1_s7 (+ l1_s4 l1_s6)))+                                 (let ((l1_s8 (= l1_s2 l1_s7)))+                                 l1_s8))))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda70.gold view
@@ -13,34 +13,31 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun x_eu1 (Int) Int) [GOOD] (declare-fun x_eu2 (Int) Int) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int))-         (let ((l1_s1 0))-         (let ((l1_s3 1))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         (let ((l1_s5 (or l1_s2 l1_s4)))-         (let ((l1_s6 (x_eu1 l1_s0)))-         (let ((l1_s7 (= l1_s1 l1_s6)))-         (let ((l1_s8 (= l1_s3 l1_s6)))-         (let ((l1_s9 (or l1_s7 l1_s8)))-         (let ((l1_s10 (x_eu2 l1_s0)))-         (let ((l1_s11 (= l1_s1 l1_s10)))-         (let ((l1_s12 (= l1_s3 l1_s10)))-         (let ((l1_s13 (or l1_s11 l1_s12)))-         (let ((l1_s14 (and l1_s9 l1_s13)))-         (let ((l1_s15 (= l1_s6 l1_s10)))-         (let ((l1_s16 (=> l1_s14 l1_s15)))-         (let ((l1_s17 (and l1_s5 l1_s16)))-         (let ((l1_s18 (not l1_s17)))-         l1_s18))))))))))))))))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s1 0))+                                 (let ((l1_s3 1))+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 (let ((l1_s5 (or l1_s2 l1_s4)))+                                 (let ((l1_s6 (x_eu1 l1_s0)))+                                 (let ((l1_s7 (= l1_s1 l1_s6)))+                                 (let ((l1_s8 (= l1_s3 l1_s6)))+                                 (let ((l1_s9 (or l1_s7 l1_s8)))+                                 (let ((l1_s10 (x_eu2 l1_s0)))+                                 (let ((l1_s11 (= l1_s1 l1_s10)))+                                 (let ((l1_s12 (= l1_s3 l1_s10)))+                                 (let ((l1_s13 (or l1_s11 l1_s12)))+                                 (let ((l1_s14 (and l1_s9 l1_s13)))+                                 (let ((l1_s15 (= l1_s6 l1_s10)))+                                 (let ((l1_s16 (=> l1_s14 l1_s15)))+                                 (let ((l1_s17 (and l1_s5 l1_s16)))+                                 (let ((l1_s18 (not l1_s17)))+                                 l1_s18)))))))))))))))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/lambda71.gold view
@@ -1,13 +1,13 @@ ; Automatically generated by SBV. Do not modify! ; bar :: SInteger -> SInteger [Recursive] (define-fun-rec bar ((l2_s0 Int)) Int-  (let ((l2_s1 1))-  (let ((l2_s2 (- l2_s0 l2_s1)))-  (let ((l2_s3 (bar l2_s2)))-  l2_s3))))+                                          (let ((l2_s1 1))+                                          (let ((l2_s2 (- l2_s0 l2_s1)))+                                          (let ((l2_s3 (bar l2_s2)))+                                          l2_s3)))) ; foo :: SInteger -> SInteger [Refers to: bar] (define-fun foo ((l1_s0 Int)) Int-  (let ((l1_s1 1))-  (let ((l1_s2 (- l1_s0 l1_s1)))-  (let ((l1_s3 (bar l1_s2)))-  l1_s3))))+                          (let ((l1_s1 1))+                          (let ((l1_s2 (- l1_s0 l1_s1)))+                          (let ((l1_s3 (bar l1_s2)))+                          l1_s3))))
SBVTestSuite/GoldFiles/lambda72.gold view
@@ -1,7 +1,7 @@ ; Automatically generated by SBV. Do not modify! ; bar :: SInteger -> SInteger [Recursive] (define-fun-rec bar ((l1_s0 Int)) Int-  (let ((l1_s1 1))-  (let ((l1_s2 (- l1_s0 l1_s1)))-  (let ((l1_s3 (bar l1_s2)))-  l1_s3))))+                          (let ((l1_s1 1))+                          (let ((l1_s2 (- l1_s0 l1_s1)))+                          (let ((l1_s3 (bar l1_s2)))+                          l1_s3))))
SBVTestSuite/GoldFiles/lambda73.gold view
@@ -1,6 +1,6 @@ ; Automatically generated by SBV. Do not modify! ; baz :: SInteger -> SInteger (define-fun baz ((l1_s0 Int)) Int-  (let ((l1_s1 1))-  (let ((l1_s2 (+ l1_s0 l1_s1)))-  l1_s2)))+                          (let ((l1_s1 1))+                          (let ((l1_s2 (+ l1_s0 l1_s1)))+                          l1_s2)))
SBVTestSuite/GoldFiles/lambda74.gold view
@@ -4,12 +4,12 @@   ((e ((l1_s0 Int)) Int)    (o ((l2_s0 Int)) Int))   (; Definition of: e :: SInteger -> SInteger. [Refers to: o]-   (let ((l1_s1 1))-   (let ((l1_s2 (- l1_s0 l1_s1)))-   (let ((l1_s3 (o l1_s2)))-   l1_s3)))+                           (let ((l1_s1 1))+                           (let ((l1_s2 (- l1_s0 l1_s1)))+                           (let ((l1_s3 (o l1_s2)))+                           l1_s3)))    ; Definition of: o :: SInteger -> SInteger. [Refers to: e]-   (let ((l2_s1 1))-   (let ((l2_s2 (- l2_s0 l2_s1)))-   (let ((l2_s3 (e l2_s2)))-   l2_s3)))))+                                           (let ((l2_s1 1))+                                           (let ((l2_s2 (- l2_s0 l2_s1)))+                                           (let ((l2_s3 (e l2_s2)))+                                           l2_s3)))))
SBVTestSuite/GoldFiles/lambda75.gold view
@@ -4,12 +4,12 @@   ((e ((l2_s0 Int)) Int)    (o ((l1_s0 Int)) Int))   (; Definition of: e :: SInteger -> SInteger. [Refers to: o]-   (let ((l2_s1 1))-   (let ((l2_s2 (- l2_s0 l2_s1)))-   (let ((l2_s3 (o l2_s2)))-   l2_s3)))+                                           (let ((l2_s1 1))+                                           (let ((l2_s2 (- l2_s0 l2_s1)))+                                           (let ((l2_s3 (o l2_s2)))+                                           l2_s3)))    ; Definition of: o :: SInteger -> SInteger. [Refers to: e]-   (let ((l1_s1 1))-   (let ((l1_s2 (- l1_s0 l1_s1)))-   (let ((l1_s3 (e l1_s2)))-   l1_s3)))))+                           (let ((l1_s1 1))+                           (let ((l1_s2 (- l1_s0 l1_s1)))+                           (let ((l1_s3 (e l1_s2)))+                           l1_s3)))))
SBVTestSuite/GoldFiles/lambda79.gold view
@@ -1,10 +1,10 @@ ; Automatically generated by SBV. Do not modify! ; foo :: SInteger -> SWord32 (define-fun foo ((l1_s0 Int)) (_ BitVec 32)-  (let ((l1_s1 #x00000001))-  (let ((l1_s2 #x00000002))-  (let ((l1_s3 #x00000003))-  (let ((l1_s4 #x00000000))-  (let ((table0 (lambda ((idx Int)) (ite (= idx 0) l1_s1 (ite (= idx 1) l1_s2 l1_s3)))))-  (let ((l1_s5 (ite (or (< l1_s0 0) (<= 3 l1_s0)) l1_s4 (table0 l1_s0))))-  l1_s5)))))))+                          (let ((l1_s1 #x00000001))+                          (let ((l1_s2 #x00000002))+                          (let ((l1_s3 #x00000003))+                          (let ((l1_s4 #x00000000))+                          (let ((table0 (lambda ((idx Int)) (ite (= idx 0) l1_s1 (ite (= idx 1) l1_s2 l1_s3)))))+                          (let ((l1_s5 (ite (or (< l1_s0 0) (<= 3 l1_s0)) l1_s4 (table0 l1_s0))))+                          l1_s5)))))))
SBVTestSuite/GoldFiles/lambda80.gold view
@@ -1,13 +1,13 @@ ; Automatically generated by SBV. Do not modify! ; foo :: SInteger -> SInteger (define-fun foo ((l1_s0 Int)) Int-  (let ((l1_s1 1))-  (let ((l1_s3 2))-  (let ((l1_s5 3))-  (let ((l1_s7 0))-  (let ((l1_s2 (+ l1_s0 l1_s1)))-  (let ((l1_s4 (+ l1_s0 l1_s3)))-  (let ((l1_s6 (+ l1_s0 l1_s5)))-  (let ((table0 (lambda ((idx Int)) (ite (= idx 0) l1_s2 (ite (= idx 1) l1_s4 l1_s6)))))-  (let ((l1_s8 (ite (or (< l1_s0 0) (<= 3 l1_s0)) l1_s7 (table0 l1_s0))))-  l1_s8))))))))))+                          (let ((l1_s1 1))+                          (let ((l1_s3 2))+                          (let ((l1_s5 3))+                          (let ((l1_s7 0))+                          (let ((l1_s2 (+ l1_s0 l1_s1)))+                          (let ((l1_s4 (+ l1_s0 l1_s3)))+                          (let ((l1_s6 (+ l1_s0 l1_s5)))+                          (let ((table0 (lambda ((idx Int)) (ite (= idx 0) l1_s2 (ite (= idx 1) l1_s4 l1_s6)))))+                          (let ((l1_s8 (ite (or (< l1_s0 0) (<= 3 l1_s0)) l1_s7 (table0 l1_s0))))+                          l1_s8))))))))))
SBVTestSuite/GoldFiles/legato.gold view
@@ -13,21 +13,20 @@   s14 = 128 :: Word8   s16 = 127 :: Word8 TABLES-ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS AXIOMS-DEFINITIONS DEFINE   s9 :: SWord 1 = choose [0:0] s0   s11 :: SBool = s9 /= s10-  s12 :: SBool = false == s11+  s12 :: SBool = ~ s11   s13 :: SWord8 = s0 >>> 1   s15 :: SWord8 = s13 | s14   s17 :: SWord8 = s13 & s16   s18 :: SWord8 = if s5 then s15 else s17   s19 :: SWord 1 = choose [0:0] s18   s20 :: SBool = s10 /= s19-  s21 :: SBool = false == s20+  s21 :: SBool = ~ s20   s22 :: SWord 1 = choose [0:0] s2   s23 :: SBool = s10 /= s22   s24 :: SWord8 = s18 >>> 1@@ -36,7 +35,7 @@   s27 :: SWord8 = if s23 then s25 else s26   s28 :: SWord 1 = choose [0:0] s27   s29 :: SBool = s10 /= s28-  s30 :: SBool = false == s29+  s30 :: SBool = ~ s29   s31 :: SWord8 = s2 >>> 1   s32 :: SWord8 = s16 & s31   s33 :: SWord 1 = choose [0:0] s32@@ -47,7 +46,7 @@   s38 :: SWord8 = if s34 then s36 else s37   s39 :: SWord 1 = choose [0:0] s38   s40 :: SBool = s10 /= s39-  s41 :: SBool = false == s40+  s41 :: SBool = ~ s40   s42 :: SWord8 = if s11 then s14 else s8   s43 :: SWord 1 = choose [0:0] s42   s44 :: SBool = s10 /= s43@@ -63,7 +62,7 @@   s54 :: SWord8 = if s50 then s52 else s53   s55 :: SWord 1 = choose [0:0] s54   s56 :: SBool = s10 /= s55-  s57 :: SBool = false == s56+  s57 :: SBool = ~ s56   s58 :: SWord8 = s42 >>> 1   s59 :: SWord8 = s14 | s58   s60 :: SWord8 = s16 & s58@@ -82,7 +81,7 @@   s73 :: SWord8 = if s69 then s71 else s72   s74 :: SWord 1 = choose [0:0] s73   s75 :: SBool = s10 /= s74-  s76 :: SBool = false == s75+  s76 :: SBool = ~ s75   s77 :: SWord8 = s61 >>> 1   s78 :: SWord8 = s14 | s77   s79 :: SWord8 = s16 & s77@@ -101,7 +100,7 @@   s92 :: SWord8 = if s88 then s90 else s91   s93 :: SWord 1 = choose [0:0] s92   s94 :: SBool = s10 /= s93-  s95 :: SBool = false == s94+  s95 :: SBool = ~ s94   s96 :: SWord8 = s80 >>> 1   s97 :: SWord8 = s14 | s96   s98 :: SWord8 = s16 & s96@@ -120,7 +119,7 @@   s111 :: SWord8 = if s107 then s109 else s110   s112 :: SWord 1 = choose [0:0] s111   s113 :: SBool = s10 /= s112-  s114 :: SBool = false == s113+  s114 :: SBool = ~ s113   s115 :: SWord8 = s99 >>> 1   s116 :: SWord8 = s14 | s115   s117 :: SWord8 = s16 & s115@@ -225,7 +224,7 @@   s216 :: SWord8 = if s215 then s109 else s110   s217 :: SWord 1 = choose [0:0] s216   s218 :: SBool = s10 /= s217-  s219 :: SBool = false == s218+  s219 :: SBool = ~ s218   s220 :: SBool = s210 < s1   s221 :: SBool = s210 < s99   s222 :: SBool = s220 | s221@@ -334,7 +333,7 @@   s325 :: SWord8 = if s324 then s90 else s91   s326 :: SWord 1 = choose [0:0] s325   s327 :: SBool = s10 /= s326-  s328 :: SBool = false == s327+  s328 :: SBool = ~ s327   s329 :: SBool = s319 < s1   s330 :: SBool = s319 < s80   s331 :: SBool = s329 | s330@@ -356,7 +355,7 @@   s347 :: SWord8 = if s343 then s345 else s346   s348 :: SWord 1 = choose [0:0] s347   s349 :: SBool = s10 /= s348-  s350 :: SBool = false == s349+  s350 :: SBool = ~ s349   s351 :: SWord8 = s335 >>> 1   s352 :: SWord8 = s14 | s351   s353 :: SWord8 = s16 & s351@@ -461,7 +460,7 @@   s452 :: SWord8 = if s451 then s345 else s346   s453 :: SWord 1 = choose [0:0] s452   s454 :: SBool = s10 /= s453-  s455 :: SBool = false == s454+  s455 :: SBool = ~ s454   s456 :: SBool = s446 < s1   s457 :: SBool = s446 < s335   s458 :: SBool = s456 | s457@@ -571,7 +570,7 @@   s562 :: SWord8 = if s561 then s71 else s72   s563 :: SWord 1 = choose [0:0] s562   s564 :: SBool = s10 /= s563-  s565 :: SBool = false == s564+  s565 :: SBool = ~ s564   s566 :: SBool = s556 < s1   s567 :: SBool = s556 < s61   s568 :: SBool = s566 | s567@@ -593,7 +592,7 @@   s584 :: SWord8 = if s580 then s582 else s583   s585 :: SWord 1 = choose [0:0] s584   s586 :: SBool = s10 /= s585-  s587 :: SBool = false == s586+  s587 :: SBool = ~ s586   s588 :: SWord8 = s572 >>> 1   s589 :: SWord8 = s14 | s588   s590 :: SWord8 = s16 & s588@@ -612,7 +611,7 @@   s603 :: SWord8 = if s599 then s601 else s602   s604 :: SWord 1 = choose [0:0] s603   s605 :: SBool = s10 /= s604-  s606 :: SBool = false == s605+  s606 :: SBool = ~ s605   s607 :: SWord8 = s591 >>> 1   s608 :: SWord8 = s14 | s607   s609 :: SWord8 = s16 & s607@@ -717,7 +716,7 @@   s708 :: SWord8 = if s707 then s601 else s602   s709 :: SWord 1 = choose [0:0] s708   s710 :: SBool = s10 /= s709-  s711 :: SBool = false == s710+  s711 :: SBool = ~ s710   s712 :: SBool = s702 < s1   s713 :: SBool = s702 < s591   s714 :: SBool = s712 | s713@@ -826,7 +825,7 @@   s817 :: SWord8 = if s816 then s582 else s583   s818 :: SWord 1 = choose [0:0] s817   s819 :: SBool = s10 /= s818-  s820 :: SBool = false == s819+  s820 :: SBool = ~ s819   s821 :: SBool = s811 < s1   s822 :: SBool = s811 < s572   s823 :: SBool = s821 | s822@@ -848,7 +847,7 @@   s839 :: SWord8 = if s835 then s837 else s838   s840 :: SWord 1 = choose [0:0] s839   s841 :: SBool = s10 /= s840-  s842 :: SBool = false == s841+  s842 :: SBool = ~ s841   s843 :: SWord8 = s827 >>> 1   s844 :: SWord8 = s14 | s843   s845 :: SWord8 = s16 & s843@@ -953,7 +952,7 @@   s944 :: SWord8 = if s943 then s837 else s838   s945 :: SWord 1 = choose [0:0] s944   s946 :: SBool = s10 /= s945-  s947 :: SBool = false == s946+  s947 :: SBool = ~ s946   s948 :: SBool = s938 < s1   s949 :: SBool = s938 < s827   s950 :: SBool = s948 | s949@@ -1064,7 +1063,7 @@   s1055 :: SWord8 = if s1054 then s52 else s53   s1056 :: SWord 1 = choose [0:0] s1055   s1057 :: SBool = s10 /= s1056-  s1058 :: SBool = false == s1057+  s1058 :: SBool = ~ s1057   s1059 :: SBool = s1049 < s1   s1060 :: SBool = s1049 < s42   s1061 :: SBool = s1059 | s1060@@ -1086,7 +1085,7 @@   s1077 :: SWord8 = if s1073 then s1075 else s1076   s1078 :: SWord 1 = choose [0:0] s1077   s1079 :: SBool = s10 /= s1078-  s1080 :: SBool = false == s1079+  s1080 :: SBool = ~ s1079   s1081 :: SWord8 = s1065 >>> 1   s1082 :: SWord8 = s14 | s1081   s1083 :: SWord8 = s16 & s1081@@ -1105,7 +1104,7 @@   s1096 :: SWord8 = if s1092 then s1094 else s1095   s1097 :: SWord 1 = choose [0:0] s1096   s1098 :: SBool = s10 /= s1097-  s1099 :: SBool = false == s1098+  s1099 :: SBool = ~ s1098   s1100 :: SWord8 = s1084 >>> 1   s1101 :: SWord8 = s14 | s1100   s1102 :: SWord8 = s16 & s1100@@ -1124,7 +1123,7 @@   s1115 :: SWord8 = if s1111 then s1113 else s1114   s1116 :: SWord 1 = choose [0:0] s1115   s1117 :: SBool = s10 /= s1116-  s1118 :: SBool = false == s1117+  s1118 :: SBool = ~ s1117   s1119 :: SWord8 = s1103 >>> 1   s1120 :: SWord8 = s14 | s1119   s1121 :: SWord8 = s16 & s1119@@ -1229,7 +1228,7 @@   s1220 :: SWord8 = if s1219 then s1113 else s1114   s1221 :: SWord 1 = choose [0:0] s1220   s1222 :: SBool = s10 /= s1221-  s1223 :: SBool = false == s1222+  s1223 :: SBool = ~ s1222   s1224 :: SBool = s1214 < s1   s1225 :: SBool = s1214 < s1103   s1226 :: SBool = s1224 | s1225@@ -1338,7 +1337,7 @@   s1329 :: SWord8 = if s1328 then s1094 else s1095   s1330 :: SWord 1 = choose [0:0] s1329   s1331 :: SBool = s10 /= s1330-  s1332 :: SBool = false == s1331+  s1332 :: SBool = ~ s1331   s1333 :: SBool = s1323 < s1   s1334 :: SBool = s1323 < s1084   s1335 :: SBool = s1333 | s1334@@ -1360,7 +1359,7 @@   s1351 :: SWord8 = if s1347 then s1349 else s1350   s1352 :: SWord 1 = choose [0:0] s1351   s1353 :: SBool = s10 /= s1352-  s1354 :: SBool = false == s1353+  s1354 :: SBool = ~ s1353   s1355 :: SWord8 = s1339 >>> 1   s1356 :: SWord8 = s14 | s1355   s1357 :: SWord8 = s16 & s1355@@ -1465,7 +1464,7 @@   s1456 :: SWord8 = if s1455 then s1349 else s1350   s1457 :: SWord 1 = choose [0:0] s1456   s1458 :: SBool = s10 /= s1457-  s1459 :: SBool = false == s1458+  s1459 :: SBool = ~ s1458   s1460 :: SBool = s1450 < s1   s1461 :: SBool = s1450 < s1339   s1462 :: SBool = s1460 | s1461@@ -1575,7 +1574,7 @@   s1566 :: SWord8 = if s1565 then s1075 else s1076   s1567 :: SWord 1 = choose [0:0] s1566   s1568 :: SBool = s10 /= s1567-  s1569 :: SBool = false == s1568+  s1569 :: SBool = ~ s1568   s1570 :: SBool = s1560 < s1   s1571 :: SBool = s1560 < s1065   s1572 :: SBool = s1570 | s1571@@ -1597,7 +1596,7 @@   s1588 :: SWord8 = if s1584 then s1586 else s1587   s1589 :: SWord 1 = choose [0:0] s1588   s1590 :: SBool = s10 /= s1589-  s1591 :: SBool = false == s1590+  s1591 :: SBool = ~ s1590   s1592 :: SWord8 = s1576 >>> 1   s1593 :: SWord8 = s14 | s1592   s1594 :: SWord8 = s16 & s1592@@ -1616,7 +1615,7 @@   s1607 :: SWord8 = if s1603 then s1605 else s1606   s1608 :: SWord 1 = choose [0:0] s1607   s1609 :: SBool = s10 /= s1608-  s1610 :: SBool = false == s1609+  s1610 :: SBool = ~ s1609   s1611 :: SWord8 = s1595 >>> 1   s1612 :: SWord8 = s14 | s1611   s1613 :: SWord8 = s16 & s1611@@ -1721,7 +1720,7 @@   s1712 :: SWord8 = if s1711 then s1605 else s1606   s1713 :: SWord 1 = choose [0:0] s1712   s1714 :: SBool = s10 /= s1713-  s1715 :: SBool = false == s1714+  s1715 :: SBool = ~ s1714   s1716 :: SBool = s1706 < s1   s1717 :: SBool = s1706 < s1595   s1718 :: SBool = s1716 | s1717@@ -1830,7 +1829,7 @@   s1821 :: SWord8 = if s1820 then s1586 else s1587   s1822 :: SWord 1 = choose [0:0] s1821   s1823 :: SBool = s10 /= s1822-  s1824 :: SBool = false == s1823+  s1824 :: SBool = ~ s1823   s1825 :: SBool = s1815 < s1   s1826 :: SBool = s1815 < s1576   s1827 :: SBool = s1825 | s1826@@ -1852,7 +1851,7 @@   s1843 :: SWord8 = if s1839 then s1841 else s1842   s1844 :: SWord 1 = choose [0:0] s1843   s1845 :: SBool = s10 /= s1844-  s1846 :: SBool = false == s1845+  s1846 :: SBool = ~ s1845   s1847 :: SWord8 = s1831 >>> 1   s1848 :: SWord8 = s14 | s1847   s1849 :: SWord8 = s16 & s1847@@ -1957,7 +1956,7 @@   s1948 :: SWord8 = if s1947 then s1841 else s1842   s1949 :: SWord 1 = choose [0:0] s1948   s1950 :: SBool = s10 /= s1949-  s1951 :: SBool = false == s1950+  s1951 :: SBool = ~ s1950   s1952 :: SBool = s1942 < s1   s1953 :: SBool = s1942 < s1831   s1954 :: SBool = s1952 | s1953@@ -2069,7 +2068,7 @@   s2060 :: SWord8 = if s2059 then s36 else s37   s2061 :: SWord 1 = choose [0:0] s2060   s2062 :: SBool = s10 /= s2061-  s2063 :: SBool = false == s2062+  s2063 :: SBool = ~ s2062   s2064 :: SWord8 = s1 >>> 1   s2065 :: SWord8 = s16 & s2064   s2066 :: SWord 1 = choose [0:0] s2065@@ -2086,7 +2085,7 @@   s2077 :: SWord8 = if s2073 then s2075 else s2076   s2078 :: SWord 1 = choose [0:0] s2077   s2079 :: SBool = s10 /= s2078-  s2080 :: SBool = false == s2079+  s2080 :: SBool = ~ s2079   s2081 :: SWord8 = s2065 >>> 1   s2082 :: SWord8 = s14 | s2081   s2083 :: SWord8 = s16 & s2081@@ -2105,7 +2104,7 @@   s2096 :: SWord8 = if s2092 then s2094 else s2095   s2097 :: SWord 1 = choose [0:0] s2096   s2098 :: SBool = s10 /= s2097-  s2099 :: SBool = false == s2098+  s2099 :: SBool = ~ s2098   s2100 :: SWord8 = s2084 >>> 1   s2101 :: SWord8 = s14 | s2100   s2102 :: SWord8 = s16 & s2100@@ -2124,7 +2123,7 @@   s2115 :: SWord8 = if s2111 then s2113 else s2114   s2116 :: SWord 1 = choose [0:0] s2115   s2117 :: SBool = s10 /= s2116-  s2118 :: SBool = false == s2117+  s2118 :: SBool = ~ s2117   s2119 :: SWord8 = s2103 >>> 1   s2120 :: SWord8 = s14 | s2119   s2121 :: SWord8 = s16 & s2119@@ -2143,7 +2142,7 @@   s2134 :: SWord8 = if s2130 then s2132 else s2133   s2135 :: SWord 1 = choose [0:0] s2134   s2136 :: SBool = s10 /= s2135-  s2137 :: SBool = false == s2136+  s2137 :: SBool = ~ s2136   s2138 :: SWord8 = s2122 >>> 1   s2139 :: SWord8 = s14 | s2138   s2140 :: SWord8 = s16 & s2138@@ -2248,7 +2247,7 @@   s2239 :: SWord8 = if s2238 then s2132 else s2133   s2240 :: SWord 1 = choose [0:0] s2239   s2241 :: SBool = s10 /= s2240-  s2242 :: SBool = false == s2241+  s2242 :: SBool = ~ s2241   s2243 :: SBool = s2233 < s1   s2244 :: SBool = s2233 < s2122   s2245 :: SBool = s2243 | s2244@@ -2357,7 +2356,7 @@   s2348 :: SWord8 = if s2347 then s2113 else s2114   s2349 :: SWord 1 = choose [0:0] s2348   s2350 :: SBool = s10 /= s2349-  s2351 :: SBool = false == s2350+  s2351 :: SBool = ~ s2350   s2352 :: SBool = s2342 < s1   s2353 :: SBool = s2342 < s2103   s2354 :: SBool = s2352 | s2353@@ -2379,7 +2378,7 @@   s2370 :: SWord8 = if s2366 then s2368 else s2369   s2371 :: SWord 1 = choose [0:0] s2370   s2372 :: SBool = s10 /= s2371-  s2373 :: SBool = false == s2372+  s2373 :: SBool = ~ s2372   s2374 :: SWord8 = s2358 >>> 1   s2375 :: SWord8 = s14 | s2374   s2376 :: SWord8 = s16 & s2374@@ -2484,7 +2483,7 @@   s2475 :: SWord8 = if s2474 then s2368 else s2369   s2476 :: SWord 1 = choose [0:0] s2475   s2477 :: SBool = s10 /= s2476-  s2478 :: SBool = false == s2477+  s2478 :: SBool = ~ s2477   s2479 :: SBool = s2469 < s1   s2480 :: SBool = s2469 < s2358   s2481 :: SBool = s2479 | s2480@@ -2594,7 +2593,7 @@   s2585 :: SWord8 = if s2584 then s2094 else s2095   s2586 :: SWord 1 = choose [0:0] s2585   s2587 :: SBool = s10 /= s2586-  s2588 :: SBool = false == s2587+  s2588 :: SBool = ~ s2587   s2589 :: SBool = s2579 < s1   s2590 :: SBool = s2579 < s2084   s2591 :: SBool = s2589 | s2590@@ -2616,7 +2615,7 @@   s2607 :: SWord8 = if s2603 then s2605 else s2606   s2608 :: SWord 1 = choose [0:0] s2607   s2609 :: SBool = s10 /= s2608-  s2610 :: SBool = false == s2609+  s2610 :: SBool = ~ s2609   s2611 :: SWord8 = s2595 >>> 1   s2612 :: SWord8 = s14 | s2611   s2613 :: SWord8 = s16 & s2611@@ -2635,7 +2634,7 @@   s2626 :: SWord8 = if s2622 then s2624 else s2625   s2627 :: SWord 1 = choose [0:0] s2626   s2628 :: SBool = s10 /= s2627-  s2629 :: SBool = false == s2628+  s2629 :: SBool = ~ s2628   s2630 :: SWord8 = s2614 >>> 1   s2631 :: SWord8 = s14 | s2630   s2632 :: SWord8 = s16 & s2630@@ -2740,7 +2739,7 @@   s2731 :: SWord8 = if s2730 then s2624 else s2625   s2732 :: SWord 1 = choose [0:0] s2731   s2733 :: SBool = s10 /= s2732-  s2734 :: SBool = false == s2733+  s2734 :: SBool = ~ s2733   s2735 :: SBool = s2725 < s1   s2736 :: SBool = s2725 < s2614   s2737 :: SBool = s2735 | s2736@@ -2849,7 +2848,7 @@   s2840 :: SWord8 = if s2839 then s2605 else s2606   s2841 :: SWord 1 = choose [0:0] s2840   s2842 :: SBool = s10 /= s2841-  s2843 :: SBool = false == s2842+  s2843 :: SBool = ~ s2842   s2844 :: SBool = s2834 < s1   s2845 :: SBool = s2834 < s2595   s2846 :: SBool = s2844 | s2845@@ -2871,7 +2870,7 @@   s2862 :: SWord8 = if s2858 then s2860 else s2861   s2863 :: SWord 1 = choose [0:0] s2862   s2864 :: SBool = s10 /= s2863-  s2865 :: SBool = false == s2864+  s2865 :: SBool = ~ s2864   s2866 :: SWord8 = s2850 >>> 1   s2867 :: SWord8 = s14 | s2866   s2868 :: SWord8 = s16 & s2866@@ -2976,7 +2975,7 @@   s2967 :: SWord8 = if s2966 then s2860 else s2861   s2968 :: SWord 1 = choose [0:0] s2967   s2969 :: SBool = s10 /= s2968-  s2970 :: SBool = false == s2969+  s2970 :: SBool = ~ s2969   s2971 :: SBool = s2961 < s1   s2972 :: SBool = s2961 < s2850   s2973 :: SBool = s2971 | s2972@@ -3087,7 +3086,7 @@   s3078 :: SWord8 = if s3077 then s2075 else s2076   s3079 :: SWord 1 = choose [0:0] s3078   s3080 :: SBool = s10 /= s3079-  s3081 :: SBool = false == s3080+  s3081 :: SBool = ~ s3080   s3082 :: SBool = s3072 < s1   s3083 :: SBool = s3072 < s2065   s3084 :: SBool = s3082 | s3083@@ -3109,7 +3108,7 @@   s3100 :: SWord8 = if s3096 then s3098 else s3099   s3101 :: SWord 1 = choose [0:0] s3100   s3102 :: SBool = s10 /= s3101-  s3103 :: SBool = false == s3102+  s3103 :: SBool = ~ s3102   s3104 :: SWord8 = s3088 >>> 1   s3105 :: SWord8 = s14 | s3104   s3106 :: SWord8 = s16 & s3104@@ -3128,7 +3127,7 @@   s3119 :: SWord8 = if s3115 then s3117 else s3118   s3120 :: SWord 1 = choose [0:0] s3119   s3121 :: SBool = s10 /= s3120-  s3122 :: SBool = false == s3121+  s3122 :: SBool = ~ s3121   s3123 :: SWord8 = s3107 >>> 1   s3124 :: SWord8 = s14 | s3123   s3125 :: SWord8 = s16 & s3123@@ -3147,7 +3146,7 @@   s3138 :: SWord8 = if s3134 then s3136 else s3137   s3139 :: SWord 1 = choose [0:0] s3138   s3140 :: SBool = s10 /= s3139-  s3141 :: SBool = false == s3140+  s3141 :: SBool = ~ s3140   s3142 :: SWord8 = s3126 >>> 1   s3143 :: SWord8 = s14 | s3142   s3144 :: SWord8 = s16 & s3142@@ -3252,7 +3251,7 @@   s3243 :: SWord8 = if s3242 then s3136 else s3137   s3244 :: SWord 1 = choose [0:0] s3243   s3245 :: SBool = s10 /= s3244-  s3246 :: SBool = false == s3245+  s3246 :: SBool = ~ s3245   s3247 :: SBool = s3237 < s1   s3248 :: SBool = s3237 < s3126   s3249 :: SBool = s3247 | s3248@@ -3361,7 +3360,7 @@   s3352 :: SWord8 = if s3351 then s3117 else s3118   s3353 :: SWord 1 = choose [0:0] s3352   s3354 :: SBool = s10 /= s3353-  s3355 :: SBool = false == s3354+  s3355 :: SBool = ~ s3354   s3356 :: SBool = s3346 < s1   s3357 :: SBool = s3346 < s3107   s3358 :: SBool = s3356 | s3357@@ -3383,7 +3382,7 @@   s3374 :: SWord8 = if s3370 then s3372 else s3373   s3375 :: SWord 1 = choose [0:0] s3374   s3376 :: SBool = s10 /= s3375-  s3377 :: SBool = false == s3376+  s3377 :: SBool = ~ s3376   s3378 :: SWord8 = s3362 >>> 1   s3379 :: SWord8 = s14 | s3378   s3380 :: SWord8 = s16 & s3378@@ -3488,7 +3487,7 @@   s3479 :: SWord8 = if s3478 then s3372 else s3373   s3480 :: SWord 1 = choose [0:0] s3479   s3481 :: SBool = s10 /= s3480-  s3482 :: SBool = false == s3481+  s3482 :: SBool = ~ s3481   s3483 :: SBool = s3473 < s1   s3484 :: SBool = s3473 < s3362   s3485 :: SBool = s3483 | s3484@@ -3598,7 +3597,7 @@   s3589 :: SWord8 = if s3588 then s3098 else s3099   s3590 :: SWord 1 = choose [0:0] s3589   s3591 :: SBool = s10 /= s3590-  s3592 :: SBool = false == s3591+  s3592 :: SBool = ~ s3591   s3593 :: SBool = s3583 < s1   s3594 :: SBool = s3583 < s3088   s3595 :: SBool = s3593 | s3594@@ -3620,7 +3619,7 @@   s3611 :: SWord8 = if s3607 then s3609 else s3610   s3612 :: SWord 1 = choose [0:0] s3611   s3613 :: SBool = s10 /= s3612-  s3614 :: SBool = false == s3613+  s3614 :: SBool = ~ s3613   s3615 :: SWord8 = s3599 >>> 1   s3616 :: SWord8 = s14 | s3615   s3617 :: SWord8 = s16 & s3615@@ -3639,7 +3638,7 @@   s3630 :: SWord8 = if s3626 then s3628 else s3629   s3631 :: SWord 1 = choose [0:0] s3630   s3632 :: SBool = s10 /= s3631-  s3633 :: SBool = false == s3632+  s3633 :: SBool = ~ s3632   s3634 :: SWord8 = s3618 >>> 1   s3635 :: SWord8 = s14 | s3634   s3636 :: SWord8 = s16 & s3634@@ -3744,7 +3743,7 @@   s3735 :: SWord8 = if s3734 then s3628 else s3629   s3736 :: SWord 1 = choose [0:0] s3735   s3737 :: SBool = s10 /= s3736-  s3738 :: SBool = false == s3737+  s3738 :: SBool = ~ s3737   s3739 :: SBool = s3729 < s1   s3740 :: SBool = s3729 < s3618   s3741 :: SBool = s3739 | s3740@@ -3853,7 +3852,7 @@   s3844 :: SWord8 = if s3843 then s3609 else s3610   s3845 :: SWord 1 = choose [0:0] s3844   s3846 :: SBool = s10 /= s3845-  s3847 :: SBool = false == s3846+  s3847 :: SBool = ~ s3846   s3848 :: SBool = s3838 < s1   s3849 :: SBool = s3838 < s3599   s3850 :: SBool = s3848 | s3849@@ -3875,7 +3874,7 @@   s3866 :: SWord8 = if s3862 then s3864 else s3865   s3867 :: SWord 1 = choose [0:0] s3866   s3868 :: SBool = s10 /= s3867-  s3869 :: SBool = false == s3868+  s3869 :: SBool = ~ s3868   s3870 :: SWord8 = s3854 >>> 1   s3871 :: SWord8 = s14 | s3870   s3872 :: SWord8 = s16 & s3870@@ -3980,7 +3979,7 @@   s3971 :: SWord8 = if s3970 then s3864 else s3865   s3972 :: SWord 1 = choose [0:0] s3971   s3973 :: SBool = s10 /= s3972-  s3974 :: SBool = false == s3973+  s3974 :: SBool = ~ s3973   s3975 :: SBool = s3965 < s1   s3976 :: SBool = s3965 < s3854   s3977 :: SBool = s3975 | s3976
SBVTestSuite/GoldFiles/legato_c.gold view
@@ -98,22 +98,22 @@   const SWord8 s1 = y;   const SBool  s2 = (SBool) (s0 & 1);   const SBool  s4 = s2 != false;-  const SBool  s5 = false == s4;+  const SBool  s5 = !s4;   const SWord8 s6 = (s0 >> 1) | (s0 << 7);   const SWord8 s8 = s6 & 127;   const SBool  s9 = (SBool) (s8 & 1);   const SBool  s10 = false != s9;-  const SBool  s11 = false == s10;+  const SBool  s11 = !s10;   const SWord8 s12 = (s8 >> 1) | (s8 << 7);   const SWord8 s13 = 127 & s12;   const SBool  s14 = (SBool) (s13 & 1);   const SBool  s15 = false != s14;-  const SBool  s16 = false == s15;+  const SBool  s16 = !s15;   const SWord8 s17 = (s13 >> 1) | (s13 << 7);   const SWord8 s18 = 127 & s17;   const SBool  s19 = (SBool) (s18 & 1);   const SBool  s20 = false != s19;-  const SBool  s21 = false == s20;+  const SBool  s21 = !s20;   const SWord8 s24 = s4 ? 128 : 0;   const SBool  s25 = (SBool) (s24 & 1);   const SBool  s26 = false != s25;@@ -126,7 +126,7 @@   const SWord8 s33 = s29 ? s31 : s32;   const SBool  s34 = (SBool) (s33 & 1);   const SBool  s35 = false != s34;-  const SBool  s36 = false == s35;+  const SBool  s36 = !s35;   const SWord8 s37 = (s24 >> 1) | (s24 << 7);   const SWord8 s38 = 128 | s37;   const SWord8 s39 = 127 & s37;@@ -145,7 +145,7 @@   const SWord8 s52 = s48 ? s50 : s51;   const SBool  s53 = (SBool) (s52 & 1);   const SBool  s54 = false != s53;-  const SBool  s55 = false == s54;+  const SBool  s55 = !s54;   const SWord8 s56 = (s40 >> 1) | (s40 << 7);   const SWord8 s57 = 128 | s56;   const SWord8 s58 = 127 & s56;@@ -164,7 +164,7 @@   const SWord8 s71 = s67 ? s69 : s70;   const SBool  s72 = (SBool) (s71 & 1);   const SBool  s73 = false != s72;-  const SBool  s74 = false == s73;+  const SBool  s74 = !s73;   const SWord8 s75 = (s59 >> 1) | (s59 << 7);   const SWord8 s76 = 128 | s75;   const SWord8 s77 = 127 & s75;@@ -183,7 +183,7 @@   const SWord8 s90 = s86 ? s88 : s89;   const SBool  s91 = (SBool) (s90 & 1);   const SBool  s92 = false != s91;-  const SBool  s93 = false == s92;+  const SBool  s93 = !s92;   const SWord8 s94 = (s78 >> 1) | (s78 << 7);   const SWord8 s95 = 128 | s94;   const SWord8 s96 = 127 & s94;@@ -288,7 +288,7 @@   const SWord8 s195 = s194 ? s88 : s89;   const SBool  s196 = (SBool) (s195 & 1);   const SBool  s197 = false != s196;-  const SBool  s198 = false == s197;+  const SBool  s198 = !s197;   const SBool  s199 = s189 < s1;   const SBool  s200 = s189 < s78;   const SBool  s201 = s199 || s200;@@ -397,7 +397,7 @@   const SWord8 s304 = s303 ? s69 : s70;   const SBool  s305 = (SBool) (s304 & 1);   const SBool  s306 = false != s305;-  const SBool  s307 = false == s306;+  const SBool  s307 = !s306;   const SBool  s308 = s298 < s1;   const SBool  s309 = s298 < s59;   const SBool  s310 = s308 || s309;@@ -419,7 +419,7 @@   const SWord8 s326 = s322 ? s324 : s325;   const SBool  s327 = (SBool) (s326 & 1);   const SBool  s328 = false != s327;-  const SBool  s329 = false == s328;+  const SBool  s329 = !s328;   const SWord8 s330 = (s314 >> 1) | (s314 << 7);   const SWord8 s331 = 128 | s330;   const SWord8 s332 = 127 & s330;@@ -524,7 +524,7 @@   const SWord8 s431 = s430 ? s324 : s325;   const SBool  s432 = (SBool) (s431 & 1);   const SBool  s433 = false != s432;-  const SBool  s434 = false == s433;+  const SBool  s434 = !s433;   const SBool  s435 = s425 < s1;   const SBool  s436 = s425 < s314;   const SBool  s437 = s435 || s436;@@ -634,7 +634,7 @@   const SWord8 s541 = s540 ? s50 : s51;   const SBool  s542 = (SBool) (s541 & 1);   const SBool  s543 = false != s542;-  const SBool  s544 = false == s543;+  const SBool  s544 = !s543;   const SBool  s545 = s535 < s1;   const SBool  s546 = s535 < s40;   const SBool  s547 = s545 || s546;@@ -656,7 +656,7 @@   const SWord8 s563 = s559 ? s561 : s562;   const SBool  s564 = (SBool) (s563 & 1);   const SBool  s565 = false != s564;-  const SBool  s566 = false == s565;+  const SBool  s566 = !s565;   const SWord8 s567 = (s551 >> 1) | (s551 << 7);   const SWord8 s568 = 128 | s567;   const SWord8 s569 = 127 & s567;@@ -675,7 +675,7 @@   const SWord8 s582 = s578 ? s580 : s581;   const SBool  s583 = (SBool) (s582 & 1);   const SBool  s584 = false != s583;-  const SBool  s585 = false == s584;+  const SBool  s585 = !s584;   const SWord8 s586 = (s570 >> 1) | (s570 << 7);   const SWord8 s587 = 128 | s586;   const SWord8 s588 = 127 & s586;@@ -780,7 +780,7 @@   const SWord8 s687 = s686 ? s580 : s581;   const SBool  s688 = (SBool) (s687 & 1);   const SBool  s689 = false != s688;-  const SBool  s690 = false == s689;+  const SBool  s690 = !s689;   const SBool  s691 = s681 < s1;   const SBool  s692 = s681 < s570;   const SBool  s693 = s691 || s692;@@ -889,7 +889,7 @@   const SWord8 s796 = s795 ? s561 : s562;   const SBool  s797 = (SBool) (s796 & 1);   const SBool  s798 = false != s797;-  const SBool  s799 = false == s798;+  const SBool  s799 = !s798;   const SBool  s800 = s790 < s1;   const SBool  s801 = s790 < s551;   const SBool  s802 = s800 || s801;@@ -911,7 +911,7 @@   const SWord8 s818 = s814 ? s816 : s817;   const SBool  s819 = (SBool) (s818 & 1);   const SBool  s820 = false != s819;-  const SBool  s821 = false == s820;+  const SBool  s821 = !s820;   const SWord8 s822 = (s806 >> 1) | (s806 << 7);   const SWord8 s823 = 128 | s822;   const SWord8 s824 = 127 & s822;@@ -1016,7 +1016,7 @@   const SWord8 s923 = s922 ? s816 : s817;   const SBool  s924 = (SBool) (s923 & 1);   const SBool  s925 = false != s924;-  const SBool  s926 = false == s925;+  const SBool  s926 = !s925;   const SBool  s927 = s917 < s1;   const SBool  s928 = s917 < s806;   const SBool  s929 = s927 || s928;@@ -1127,7 +1127,7 @@   const SWord8 s1034 = s1033 ? s31 : s32;   const SBool  s1035 = (SBool) (s1034 & 1);   const SBool  s1036 = false != s1035;-  const SBool  s1037 = false == s1036;+  const SBool  s1037 = !s1036;   const SBool  s1038 = s1028 < s1;   const SBool  s1039 = s1028 < s24;   const SBool  s1040 = s1038 || s1039;@@ -1149,7 +1149,7 @@   const SWord8 s1056 = s1052 ? s1054 : s1055;   const SBool  s1057 = (SBool) (s1056 & 1);   const SBool  s1058 = false != s1057;-  const SBool  s1059 = false == s1058;+  const SBool  s1059 = !s1058;   const SWord8 s1060 = (s1044 >> 1) | (s1044 << 7);   const SWord8 s1061 = 128 | s1060;   const SWord8 s1062 = 127 & s1060;@@ -1168,7 +1168,7 @@   const SWord8 s1075 = s1071 ? s1073 : s1074;   const SBool  s1076 = (SBool) (s1075 & 1);   const SBool  s1077 = false != s1076;-  const SBool  s1078 = false == s1077;+  const SBool  s1078 = !s1077;   const SWord8 s1079 = (s1063 >> 1) | (s1063 << 7);   const SWord8 s1080 = 128 | s1079;   const SWord8 s1081 = 127 & s1079;@@ -1187,7 +1187,7 @@   const SWord8 s1094 = s1090 ? s1092 : s1093;   const SBool  s1095 = (SBool) (s1094 & 1);   const SBool  s1096 = false != s1095;-  const SBool  s1097 = false == s1096;+  const SBool  s1097 = !s1096;   const SWord8 s1098 = (s1082 >> 1) | (s1082 << 7);   const SWord8 s1099 = 128 | s1098;   const SWord8 s1100 = 127 & s1098;@@ -1292,7 +1292,7 @@   const SWord8 s1199 = s1198 ? s1092 : s1093;   const SBool  s1200 = (SBool) (s1199 & 1);   const SBool  s1201 = false != s1200;-  const SBool  s1202 = false == s1201;+  const SBool  s1202 = !s1201;   const SBool  s1203 = s1193 < s1;   const SBool  s1204 = s1193 < s1082;   const SBool  s1205 = s1203 || s1204;@@ -1401,7 +1401,7 @@   const SWord8 s1308 = s1307 ? s1073 : s1074;   const SBool  s1309 = (SBool) (s1308 & 1);   const SBool  s1310 = false != s1309;-  const SBool  s1311 = false == s1310;+  const SBool  s1311 = !s1310;   const SBool  s1312 = s1302 < s1;   const SBool  s1313 = s1302 < s1063;   const SBool  s1314 = s1312 || s1313;@@ -1423,7 +1423,7 @@   const SWord8 s1330 = s1326 ? s1328 : s1329;   const SBool  s1331 = (SBool) (s1330 & 1);   const SBool  s1332 = false != s1331;-  const SBool  s1333 = false == s1332;+  const SBool  s1333 = !s1332;   const SWord8 s1334 = (s1318 >> 1) | (s1318 << 7);   const SWord8 s1335 = 128 | s1334;   const SWord8 s1336 = 127 & s1334;@@ -1528,7 +1528,7 @@   const SWord8 s1435 = s1434 ? s1328 : s1329;   const SBool  s1436 = (SBool) (s1435 & 1);   const SBool  s1437 = false != s1436;-  const SBool  s1438 = false == s1437;+  const SBool  s1438 = !s1437;   const SBool  s1439 = s1429 < s1;   const SBool  s1440 = s1429 < s1318;   const SBool  s1441 = s1439 || s1440;@@ -1638,7 +1638,7 @@   const SWord8 s1545 = s1544 ? s1054 : s1055;   const SBool  s1546 = (SBool) (s1545 & 1);   const SBool  s1547 = false != s1546;-  const SBool  s1548 = false == s1547;+  const SBool  s1548 = !s1547;   const SBool  s1549 = s1539 < s1;   const SBool  s1550 = s1539 < s1044;   const SBool  s1551 = s1549 || s1550;@@ -1660,7 +1660,7 @@   const SWord8 s1567 = s1563 ? s1565 : s1566;   const SBool  s1568 = (SBool) (s1567 & 1);   const SBool  s1569 = false != s1568;-  const SBool  s1570 = false == s1569;+  const SBool  s1570 = !s1569;   const SWord8 s1571 = (s1555 >> 1) | (s1555 << 7);   const SWord8 s1572 = 128 | s1571;   const SWord8 s1573 = 127 & s1571;@@ -1679,7 +1679,7 @@   const SWord8 s1586 = s1582 ? s1584 : s1585;   const SBool  s1587 = (SBool) (s1586 & 1);   const SBool  s1588 = false != s1587;-  const SBool  s1589 = false == s1588;+  const SBool  s1589 = !s1588;   const SWord8 s1590 = (s1574 >> 1) | (s1574 << 7);   const SWord8 s1591 = 128 | s1590;   const SWord8 s1592 = 127 & s1590;@@ -1784,7 +1784,7 @@   const SWord8 s1691 = s1690 ? s1584 : s1585;   const SBool  s1692 = (SBool) (s1691 & 1);   const SBool  s1693 = false != s1692;-  const SBool  s1694 = false == s1693;+  const SBool  s1694 = !s1693;   const SBool  s1695 = s1685 < s1;   const SBool  s1696 = s1685 < s1574;   const SBool  s1697 = s1695 || s1696;@@ -1893,7 +1893,7 @@   const SWord8 s1800 = s1799 ? s1565 : s1566;   const SBool  s1801 = (SBool) (s1800 & 1);   const SBool  s1802 = false != s1801;-  const SBool  s1803 = false == s1802;+  const SBool  s1803 = !s1802;   const SBool  s1804 = s1794 < s1;   const SBool  s1805 = s1794 < s1555;   const SBool  s1806 = s1804 || s1805;@@ -1915,7 +1915,7 @@   const SWord8 s1822 = s1818 ? s1820 : s1821;   const SBool  s1823 = (SBool) (s1822 & 1);   const SBool  s1824 = false != s1823;-  const SBool  s1825 = false == s1824;+  const SBool  s1825 = !s1824;   const SWord8 s1826 = (s1810 >> 1) | (s1810 << 7);   const SWord8 s1827 = 128 | s1826;   const SWord8 s1828 = 127 & s1826;@@ -2020,7 +2020,7 @@   const SWord8 s1927 = s1926 ? s1820 : s1821;   const SBool  s1928 = (SBool) (s1927 & 1);   const SBool  s1929 = false != s1928;-  const SBool  s1930 = false == s1929;+  const SBool  s1930 = !s1929;   const SBool  s1931 = s1921 < s1;   const SBool  s1932 = s1921 < s1810;   const SBool  s1933 = s1931 || s1932;@@ -2132,7 +2132,7 @@   const SWord8 s2039 = s2037 ? s2038 : s18;   const SBool  s2040 = (SBool) (s2039 & 1);   const SBool  s2041 = false != s2040;-  const SBool  s2042 = false == s2041;+  const SBool  s2042 = !s2041;   const SWord8 s2043 = (s1 >> 1) | (s1 << 7);   const SWord8 s2044 = 127 & s2043;   const SBool  s2045 = (SBool) (s2044 & 1);@@ -2149,7 +2149,7 @@   const SWord8 s2056 = s2052 ? s2054 : s2055;   const SBool  s2057 = (SBool) (s2056 & 1);   const SBool  s2058 = false != s2057;-  const SBool  s2059 = false == s2058;+  const SBool  s2059 = !s2058;   const SWord8 s2060 = (s2044 >> 1) | (s2044 << 7);   const SWord8 s2061 = 128 | s2060;   const SWord8 s2062 = 127 & s2060;@@ -2168,7 +2168,7 @@   const SWord8 s2075 = s2071 ? s2073 : s2074;   const SBool  s2076 = (SBool) (s2075 & 1);   const SBool  s2077 = false != s2076;-  const SBool  s2078 = false == s2077;+  const SBool  s2078 = !s2077;   const SWord8 s2079 = (s2063 >> 1) | (s2063 << 7);   const SWord8 s2080 = 128 | s2079;   const SWord8 s2081 = 127 & s2079;@@ -2187,7 +2187,7 @@   const SWord8 s2094 = s2090 ? s2092 : s2093;   const SBool  s2095 = (SBool) (s2094 & 1);   const SBool  s2096 = false != s2095;-  const SBool  s2097 = false == s2096;+  const SBool  s2097 = !s2096;   const SWord8 s2098 = (s2082 >> 1) | (s2082 << 7);   const SWord8 s2099 = 128 | s2098;   const SWord8 s2100 = 127 & s2098;@@ -2206,7 +2206,7 @@   const SWord8 s2113 = s2109 ? s2111 : s2112;   const SBool  s2114 = (SBool) (s2113 & 1);   const SBool  s2115 = false != s2114;-  const SBool  s2116 = false == s2115;+  const SBool  s2116 = !s2115;   const SWord8 s2117 = (s2101 >> 1) | (s2101 << 7);   const SWord8 s2118 = 128 | s2117;   const SWord8 s2119 = 127 & s2117;@@ -2311,7 +2311,7 @@   const SWord8 s2218 = s2217 ? s2111 : s2112;   const SBool  s2219 = (SBool) (s2218 & 1);   const SBool  s2220 = false != s2219;-  const SBool  s2221 = false == s2220;+  const SBool  s2221 = !s2220;   const SBool  s2222 = s2212 < s1;   const SBool  s2223 = s2212 < s2101;   const SBool  s2224 = s2222 || s2223;@@ -2420,7 +2420,7 @@   const SWord8 s2327 = s2326 ? s2092 : s2093;   const SBool  s2328 = (SBool) (s2327 & 1);   const SBool  s2329 = false != s2328;-  const SBool  s2330 = false == s2329;+  const SBool  s2330 = !s2329;   const SBool  s2331 = s2321 < s1;   const SBool  s2332 = s2321 < s2082;   const SBool  s2333 = s2331 || s2332;@@ -2442,7 +2442,7 @@   const SWord8 s2349 = s2345 ? s2347 : s2348;   const SBool  s2350 = (SBool) (s2349 & 1);   const SBool  s2351 = false != s2350;-  const SBool  s2352 = false == s2351;+  const SBool  s2352 = !s2351;   const SWord8 s2353 = (s2337 >> 1) | (s2337 << 7);   const SWord8 s2354 = 128 | s2353;   const SWord8 s2355 = 127 & s2353;@@ -2547,7 +2547,7 @@   const SWord8 s2454 = s2453 ? s2347 : s2348;   const SBool  s2455 = (SBool) (s2454 & 1);   const SBool  s2456 = false != s2455;-  const SBool  s2457 = false == s2456;+  const SBool  s2457 = !s2456;   const SBool  s2458 = s2448 < s1;   const SBool  s2459 = s2448 < s2337;   const SBool  s2460 = s2458 || s2459;@@ -2657,7 +2657,7 @@   const SWord8 s2564 = s2563 ? s2073 : s2074;   const SBool  s2565 = (SBool) (s2564 & 1);   const SBool  s2566 = false != s2565;-  const SBool  s2567 = false == s2566;+  const SBool  s2567 = !s2566;   const SBool  s2568 = s2558 < s1;   const SBool  s2569 = s2558 < s2063;   const SBool  s2570 = s2568 || s2569;@@ -2679,7 +2679,7 @@   const SWord8 s2586 = s2582 ? s2584 : s2585;   const SBool  s2587 = (SBool) (s2586 & 1);   const SBool  s2588 = false != s2587;-  const SBool  s2589 = false == s2588;+  const SBool  s2589 = !s2588;   const SWord8 s2590 = (s2574 >> 1) | (s2574 << 7);   const SWord8 s2591 = 128 | s2590;   const SWord8 s2592 = 127 & s2590;@@ -2698,7 +2698,7 @@   const SWord8 s2605 = s2601 ? s2603 : s2604;   const SBool  s2606 = (SBool) (s2605 & 1);   const SBool  s2607 = false != s2606;-  const SBool  s2608 = false == s2607;+  const SBool  s2608 = !s2607;   const SWord8 s2609 = (s2593 >> 1) | (s2593 << 7);   const SWord8 s2610 = 128 | s2609;   const SWord8 s2611 = 127 & s2609;@@ -2803,7 +2803,7 @@   const SWord8 s2710 = s2709 ? s2603 : s2604;   const SBool  s2711 = (SBool) (s2710 & 1);   const SBool  s2712 = false != s2711;-  const SBool  s2713 = false == s2712;+  const SBool  s2713 = !s2712;   const SBool  s2714 = s2704 < s1;   const SBool  s2715 = s2704 < s2593;   const SBool  s2716 = s2714 || s2715;@@ -2912,7 +2912,7 @@   const SWord8 s2819 = s2818 ? s2584 : s2585;   const SBool  s2820 = (SBool) (s2819 & 1);   const SBool  s2821 = false != s2820;-  const SBool  s2822 = false == s2821;+  const SBool  s2822 = !s2821;   const SBool  s2823 = s2813 < s1;   const SBool  s2824 = s2813 < s2574;   const SBool  s2825 = s2823 || s2824;@@ -2934,7 +2934,7 @@   const SWord8 s2841 = s2837 ? s2839 : s2840;   const SBool  s2842 = (SBool) (s2841 & 1);   const SBool  s2843 = false != s2842;-  const SBool  s2844 = false == s2843;+  const SBool  s2844 = !s2843;   const SWord8 s2845 = (s2829 >> 1) | (s2829 << 7);   const SWord8 s2846 = 128 | s2845;   const SWord8 s2847 = 127 & s2845;@@ -3039,7 +3039,7 @@   const SWord8 s2946 = s2945 ? s2839 : s2840;   const SBool  s2947 = (SBool) (s2946 & 1);   const SBool  s2948 = false != s2947;-  const SBool  s2949 = false == s2948;+  const SBool  s2949 = !s2948;   const SBool  s2950 = s2940 < s1;   const SBool  s2951 = s2940 < s2829;   const SBool  s2952 = s2950 || s2951;@@ -3150,7 +3150,7 @@   const SWord8 s3057 = s3056 ? s2054 : s2055;   const SBool  s3058 = (SBool) (s3057 & 1);   const SBool  s3059 = false != s3058;-  const SBool  s3060 = false == s3059;+  const SBool  s3060 = !s3059;   const SBool  s3061 = s3051 < s1;   const SBool  s3062 = s3051 < s2044;   const SBool  s3063 = s3061 || s3062;@@ -3172,7 +3172,7 @@   const SWord8 s3079 = s3075 ? s3077 : s3078;   const SBool  s3080 = (SBool) (s3079 & 1);   const SBool  s3081 = false != s3080;-  const SBool  s3082 = false == s3081;+  const SBool  s3082 = !s3081;   const SWord8 s3083 = (s3067 >> 1) | (s3067 << 7);   const SWord8 s3084 = 128 | s3083;   const SWord8 s3085 = 127 & s3083;@@ -3191,7 +3191,7 @@   const SWord8 s3098 = s3094 ? s3096 : s3097;   const SBool  s3099 = (SBool) (s3098 & 1);   const SBool  s3100 = false != s3099;-  const SBool  s3101 = false == s3100;+  const SBool  s3101 = !s3100;   const SWord8 s3102 = (s3086 >> 1) | (s3086 << 7);   const SWord8 s3103 = 128 | s3102;   const SWord8 s3104 = 127 & s3102;@@ -3210,7 +3210,7 @@   const SWord8 s3117 = s3113 ? s3115 : s3116;   const SBool  s3118 = (SBool) (s3117 & 1);   const SBool  s3119 = false != s3118;-  const SBool  s3120 = false == s3119;+  const SBool  s3120 = !s3119;   const SWord8 s3121 = (s3105 >> 1) | (s3105 << 7);   const SWord8 s3122 = 128 | s3121;   const SWord8 s3123 = 127 & s3121;@@ -3315,7 +3315,7 @@   const SWord8 s3222 = s3221 ? s3115 : s3116;   const SBool  s3223 = (SBool) (s3222 & 1);   const SBool  s3224 = false != s3223;-  const SBool  s3225 = false == s3224;+  const SBool  s3225 = !s3224;   const SBool  s3226 = s3216 < s1;   const SBool  s3227 = s3216 < s3105;   const SBool  s3228 = s3226 || s3227;@@ -3424,7 +3424,7 @@   const SWord8 s3331 = s3330 ? s3096 : s3097;   const SBool  s3332 = (SBool) (s3331 & 1);   const SBool  s3333 = false != s3332;-  const SBool  s3334 = false == s3333;+  const SBool  s3334 = !s3333;   const SBool  s3335 = s3325 < s1;   const SBool  s3336 = s3325 < s3086;   const SBool  s3337 = s3335 || s3336;@@ -3446,7 +3446,7 @@   const SWord8 s3353 = s3349 ? s3351 : s3352;   const SBool  s3354 = (SBool) (s3353 & 1);   const SBool  s3355 = false != s3354;-  const SBool  s3356 = false == s3355;+  const SBool  s3356 = !s3355;   const SWord8 s3357 = (s3341 >> 1) | (s3341 << 7);   const SWord8 s3358 = 128 | s3357;   const SWord8 s3359 = 127 & s3357;@@ -3551,7 +3551,7 @@   const SWord8 s3458 = s3457 ? s3351 : s3352;   const SBool  s3459 = (SBool) (s3458 & 1);   const SBool  s3460 = false != s3459;-  const SBool  s3461 = false == s3460;+  const SBool  s3461 = !s3460;   const SBool  s3462 = s3452 < s1;   const SBool  s3463 = s3452 < s3341;   const SBool  s3464 = s3462 || s3463;@@ -3661,7 +3661,7 @@   const SWord8 s3568 = s3567 ? s3077 : s3078;   const SBool  s3569 = (SBool) (s3568 & 1);   const SBool  s3570 = false != s3569;-  const SBool  s3571 = false == s3570;+  const SBool  s3571 = !s3570;   const SBool  s3572 = s3562 < s1;   const SBool  s3573 = s3562 < s3067;   const SBool  s3574 = s3572 || s3573;@@ -3683,7 +3683,7 @@   const SWord8 s3590 = s3586 ? s3588 : s3589;   const SBool  s3591 = (SBool) (s3590 & 1);   const SBool  s3592 = false != s3591;-  const SBool  s3593 = false == s3592;+  const SBool  s3593 = !s3592;   const SWord8 s3594 = (s3578 >> 1) | (s3578 << 7);   const SWord8 s3595 = 128 | s3594;   const SWord8 s3596 = 127 & s3594;@@ -3702,7 +3702,7 @@   const SWord8 s3609 = s3605 ? s3607 : s3608;   const SBool  s3610 = (SBool) (s3609 & 1);   const SBool  s3611 = false != s3610;-  const SBool  s3612 = false == s3611;+  const SBool  s3612 = !s3611;   const SWord8 s3613 = (s3597 >> 1) | (s3597 << 7);   const SWord8 s3614 = 128 | s3613;   const SWord8 s3615 = 127 & s3613;@@ -3807,7 +3807,7 @@   const SWord8 s3714 = s3713 ? s3607 : s3608;   const SBool  s3715 = (SBool) (s3714 & 1);   const SBool  s3716 = false != s3715;-  const SBool  s3717 = false == s3716;+  const SBool  s3717 = !s3716;   const SBool  s3718 = s3708 < s1;   const SBool  s3719 = s3708 < s3597;   const SBool  s3720 = s3718 || s3719;@@ -3916,7 +3916,7 @@   const SWord8 s3823 = s3822 ? s3588 : s3589;   const SBool  s3824 = (SBool) (s3823 & 1);   const SBool  s3825 = false != s3824;-  const SBool  s3826 = false == s3825;+  const SBool  s3826 = !s3825;   const SBool  s3827 = s3817 < s1;   const SBool  s3828 = s3817 < s3578;   const SBool  s3829 = s3827 || s3828;@@ -3938,7 +3938,7 @@   const SWord8 s3845 = s3841 ? s3843 : s3844;   const SBool  s3846 = (SBool) (s3845 & 1);   const SBool  s3847 = false != s3846;-  const SBool  s3848 = false == s3847;+  const SBool  s3848 = !s3847;   const SWord8 s3849 = (s3833 >> 1) | (s3833 << 7);   const SWord8 s3850 = 128 | s3849;   const SWord8 s3851 = 127 & s3849;@@ -4043,7 +4043,7 @@   const SWord8 s3950 = s3949 ? s3843 : s3844;   const SBool  s3951 = (SBool) (s3950 & 1);   const SBool  s3952 = false != s3951;-  const SBool  s3953 = false == s3952;+  const SBool  s3953 = !s3952;   const SBool  s3954 = s3944 < s1;   const SBool  s3955 = s3944 < s3833;   const SBool  s3956 = s3954 || s3955;
SBVTestSuite/GoldFiles/mapNoFailure.gold view
@@ -23,7 +23,6 @@ [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -147,8 +146,6 @@ [GOOD] (define-fun s124 () Bool (or s119 s123)) [GOOD] (define-fun s125 () Bool (not s19)) [GOOD] (define-fun s126 () Bool (and s124 s125))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s6)
SBVTestSuite/GoldFiles/mapWithFailure.gold view
@@ -23,7 +23,6 @@ [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "ints" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -176,8 +175,6 @@ [GOOD] (define-fun s153 () Bool (not s3)) [GOOD] (define-fun s154 () Bool (and s152 s153)) [GOOD] (define-fun s155 () Bool (=> s94 s154))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s155)
SBVTestSuite/GoldFiles/maxlWithFailure.gold view
@@ -20,7 +20,6 @@ [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "ints" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -154,8 +153,6 @@ [GOOD] (define-fun s131 () Bool (not s3)) [GOOD] (define-fun s132 () Bool (and s130 s131)) [GOOD] (define-fun s133 () Bool (=> s82 s132))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s133)
SBVTestSuite/GoldFiles/maxrWithFailure.gold view
@@ -20,7 +20,6 @@ [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "ints" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -163,8 +162,6 @@ [GOOD] (define-fun s140 () Bool (not s3)) [GOOD] (define-fun s141 () Bool (and s139 s140)) [GOOD] (define-fun s142 () Bool (=> s82 s141))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s142)
SBVTestSuite/GoldFiles/nested1.gold view
@@ -11,4 +11,4 @@ *** See https://github.com/LeventErkok/sbv/issues/71 for several examples.  CallStack (from HasCallStack):-  error, called at ./Data/SBV/Core/Symbolic.hs:1938:48 in sbv-10.12-inplace:Data.SBV.Core.Symbolic+  error, called at ./Data/SBV/Core/Symbolic.hs:1896:48 in sbv-11.0-inplace:Data.SBV.Core.Symbolic
SBVTestSuite/GoldFiles/nested2.gold view
@@ -11,4 +11,4 @@ *** See https://github.com/LeventErkok/sbv/issues/71 for several examples.  CallStack (from HasCallStack):-  error, called at ./Data/SBV/Core/Symbolic.hs:1938:48 in sbv-10.12-inplace:Data.SBV.Core.Symbolic+  error, called at ./Data/SBV/Core/Symbolic.hs:1896:48 in sbv-11.0-inplace:Data.SBV.Core.Symbolic
SBVTestSuite/GoldFiles/nested3.gold view
@@ -14,12 +14,9 @@ [GOOD] (declare-fun s0 () Bool) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- *** Solver   : Z3@@ -37,4 +34,4 @@ *** See https://github.com/LeventErkok/sbv/issues/71 for several examples.  CallStack (from HasCallStack):-  error, called at ./Data/SBV/Core/Symbolic.hs:1938:48 in sbv-10.12-inplace:Data.SBV.Core.Symbolic+  error, called at ./Data/SBV/Core/Symbolic.hs:1896:48 in sbv-11.0-inplace:Data.SBV.Core.Symbolic
SBVTestSuite/GoldFiles/nested4.gold view
@@ -2,8 +2,8 @@  Data.SBV: Mismatched contexts detected. ***-*** Current context: SBVContext (-7749304166575005736)-*** Mixed with     : SBVContext (-531973508589804280)+*** Current context: SBVContext (-531973508589804280)+*** Mixed with     : SBVContext (-7749304166575005736) *** *** This happens if you call a proof-function (prove/sat/runSMT/isSatisfiable) etc. *** while another one is in execution, or use results from one such call in another.@@ -11,4 +11,4 @@ *** See https://github.com/LeventErkok/sbv/issues/71 for several examples.  CallStack (from HasCallStack):-  error, called at ./Data/SBV/Core/Symbolic.hs:1938:48 in sbv-10.12-inplace:Data.SBV.Core.Symbolic+  error, called at ./Data/SBV/Core/Symbolic.hs:1896:48 in sbv-11.0-inplace:Data.SBV.Core.Symbolic
SBVTestSuite/GoldFiles/noOpt1.gold view
@@ -14,12 +14,9 @@ [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- *** Solver   : Z3@@ -31,4 +28,4 @@ *** Use "sat" for plain satisfaction  CallStack (from HasCallStack):-  error, called at ./Data/SBV/Provers/Prover.hs:261:27 in sbv-10.12-inplace:Data.SBV.Provers.Prover+  error, called at ./Data/SBV/Provers/Prover.hs:264:27 in sbv-11.0-inplace:Data.SBV.Provers.Prover
SBVTestSuite/GoldFiles/noOpt2.gold view
@@ -16,12 +16,9 @@ [GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks mx [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- *** Solver   : Z3@@ -33,4 +30,4 @@ *** Use "optimize"/"optimizeWith" to calculate optimal satisfaction!  CallStack (from HasCallStack):-  error, called at ./Data/SBV/Provers/Prover.hs:608:33 in sbv-10.12-inplace:Data.SBV.Provers.Prover+  error, called at ./Data/SBV/Provers/Prover.hs:611:33 in sbv-11.0-inplace:Data.SBV.Provers.Prover
SBVTestSuite/GoldFiles/nonlinear_cvc4.gold view
@@ -14,14 +14,11 @@ [GOOD] (declare-fun s0 () Real) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Real (* s0 s0)) [GOOD] (define-fun s3 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/nonlinear_cvc5.gold view
@@ -14,14 +14,11 @@ [GOOD] (declare-fun s0 () Real) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Real (* s0 s0)) [GOOD] (define-fun s3 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/nonlinear_z3.gold view
@@ -15,14 +15,11 @@ [GOOD] (declare-fun s0 () Real) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Real (* s0 s0)) [GOOD] (define-fun s3 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/pbAtLeast.gold view
@@ -26,7 +26,6 @@ [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -53,8 +52,6 @@ [GOOD] (define-fun s33 () Bool (bvuge s31 s32)) [GOOD] (define-fun s34 () Bool (= s10 s33)) [GOOD] (define-fun s35 () Bool (not s34))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s35)
SBVTestSuite/GoldFiles/pbAtMost.gold view
@@ -26,7 +26,6 @@ [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -53,8 +52,6 @@ [GOOD] (define-fun s33 () Bool (bvule s31 s32)) [GOOD] (define-fun s34 () Bool (= s10 s33)) [GOOD] (define-fun s35 () Bool (not s34))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s35)
SBVTestSuite/GoldFiles/pbEq.gold view
@@ -34,7 +34,6 @@ [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -61,8 +60,6 @@ [GOOD] (define-fun s41 () Bool (= s29 s40)) [GOOD] (define-fun s42 () Bool (= s10 s41)) [GOOD] (define-fun s43 () Bool (not s42))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s43)
SBVTestSuite/GoldFiles/pbEq2.gold view
@@ -23,7 +23,6 @@ [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -34,14 +33,14 @@ [GOOD] (define-fun s14 () Bool ((_ pbeq 1 1 1 1) s0 s3 s4)) [GOOD] (define-fun s15 () Bool (ite s2 s13 s14)) [GOOD] (define-fun s16 () Bool (and s12 s15))-[GOOD] (define-fun s17 () Bool (= false s0))-[GOOD] (define-fun s18 () Bool (= false s2))-[GOOD] (define-fun s19 () Bool (= false s4))+[GOOD] (define-fun s17 () Bool (not s0))+[GOOD] (define-fun s18 () Bool (not s2))+[GOOD] (define-fun s19 () Bool (not s4)) [GOOD] (define-fun s20 () Bool (and s3 s19)) [GOOD] (define-fun s21 () Bool (and s18 s20)) [GOOD] (define-fun s22 () Bool (and s1 s21)) [GOOD] (define-fun s23 () Bool (and s17 s22))-[GOOD] (define-fun s24 () Bool (= false s3))+[GOOD] (define-fun s24 () Bool (not s3)) [GOOD] (define-fun s25 () Bool (and s4 s24)) [GOOD] (define-fun s26 () Bool (and s18 s25)) [GOOD] (define-fun s27 () Bool (and s1 s26))@@ -49,8 +48,6 @@ [GOOD] (define-fun s29 () Bool (or s23 s28)) [GOOD] (define-fun s30 () Bool (=> s16 s29)) [GOOD] (define-fun s31 () Bool (not s30))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s31)
SBVTestSuite/GoldFiles/pbExactly.gold view
@@ -26,7 +26,6 @@ [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -53,8 +52,6 @@ [GOOD] (define-fun s33 () Bool (= s31 s32)) [GOOD] (define-fun s34 () Bool (= s10 s33)) [GOOD] (define-fun s35 () Bool (not s34))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s35)
SBVTestSuite/GoldFiles/pbGe.gold view
@@ -34,7 +34,6 @@ [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -61,8 +60,6 @@ [GOOD] (define-fun s41 () Bool (>= s40 s29)) [GOOD] (define-fun s42 () Bool (= s10 s41)) [GOOD] (define-fun s43 () Bool (not s42))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s43)
SBVTestSuite/GoldFiles/pbLe.gold view
@@ -34,7 +34,6 @@ [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -61,8 +60,6 @@ [GOOD] (define-fun s41 () Bool (<= s40 s29)) [GOOD] (define-fun s42 () Bool (= s10 s41)) [GOOD] (define-fun s43 () Bool (not s42))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s43)
SBVTestSuite/GoldFiles/pbMutexed.gold view
@@ -25,7 +25,6 @@ [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -52,8 +51,6 @@ [GOOD] (define-fun s32 () Bool (bvule s31 s11)) [GOOD] (define-fun s33 () Bool (= s10 s32)) [GOOD] (define-fun s34 () Bool (not s33))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s34)
SBVTestSuite/GoldFiles/pbStronglyMutexed.gold view
@@ -25,7 +25,6 @@ [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -52,8 +51,6 @@ [GOOD] (define-fun s32 () Bool (= s11 s31)) [GOOD] (define-fun s33 () Bool (= s10 s32)) [GOOD] (define-fun s34 () Bool (not s33))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s34)
SBVTestSuite/GoldFiles/qEnum1.gold view
@@ -20,15 +20,12 @@ [GOOD] (declare-fun s2 () BinOp) ; tracks user variable "t" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (<= (BinOp_constrIndex s0) (BinOp_constrIndex s1))) [GOOD] (define-fun s4 () Bool (<= (BinOp_constrIndex s1) (BinOp_constrIndex s2))) [GOOD] (define-fun s5 () Bool (distinct s0 s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/qUninterp1.gold view
@@ -18,12 +18,9 @@ [GOOD] (declare-fun s0 () L) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/quantifiedB_0.gold view
@@ -13,30 +13,27 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)) (l1_s2 (_ BitVec 8)) (l1_s3 (_ BitVec 8)))-         (let ((l1_s4 #x14))-         (let ((l1_s12 #x01))-         (let ((l1_s17 #x00))-         (let ((l1_s5 (bvult l1_s0 l1_s4)))-         (let ((l1_s6 (bvult l1_s1 l1_s4)))-         (let ((l1_s7 (bvult l1_s2 l1_s4)))-         (let ((l1_s8 (bvult l1_s3 l1_s4)))-         (let ((l1_s9 (and l1_s7 l1_s8)))-         (let ((l1_s10 (and l1_s6 l1_s9)))-         (let ((l1_s11 (and l1_s5 l1_s10)))-         (let ((l1_s13 (bvadd l1_s0 l1_s12)))-         (let ((l1_s14 (bvadd l1_s1 l1_s13)))-         (let ((l1_s15 (bvadd l1_s2 l1_s14)))-         (let ((l1_s16 (bvadd l1_s3 l1_s15)))-         (let ((l1_s18 (= l1_s16 l1_s17)))-         (let ((l1_s19 (and l1_s11 l1_s18)))-         l1_s19))))))))))))))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s4 #x14))+                                 (let ((l1_s12 #x01))+                                 (let ((l1_s17 #x00))+                                 (let ((l1_s5 (bvult l1_s0 l1_s4)))+                                 (let ((l1_s6 (bvult l1_s1 l1_s4)))+                                 (let ((l1_s7 (bvult l1_s2 l1_s4)))+                                 (let ((l1_s8 (bvult l1_s3 l1_s4)))+                                 (let ((l1_s9 (and l1_s7 l1_s8)))+                                 (let ((l1_s10 (and l1_s6 l1_s9)))+                                 (let ((l1_s11 (and l1_s5 l1_s10)))+                                 (let ((l1_s13 (bvadd l1_s0 l1_s12)))+                                 (let ((l1_s14 (bvadd l1_s1 l1_s13)))+                                 (let ((l1_s15 (bvadd l1_s2 l1_s14)))+                                 (let ((l1_s16 (bvadd l1_s3 l1_s15)))+                                 (let ((l1_s18 (= l1_s16 l1_s17)))+                                 (let ((l1_s19 (and l1_s11 l1_s18)))+                                 l1_s19)))))))))))))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantifiedB_1.gold view
@@ -13,19 +13,16 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)) (l1_s2 (_ BitVec 8)) (l1_s3 (_ BitVec 8)))-         (let ((l1_s7 #x00))-         (let ((l1_s4 (bvadd l1_s0 l1_s1)))-         (let ((l1_s5 (bvadd l1_s2 l1_s4)))-         (let ((l1_s6 (bvadd l1_s3 l1_s5)))-         (let ((l1_s8 (= l1_s6 l1_s7)))-         l1_s8)))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s7 #x00))+                                 (let ((l1_s4 (bvadd l1_s0 l1_s1)))+                                 (let ((l1_s5 (bvadd l1_s2 l1_s4)))+                                 (let ((l1_s6 (bvadd l1_s3 l1_s5)))+                                 (let ((l1_s8 (= l1_s6 l1_s7)))+                                 l1_s8))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantifiedB_2.gold view
@@ -14,18 +14,15 @@ [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)) (l1_s2 (_ BitVec 8)) (l1_s3 (_ BitVec 8)))-         (let ((l1_s4 (bvadd l1_s0 l1_s1)))-         (let ((l1_s5 (bvadd l1_s2 l1_s4)))-         (let ((l1_s6 (bvadd l1_s3 l1_s5)))-         (let ((l1_s7 (= s0 l1_s6)))-         l1_s7))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s4 (bvadd l1_s0 l1_s1)))+                                 (let ((l1_s5 (bvadd l1_s2 l1_s4)))+                                 (let ((l1_s6 (bvadd l1_s3 l1_s5)))+                                 (let ((l1_s7 (= s0 l1_s6)))+                                 l1_s7)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s1)
SBVTestSuite/GoldFiles/quantifiedB_3.gold view
@@ -14,18 +14,15 @@ [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)) (l1_s2 (_ BitVec 8)) (l1_s3 (_ BitVec 8)))-         (let ((l1_s4 (bvadd l1_s0 l1_s1)))-         (let ((l1_s5 (bvadd l1_s2 l1_s4)))-         (let ((l1_s6 (bvadd l1_s3 l1_s5)))-         (let ((l1_s7 (= s0 l1_s6)))-         l1_s7))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s4 (bvadd l1_s0 l1_s1)))+                                 (let ((l1_s5 (bvadd l1_s2 l1_s4)))+                                 (let ((l1_s6 (bvadd l1_s3 l1_s5)))+                                 (let ((l1_s7 (= s0 l1_s6)))+                                 l1_s7)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s1)
SBVTestSuite/GoldFiles/quantifiedB_4.gold view
@@ -13,18 +13,15 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)) (l1_s2 (_ BitVec 8)) (l1_s3 (_ BitVec 8)) (l1_s4 (_ BitVec 8)))-         (let ((l1_s5 (bvadd l1_s0 l1_s1)))-         (let ((l1_s6 (bvadd l1_s2 l1_s5)))-         (let ((l1_s7 (bvadd l1_s3 l1_s6)))-         (let ((l1_s8 (= l1_s4 l1_s7)))-         l1_s8))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s5 (bvadd l1_s0 l1_s1)))+                                 (let ((l1_s6 (bvadd l1_s2 l1_s5)))+                                 (let ((l1_s7 (bvadd l1_s3 l1_s6)))+                                 (let ((l1_s8 (= l1_s4 l1_s7)))+                                 l1_s8)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantifiedB_5.gold view
@@ -13,18 +13,15 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)) (l1_s2 (_ BitVec 8)) (l1_s3 (_ BitVec 8))) (forall ((l1_s4 (_ BitVec 8)))-         (let ((l1_s5 (bvadd l1_s0 l1_s1)))-         (let ((l1_s6 (bvadd l1_s2 l1_s5)))-         (let ((l1_s7 (bvadd l1_s3 l1_s6)))-         (let ((l1_s8 (= l1_s4 l1_s7)))-         l1_s8)))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s5 (bvadd l1_s0 l1_s1)))+                                 (let ((l1_s6 (bvadd l1_s2 l1_s5)))+                                 (let ((l1_s7 (bvadd l1_s3 l1_s6)))+                                 (let ((l1_s8 (= l1_s4 l1_s7)))+                                 l1_s8))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantifiedB_6.gold view
@@ -13,14 +13,11 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 Bool))-         l1_s0))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 l1_s0)) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantifiedB_7.gold view
@@ -13,15 +13,13 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 Bool))-         (exists ((l2_s0 Bool))+                                 (let ((l1_s1 (exists ((l2_s0 Bool))          (or l1_s0 l2_s0))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 l1_s1))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantifiedB_8.gold view
@@ -13,15 +13,13 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 Bool))-         (exists ((l2_s0 Bool))+                                 (let ((l1_s1 (exists ((l2_s0 Bool))          (or l1_s0 l2_s0))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 l1_s1))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantifiedB_9.gold view
@@ -13,15 +13,13 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 Bool))-         (exists ((l2_s0 Bool))+                                 (let ((l1_s1 (exists ((l2_s0 Bool))          (or l1_s0 l2_s0))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 l1_s1))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantifiedB_A.gold view
@@ -13,19 +13,16 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 Int)) (forall ((l1_s1 Int)) (exists ((l1_s2 Int)) (forall ((l1_s3 Int))-         (let ((l1_s7 0))-         (let ((l1_s4 (+ l1_s0 l1_s1)))-         (let ((l1_s5 (+ l1_s2 l1_s4)))-         (let ((l1_s6 (+ l1_s3 l1_s5)))-         (let ((l1_s8 (= l1_s6 l1_s7)))-         l1_s8))))))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s7 0))+                                 (let ((l1_s4 (+ l1_s0 l1_s1)))+                                 (let ((l1_s5 (+ l1_s2 l1_s4)))+                                 (let ((l1_s6 (+ l1_s3 l1_s5)))+                                 (let ((l1_s8 (= l1_s6 l1_s7)))+                                 l1_s8)))))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantifiedB_B.gold view
@@ -13,19 +13,16 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int)) (exists ((l1_s1 Int)) (forall ((l1_s2 Int)) (exists ((l1_s3 Int))-         (let ((l1_s7 0))-         (let ((l1_s4 (+ l1_s0 l1_s1)))-         (let ((l1_s5 (+ l1_s2 l1_s4)))-         (let ((l1_s6 (+ l1_s3 l1_s5)))-         (let ((l1_s8 (= l1_s6 l1_s7)))-         l1_s8))))))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s7 0))+                                 (let ((l1_s4 (+ l1_s0 l1_s1)))+                                 (let ((l1_s5 (+ l1_s2 l1_s4)))+                                 (let ((l1_s6 (+ l1_s3 l1_s5)))+                                 (let ((l1_s8 (= l1_s6 l1_s7)))+                                 l1_s8)))))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_prove_existsexists_contradiction_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_existsexists_satisfiable_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_existsexists_thm_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_existsforall_contradiction_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8))) (forall ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_existsforall_satisfiable_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8))) (forall ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_existsforall_thm_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8))) (forall ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_forallexists_contradiction_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8))) (exists ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_forallexists_satisfiable_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8))) (exists ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_forallexists_thm_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8))) (exists ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_forallforall_contradiction_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_forallforall_satisfiable_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_prove_forallforall_thm_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (not s0))
SBVTestSuite/GoldFiles/quantified_sat_existsexists_contradiction_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsexists_contradiction_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsexists_satisfiable_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsexists_satisfiable_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsexists_thm_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsexists_thm_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsforall_contradiction_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8))) (forall ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsforall_contradiction_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8))) (forall ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsforall_satisfiable_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8))) (forall ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsforall_satisfiable_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8))) (forall ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsforall_thm_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8))) (forall ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_existsforall_thm_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (exists ((l1_s0 (_ BitVec 8))) (forall ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallexists_contradiction_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8))) (exists ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallexists_contradiction_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8))) (exists ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallexists_satisfiable_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8))) (exists ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallexists_satisfiable_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8))) (exists ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallexists_thm_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8))) (exists ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallexists_thm_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8))) (exists ((l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallforall_contradiction_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallforall_contradiction_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (= l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s1)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (= l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s1)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallforall_satisfiable_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallforall_satisfiable_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 #x01))-         (let ((l1_s3 (bvadd l1_s1 l1_s2)))-         (let ((l1_s4 (= l1_s0 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 #x01))+                                 (let ((l1_s3 (bvadd l1_s1 l1_s2)))+                                 (let ((l1_s4 (= l1_s0 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallforall_thm_c.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/quantified_sat_forallforall_thm_p.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))-         (let ((l1_s2 (bvsub l1_s1 l1_s0)))-         (let ((l1_s3 (bvadd l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4)))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 (bvsub l1_s1 l1_s0)))+                                 (let ((l1_s3 (bvadd l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/query1.gold view
@@ -29,14 +29,11 @@ [GOOD] (declare-fun s5 () (_ BitVec 8)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s7 () Bool (> s0 s6)) [GOOD] (define-fun s8 () Bool (> s1 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (! s7 :named |a > 0|))@@ -77,7 +74,7 @@ [SEND] (get-info :reason-unknown) [RECV] (:reason-unknown "state of the most recent check-sat command is not known") [SEND] (get-info :version)-[RECV] (:version "4.13.1")+[RECV] (:version "4.13.4") [SEND] (get-info :status) [RECV] (:status sat) [GOOD] (define-fun s16 () Int 4)@@ -108,7 +105,7 @@ [SEND] (get-info :reason-unknown) [RECV] (:reason-unknown "unknown") [SEND] (get-info :version)-[RECV] (:version "4.13.1")+[RECV] (:version "4.13.4") [SEND] (get-info :memory) [RECV] unsupported [SEND] (get-info :time)@@ -151,19 +148,19 @@ [SEND] (get-proof) [RECV] ((set-logic ALL)        (proof-       (let (($x268 (<= s0 6)))-       (let (($x269 (not $x268)))-       (let (($x276 (or (not bey) $x269)))-       (let ((@x274 (monotonicity (rewrite (= (> s0 6) $x269)) (= (=> bey (> s0 6)) (=> bey $x269)))))-       (let ((@x280 (trans @x274 (rewrite (= (=> bey $x269) $x276)) (= (=> bey (> s0 6)) $x276))))-       (let ((@x281 (mp (asserted (=> bey (> s0 6))) @x280 $x276)))-       (let (($x293 (>= s0 6)))-       (let (($x292 (not $x293)))-       (let (($x300 (or (not hey) $x292)))-       (let ((@x291 (trans (rewrite (= (< s0 6) (not (<= 6 s0)))) (rewrite (= (not (<= 6 s0)) $x292)) (= (< s0 6) $x292))))-       (let ((@x304 (trans (monotonicity @x291 (= (=> hey (< s0 6)) (=> hey $x292))) (rewrite (= (=> hey $x292) $x300)) (= (=> hey (< s0 6)) $x300))))-       (let ((@x305 (mp (asserted (=> hey (< s0 6))) @x304 $x300)))-       (unit-resolution ((_ th-lemma arith farkas 1 1) (or $x293 $x268)) (unit-resolution @x305 (asserted hey) $x292) (unit-resolution @x281 (asserted bey) $x269) false)))))))))))))))+       (let (($x267 (<= s0 6)))+       (let (($x268 (not $x267)))+       (let (($x275 (or (not bey) $x268)))+       (let ((@x273 (monotonicity (rewrite (= (> s0 6) $x268)) (= (=> bey (> s0 6)) (=> bey $x268)))))+       (let ((@x279 (trans @x273 (rewrite (= (=> bey $x268) $x275)) (= (=> bey (> s0 6)) $x275))))+       (let ((@x280 (mp (asserted (=> bey (> s0 6))) @x279 $x275)))+       (let (($x292 (>= s0 6)))+       (let (($x291 (not $x292)))+       (let (($x299 (or (not hey) $x291)))+       (let ((@x290 (trans (rewrite (= (< s0 6) (not (<= 6 s0)))) (rewrite (= (not (<= 6 s0)) $x291)) (= (< s0 6) $x291))))+       (let ((@x303 (trans (monotonicity @x290 (= (=> hey (< s0 6)) (=> hey $x291))) (rewrite (= (=> hey $x291) $x299)) (= (=> hey (< s0 6)) $x299))))+       (let ((@x304 (mp (asserted (=> hey (< s0 6))) @x303 $x299)))+       (unit-resolution ((_ th-lemma arith farkas 1 1) (or $x292 $x267)) (unit-resolution @x304 (asserted hey) $x291) (unit-resolution @x280 (asserted bey) $x268) false))))))))))))))) [SEND, TimeOut: 90000ms] (get-assertions)  [RECV] ((! s7 :named |a > 0|)
SBVTestSuite/GoldFiles/queryArrays1.gold view
@@ -5,44 +5,40 @@ [GOOD] (set-option :smtlib2_compliant true) [GOOD] (set-option :diagnostic-output-channel "stdout") [GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      ) [GOOD] (set-logic ALL) ; external query, using all logics. [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] ; --- top level inputs ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "a1"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "a2"-[GOOD] (declare-fun s3 () (_ BitVec 8)) ; tracks user variable "v1"+[GOOD] (declare-fun s0 () (Array (_ BitVec 8) (_ BitVec 8))) ; tracks user variable "a"+[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "a1"+[GOOD] (declare-fun s2 () (_ BitVec 8)) ; tracks user variable "a2"+[GOOD] (declare-fun s4 () (_ BitVec 8)) ; tracks user variable "v1" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays ----[GOOD] (declare-fun array_0 () (Array (_ BitVec 8) (_ BitVec 8))) [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed+[GOOD] (define-fun s3 () Bool (distinct s1 s2)) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert s2)-[GOOD] (declare-fun array_1 () (Array (_ BitVec 8) (_ BitVec 8)))-[GOOD] (define-fun s4 () (_ BitVec 8) (select array_1 s0))-[GOOD] (define-fun s5 () Bool (= s3 s4))-[GOOD] (define-fun array_1_initializer_0 () Bool (= array_1 (store array_0 s0 s3)))-[GOOD] (define-fun array_1_initializer () Bool array_1_initializer_0)-[GOOD] (assert array_1_initializer)-[GOOD] (assert s5)+[GOOD] (assert s3)+[GOOD] (define-fun s5 () (Array (_ BitVec 8) (_ BitVec 8)) (store s0 s1 s4))+[GOOD] (define-fun s6 () (_ BitVec 8) (select s5 s1))+[GOOD] (define-fun s7 () Bool (= s4 s6))+[GOOD] (assert s7) [SEND] (check-sat) [RECV] sat-[SEND] (get-value (s0))-[RECV] ((s0 #xff)) [SEND] (get-value (s1))-[RECV] ((s1 #x00))-[SEND] (get-value (s3))-[RECV] ((s3 #x00))+[RECV] ((s1 #xff))+[SEND] (get-value (s2))+[RECV] ((s2 #x00))+[SEND] (get-value (s4))+[RECV] ((s4 #x00)) *** Solver   : Z3 *** Exit code: ExitSuccess 
+ SBVTestSuite/GoldFiles/queryArrays10.gold view
@@ -0,0 +1,37 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array Int String)) ; tracks user variable "x"+[GOOD] (assert (forall ((array0 Int)) (= 1 (str.len (select s0 array0)))))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (define-fun s1 () Int 5)+[GOOD] (define-fun s3 () String (_ char #x61))+[GOOD] (define-fun s2 () String (select s0 s1))+[GOOD] (define-fun s4 () Bool (= s2 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:Sat+DONE!
+ SBVTestSuite/GoldFiles/queryArrays11.gold view
@@ -0,0 +1,37 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has non-bitvector arrays, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array String String)) ; tracks user variable "x"+[GOOD] (assert (forall ((array0 String)) (= 1 (str.len (select s0 array0)))))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (define-fun s1 () String (_ char #x61))+[GOOD] (define-fun s3 () String (_ char #x62))+[GOOD] (define-fun s2 () String (select s0 s1))+[GOOD] (define-fun s4 () Bool (= s2 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:Sat+DONE!
+ SBVTestSuite/GoldFiles/queryArrays12.gold view
@@ -0,0 +1,81 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] (declare-datatype SBVRational ((SBV.Rational (sbv.rat.numerator Int) (sbv.rat.denominator Int))))++[GOOD] (define-fun sbv.rat.eq ((x SBVRational) (y SBVRational)) Bool+          (= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+             (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.notEq ((x SBVRational) (y SBVRational)) Bool+          (not (sbv.rat.eq x y))+       )++[GOOD] (define-fun sbv.rat.lt ((x SBVRational) (y SBVRational)) Bool+          (<  (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.leq ((x SBVRational) (y SBVRational)) Bool+          (<= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.plus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (+ (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.minus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (- (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.times ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (* (sbv.rat.numerator   x) (sbv.rat.numerator y))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.uneg ((x SBVRational)) SBVRational+          (SBV.Rational (* (- 1) (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )++[GOOD] (define-fun sbv.rat.abs ((x SBVRational)) SBVRational+          (SBV.Rational (abs (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array SBVRational Int)) ; tracks user variable "x"+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (define-fun s1 () SBVRational (SBV.Rational 5 3))+[GOOD] (define-fun s3 () Int 5)+[GOOD] (define-fun s2 () Int (select s0 s1))+[GOOD] (define-fun s4 () Bool (= s2 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:Sat+DONE!
+ SBVTestSuite/GoldFiles/queryArrays13.gold view
@@ -0,0 +1,82 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] (declare-datatype SBVRational ((SBV.Rational (sbv.rat.numerator Int) (sbv.rat.denominator Int))))++[GOOD] (define-fun sbv.rat.eq ((x SBVRational) (y SBVRational)) Bool+          (= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+             (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.notEq ((x SBVRational) (y SBVRational)) Bool+          (not (sbv.rat.eq x y))+       )++[GOOD] (define-fun sbv.rat.lt ((x SBVRational) (y SBVRational)) Bool+          (<  (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.leq ((x SBVRational) (y SBVRational)) Bool+          (<= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.plus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (+ (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.minus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (- (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.times ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (* (sbv.rat.numerator   x) (sbv.rat.numerator y))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.uneg ((x SBVRational)) SBVRational+          (SBV.Rational (* (- 1) (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )++[GOOD] (define-fun sbv.rat.abs ((x SBVRational)) SBVRational+          (SBV.Rational (abs (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array Int SBVRational)) ; tracks user variable "x"+[GOOD] (assert (forall ((array0 Int)) (< 0 (sbv.rat.denominator (select s0 array0)))))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (define-fun s1 () Int 5)+[GOOD] (define-fun s3 () SBVRational (SBV.Rational 5 3))+[GOOD] (define-fun s2 () SBVRational (select s0 s1))+[GOOD] (define-fun s4 () Bool (sbv.rat.eq s2 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:Sat+DONE!
+ SBVTestSuite/GoldFiles/queryArrays14.gold view
@@ -0,0 +1,82 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has rational values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] (declare-datatype SBVRational ((SBV.Rational (sbv.rat.numerator Int) (sbv.rat.denominator Int))))++[GOOD] (define-fun sbv.rat.eq ((x SBVRational) (y SBVRational)) Bool+          (= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+             (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.notEq ((x SBVRational) (y SBVRational)) Bool+          (not (sbv.rat.eq x y))+       )++[GOOD] (define-fun sbv.rat.lt ((x SBVRational) (y SBVRational)) Bool+          (<  (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.leq ((x SBVRational) (y SBVRational)) Bool+          (<= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.plus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (+ (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.minus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (- (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.times ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (* (sbv.rat.numerator   x) (sbv.rat.numerator y))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.uneg ((x SBVRational)) SBVRational+          (SBV.Rational (* (- 1) (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )++[GOOD] (define-fun sbv.rat.abs ((x SBVRational)) SBVRational+          (SBV.Rational (abs (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array SBVRational SBVRational)) ; tracks user variable "x"+[GOOD] (assert (forall ((array0 SBVRational)) (< 0 (sbv.rat.denominator (select s0 array0)))))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (define-fun s1 () SBVRational (SBV.Rational 5 3))+[GOOD] (define-fun s3 () SBVRational (SBV.Rational 9 8))+[GOOD] (define-fun s2 () SBVRational (select s0 s1))+[GOOD] (define-fun s4 () Bool (sbv.rat.eq s2 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:Sat+DONE!
+ SBVTestSuite/GoldFiles/queryArrays15.gold view
@@ -0,0 +1,82 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has rational values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] (declare-datatype SBVRational ((SBV.Rational (sbv.rat.numerator Int) (sbv.rat.denominator Int))))++[GOOD] (define-fun sbv.rat.eq ((x SBVRational) (y SBVRational)) Bool+          (= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+             (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.notEq ((x SBVRational) (y SBVRational)) Bool+          (not (sbv.rat.eq x y))+       )++[GOOD] (define-fun sbv.rat.lt ((x SBVRational) (y SBVRational)) Bool+          (<  (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.leq ((x SBVRational) (y SBVRational)) Bool+          (<= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.plus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (+ (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.minus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (- (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.times ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (* (sbv.rat.numerator   x) (sbv.rat.numerator y))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.uneg ((x SBVRational)) SBVRational+          (SBV.Rational (* (- 1) (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )++[GOOD] (define-fun sbv.rat.abs ((x SBVRational)) SBVRational+          (SBV.Rational (abs (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array SBVRational String)) ; tracks user variable "x"+[GOOD] (assert (forall ((array0 SBVRational)) (= 1 (str.len (select s0 array0)))))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (define-fun s1 () SBVRational (SBV.Rational 5 3))+[GOOD] (define-fun s3 () String (_ char #x7a))+[GOOD] (define-fun s2 () String (select s0 s1))+[GOOD] (define-fun s4 () Bool (= s2 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:Sat+DONE!
+ SBVTestSuite/GoldFiles/queryArrays16.gold view
@@ -0,0 +1,82 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has rational values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] (declare-datatype SBVRational ((SBV.Rational (sbv.rat.numerator Int) (sbv.rat.denominator Int))))++[GOOD] (define-fun sbv.rat.eq ((x SBVRational) (y SBVRational)) Bool+          (= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+             (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.notEq ((x SBVRational) (y SBVRational)) Bool+          (not (sbv.rat.eq x y))+       )++[GOOD] (define-fun sbv.rat.lt ((x SBVRational) (y SBVRational)) Bool+          (<  (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.leq ((x SBVRational) (y SBVRational)) Bool+          (<= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.plus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (+ (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.minus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (- (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.times ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (* (sbv.rat.numerator   x) (sbv.rat.numerator y))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.uneg ((x SBVRational)) SBVRational+          (SBV.Rational (* (- 1) (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )++[GOOD] (define-fun sbv.rat.abs ((x SBVRational)) SBVRational+          (SBV.Rational (abs (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array String SBVRational)) ; tracks user variable "x"+[GOOD] (assert (forall ((array0 String)) (< 0 (sbv.rat.denominator (select s0 array0)))))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (define-fun s1 () String (_ char #x7a))+[GOOD] (define-fun s3 () SBVRational (SBV.Rational 5 3))+[GOOD] (define-fun s2 () SBVRational (select s0 s1))+[GOOD] (define-fun s4 () Bool (sbv.rat.eq s2 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:Sat+DONE!
+ SBVTestSuite/GoldFiles/queryArrays17.gold view
@@ -0,0 +1,85 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has rational values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] (declare-datatypes ((SBVTuple2 2)) ((par (T1 T2)+                                           ((mkSBVTuple2 (proj_1_SBVTuple2 T1)+                                                         (proj_2_SBVTuple2 T2))))))+[GOOD] ; --- sums ---+[GOOD] (declare-datatype SBVRational ((SBV.Rational (sbv.rat.numerator Int) (sbv.rat.denominator Int))))++[GOOD] (define-fun sbv.rat.eq ((x SBVRational) (y SBVRational)) Bool+          (= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+             (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.notEq ((x SBVRational) (y SBVRational)) Bool+          (not (sbv.rat.eq x y))+       )++[GOOD] (define-fun sbv.rat.lt ((x SBVRational) (y SBVRational)) Bool+          (<  (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.leq ((x SBVRational) (y SBVRational)) Bool+          (<= (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+              (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+       )++[GOOD] (define-fun sbv.rat.plus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (+ (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.minus ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (- (* (sbv.rat.numerator   x) (sbv.rat.denominator y))+                           (* (sbv.rat.denominator x) (sbv.rat.numerator   y)))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.times ((x SBVRational) (y SBVRational)) SBVRational+          (SBV.Rational (* (sbv.rat.numerator   x) (sbv.rat.numerator y))+                        (* (sbv.rat.denominator x) (sbv.rat.denominator y)))+       )++[GOOD] (define-fun sbv.rat.uneg ((x SBVRational)) SBVRational+          (SBV.Rational (* (- 1) (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )++[GOOD] (define-fun sbv.rat.abs ((x SBVRational)) SBVRational+          (SBV.Rational (abs (sbv.rat.numerator x)) (sbv.rat.denominator x))+       )+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array (SBVTuple2 String SBVRational) (SBVTuple2 SBVRational String))) ; tracks user variable "x"+[GOOD] (assert (forall ((array0 (SBVTuple2 String SBVRational))) (and (< 0 (sbv.rat.denominator (proj_1_SBVTuple2 (select s0 array0)))) (= 1 (str.len (proj_2_SBVTuple2 (select s0 array0)))))))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (define-fun s1 () (SBVTuple2 String SBVRational) (mkSBVTuple2 (_ char #x7a) (SBV.Rational 5 3)))+[GOOD] (define-fun s3 () (SBVTuple2 SBVRational String) (mkSBVTuple2 (SBV.Rational 5 3) (_ char #x7a)))+[GOOD] (define-fun s2 () (SBVTuple2 SBVRational String) (select s0 s1))+[GOOD] (define-fun s4 () Bool (= s2 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:Sat+DONE!
SBVTestSuite/GoldFiles/queryArrays2.gold view
@@ -14,12 +14,9 @@ [GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "i" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (define-fun s1 () (_ BitVec 8) #x00)
SBVTestSuite/GoldFiles/queryArrays3.gold view
@@ -14,12 +14,9 @@ [GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "i" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (define-fun s1 () (_ BitVec 8) #x00)
SBVTestSuite/GoldFiles/queryArrays4.gold view
@@ -15,12 +15,9 @@ [GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "j" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (define-fun s2 () (_ BitVec 8) #x00)
SBVTestSuite/GoldFiles/queryArrays5.gold view
@@ -5,41 +5,34 @@ [GOOD] (set-option :smtlib2_compliant true) [GOOD] (set-option :diagnostic-output-channel "stdout") [GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      ) [GOOD] (set-logic ALL) ; external query, using all logics. [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] ; --- top level inputs ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "a"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "v"+[GOOD] (declare-fun s0 () (Array (_ BitVec 8) (_ BitVec 8))) ; tracks user variable "a"+[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "a_0"+[GOOD] (declare-fun s2 () (_ BitVec 8)) ; tracks user variable "v" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays ----[GOOD] (declare-fun array_0 () (Array (_ BitVec 8) (_ BitVec 8))) [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] (define-fun s4 () (_ BitVec 8) #x01)-[GOOD] (declare-fun array_1 () (Array (_ BitVec 8) (_ BitVec 8)))-[GOOD] (declare-fun array_2 () (Array (_ BitVec 8) (_ BitVec 8)))-[GOOD] (define-fun s3 () (_ BitVec 8) (bvadd s1 s2))-[GOOD] (define-fun s5 () (_ BitVec 8) (bvadd s0 s4))-[GOOD] (define-fun s6 () (_ BitVec 8) (select array_2 s5))-[GOOD] (define-fun s7 () Bool (distinct s3 s6))-[GOOD] (define-fun array_1_initializer_0 () Bool (= array_1 (store array_0 s0 s1)))-[GOOD] (define-fun array_2_initializer_0 () Bool (= array_2 (store array_1 s5 s3)))-[GOOD] (define-fun array_1_initializer () Bool array_1_initializer_0)-[GOOD] (assert array_1_initializer)-[GOOD] (define-fun array_2_initializer () Bool array_2_initializer_0)-[GOOD] (assert array_2_initializer)-[GOOD] (assert s7)+[GOOD] (define-fun s3 () (_ BitVec 8) #x01)+[GOOD] (define-fun s6 () (_ BitVec 8) #x01)+[GOOD] (define-fun s4 () (_ BitVec 8) (bvadd s2 s3))+[GOOD] (define-fun s5 () (Array (_ BitVec 8) (_ BitVec 8)) (store s0 s1 s2))+[GOOD] (define-fun s7 () (_ BitVec 8) (bvadd s1 s6))+[GOOD] (define-fun s8 () (Array (_ BitVec 8) (_ BitVec 8)) (store s5 s7 s4))+[GOOD] (define-fun s9 () (_ BitVec 8) (select s8 s7))+[GOOD] (define-fun s10 () Bool (distinct s4 s9))+[GOOD] (assert s10) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/queryArrays6.gold view
@@ -5,77 +5,65 @@ [GOOD] (set-option :smtlib2_compliant true) [GOOD] (set-option :diagnostic-output-channel "stdout") [GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      ) [GOOD] (set-logic ALL) ; has unbounded values, using catch-all. [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array Int Int)) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays ----[GOOD] (declare-fun array_0 () (Array Int Int)) [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (push 1)-[GOOD] (define-fun s0 () Int 1)-[GOOD] (define-fun s2 () Int 5)-[GOOD] (declare-fun array_1 () (Array Int Int))-[GOOD] (define-fun array_1_initializer_0 () Bool (= array_1 (store array_0 s0 s0)))-[GOOD] (define-fun s1 () Int (select array_1 s0))-[GOOD] (define-fun s3 () Bool (= s1 s2))-[GOOD] (define-fun array_1_initializer () Bool array_1_initializer_0)-[GOOD] (assert array_1_initializer)-[GOOD] (assert s3)+[GOOD] (define-fun s1 () Int 1)+[GOOD] (define-fun s4 () Int 5)+[GOOD] (define-fun s2 () (Array Int Int) (store s0 s1 s1))+[GOOD] (define-fun s3 () Int (select s2 s1))+[GOOD] (define-fun s5 () Bool (= s3 s4))+[GOOD] (assert s5) [SEND] (check-sat) [RECV] unsat [GOOD] (pop 1)-[GOOD] (assert (and array_0_initializer array_1_initializer))-[GOOD] (declare-fun s4 () Int)-[GOOD] (define-fun s6 () Int 3)-[GOOD] (define-fun s5 () Bool (>= s4 s0))-[GOOD] (define-fun s7 () Bool (< s4 s6))-[GOOD] (define-fun s8 () Bool (and s5 s7))-[GOOD] (assert s8)+[GOOD] (declare-fun s6 () Int)+[GOOD] (define-fun s8 () Int 3)+[GOOD] (define-fun s7 () Bool (>= s6 s1))+[GOOD] (define-fun s9 () Bool (< s6 s8))+[GOOD] (define-fun s10 () Bool (and s7 s9))+[GOOD] (assert s10) [GOOD] (push 1)-[GOOD] (declare-fun array_2 () (Array Int Int))-[GOOD] (define-fun s9 () Int (+ s1 s4))-[GOOD] (define-fun s10 () Int (select array_2 s0))-[GOOD] (define-fun s11 () Bool (= s2 s10))-[GOOD] (define-fun array_2_initializer_0 () Bool (= array_2 (store array_1 s0 s9)))-[GOOD] (define-fun array_2_initializer () Bool array_2_initializer_0)-[GOOD] (assert array_2_initializer)-[GOOD] (assert s11)+[GOOD] (define-fun s11 () Int (+ s3 s6))+[GOOD] (define-fun s12 () (Array Int Int) (store s2 s1 s11))+[GOOD] (define-fun s13 () Int (select s12 s1))+[GOOD] (define-fun s14 () Bool (= s4 s13))+[GOOD] (assert s14) [SEND] (check-sat) [RECV] unsat [GOOD] (pop 1)-[GOOD] (assert (and array_0_initializer array_1_initializer array_2_initializer))-[GOOD] (declare-fun s12 () Int)-[GOOD] (define-fun s13 () Bool (>= s12 s0))-[GOOD] (define-fun s14 () Bool (< s12 s6))-[GOOD] (define-fun s15 () Bool (and s13 s14))-[GOOD] (assert s15)-[GOOD] (push 1)-[GOOD] (declare-fun array_3 () (Array Int Int))-[GOOD] (define-fun s16 () Int (+ s10 s12))-[GOOD] (define-fun s17 () Int (select array_3 s0))-[GOOD] (define-fun s18 () Bool (= s2 s17))-[GOOD] (define-fun array_3_initializer_0 () Bool (= array_3 (store array_2 s0 s16)))-[GOOD] (define-fun array_3_initializer () Bool array_3_initializer_0)-[GOOD] (assert array_3_initializer)+[GOOD] (declare-fun s15 () Int)+[GOOD] (define-fun s16 () Bool (>= s15 s1))+[GOOD] (define-fun s17 () Bool (< s15 s8))+[GOOD] (define-fun s18 () Bool (and s16 s17)) [GOOD] (assert s18)+[GOOD] (push 1)+[GOOD] (define-fun s19 () Int (+ s13 s15))+[GOOD] (define-fun s20 () (Array Int Int) (store s12 s1 s19))+[GOOD] (define-fun s21 () Int (select s20 s1))+[GOOD] (define-fun s22 () Bool (= s4 s21))+[GOOD] (assert s22) [SEND] (check-sat) [RECV] sat-[SEND] (get-value (s4))-[RECV] ((s4 2))-[SEND] (get-value (s12))-[RECV] ((s12 2))+[SEND] (get-value (s6))+[RECV] ((s6 2))+[SEND] (get-value (s15))+[RECV] ((s15 2)) *** Solver   : Z3 *** Exit code: ExitSuccess 
SBVTestSuite/GoldFiles/queryArrays7.gold view
@@ -5,39 +5,34 @@ [GOOD] (set-option :smtlib2_compliant true) [GOOD] (set-option :diagnostic-output-channel "stdout") [GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      ) [GOOD] (set-logic ALL) ; has unbounded values, using catch-all. [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array Int Int)) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays ----[GOOD] (declare-fun array_0 () (Array Int Int)) [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (define-fun s0 () Int 0)-[GOOD] (define-fun s1 () Int 1)-[GOOD] (define-fun s3 () Int 2)-[GOOD] (declare-fun array_1 () (Array Int Int))-[GOOD] (define-fun array_1_initializer_0 () Bool (= array_1 (store array_0 s0 s1)))-[GOOD] (define-fun s2 () Int (select array_1 s0))-[GOOD] (define-fun s4 () Bool (= s2 s3))-[GOOD] (define-fun array_1_initializer () Bool array_1_initializer_0)-[GOOD] (assert array_1_initializer)-[GOOD] (assert s4)+[GOOD] (define-fun s1 () Int 0)+[GOOD] (define-fun s2 () Int 1)+[GOOD] (define-fun s5 () Int 2)+[GOOD] (define-fun s3 () (Array Int Int) (store s0 s1 s2))+[GOOD] (define-fun s4 () Int (select s3 s1))+[GOOD] (define-fun s6 () Bool (= s4 s5))+[GOOD] (assert s6) [SEND] (check-sat) [RECV] unsat [GOOD] (reset-assertions)-[GOOD] (assert (and array_0_initializer array_1_initializer))-[GOOD] (assert s4)+[GOOD] (assert s6) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/queryArrays8.gold view
@@ -13,31 +13,23 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (declare-fun array_0 () (Array Int Int))-[GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed-[GOOD] (define-fun s0 () Int 0)-[GOOD] (define-fun s1 () Int 1)-[GOOD] (define-fun s3 () Int 2)-[GOOD] (declare-fun array_1 () (Array Int Int))-[GOOD] (define-fun array_1_initializer_0 () Bool (= array_1 (store array_0 s0 s1)))-[GOOD] (define-fun s2 () Int (select array_1 s0))-[GOOD] (define-fun s4 () Bool (= s2 s3))-[GOOD] (define-fun array_1_initializer () Bool array_1_initializer_0)-[GOOD] (assert array_1_initializer)-[GOOD] (assert s4)+[GOOD] (declare-fun s0 () (Array Int Int))+[GOOD] (define-fun s1 () Int 0)+[GOOD] (define-fun s2 () Int 1)+[GOOD] (define-fun s5 () Int 2)+[GOOD] (define-fun s3 () (Array Int Int) (store s0 s1 s2))+[GOOD] (define-fun s4 () Int (select s3 s1))+[GOOD] (define-fun s6 () Bool (= s4 s5))+[GOOD] (assert s6) [SEND] (check-sat) [RECV] unsat [GOOD] (reset-assertions)-[GOOD] (assert (and array_0_initializer array_1_initializer))-[GOOD] (assert s4)+[GOOD] (assert s6) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
+ SBVTestSuite/GoldFiles/queryArrays9.gold view
@@ -0,0 +1,36 @@+** Calling: z3 -nw -in -smt2+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :smtlib2_compliant true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[GOOD] (set-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Array String Int)) ; tracks user variable "x"+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (define-fun s1 () String (_ char #x61))+[GOOD] (define-fun s3 () Int 5)+[GOOD] (define-fun s2 () Int (select s0 s1))+[GOOD] (define-fun s4 () Bool (= s2 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:Sat+DONE!
SBVTestSuite/GoldFiles/queryTables.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (declare-fun s0 () (_ BitVec 16))
SBVTestSuite/GoldFiles/query_Chars1.gold view
@@ -17,15 +17,12 @@ [GOOD] (assert (= 1 (str.len s0))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (str.to_code s0)) [GOOD] (define-fun s3 () Bool (>= s1 s2)) [GOOD] (define-fun s5 () Bool (< s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/query_Interpolant1.gold view
@@ -17,7 +17,6 @@ [GOOD] (declare-fun s3 () Int) ; tracks user variable "d" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -28,8 +27,6 @@ [GOOD] (define-fun s8 () Bool (= s2 s3)) [GOOD] (define-fun s9 () Bool (not s8)) [GOOD] (define-fun s10 () Bool (and s7 s9))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (! s6 :interpolation-group |c1|))
SBVTestSuite/GoldFiles/query_Interpolant2.gold view
@@ -17,7 +17,6 @@ [GOOD] (declare-fun s3 () Int) ; tracks user variable "d" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun f (Int) Int) [GOOD] (declare-fun g (Int) Int)@@ -33,8 +32,6 @@ [GOOD] (define-fun s11 () Int (g s3)) [GOOD] (define-fun s12 () Bool (distinct s10 s11)) [GOOD] (define-fun s13 () Bool (and s9 s12))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (! s8 :interpolation-group |c1|))
SBVTestSuite/GoldFiles/query_Interpolant3.gold view
@@ -17,12 +17,9 @@ [GOOD] (declare-fun s3 () Int) ; tracks user variable "d" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (define-fun s4 () Bool (= s0 s1))
SBVTestSuite/GoldFiles/query_Interpolant4.gold view
@@ -17,12 +17,9 @@ [GOOD] (declare-fun s3 () Int) ; tracks user variable "d" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (declare-fun f (Int) Int)
SBVTestSuite/GoldFiles/query_ListOfMaybe.gold view
@@ -24,7 +24,6 @@ [GOOD] (assert (forall ((seq0 Int)) (=> (and (>= seq0 0) (< seq0 (seq.len s0))) (=> ((_ is (just_SBVMaybe (String) (SBVMaybe String))) (seq.nth s0 seq0)) (= 1 (str.len (get_just_SBVMaybe (seq.nth s0 seq0)))))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -38,8 +37,6 @@ [GOOD] (define-fun s11 () (SBVMaybe String) (seq.nth s10 s4)) [GOOD] (define-fun s12 () Bool ((_ is (nothing_SBVMaybe () (SBVMaybe String))) s11)) [GOOD] (define-fun s13 () Bool (ite s12 true false))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/query_ListOfSum.gold view
@@ -24,7 +24,6 @@ [GOOD] (assert (forall ((seq0 Int)) (=> (and (>= seq0 0) (< seq0 (seq.len s0))) (=> ((_ is (right_SBVEither (String) (SBVEither Int String))) (seq.nth s0 seq0)) (= 1 (str.len (get_right_SBVEither (seq.nth s0 seq0)))))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -38,8 +37,6 @@ [GOOD] (define-fun s11 () (SBVEither Int String) (seq.nth s10 s4)) [GOOD] (define-fun s12 () Bool ((_ is (left_SBVEither (Int) (SBVEither Int String))) s11)) [GOOD] (define-fun s13 () Bool (ite s12 false true))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/query_Lists1.gold view
@@ -18,13 +18,10 @@ [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/query_Maybe.gold view
@@ -21,7 +21,6 @@ [GOOD] (declare-fun s0 () (SBVMaybe Int)) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -29,8 +28,6 @@ [GOOD] (define-fun s3 () Bool (= s1 s2)) [GOOD] (define-fun s4 () Bool ((_ is (nothing_SBVMaybe () (SBVMaybe Int))) s0)) [GOOD] (define-fun s5 () Bool (ite s4 false s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/query_Strings1.gold view
@@ -14,13 +14,10 @@ [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Bool (str.in.re s0 ((_ re.loop 5 5) (str.to.re "xyz"))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s1)
SBVTestSuite/GoldFiles/query_SumMaybeBoth.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (set-option :pp.max_depth      4294967295)
SBVTestSuite/GoldFiles/query_Sums.gold view
@@ -22,7 +22,6 @@ [GOOD] (assert (=> ((_ is (right_SBVEither (String) (SBVEither Int String))) s0) (= 1 (str.len (get_right_SBVEither s0))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -30,8 +29,6 @@ [GOOD] (define-fun s3 () Bool (= s1 s2)) [GOOD] (define-fun s4 () Bool ((_ is (left_SBVEither (Int) (SBVEither Int String))) s0)) [GOOD] (define-fun s5 () Bool (ite s4 s3 false))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/query_Tuples1.gold view
@@ -22,14 +22,11 @@ [GOOD] (assert (= 1 (str.len (proj_2_SBVTuple2 s0)))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (proj_1_SBVTuple2 s0)) [GOOD] (define-fun s3 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/query_Tuples2.gold view
@@ -23,15 +23,12 @@ [GOOD] (assert (= 1 (str.len (proj_1_SBVTuple2 (proj_2_SBVTuple2 s0))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () (SBVTuple2 String SBVTuple0) (proj_2_SBVTuple2 s0)) [GOOD] (define-fun s2 () String (proj_1_SBVTuple2 s1)) [GOOD] (define-fun s4 () Bool (= s2 s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/query_abc.gold view
@@ -16,14 +16,11 @@ [ISSUE] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [ISSUE] ; --- constant tables --- [ISSUE] ; --- non-constant tables ----[ISSUE] ; --- arrays --- [ISSUE] ; --- uninterpreted constants --- [ISSUE] ; --- user defined functions --- [ISSUE] ; --- assignments --- [ISSUE] (define-fun s3 () Bool (bvsgt s0 s2)) [ISSUE] (define-fun s4 () Bool (bvsgt s1 s2))-[ISSUE] ; --- arrayDelayeds ----[ISSUE] ; --- arraySetups --- [ISSUE] ; --- delayedEqualities --- [ISSUE] ; --- formula --- [ISSUE] (assert s3)
SBVTestSuite/GoldFiles/query_bitwuzla.gold view
@@ -14,14 +14,11 @@ [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (bvsgt s0 s2)) [GOOD] (define-fun s4 () Bool (bvsgt s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/query_boolector.gold view
@@ -14,14 +14,11 @@ [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (bvsgt s0 s2)) [GOOD] (define-fun s4 () Bool (bvsgt s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/query_cvc4.gold view
@@ -15,14 +15,11 @@ [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (bvsgt s0 s2)) [GOOD] (define-fun s4 () Bool (bvsgt s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (! s3 :named |a > 0|))
SBVTestSuite/GoldFiles/query_cvc5.gold view
@@ -15,14 +15,11 @@ [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (bvsgt s0 s2)) [GOOD] (define-fun s4 () Bool (bvsgt s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (! s3 :named |a > 0|))
SBVTestSuite/GoldFiles/query_mathsat.gold view
@@ -15,14 +15,11 @@ [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (bvsgt s0 s2)) [GOOD] (define-fun s4 () Bool (bvsgt s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (! s3 :named |a > 0|))
SBVTestSuite/GoldFiles/query_sumMergeEither1.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (set-option :pp.max_depth      4294967295)
SBVTestSuite/GoldFiles/query_sumMergeEither2.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (set-option :pp.max_depth      4294967295)
SBVTestSuite/GoldFiles/query_sumMergeMaybe1.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (set-option :pp.max_depth      4294967295)
SBVTestSuite/GoldFiles/query_sumMergeMaybe2.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (set-option :pp.max_depth      4294967295)
SBVTestSuite/GoldFiles/query_uiSat_test1.gold view
@@ -13,16 +13,13 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q1 (Bool) Bool) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (q1 false))-[GOOD] (define-fun s1 () Bool (= false s0))+[GOOD] (define-fun s1 () Bool (not s0)) [GOOD] (define-fun s2 () Bool (q1 true))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s1)
SBVTestSuite/GoldFiles/query_uiSat_test2.gold view
@@ -13,17 +13,14 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q2 (Bool Bool) Bool) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (q2 false true))-[GOOD] (define-fun s1 () Bool (= false s0))+[GOOD] (define-fun s1 () Bool (not s0)) [GOOD] (define-fun s2 () Bool (q2 true true)) [GOOD] (define-fun s3 () Bool (q2 true false))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s1)
SBVTestSuite/GoldFiles/query_uisatex1.gold view
@@ -49,7 +49,6 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q1 (Int) Int) [GOOD] (declare-fun q2 (Bool Int) Int)@@ -94,8 +93,6 @@ [GOOD] (define-fun s63 () Bool (= s61 s62)) [GOOD] (define-fun s66 () Int (q5 s64 s65)) [GOOD] (define-fun s68 () Bool (= s66 s67))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/query_uisatex2.gold view
@@ -49,7 +49,6 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q1 (Int) Int) [GOOD] (declare-fun q2 (Bool Int) Int)@@ -96,8 +95,6 @@ [GOOD] (define-fun s66 () Int (q5 s64 s65)) [GOOD] (define-fun s68 () Bool (= s66 s67)) [GOOD] (define-fun s69 () Bool (q6 s17))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/query_uisatex3.gold view
@@ -13,19 +13,16 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun y (Int) Int) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Int))-         (let ((l1_s2 3))-         (let ((l1_s1 (y l1_s0)))-         (let ((l1_s3 (* l1_s0 l1_s2)))-         (let ((l1_s4 (= l1_s1 l1_s3)))-         l1_s4))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s2 3))+                                 (let ((l1_s1 (y l1_s0)))+                                 (let ((l1_s3 (* l1_s0 l1_s2)))+                                 (let ((l1_s4 (= l1_s1 l1_s3)))+                                 l1_s4)))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/query_yices.gold view
@@ -14,14 +14,11 @@ [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (bvsgt s0 s2)) [GOOD] (define-fun s4 () Bool (bvsgt s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (! s3 :named |a > 0|))
SBVTestSuite/GoldFiles/query_z3.gold view
@@ -16,14 +16,11 @@ [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (bvsgt s0 s2)) [GOOD] (define-fun s4 () Bool (bvsgt s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert (! s3 :named |a > 0|))
SBVTestSuite/GoldFiles/reverse.gold view
@@ -23,7 +23,6 @@ [GOOD] (declare-fun s3 () Int) ; tracks user variable "d" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -115,8 +114,6 @@ [GOOD] (define-fun s92 () (Seq Int) (seq.++ s6 s91)) [GOOD] (define-fun s93 () (Seq Int) (seq.++ s7 s92)) [GOOD] (define-fun s94 () Bool (= s90 s93))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s94)
SBVTestSuite/GoldFiles/reverseAlt10.gold view
@@ -20,7 +20,6 @@ [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "xs" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -121,8 +120,6 @@ [GOOD] (define-fun s98 () (Seq Int) (ite s9 s78 s97)) [GOOD] (define-fun s99 () (Seq Int) (ite s3 s4 s98)) [GOOD] (define-fun s100 () Bool (distinct s80 s99))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s100)
SBVTestSuite/GoldFiles/safe1.gold view
@@ -16,15 +16,12 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1)) [GOOD] (define-fun s4 () Bool (> s0 s3)) [GOOD] (define-fun s5 () Bool (not s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (push 1)
SBVTestSuite/GoldFiles/safe2.gold view
@@ -16,14 +16,11 @@ [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (> s0 s2)) [GOOD] (define-fun s4 () Bool (not s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (push 1)
SBVTestSuite/GoldFiles/seqConcat.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/seqConcatBad.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert false)
SBVTestSuite/GoldFiles/seqExamples1.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/seqExamples2.gold view
@@ -19,15 +19,12 @@ [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () (Seq Int) (seq.++ s0 s1)) [GOOD] (define-fun s4 () (Seq Int) (seq.++ s3 s0)) [GOOD] (define-fun s5 () Bool (= s2 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/seqExamples3.gold view
@@ -22,7 +22,6 @@ [GOOD] (declare-fun s2 () (Seq Int)) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -32,8 +31,6 @@ [GOOD] (define-fun s8 () Bool (= s6 s7)) [GOOD] (define-fun s10 () Bool (= s1 s9)) [GOOD] (define-fun s11 () Bool (not s10))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/seqExamples4.gold view
@@ -21,7 +21,6 @@ [GOOD] (declare-fun s1 () (Seq Int)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -30,8 +29,6 @@ [GOOD] (define-fun s6 () Bool (= s3 s5)) [GOOD] (define-fun s7 () Int (seq.len s0)) [GOOD] (define-fun s9 () Bool (<= s7 s8))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s6)
SBVTestSuite/GoldFiles/seqExamples5.gold view
@@ -22,7 +22,6 @@ [GOOD] (declare-fun s2 () (Seq Int)) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -37,8 +36,6 @@ [GOOD] (define-fun s14 () (Seq Int) (seq.++ s12 s0)) [GOOD] (define-fun s15 () Bool (= s13 s14)) [GOOD] (define-fun s16 () Bool (not s15))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s9)
SBVTestSuite/GoldFiles/seqExamples6.gold view
@@ -19,7 +19,6 @@ [GOOD] (declare-fun s2 () (Seq Int)) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -27,8 +26,6 @@ [GOOD] (define-fun s4 () Bool (seq.contains s1 s2)) [GOOD] (define-fun s5 () Bool (seq.contains s0 s2)) [GOOD] (define-fun s6 () Bool (not s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/seqExamples7.gold view
@@ -19,7 +19,6 @@ [GOOD] (declare-fun s2 () (Seq Int)) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -29,8 +28,6 @@ [GOOD] (define-fun s6 () Bool (not s5)) [GOOD] (define-fun s7 () Bool (seq.contains s2 s1)) [GOOD] (define-fun s8 () Bool (not s7))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/seqExamples8.gold view
@@ -19,7 +19,6 @@ [GOOD] (declare-fun s2 () (Seq Int)) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -33,8 +32,6 @@ [GOOD] (define-fun s10 () (Seq Int) (seq.++ s1 s2)) [GOOD] (define-fun s11 () Bool (= s0 s10)) [GOOD] (define-fun s12 () Bool (not s11))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/seqIndexOf.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/seqIndexOfBad.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert false)
SBVTestSuite/GoldFiles/set_compl1.gold view
@@ -18,13 +18,10 @@ [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/set_delete1.gold view
@@ -20,14 +20,11 @@ [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/set_diff1.gold view
@@ -19,14 +19,11 @@ [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/set_disj1.gold view
@@ -19,14 +19,11 @@ [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)@@ -44,16 +41,16 @@ [RECV] ((s7 false)) [GOOD] (define-fun s8 () (Array Int Bool) (complement s1)) [GOOD] (define-fun s9 () (Array Int Bool) (intersection s0 s8))-[GOOD] (define-fun s10 () Bool (= s9 s6))+[GOOD] (define-fun s10 () Bool (= s6 s9)) [SEND] (get-value (s10)) [RECV] ((s10 true)) [GOOD] (define-fun s11 () (Array Int Bool) (complement s0)) [GOOD] (define-fun s12 () (Array Int Bool) (intersection s11 s1))-[GOOD] (define-fun s13 () Bool (= s12 s6))+[GOOD] (define-fun s13 () Bool (= s6 s12)) [SEND] (get-value (s13)) [RECV] ((s13 true)) [GOOD] (define-fun s14 () (Array Int Bool) (intersection s11 s8))-[GOOD] (define-fun s15 () Bool (= s14 s6))+[GOOD] (define-fun s15 () Bool (= s6 s14)) [SEND] (get-value (s15)) [RECV] ((s15 false)) *** Solver   : Z3
SBVTestSuite/GoldFiles/set_empty1.gold view
@@ -18,13 +18,10 @@ [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)@@ -41,7 +38,7 @@ [SEND] (get-value (s4)) [RECV] ((s4 false)) [GOOD] (define-fun s5 () (Array Int Bool) (complement s0))-[GOOD] (define-fun s6 () Bool (= s5 s3))+[GOOD] (define-fun s6 () Bool (= s3 s5)) [SEND] (get-value (s6)) [RECV] ((s6 false)) *** Solver   : Z3
SBVTestSuite/GoldFiles/set_full1.gold view
@@ -18,13 +18,10 @@ [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)@@ -41,7 +38,7 @@ [SEND] (get-value (s4)) [RECV] ((s4 false)) [GOOD] (define-fun s5 () (Array Int Bool) (complement s0))-[GOOD] (define-fun s6 () Bool (= s5 s3))+[GOOD] (define-fun s6 () Bool (= s3 s5)) [SEND] (get-value (s6)) [RECV] ((s6 false)) *** Solver   : Z3
SBVTestSuite/GoldFiles/set_insert1.gold view
@@ -20,14 +20,11 @@ [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/set_intersect1.gold view
@@ -19,14 +19,11 @@ [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/set_member1.gold view
@@ -20,14 +20,11 @@ [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/set_notMember1.gold view
@@ -20,14 +20,11 @@ [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s5 () Bool (= s1 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/set_psubset1.gold view
@@ -19,14 +19,11 @@ [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)@@ -38,31 +35,27 @@ [SEND] (get-value (s1)) [RECV] ((s1 (store ((as const (Array Int Bool)) false) 0 true))) [GOOD] (define-fun s5 () Bool (subset s0 s1))-[GOOD] (define-fun s6 () Bool (= s0 s1))-[GOOD] (define-fun s7 () Bool (not s6))-[GOOD] (define-fun s8 () Bool (and s5 s7))-[SEND] (get-value (s8))-[RECV] ((s8 false))-[GOOD] (define-fun s9 () (Array Int Bool) (complement s1))-[GOOD] (define-fun s10 () Bool (subset s0 s9))-[GOOD] (define-fun s11 () Bool (= s0 s9))-[GOOD] (define-fun s12 () Bool (not s11))-[GOOD] (define-fun s13 () Bool (and s10 s12))-[SEND] (get-value (s13))-[RECV] ((s13 false))-[GOOD] (define-fun s14 () (Array Int Bool) (complement s0))-[GOOD] (define-fun s15 () Bool (subset s14 s1))-[GOOD] (define-fun s16 () Bool (= s14 s1))-[GOOD] (define-fun s17 () Bool (not s16))-[GOOD] (define-fun s18 () Bool (and s15 s17))+[GOOD] (define-fun s6 () Bool (distinct s0 s1))+[GOOD] (define-fun s7 () Bool (and s5 s6))+[SEND] (get-value (s7))+[RECV] ((s7 false))+[GOOD] (define-fun s8 () (Array Int Bool) (complement s1))+[GOOD] (define-fun s9 () Bool (subset s0 s8))+[GOOD] (define-fun s10 () Bool (distinct s0 s8))+[GOOD] (define-fun s11 () Bool (and s9 s10))+[SEND] (get-value (s11))+[RECV] ((s11 false))+[GOOD] (define-fun s12 () (Array Int Bool) (complement s0))+[GOOD] (define-fun s13 () Bool (subset s12 s1))+[GOOD] (define-fun s14 () Bool (distinct s1 s12))+[GOOD] (define-fun s15 () Bool (and s13 s14))+[SEND] (get-value (s15))+[RECV] ((s15 false))+[GOOD] (define-fun s16 () Bool (subset s12 s8))+[GOOD] (define-fun s17 () Bool (distinct s8 s12))+[GOOD] (define-fun s18 () Bool (and s16 s17)) [SEND] (get-value (s18)) [RECV] ((s18 false))-[GOOD] (define-fun s19 () Bool (subset s14 s9))-[GOOD] (define-fun s20 () Bool (= s14 s9))-[GOOD] (define-fun s21 () Bool (not s20))-[GOOD] (define-fun s22 () Bool (and s19 s21))-[SEND] (get-value (s22))-[RECV] ((s22 false)) *** Solver   : Z3 *** Exit code: ExitSuccess 
SBVTestSuite/GoldFiles/set_subset1.gold view
@@ -19,14 +19,11 @@ [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/set_tupleSet.gold view
@@ -21,24 +21,22 @@ [GOOD] (declare-fun s0 () (SBVTuple2 (Array Bool Bool) (Array Bool Bool))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (mkSBVTuple2 (lambda ((x!1 Bool)) x!1) ((as const (Array Bool Bool)) true))))+[RECV] ((s0 (mkSBVTuple2 (lambda ((x!1 Bool)) x!1)+                    (store ((as const (Array Bool Bool)) false) false true)))) *** Solver   : Z3 *** Exit code: ExitSuccess  FINAL: Satisfiable. Model:-  s0 = ({True},U) :: ({Bool}, {Bool})+  s0 = ({True},{False}) :: ({Bool}, {Bool}) DONE!
SBVTestSuite/GoldFiles/set_uninterp1.gold view
@@ -21,12 +21,9 @@ [GOOD] (declare-fun s0 () (Array E Bool)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- *** Checking Satisfiability, all solutions..@@ -37,79 +34,71 @@ [RECV] ((s0 ((as const (Array E Bool)) false))) [GOOD] (push 1) [GOOD] (define-fun s1 () (Array E Bool) ((as const (Array E Bool)) false))-[GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] (define-fun s3 () Bool (not s2))-[GOOD] (assert s3)+[GOOD] (define-fun s2 () Bool (distinct s0 s1))+[GOOD] (assert s2) Fast allSat, Looking for solution 2 [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0)) [RECV] ((s0 (store ((as const (Array E Bool)) false) A true))) [GOOD] (push 1)-[GOOD] (define-fun s4 () (Array E Bool) (store ((as const (Array E Bool)) false) A true))-[GOOD] (define-fun s5 () Bool (= s0 s4))-[GOOD] (define-fun s6 () Bool (not s5))-[GOOD] (assert s6)+[GOOD] (define-fun s3 () (Array E Bool) (store ((as const (Array E Bool)) false) A true))+[GOOD] (define-fun s4 () Bool (distinct s0 s3))+[GOOD] (assert s4) Fast allSat, Looking for solution 3 [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0)) [RECV] ((s0 (store ((as const (Array E Bool)) false) B true))) [GOOD] (push 1)-[GOOD] (define-fun s7 () (Array E Bool) (store ((as const (Array E Bool)) false) B true))-[GOOD] (define-fun s8 () Bool (= s0 s7))-[GOOD] (define-fun s9 () Bool (not s8))-[GOOD] (assert s9)+[GOOD] (define-fun s5 () (Array E Bool) (store ((as const (Array E Bool)) false) B true))+[GOOD] (define-fun s6 () Bool (distinct s0 s5))+[GOOD] (assert s6) Fast allSat, Looking for solution 4 [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (store ((as const (Array E Bool)) true) A false)))+[RECV] ((s0 (store (store ((as const (Array E Bool)) false) C true) B true))) [GOOD] (push 1)-[GOOD] (define-fun s10 () (Array E Bool) (store ((as const (Array E Bool)) true) A false))-[GOOD] (define-fun s11 () Bool (= s0 s10))-[GOOD] (define-fun s12 () Bool (not s11))-[GOOD] (assert s12)+[GOOD] (define-fun s7 () (Array E Bool) (store (store ((as const (Array E Bool)) false) C true) B true))+[GOOD] (define-fun s8 () Bool (distinct s0 s7))+[GOOD] (assert s8) Fast allSat, Looking for solution 5 [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (store (store ((as const (Array E Bool)) true) B false) A false)))+[RECV] ((s0 ((as const (Array E Bool)) true))) [GOOD] (push 1)-[GOOD] (define-fun s13 () (Array E Bool) (store (store ((as const (Array E Bool)) true) B false) A false))-[GOOD] (define-fun s14 () Bool (= s0 s13))-[GOOD] (define-fun s15 () Bool (not s14))-[GOOD] (assert s15)+[GOOD] (define-fun s9 () (Array E Bool) ((as const (Array E Bool)) true))+[GOOD] (define-fun s10 () Bool (distinct s0 s9))+[GOOD] (assert s10) Fast allSat, Looking for solution 6 [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (store ((as const (Array E Bool)) true) C false)))+[RECV] ((s0 (store (store ((as const (Array E Bool)) false) B true) A true))) [GOOD] (push 1)-[GOOD] (define-fun s16 () (Array E Bool) (store ((as const (Array E Bool)) true) C false))-[GOOD] (define-fun s17 () Bool (= s0 s16))-[GOOD] (define-fun s18 () Bool (not s17))-[GOOD] (assert s18)+[GOOD] (define-fun s11 () (Array E Bool) (store (store ((as const (Array E Bool)) false) B true) A true))+[GOOD] (define-fun s12 () Bool (distinct s0 s11))+[GOOD] (assert s12) Fast allSat, Looking for solution 7 [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0)) [RECV] ((s0 (store ((as const (Array E Bool)) true) B false))) [GOOD] (push 1)-[GOOD] (define-fun s19 () (Array E Bool) (store ((as const (Array E Bool)) true) B false))-[GOOD] (define-fun s20 () Bool (= s0 s19))-[GOOD] (define-fun s21 () Bool (not s20))-[GOOD] (assert s21)+[GOOD] (define-fun s13 () (Array E Bool) (store ((as const (Array E Bool)) true) B false))+[GOOD] (define-fun s14 () Bool (distinct s0 s13))+[GOOD] (assert s14) Fast allSat, Looking for solution 8 [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 ((as const (Array E Bool)) true)))+[RECV] ((s0 (store (store ((as const (Array E Bool)) true) B false) A false))) [GOOD] (push 1)-[GOOD] (define-fun s22 () (Array E Bool) ((as const (Array E Bool)) true))-[GOOD] (define-fun s23 () Bool (= s0 s22))-[GOOD] (define-fun s24 () Bool (not s23))-[GOOD] (assert s24)+[GOOD] (define-fun s15 () (Array E Bool) (store (store ((as const (Array E Bool)) true) B false) A false))+[GOOD] (define-fun s16 () Bool (distinct s0 s15))+[GOOD] (assert s16) Fast allSat, Looking for solution 9 [SEND] (check-sat) [RECV] unsat@@ -126,15 +115,15 @@  FINAL: Solution #1:-  s0 = U :: {E}+  s0 = U - {A,B} :: {E} Solution #2:   s0 = U - {B} :: {E} Solution #3:-  s0 = U - {C} :: {E}+  s0 = {A,B} :: {E} Solution #4:-  s0 = U - {A,B} :: {E}+  s0 = U :: {E} Solution #5:-  s0 = U - {A} :: {E}+  s0 = {B,C} :: {E} Solution #6:   s0 = {B} :: {E} Solution #7:
SBVTestSuite/GoldFiles/set_uninterp2.gold view
@@ -22,13 +22,10 @@ [GOOD] (declare-fun s1 () (Array E Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/set_union1.gold view
@@ -19,14 +19,11 @@ [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (= s0 s2)) [GOOD] (define-fun s4 () Bool (= s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/sort.gold view
@@ -22,7 +22,6 @@ [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -156,8 +155,6 @@ [GOOD] (define-fun s133 () (Seq Int) (seq.++ s8 s132)) [GOOD] (define-fun s134 () Bool (= s104 s133)) [GOOD] (define-fun s135 () Bool (=> s131 s134))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s106)
SBVTestSuite/GoldFiles/strConcat.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/strConcatBad.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert false)
SBVTestSuite/GoldFiles/strExamples1.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/strExamples10.gold view
@@ -15,15 +15,12 @@ [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Bool (str.in.re s0 ((_ re.loop 1 3) (str.to.re "ab")))) [GOOD] (define-fun s2 () Int (str.len s0)) [GOOD] (define-fun s4 () Bool (> s2 s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s1)
SBVTestSuite/GoldFiles/strExamples11.gold view
@@ -16,7 +16,6 @@ [GOOD] (declare-fun s0 () Int) ; tracks user variable "i" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -24,8 +23,6 @@ [GOOD] (define-fun s3 () String (int.to.str s0)) [GOOD] (define-fun s5 () Bool (= s3 s4)) [GOOD] (define-fun s6 () Bool (not s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/strExamples12.gold view
@@ -16,7 +16,6 @@ [GOOD] (declare-fun s0 () Int) ; tracks user variable "i" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -24,8 +23,6 @@ [GOOD] (define-fun s3 () String (int.to.str s0)) [GOOD] (define-fun s5 () Bool (= s3 s4)) [GOOD] (define-fun s6 () Bool (not s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/strExamples13.gold view
@@ -16,7 +16,6 @@ [GOOD] (declare-fun s0 () String) ; tracks user variable "s" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -24,8 +23,6 @@ [GOOD] (define-fun s3 () Int (str.to.int s0)) [GOOD] (define-fun s5 () Bool (= s3 s4)) [GOOD] (define-fun s6 () Bool (not s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/strExamples2.gold view
@@ -16,15 +16,12 @@ [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () String (str.++ s0 s1)) [GOOD] (define-fun s4 () String (str.++ s3 s0)) [GOOD] (define-fun s5 () Bool (= s2 s4))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/strExamples3.gold view
@@ -19,7 +19,6 @@ [GOOD] (declare-fun s2 () String) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -29,8 +28,6 @@ [GOOD] (define-fun s8 () Bool (= s6 s7)) [GOOD] (define-fun s10 () Bool (= s1 s9)) [GOOD] (define-fun s11 () Bool (not s10))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/strExamples4.gold view
@@ -18,7 +18,6 @@ [GOOD] (declare-fun s1 () String) ; tracks user variable "b" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -27,8 +26,6 @@ [GOOD] (define-fun s6 () Bool (= s3 s5)) [GOOD] (define-fun s7 () Int (str.len s0)) [GOOD] (define-fun s9 () Bool (<= s7 s8))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s6)
SBVTestSuite/GoldFiles/strExamples5.gold view
@@ -19,7 +19,6 @@ [GOOD] (declare-fun s2 () String) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -34,8 +33,6 @@ [GOOD] (define-fun s14 () String (str.++ s12 s0)) [GOOD] (define-fun s15 () Bool (= s13 s14)) [GOOD] (define-fun s16 () Bool (not s15))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s9)
SBVTestSuite/GoldFiles/strExamples6.gold view
@@ -16,7 +16,6 @@ [GOOD] (declare-fun s2 () String) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -24,8 +23,6 @@ [GOOD] (define-fun s4 () Bool (str.contains s1 s2)) [GOOD] (define-fun s5 () Bool (str.contains s0 s2)) [GOOD] (define-fun s6 () Bool (not s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/strExamples7.gold view
@@ -16,7 +16,6 @@ [GOOD] (declare-fun s2 () String) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -26,8 +25,6 @@ [GOOD] (define-fun s6 () Bool (not s5)) [GOOD] (define-fun s7 () Bool (str.contains s2 s1)) [GOOD] (define-fun s8 () Bool (not s7))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/strExamples8.gold view
@@ -16,7 +16,6 @@ [GOOD] (declare-fun s2 () String) ; tracks user variable "c" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -30,8 +29,6 @@ [GOOD] (define-fun s10 () String (str.++ s1 s2)) [GOOD] (define-fun s11 () Bool (= s0 s10)) [GOOD] (define-fun s12 () Bool (not s11))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/strExamples9.gold view
@@ -15,15 +15,12 @@ [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Bool (str.in.re s0 ((_ re.loop 1 3) (str.to.re "ab")))) [GOOD] (define-fun s2 () Int (str.len s0)) [GOOD] (define-fun s4 () Bool (= s2 s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s1)
SBVTestSuite/GoldFiles/strIndexOf.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [SEND] (check-sat)
SBVTestSuite/GoldFiles/strIndexOfBad.gold view
@@ -13,12 +13,9 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert false)
SBVTestSuite/GoldFiles/sumBimapPlus.gold view
@@ -21,7 +21,6 @@ [GOOD] (declare-fun s0 () (SBVEither Int Int)) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -40,8 +39,6 @@ [GOOD] (define-fun s14 () Int (ite s8 s1 s5)) [GOOD] (define-fun s15 () Int (+ s2 s14)) [GOOD] (define-fun s16 () Bool (= s13 s15))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s16)
SBVTestSuite/GoldFiles/sumEitherSat.gold view
@@ -21,7 +21,6 @@ [GOOD] (declare-fun s0 () (SBVEither Int Bool)) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -31,8 +30,6 @@ [GOOD] (define-fun s5 () Bool (not s4)) [GOOD] (define-fun s6 () Bool ((_ is (left_SBVEither (Int) (SBVEither Int Bool))) s0)) [GOOD] (define-fun s7 () Bool (ite s6 s3 s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s7)
SBVTestSuite/GoldFiles/sumLiftEither.gold view
@@ -22,7 +22,6 @@ [GOOD] (assert (= 1 (str.len s1))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -32,8 +31,6 @@ [GOOD] (define-fun s5 () (SBVEither Int String) ((as right_SBVEither (SBVEither Int String)) s1)) [GOOD] (define-fun s6 () Bool ((_ is (left_SBVEither (Int) (SBVEither Int String))) s5)) [GOOD] (define-fun s7 () Bool (ite s6 false true))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/sumLiftMaybe.gold view
@@ -21,14 +21,11 @@ [GOOD] (declare-fun s0 () Int) ; tracks user variable "i" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () (SBVMaybe Int) ((as just_SBVMaybe (SBVMaybe Int)) s0)) [GOOD] (define-fun s3 () Bool (distinct s1 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/sumMaybe.gold view
@@ -23,7 +23,6 @@ [GOOD] (declare-fun s0 () (SBVMaybe Int)) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -44,8 +43,6 @@ [GOOD] (define-fun s18 () Int (ite s9 s15 s17)) [GOOD] (define-fun s19 () Int (- s18 s5)) [GOOD] (define-fun s20 () Bool (= s16 s19))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s11)
SBVTestSuite/GoldFiles/sumMaybeBoth.gold view
@@ -24,7 +24,6 @@ [GOOD] (declare-fun s1 () (SBVMaybe Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -32,8 +31,6 @@ [GOOD] (define-fun s3 () Bool (ite s2 true false)) [GOOD] (define-fun s4 () Bool ((_ is (nothing_SBVMaybe () (SBVMaybe Int))) s1)) [GOOD] (define-fun s5 () Bool (ite s4 false true))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/sumMergeEither1.gold view
@@ -22,15 +22,12 @@ [GOOD] (declare-fun s2 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (SBVEither Int Bool) (ite s2 s0 s1)) [GOOD] (define-fun s4 () Bool ((_ is (left_SBVEither (Int) (SBVEither Int Bool))) s3)) [GOOD] (define-fun s5 () Bool (ite s4 true false))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/sumMergeEither2.gold view
@@ -22,15 +22,12 @@ [GOOD] (declare-fun s2 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (SBVEither Int Bool) (ite s2 s0 s1)) [GOOD] (define-fun s4 () Bool ((_ is (left_SBVEither (Int) (SBVEither Int Bool))) s3)) [GOOD] (define-fun s5 () Bool (ite s4 false true))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/sumMergeMaybe1.gold view
@@ -22,15 +22,12 @@ [GOOD] (declare-fun s2 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (SBVMaybe Int) (ite s2 s0 s1)) [GOOD] (define-fun s4 () Bool ((_ is (nothing_SBVMaybe () (SBVMaybe Int))) s3)) [GOOD] (define-fun s5 () Bool (ite s4 true false))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/sumMergeMaybe2.gold view
@@ -22,15 +22,12 @@ [GOOD] (declare-fun s2 () Bool) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (SBVMaybe Int) (ite s2 s0 s1)) [GOOD] (define-fun s4 () Bool ((_ is (nothing_SBVMaybe () (SBVMaybe Int))) s3)) [GOOD] (define-fun s5 () Bool (ite s4 false true))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/tuple_enum.gold view
@@ -32,7 +32,6 @@ [GOOD] (declare-fun s1 () Bool) ; tracks user variable "q" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -51,8 +50,6 @@ [GOOD] (define-fun s19 () Int (seq.len s18)) [GOOD] (define-fun s21 () Bool (= s19 s20)) [GOOD] (define-fun s23 () Bool (seq.nth s18 s22))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/tuple_list.gold view
@@ -27,7 +27,6 @@ [GOOD] (declare-fun s0 () (Seq (SBVTuple2 Int (Seq (SBVTuple2 Int String))))) ; tracks user variable "lst" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -48,8 +47,6 @@ [GOOD] (define-fun s21 () Int (seq.len s20)) [GOOD] (define-fun s22 () Bool (= s1 s21)) [GOOD] (define-fun s24 () Bool (= s0 s23))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s5)
SBVTestSuite/GoldFiles/tuple_nested.gold view
@@ -25,7 +25,6 @@ [GOOD] (assert (= 1 (str.len (proj_2_SBVTuple2 (proj_2_SBVTuple2 (proj_1_SBVTuple2 s0)))))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -39,8 +38,6 @@ [GOOD] (define-fun s11 () Bool (= s9 s10)) [GOOD] (define-fun s12 () (_ BitVec 8) (proj_2_SBVTuple2 s0)) [GOOD] (define-fun s14 () Bool (= s12 s13))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/tuple_swap.gold view
@@ -26,7 +26,6 @@ [GOOD] (declare-fun s1 () (SBVTuple3 Int Int Int)) ; tracks user variable "bay" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -42,8 +41,6 @@ [GOOD] (define-fun s14 () Bool (= s12 s13)) [GOOD] (define-fun s15 () Int (proj_3_SBVTuple3 s1)) [GOOD] (define-fun s17 () Bool (= s15 s16))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/tuple_twoTwo.gold view
@@ -24,7 +24,6 @@ [GOOD] (assert (= 1 (str.len (proj_1_SBVTuple2 s1)))) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -32,8 +31,6 @@ [GOOD] (define-fun s4 () Bool (= s2 s3)) [GOOD] (define-fun s5 () String (proj_1_SBVTuple2 s1)) [GOOD] (define-fun s7 () Bool (= s5 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s4)
SBVTestSuite/GoldFiles/tuple_unequal.gold view
@@ -21,7 +21,6 @@ [GOOD] (declare-fun s1 () (SBVTuple2 Int Int)) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -38,8 +37,6 @@ [GOOD] (define-fun s12 () Bool (< s7 s6)) [GOOD] (define-fun s13 () Bool (and s5 s12)) [GOOD] (define-fun s14 () Bool (or s11 s13))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s10)
SBVTestSuite/GoldFiles/uiSat_test1.gold view
@@ -13,14 +13,11 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q1 (Bool) Bool) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (q1 false))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- *** Checking Satisfiability, all solutions..
SBVTestSuite/GoldFiles/uiSat_test2.gold view
@@ -13,14 +13,11 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q2 (Bool Bool) Bool) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (q2 false false))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- *** Checking Satisfiability, all solutions..
SBVTestSuite/GoldFiles/uiSat_test3.gold view
@@ -13,7 +13,6 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q1 (Bool) Bool) [GOOD] (declare-fun q2 (Bool Bool) Bool)@@ -21,8 +20,6 @@ [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (q1 false)) [GOOD] (define-fun s1 () Bool (q2 false false))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- *** Checking Satisfiability, all solutions..@@ -520,24 +517,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) true) true true false)-              true-              false-              false)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) false false true))) [GOOD] (define-fun q1_model18 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true-          false)+          (ite (and (= x!0 true)) false+          true)        ) [GOOD] (define-fun q1_model18_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model18 x!0)))) [GOOD] (define-fun q2_model18 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) false-          (ite (and (= x!0 true) (= x!1 true)) false-          true))+          (ite (and (= x!0 false) (= x!1 false)) true+          false)        ) [GOOD] (define-fun q2_model18_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -552,11 +545,14 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true true false)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false false true)+              true+              false+              true))) [GOOD] (define-fun q1_model19 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true+          (ite (and (= x!0 false)) true           false)        ) [GOOD] (define-fun q1_model19_reject () Bool@@ -564,8 +560,9 @@                   (distinct (q1         x!0)                             (q1_model19 x!0)))) [GOOD] (define-fun q2_model19 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) false-          true)+          (ite (and (= x!0 true) (= x!1 false)) true+          (ite (and (= x!0 false) (= x!1 false)) true+          false))        ) [GOOD] (define-fun q2_model19_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -580,18 +577,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) false)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true true false)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true false false))) [GOOD] (define-fun q1_model20 ((x!0 Bool)) Bool-          false+          (ite (and (= x!0 true)) false+          true)        ) [GOOD] (define-fun q1_model20_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model20 x!0)))) [GOOD] (define-fun q2_model20 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) false+          (ite (and (= x!0 true) (= x!1 false)) false           true)        ) [GOOD] (define-fun q2_model20_reject () Bool@@ -607,12 +605,12 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false))) [SEND] (get-value (q2)) [RECV] ((q2 ((as const (Array Bool Bool Bool)) true))) [GOOD] (define-fun q1_model21 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true-          false)+          (ite (and (= x!0 true)) false+          true)        ) [GOOD] (define-fun q1_model21_reject () Bool           (exists ((x!0 Bool))@@ -634,23 +632,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) true) true true false)-              true-              false-              false)))+[RECV] ((q2 ((as const (Array Bool Bool Bool)) true))) [GOOD] (define-fun q1_model22 ((x!0 Bool)) Bool-          false+          (ite (and (= x!0 true)) true+          false)        ) [GOOD] (define-fun q1_model22_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model22 x!0)))) [GOOD] (define-fun q2_model22 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) false-          (ite (and (= x!0 true) (= x!1 true)) false-          true))+          true        ) [GOOD] (define-fun q2_model22_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -665,20 +659,18 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) false false true)))+[RECV] ((q2 ((as const (Array Bool Bool Bool)) true))) [GOOD] (define-fun q1_model23 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          true        ) [GOOD] (define-fun q1_model23_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model23 x!0)))) [GOOD] (define-fun q2_model23 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 false)) true-          false)+          true        ) [GOOD] (define-fun q2_model23_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -693,24 +685,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false false true)-              true-              false-              true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true true false))) [GOOD] (define-fun q1_model24 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          (ite (and (= x!0 true)) true+          false)        ) [GOOD] (define-fun q1_model24_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model24 x!0)))) [GOOD] (define-fun q2_model24 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) true-          (ite (and (= x!0 false) (= x!1 false)) true-          false))+          (ite (and (= x!0 true) (= x!1 true)) false+          true)        ) [GOOD] (define-fun q2_model24_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -725,23 +713,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) true)))+[RECV] ((q1 ((as const (Array Bool Bool)) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false false true)-              true-              false-              true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true true false))) [GOOD] (define-fun q1_model25 ((x!0 Bool)) Bool-          true+          false        ) [GOOD] (define-fun q1_model25_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model25 x!0)))) [GOOD] (define-fun q2_model25 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) true-          (ite (and (= x!0 false) (= x!1 false)) true-          false))+          (ite (and (= x!0 true) (= x!1 true)) false+          true)        ) [GOOD] (define-fun q2_model25_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -756,11 +740,11 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 ((as const (Array Bool Bool Bool)) false)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true true false))) [GOOD] (define-fun q1_model26 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true+          (ite (and (= x!0 false)) true           false)        ) [GOOD] (define-fun q1_model26_reject () Bool@@ -768,7 +752,8 @@                   (distinct (q1         x!0)                             (q1_model26 x!0)))) [GOOD] (define-fun q2_model26 ((x!0 Bool) (x!1 Bool)) Bool-          false+          (ite (and (= x!0 true) (= x!1 true)) false+          true)        ) [GOOD] (define-fun q2_model26_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -785,7 +770,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true false true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true true true))) [GOOD] (define-fun q1_model27 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) true           false)@@ -795,7 +780,7 @@                   (distinct (q1         x!0)                             (q1_model27 x!0)))) [GOOD] (define-fun q2_model27 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) true+          (ite (and (= x!0 true) (= x!1 true)) true           false)        ) [GOOD] (define-fun q2_model27_reject () Bool@@ -811,20 +796,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) false true true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) false false false))) [GOOD] (define-fun q1_model28 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true-          false)+          (ite (and (= x!0 true)) false+          true)        ) [GOOD] (define-fun q1_model28_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model28 x!0)))) [GOOD] (define-fun q2_model28 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 true)) true-          false)+          (ite (and (= x!0 false) (= x!1 false)) false+          true)        ) [GOOD] (define-fun q2_model28_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -841,7 +826,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) false false false)))+[RECV] ((q2 ((as const (Array Bool Bool Bool)) false))) [GOOD] (define-fun q1_model29 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) true           false)@@ -851,8 +836,7 @@                   (distinct (q1         x!0)                             (q1_model29 x!0)))) [GOOD] (define-fun q2_model29 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 false)) false-          true)+          false        ) [GOOD] (define-fun q2_model29_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -867,19 +851,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) false false false)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) false true true))) [GOOD] (define-fun q1_model30 ((x!0 Bool)) Bool-          false+          (ite (and (= x!0 true)) true+          false)        ) [GOOD] (define-fun q1_model30_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model30 x!0)))) [GOOD] (define-fun q2_model30 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 false)) false-          true)+          (ite (and (= x!0 false) (= x!1 true)) true+          false)        ) [GOOD] (define-fun q2_model30_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -894,19 +879,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true false true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) false false false))) [GOOD] (define-fun q1_model31 ((x!0 Bool)) Bool-          false+          (ite (and (= x!0 true)) true+          false)        ) [GOOD] (define-fun q1_model31_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model31 x!0)))) [GOOD] (define-fun q2_model31 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) true-          false)+          (ite (and (= x!0 false) (= x!1 false)) false+          true)        ) [GOOD] (define-fun q2_model31_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -921,24 +907,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 ((as const (Array Bool Bool)) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) true) false false false)-              true-              true-              false)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true false true))) [GOOD] (define-fun q1_model32 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true-          false)+          false        ) [GOOD] (define-fun q1_model32_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model32 x!0)))) [GOOD] (define-fun q2_model32 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) false-          (ite (and (= x!0 false) (= x!1 false)) false-          true))+          (ite (and (= x!0 true) (= x!1 false)) true+          false)        ) [GOOD] (define-fun q2_model32_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -955,10 +936,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const (Array Bool Bool)) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) true false true)-              false-              true-              true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) false false false))) [GOOD] (define-fun q1_model33 ((x!0 Bool)) Bool           false        )@@ -967,9 +945,8 @@                   (distinct (q1         x!0)                             (q1_model33 x!0)))) [GOOD] (define-fun q2_model33 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 true)) true-          (ite (and (= x!0 true) (= x!1 false)) true-          false))+          (ite (and (= x!0 false) (= x!1 false)) false+          true)        ) [GOOD] (define-fun q2_model33_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1013,7 +990,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true true true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true false true))) [GOOD] (define-fun q1_model35 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) true           false)@@ -1023,7 +1000,7 @@                   (distinct (q1         x!0)                             (q1_model35 x!0)))) [GOOD] (define-fun q2_model35 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) true+          (ite (and (= x!0 true) (= x!1 false)) true           false)        ) [GOOD] (define-fun q2_model35_reject () Bool@@ -1039,23 +1016,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) false)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false true true)-              true-              true-              true)))+[RECV] ((q2 ((as const (Array Bool Bool Bool)) false))) [GOOD] (define-fun q1_model36 ((x!0 Bool)) Bool-          false+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model36_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model36 x!0)))) [GOOD] (define-fun q2_model36 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) true-          (ite (and (= x!0 false) (= x!1 true)) true-          false))+          false        ) [GOOD] (define-fun q2_model36_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1073,8 +1046,8 @@ [RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2)) [RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) true) false false false)-              false               true+              true               false))) [GOOD] (define-fun q1_model37 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) true@@ -1085,7 +1058,7 @@                   (distinct (q1         x!0)                             (q1_model37 x!0)))) [GOOD] (define-fun q2_model37 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 true)) false+          (ite (and (= x!0 true) (= x!1 true)) false           (ite (and (= x!0 false) (= x!1 false)) false           true))        )@@ -1104,9 +1077,9 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const (Array Bool Bool)) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) true true true)+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false true true)               true-              false+              true               true))) [GOOD] (define-fun q1_model38 ((x!0 Bool)) Bool           false@@ -1116,8 +1089,8 @@                   (distinct (q1         x!0)                             (q1_model38 x!0)))) [GOOD] (define-fun q2_model38 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) true           (ite (and (= x!0 true) (= x!1 true)) true+          (ite (and (= x!0 false) (= x!1 true)) true           false))        ) [GOOD] (define-fun q2_model38_reject () Bool@@ -1133,24 +1106,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 ((as const (Array Bool Bool)) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) true true true)-              false-              true-              true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true true true))) [GOOD] (define-fun q1_model39 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true-          false)+          false        ) [GOOD] (define-fun q1_model39_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model39 x!0)))) [GOOD] (define-fun q2_model39 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 true)) true           (ite (and (= x!0 true) (= x!1 true)) true-          false))+          false)        ) [GOOD] (define-fun q2_model39_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1165,24 +1133,24 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) true true true)-              false+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) true) false false false)               true-              true)))+              false+              false))) [GOOD] (define-fun q1_model40 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          (ite (and (= x!0 true)) true+          false)        ) [GOOD] (define-fun q1_model40_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model40 x!0)))) [GOOD] (define-fun q2_model40 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 true)) true-          (ite (and (= x!0 true) (= x!1 true)) true-          false))+          (ite (and (= x!0 true) (= x!1 false)) false+          (ite (and (= x!0 false) (= x!1 false)) false+          true))        ) [GOOD] (define-fun q2_model40_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1197,12 +1165,14 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 ((as const (Array Bool Bool)) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) false true true)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) true false true)+              false+              true+              true))) [GOOD] (define-fun q1_model41 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          false        ) [GOOD] (define-fun q1_model41_reject () Bool           (exists ((x!0 Bool))@@ -1210,7 +1180,8 @@                             (q1_model41 x!0)))) [GOOD] (define-fun q2_model41 ((x!0 Bool) (x!1 Bool)) Bool           (ite (and (= x!0 false) (= x!1 true)) true-          false)+          (ite (and (= x!0 true) (= x!1 false)) true+          false))        ) [GOOD] (define-fun q2_model41_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1225,11 +1196,12 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) true)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true))) [SEND] (get-value (q2)) [RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) false true true))) [GOOD] (define-fun q1_model42 ((x!0 Bool)) Bool-          true+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model42_reject () Bool           (exists ((x!0 Bool))@@ -1252,14 +1224,15 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) true)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true))) [SEND] (get-value (q2)) [RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false true true)               true               true               true))) [GOOD] (define-fun q1_model43 ((x!0 Bool)) Bool-          true+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model43_reject () Bool           (exists ((x!0 Bool))@@ -1283,24 +1256,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false true true)-              true-              false-              true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true true true))) [GOOD] (define-fun q1_model44 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model44_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model44 x!0)))) [GOOD] (define-fun q2_model44 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) true-          (ite (and (= x!0 false) (= x!1 true)) true-          false))+          (ite (and (= x!0 true) (= x!1 true)) true+          false)        ) [GOOD] (define-fun q2_model44_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1315,20 +1284,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) false false false)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true false true))) [GOOD] (define-fun q1_model45 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model45_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model45 x!0)))) [GOOD] (define-fun q2_model45 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 false)) false-          true)+          (ite (and (= x!0 true) (= x!1 false)) true+          false)        ) [GOOD] (define-fun q2_model45_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1343,19 +1312,24 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) true)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) false false false)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) true false true)+              true+              true+              true))) [GOOD] (define-fun q1_model46 ((x!0 Bool)) Bool-          true+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model46_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model46 x!0)))) [GOOD] (define-fun q2_model46 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 false)) false-          true)+          (ite (and (= x!0 true) (= x!1 true)) true+          (ite (and (= x!0 true) (= x!1 false)) true+          false))        ) [GOOD] (define-fun q2_model46_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1370,21 +1344,21 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) true)))+[RECV] ((q1 ((as const (Array Bool Bool)) false))) [SEND] (get-value (q2)) [RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) true) false false false)-              true+              false               true               false))) [GOOD] (define-fun q1_model47 ((x!0 Bool)) Bool-          true+          false        ) [GOOD] (define-fun q1_model47_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model47 x!0)))) [GOOD] (define-fun q2_model47 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) false+          (ite (and (= x!0 false) (= x!1 true)) false           (ite (and (= x!0 false) (= x!1 false)) false           true))        )@@ -1401,19 +1375,24 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) true)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true true false)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) true) false false false)+              false+              true+              false))) [GOOD] (define-fun q1_model48 ((x!0 Bool)) Bool-          true+          (ite (and (= x!0 true)) true+          false)        ) [GOOD] (define-fun q1_model48_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model48 x!0)))) [GOOD] (define-fun q2_model48 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) false-          true)+          (ite (and (= x!0 false) (= x!1 true)) false+          (ite (and (= x!0 false) (= x!1 false)) false+          true))        ) [GOOD] (define-fun q2_model48_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1428,18 +1407,23 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) true)))+[RECV] ((q1 ((as const (Array Bool Bool)) false))) [SEND] (get-value (q2))-[RECV] ((q2 ((as const (Array Bool Bool Bool)) true)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) true) true true false)+              true+              false+              false))) [GOOD] (define-fun q1_model49 ((x!0 Bool)) Bool-          true+          false        ) [GOOD] (define-fun q1_model49_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model49 x!0)))) [GOOD] (define-fun q2_model49 ((x!0 Bool) (x!1 Bool)) Bool-          true+          (ite (and (= x!0 true) (= x!1 false)) false+          (ite (and (= x!0 true) (= x!1 true)) false+          true))        ) [GOOD] (define-fun q2_model49_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1454,19 +1438,24 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 ((as const (Array Bool Bool Bool)) true)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false true true)+              true+              false+              true))) [GOOD] (define-fun q1_model50 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model50_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model50 x!0)))) [GOOD] (define-fun q2_model50 ((x!0 Bool) (x!1 Bool)) Bool-          true+          (ite (and (= x!0 true) (= x!1 false)) true+          (ite (and (= x!0 false) (= x!1 true)) true+          false))        ) [GOOD] (define-fun q2_model50_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1481,20 +1470,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true)))+[RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true false false)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true false true))) [GOOD] (define-fun q1_model51 ((x!0 Bool)) Bool-          (ite (and (= x!0 false)) true-          false)+          true        ) [GOOD] (define-fun q1_model51_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model51 x!0)))) [GOOD] (define-fun q2_model51 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) false-          true)+          (ite (and (= x!0 true) (= x!1 false)) true+          false)        ) [GOOD] (define-fun q2_model51_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1511,7 +1499,10 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true false false)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) true false true)+              true+              true+              true))) [GOOD] (define-fun q1_model52 ((x!0 Bool)) Bool           true        )@@ -1520,8 +1511,9 @@                   (distinct (q1         x!0)                             (q1_model52 x!0)))) [GOOD] (define-fun q2_model52 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) false-          true)+          (ite (and (= x!0 true) (= x!1 true)) true+          (ite (and (= x!0 true) (= x!1 false)) true+          false))        ) [GOOD] (define-fun q2_model52_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1536,18 +1528,18 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) false)))+[RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true true true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) false false true))) [GOOD] (define-fun q1_model53 ((x!0 Bool)) Bool-          false+          true        ) [GOOD] (define-fun q1_model53_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model53 x!0)))) [GOOD] (define-fun q2_model53 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) true+          (ite (and (= x!0 false) (= x!1 false)) true           false)        ) [GOOD] (define-fun q2_model53_reject () Bool@@ -1563,20 +1555,23 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true false true)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false false true)+              false+              true+              true))) [GOOD] (define-fun q1_model54 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          true        ) [GOOD] (define-fun q1_model54_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model54 x!0)))) [GOOD] (define-fun q2_model54 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) true-          false)+          (ite (and (= x!0 false) (= x!1 true)) true+          (ite (and (= x!0 false) (= x!1 false)) true+          false))        ) [GOOD] (define-fun q2_model54_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1591,24 +1586,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) true false true)-              true-              true-              true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true false false))) [GOOD] (define-fun q1_model55 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          true        ) [GOOD] (define-fun q1_model55_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model55 x!0)))) [GOOD] (define-fun q2_model55 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) true-          (ite (and (= x!0 true) (= x!1 false)) true-          false))+          (ite (and (= x!0 true) (= x!1 false)) false+          true)        ) [GOOD] (define-fun q2_model55_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1625,10 +1615,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) true false true)-              true-              true-              true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true true true))) [GOOD] (define-fun q1_model56 ((x!0 Bool)) Bool           true        )@@ -1638,8 +1625,7 @@                             (q1_model56 x!0)))) [GOOD] (define-fun q2_model56 ((x!0 Bool) (x!1 Bool)) Bool           (ite (and (= x!0 true) (= x!1 true)) true-          (ite (and (= x!0 true) (= x!1 false)) true-          false))+          false)        ) [GOOD] (define-fun q2_model56_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1656,7 +1642,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true false true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) false true true))) [GOOD] (define-fun q1_model57 ((x!0 Bool)) Bool           true        )@@ -1665,7 +1651,7 @@                   (distinct (q1         x!0)                             (q1_model57 x!0)))) [GOOD] (define-fun q2_model57 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) true+          (ite (and (= x!0 false) (= x!1 true)) true           false)        ) [GOOD] (define-fun q2_model57_reject () Bool@@ -1681,19 +1667,23 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 ((as const (Array Bool Bool Bool)) false)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false true true)+              true+              false+              true))) [GOOD] (define-fun q1_model58 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          true        ) [GOOD] (define-fun q1_model58_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model58 x!0)))) [GOOD] (define-fun q2_model58 ((x!0 Bool) (x!1 Bool)) Bool-          false+          (ite (and (= x!0 true) (= x!1 false)) true+          (ite (and (= x!0 false) (= x!1 true)) true+          false))        ) [GOOD] (define-fun q2_model58_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1708,20 +1698,24 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true true true)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false true true)+              false+              false+              true))) [GOOD] (define-fun q1_model59 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          (ite (and (= x!0 true)) true+          false)        ) [GOOD] (define-fun q1_model59_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model59 x!0)))) [GOOD] (define-fun q2_model59 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) true-          false)+          (ite (and (= x!0 false) (= x!1 false)) true+          (ite (and (= x!0 false) (= x!1 true)) true+          false))        ) [GOOD] (define-fun q2_model59_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1736,19 +1730,24 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const (Array Bool Bool)) true)))+[RECV] ((q1 (store ((as const (Array Bool Bool)) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) true true true)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false true true)+              false+              false+              true))) [GOOD] (define-fun q1_model60 ((x!0 Bool)) Bool-          true+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model60_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model60 x!0)))) [GOOD] (define-fun q2_model60 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) true-          false)+          (ite (and (= x!0 false) (= x!1 false)) true+          (ite (and (= x!0 false) (= x!1 true)) true+          false))        ) [GOOD] (define-fun q2_model60_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1765,7 +1764,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) false) false false true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true true false))) [GOOD] (define-fun q1_model61 ((x!0 Bool)) Bool           true        )@@ -1774,8 +1773,8 @@                   (distinct (q1         x!0)                             (q1_model61 x!0)))) [GOOD] (define-fun q2_model61 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 false)) true-          false)+          (ite (and (= x!0 true) (= x!1 true)) false+          true)        ) [GOOD] (define-fun q2_model61_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1793,8 +1792,8 @@ [RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2)) [RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false false true)-              false               true+              false               true))) [GOOD] (define-fun q1_model62 ((x!0 Bool)) Bool           true@@ -1804,7 +1803,7 @@                   (distinct (q1         x!0)                             (q1_model62 x!0)))) [GOOD] (define-fun q2_model62 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 true)) true+          (ite (and (= x!0 true) (= x!1 false)) true           (ite (and (= x!0 false) (= x!1 false)) true           false))        )@@ -1821,24 +1820,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) false) false false true)-              false-              true-              true)))+[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) false false false))) [GOOD] (define-fun q1_model63 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          true        ) [GOOD] (define-fun q1_model63_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model63 x!0)))) [GOOD] (define-fun q2_model63 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 true)) true-          (ite (and (= x!0 false) (= x!1 false)) true-          false))+          (ite (and (= x!0 false) (= x!1 false)) false+          true)        ) [GOOD] (define-fun q2_model63_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1853,20 +1847,23 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const (Array Bool Bool)) true) true false)))+[RECV] ((q1 ((as const (Array Bool Bool)) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const (Array Bool Bool Bool)) true) true true false)))+[RECV] ((q2 (store (store ((as const (Array Bool Bool Bool)) true) false false false)+              true+              false+              false))) [GOOD] (define-fun q1_model64 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          true        ) [GOOD] (define-fun q1_model64_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model64 x!0)))) [GOOD] (define-fun q2_model64 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) false-          true)+          (ite (and (= x!0 true) (= x!1 false)) false+          (ite (and (= x!0 false) (= x!1 false)) false+          true))        ) [GOOD] (define-fun q2_model64_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1885,27 +1882,25 @@  RESULT: Solution #1:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True True = False-  q2 _    _    = True+  q2 True  False = False+  q2 False False = False+  q2 _     _     = True Solution #2:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 False True  = True-  q2 False False = True-  q2 _     _     = False+  q2 False False = False+  q2 _     _     = True Solution #3:   q1 :: Bool -> Bool   q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 False True  = True+  q2 True  False = True   q2 False False = True   q2 _     _     = False Solution #4:@@ -1913,139 +1908,148 @@   q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 False False = True-  q2 _     _     = False+  q2 True True = False+  q2 _    _    = True Solution #5:   q1 :: Bool -> Bool-  q1 _ = True+  q1 False = True+  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 True True = True-  q2 _    _    = False+  q2 False False = True+  q2 False True  = True+  q2 _     _     = False Solution #6:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 True = True+  q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 True True = True-  q2 _    _    = False+  q2 False False = True+  q2 False True  = True+  q2 _     _     = False Solution #7:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 _ _ = False+  q2 True  False = True+  q2 False True  = True+  q2 _     _     = False Solution #8:   q1 :: Bool -> Bool   q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True False = True-  q2 _    _     = False+  q2 False True = True+  q2 _     _    = False Solution #9:   q1 :: Bool -> Bool   q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True True  = True-  q2 True False = True-  q2 _    _     = False+  q2 True True = True+  q2 _    _    = False Solution #10:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True True  = True-  q2 True False = True-  q2 _    _     = False+  q2 True False = False+  q2 _    _     = True Solution #11:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True False = True-  q2 _    _     = False+  q2 False True  = True+  q2 False False = True+  q2 _     _     = False Solution #12:   q1 :: Bool -> Bool-  q1 _ = False+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True True = True-  q2 _    _    = False+  q2 False False = True+  q2 _     _     = False Solution #13:   q1 :: Bool -> Bool   q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True False = False-  q2 _    _     = True+  q2 True True  = True+  q2 True False = True+  q2 _    _     = False Solution #14:   q1 :: Bool -> Bool-  q1 False = True-  q1 _     = False+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True False = False-  q2 _    _     = True+  q2 True False = True+  q2 _    _     = False Solution #15:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 False = True+  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 _ _ = True+  q2 True  False = True+  q2 False True  = True+  q2 _     _     = False Solution #16:   q1 :: Bool -> Bool-  q1 _ = True+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 _ _ = True+  q2 True False = False+  q2 True True  = False+  q2 _    _     = True Solution #17:   q1 :: Bool -> Bool-  q1 _ = True+  q1 True = True+  q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 True True = False-  q2 _    _    = True+  q2 False True  = False+  q2 False False = False+  q2 _     _     = True Solution #18:   q1 :: Bool -> Bool-  q1 _ = True+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 True  True  = False+  q2 False True  = False   q2 False False = False   q2 _     _     = True Solution #19:   q1 :: Bool -> Bool-  q1 _ = True+  q1 False = True+  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 False False = False-  q2 _     _     = True+  q2 True True  = True+  q2 True False = True+  q2 _    _     = False Solution #20:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 False = True+  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 False False = False-  q2 _     _     = True+  q2 True False = True+  q2 _    _     = False Solution #21:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 False = True+  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 True  False = True-  q2 False True  = True-  q2 _     _     = False+  q2 True True = True+  q2 _    _    = False Solution #22:   q1 :: Bool -> Bool-  q1 _ = True+  q1 False = True+  q1 _     = False    q2 :: Bool -> Bool -> Bool   q2 True  True = True@@ -2053,70 +2057,68 @@   q2 _     _    = False Solution #23:   q1 :: Bool -> Bool-  q1 _ = True+  q1 False = True+  q1 _     = False    q2 :: Bool -> Bool -> Bool   q2 False True = True   q2 _     _    = False Solution #24:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 False True = True-  q2 _     _    = False+  q2 False True  = True+  q2 True  False = True+  q2 _     _     = False Solution #25:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 True = True+  q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 False True = True-  q2 True  True = True-  q2 _     _    = False+  q2 True  False = False+  q2 False False = False+  q2 _     _     = True Solution #26:   q1 :: Bool -> Bool-  q1 True = True-  q1 _    = False+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 False True = True-  q2 True  True = True-  q2 _     _    = False+  q2 True True = True+  q2 _    _    = False Solution #27:   q1 :: Bool -> Bool   q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 True False = True-  q2 True True  = True-  q2 _    _     = False+  q2 True  True = True+  q2 False True = True+  q2 _     _    = False Solution #28:   q1 :: Bool -> Bool   q1 True = True   q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 False True  = False+  q2 True  True  = False   q2 False False = False   q2 _     _     = True Solution #29:   q1 :: Bool -> Bool-  q1 _ = False+  q1 False = True+  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 True  True = True-  q2 False True = True-  q2 _     _    = False+  q2 _ _ = False Solution #30:   q1 :: Bool -> Bool   q1 True = True   q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 True True = True-  q2 _    _    = False+  q2 True False = True+  q2 _    _     = False Solution #31:   q1 :: Bool -> Bool   q1 _ = False@@ -2129,127 +2131,122 @@   q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 False True  = True-  q2 True  False = True-  q2 _     _     = False-Solution #33:-  q1 :: Bool -> Bool-  q1 True = True-  q1 _    = False--  q2 :: Bool -> Bool -> Bool-  q2 True  True  = False   q2 False False = False   q2 _     _     = True-Solution #34:+Solution #33:   q1 :: Bool -> Bool   q1 _ = False    q2 :: Bool -> Bool -> Bool   q2 True False = True   q2 _    _     = False-Solution #35:+Solution #34:   q1 :: Bool -> Bool-  q1 _ = False+  q1 True = True+  q1 _    = False    q2 :: Bool -> Bool -> Bool   q2 False False = False   q2 _     _     = True-Solution #36:+Solution #35:   q1 :: Bool -> Bool   q1 True = True   q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 False False = False-  q2 _     _     = True-Solution #37:+  q2 False True = True+  q2 _     _    = False+Solution #36:   q1 :: Bool -> Bool   q1 True = True   q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 False True = True-  q2 _     _    = False+  q2 _ _ = False+Solution #37:+  q1 :: Bool -> Bool+  q1 True = False+  q1 _    = True++  q2 :: Bool -> Bool -> Bool+  q2 False False = False+  q2 _     _     = True Solution #38:   q1 :: Bool -> Bool   q1 True = True   q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 True False = True-  q2 _    _     = False+  q2 True True = True+  q2 _    _    = False Solution #39:   q1 :: Bool -> Bool-  q1 True = True-  q1 _    = False+  q1 False = True+  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 _ _ = False+  q2 True True = False+  q2 _    _    = True Solution #40:   q1 :: Bool -> Bool-  q1 _ = True+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 True  False = True-  q2 False False = True-  q2 _     _     = False+  q2 True True = False+  q2 _    _    = True Solution #41:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 True = True+  q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 True  False = True-  q2 False False = True-  q2 _     _     = False+  q2 True True = False+  q2 _    _    = True Solution #42:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 False False = True-  q2 _     _     = False+  q2 _ _ = True Solution #43:   q1 :: Bool -> Bool-  q1 _ = False+  q1 True = True+  q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 True False = False-  q2 True True  = False-  q2 _    _     = True+  q2 _ _ = True Solution #44:   q1 :: Bool -> Bool-  q1 True = True-  q1 _    = False+  q1 True = False+  q1 _    = True    q2 :: Bool -> Bool -> Bool   q2 _ _ = True Solution #45:   q1 :: Bool -> Bool-  q1 _ = False+  q1 True = False+  q1 _    = True    q2 :: Bool -> Bool -> Bool-  q2 True True = False-  q2 _    _    = True+  q2 True False = False+  q2 _    _     = True Solution #46:   q1 :: Bool -> Bool-  q1 True = True-  q1 _    = False+  q1 False = True+  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 True True = False-  q2 _    _    = True+  q2 True  False = True+  q2 False False = True+  q2 _     _     = False Solution #47:   q1 :: Bool -> Bool-  q1 True = True-  q1 _    = False+  q1 True = False+  q1 _    = True    q2 :: Bool -> Bool -> Bool-  q2 True False = False-  q2 True True  = False-  q2 _    _     = True+  q2 False False = True+  q2 _     _     = False Solution #48:   q1 :: Bool -> Bool   q1 _ = False
SBVTestSuite/GoldFiles/unint-axioms-empty.gold view
@@ -18,7 +18,6 @@ [GOOD] (declare-fun s5 () Thing) [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun thingCompare (Thing Thing) Bool) [GOOD] (declare-fun thingMerge (Thing Thing) Thing)@@ -27,15 +26,13 @@ [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Thing))          (thingCompare l1_s0 l1_s0))) [GOOD] (define-fun s1 () Bool (forall ((l1_s0 Thing) (l1_s1 Thing))-         (let ((l1_s2 (thingMerge l1_s0 l1_s1)))-         (let ((l1_s3 (distinct l1_s0 l1_s2)))-         l1_s3))))+                                 (let ((l1_s2 (thingMerge l1_s0 l1_s1)))+                                 (let ((l1_s3 (distinct l1_s0 l1_s2)))+                                 l1_s3)))) [GOOD] (define-fun s3 () Thing (thingMerge s2 s2)) [GOOD] (define-fun s6 () Bool (= s4 s5)) [GOOD] (define-fun s7 () Bool (thingCompare s4 s5)) [GOOD] (define-fun s8 () Bool (=> s6 s7))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/unint-axioms-query.gold view
@@ -18,12 +18,9 @@ [GOOD] (declare-fun s2 () B) ; tracks user variable "r" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (declare-fun AND (B B) B)@@ -41,28 +38,28 @@ [GOOD] (define-fun s12 () Bool (distinct s5 s11)) [GOOD] (assert s12) [GOOD] (define-fun s13 () Bool (forall ((l1_s0 B) (l1_s1 B) (l1_s2 B))-         (let ((l1_s3 (OR l1_s0 l1_s1)))-         (let ((l1_s4 (OR l1_s0 l1_s2)))-         (let ((l1_s5 (AND l1_s3 l1_s4)))-         (let ((l1_s6 (AND l1_s1 l1_s2)))-         (let ((l1_s7 (OR l1_s0 l1_s6)))-         (let ((l1_s8 (= l1_s5 l1_s7)))-         l1_s8))))))))+                                 (let ((l1_s3 (OR l1_s0 l1_s1)))+                                 (let ((l1_s4 (OR l1_s0 l1_s2)))+                                 (let ((l1_s5 (AND l1_s3 l1_s4)))+                                 (let ((l1_s6 (AND l1_s1 l1_s2)))+                                 (let ((l1_s7 (OR l1_s0 l1_s6)))+                                 (let ((l1_s8 (= l1_s5 l1_s7)))+                                 l1_s8)))))))) [GOOD] (assert s13) [GOOD] (define-fun s14 () Bool (forall ((l1_s0 B) (l1_s1 B))-         (let ((l1_s2 (OR l1_s0 l1_s1)))-         (let ((l1_s3 (NOT l1_s2)))-         (let ((l1_s4 (NOT l1_s0)))-         (let ((l1_s5 (NOT l1_s1)))-         (let ((l1_s6 (AND l1_s4 l1_s5)))-         (let ((l1_s7 (= l1_s3 l1_s6)))-         l1_s7))))))))+                                 (let ((l1_s2 (OR l1_s0 l1_s1)))+                                 (let ((l1_s3 (NOT l1_s2)))+                                 (let ((l1_s4 (NOT l1_s0)))+                                 (let ((l1_s5 (NOT l1_s1)))+                                 (let ((l1_s6 (AND l1_s4 l1_s5)))+                                 (let ((l1_s7 (= l1_s3 l1_s6)))+                                 l1_s7)))))))) [GOOD] (assert s14) [GOOD] (define-fun s15 () Bool (forall ((l1_s0 B))-         (let ((l1_s1 (NOT l1_s0)))-         (let ((l1_s2 (NOT l1_s1)))-         (let ((l1_s3 (= l1_s0 l1_s2)))-         l1_s3)))))+                                 (let ((l1_s1 (NOT l1_s0)))+                                 (let ((l1_s2 (NOT l1_s1)))+                                 (let ((l1_s3 (= l1_s0 l1_s2)))+                                 l1_s3))))) [GOOD] (assert s15) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/unint-axioms.gold view
@@ -17,26 +17,23 @@ [GOOD] (declare-fun s2 () Bitstring) ; tracks user variable "k" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun a (Bitstring) Bool) [GOOD] (declare-fun e (Bitstring Bitstring) Bitstring) [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (forall ((l1_s0 Bitstring) (l1_s1 Bitstring))-         (let ((l1_s2 (a l1_s1)))-         (let ((l1_s3 (a l1_s0)))-         (let ((l1_s4 (and l1_s2 l1_s3)))-         (let ((l1_s5 (e l1_s1 l1_s0)))-         (let ((l1_s6 (a l1_s5)))-         (let ((l1_s7 (=> l1_s4 l1_s6)))-         l1_s7))))))))+                                 (let ((l1_s2 (a l1_s1)))+                                 (let ((l1_s3 (a l1_s0)))+                                 (let ((l1_s4 (and l1_s2 l1_s3)))+                                 (let ((l1_s5 (e l1_s1 l1_s0)))+                                 (let ((l1_s6 (a l1_s5)))+                                 (let ((l1_s7 (=> l1_s4 l1_s6)))+                                 l1_s7)))))))) [GOOD] (define-fun s3 () Bool (a s1)) [GOOD] (define-fun s4 () Bool (a s2)) [GOOD] (define-fun s5 () Bitstring (e s2 s1)) [GOOD] (define-fun s6 () Bool (a s5))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s0)
SBVTestSuite/GoldFiles/uninterpreted-3.gold view
@@ -13,7 +13,6 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun p () Bool) [GOOD] (declare-fun q () Bool)@@ -22,8 +21,6 @@ [GOOD] (define-fun s0 () Bool p) [GOOD] (define-fun s1 () Bool q) [GOOD] (define-fun s2 () Bool (or s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/uninterpreted-3a.gold view
@@ -13,7 +13,6 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun p () Bool) [GOOD] (declare-fun q () Bool)@@ -22,8 +21,6 @@ [GOOD] (define-fun s0 () Bool p) [GOOD] (define-fun s1 () Bool q) [GOOD] (define-fun s2 () Bool (or s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)@@ -36,7 +33,7 @@ [SEND] (get-value (s1)) [RECV] ((s1 false)) [GOOD] (push 1)-[GOOD] (define-fun s3 () Bool (distinct true s0))+[GOOD] (define-fun s3 () Bool (not s0)) [GOOD] (assert s3) Fast allSat, Looking for solution 2 [SEND] (check-sat)@@ -52,10 +49,9 @@ [RECV] unsat [GOOD] (pop 1) [GOOD] (push 1)-[GOOD] (define-fun s4 () Bool (distinct true s1))+[GOOD] (define-fun s4 () Bool (not s1)) [GOOD] (assert s4)-[GOOD] (define-fun s5 () Bool (= false s0))-[GOOD] (assert s5)+[GOOD] (assert s3) Fast allSat, Looking for solution 3 [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/uninterpreted-4.gold view
@@ -15,7 +15,6 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun c () Q) [GOOD] (declare-fun d () Q)@@ -24,8 +23,6 @@ [GOOD] (define-fun s0 () Q c) [GOOD] (define-fun s1 () Q d) [GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)@@ -39,6 +36,6 @@ *** Exit code: ExitSuccess   FINAL:Satisfiable. Model:-  c = Q!val!0 :: Q-  d = Q!val!1 :: Q+  c = Q_0 :: Q+  d = Q_1 :: Q DONE!
SBVTestSuite/GoldFiles/uninterpreted-4a.gold view
@@ -15,7 +15,6 @@ [GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun c () Q) [GOOD] (declare-fun d () Q)@@ -24,8 +23,6 @@ [GOOD] (define-fun s0 () Q c) [GOOD] (define-fun s1 () Q d) [GOOD] (define-fun s2 () Bool (distinct s0 s1))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)@@ -49,7 +46,7 @@ *** Exit code: ExitSuccess   FINAL:Solution #1:-  c = Q!val!0 :: Q-  d = Q!val!1 :: Q+  c = Q_0 :: Q+  d = Q_1 :: Q This is the only solution. DONE!
SBVTestSuite/GoldFiles/validate_0.gold view
@@ -15,13 +15,10 @@ [ISSUE] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x" [ISSUE] ; --- constant tables --- [ISSUE] ; --- non-constant tables ----[ISSUE] ; --- arrays --- [ISSUE] ; --- uninterpreted constants --- [ISSUE] ; --- user defined functions --- [ISSUE] ; --- assignments --- [ISSUE] (define-fun s2 () Bool (bvult s0 s1))-[ISSUE] ; --- arrayDelayeds ----[ISSUE] ; --- arraySetups --- [ISSUE] ; --- delayedEqualities --- [ISSUE] ; --- formula --- [ISSUE] (assert s2)
SBVTestSuite/GoldFiles/validate_1.gold view
@@ -15,14 +15,11 @@ [GOOD] (declare-fun s0 () (_ FloatingPoint  8 24)) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () (_ FloatingPoint  8 24) (fp.add s1 s0 s0)) [GOOD] (define-fun s3 () Bool (fp.eq s0 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3)
SBVTestSuite/GoldFiles/validate_2.gold view
@@ -15,25 +15,22 @@ [GOOD] (declare-fun s0 () (_ FloatingPoint  8 24)) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s2 () (_ FloatingPoint  8 24) (fp.fma s1 s0 s0 s0)) [GOOD] (define-fun s3 () Bool (fp.eq s0 s2))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (_ +zero 8 24)))+[RECV] ((s0 (fp #b0 #x00 #b00000001001110100110010))) *** Solver   : Z3 *** Exit code: ExitSuccess [VALIDATE] Validating the model. Assignment:-[VALIDATE]       x = 0.0 :: Float+[VALIDATE]       x = 5.6391e-41 :: Float [VALIDATE] There are no constraints to check. [VALIDATE] Validating outputs. @@ -42,7 +39,7 @@ ***  *** Assignment: *** -***       x = 0.0 :: Float+***       x = 5.6391e-41 :: Float ***  *** Floating point FMA operation is not supported concretely. *** @@ -52,4 +49,4 @@ *** Alleged model: *** *** Satisfiable. Model:-***   x = 0.0 :: Float+***   x = 5.6391e-41 :: Float
SBVTestSuite/GoldFiles/validate_3.gold view
@@ -14,12 +14,9 @@ [GOOD] (declare-fun s0 () Int) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert false)
SBVTestSuite/GoldFiles/validate_4.gold view
@@ -14,12 +14,9 @@ [GOOD] (declare-fun s0 () Int) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert false)
SBVTestSuite/GoldFiles/validate_5.gold view
@@ -17,7 +17,6 @@ [GOOD] (declare-fun s1 () Int) ; tracks user variable "y" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -25,8 +24,6 @@ [GOOD] (define-fun s4 () Bool (> s0 s3)) [GOOD] (define-fun s6 () Int (+ s1 s5)) [GOOD] (define-fun s7 () Bool (= s0 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/validate_6.gold view
@@ -17,7 +17,6 @@ [GOOD] (declare-fun s1 () Int) ; tracks user variable "y" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments ---@@ -25,8 +24,6 @@ [GOOD] (define-fun s4 () Bool (> s0 s3)) [GOOD] (define-fun s6 () Int (+ s1 s5)) [GOOD] (define-fun s7 () Bool (= s0 s6))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups --- [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s2)
SBVTestSuite/GoldFiles/validate_7.gold view
@@ -14,20 +14,17 @@ [GOOD] (declare-fun s0 () (_ FloatingPoint  8 24)) ; tracks user variable "x" [GOOD] ; --- constant tables --- [GOOD] ; --- non-constant tables ----[GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] ; --- user defined functions --- [GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Bool (forall ((l1_s0 (_ FloatingPoint  8 24)))-         (let ((l1_s1 (fp.isNaN l1_s0)))-         (let ((l1_s2 (fp.isInfinite l1_s0)))-         (let ((l1_s3 (or l1_s1 l1_s2)))-         (let ((l1_s4 (not l1_s3)))-         (let ((l1_s5 (fp.leq s0 l1_s0)))-         (let ((l1_s6 (=> l1_s4 l1_s5)))-         l1_s6))))))))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ---+                                 (let ((l1_s1 (fp.isNaN l1_s0)))+                                 (let ((l1_s2 (fp.isInfinite l1_s0)))+                                 (let ((l1_s3 (or l1_s1 l1_s2)))+                                 (let ((l1_s4 (not l1_s3)))+                                 (let ((l1_s5 (fp.leq s0 l1_s0)))+                                 (let ((l1_s6 (=> l1_s4 l1_s5)))+                                 l1_s6)))))))) [GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula --- [GOOD] (assert s1)
SBVTestSuite/TestSuite/Arrays/Caching.hs view
@@ -28,7 +28,9 @@  test :: Bool -> Symbolic SBool test swap = do-    arr :: SArray Integer Integer <- newArray "items" (Just 0)+    let arr :: SArray Integer Integer+        arr = lambdaArray (const 0)+     x   <- sInteger "x"      let ys = writeArray arr 0 2
SBVTestSuite/TestSuite/Arrays/InitVals.hs view
@@ -9,63 +9,134 @@ -- Testing arrays with initializers ----------------------------------------------------------------------------- -{-# LANGUAGE Rank2Types #-}+{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE Rank2Types          #-}+{-# LANGUAGE ScopedTypeVariables #-}  {-# OPTIONS_GHC -Wall -Werror #-}  module TestSuite.Arrays.InitVals(tests) where +import Data.SBV import Utils.SBVTestFramework -readDef :: forall m. SymArray m => m Integer Integer -> Predicate-readDef proxy = do c <- free "c"-                   i <- free "i"-                   j <- free "j"-                   a <- newArray_ (Just c) `asTypeOf` return proxy--                   let a' = writeArray a j 32+readDef :: Predicate+readDef = do c :: SInteger <- free "c"+             i :: SInteger <- free "i"+             j <- free "j"+             let a = lambdaArray (const c) -                   return $ ite (i ./= j) (readArray a' i .== c)-                                          (readArray a' i .== 32)+             let a' = writeArray a j 32 -readNoDef :: forall m. SymArray m => m Integer Integer -> Predicate-readNoDef proxy = do i <- free "i"-                     j <- free "j"+             return $ ite (i ./= j) (readArray a' i .== c)+                                    (readArray a' i .== 32) -                     a <- newArray_ Nothing `asTypeOf` return proxy+readNoDef :: Predicate+readNoDef = do i :: SInteger <- free "i"+               j :: SInteger <- free "j" -                     return $ readArray a i .== j+               a <- sArray_ +               return $ readArray a i .== j -constArr :: forall m. SymArray m => m Integer Integer -> Predicate-constArr proxy = do i <- sInteger "i"-                    j <- sInteger "j"+constArr :: Predicate+constArr = do i :: SInteger <- sInteger "i"+              j :: SInteger <- sInteger "j" -                    constrain $ i .< j-                    constrain $ i `sElem` [1, 2, 3, 75]-                    pure $ readArray myArray i .== readArray (myArray `asTypeOf` proxy) j-  where myArray = sListArray 7 [(1, 12), (2, 5) , (3, 6), (75, 5)]+              constrain $ i .< j+              constrain $ i `sElem` [1, 2, 3, 75]+              pure $ readArray myArray i .== readArray myArray j+  where myArray = listArray [(1, 12), (2, 5) , (3, 6), (75, 5)] (7 :: Integer) -constArr2 :: forall m. SymArray m => m Integer Integer -> Predicate-constArr2 proxy = do i <- sInteger "i"-                     j <- sInteger "j"+constArr2 :: Predicate+constArr2 = do i :: SInteger <- sInteger "i"+               j :: SInteger <- sInteger "j" -                     constrain $ i .< j-                     constrain $ i `sElem` [1, 2, 3, 75]-                     pure $ readArray myArray i .== readArray (myArray `asTypeOf` proxy) j-  where myArray = sListArray 2 [(1, 12), (2, 5) , (3, 6), (75, 5)]+               constrain $ i .< j+               constrain $ i `sElem` [1, 2, 3, 75]+               pure $ readArray myArray i .== readArray myArray j+  where myArray = listArray [(1, 12), (2, 5) , (3, 6), (75, 5)] (2 :: Integer)  tests :: TestTree-tests =-  testGroup "Arrays.InitVals"-    [ testCase "readDef_SArray"              $ assertIsThm (readDef   (undefined :: SArray Integer Integer))-    , testCase "readDef2_SArray2"            $ assertIsSat (readNoDef (undefined :: SArray Integer Integer))-    , goldenCapturedIO "constArr_SArray"     $ t                      (undefined :: SArray Integer Integer)-    , goldenCapturedIO "constArr2_SArray"    $ t2                     (undefined :: SArray Integer Integer)-    ]-    where t p goldFile = do r <- satWith defaultSMTCfg{verbose=True, redirectVerbose = Just goldFile} (constArr p)+tests = testGroup "Arrays" [+    testGroup "Arrays.InitVals"+      [ testCase "readDef_SArray"           $ assertIsThm readDef+      , testCase "readDef2_SArray2"         $ assertIsSat readNoDef+      , goldenCapturedIO "constArr_SArray"  $ t satWith constArr+      , goldenCapturedIO "constArr2_SArray" $ t satWith constArr2+      ]+  , testGroup "Arrays.Misc"+      [ goldenCapturedIO "array_misc_1"  $ t proveWith $ \i -> readArray (listArray [(True,1),(False,0)] 3) i .<= (1::SInteger)++      , goldenCapturedIO "array_misc_2"  $ t satWith   $ \(x :: SArray Integer Integer) i1 i2 i3 ->+                                                                 readArray x i1 .== 4 .&& readArray x i2 .== 5 .&& readArray x i3 .== 12++      , goldenCapturedIO "array_misc_3"  $ t proveWith $      write (empty False) [(True, True), (False, False)]+                                                          .== write (empty True)  [(True, True), (False, False)]++      , testCase         "array_misc_4"  $                   (write (empty False) [(True, True), (False, False)]+                                                          .== write (empty True)  [(True, True), (False, False)]) `showsAs` "True"++      -- Interestingly, z3 says UNKNOWN if the logic below isn't set to ALL.+      , goldenCapturedIO "array_misc_5"  $ t proveWith $ do setLogic Logic_ALL+                                                            pure (    write (empty 0) [(i, i) | i <- [0 .. (3 :: WordN 2)]]+                                                                  .== write (empty 1) [(i, i) | i <- [0 .. (3 :: WordN 2)]]) :: Symbolic SBool++      , testCase         "array_misc_6"  $                   (write (empty 0) [(i, i) | i <- [0 .. (3 :: WordN 2)]]+                                                          .== write (empty 1) [(i, i) | i <- [0 .. (3 :: WordN 2)]]) `showsAs` "<symbolic> :: SBool"++      , goldenCapturedIO "array_misc_7"  $ t proveWith $      write (empty 0) [(i, i) | i <- [0 .. (3 :: WordN 2)]]+                                                          .== write (empty 0) [(i, i) | i <- [0 .. (3 :: WordN 2)]]++      , testCase         "array_misc_8"  $                   (write (empty 0) [(i, i) | i <- [0 .. (3 :: WordN 2)]]+                                                          .== write (empty 0) [(i, i) | i <- [0 .. (3 :: WordN 2)]]) `showsAs` "True"++      , goldenCapturedIO "array_misc_9"   $ t proveWith $     write (empty 0) [(i, i+1) | i <- [0 .. (3 :: WordN 2)]]+                                                          .== write (empty 0) [(i, i)   | i <- [0 .. (3 :: WordN 2)]]++      , testCase         "array_misc_10" $                   (write (empty 0) [(i, i+1) | i <- [0 .. (3 :: WordN 2)]]+                                                          .== write (empty 0) [(i, i  ) | i <- [0 .. (3 :: WordN 2)]]) `showsAs` "False"++      , goldenCapturedIO "array_misc_11" $ t satWith $ \(a :: SArray (Integer, Integer) Integer) -> readArray a (literal (1, 2)) .== 3+      , goldenCapturedIO "array_misc_12" $ t satWith $ \(a :: SArray Integer (Integer, Integer)) -> readArray a 3 .== literal (1, 2)++      , goldenCapturedIO "array_misc_13" $ t satWith $ \(a :: SArray (Integer, Integer) (Integer, Integer)) -> readArray a (literal (1, 2)) .== literal (1, 2)+      , goldenCapturedIO "array_misc_14" $ t satWith $ \(a :: SArray Integer Float)   -> fpIsNaN (readArray a 2)+      , goldenCapturedIO "array_misc_15" $ t satWith $ \(a :: SArray Float   Integer) -> readArray a (0/0) .== 3++      , goldenCapturedIO "array_misc_16" $ t satWith (.== readArray (listArray [(0, 12)] 3 :: SArray Float                Integer) 0)+      , goldenCapturedIO "array_misc_17" $ t satWith (.== readArray (listArray [(0, 12)] 3 :: SArray Double               Integer) 0)+      , goldenCapturedIO "array_misc_18" $ t satWith (.== readArray (listArray [(0, 12)] 3 :: SArray (FloatingPoint 10 4) Integer) (0 :: SFloatingPoint 10 4))++      , goldenCapturedIO "array_misc_19" $ t satWith (.== readArray (listArray [(0, 12)] 3 :: SArray Float                Integer) (-0))+      , goldenCapturedIO "array_misc_20" $ t satWith (.== readArray (listArray [(0, 12)] 3 :: SArray Double               Integer) (-0))+      , goldenCapturedIO "array_misc_21" $ t satWith (.== readArray (listArray [(0, 12)] 3 :: SArray (FloatingPoint 10 4) Integer) (-(0 :: SFloatingPoint 10 4)))++      , goldenCapturedIO "array_misc_22" $ t satWith (.== readArray (listArray [(0/0, 12)] 3 :: SArray Float                Integer) (0/0))+      , goldenCapturedIO "array_misc_23" $ t satWith (.== readArray (listArray [(0/0, 12)] 3 :: SArray Double               Integer) (0/0))+      , goldenCapturedIO "array_misc_24" $ t satWith (.== readArray (listArray [(0/0, 12)] 3 :: SArray (FloatingPoint 10 4) Integer) (0/0))++      , goldenCapturedIO "array_misc_25" $ t satWith (.== readArray (listArray [(1/0, 12)] 3 :: SArray Float                Integer) (1/0))+      , goldenCapturedIO "array_misc_26" $ t satWith (.== readArray (listArray [(1/0, 12)] 3 :: SArray Double               Integer) (1/0))+      , goldenCapturedIO "array_misc_27" $ t satWith (.== readArray (listArray [(1/0, 12)] 3 :: SArray (FloatingPoint 10 4) Integer) (1/0))++      , goldenCapturedIO "array_misc_28" $ t satWith (.== readArray (listArray [(1/0, 12)] 3 :: SArray Float                Integer) (-1/0))+      , goldenCapturedIO "array_misc_29" $ t satWith (.== readArray (listArray [(1/0, 12)] 3 :: SArray Double               Integer) (-1/0))+      , goldenCapturedIO "array_misc_30" $ t satWith (.== readArray (listArray [(1/0, 12)] 3 :: SArray (FloatingPoint 10 4) Integer) (-1/0))++      , goldenCapturedIO "array_misc_31" $ t proveWith (listArray [(1, 2), (3, 4)] 5 .== listArray [(3 :: Integer, 4), (1, 2)] (5 :: Integer))+      , goldenCapturedIO "array_misc_32" $ t proveWith (listArray [(1, 2), (3, 4)] 5 .== listArray [(3 :: Integer, 4), (1, 2)] (5 :: Double))+      , goldenCapturedIO "array_misc_33" $ t proveWith (listArray [(1, 2), (3, 1)] 5 .== listArray [(3 :: Integer, 4), (1, 2)] (5 :: Double))+      , goldenCapturedIO "array_misc_34" $ t proveWith (listArray [(1, 2), (3, 1)] 5 ./= listArray [(3 :: Integer, 4), (1, 2)] (5 :: Double))+      ]+  ]+  where t p f goldFile = do r <- p defaultSMTCfg{verbose=True, redirectVerbose = Just goldFile} f                             appendFile goldFile ("\nFINAL OUTPUT:\n" ++ show r ++ "\n")-          t2 p goldFile = do r <- satWith defaultSMTCfg{verbose=True, redirectVerbose = Just goldFile} (constArr2 p)-                             appendFile goldFile ("\nFINAL OUTPUT:\n" ++ show r ++ "\n")++        empty :: (SymVal a, SymVal b) => b -> SArray a b+        empty = listArray []++        write :: (SymVal a, SymVal b) => SArray a b -> [(a, b)] -> SArray a b+        write = foldr (\(k, v) a -> writeArray a (literal k) (literal v))  {- HLint ignore module "Reduce duplication" -}
SBVTestSuite/TestSuite/Arrays/Query.hs view
@@ -16,6 +16,7 @@  module TestSuite.Arrays.Query(tests) where +import Data.SBV.Rational import Data.SBV.Control  import Utils.SBVTestFramework@@ -24,20 +25,29 @@ tests :: TestTree tests =   testGroup "Arrays.Query"-    [ goldenCapturedIO "queryArrays1" $ t q1-    , goldenCapturedIO "queryArrays2" $ t q2-    , goldenCapturedIO "queryArrays3" $ t q3-    , goldenCapturedIO "queryArrays4" $ t q4-    , goldenCapturedIO "queryArrays5" $ t q5-    , goldenCapturedIO "queryArrays6" $ t q6-    , goldenCapturedIO "queryArrays7" $ t q7-    , goldenCapturedIO "queryArrays8" $ t q8+    [ goldenCapturedIO "queryArrays1"  $ t q1+    , goldenCapturedIO "queryArrays2"  $ t q2+    , goldenCapturedIO "queryArrays3"  $ t q3+    , goldenCapturedIO "queryArrays4"  $ t q4+    , goldenCapturedIO "queryArrays5"  $ t q5+    , goldenCapturedIO "queryArrays6"  $ t q6+    , goldenCapturedIO "queryArrays7"  $ t q7+    , goldenCapturedIO "queryArrays8"  $ t q8+    , goldenCapturedIO "queryArrays9"  $ t q9+    , goldenCapturedIO "queryArrays10" $ t q10+    , goldenCapturedIO "queryArrays11" $ t q11+    , goldenCapturedIO "queryArrays12" $ t q12+    , goldenCapturedIO "queryArrays13" $ t q13+    , goldenCapturedIO "queryArrays14" $ t q14+    , goldenCapturedIO "queryArrays15" $ t q15+    , goldenCapturedIO "queryArrays16" $ t q16+    , goldenCapturedIO "queryArrays17" $ t q17     ]     where t tc goldFile = do r <- runSMTWith defaultSMTCfg{verbose=True, redirectVerbose=Just goldFile} tc                              appendFile goldFile ("\n FINAL:" ++ show r ++ "\nDONE!\n")  q1 :: Symbolic (Word8, Word8, Int8)-q1 = do m  :: SArray Word8 Int8 <- newArray "a" Nothing+q1 = do m  :: SArray Word8 Int8 <- sArray "a"          a1 <- sWord8 "a1"         a2 <- sWord8 "a2"@@ -88,7 +98,7 @@                    return (iv, jv)  q5 :: Symbolic (Maybe (Word8, Int8))-q5 = do m  :: SArray Word8 Int8 <- newArray "a" Nothing+q5 = do m  :: SArray Word8 Int8 <- sArray "a"          a <- sWord8 "a"         v <- sInt8  "v"@@ -109,7 +119,7 @@                                   return $ Just (av, vv)  q6 :: Symbolic [Integer]-q6 = do (a :: SArray Integer Integer) <- newArray "a" Nothing+q6 = do (a :: SArray Integer Integer) <- sArray "a"          query $ loop (writeArray a 1 1) [] @@ -127,7 +137,7 @@   q7 :: Symbolic (CheckSatResult, CheckSatResult)-q7 = do x :: SArray Integer Integer <- newArray "x" Nothing+q7 = do x :: SArray Integer Integer <- sArray "x"         let y = writeArray x 0 1          query $ do constrain $ readArray y 0 .== 2@@ -141,7 +151,7 @@                    pure (r1, r2)  q8 :: Symbolic (CheckSatResult, CheckSatResult)-q8 = query $ do x :: SArray Integer Integer <- freshArray "x" Nothing+q8 = query $ do x :: SArray Integer Integer <- freshVar "x"                 let y = writeArray x 0 1                  constrain $ readArray y 0 .== 2@@ -154,4 +164,56 @@                  pure (r1, r2) -{- HLint ignore module "Reduce duplication" -}+q9 :: Symbolic CheckSatResult+q9 = do x :: SArray Char Integer <- sArray "x"++        query $ do constrain $ readArray x (literal 'a') .== 5+                   checkSat++q10 :: Symbolic CheckSatResult+q10 = do x :: SArray Integer Char <- sArray "x"++         query $ do constrain $ readArray x 5 .== literal 'a'+                    checkSat++q11 :: Symbolic CheckSatResult+q11 = do x :: SArray Char Char    <- sArray "x"++         query $ do constrain $ readArray x (literal 'a') .== literal 'b'+                    checkSat++q12 :: Symbolic CheckSatResult+q12 = do x :: SArray Rational Integer <- sArray "x"++         query $ do constrain $ readArray x (5 .% 3) .== 5+                    checkSat++q13 :: Symbolic CheckSatResult+q13 = do x :: SArray Integer Rational <- sArray "x"++         query $ do constrain $ readArray x 5 .== 5 .% 3+                    checkSat++q14 :: Symbolic CheckSatResult+q14 = do x :: SArray Rational Rational    <- sArray "x"++         query $ do constrain $ readArray x (5 .% 3) .== 9 .% 8+                    checkSat++q15 :: Symbolic CheckSatResult+q15 = do x :: SArray Rational Char <- sArray "x"++         query $ do constrain $ readArray x (5 .% 3) .== literal 'z'+                    checkSat++q16 :: Symbolic CheckSatResult+q16 = do x :: SArray Char Rational <- sArray "x"++         query $ do constrain $ readArray x (literal 'z') .== 5 .% 3+                    checkSat++q17 :: Symbolic CheckSatResult+q17 = do x :: SArray (Char, Rational) (Rational, Char) <- sArray "x"++         query $ do constrain $ readArray x (literal ('z', 5 % 3)) .== literal (5 % 3, 'z')+                    checkSat
SBVTestSuite/TestSuite/Basics/ArithNoSolver.hs view
@@ -462,7 +462,7 @@ genChars :: [TestTree] genChars = map mkTest $  [("ord",           show c, check SC.ord             cord            c) | c <- cs]                       ++ [("toLower",       show c, check SC.toLowerL1       C.toLower       c) | c <- cs]-                      ++ [("toUpper",       show c, check SC.toUpperL1       C.toUpper       c) | c <- cs, toUpperExceptions c]+                      ++ [("toUpper",       show c, check SC.toUpperL1       C.toUpper       c) | c <- cs]                       ++ [("digitToInt",    show c, check SC.digitToInt      dig2Int         c) | c <- cs, digitToIntRange c]                       ++ [("intToDigit",    show c, check SC.intToDigit      int2Dig         c) | c <- [0 .. 15]]                       ++ [("isControl",     show c, check SC.isControlL1     C.isControl     c) | c <- cs]@@ -485,8 +485,7 @@                       ++ [("isLatin1",      show c, check SC.isLatin1        C.isLatin1      c) | c <- cs]                       ++ [("isAsciiUpper",  show c, check SC.isAsciiUpper    C.isAsciiUpper  c) | c <- cs]                       ++ [("isAsciiLower",  show c, check SC.isAsciiLower    C.isAsciiLower  c) | c <- cs]-  where toUpperExceptions = (`notElem` "\181\255")-        digitToIntRange   = (`elem` "0123456789abcdefABCDEF")+  where digitToIntRange   = (`elem` "0123456789abcdefABCDEF")         cord :: Char -> Integer         cord = fromIntegral . C.ord         dig2Int :: Char -> Integer
SBVTestSuite/TestSuite/Basics/ArithSolver.hs view
@@ -35,6 +35,8 @@ import qualified Data.SBV.String as SS import qualified Data.SBV.List   as SL +import Data.SBV.Rational+ -- Test suite tests :: TestTree tests =@@ -82,6 +84,7 @@      ++ genChars      ++ genStrings      ++ genLists+     ++ misc      )  genExtends :: [TestTree]@@ -140,6 +143,8 @@                                    ++ [(show x, show y, mkThm2  x y (x `op` y)) |                             x <- i64s,      y <- i64s     ]                                    ++ [(show x, show y, mkThm2  x y (x `op` y)) |                             x <- iUBs,      y <- iUBs     ]                                    ++ [(show x, show y, mkThm2  x y (x `op` y)) |                             x <- reducedCS, y <- reducedCS]+                                   ++ [(show x, show y, mkThm2  x y (x `op` y)) |                             x <- fs,        y <- fs       ]+                                   ++ [(show x, show y, mkThm2  x y (x `op` y)) |                             x <- ds,        y <- ds       ]                                    ++ [(show x, show y, mkThm2  x y (x `op` y)) |                             x <- ss,        y <- ss       ]                                    ++ [(show x, show y, mkThm2L x y (x `op` y)) | nm `elem` allowedListComps, x <- sl,        y <- sl       ]                                    ++ [(show x, show y, mkThm2M x y (x `op` y)) |                             x <- sm,        y <- sm       ]@@ -575,32 +580,39 @@         noOverflow x y = not (x == minBound && y == -1)  genChars :: [TestTree]-genChars = map mkTest $  [("ord",           show c, mkThm SC.ord             cord            c) | c <- cs]-                      ++ [("toLower",       show c, mkThm SC.toLowerL1       C.toLower       c) | c <- cs]-                      ++ [("toUpper",       show c, mkThm SC.toUpperL1       C.toUpper       c) | c <- cs, toUpperExceptions c]-                      ++ [("digitToInt",    show c, mkThm SC.digitToInt      dig2Int         c) | c <- cs, digitToIntRange c]-                      ++ [("intToDigit",    show c, mkThm SC.intToDigit      int2Dig         c) | c <- [0 .. 15]]-                      ++ [("isControl",     show c, mkThm SC.isControlL1     C.isControl     c) | c <- cs]-                      ++ [("isSpace",       show c, mkThm SC.isSpaceL1       C.isSpace       c) | c <- cs]-                      ++ [("isLower",       show c, mkThm SC.isLowerL1       C.isLower       c) | c <- cs]-                      ++ [("isUpper",       show c, mkThm SC.isUpperL1       C.isUpper       c) | c <- cs]-                      ++ [("isAlpha",       show c, mkThm SC.isAlphaL1       C.isAlpha       c) | c <- cs]-                      ++ [("isAlphaNum",    show c, mkThm SC.isAlphaNumL1    C.isAlphaNum    c) | c <- cs]-                      ++ [("isPrint",       show c, mkThm SC.isPrintL1       C.isPrint       c) | c <- cs]-                      ++ [("isDigit",       show c, mkThm SC.isDigit         C.isDigit       c) | c <- cs]-                      ++ [("isOctDigit",    show c, mkThm SC.isOctDigit      C.isOctDigit    c) | c <- cs]-                      ++ [("isHexDigit",    show c, mkThm SC.isHexDigit      C.isHexDigit    c) | c <- cs]-                      ++ [("isLetter",      show c, mkThm SC.isLetterL1      C.isLetter      c) | c <- cs]-                      ++ [("isMark",        show c, mkThm SC.isMarkL1        C.isMark        c) | c <- cs]-                      ++ [("isNumber",      show c, mkThm SC.isNumberL1      C.isNumber      c) | c <- cs]-                      ++ [("isPunctuation", show c, mkThm SC.isPunctuationL1 C.isPunctuation c) | c <- cs]-                      ++ [("isSymbol",      show c, mkThm SC.isSymbolL1      C.isSymbol      c) | c <- cs]-                      ++ [("isSeparator",   show c, mkThm SC.isSeparatorL1   C.isSeparator   c) | c <- cs]-                      ++ [("isAscii",       show c, mkThm SC.isAscii         C.isAscii       c) | c <- cs]-                      ++ [("isLatin1",      show c, mkThm SC.isLatin1        C.isLatin1      c) | c <- cs]-                      ++ [("isAsciiUpper",  show c, mkThm SC.isAsciiUpper    C.isAsciiUpper  c) | c <- cs]-                      ++ [("isAsciiLower",  show c, mkThm SC.isAsciiLower    C.isAsciiLower  c) | c <- cs]-  where toUpperExceptions = (`notElem` "\181\255")+genChars = [ testCase "solver_genChars" (assert (isTheorem t)) ]+  where t = do a <- free "a"+               i <- free "i"++               let chk  sop cop v = (a .== literal v) .=> sop a .== literal (cop v)+                   chkI sop cop v = (i .== literal v) .=> sop i .== literal (cop v)++               pure $ sAnd $  [chk  SC.ord             cord            c | c <- cs]+                           ++ [chk  SC.toLowerL1       C.toLower       c | c <- cs]+                           ++ [chk  SC.toUpperL1       C.toUpper       c | c <- cs]+                           ++ [chk  SC.digitToInt      dig2Int         c | c <- cs, digitToIntRange c]+                           ++ [chkI SC.intToDigit      int2Dig         c | c <- [0 .. 15]]+                           ++ [chk  SC.isControlL1     C.isControl     c | c <- cs]+                           ++ [chk  SC.isSpaceL1       C.isSpace       c | c <- cs]+                           ++ [chk  SC.isLowerL1       C.isLower       c | c <- cs]+                           ++ [chk  SC.isUpperL1       C.isUpper       c | c <- cs]+                           ++ [chk  SC.isAlphaL1       C.isAlpha       c | c <- cs]+                           ++ [chk  SC.isAlphaNumL1    C.isAlphaNum    c | c <- cs]+                           ++ [chk  SC.isPrintL1       C.isPrint       c | c <- cs]+                           ++ [chk  SC.isDigit         C.isDigit       c | c <- cs]+                           ++ [chk  SC.isOctDigit      C.isOctDigit    c | c <- cs]+                           ++ [chk  SC.isHexDigit      C.isHexDigit    c | c <- cs]+                           ++ [chk  SC.isLetterL1      C.isLetter      c | c <- cs]+                           ++ [chk  SC.isMarkL1        C.isMark        c | c <- cs]+                           ++ [chk  SC.isNumberL1      C.isNumber      c | c <- cs]+                           ++ [chk  SC.isPunctuationL1 C.isPunctuation c | c <- cs]+                           ++ [chk  SC.isSymbolL1      C.isSymbol      c | c <- cs]+                           ++ [chk  SC.isSeparatorL1   C.isSeparator   c | c <- cs]+                           ++ [chk  SC.isAscii         C.isAscii       c | c <- cs]+                           ++ [chk  SC.isLatin1        C.isLatin1      c | c <- cs]+                           ++ [chk  SC.isAsciiUpper    C.isAsciiUpper  c | c <- cs]+                           ++ [chk  SC.isAsciiLower    C.isAsciiLower  c | c <- cs]+         digitToIntRange   = (`elem` "0123456789abcdefABCDEF")         cord :: Char -> Integer         cord = fromIntegral . C.ord@@ -608,10 +620,6 @@         dig2Int = fromIntegral . C.digitToInt         int2Dig :: Integer -> Char         int2Dig = C.intToDigit . fromIntegral-        mkTest (nm, x, t) = testCase ("genChars-" ++ nm ++ "." ++ x) (assert t)-        mkThm sop cop arg = isTheorem $ do a <- free "a"-                                           constrain $ a .== literal arg-                                           return $ literal (cop arg) .== sop a  genStrings :: [TestTree] genStrings = map mkTest1 (  [("length",        show s,                   mkThm1 SS.length        strLen        s      ) | s <- ss                                                       ]@@ -873,5 +881,12 @@  st :: [(Integer, Integer)] st = [(1, 2), (-1, -5), (0, 9), (5, 5)]++misc :: [TestTree]+misc = [ testCase "misc-t1" $ assertIsSat t1+       ]+ where -- https://stackoverflow.com/questions/69033969/trivial-rationals-problems-without-variables-in-sbv-solver-in-haskell+       t1 = do _xs <- sRationals []+               constrain $ (5.%1:: SRational) .<= (5.%1:: SRational)  {- HLint ignore module "Reduce duplication" -}
SBVTestSuite/TestSuite/Basics/BasicTests.hs view
@@ -17,7 +17,7 @@ module TestSuite.Basics.BasicTests(tests) where  import Data.SBV.Control-import Data.SBV.Internals hiding (free, output, newArray_)+import Data.SBV.Internals hiding (free, output) import Utils.SBVTestFramework  import Control.Monad       (void)@@ -132,7 +132,7 @@  nested4 :: SMTConfig -> IO Bool nested4 cfg = do-  d1 <- runSMT (newArray_ Nothing :: Symbolic (SArray Bool Bool))+  d1 <- runSMT (sArray_ :: Symbolic (SArray Bool Bool))    let sboolOfInterest = readArray d1 sTrue 
SBVTestSuite/TestSuite/Queries/ArrayGetVal.hs view
@@ -32,6 +32,6 @@                   appendFile rf ("\n FINAL:" ++ show r ++ "\nDONE!\n")  t1 :: Symbolic Integer-t1 = do a :: SArray Integer Integer <- newArray "a" Nothing+t1 = do a :: SArray Integer Integer <- sArray "a"         query $ do ensureSat                    getValue (readArray (writeArray a 1 2) 1)
SBVTestSuite/TestSuite/Queries/FreshVars.hs view
@@ -86,13 +86,14 @@                    constrain $ sNot $ vQuad `fpIsEqualObject` wQuad                    constrain $ fpIsPositive vQuad -                   vSArray  :: SArray    Integer Integer <- freshArray "vSArray" Nothing+                   vSArray  :: SArray    Integer Integer <- freshVar "vSArray"                    vi1                                   <- freshVar "i1"                    vi2                                   <- freshVar "i2"                    constrain $ readArray vSArray vi1 .== 2 -                   viSArray  :: SArray    Integer Integer <- freshArray "viSArray" (Just (literal 42))-                   mustBe42                               <- freshVar "mustBe42"+                   let viSArray  :: SArray Integer Integer+                       viSArray = lambdaArray (const 42)+                   mustBe42                              <- freshVar "mustBe42"                     constrain $ readArray viSArray 96     .== mustBe42                    constrain $ vi1 .== 1@@ -127,6 +128,7 @@                                vRealVal    <- getValue vReal                                vIntegerVal <- getValue vInteger                                vBinOpVal   <- getValue vBinOp+                               vSArrayVal  <- getValue vSArray                                vi1Val      <- getValue vi1                                vi2Val      <- getValue vi2                                mustBe42Val <- getValue mustBe42@@ -153,6 +155,7 @@                                            , vReal      |-> vRealVal                                            , vInteger   |-> vIntegerVal                                            , vBinOp     |-> vBinOpVal+                                           , vSArray    |-> vSArrayVal                                            , vi1        |-> vi1Val                                            , vi2        |-> vi2Val                                            , mustBe42   |-> mustBe42Val
SBVTestSuite/TestSuite/Uninterpreted/AUF.hs view
@@ -21,6 +21,6 @@ tests :: TestTree tests =   testGroup "Uninterpreted.AUF"-    [ goldenVsStringShow "auf-1" $ runSAT      $ newArray "a" Nothing >>= \a -> free "x" >>= \x -> free "y" >>= \y -> pure (thm x y (a :: SArray     Word32 Word32))-    , testCase "tc_auf-0"        $ assertIsThm $ newArray "a" Nothing >>= \a -> free "x" >>= \x -> free "y" >>= \y -> return (thm x y (a :: SArray     Word32 Word32))+    [ goldenVsStringShow "auf-1" $ runSAT      $ free "a" >>= \a -> free "x" >>= \x -> free "y" >>= \y -> pure (thm x y (a :: SArray Word32 Word32))+    , testCase "tc_auf-0"        $ assertIsThm $ free "a" >>= \a -> free "x" >>= \x -> free "y" >>= \y -> pure (thm x y (a :: SArray Word32 Word32))     ]
sbv.cabal view
@@ -1,7 +1,7 @@ Cabal-Version: 2.2  Name        : sbv-Version     : 10.12+Version     : 11.0 Category    : Formal Methods, Theorem Provers, Bit vectors, Symbolic Computation, Math, SMT Synopsis    : SMT Based Verification: Symbolic Haskell theorem prover using SMT solving. Description : Express properties about Haskell programs and automatically prove them using SMT@@ -28,7 +28,7 @@ common common-settings    default-language: Haskell2010    ghc-options     : -Wall-   build-depends   : base >= 4.16 && < 5+   build-depends   : base >= 4.19 && < 5    other-extensions: BangPatterns                      CPP                      ConstrainedClassMethods@@ -40,6 +40,7 @@                      DeriveFunctor                      DeriveGeneric                      DeriveTraversable+                     DerivingStrategies                      ExistentialQuantification                      FlexibleContexts                      FlexibleInstances@@ -71,9 +72,13 @@                      TypeApplications                      TypeFamilies                      TypeOperators+                     TypeSynonymInstances                      UndecidableInstances                      ViewPatterns +   if impl(ghc >= 9.8.1)+      other-extensions: TypeAbstractions+    if impl(ghc >= 8.10.1)       ghc-options  : -Wunused-packages @@ -119,6 +124,7 @@                   , Data.SBV.Tools.BoundedFix                   , Data.SBV.Tools.CodeGen                   , Data.SBV.Tools.GenTest+                  , Data.SBV.Tools.KnuckleDragger                   , Data.SBV.Tools.NaturalInduction                   , Data.SBV.Tools.Overflow                   , Data.SBV.Tools.Polynomial@@ -148,6 +154,15 @@                   , Documentation.SBV.Examples.Lists.Fibonacci                   , Documentation.SBV.Examples.Lists.BoundedMutex                   , Documentation.SBV.Examples.Lists.CountOutAndTransfer+                  , Documentation.SBV.Examples.KnuckleDragger.AppendRev+                  , Documentation.SBV.Examples.KnuckleDragger.Basics+                  , Documentation.SBV.Examples.KnuckleDragger.CaseSplit+                  , Documentation.SBV.Examples.KnuckleDragger.Kleene+                  , Documentation.SBV.Examples.KnuckleDragger.Induction+                  , Documentation.SBV.Examples.KnuckleDragger.ListLen+                  , Documentation.SBV.Examples.KnuckleDragger.RevLen+                  , Documentation.SBV.Examples.KnuckleDragger.Sqrt2IsIrrational+                  , Documentation.SBV.Examples.KnuckleDragger.Tao                   , Documentation.SBV.Examples.Misc.Definitions                   , Documentation.SBV.Examples.Misc.Enumerate                   , Documentation.SBV.Examples.Misc.FirstOrderLogic@@ -185,6 +200,7 @@                   , Documentation.SBV.Examples.Puzzles.Birthday                   , Documentation.SBV.Examples.Puzzles.Coins                   , Documentation.SBV.Examples.Puzzles.Counts+                  , Documentation.SBV.Examples.Puzzles.DieHard                   , Documentation.SBV.Examples.Puzzles.DogCatMouse                   , Documentation.SBV.Examples.Puzzles.Drinker                   , Documentation.SBV.Examples.Puzzles.Euler185@@ -258,6 +274,8 @@                   , Data.SBV.Provers.OpenSMT                   , Data.SBV.Provers.Yices                   , Data.SBV.Provers.Z3+                  , Data.SBV.Tools.KDKernel+                  , Data.SBV.Tools.KDUtils                   , Data.SBV.Utils.CrackNum                   , Data.SBV.Utils.ExtractIO                   , Data.SBV.Utils.Numeric