packages feed

sbv 9.2 → 10.0

raw patch · 557 files changed

+18115/−8588 lines, 557 filesdep −hlintdep ~basedep ~mtl

Dependencies removed: hlint

Dependency ranges changed: base, mtl

Files

CHANGES.md view
@@ -1,8 +1,111 @@ * Hackage: <http://hackage.haskell.org/package/sbv> * GitHub:  <http://leventerkok.github.io/sbv/> -* Latest Hackage released version: 9.2, 2023-01-16+* Latest Hackage released version: 10.0, 2023-04-14 +### Version 10.0, 2023-04-14++  * [BACKWARDS COMPATIBILITY] SBV now handles quantifiers in a much more disciplined way. All of the previous+    ways of creating quantified variables (i.e., the functions sbvForall, sbvExists, universal, existential) are+    removed. Instead, we can now express quantifiers in a much straightforward way, by passing them to+    'constrain' directly. A simple example is:++        constrain $ \(Forall x) (Exists y) -> y .> (x :: SInteger)++    You can nest quantifiers as you wish, and the quantified parameters can be of arbitrary symbolic type.+    Additionally, you can convert such a quantified formula to a regular boolean, via a call to 'quantifiedBool'+    function, essentially performing quantifier elimination:++        other_condition .&& quantifiedBool (\(Forall x) (Exists y) -> y .> (x :: SInteger))++    Or you can prove/sat quantified formulas directly:++        prove $ \(Forall x) (Exists y) -> y .> (x :: SInteger)++    This facility makes quantifiers part of the regular SBV language, allowing them to be mixed/matched with all+    your other symbolic computations.++    SBV also supports the constructors ExistsUnique to create unique existentials, in addition to+    ForallN and ExistsN for creating multiple variables at the same time.++    The new function skolemize can be used to skolemize quantified formulas: The skolemized version of a+    formula has no existential (replaced by uninterpeted functions), and is equisatisfiable to the original.++    See the following files demonstrating reasoning with quantifiers:+    +       * Documentation/SBV/Examples/Puzzles/Birthday.hs+       * Documentation/SBV/Examples/Puzzles/KnightsAndKnaves.hs+       * Documentation/SBV/Examples/Puzzles/Rabbits.hs+       * Documentation/SBV/Examples/Misc/FirstOrderLogic.hs++  * You can now define new functions in the generated SMTLib output, via an smtFunction call. Typically, we simply+    unroll all definitions, but there are certain cases where we would like the functions+    remain intact in the output. This is especially true of recursive functions, where the termination would+    depend on a symbolic variable, which cannot be symbolically-simulated. By translating these to SMTLib+    functions, we can now handle such definitions. Note that such definitions will no longer be constant-folded+    on the Haskell side, and each call will induce a call in the solver instead. The new method smtFunction+    can handle both recursive and non-recursive functions. See "Documentation/SBV/Examples/Misc/Definitions.hs"+    for examples.++  * Added new SList functions: map, mapi, foldl, foldr, foldli, foldri, zip, zipWith, filter, all, any.+    Note that these work on arbitrary--but finite--length lists, with all terminating elements, per+    usual SBV interpretation. These functions map to the underlying solver's fold and map functions,+    via lambda-abtractions. Note that the SMT engines remain incomplete with respect to sequence+    theories. (That is, any property that requires induction for its proof will cause unknown+    answers, or will not terminate.) However, basic properties, especially when the solver can determine the+    shape of the sequence arguments (i.e., number of elements), should go through.++  * New function 'lambdaAsArray' allows creation of array values out of lambda-expressions. See+    "Documentation/SBV/Examples/Misc/LambdaArray.hs" for an example use. This adds expressive power,+    as we can now specify arrays with index dependent contents much more easily.++  * Added support for abduct-generation, as supported by CVC5. See "Documentation/SBV/Examples/Queries/Abducts.hs"+    for a basic example.++  * Added support for special-relations. You can now check if a relation is partial, linear, tree,+    or piecewise-linear orders in SBV. (Or you can constrain relations to satisfy the corresponding laws, thus+    creating relations with these properties.) Additionally, you can create transitive-closures of relations.+    See Documentation/SBV/Examples/Misc/FirstOrderLogic.hs for several examples.++  * [BACKWARDS COMPATIBILITY] The signature of Data.SBV.List's concat has changed. In previous releases+    this was a synonym for appending two lists, now it takes a list-of-lists and flattens it, matching the+    Haskell list function with the same name.++  * [BACKWARDS COMPATIBILITY] The function addAxiom is removed. Instead use quantified-constraints, as described+    above.++  * [BACKWARDS COMPATIBILITY] Renamed the Uninterpreted class to SMTDefinable, since its task has changed, handling+    both kinds of definitions. Unless you were referring to the name Uninterpreted in your code, this should not+    impact you. Otherwise, simply rename it to SMTDefinable.++  * [BACKWARDS COMPATIBILITY] The configuration variable 'allowQuantifiedQueries' is removed. It is no+    longer relevant with our new quantification strategy described above.++  * [BACKWARDS COMPATIBILITY] The function 'isVacuous' is renamed to 'isVacuousProof' (and 'isVacuousWith'+    became 'isVacuousProofWith') to better reflect this function applies to checking vacuity in a proof context.++  * [BACKWARDS COMPATIBILITY] Satisfiability and proof checks are now put in different classes, instead of sharing+    the same class. This should not have any impact on user-level code, unless you were building libraries+    on top of SBV. See the 'ProvableM' and 'SatisfiableM' classes.++  * [BACKWARDS COMPATIBILITY] Renamed 'Goal' to 'ConstraintSet' which is more indicative of its purpose. A set+    of constraints can be satisfied, but proving them does not make sense. The name goal, however, suggested+    something we can prove.++  * [BACKWARDS COMPATIBILITY] SBV is now more lenient in returning function-interpretations, returning the SMTLib+    string in complicated cases in case of bailing out. Note that we still don't support complicated function+    values in allSat calls, as there's no way to reject existing interpretations. Consequently, the+    parameter 'satTrackUFs' is renamed to 'allSatTrackUFs' to better capture its new role.++  * Addressed an issue on Windows where solver synchronization fails due to unmapped diagnostic-challenge.+    (See issue #644 for details.) Thanks to Ryan Scott for reporting and helping with debugging.++  * Add missing Arbitrary instances for WordN and IntN types, enabling quickcheck on these types.++  * Rewrote some of the older examples to use more modern SBV idioms.++  * Changes needed to compile with upcoming GHC 9.6. Thanks to Lars Kuhtz and Ryan Scott for several patches.+ ### Version 9.2, 2023-1-16    * Handle uninterpreted sorts better, avoiding kind-registration issue.@@ -71,7 +174,7 @@   * SBV now supports cvc5; the latest incarnation of CVC. See https://github.com/cvc5/cvc5     for details. -  * SBV now supports bitwuzla; the latest incarnation of Boolector. See https://github.com/bitwuzla/bitwuzla+  * SBV now supports bitwuzla; the latest incarnation of Boolector. See https://bitwuzla.github.io     for details.    * Fixed handling of CRational values in constant folding, which was missing a case.@@ -294,7 +397,7 @@     need its functionality back.    * Reworked SBVBenchSuite api, Phase 1 of BenchSuite completed.-  +   * Add support for addAxiom command to work in the interactive mode.     Thanks to Martin Lundfall for the feedback. @@ -2129,7 +2232,7 @@ ### Version 2.10, 2013-03-22   * Add support for the Boolector SMT solver-    * See: http://fmv.jku.at/boolector/+    * See: https://boolector.github.io     * Use `import Data.SBV.Bridge.Boolector` to use Boolector from SBV     * Boolector supports QF_BV (with an without arrays). In the last       SMT-Lib competition it won both bit-vector categories. It is definitely
Data/SBV.hs view
@@ -21,13 +21,14 @@ -- Falsifiable. Counter-example: --   s0 = 64 :: Word8 ----- The function 'prove' has the following type:+-- And similarly, 'sat' finds a satisfying instance. The types involved are: -- -- @ --     'prove' :: 'Provable' a => a -> 'IO' 'ThmResult'+--     'sat'   :: 'Data.SBV.Provers.Satisfiable' a => a -> 'IO' 'SatResult' -- @ ----- The class 'Provable' comes with instances for n-ary predicates, for arbitrary n.+-- The classes 'Provable' and 'Data.SBV.Provers.Satisfiable' come with instances for n-ary predicates, for arbitrary n. -- The predicates are just regular Haskell functions over symbolic types listed below. -- Functions for checking satisfiability ('sat' and 'allSat') are also -- provided.@@ -78,6 +79,12 @@ -- --   * Uninterpreted sorts, and proofs over such sorts, potentially with axioms. --+--   * Ability to define SMTLib functions, generated directly from Haskell versions,+--     including support for recursive and mutually recursive functions.+--+--   * Express quantified formulas (both universals and existentials, including+--     alternating quantifiers), covering first-order logic.+-- --   * Model validation: SBV can validate models returned by solvers, which allows --     for protection against bugs in SMT solvers and SBV itself. (See the 'validateModel' --     parameter.)@@ -115,8 +122,8 @@ -- --   * CVC4, and CVC5 from Stanford University and the University of Iowa. <https://cvc4.github.io/> and <https://cvc5.github.io> -----   * Boolector from Johannes Kepler University: <http://fmv.jku.at/boolector/> and its successor Bitwuzla from Stanford---     university: <https://github.com/bitwuzla/bitwuzla>+--   * Boolector from Johannes Kepler University: <https://boolector.github.io> and its successor Bitwuzla from Stanford+--     university: <https://bitwuzla.github.io> -- --   * MathSAT from Fondazione Bruno Kessler and DISI-University of Trento: <http://mathsat.fbk.eu/> --@@ -137,6 +144,7 @@ -----------------------------------------------------------------------------  {-# LANGUAGE DataKinds            #-}+{-# LANGUAGE FlexibleContexts     #-} {-# LANGUAGE FlexibleInstances    #-} {-# LANGUAGE ScopedTypeVariables  #-} {-# LANGUAGE TypeApplications     #-}@@ -194,7 +202,7 @@   -- ** Sets   , RCSet(..), SSet   -- * Arrays of symbolic values-  , SymArray(readArray, writeArray, mergeArrays, sListArray), newArray_, newArray, SArray+  , SymArray(readArray, writeArray, mergeArrays, sListArray), newArray_, newArray, SArray, lambdaAsArray    -- * Creating symbolic values   -- ** Single value@@ -292,36 +300,44 @@   -- $enumerations   , mkSymbolicEnumeration -  -- * Uninterpreted sorts, axioms, constants, and functions+  -- * Uninterpreted sorts, constants, and functions   -- $uninterpreted-  , mkUninterpretedSort, Uninterpreted(..), addAxiom+  , mkUninterpretedSort -  -- * Adding SMT functions-  , addSMTDefinition+  -- * Stopping unrolling: Defined functions+  , SMTDefinable(..) +  -- * Special relations+  -- $specialRels+  , Relation, isPartialOrder, isLinearOrder, isTreeOrder, isPiecewiseLinearOrder, mkTransitiveClosure+   -- * Properties, proofs, and satisfiability   -- $proveIntro-  -- $noteOnNestedQuantifiers   -- $multiIntro-  , Predicate, Goal-  , Provable, universal_, universal, existential_, existential+  , Predicate, ConstraintSet, Provable, Satisfiable   , prove, proveWith   , dprove, dproveWith   , sat, satWith   , dsat, dsatWith   , allSat, allSatWith-  , optimize, optimizeWith, isVacuous-  , isVacuousWith, isTheorem, isTheoremWith, isSatisfiable, isSatisfiableWith-  , proveWithAll, proveWithAny, satWithAll-  , proveConcurrentWithAny, proveConcurrentWithAll, satConcurrentWithAny, satConcurrentWithAll-  , satWithAny, generateSMTBenchmark+  , optimize, optimizeWith+  , isVacuousProof, isVacuousProofWith+  , isTheorem, isTheoremWith, isSatisfiable, isSatisfiableWith+  , proveWithAny, proveWithAll, proveConcurrentWithAny, proveConcurrentWithAll+  , satWithAny,   satWithAll,   satConcurrentWithAny,   satConcurrentWithAll+  , generateSMTBenchmarkSat, generateSMTBenchmarkProof   , solve-  -- * Constraints++  -- * Constraints and Quantifiers   -- $constrainIntro   -- ** General constraints   -- $generalConstraints   , constrain, softConstrain +  -- ** Quantified constraints, quantifier elimination, and skolemization+  -- $quantifiers+  , QuantifiedBool, quantifiedBool, Forall(..), Exists(..), ExistsUnique(..), ForallN(..), ExistsN(..), QNot(..), Skolemize(..)+   -- ** Constraint Vacuity   -- $constraintVacuity @@ -338,7 +354,7 @@    -- * Checking safety   -- $safeIntro-  , sAssert, isSafe, SExecutable, sName_, sName, safe, safeWith+  , sAssert, isSafe, SExecutable, sName, safe, safeWith    -- * Quick-checking   , sbvQuickCheck@@ -390,8 +406,7 @@    -- * Abstract SBV type   , SBV, HasKind(..), Kind(..)-  , SymVal, sbvForall, sbvForall_, mkForallVars, sbvExists, sbvExists_, mkExistVars, free-  , free_, mkFreeVars, symbolic, symbolics, literal, unliteral, fromCV+  , SymVal, free, free_, mkFreeVars, symbolic, symbolics, literal, unliteral, fromCV   , isConcrete, isSymbolic, isConcretely, mkSymVal   , MonadSymbolic(..), Symbolic, SymbolicT, label, output, runSMT, runSMTWith @@ -404,14 +419,13 @@   , module Data.Ratio   ) where +import Control.Monad (when)+ import Data.SBV.Core.AlgReals-import Data.SBV.Core.Data       hiding (sbvForall, sbvForall_,-                                        mkForallVars, sbvExists, sbvExists_,-                                        mkExistVars, free, free_, mkFreeVars,+import Data.SBV.Core.Data       hiding (free, free_, mkFreeVars,                                         output, symbolic, symbolics, mkSymVal,                                         newArray, newArray_) import Data.SBV.Core.Model      hiding (assertWithPenalty, minimize, maximize,-                                        sbvForall, sbvForall_, sbvExists, sbvExists_,                                         solve, sBool, sBool_, sBools, sChar, sChar_, sChars,                                         sDouble, sDouble_, sDoubles, sFloat, sFloat_, sFloats,                                         sFloatingPoint, sFloatingPoint_, sFloatingPoints,@@ -437,17 +451,21 @@ import Data.SBV.Core.SizedFloats  import Data.SBV.Core.Floating-import Data.SBV.Core.Symbolic   (MonadSymbolic(..), SymbolicT)+import Data.SBV.Core.Symbolic   ( MonadSymbolic(..), SymbolicT, registerKind+                                , ProgInfo(..), rProgInfo, SpecialRelOp(..), UICodeKind(UINone)+                                , getRootState+                                ) -import Data.SBV.Provers.Prover hiding (universal_, universal, existential_, existential,-                                       prove, proveWith, sat, satWith, allSat,+import Data.SBV.Provers.Prover hiding (prove, proveWith, sat, satWith, allSat,                                        dsat, dsatWith, dprove, dproveWith,                                        allSatWith, optimize, optimizeWith,-                                       isVacuous, isVacuousWith, isTheorem,-                                       isTheoremWith, isSatisfiable,+                                       isVacuousProof, isVacuousProofWith,+                                       isTheorem, isTheoremWith, isSatisfiable,                                        isSatisfiableWith, runSMT, runSMTWith,-                                       sName_, sName, safe, safeWith)+                                       sName, safe, safeWith) +import Data.IORef (modifyIORef', readIORef)+ import Data.SBV.Client import Data.SBV.Client.BaseIO @@ -464,10 +482,12 @@ import qualified Data.SBV.Utils.CrackNum as CN  import Data.Proxy (Proxy(..))-import GHC.TypeLits+import GHC.TypeLits (KnownNat, type (<=), type (+), type (-)) -import Prelude hiding((+), (-), (*)) -- to avoid the haddock ambiguity+import Prelude hiding((+), (-)) -- to avoid the haddock ambiguity +import Data.Char (isSpace, isPunctuation)+ --- $setup --- >>> -- For doctest purposes only: --- >>> :set -XDataKinds@@ -800,8 +820,8 @@ example:  @-   do x <- 'sbvExists' \"x\"-      y <- 'sbvExists' \"y\"+   do x <- 'free' \"x\"+      y <- 'free' \"y\"       'constrain' $ x .> y       'constrain' $ x + y .>= 12       'constrain' $ y .>= 3@@ -839,7 +859,7 @@  {- $generalConstraints A good use case (in fact the motivating use case) for 'constrain' is attaching a-constraint to a universally or existentially quantified variable at the time of its creation.+constraint to a variable at the time of its creation. Also, the conjunctive semantics for 'sat' and the implicative semantics for 'prove' simplify programming by choosing the correct interpretation automatically. However, one should be aware of the semantic difference. For instance, in@@ -847,7 +867,7 @@ /satisfiable/. To wit, consider:   @-    do x <- 'sbvExists' \"x\"+    do x <- 'free' \"x\"        'constrain' $ x .< x        return $ x .< (x :: 'SWord8')  @@@ -855,17 +875,68 @@ This predicate is unsatisfiable since no element of 'SWord8' is less than itself. But it's (vacuously) true, since it excludes the entire domain of values, thus making the proof trivial. Hence, this predicate is provable, but is not satisfiable. To make sure the given-constraints are not vacuous, the functions 'isVacuous' (and 'isVacuousWith') can be used.+constraints are not vacuous, the functions 'isVacuousProof' (and 'isVacuousProofWith') can be used.  Also note that this semantics imply that test case generation ('Data.SBV.Tools.GenTest.genTest') and quick-check can take arbitrarily long in the presence of constraints, if the random input values generated rarely satisfy the constraints. (As an extreme case, consider @'constrain' 'sFalse'@.) -} +{- $quantifiers+You can write quantified formulas, and reason with them as in first-order logic. Here is a simple example is:++@+    constrain $ \\(Forall x) (Exists y) -> y .> (x :: SInteger)+@++You can nest quantifiers as you wish, and the quantified parameters can be of arbitrary symbolic type.+Additionally, you can convert such a quantified formula to a regular boolean, via a call to 'quantifiedBool'+function, essentially performing quantifier elimination:++@+    other_condition .&& quantifiedBool (\\(Forall x) (Exists y) -> y .> (x :: SInteger))+@++Or you can prove/sat quantified formulas directly:++@+    prove $ \\(Forall x) (Exists y) -> y .> (x :: SInteger)+@++This facility makes quantifiers part of the regular SBV language, allowing them to be mixed/matched with all+your other symbolic computations.  See the following files demonstrating reasoning with quantifiers:++   * "Documentation.SBV.Examples.Puzzles.Birthday"+   * "Documentation.SBV.Examples.Puzzles.KnightsAndKnaves"+   * "Documentation.SBV.Examples.Puzzles.Rabbits"+   * "Documentation.SBV.Examples.Misc.FirstOrderLogic"++SBV also supports the constructors 'ExistsUnique' to create unique existentials, in addition to+'ForallN' and 'ExistsN' for creating multiple variables at the same time.++In general, SBV will not display the values of quantified variables for a satisfying instance.+For a satisfiability problem, you can apply skolemization manually to have these values+computed by the backend solver. Note that skolemization will produce functions for+existentials under universals, and SBV generally cannot translate function values back+to Haskell, except in certain simple cases. However, for prefix existentials, the manual+transformation can pay off. As an example, compare:++>>> sat $ \(Exists x) (Forall y) -> x .<= (y :: SWord8)+Satisfiable++to:++>>> sat $ do { x <- free "x"; pure (quantifiedBool (\(Forall y) -> x .<= (y :: SWord8))) }+Satisfiable. Model:+  x = 0 :: Word8++where we have skolemized the top-level existential out, and received a witness value for it.+-}+ {- $constraintVacuity  When adding constraints, one has to be careful about-making sure they are not inconsistent. The function 'isVacuous' can be use for this purpose.+making sure they are not inconsistent. The function 'isVacuousProof' can be used for this purpose. Here is an example. Consider the following predicate:      >>> let pred = do { x <- free "x"; constrain $ x .< x; return $ x .>= (5 :: SWord8) }@@ -877,9 +948,9 @@     >>> prove pred     Q.E.D. -We can use 'isVacuous' to make sure to see that the pass was vacuous:+We can use 'isVacuousProof' to make sure to see that the pass was vacuous: -    >>> isVacuous pred+    >>> isVacuousProof pred     True  While the above example is trivial, things can get complicated if there are multiple constraints with@@ -895,7 +966,7 @@  And the proof is not vacuous: -     >>> isVacuous pred'+     >>> isVacuousProof pred'      False -} @@ -935,7 +1006,7 @@   Uninterpreted functions over both uninterpreted and regular sorts can be declared using the facilities introduced by-the 'Data.SBV.Core.Model.Uninterpreted' class.+the 'Data.SBV.Core.Model.SMTDefinable' class. -}  {- $enumerations@@ -989,21 +1060,6 @@ See "Documentation.SBV.Examples.Misc.Enumerate" for an extended example on how to use symbolic enumerations. -} -{- $noteOnNestedQuantifiers-=== A note on reasoning in the presence of quantifiers #noteOnNested#--Note that SBV allows reasoning with quantifiers: Inputs can be existentially or universally quantified. Predicates can be built-with arbitrary nesting of such quantifiers as well. However, SBV always /assumes/ that the input is in-prenex-normal form: <http://en.wikipedia.org/wiki/Prenex_normal_form>. That is,-all the input declarations are treated as happening at the beginning of a predicate, followed by the actual formula. Unfortunately,-the way predicates are written can be misleading at times, since symbolic inputs can be created at arbitrary points; interleaving them-with other code. The rule is simple, however: All inputs are assumed at the top, in the order declared, regardless of their quantifiers.-SBV will apply skolemization to get rid of existentials before sending predicates to backend solvers. However, if you do want nested-quantification, you will manually have to first convert to prenex-normal form (which produces an equisatisfiable but not necessarily-equivalent formula), and code that explicitly in SBV. See [Issue 256](http://github.com/LeventErkok/sbv/issues/256) and [Issue 623](https://github.com/LeventErkok/sbv/issues/623) for a detailed discussion-of this issue.--}- {- $cardIntro A pseudo-boolean function (<http://en.wikipedia.org/wiki/Pseudo-Boolean_function>) is a function from booleans to reals, basically treating 'True' as @1@ and 'False' as @0@. They@@ -1147,15 +1203,15 @@ Q.E.D. >>> prove $ roundTrip @Int32 Falsifiable. Counter-example:-  s0 = RoundTowardPositive :: RoundingMode-  s1 =          1073741810 :: Int32+  s0 = RoundNearestTiesToAway :: RoundingMode+  s1 =             -740395022 :: Int32  Note how we get a failure on `Int32`. The counter-example value is not representable exactly as a single precision float: ->>> toRational (1073741810 :: Float)-1073741824 % 1+>>> toRational (-740395022 :: Float)+(-740395008) % 1 -Note how the numerator is different, it is off by 4. This is hardly surprising, since floats become sparser as+Note how the numerator is different, it is off by 14. This is hardly surprising, since floats become sparser as the magnitude increases to be able to cover all the integer values representable.  >>> :{@@ -1177,16 +1233,16 @@ Q.E.D. >>> prove $ roundTrip @Int64 Falsifiable. Counter-example:-  s0 = RoundNearestTiesToEven :: RoundingMode-  s1 =      55662890612200361 :: Int64+  s0 = RoundTowardPositive :: RoundingMode+  s1 = 1152921504606846896 :: Int64  Just like in the `SFloat` case, once we reach 64-bits, we no longer can exactly represent the integer value for all possible values: ->>> toRational (fromIntegral (55662890612200361 :: Int64) :: Double)-55662890612200360 % 1+>>> toRational (fromIntegral (1152921504606846896 :: Int64) :: Double)+1152921504606846848 % 1 -In this case the numerator is off by 1.+In this case the numerator is off by 48. -}  -- | An implementation of rotate-left, using a barrel shifter like design. Only works when both@@ -1464,5 +1520,97 @@      | True      = error $ "fromBytes:SWord 1024: Incorrect number of bytes: " ++ show l      where l = length as++{- $specialRels+A special relation is a binary relation that has additional properties. SBV allows for the checking of various kinds+of special relations respecting various axioms, and allows for creating transitive closures.+See "Documentation.SBV.Examples.Misc.FirstOrderLogic" for several examples.+-}++-- | A type synonym for binary relations.+type Relation a = (SBV a, SBV a) -> SBool++-- | Check if a relation is a partial order. The string argument must uniquely identify this order.+isPartialOrder :: SymVal a => String -> Relation a -> SBool+isPartialOrder = checkSpecialRelation . IsPartialOrder++-- | Check if a relation is a linear order. The string argument must uniquely identify this order.+isLinearOrder :: SymVal a => String -> Relation a -> SBool+isLinearOrder = checkSpecialRelation . IsLinearOrder++-- | Check if a relation is a tree order. The string argument must uniquely identify this order.+isTreeOrder :: SymVal a => String -> Relation a -> SBool+isTreeOrder = checkSpecialRelation . IsTreeOrder++-- | Check if a relation is a piece-wise linear order. The string argument must uniquely identify this order.+isPiecewiseLinearOrder :: SymVal a => String -> Relation a -> SBool+isPiecewiseLinearOrder = checkSpecialRelation . IsPiecewiseLinearOrder++-- | Make sure it's internally acceptable+sanitizeRelName :: String -> String+sanitizeRelName s = "__internal_sbv_" ++ map sanitize s+  where sanitize c | isSpace c || isPunctuation c = '_'+                               | True             = c++-- | Create the transitive closure of a given relation. The string argument must uniquely identify the newly created relation.+mkTransitiveClosure :: forall a. SymVal a => String -> Relation a -> Relation a+mkTransitiveClosure nm rel = res+  where ka = kindOf (Proxy @a)++        -- The internal name of this relation+        inm = sanitizeRelName $ "_TransitiveClosure_" ++ nm ++ "_"+        key = (inm, nm)++        res (a, b) = SBV $ SVal KBool $ Right $ cache result+          where result st = do -- Is this new? If so create it, otherwise reuse+                               ProgInfo{progTransClosures = curProgTransClosures} <- readIORef (rProgInfo st)++                               when (key `notElem` curProgTransClosures) $ do++                                  registerKind st ka++                                  -- Add to the end so if we get incremental ones the order doesn't change for old ones!+                                  modifyIORef' (rProgInfo st) (\u -> u{progTransClosures = curProgTransClosures ++ [key]})++                                  -- Equate it to the relation we are given. We want to do this in the root state+                                  let SBV eq = quantifiedBool $ \(Forall x) (Forall y) -> rel (x, y) .== uninterpret inm x y+                                  internalConstraint (getRootState st) False [] eq++                               sa <- sbvToSV st a+                               sb <- sbvToSV st b++                               newExpr st KBool $ SBVApp (Uninterpreted nm) [sa, sb]++-- | Check if the given relation satisfies the required axioms+checkSpecialRelation :: forall a. SymVal a => SpecialRelOp -> Relation a -> SBool+checkSpecialRelation op rel = SBV $ SVal KBool $ Right $ cache result+  where ka = kindOf (Proxy @a)++        internalize nm = case op of+                           IsPartialOrder         _ -> IsPartialOrder         nm+                           IsLinearOrder          _ -> IsLinearOrder          nm+                           IsTreeOrder            _ -> IsTreeOrder            nm+                           IsPiecewiseLinearOrder _ -> IsPiecewiseLinearOrder nm++        result st = do -- The internal name of this relation+                       let nm  = sanitizeRelName (show op)+                           iop = internalize nm++                       -- Is this new? If so create it, otherwise reuse+                       ProgInfo{progSpecialRels = curSpecialRels} <- readIORef (rProgInfo st)++                       when (op `notElem` curSpecialRels) $ do++                          registerKind st ka+                          newUninterpreted st (nm, Nothing) (SBVType [ka, ka, KBool]) UINone++                          -- Add to the end so if we get incremental ones the order doesn't change for old ones!+                          modifyIORef' (rProgInfo st) (\u -> u{progSpecialRels = curSpecialRels ++ [iop]})++                          -- Equate it to the relation we are given. We want to do this in the parent state+                          let SBV eq = quantifiedBool $ \(Forall x) (Forall y) -> rel (x, y) .== uninterpret nm x y+                          internalConstraint (getRootState st) False [] eq++                       newExpr st KBool $ SBVApp (SpecialRelOp ka iop) []  {-# ANN module ("HLint: ignore Use import/export shortcut" :: String) #-}
Data/SBV/Client.hs view
@@ -37,7 +37,7 @@ #endif  import Data.SBV.Core.Data-import Data.SBV.Core.Model+import Data.SBV.Core.Model () -- instances only import Data.SBV.Provers.Prover  -- | Check whether the given solver is installed and is ready to go. This call does a
Data/SBV/Client/BaseIO.hs view
@@ -35,11 +35,11 @@ import Data.SBV.Core.Symbolic  (Objective, OptimizeStyle, Result, VarContext,                                 Symbolic, SBVRunMode, SMTConfig, SVal) import Data.SBV.Control.Types  (SMTOption)-import Data.SBV.Provers.Prover (Provable, SExecutable, ThmResult)+import Data.SBV.Provers.Prover (Provable, Satisfiable, SExecutable, ThmResult) import Data.SBV.SMT.SMT        (AllSatResult, SafeResult, SatResult,                                 OptimizeResult) -import GHC.TypeLits+import GHC.TypeLits (KnownNat, TypeError, ErrorMessage(..)) import Data.Kind  import Data.Int@@ -51,67 +51,6 @@ import qualified Data.SBV.Core.Symbolic  as Trans import qualified Data.SBV.Provers.Prover as Trans --- Data.SBV.Provers.Prover:---- | Turns a value into a universally quantified predicate, internally naming the inputs.--- In this case the sbv library will use names of the form @s1, s2@, etc. to name these variables--- Example:------ >  universal_ $ \(x::SWord8) y -> x `shiftL` 2 .== y------ is a predicate with two arguments, captured using an ordinary Haskell function. Internally,--- @x@ will be named @s0@ and @y@ will be named @s1@.------ Remember that SBV assumes that the input is in prenex-normal form.--- That is, all quantifiers are at the beginning of the predicate. See--- [note on reasoning in the presence of--- quantifiers]("Data.SBV#noteOnNested") for more information.------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.universal_'-universal_ :: Provable a => a -> Symbolic SBool-universal_ = Trans.universal_---- | Turns a value into a predicate, allowing users to provide names for the inputs.--- If the user does not provide enough number of names for the variables, the remaining ones--- will be internally generated. Note that the names are only used for printing models and has no--- other significance; in particular, we do not check that they are unique. Example:------ >  universal ["x", "y"] $ \(x::SWord8) y -> x `shiftL` 2 .== y------ This is the same as above, except the variables will be named @x@ and @y@ respectively,--- simplifying the counter-examples when they are printed.------ Remember that SBV assumes that the input is in prenex-normal form.--- That is, all quantifiers are at the beginning of the predicate. See--- [note on reasoning in the presence of--- quantifiers]("Data.SBV#noteOnNested") for more information.------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.universal'-universal :: Provable a => [String] -> a -> Symbolic SBool-universal = Trans.universal---- | Turns a value into an existentially quantified predicate.------ Remember that SBV assumes that the input is in prenex-normal form.--- That is, all quantifiers are at the beginning of the predicate. See--- [note on reasoning in the presence of--- quantifiers]("Data.SBV#noteOnNested") for more information.------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.existential_'-existential_ :: Provable a => a -> Symbolic SBool-existential_ = Trans.existential_---- | Version of 'existential_' that allows user defined names.------ Remember that SBV assumes that the input is in prenex-normal form.--- That is, all quantifiers are at the beginning of the predicate. See--- [note on reasoning in the presence of--- quantifiers]("Data.SBV#noteOnNested") for more information.------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.existential'-existential :: Provable a => [String] -> a -> Symbolic SBool-existential = Trans.existential- -- | Prove a predicate, using the default solver. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.prove'@@ -139,32 +78,32 @@ -- | Find a satisfying assignment for a predicate, using the default solver. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sat'-sat :: Provable a => a -> IO SatResult+sat :: Satisfiable a => a -> IO SatResult sat = Trans.sat  -- | Find a satisfying assignment using the given SMT-solver. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.satWith'-satWith :: Provable a => SMTConfig -> a -> IO SatResult+satWith :: Satisfiable a => SMTConfig -> a -> IO SatResult satWith = Trans.satWith  -- | Find a delta-satisfying assignment for a predicate, using the default solver for delta-satisfiability. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.dsat'-dsat :: Provable a => a -> IO SatResult+dsat :: Satisfiable a => a -> IO SatResult dsat = Trans.dsat  -- | Find a satisfying assignment using the given SMT-solver. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.satWith'-dsatWith :: Provable a => SMTConfig -> a -> IO SatResult+dsatWith :: Satisfiable a => SMTConfig -> a -> IO SatResult dsatWith = Trans.dsatWith  -- | Find all satisfying assignments, using the default solver. -- Equivalent to @'allSatWith' 'Data.SBV.defaultSMTCfg'@. See 'allSatWith' for details. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.allSat'-allSat :: Provable a => a -> IO AllSatResult+allSat :: Satisfiable a => a -> IO AllSatResult allSat = Trans.allSat  -- | Return all satisfying assignments for a predicate.@@ -180,32 +119,32 @@ --  Find all satisfying assignments using the given SMT-solver -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.allSatWith'-allSatWith :: Provable a => SMTConfig -> a -> IO AllSatResult+allSatWith :: Satisfiable a => SMTConfig -> a -> IO AllSatResult allSatWith = Trans.allSatWith  -- | Optimize a given collection of `Objective`s. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.optimize'-optimize :: Provable a => OptimizeStyle -> a -> IO OptimizeResult+optimize :: Satisfiable a => OptimizeStyle -> a -> IO OptimizeResult optimize = Trans.optimize  -- | Optimizes the objectives using the given SMT-solver. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.optimizeWith'-optimizeWith :: Provable a => SMTConfig -> OptimizeStyle -> a -> IO OptimizeResult+optimizeWith :: Satisfiable a => SMTConfig -> OptimizeStyle -> a -> IO OptimizeResult optimizeWith = Trans.optimizeWith --- | Check if the constraints given are consistent, using the default solver.+-- | Check if the constraints given are consistent in a prove call using the default solver. ----- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.isVacuous'-isVacuous :: Provable a => a -> IO Bool-isVacuous = Trans.isVacuous+-- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.isVacuousProof'+isVacuousProof :: Provable a => a -> IO Bool+isVacuousProof = Trans.isVacuousProof --- | Determine if the constraints are vacuous using the given SMT-solver.+-- | Determine if the constraints are vacuous in a SAT call using the given SMT-solver. ----- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.isVacuousWith'-isVacuousWith :: Provable a => SMTConfig -> a -> IO Bool-isVacuousWith = Trans.isVacuousWith+-- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.isVacuousProofWith'+isVacuousProofWith :: Provable a => SMTConfig -> a -> IO Bool+isVacuousProofWith = Trans.isVacuousProofWith  -- | Checks theoremhood using the default solver. --@@ -222,13 +161,13 @@ -- | Checks satisfiability using the default solver. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.isSatisfiable'-isSatisfiable :: Provable a => a -> IO Bool+isSatisfiable :: Satisfiable a => a -> IO Bool isSatisfiable = Trans.isSatisfiable  -- | Check whether a given property is satisfiable. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.isSatisfiableWith'-isSatisfiableWith :: Provable a => SMTConfig -> a -> IO Bool+isSatisfiableWith :: Satisfiable a => SMTConfig -> a -> IO Bool isSatisfiableWith = Trans.isSatisfiableWith  -- | Run an arbitrary symbolic computation, equivalent to @'runSMTWith' 'Data.SBV.defaultSMTCfg'@@@ -243,12 +182,10 @@ runSMTWith :: SMTConfig -> Symbolic a -> IO a runSMTWith = Trans.runSMTWith --- | NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sName_'-sName_ :: SExecutable IO a => a -> Symbolic ()-sName_ = Trans.sName_---- | NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sName'-sName :: SExecutable IO a => [String] -> a -> Symbolic ()+-- | Create an argument for a name used in a safety-checking call.+--+-- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sName_'+sName :: SExecutable IO a => a -> Symbolic () sName = Trans.sName  -- | Check safety using the default solver.@@ -284,42 +221,6 @@ output :: Outputtable a => a -> Symbolic a output = Trans.output --- | Create a user named input (universal)------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sbvForall'-sbvForall :: SymVal a => String -> Symbolic (SBV a)-sbvForall = Trans.sbvForall---- | Create an automatically named input------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sbvForall_'-sbvForall_ :: SymVal a => Symbolic (SBV a)-sbvForall_ = Trans.sbvForall_---- | Get a bunch of new words------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.mkForallVars'-mkForallVars :: SymVal a => Int -> Symbolic [SBV a]-mkForallVars = Trans.mkForallVars---- | Create an existential variable------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sbvExists'-sbvExists :: SymVal a => String -> Symbolic (SBV a)-sbvExists = Trans.sbvExists---- | Create an automatically named existential variable------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.sbvExists_'-sbvExists_ :: SymVal a => Symbolic (SBV a)-sbvExists_ = Trans.sbvExists_---- | Create a bunch of existentials------ NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.mkExistVars'-mkExistVars :: SymVal a => Int -> Symbolic [SBV a]-mkExistVars = Trans.mkExistVars- -- | Create a free variable, universal in a proof, existential in sat -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.free'@@ -939,7 +840,7 @@ -- | Run a symbolic computation, and return a extra value paired up with the 'Result' -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.runSymbolic'-runSymbolic :: SBVRunMode -> Symbolic a -> IO (a, Result)+runSymbolic :: SMTConfig -> SBVRunMode -> Symbolic a -> IO (a, Result) runSymbolic = Trans.runSymbolic  -- | Add a new option
Data/SBV/Compilers/C.hs view
@@ -26,6 +26,8 @@ import System.FilePath                (takeBaseName, replaceExtension) import System.Random +import Data.SBV.Core.Symbolic (ResultInp(..), ProgInfo(..))+ -- Work around the fact that GHC 8.4.1 started exporting <>.. Hmm.. import Text.PrettyPrint.HughesPJ import qualified Text.PrettyPrint.HughesPJ as P ((<>))@@ -445,7 +447,7 @@  -- | Generate the C program genCProg :: CgConfig -> String -> Doc -> Result -> [(String, CgVal)] -> [(String, CgVal)] -> Maybe SV -> Doc -> ([Doc], [String])-genCProg cfg fn proto (Result kindInfo _tvals _ovals cgs ins (_, 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 arrs _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."@@ -468,12 +470,16 @@           ++ "\nUse 'cgSRealType' to specify a custom type for SReal representation."   | not (null usorts)   = error $ "SBV->C: Cannot compile functions with uninterpreted sorts: " ++ intercalate ", " usorts+  | hasQuants pinfo+  = error "SBV->C: Cannot compile in the presence of quantified variables."+  | not $ null (progSpecialRels pinfo)+  = error "SBV->C: Cannot compile in the presence of special relations."+  | not (null axioms)+  = 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"-  | needsExistentials (map fst (fst ins))-  = error "SBV->C: Cannot compile functions with existentially quantified variables."   | True   = ([pre, header, post], flagsNeeded)  where asserts | cgIgnoreAsserts cfg = []@@ -513,7 +519,12 @@                          $$ vcat (map text ls)                          $$ text "" -       typeWidth = getMax 0 $ [len (kindOf s) | (s, _) <- assignments] ++ [len (kindOf s) | (_, NamedSymVar s _) <- fst ins]+       ins = case topInps of+               ResultTopInps (is, []) -> is+               ResultTopInps is       -> die $ "Unexpected trackers: " ++ show is+               ResultLamInps is       -> die $ "Unexpected inputs  : " ++ show is++       typeWidth = getMax 0 $ [len (kindOf s) | (s, _) <- assignments] ++ [len (kindOf s) | NamedSymVar s _ <- ins]                 where len KReal{}            = 5                       len KFloat{}           = 6 -- SFloat                       len KDouble{}          = 7 -- SDouble@@ -575,8 +586,8 @@          where static   = if location == -1 then text "static" else empty                location = maximum (-1 : map getNodeId elts) -       getNodeId s@(SV _ (NodeId n)) | isConst s = -1-                                     | True      = n+       getNodeId s@(SV _ (NodeId (_, n))) | isConst s = -1+                                          | True      = n         genAsgn :: (SV, SBVExpr) -> (Int, Doc)        genAsgn (sv, n) = (getNodeId sv, ppExpr cfg consts n (declSV typeWidth sv) (declSVNoConst typeWidth sv) P.<> semi)@@ -824,6 +835,9 @@         p o [a, b]           | Just co <- lookup o cBinOps           = a <+> text co <+> b++        p Implies [a, b] | kindOf (head opArgs) == KBool = parens (text "!" P.<> a <+> text "||" <+> b)+         p NotEqual xs = mkDistinct xs         p o args = die $ "Received operator " ++ show o ++ " applied to " ++ show args 
Data/SBV/Compilers/CodeGen.hs view
@@ -57,6 +57,8 @@ import Data.SBV.Core.Data import Data.SBV.Core.Symbolic (MonadSymbolic(..), svToSymSV, svMkSymVar, outputSVal, VarContext(..)) +import Data.SBV.Provers.Prover(defaultSMTCfg)+ #if MIN_VERSION_base(4,11,0) import Control.Monad.Fail as Fail #endif@@ -262,7 +264,7 @@  -- | Creates an atomic input in the generated code. cgInput :: SymVal a => String -> SBVCodeGen (SBV a)-cgInput nm = do r <- sbvForall_+cgInput nm = do r  <- free_                 sv <- sbvToSymSV r                 modify' (\s -> s { cgInputs = (nm, CgAtomic sv) : cgInputs s })                 return r@@ -271,7 +273,7 @@ cgInputArr :: SymVal a => Int -> String -> SBVCodeGen [SBV a] cgInputArr sz nm   | sz < 1 = error $ "SBV.cgInputArr: Array inputs must have at least one element, given " ++ show sz ++ " for " ++ show nm-  | True   = do rs <- mapM (const sbvForall_) [1..sz]+  | True   = do rs <- mapM (const free_) [1..sz]                 sws <- mapM sbvToSymSV rs                 modify' (\s -> s { cgInputs = (nm, CgArray sws) : cgInputs s })                 return rs@@ -337,9 +339,9 @@ -- of makefiles, source code, headers, etc. codeGen :: CgTarget l => l -> CgConfig -> String -> SBVCodeGen a -> IO (a, CgConfig, CgPgmBundle) codeGen l cgConfig nm (SBVCodeGen comp) = do-   ((retVal, st'), res) <- runSymbolic CodeGen $ runStateT comp initCgState { cgFinalConfig = cgConfig }-   let st = st' { cgInputs       = reverse (cgInputs st')-                , cgOutputs      = reverse (cgOutputs st')+   ((retVal, st'), res) <- runSymbolic defaultSMTCfg CodeGen $ runStateT comp initCgState { cgFinalConfig = cgConfig }+   let st = st' { cgInputs  = reverse (cgInputs st')+                , cgOutputs = reverse (cgOutputs st')                 }        allNamedVars = map fst (cgInputs st ++ cgOutputs st)        dupNames = allNamedVars \\ nub allNamedVars
Data/SBV/Control.hs view
@@ -41,6 +41,9 @@      -- ** Extracting interpolants      , getInterpolantMathSAT, getInterpolantZ3 +     -- ** Getting abducts+     , getAbduct, getAbductNext+      -- ** Extracting assertions      , getAssertions @@ -89,6 +92,7 @@                                       , inNewAssertionStack, push, pop                                       , caseSplit, resetAssertions, echo, exit                                       , getUnsatCore, getProof, getInterpolantMathSAT, getInterpolantZ3+                                      , getAbduct, getAbductNext                                       , getAssertions, getAssignment                                       , mkSMTResult, freshVar_, freshVar                                       , freshArray, freshArray_, checkSat, ensureSat
Data/SBV/Control/BaseIO.hs view
@@ -11,6 +11,8 @@ -- @Data.SBV.Control@, where we restrict the underlying monad to be IO. ----------------------------------------------------------------------------- +{-# LANGUAGE FlexibleContexts #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Data.SBV.Control.BaseIO where@@ -18,8 +20,8 @@ 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)-import Data.SBV.Core.Symbolic (Query, QueryContext, QueryState, State, SMTModel, SMTResult, SV, Name)+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 qualified Data.SBV.Control.Query as Trans import qualified Data.SBV.Control.Utils as Trans@@ -57,7 +59,7 @@ -- | Get the uninterpreted constants/functions recorded during a run. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.Control.getUIs'-getUIs :: Query [(String, SBVType)]+getUIs :: Query [(String, (Maybe [String], SBVType))] getUIs = Trans.getUIs  -- | Issue check-sat and get an SMT Result out.@@ -299,6 +301,27 @@ getInterpolantZ3 :: [SBool] -> Query String getInterpolantZ3 = Trans.getInterpolantZ3 +-- | Get an abduct. The first argument is a conjecture. The return value will be an assertion+-- such that in addition with the existing assertions you have, will imply this conjecture.+-- The second argument is the grammar which guides the synthesis of this abduct, if given.+-- Note that SBV doesn't do any checking on the grammar. See the relevant documentation on CVC5+-- for details.+--+-- NB. Before you use this function, make sure to call+--+-- @+--      setOption $ ProduceAbducts True+-- @+--+-- to enable abduct generation.+getAbduct :: Maybe String -> String -> SBool -> Query String+getAbduct = Trans.getAbduct++-- | Get the next abduct. Only call this after the first call to 'getAbduct' goes through. You can call+-- it repeatedly to get a different abduct.+getAbductNext :: Query String+getAbductNext = Trans.getAbductNext+ -- | Retrieve assertions. Note you must have arranged for -- assertions to be available first via --@@ -366,11 +389,9 @@  -- | Create a fresh variable in query mode. You should prefer -- creating input variables using 'Data.SBV.sBool', 'Data.SBV.sInt32', etc., which act--- as primary inputs to the model and can be existential or universal.--- Use 'freshVar' only in query mode for anonymous temporary variables.--- Such variables are always existential. Note that 'freshVar' should hardly be--- needed: Your input variables and symbolic expressions should suffice for--- most major use cases.+-- as primary inputs to the model. Use 'freshVar' only in query mode for anonymous temporary variables.+-- Note that 'freshVar' should hardly be needed: Your input variables and symbolic expressions+-- should suffice for -- most major use cases. -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.Control.freshVar' freshVar :: SymVal a => String -> Query (SBV a)@@ -391,6 +412,16 @@ 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 -- file redirection is given, the output will go to the file.@@ -438,7 +469,7 @@ -- | Get the value of an uninterpreted function, as a list of domain, value pairs. -- The final value is the "else" clause, i.e., what the function maps values outside -- of the domain of the first list.-getFunction :: (SymVal a, SymVal r, Trans.SMTFunction fun a r) => fun -> Query ([(a, r)], r)+getFunction :: (SymVal a, SymVal r, Trans.SMTFunction fun a r) => fun -> Query (Either String ([(a, r)], r)) getFunction = Trans.getFunction  -- | Get the value of a term. If the kind is Real and solver supports decimal approximations,@@ -449,13 +480,13 @@ getValueCV = Trans.getValueCV  -- | Get the value of an uninterpreted value-getUICVal :: Maybe Int -> (String, SBVType) -> Query CV+getUICVal :: Maybe Int -> (String, (Maybe [String], SBVType)) -> Query CV getUICVal = Trans.getUICVal  -- | Get the value of an uninterpreted function as an association list -- -- NB. For a version which generalizes over the underlying monad, see 'Data.SBV.Trans.Control.getUIFunCVAssoc'-getUIFunCVAssoc :: Maybe Int -> (String, SBVType) -> Query ([([CV], CV)], CV)+getUIFunCVAssoc :: Maybe Int -> (String, (Maybe [String], SBVType)) -> Query (Either String ([([CV], CV)], CV)) getUIFunCVAssoc = Trans.getUIFunCVAssoc  -- | Check for satisfiability.
Data/SBV/Control/Query.hs view
@@ -22,7 +22,9 @@ module Data.SBV.Control.Query (        send, ask, retrieveResponse      , CheckSatResult(..), checkSat, checkSatUsing, checkSatAssuming, checkSatAssumingWithUnsatisfiableSet-     , getUnsatCore, getProof, getInterpolantMathSAT, getInterpolantZ3, getAssignment, getOption, freshVar, freshVar_, freshArray, freshArray_, push, pop, getAssertionStackDepth+     , 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      , getLexicographicOptResults, getIndependentOptResults, getParetoOptResults, getAllSatResult, getUnknownReason, getObservables, ensureSat      , SMTOption(..), SMTInfoFlag(..), SMTErrorBehavior(..), SMTReasonUnknown(..), SMTInfoResponse(..), getInfo@@ -42,22 +44,19 @@ 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 Data.Char      (toLower) import Data.List      (intercalate, nubBy, sortOn)-import Data.Maybe     (listToMaybe, catMaybes)+import Data.Maybe     (listToMaybe, catMaybes, fromMaybe) import Data.Function  (on) import Data.Bifunctor (first) import Data.Foldable  (toList)  import Data.SBV.Core.Data -import Data.SBV.Core.Symbolic   ( MonadQuery(..), State(..)-                                , incrementInternalCounter, validationRequested-                                , prefixExistentials, prefixUniversals-                                , namedSymVar, getSV, lookupInput, userInputsToList-                                )+import Data.SBV.Core.Symbolic (MonadQuery(..), State(..), incrementInternalCounter, validationRequested, getSV, lookupInput, mustIgnoreVar)  import Data.SBV.Utils.SExpr @@ -171,6 +170,7 @@                  ProduceInterpolants{}       -> askFor "ProduceInterpolants"       ":produce-interpolants"        $ bool       ProduceInterpolants                  ProduceUnsatAssumptions{}   -> askFor "ProduceUnsatAssumptions"   ":produce-unsat-assumptions"   $ bool       ProduceUnsatAssumptions                  ProduceUnsatCores{}         -> askFor "ProduceUnsatCores"         ":produce-unsat-cores"         $ bool       ProduceUnsatCores+                 ProduceAbducts{}            -> askFor "ProduceAbducts"            ":produce-abducts"             $ bool       ProduceAbducts                  RandomSeed{}                -> askFor "RandomSeed"                ":random-seed"                 $ integer    RandomSeed                  ReproducibleResourceLimit{} -> askFor "ReproducibleResourceLimit" ":reproducible-resource-limit" $ integer    ReproducibleResourceLimit                  SMTVerbosity{}              -> askFor "SMTVerbosity"              ":verbosity"                   $ integer    SMTVerbosity@@ -312,39 +312,28 @@     State{runMode} <- queryState     rm <- io $ readIORef runMode     case rm of-      m@CodeGen           -> error $ "SBV.getModel: Model is not available in mode: " ++ show m-      m@Concrete{}        -> error $ "SBV.getModel: Model is not available in mode: " ++ show m-      SMTMode _ _ isSAT _ -> do-          cfg   <- getConfig-          qinps <- getQuantifiedInputs-          uis   <- getUIs+      m@CodeGen     -> error $ "SBV.getModel: Model is not available in mode: " ++ show m+      m@LambdaGen{} -> error $ "SBV.getModel: Model is not available in mode: " ++ show m+      m@Concrete{}  -> error $ "SBV.getModel: Model is not available in mode: " ++ show m+      SMTMode{}     -> do+          cfg <- getConfig+          uis <- getUIs -           -- for "sat", display the prefix existentials. for "proof", display the prefix universals-          let allModelInputs = if isSAT then prefixExistentials qinps-                                        else prefixUniversals   qinps+          allModelInputs <- getTopLevelInputs+          obsvs          <- getObservables -              -- Add on observables only if we're not in a quantified context-              grabObservables = S.length allModelInputs == S.length qinps -- i.e., we didn't drop anything -          obsvs <- if grabObservables-                      then getObservables-                      else do queryDebug ["*** In a quantified context, obvservables will not be printed."]-                              return mempty--          let grab (NamedSymVar sv nm) = wrap <$> getValueCV mbi sv-                where-                  wrap !c = (sv, (nm, c))--          inputAssocs <- mapM (grab . namedSymVar) allModelInputs+          inputAssocs <- let grab (NamedSymVar sv nm) = let wrap !c = (sv, (nm, c)) in wrap <$> getValueCV mbi sv+                         in mapM grab allModelInputs            let name     = fst . snd               removeSV = snd-              prepare  = S.unstableSort . S.filter (not . isNonModelVar cfg . T.unpack . name)+              prepare  = S.unstableSort . S.filter (not . mustIgnoreVar cfg . T.unpack . name)               assocs   = S.fromList (sortOn fst obsvs) <> fmap removeSV (prepare inputAssocs)            -- collect UIs, and UI functions if requested-          let uiFuns = [ui | ui@(nm, SBVType as) <- uis, length as >  1, satTrackUFs cfg, not (isNonModelVar cfg nm)] -- functions have at least two things in their type!-              uiRegs = [ui | ui@(nm, SBVType as) <- uis, length as == 1,                  not (isNonModelVar cfg nm)]+          let uiFuns = [ui | ui@(nm, (_, SBVType as)) <- uis, length as >  1, allSatTrackUFs cfg, not (mustIgnoreVar cfg nm)] -- functions have at least two things in their type!+              uiRegs = [ui | ui@(nm, (_, SBVType as)) <- uis, length as == 1,                     not (mustIgnoreVar cfg nm)]            -- If there are uninterpreted functions, arrange so that z3's pretty-printer flattens things out           -- as cex's tend to get larger@@ -354,24 +343,18 @@                   Nothing   -> return ()                   Just cmds -> mapM_ (send True) cmds -          bindings <- let get i@(ALL, _)      = return (i, Nothing)-                          get i@(EX, getSV -> sv) = case lookupInput fst sv inputAssocs of-                                                      Just (_, (_, cv)) -> return (i, Just cv)-                                                      Nothing           -> do cv <- getValueCV mbi sv-                                                                              return (i, Just cv)--                          flipQ i@(q, sv) = case (isSAT, q) of-                                             (True,  _ )  -> i-                                             (False, EX)  -> (ALL, sv)-                                             (False, ALL) -> (EX,  sv)+          bindings <- let get i@(getSV -> sv) = case lookupInput fst sv inputAssocs of+                                                  Just (_, (_, cv)) -> return (i, cv)+                                                  Nothing           -> do cv <- getValueCV mbi sv+                                                                          return (i, cv)                        in if validationRequested cfg-                         then Just <$> mapM (get . flipQ) qinps+                         then Just <$> mapM get allModelInputs                          else return Nothing -          uiFunVals <- mapM (\ui@(nm, t) -> (\a -> (nm, (t, a))) <$> getUIFunCVAssoc mbi ui) uiFuns+          uiFunVals <- mapM (\ui@(nm, (_, t)) -> (\a -> (nm, (t, a))) <$> getUIFunCVAssoc mbi ui) uiFuns -          uiVals    <- mapM (\ui@(nm, _) -> (nm,) <$> getUICVal mbi ui) uiRegs+          uiVals    <- mapM (\ui@(nm, (_, _)) -> (nm,) <$> getUICVal mbi ui) uiRegs            return SMTModel { modelObjectives = []                           , modelBindings   = toList <$> bindings@@ -388,7 +371,7 @@                          r <- ask cmd -                        inputs <- toList . fmap namedSymVar <$> getQuantifiedInputs+                        inputs <- F.toList <$> getTopLevelInputs                          parse r bad $ \case EApp (ECon "objectives" : es) -> catMaybes <$> mapM (getObjValue (bad r) inputs) es                                             _                             -> bad r Nothing@@ -683,6 +666,27 @@        parse r bad $ \e -> return $ serialize False e  +-- | Generalization of 'Data.SBV.Control.getAbduct'.+getAbduct :: (SolverContext m, MonadIO m, MonadQuery m) => Maybe String -> String -> SBool -> m String+getAbduct mbGrammar defName b = do+   s <- inNewContext (`sbvToSV` b)+   let cmd = "(get-abduct " ++ defName ++ " " ++ show s ++ fromMaybe "" mbGrammar ++ ")"+       bad = unexpected "getAbduct" cmd "a get-abduct response" Nothing++   r <- ask cmd++   parse r bad $ \e -> return $ serialize False e++-- | Generalization of 'Data.SBV.Control.getAbductNext'.+getAbductNext :: (MonadIO m, MonadQuery m) => m String+getAbductNext = do+   let cmd = "(get-abduct-next)"+       bad = unexpected "getAbductNext" cmd "a get-abduct-next response" Nothing++   r <- ask cmd++   parse r bad $ \e -> return $ serialize False e+ -- | Generalization of 'Data.SBV.Control.getInterpolantZ3'. Use this version with Z3. getInterpolantZ3 :: (MonadIO m, MonadQuery m) => [SBool] -> m String getInterpolantZ3 fs@@ -769,7 +773,7 @@ mkSMTResult :: (MonadIO m, MonadQuery m) => [Assignment] -> m SMTResult mkSMTResult asgns = do              QueryState{queryConfig} <- getQueryState-             inps <- userInputsToList <$> getQuantifiedInputs+             inps <- F.toList <$> getTopLevelInputs               let grabValues st = do let extract (Assign s n) = sbvToSV st (SBV s) >>= \sv -> return (sv, n) @@ -782,8 +786,8 @@                                     let userSS = map fst modelAssignment                                          missing, extra, dup :: [String]-                                        missing = [T.unpack n | (EX, NamedSymVar s n) <- inps, s `notElem` userSS]-                                        extra   = [show s | s <- userSS, s `notElem` map (getSV . namedSymVar) inps]+                                        missing = [T.unpack n | NamedSymVar s n <- inps, s `notElem` userSS]+                                        extra   = [show s | s <- userSS, s `notElem` map getSV inps]                                         dup     = let walk []     = []                                                       walk (n:ns)                                                         | n `elem` ns = show n : walk (filter (/= n) ns)@@ -814,7 +818,7 @@                                                             , "*** Data.SBV: Check your query result construction!"                                                             ] -                                    let findName s = case [T.unpack nm | (_, NamedSymVar i nm) <- inps, s == i] of+                                    let findName s = case [T.unpack nm | NamedSymVar i nm <- inps, s == i] of                                                         [nm] -> nm                                                         []   -> error "*** Data.SBV: Impossible happened: Cannot find " ++ show s ++ " in the input list"                                                         nms  -> error $ unlines [ ""
Data/SBV/Control/Types.hs view
@@ -105,6 +105,7 @@                | ProduceInterpolants       Bool                | ProduceUnsatAssumptions   Bool                | ProduceUnsatCores         Bool+               | ProduceAbducts            Bool                | RandomSeed                Integer                | ReproducibleResourceLimit Integer                | SMTVerbosity              Integer@@ -124,6 +125,7 @@ isStartModeOption ProduceInterpolants{}       = True isStartModeOption ProduceUnsatAssumptions{}   = True isStartModeOption ProduceUnsatCores{}         = True+isStartModeOption ProduceAbducts{}            = True isStartModeOption RandomSeed{}                = True isStartModeOption ReproducibleResourceLimit{} = False isStartModeOption SMTVerbosity{}              = False@@ -141,6 +143,7 @@ isOnlyOnceOption ProduceProofs{}             = True isOnlyOnceOption ProduceInterpolants{}       = True isOnlyOnceOption ProduceUnsatAssumptions{}   = True+isOnlyOnceOption ProduceAbducts{}            = False isOnlyOnceOption ProduceUnsatCores{}         = True isOnlyOnceOption RandomSeed{}                = False isOnlyOnceOption ReproducibleResourceLimit{} = False@@ -164,6 +167,7 @@         cvt (ProduceInterpolants       b) = opt   [":produce-interpolants",        smtBool b]         cvt (ProduceUnsatAssumptions   b) = opt   [":produce-unsat-assumptions",   smtBool b]         cvt (ProduceUnsatCores         b) = opt   [":produce-unsat-cores",         smtBool b]+        cvt (ProduceAbducts            b) = opt   [":produce-abducts",             smtBool b]         cvt (RandomSeed                i) = opt   [":random-seed",                 show i]         cvt (ReproducibleResourceLimit i) = opt   [":reproducible-resource-limit", show i]         cvt (SMTVerbosity              i) = opt   [":verbosity",                   show i]
Data/SBV/Control/Utils.hs view
@@ -29,20 +29,14 @@      , getValueCV, getUICVal, getUIFunCVAssoc, getUnsatAssumptions      , SMTFunction(..), registerUISMTFunction      , getQueryState, modifyQueryState, getConfig, getObjectives, getUIs-     , getSBVAssertions, getSBVPgm, getQuantifiedInputs, getObservables+     , getSBVAssertions, getSBVPgm, getObservables      , checkSat, checkSatUsing, getAllSatResult-     , inNewContext, freshVar, freshVar_, freshArray, freshArray_-     , parse-     , unexpected-     , timeout-     , queryDebug-     , retrieveResponse-     , recoverKindedValue-     , runProofOn-     , executeQuery+     , inNewContext, freshVar, freshVar_, freshArray, freshArray_, freshLambdaArray, freshLambdaArray_+     , getTopLevelInputs, parse, unexpected+     , timeout, queryDebug, retrieveResponse, recoverKindedValue, runProofOn, executeQuery      ) where -import Data.List  (sortBy, sortOn, elemIndex, partition, groupBy, tails, intercalate, nub, sort)+import Data.List  (sortBy, sortOn, elemIndex, partition, groupBy, tails, intercalate, nub, sort, isPrefixOf)  import Data.Char      (isPunctuation, isSpace, isDigit) import Data.Function  (on)@@ -61,7 +55,7 @@ import Control.Monad.Trans      (lift) import Control.Monad.Reader     (runReaderT) -import Data.Maybe (isNothing, isJust)+import Data.Maybe (isNothing, isJust, mapMaybe)  import Data.IORef (readIORef, writeIORef, IORef, newIORef, modifyIORef') @@ -71,12 +65,12 @@ import Data.SBV.Core.Data     ( SV(..), trueSV, falseSV, CV(..), trueCV, falseCV, SBV, sbvToSV, kindOf, Kind(..)                               , HasKind(..), mkConstCV, CVal(..), SMTResult(..)                               , NamedSymVar, SMTConfig(..), SMTModel(..)-                              , QueryState(..), SVal(..), Quantifier(..), cache+                              , QueryState(..), SVal(..), cache                               , newExpr, SBVExpr(..), Op(..), FPOp(..), SBV(..), SymArray(..)                               , SolverContext(..), SBool, Objective(..), SolverCapabilities(..), capabilities                               , Result(..), SMTProblem(..), trueSV, SymVal(..), SBVPgm(..), SMTSolver(..), SBVRunMode(..)                               , SBVType(..), forceSVArg, RoundingMode(RoundNearestTiesToEven), (.=>)-                              , RCSet(..)+                              , RCSet(..), Lambda(..), QuantifiedBool(..)                               )  import Data.SBV.Core.Symbolic ( IncState(..), withNewIncState, State(..), svToSV, symbolicEnv, SymbolicT@@ -84,9 +78,9 @@                               , registerLabel, svMkSymVar, validationRequested                               , isSafetyCheckingIStage, isSetupIStage, isRunIStage, IStage(..), QueryT(..)                               , extractSymbolicSimulationState, MonadSymbolic(..), newUninterpreted-                              , UserInputs, getInputs, prefixExistentials, getSV, quantifier, getUserName-                              , namedSymVar, NamedSymVar(..), lookupInput, userInputs, userInputsToList-                              , getUserName', Name, CnstMap+                              , UserInputs, getSV, NamedSymVar(..), lookupInput, getUserName'+                              , Name, CnstMap, UICodeKind(UINone), smtDefGivenName, Inputs(..), ProgInfo(..)+                              , mustIgnoreVar                               )  import Data.SBV.Core.AlgReals    (mergeAlgReals, AlgReal(..), RealPoint(..))@@ -103,6 +97,8 @@ 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)@@ -113,13 +109,13 @@  -- | 'Data.SBV.Trans.Control.QueryT' as a 'SolverContext'. instance MonadIO m => SolverContext (QueryT m) where-   constrain              = addQueryConstraint False []-   softConstrain          = addQueryConstraint True  []-   namedConstraint nm     = addQueryConstraint False [(":named", nm)]-   constrainWithAttribute = addQueryConstraint False-   addAxiom               = addQueryAxiom-   contextState           = queryState+   constrain                   = addQueryConstraint False []                . quantifiedBool+   softConstrain               = addQueryConstraint True  []                . quantifiedBool+   namedConstraint nm          = addQueryConstraint False [(":named", nm)]  . quantifiedBool+   constrainWithAttribute attr = addQueryConstraint False attr              . quantifiedBool +   contextState = queryState+    setOption o      | isStartModeOption o = error $ unlines [ ""                                              , "*** Data.SBV: '" ++ show o ++ "' can only be set at start-up time."@@ -127,11 +123,6 @@                                              ]      | True                = send True $ setSMTOption o -   addSMTDefinition nm _ = error $ unlines [ ""-                                           , "*** Data.SBV: '" ++ show nm ++ "' must be defined in regular (non-query) mode."-                                           , "*** Hint: Define all functions before starting the query."-                                           ]- -- | Adding a constraint, possibly with attributes and possibly soft. Only used internally. -- Use 'constrain' and 'namedConstraint' from user programs. addQueryConstraint :: (MonadIO m, MonadQuery m) => Bool -> [(String, String)] -> SBool -> m ()@@ -143,10 +134,6 @@    where asrt | isSoft = "assert-soft"               | True   = "assert" -addQueryAxiom :: (MonadIO m, MonadQuery m) => String -> [String] -> m ()-addQueryAxiom nm ls = do send True $ "; -- user given axiom: " ++ nm-                         send True $ intercalate "\n" ls- -- | Get the current configuration getConfig :: (MonadIO m, MonadQuery m) => m SMTConfig getConfig = queryConfig <$> getQueryState@@ -171,8 +158,8 @@ io = liftIO  -- | Sync-up the external solver with new context we have generated-syncUpSolver :: (MonadIO m, MonadQuery m) => IORef CnstMap -> IncState -> m ()-syncUpSolver rGlobalConsts is = do+syncUpSolver :: (MonadIO m, MonadQuery m) => ProgInfo -> IORef CnstMap -> IncState -> m ()+syncUpSolver progInfo rGlobalConsts is = do         cfg <- getConfig          -- update global consts to have the new ones@@ -195,7 +182,7 @@                         let cnsts = sortBy cmp . map swap . Map.toList $ newConsts -                       return $ toIncSMTLib cfg inps ks (allConsts, cnsts) arrs tbls uis as constraints cfg+                       return $ toIncSMTLib cfg progInfo inps ks (allConsts, cnsts) arrs tbls uis as constraints cfg         mapM_ (send True) $ mergeSExpr ls  -- | Retrieve the query context@@ -223,9 +210,10 @@  -- | Generalization of 'Data.SBV.Control.inNewContext' inNewContext :: (MonadIO m, MonadQuery m) => (State -> IO a) -> m a-inNewContext act = do st@State{rconstMap} <- queryState-                      (is, r) <- io $ withNewIncState st act-                      syncUpSolver rconstMap is+inNewContext act = do st@State{rconstMap, rProgInfo} <- queryState+                      (is, r)  <- io $ withNewIncState st act+                      progInfo <- io $ readIORef rProgInfo+                      syncUpSolver progInfo rconstMap is                       return r  -- | Generic 'Queriable' instance for 'SymVal' values@@ -260,8 +248,22 @@  -- | 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 mbVal+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@@ -366,11 +368,11 @@ -- | A class which allows for sexpr-conversion to functions class (HasKind r, SatModel r) => SMTFunction fun a r | fun -> a r where   sexprToArg     :: fun -> [SExpr] -> Maybe a-  smtFunName     :: (MonadIO m, SolverContext m, MonadSymbolic m) => fun -> m String+  smtFunName     :: (MonadIO m, SolverContext m, MonadSymbolic m) => fun -> m (String, Maybe [String])   smtFunSaturate :: fun -> SBV r   smtFunType     :: fun -> SBVType   smtFunDefault  :: fun -> Maybe r-  sexprToFun     :: (MonadIO m, SolverContext m, MonadQuery m, MonadSymbolic m, SymVal r) => fun -> SExpr -> m (Maybe ([(a, r)], r))+  sexprToFun     :: (MonadIO m, SolverContext m, MonadQuery m, MonadSymbolic m, SymVal r) => fun -> (String, SExpr) -> m (Either String ([(a, r)], r))    {-# MINIMAL sexprToArg, smtFunSaturate, smtFunType  #-} @@ -384,43 +386,52 @@   -- Given the function, determine what its name is and do some sanity checks   smtFunName f = do st@State{rUIMap} <- contextState                     uiMap <- liftIO $ readIORef rUIMap-                    findName st uiMap-    where findName st@State{spgm} uiMap = do+                    nm    <- findName st uiMap++                    -- Read the uiMap again here. Why? Because the act of finding the name might've+                    -- introduced it as an uninterperted name!+                    newUIMap <- liftIO $ readIORef rUIMap+                    case nm `Map.lookup` newUIMap of+                      Nothing          -> cantFind newUIMap+                      Just (mbArgs, _) -> pure (nm, mbArgs)+    where cantFind uiMap = error $ unlines $    [ ""+                                                , "*** Data.SBV.getFunction: Must be called on an uninterpreted function!"+                                                , "***"+                                                , "***    Expected to receive a function created by \"uninterpret\""+                                                ]+                                             ++ tag+                                             ++ [ "***"+                                                , "*** Make sure to call getFunction on uninterpreted functions only!"+                                                , "*** If that is already the case, please report this as a bug."+                                                ]+             where tag = case map fst (Map.toList uiMap) of+                               []    -> [ "***    But, there are no matching uninterpreted functions in the context." ]+                               [x]   -> [ "***    The only possible candidate is: " ++ x ]+                               cands -> [ "***    Candidates are:"+                                        , "***        " ++ intercalate ", " cands+                                        ]++          findName st@State{spgm} uiMap = do              r <- liftIO $ sbvToSV st (smtFunSaturate f)              liftIO $ forceSVArg r              SBVPgm asgns <- liftIO $ readIORef spgm -             let cantFind = error $ unlines $    [ ""-                                                 , "*** Data.SBV.getFunction: Must be called on an uninterpreted function!"-                                                 , "***"-                                                 , "***    Expected to receive a function created by \"uninterpret\""-                                                 ]-                                              ++ tag-                                              ++ [ "***"-                                                 , "*** Make sure to call getFunction on uninterpreted functions only!"-                                                 , "*** If that is already the case, please report this as a bug."-                                                 ]-                      where tag = case map fst (Map.toList uiMap) of-                                    []    -> [ "***    But, there are no matching uninterpreted functions in the context." ]-                                    [x]   -> [ "***    The only possible candidate is: " ++ x ]-                                    cands -> [ "***    Candidates are:"-                                             , "***        " ++ intercalate ", " cands-                                             ]               case S.findIndexR ((== r) . fst) asgns of-               Nothing -> cantFind+               Nothing -> cantFind uiMap                Just i  -> case asgns `S.index` i of                             (sv, SBVApp (Uninterpreted nm) _) | r == sv -> return nm-                            _                                           -> cantFind+                            _                                           -> cantFind uiMap -  sexprToFun f e = do nm <- smtFunName f-                      case parseSExprFunction e of-                        Just (Left nm') -> case (nm == nm', smtFunDefault f) of-                                             (True, Just v)  -> return $ Just ([], v)-                                             _               -> bailOut nm-                        Just (Right v)  -> return $ convert v-                        Nothing         -> do mbPVS <- pointWiseExtract nm (smtFunType f)-                                              return $ mbPVS >>= convert+  sexprToFun f (s, e) = do nm <- fst <$> smtFunName f+                           mbRes <- case parseSExprFunction e of+                                      Just (Left nm') -> case (nm == nm', smtFunDefault f) of+                                                           (True, Just v)  -> return $ Just ([], v)+                                                           _               -> bailOut nm+                                      Just (Right v)  -> return $ convert v+                                      Nothing         -> do mbPVS <- pointWiseExtract nm (smtFunType f)+                                                            return $ mbPVS >>= convert+                           pure $ maybe (Left s) Right mbRes     where convert    (vs, d) = (,) <$> mapM sexprPoint vs <*> sexprToVal d           sexprPoint (as, v) = (,) <$> sexprToArg f as    <*> sexprToVal v @@ -436,35 +447,16 @@ -- function itself will register it automatically. But there are cases where doing this explicitly can -- come in handy. registerUISMTFunction :: (MonadIO m, SolverContext m, MonadSymbolic m) => SMTFunction fun a r => fun -> m ()-registerUISMTFunction f = do st <- contextState-                             nm <- smtFunName f-                             io $ newUninterpreted st nm (smtFunType f) Nothing+registerUISMTFunction f = do st   <- contextState+                             nmas <- smtFunName f+                             io $ newUninterpreted st nmas (smtFunType f) UINone  -- | 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 -- up. And I think it'll only be necessary then, I haven't seen z3 try anything smarter in other scenarios. pointWiseExtract ::  forall m. (MonadIO m, MonadQuery m) => String -> SBVType -> m (Maybe ([([SExpr], SExpr)], SExpr))-pointWiseExtract nm typ-   | isBoolFunc-   = tryPointWise-   | True-   = error $ unlines [ ""-                     , "*** Data.SBV.getFunction: Unsupported: Extracting interpretation for function:"-                     , "***"-                     , "***     " ++ nm ++ " :: " ++ show typ-                     , "***"-                     , "*** At this time, the expression returned by the solver is too complicated for SBV!"-                     , "***"-                     , "*** You can ignore uninterpreted function models for sat models using the 'satTrackUFs' parameter:"-                     , "***"-                     , "***             satWith    z3{satTrackUFs = False}"-                     , "***             allSatWith z3{satTrackUFs = False}"-                     , "***"-                     , "*** You can see the response from the solver by running with '{verbose = True}' option."-                     , "***"-                     , "*** NB. If this is a use case you'd like SBV to support, please get in touch!"-                     ]+pointWiseExtract nm typ = tryPointWise   where trueSExpr  = ENum (1, Nothing)         falseSExpr = ENum (0, Nothing) @@ -509,8 +501,8 @@ -- | For saturation purposes, get a proper argument. The forall quantification -- is safe here since we only use in smtFunSaturate calls, which looks at the -- kind stored inside only.-mkArg :: forall a. Kind -> SBV a-mkArg k = SBV $ SVal k (Left (defaultKindedValue k))+mkSaturatingArg :: forall a. Kind -> SBV a+mkSaturatingArg k = SBV $ SVal k (Left (defaultKindedValue k))  -- | Functions of arity 1 instance ( SymVal a, HasKind a@@ -522,7 +514,7 @@    smtFunType _ = SBVType [kindOf (Proxy @a), kindOf (Proxy @r)] -  smtFunSaturate f = f $ mkArg (kindOf (Proxy @a))+  smtFunSaturate f = f $ mkSaturatingArg (kindOf (Proxy @a))  -- | Functions of arity 2 instance ( SymVal a,  HasKind a@@ -535,8 +527,8 @@    smtFunType _ = SBVType [kindOf (Proxy @a), kindOf (Proxy @b), kindOf (Proxy @r)] -  smtFunSaturate f = f (mkArg (kindOf (Proxy @a)))-                       (mkArg (kindOf (Proxy @b)))+  smtFunSaturate f = f (mkSaturatingArg (kindOf (Proxy @a)))+                       (mkSaturatingArg (kindOf (Proxy @b)))  -- | Functions of arity 3 instance ( SymVal a,   HasKind a@@ -550,9 +542,9 @@    smtFunType _ = SBVType [kindOf (Proxy @a), kindOf (Proxy @b), kindOf (Proxy @c), kindOf (Proxy @r)] -  smtFunSaturate f = f (mkArg (kindOf (Proxy @a)))-                       (mkArg (kindOf (Proxy @b)))-                       (mkArg (kindOf (Proxy @c)))+  smtFunSaturate f = f (mkSaturatingArg (kindOf (Proxy @a)))+                       (mkSaturatingArg (kindOf (Proxy @b)))+                       (mkSaturatingArg (kindOf (Proxy @c)))  -- | Functions of arity 4 instance ( SymVal a,   HasKind a@@ -567,10 +559,10 @@    smtFunType _ = SBVType [kindOf (Proxy @a), kindOf (Proxy @b), kindOf (Proxy @c), kindOf (Proxy @d), kindOf (Proxy @r)] -  smtFunSaturate f = f (mkArg (kindOf (Proxy @a)))-                       (mkArg (kindOf (Proxy @b)))-                       (mkArg (kindOf (Proxy @c)))-                       (mkArg (kindOf (Proxy @d)))+  smtFunSaturate f = f (mkSaturatingArg (kindOf (Proxy @a)))+                       (mkSaturatingArg (kindOf (Proxy @b)))+                       (mkSaturatingArg (kindOf (Proxy @c)))+                       (mkSaturatingArg (kindOf (Proxy @d)))  -- | Functions of arity 5 instance ( SymVal a,   HasKind a@@ -586,11 +578,11 @@    smtFunType _ = SBVType [kindOf (Proxy @a), kindOf (Proxy @b), kindOf (Proxy @c), kindOf (Proxy @d), kindOf (Proxy @e), kindOf (Proxy @r)] -  smtFunSaturate f = f (mkArg (kindOf (Proxy @a)))-                       (mkArg (kindOf (Proxy @b)))-                       (mkArg (kindOf (Proxy @c)))-                       (mkArg (kindOf (Proxy @d)))-                       (mkArg (kindOf (Proxy @e)))+  smtFunSaturate f = f (mkSaturatingArg (kindOf (Proxy @a)))+                       (mkSaturatingArg (kindOf (Proxy @b)))+                       (mkSaturatingArg (kindOf (Proxy @c)))+                       (mkSaturatingArg (kindOf (Proxy @d)))+                       (mkSaturatingArg (kindOf (Proxy @e)))  -- | Functions of arity 6 instance ( SymVal a,   HasKind a@@ -607,12 +599,12 @@    smtFunType _ = SBVType [kindOf (Proxy @a), kindOf (Proxy @b), kindOf (Proxy @c), kindOf (Proxy @d), kindOf (Proxy @e), kindOf (Proxy @f), kindOf (Proxy @r)] -  smtFunSaturate f = f (mkArg (kindOf (Proxy @a)))-                       (mkArg (kindOf (Proxy @b)))-                       (mkArg (kindOf (Proxy @c)))-                       (mkArg (kindOf (Proxy @d)))-                       (mkArg (kindOf (Proxy @e)))-                       (mkArg (kindOf (Proxy @f)))+  smtFunSaturate f = f (mkSaturatingArg (kindOf (Proxy @a)))+                       (mkSaturatingArg (kindOf (Proxy @b)))+                       (mkSaturatingArg (kindOf (Proxy @c)))+                       (mkSaturatingArg (kindOf (Proxy @d)))+                       (mkSaturatingArg (kindOf (Proxy @e)))+                       (mkSaturatingArg (kindOf (Proxy @f)))  -- | Functions of arity 7 instance ( SymVal a,   HasKind a@@ -630,13 +622,13 @@    smtFunType _ = SBVType [kindOf (Proxy @a), kindOf (Proxy @b), kindOf (Proxy @c), kindOf (Proxy @d), kindOf (Proxy @e), kindOf (Proxy @f), kindOf (Proxy @g), kindOf (Proxy @r)] -  smtFunSaturate f = f (mkArg (kindOf (Proxy @a)))-                       (mkArg (kindOf (Proxy @b)))-                       (mkArg (kindOf (Proxy @c)))-                       (mkArg (kindOf (Proxy @d)))-                       (mkArg (kindOf (Proxy @e)))-                       (mkArg (kindOf (Proxy @f)))-                       (mkArg (kindOf (Proxy @g)))+  smtFunSaturate f = f (mkSaturatingArg (kindOf (Proxy @a)))+                       (mkSaturatingArg (kindOf (Proxy @b)))+                       (mkSaturatingArg (kindOf (Proxy @c)))+                       (mkSaturatingArg (kindOf (Proxy @d)))+                       (mkSaturatingArg (kindOf (Proxy @e)))+                       (mkSaturatingArg (kindOf (Proxy @f)))+                       (mkSaturatingArg (kindOf (Proxy @g)))  -- | Functions of arity 8 instance ( SymVal a,   HasKind a@@ -655,31 +647,47 @@    smtFunType _ = SBVType [kindOf (Proxy @a), kindOf (Proxy @b), kindOf (Proxy @c), kindOf (Proxy @d), kindOf (Proxy @e), kindOf (Proxy @f), kindOf (Proxy @g), kindOf (Proxy @h), kindOf (Proxy @r)] -  smtFunSaturate f = f (mkArg (kindOf (Proxy @a)))-                       (mkArg (kindOf (Proxy @b)))-                       (mkArg (kindOf (Proxy @c)))-                       (mkArg (kindOf (Proxy @d)))-                       (mkArg (kindOf (Proxy @e)))-                       (mkArg (kindOf (Proxy @f)))-                       (mkArg (kindOf (Proxy @g)))-                       (mkArg (kindOf (Proxy @h)))+  smtFunSaturate f = f (mkSaturatingArg (kindOf (Proxy @a)))+                       (mkSaturatingArg (kindOf (Proxy @b)))+                       (mkSaturatingArg (kindOf (Proxy @c)))+                       (mkSaturatingArg (kindOf (Proxy @d)))+                       (mkSaturatingArg (kindOf (Proxy @e)))+                       (mkSaturatingArg (kindOf (Proxy @f)))+                       (mkSaturatingArg (kindOf (Proxy @g)))+                       (mkSaturatingArg (kindOf (Proxy @h))) +-- Turn "((F (lambda ((x!1 Int)) (+ 3 (* 2 x!1)))))"+-- into something more palatable.+-- If we can't do that, we simply return the input unchanged+trimFunctionResponse :: String -> String -> Maybe [String] -> String+trimFunctionResponse resp nm mbArgs+  | Just parsed <- makeHaskellFunction resp nm mbArgs+  = parsed+  | True+  = def $ case trim resp of+            '(':'(':rest | nm `isPrefixOf` rest -> butLast2 $ trim (drop (length nm) rest)+            _                                   -> resp+  where trim     = dropWhile isSpace+        butLast2 = reverse . drop 2 . reverse+        def x = nm ++ " = fromSMTLib " ++ x+ -- | Generalization of 'Data.SBV.Control.getFunction'-getFunction :: (MonadIO m, MonadQuery m, SolverContext m, MonadSymbolic m, SymVal a, SymVal r, SMTFunction fun a r) => fun -> m ([(a, r)], r)-getFunction f = do nm <- smtFunName f+getFunction :: (MonadIO m, MonadQuery m, SolverContext m, MonadSymbolic m, SymVal a, SymVal r, SMTFunction fun a r)+            => fun -> m (Either String ([(a, r)], r))+getFunction f = do (nm, args) <- smtFunName f                     let cmd = "(get-value (" ++ nm ++ "))"                        bad = unexpected "getFunction" cmd "a function value" Nothing                     r <- ask cmd -                   parse r bad $ \case EApp [EApp [ECon o, e]] | o == nm -> do mbAssocs <- sexprToFun f e+                   parse r bad $ \case EApp [EApp [ECon o, e]] | o == nm -> do mbAssocs <- sexprToFun f (trimFunctionResponse r nm args, e)                                                                                case mbAssocs of-                                                                                 Just assocs -> return assocs-                                                                                 Nothing     -> do mbPVS <- pointWiseExtract nm (smtFunType f)-                                                                                                   case mbPVS >>= convert of-                                                                                                     Just x  -> return x-                                                                                                     Nothing -> bad r Nothing+                                                                                 Right assocs -> return $ Right assocs+                                                                                 Left  raw    -> do mbPVS <- pointWiseExtract nm (smtFunType f)+                                                                                                    case mbPVS >>= convert of+                                                                                                      Just x  -> return $ Right x+                                                                                                      Nothing -> return $ Left raw                                        _                                 -> bad r Nothing     where convert    (vs, d) = (,) <$> mapM sexprPoint vs <*> sexprToVal d           sexprPoint (as, v) = (,) <$> sexprToArg f as    <*> sexprToVal v@@ -999,14 +1007,14 @@                            _                                   -> bad r Nothing  -- | Generalization of 'Data.SBV.Control.getUICVal'-getUICVal :: forall m. (MonadIO m, MonadQuery m) => Maybe Int -> (String, SBVType) -> m CV-getUICVal mbi (nm, t) = case t of-                          SBVType [k] -> extractValue mbi nm k-                          _           -> error $ "SBV.getUICVal: Expected to be called on an uninterpeted value of a base type, received something else: " ++ show (nm, t)+getUICVal :: forall m. (MonadIO m, MonadQuery m) => Maybe Int -> (String, (Maybe [String], SBVType)) -> m CV+getUICVal mbi (nm, (_, t)) = case t of+                              SBVType [k] -> extractValue mbi nm k+                              _           -> error $ "SBV.getUICVal: Expected to be called on an uninterpeted value of a base type, received something else: " ++ show (nm, t)  -- | Generalization of 'Data.SBV.Control.getUIFunCVAssoc'-getUIFunCVAssoc :: forall m. (MonadIO m, MonadQuery m) => Maybe Int -> (String, SBVType) -> m ([([CV], CV)], CV)-getUIFunCVAssoc mbi (nm, typ) = do+getUIFunCVAssoc :: forall m. (MonadIO m, MonadQuery m) => Maybe Int -> (String, (Maybe [String], SBVType)) -> m (Either String ([([CV], CV)], CV))+getUIFunCVAssoc mbi (nm, (mbArgs, typ)) = do   let modelIndex = case mbi of                      Nothing -> ""                      Just i  -> " :model_index " ++ show i@@ -1029,22 +1037,24 @@       toRes :: SExpr -> Maybe CV       toRes = recoverKindedValue rt +      -- if we fail to parse, we'll return this answer as the string+      fallBack = trimFunctionResponse r nm mbArgs+       -- In case we end up in the pointwise scenario, boolify the result       -- as that's the only type we support here.-      tryPointWise bailOut = do mbSExprs <- pointWiseExtract nm typ-                                case mbSExprs of-                                  Nothing     -> bailOut-                                  Just sExprs -> maybe bailOut return (convert sExprs)+      tryPointWise = do mbSExprs <- pointWiseExtract nm typ+                        case mbSExprs of+                          Nothing     -> pure $ Left fallBack+                          Just sExprs -> pure $ maybe (Left fallBack) Right (convert sExprs) -  parse r bad $ \case EApp [EApp [ECon o, e]] | o == nm -> let bailOut = bad r Nothing-                                                           in case parseSExprFunction e of-                                                                Just (Right assocs) | Just res <- convert assocs                   -> return res-                                                                                    | True                                         -> tryPointWise bailOut+  parse r bad $ \case EApp [EApp [ECon o, e]] | o == nm -> case parseSExprFunction e of+                                                             Just (Right assocs) | Just res <- convert assocs                 -> return (Right res)+                                                                                 | True                                       -> tryPointWise -                                                                Just (Left nm')     | nm == nm', let res = defaultKindedValue rt -> return ([], res)-                                                                                    | True                                         -> bad r Nothing+                                                             Just (Left nm')     | nm == nm', let res = defaultKindedValue rt -> return (Right ([], res))+                                                                                 | True                                       -> bad r Nothing -                                                                Nothing                                                            -> tryPointWise bailOut+                                                             Nothing                                                          -> tryPointWise                        _                                 -> bad r Nothing @@ -1075,15 +1085,11 @@                                            _                -> bad r Nothing  -- | What are the top level inputs? Trackers are returned as top level existentials-getQuantifiedInputs :: (MonadIO m, MonadQuery m) => m UserInputs-getQuantifiedInputs = do State{rinps} <- queryState-                         (rQinps, rTrackers) <- liftIO $ getInputs <$> readIORef rinps--                         let trackers = (EX,) <$> rTrackers-                             -- separate the existential prefix, which will go first-                             (preQs, postQs) = S.spanl (\(q, _) -> q == EX) rQinps+getTopLevelInputs :: (MonadIO m, MonadQuery m) => m UserInputs+getTopLevelInputs = do State{rinps}                     <- queryState+                       Inputs{userInputs, internInputs} <- liftIO $ readIORef rinps -                         return $ preQs <> trackers <> postQs+                       pure $ userInputs <> internInputs  -- | Get observables, i.e., those explicitly labeled by the user with a call to 'Data.SBV.observe'. getObservables :: (MonadIO m, MonadQuery m) => m [(Name, CV)]@@ -1101,13 +1107,12 @@                     walk (F.toList rObs) []  -- | Get UIs, both constants and functions. This call returns both the before and after query ones.--- Generalization of 'Data.SBV.Control.getUIs'. Note that if we have an defined axiom, then it--- is not really a UI, so we drop those.-getUIs :: forall m. (MonadIO m, MonadQuery m) => m [(String, SBVType)]-getUIs = do State{rUIMap, raxioms, rIncState} <- queryState+-- Generalization of 'Data.SBV.Control.getUIs'.+getUIs :: forall m. (MonadIO m, MonadQuery m) => m [(String, (Maybe [String], SBVType))]+getUIs = do State{rUIMap, rDefns, rIncState} <- queryState             -- NB. no need to worry about new-defines, because we don't allow definitions once query mode starts-            defines <- do allAxs <- io $ readIORef raxioms-                          pure [nm | (True, nm, _) <- allAxs]+            defines <- do allDefs <- io $ readIORef rDefns+                          pure $ mapMaybe smtDefGivenName allDefs              prior <- io $ readIORef rUIMap             new   <- io $ readIORef rIncState >>= readIORef . rNewUIs@@ -1128,25 +1133,25 @@                       topState@State{rUsedKinds} <- queryState -                     ki    <- liftIO $ readIORef rUsedKinds-                     qinps <- getQuantifiedInputs+                     ki   <- liftIO $ readIORef rUsedKinds +                     allModelInputs    <- getTopLevelInputs                      allUninterpreteds <- getUIs                        -- Functions have at least two kinds in their type and all components must be "interpreted"-                     let allUiFuns = [u | satTrackUFs cfg                                         -- config says consider UIFs-                                        , u@(nm, SBVType as) <- allUninterpreteds, length as > 1  -- get the function ones-                                        , not (isNonModelVar cfg nm)                              -- make sure they aren't explicitly ignored+                     let allUiFuns = [u | allSatTrackUFs cfg                                           -- config says consider UIFs+                                        , u@(nm, (_, SBVType as)) <- allUninterpreteds, length as > 1  -- get the function ones+                                        , not (mustIgnoreVar cfg nm)                                    -- make sure they aren't explicitly ignored                                      ] -                         allUiRegs = [u | u@(nm, SBVType as) <- allUninterpreteds, length as == 1  -- non-function ones-                                        , not (isNonModelVar cfg nm)                               -- make sure not ignored+                         allUiRegs = [u | u@(nm, (_, SBVType as)) <- allUninterpreteds, length as == 1 -- non-function ones+                                        , not (mustIgnoreVar cfg nm)                                   -- make sure they aren't explicitly ignored                                      ]                           -- We can only "allSat" if all component types themselves are interpreted. (Otherwise                          -- there is no way to reflect back the values to the solver.)-                         collectAcceptable []                           sofar = return sofar-                         collectAcceptable ((nm, t@(SBVType ats)):rest) sofar+                         collectAcceptable []                                sofar = return sofar+                         collectAcceptable ((nm, (_, t@(SBVType ats))):rest) sofar                            | not (any hasUninterpretedSorts ats)                            = collectAcceptable rest (nm : sofar)                            | True@@ -1173,27 +1178,15 @@                                                        , "***             SBV will use equivalence classes to generate all-satisfying instances."                                                        ] -                     let allModelInputs  = prefixExistentials qinps-                         -- Add on observables only if we're not in a quantified context:-                         hasQuantifiers  = S.length allModelInputs /= S.length qinps -- i.e., we dropped something-                         grabObservables = not hasQuantifiers--                         vars :: S.Seq (SVal, NamedSymVar)-                         vars = let mkSVal :: NamedSymVar -> (SVal, NamedSymVar)-                                    mkSVal nm@(getSV -> sv) = (SVal (kindOf sv) (Right (cache (const (return sv)))), nm)--                                    ignored n = isNonModelVar cfg (T.unpack n) || "__internal_sbv" `T.isPrefixOf` n--                                in fmap (mkSVal . namedSymVar)-                                   . S.filter (not . ignored . getUserName . namedSymVar)-                                   $ allModelInputs+                     -- Drop the things that are not model vars or internal+                     let vars :: S.Seq (SVal, NamedSymVar)+                         vars = let mkSVal nm@(getSV -> sv) = (SVal (kindOf sv) (Right (cache (const (return sv)))), nm) -                         -- If we have any universals, then the solutions are unique upto prefix existentials.-                         w = ALL `elem` F.toList (quantifier <$> qinps)+                                    ignored k = mustIgnoreVar cfg (getUserName' k) +                                in mkSVal <$> S.filter (not . ignored) allModelInputs                       -- We can go fast using the disjoint model trick if things are simple enough:-                     --     - No quantifiers                      --     - No uninterpreted functions (uninterpreted values are OK)                      --     - No uninterpreted sorts                      --@@ -1206,25 +1199,24 @@                      -- previous model and asking for a new one. If they don't exist (which is the common case anyhow)                      -- we use an idea due to z3 folks <http://theory.stanford.edu/%7Enikolaj/programmingz3.html#sec-blocking-evaluations>                      -- which splits the search space into disjoint models and can produce results much more quickly.-                     let isSimple = null allUiFuns && null usorts && not hasQuantifiers+                     let isSimple = null allUiFuns && null usorts                           start = AllSatResult { allSatMaxModelCountReached  = False-                                              , allSatHasPrefixExistentials = w                                               , allSatSolverReturnedUnknown = False                                               , allSatSolverReturnedDSat    = False                                               , allSatResults               = []                                               }                       if isSimple-                        then do let mkVar :: (String, SBVType) -> IO (SVal, NamedSymVar)-                                    mkVar (nm, SBVType [k]) = do sv <- newExpr topState k (SBVApp (Uninterpreted nm) [])-                                                                 let sval = SVal k $ Right $ cache $ \_ -> pure sv-                                                                     nsv  = NamedSymVar sv (T.pack nm)-                                                                 pure (sval, nsv)+                        then do let mkVar :: (String, (Maybe [String], SBVType)) -> IO (SVal, NamedSymVar)+                                    mkVar (nm, (_, SBVType [k])) = do sv <- newExpr topState k (SBVApp (Uninterpreted nm) [])+                                                                      let sval = SVal k $ Right $ cache $ \_ -> pure sv+                                                                          nsv  = NamedSymVar sv (T.pack nm)+                                                                      pure (sval, nsv)                                     mkVar nmt = error $ "Data.SBV: Impossible happened; allSat.mkVar. Unexpected: " ++ show nmt                                 uiVars <- io $ S.fromList <$> mapM mkVar allUiRegs-                                fastAllSat grabObservables                                        qinps (uiVars S.>< vars) cfg start-                        else    loop       grabObservables topState (allUiFuns, uiFuns) allUiRegs qinps              vars  cfg start+                                fastAllSat                                        allModelInputs (uiVars S.>< vars) cfg start+                        else    loop       topState (allUiFuns, uiFuns) allUiRegs allModelInputs              vars  cfg start     where isFree (KUserSort _ Nothing) = True          isFree _                     = False@@ -1239,8 +1231,8 @@                              Nothing -> pure ()                              Just m  -> io $ putStrLn m -         fastAllSat :: Bool -> S.Seq (Quantifier, NamedSymVar) -> S.Seq (SVal, NamedSymVar) -> SMTConfig -> AllSatResult -> m AllSatResult-         fastAllSat grabObservables qinps vars cfg start = do+         fastAllSat :: S.Seq NamedSymVar -> S.Seq (SVal, NamedSymVar) -> SMTConfig -> AllSatResult -> m AllSatResult+         fastAllSat allInputs vars cfg start = do                 result <- io $ newIORef (0, start, False, Nothing)                 go result vars                 (found, sofar, _, extra) <- io $ readIORef result@@ -1294,20 +1286,15 @@                                       Sat    -> do assocs <- mapM (\(sval, NamedSymVar sv n) -> do !cv <- getValueCV Nothing sv                                                                                                    return (sv, (n, (sval, cv)))) vars -                                                   bindings <- let grab i@(ALL, _)          = return (i, Nothing)-                                                                   grab i@(EX, getSV -> sv) = case lookupInput fst sv assocs of-                                                                                                Just (_, (_, (_, cv))) -> return (i, Just cv)-                                                                                                Nothing                -> do !cv <- getValueCV Nothing sv-                                                                                                                             return (i, Just cv)+                                                   bindings <- let grab i@(getSV -> sv) = case lookupInput fst sv assocs of+                                                                                            Just (_, (_, (_, cv))) -> return (i, cv)+                                                                                            Nothing                -> do !cv <- getValueCV Nothing sv+                                                                                                                         return (i, cv)                                                                in if validationRequested cfg-                                                                  then Just <$> mapM grab qinps+                                                                  then Just <$> mapM grab allInputs                                                                   else return Nothing -                                                   -- Add on observables if we're asked to do so:-                                                   obsvs <- if grabObservables-                                                               then getObservables-                                                               else do queryDebug ["*** In a quantified context, observables will not be printed."]-                                                                       return mempty+                                                   obsvs <- getObservables                                                     let lassocs = F.toList assocs                                                        model   = SMTModel { modelObjectives = []@@ -1330,7 +1317,7 @@                                                                                            _               -> error $ "Data.SBV: Cannot uniquely determine " ++ show nm ++ " in " ++ show assocs                                                         cstr :: Bool -> (SVal, CV) -> m ()-                                                       cstr shouldReject (sv, cv) = constrain $ SBV $ mkEq (kindOf sv) sv (SVal (kindOf sv) (Left cv))+                                                       cstr shouldReject (sv, cv) = constrain (SBV $ mkEq (kindOf sv) sv (SVal (kindOf sv) (Left cv)) :: SBool)                                                          where mkEq :: Kind -> SVal -> SVal -> SVal                                                                mkEq k a b                                                                 | isDouble k || isFloat k || isFP k@@ -1368,7 +1355,7 @@           -- All sat loop. This is slower, as it implements the reject-the-previous model and loop around logic. But          -- it can handle uninterpreted sorts; so we keep it here as a fall-back.-         loop grabObservables topState (allUiFuns, uiFunsToReject) allUiRegs qinps vars cfg = go (1::Int)+         loop topState (allUiFuns, uiFunsToReject) allUiRegs allInputs vars cfg = go (1::Int)            where go :: Int -> AllSatResult -> m AllSatResult                  go !cnt !sofar                    | Just maxModels <- allSatMaxModelCount cfg, cnt > maxModels@@ -1399,25 +1386,20 @@                           Sat    -> do assocs <- mapM (\(sval, NamedSymVar sv n) -> do !cv <- getValueCV Nothing sv                                                                                        return (sv, (n, (sval, cv)))) vars -                                       let getUIFun ui@(nm, t) = do cvs <- getUIFunCVAssoc Nothing ui-                                                                    return (nm, (t, cvs))+                                       let getUIFun ui@(nm, (_, t)) = do cvs <- getUIFunCVAssoc Nothing ui+                                                                         return (nm, (t, cvs))                                        uiFunVals <- mapM getUIFun allUiFuns                                         uiRegVals <- mapM (\ui@(nm, _) -> (nm,) <$> getUICVal Nothing ui) allUiRegs -                                       -- Add on observables if we're asked to do so:-                                       obsvs <- if grabObservables-                                                   then getObservables-                                                   else do queryDebug ["*** In a quantified context, observables will not be printed."]-                                                           return mempty+                                       obsvs <- getObservables -                                       bindings <- let grab i@(ALL, _)          = return (i, Nothing)-                                                       grab i@(EX, getSV -> sv) = case lookupInput fst sv assocs of-                                                                                Just (_, (_, (_, cv))) -> return (i, Just cv)+                                       bindings <- let grab i@(getSV -> sv) = case lookupInput fst sv assocs of+                                                                                Just (_, (_, (_, cv))) -> return (i, cv)                                                                                 Nothing                -> do !cv <- getValueCV Nothing sv-                                                                                                             return (i, Just cv)+                                                                                                             return (i, cv)                                                    in if validationRequested cfg-                                                         then Just <$> mapM grab qinps+                                                         then Just <$> mapM grab allInputs                                                          else return Nothing                                         let model = SMTModel { modelObjectives = []@@ -1477,8 +1459,30 @@                                                       (rejects, defs) = unzip [mkNotEq ui | ui@(nm, _) <- uiFunVals, nm `elem` uiFunsToReject] -                                                     -- Otherwise, we have things to refute, go for it:-                                                     mkNotEq (nm, (SBVType ts, vs)) = (reject, def ++ dif)+                                                     -- Otherwise, we have things to refute, go for it if we have a good interpretation for it+                                                     mkNotEq (nm, (typ, Left def)) =+                                                        error $ unlines [+                                                            ""+                                                          , "*** allSat: Unsupported: Building a rejecting instance for:"+                                                          , "***"+                                                          , "***     " ++ nm ++ " :: " ++ show typ+                                                          , "***     " ++ def+                                                          , "***"+                                                          , "*** At this time, SBV cannot compute allSat when the model has a non-table definition."+                                                          , "***"+                                                          , "*** You can ignore specific functions via the 'isNonModelVar' filter:"+                                                          , "***"+                                                          , "***    allSatWith z3{isNonModelVar = (`elem` [" ++ show nm ++ "])} ..."+                                                          , "***"+                                                          , "*** Or you can ignore all uninterpreted functions for all-sat purposes using the 'allSatTrackUFs' parameter:"+                                                          , "***"+                                                          , "***    allSatWith z3{allSatTrackUFs = False} ..."+                                                          , "***"+                                                          , "*** You can see the response from the solver by running with the '{verbose = True}' option."+                                                          , "***"+                                                          , "*** NB. If this is a use case you'd like SBV to support, please get in touch!"+                                                          ]+                                                     mkNotEq (nm, (SBVType ts, Right vs)) = (reject, def ++ dif)                                                        where nm' = nm ++ "_model" ++ show cnt                                                               reject = nm' ++ "_reject"@@ -1639,23 +1643,11 @@  -- | Convert a query result to an SMT Problem runProofOn :: SBVRunMode -> QueryContext -> [String] -> Result -> SMTProblem-runProofOn rm context comments res@(Result ki _qcInfo _observables _codeSegs is consts tbls arrs uis axs pgm cstrs _assertions outputs) =+runProofOn rm context comments res@(Result progInfo ki _qcInfo _observables _codeSegs is consts tbls arrs 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 -         flipQ (ALL, x) = (EX,  x)-         flipQ (EX,  x) = (ALL, x)--         skolemize :: [(Quantifier, NamedSymVar)] -> [Either SV (SV, [SV])]-         skolemize quants = go quants ([], [])-           where go []                        (_,  sofar) = reverse sofar-                 go ((ALL, getSV -> v) :rest) (us, sofar) = go rest (v:us, Left v : sofar)-                 go ((EX,  getSV -> v) :rest) (us, sofar) = go rest (us,   Right (v, reverse us) : sofar)--         qinps      = if isSat then fst is else map flipQ (fst is)-         skolemMap  = skolemize qinps-          o | isSafe = trueSV            | True   = case outputs of                         []  | isSetup -> trueSV@@ -1669,7 +1661,7 @@                                                , "*** Check calls to \"output\", they are typically not needed!"                                                ] -     in SMTProblem { smtLibPgm = toSMTLib config context ki isSat comments is skolemMap consts tbls arrs uis axs pgm cstrs o }+     in SMTProblem { smtLibPgm = toSMTLib config context progInfo ki isSat comments is consts tbls arrs uis defns pgm cstrs o }  -- | Generalization of 'Data.SBV.Control.executeQuery' executeQuery :: forall m a. ExtractIO m => QueryContext -> QueryT m a -> SymbolicT m a@@ -1682,62 +1674,6 @@                       (QueryInternal, _)                                -> return ()  -- no worries, internal                       (QueryExternal, SMTMode QueryExternal ISetup _ _) -> return () -- legitimate runSMT call                       _                                                 -> invalidQuery rm--     -- If we're doing an external query, then we cannot allow quantifiers to be present. Why?-     -- Consider:-     ---     --      issue = do x :: SBool <- sbvForall_-     --                 y :: SBool <- sbvExists_-     --                 constrain y-     --                 query $ do checkSat-     --                         (,) <$> getValue x <*> getValue y-     ---     -- This is the (simplified/annotated SMTLib we would generate:)-     ---     --     (declare-fun s1 (Bool) Bool)   ; s1 is the function that corresponds to the skolemized 'y'-     --     (assert (forall ((s0 Bool))    ; s0 is 'x'-     --                 (s1 s0)))          ; s1 applied to s0 is the actual 'y'-     --     (check-sat)-     --     (get-value (s0))        ; s0 simply not visible here-     --     (get-value (s1))        ; s1 is visible, but only via 's1 s0', so it is also not available.-     ---     -- And that would be terrible! The scoping rules of our "quantified" variables and how they map to-     -- SMTLib is just not compatible. This is a historical design issue, but too late at this point. (We-     -- should've never allowed general quantification like this, but only in limited contexts.)-     ---     -- So, we check if this is an external-query, and if there are quantified variables. If so, we-     -- cowardly refuse to continue. For details, see: <http://github.com/LeventErkok/sbv/issues/407>-     ---     -- However, as discussed in <https://github.com/LeventErkok/sbv/issues/459>, we'll allow for this-     -- if the user explicitly asks as to do so. In that case, all bets are off!--     let allowQQs = case rm of-                      SMTMode _ _ _ cfg -> allowQuantifiedQueries cfg-                      CodeGen           -> False -- doesn't matter in these two-                      Concrete{}        -> False -- cases, but we're being careful--     () <- unless allowQQs $ liftIO $-                    case queryContext of-                      QueryInternal -> return ()         -- we're good, internal usages don't mess with scopes-                      QueryExternal -> do-                        userInps  <- userInputsToList . userInputs <$> readIORef (rinps st)-                        let badInps = reverse [n | (ALL, getUserName' -> n) <- userInps]-                        case badInps of-                          [] -> return ()-                          _  -> let plu | length badInps > 1 = "s require"-                                        | True               = " requires"-                                in error $ unlines [ ""-                                                   , "*** Data.SBV: Unsupported query call in the presence of quantified inputs."-                                                   , "***"-                                                   , "*** The following variable" ++ plu ++ " explicit quantification: "-                                                   , "***"-                                                   , "***    " ++ intercalate ", " badInps-                                                   , "***"-                                                   , "*** While quantification and queries can co-exist in principle, SBV currently"-                                                   , "*** does not support this scenario. Avoid using quantifiers with user queries"-                                                   , "*** if possible. Please do get in touch if your use case does require such"-                                                   , "*** a feature to see how we can accommodate such scenarios."-                                                   ]       case rm of         -- Transitioning from setup
Data/SBV/Core/Data.hs view
@@ -21,7 +21,9 @@ {-# LANGUAGE PatternGuards         #-} {-# LANGUAGE ScopedTypeVariables   #-} {-# LANGUAGE TypeApplications      #-}+{-# LANGUAGE TypeOperators         #-} {-# LANGUAGE TypeFamilies          #-}+{-# LANGUAGE UndecidableInstances  #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -48,7 +50,7 @@  , sbvToSV, sbvToSymSV, forceSVArg  , SBVExpr(..), newExpr  , cache, Cached, uncache, uncacheAI, HasKind(..)- , Op(..), PBOp(..), FPOp(..), StrOp(..), RegExOp(..), SeqOp(..), RegExp(..), NamedSymVar(..), getTableIndex+ , Op(..), PBOp(..), FPOp(..), StrOp(..), RegExOp(..), SeqOp(..), RegExp(..), NamedSymVar(..), OvOp(..), getTableIndex  , SBVPgm(..), Symbolic, runSymbolic, State, getPathCondition, extendPathCondition  , inSMTMode, SBVRunMode(..), Kind(..), Outputtable(..), Result(..)  , SolverContext(..), internalVariable, internalConstraint, isCodeGenMode@@ -59,26 +61,31 @@  , extractSymbolicSimulationState  , SMTScript(..), Solver(..), SMTSolver(..), SMTResult(..), SMTModel(..), SMTConfig(..)  , OptimizeStyle(..), Penalty(..), Objective(..)- , QueryState(..), QueryT(..), SMTProblem(..)+ , QueryState(..), QueryT(..), SMTProblem(..), Constraint(..), Lambda(..), Forall(..), Exists(..), ExistsUnique(..), ForallN(..), ExistsN(..)+ , QuantifiedBool(..), EqSymbolic(..), QNot(..), Skolemize(skolemize, taggedSkolemize)  ) where -import GHC.TypeLits+import GHC.TypeLits (KnownNat, Nat, Symbol, KnownSymbol, symbolVal, AppendSymbol) -import GHC.Generics (Generic) import GHC.Exts     (IsList(..))  import Control.DeepSeq        (NFData(..))-import Control.Monad.Trans    (liftIO)+import Control.Monad          (void, replicateM)+import Control.Monad.Trans    (liftIO, MonadIO) import Data.Int               (Int8, Int16, Int32, Int64) import Data.Word              (Word8, Word16, Word32, Word64) import Data.List              (elemIndex) import Data.Maybe             (fromMaybe) +import Data.Kind (Type) import Data.Proxy import Data.Typeable          (Typeable) -import qualified Data.Generics as G    (Data(..))+import GHC.Generics (Generic, U1(..), M1(..), (:*:)(..), K1(..), (:+:)(..))+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) @@ -292,7 +299,7 @@ -- | Symbolic implication infixr 1 .=> (.=>) :: SBool -> SBool -> SBool-x .=> y = sNot x .|| y+SBV x .=> SBV y = SBV (x `svImplies` y) -- NB. Do *not* try to optimize @x .=> x = True@ here! If constants go through, it'll get simplified. -- The case "x .=> x" can hit is extremely rare, and the getAllSatResult function relies on this -- trick to generate constraints in the unlucky case of ui-function models.@@ -300,7 +307,7 @@ -- | Symbolic boolean equivalence infixr 1 .<=> (.<=>) :: SBool -> SBool -> SBool-x .<=> y = (x .&& y) .|| (sNot x .&& sNot y)+SBV x .<=> SBV y = SBV (x `svEqual` y)  -- | Conversion from 'Bool' to 'SBool' fromBool :: Bool -> SBool@@ -403,45 +410,132 @@         st <- symbolicEnv         liftIO $ sbvToSV st sbv +-- | Values that we can turn into a constraint+class MonadSymbolic m => Constraint m a where+  mkConstraint :: State -> a -> m ()++-- | Base case: simple booleans+instance MonadSymbolic m => Constraint m SBool where+  mkConstraint _ out = void $ output out++-- | An existential symbolic variable, used in building quantified constraints. The name+-- attached via the symbol is used during skolemization to create a skolem-function name+-- when this variable is eliminated.+newtype Exists (nm :: Symbol) a = Exists (SBV a)++-- | An existential unique symbolic variable, used in building quantified constraints. The name+-- attached via the symbol is used during skolemization. It's split into two extra names, suffixed+-- @_eu1@ and @_eu2@, to name the universals in the equivalent formula:+-- \(\exists! x\,P(x)\Leftrightarrow \exists x\,P(x) \land \forall x_{eu1} \forall x_{eu2} (P(x_{eu1}) \land P(x_{eu2}) \Rightarrow x_{eu1} = x_{eu2}) \)+newtype ExistsUnique (nm :: Symbol) a = ExistsUnique (SBV a)++-- | A universal symbolic variable, used in building quantified constraints. The name attached via the symbol is used+-- during skolemization. It names the corresponding argument to the skolem-functions within the scope of this quantifier.+newtype Forall (nm :: Symbol) a = Forall (SBV a)++-- | Exactly @n@ existential symbolic variables, used in building quantified constraints. The name attached+-- will be prefixed in front of @_1@, @_2@, ..., @_n@ to form the names of the variables.+newtype ExistsN (n :: Nat) (nm :: Symbol) a = ExistsN [SBV a]++-- | Exactly @n@ universal symbolic variables, used in in building quantified constraints. The name attached+-- will be prefixed in front of @_1@, @_2@, ..., @_n@ to form the names of the variables.+newtype ForallN (n :: Nat) (nm :: Symbol) a = ForallN [SBV a]++-- | make a quantifier argument in the given state+mkQArg :: forall m a. (HasKind a, MonadIO m) => State -> Quantifier -> m (SBV a)+mkQArg st q = do let k = kindOf (Proxy @a)+                 sv <- liftIO $ quantVar q st k+                 pure $ SBV $ SVal k (Right (cache (const (return sv))))++-- | Functions of a single existential+instance (SymVal a, Constraint m r) => Constraint m (Exists nm a -> r) where+  mkConstraint st fn = mkQArg st EX >>= mkConstraint st . fn . Exists++-- | Functions of a unique single existential+instance (SymVal a, Constraint m r, EqSymbolic (SBV a), QuantifiedBool r) => Constraint m (ExistsUnique nm a -> r) where+  mkConstraint st = mkConstraint st . rewriteExistsUnique++-- | Functions of a number of existentials+instance (KnownNat n, SymVal a, Constraint m r) => Constraint m (ExistsN n nm a -> r) where+  mkConstraint st fn = replicateM (intOfProxy (Proxy @n)) (mkQArg st EX) >>= mkConstraint st . fn . ExistsN++-- | Functions of a single universal+instance (SymVal a, Constraint m r) => Constraint m (Forall nm a -> r) where+  mkConstraint st fn = mkQArg st ALL >>= mkConstraint st . fn . Forall++-- | Functions of a number of universals+instance (KnownNat n, SymVal a, Constraint m r) => Constraint m (ForallN n nm a -> r) where+  mkConstraint st fn = replicateM (intOfProxy (Proxy @n)) (mkQArg st ALL) >>= mkConstraint st . fn . ForallN++-- | Values that we can turn into a lambda abstraction+class MonadSymbolic m => Lambda m a where+  mkLambda :: State -> a -> m ()++-- | Base case, simple values+instance MonadSymbolic m => Lambda m (SBV a) where+  mkLambda _ out = void $ output out++-- | Functions+instance (SymVal a, Lambda m r) => Lambda m (SBV a -> r) where+  mkLambda st fn = mkArg >>= mkLambda st . fn+    where mkArg = do let k = kindOf (Proxy @a)+                     sv <- liftIO $ lambdaVar st k+                     pure $ SBV $ SVal k (Right (cache (const (return sv))))++-- | A value that can be used as a quantified boolean+class QuantifiedBool a where+  -- | Turn a quantified boolean into a regular boolean. That is, this function turns an exists/forall quantified+  -- formula to a simple boolean that can be used as a regular boolean value. An example is:+  --+  -- @+  --   quantifiedBool $ \\(Forall x) (Exists y) -> y .> (x :: SInteger)+  -- @+  --+  -- is equivalent to `sTrue`. You can think of this function as performing quantifier-elimination: It takes+  -- a quantified formula, and reduces it to a simple boolean that is equivalent to it, but has no quantifiers.+  quantifiedBool :: a -> SBool++-- | Base case of quantification, simple booleans+instance {-# OVERLAPPING #-} QuantifiedBool SBool where+  quantifiedBool = id+ -- | Actions we can do in a context: Either at problem description -- time or while we are dynamically querying. 'Symbolic' and 'Query' are -- two instances of this class. Note that we use this mechanism -- internally and do not export it from SBV. class SolverContext m where    -- | Add a constraint, any satisfying instance must satisfy this condition.-   constrain :: SBool -> m ()+   constrain :: QuantifiedBool a => a -> m ()+    -- | Add a soft constraint. The solver will try to satisfy this condition if possible, but won't if it cannot.-   softConstrain :: SBool -> m ()+   softConstrain :: QuantifiedBool a => a -> m ()+    -- | Add a named constraint. The name is used in unsat-core extraction.-   namedConstraint :: String -> SBool -> m ()+   namedConstraint :: QuantifiedBool a => String -> a -> m ()+    -- | Add a constraint, with arbitrary attributes.-   constrainWithAttribute :: [(String, String)] -> SBool -> m ()+   constrainWithAttribute :: QuantifiedBool a => [(String, String)] -> a -> m ()+    -- | Set info. Example: @setInfo ":status" ["unsat"]@.    setInfo :: String -> [String] -> m ()+    -- | Set an option.    setOption :: SMTOption -> m ()+    -- | Set the logic.    setLogic :: Logic -> m ()-   -- | Add a user specified axiom to the generated SMT-Lib file. The first argument is a mere-   -- string, use for commenting purposes. The second argument is intended to hold the multiple-lines-   -- of the axiom text as expressed in SMT-Lib notation. Note that we perform no checks on the axiom-   -- itself, to see whether it's actually well-formed or is sensible by any means.-   -- A separate formalization of SMT-Lib would be very useful here.-   addAxiom :: String -> [String] -> m ()-   -- | Add a user-defined SMTLib function. You should define the name given here as an uninterpreted-   -- value as well. SBV performs no checks on the SMTLib definition you give, so if it doesn't match-   -- the required type, or is malformed in any way, the call will fail at run-time.-   addSMTDefinition :: String -> [String] -> m ()+    -- | Set a solver time-out value, in milli-seconds. This function    -- essentially translates to the SMTLib call @(set-info :timeout val)@,    -- and your backend solver may or may not support it! The amount given    -- is in milliseconds. Also see the function 'Data.SBV.Control.timeOut' for finer level    -- control of time-outs, directly from SBV.    setTimeOut :: Integer -> m ()+    -- | Get the state associated with this context    contextState :: m State -   {-# MINIMAL constrain, softConstrain, namedConstraint, constrainWithAttribute, setOption, addAxiom, addSMTDefinition, contextState #-}+   {-# MINIMAL constrain, softConstrain, namedConstraint, constrainWithAttribute, setOption, contextState #-}     -- time-out, logic, and info are  simply options in our implementation, so default implementation suffices    setTimeOut t = setOption $ OptionKeyword ":timeout" [show t]@@ -492,10 +586,13 @@ class (HasKind a, Typeable a) => SymVal a where   -- | Generalization of 'Data.SBV.mkSymVal'   mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV a)+   -- | Turn a literal constant to symbolic   literal :: a -> SBV a+   -- | Extract a literal, from a CV representation   fromCV :: CV -> a+   -- | Does it concretely satisfy the given predicate?   isConcretely :: SBV a -> (a -> Bool) -> Bool @@ -530,30 +627,6 @@     | Just i <- unliteral s = p i     | True                  = False -  -- | Generalization of 'Data.SBV.sbvForall'-  sbvForall :: MonadSymbolic m => String -> m (SBV a)-  sbvForall = mkSymVal (NonQueryVar (Just ALL)) . Just--  -- | Generalization of 'Data.SBV.sbvForall_'-  sbvForall_ :: MonadSymbolic m => m (SBV a)-  sbvForall_ = mkSymVal (NonQueryVar (Just ALL)) Nothing--  -- | Generalization of 'Data.SBV.mkForallVars'-  mkForallVars :: MonadSymbolic m => Int -> m [SBV a]-  mkForallVars n = mapM (const sbvForall_) [1 .. n]--  -- | Generalization of 'Data.SBV.sbvExists'-  sbvExists :: MonadSymbolic m => String -> m (SBV a)-  sbvExists = mkSymVal (NonQueryVar (Just EX)) . Just--  -- | Generalization of 'Data.SBV.sbvExists_'-  sbvExists_ :: MonadSymbolic m => m (SBV a)-  sbvExists_ = mkSymVal (NonQueryVar (Just EX)) Nothing--  -- | Generalization of 'Data.SBV.mkExistVars'-  mkExistVars :: MonadSymbolic m => Int -> m [SBV a]-  mkExistVars n = mapM (const sbvExists_) [1 .. n]-   -- | Generalization of 'Data.SBV.free'   free :: MonadSymbolic m => String -> m (SBV a)   free = mkSymVal (NonQueryVar Nothing) . Just@@ -615,25 +688,31 @@ -- 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)+  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)+  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+  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+  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+  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+  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 -> Maybe (SBV b) -> State -> IO (array a b)+  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   mbVal-  newArray nm mbVal = symbolicEnv >>= liftIO . newArrayInState (Just nm) mbVal+  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:@@ -672,15 +751,234 @@                             iSV <- sbvToSV st iVal -                           let upd  = IMap.insert (unArrayIndex k) ("array_" ++ show k, ks, ArrayFree (Just iSV))+                           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 -> Maybe (SBV b) -> State -> IO (SArray a b)-  newArrayInState mbNm mbVal st = do mapM_ (registerKind st) [aknd, bknd]-                                     SArray <$> newSArr st (aknd, bknd) (mkNm mbNm) (unSBV <$> mbVal)+  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.+--+-- Minimal complete definition: None, if the type is instance of @Generic@. Otherwise '(.==)'.+infix 4 .==, ./=, .===, ./==+class EqSymbolic a where+  -- | Symbolic equality.+  (.==) :: a -> a -> SBool+  -- | Symbolic inequality.+  (./=) :: a -> a -> SBool+  -- | Strong equality. On floats ('SFloat'/'SDouble'), strong equality is object equality; that+  -- is @NaN == NaN@ holds, but @+0 == -0@ doesn't. On other types, (.===) is simply (.==).+  -- Note that (.==) is the /right/ notion of equality for floats per IEEE754 specs, since by+  -- definition @+0 == -0@ and @NaN@ equals no other value including itself. But occasionally+  -- we want to be stronger and state @NaN@ equals @NaN@ and @+0@ and @-0@ are different from+  -- each other. In a context where your type is concrete, simply use `Data.SBV.fpIsEqualObject`. But in+  -- a polymorphic context, use the strong equality instead.+  --+  -- NB. If you do not care about or work with floats, simply use (.==) and (./=).+  (.===) :: a -> a -> SBool+  -- | Negation of strong equality. Equaivalent to negation of (.===) on all types.+  (./==) :: a -> a -> SBool++  -- | Returns (symbolic) 'sTrue' if all the elements of the given list are different.+  distinct :: [a] -> SBool++  -- | Returns (symbolic) `sTrue` if all the elements of the given list are different. The second+  -- list contains exceptions, i.e., if an element belongs to that set, it will be considered+  -- distinct regardless of repetition.+  distinctExcept :: [a] -> [a] -> SBool++  -- | Returns (symbolic) 'sTrue' if all the elements of the given list are the same.+  allEqual :: [a] -> SBool++  -- | Symbolic membership test.+  sElem    :: a -> [a] -> SBool++  -- | Symbolic negated membership test.+  sNotElem :: a -> [a] -> SBool++  x ./=  y = sNot (x .==  y)+  x .=== y = x .== y+  x ./== y = sNot (x .=== y)++  allEqual []     = sTrue+  allEqual (x:xs) = sAll (x .==) xs++  -- Default implementation of 'distinct'. Note that we override+  -- this method for the base types to generate better code.+  distinct []     = sTrue+  distinct (x:xs) = sAll (x ./=) xs .&& distinct xs++  -- Default implementation of 'distinctExcept'. Note that we override+  -- this method for the base types to generate better code.+  distinctExcept es ignored = go es+    where isIgnored = (`sElem` ignored)++          go []     = sTrue+          go (x:xs) = let xOK  = isIgnored x .|| sAll (\y -> isIgnored y .|| x ./= y) xs+                      in xOK .&& go xs++  x `sElem`    xs = sAny (.== x) xs+  x `sNotElem` xs = sNot (x `sElem` xs)++  -- Default implementation for '(.==)' if the type is 'Generic'+  default (.==) :: (G.Generic a, GEqSymbolic (G.Rep a)) => a -> a -> SBool+  (.==) = symbolicEqDefault++-- | Default implementation of symbolic equality, when the underlying type is generic+-- Not exported, used with automatic deriving.+symbolicEqDefault :: (G.Generic a, GEqSymbolic (G.Rep a)) => a -> a -> SBool+symbolicEqDefault x y = symbolicEq (G.from x) (G.from y)++-- | Not exported, used for implementing generic equality.+class GEqSymbolic f where+  symbolicEq :: f a -> f a -> SBool++instance GEqSymbolic U1 where+  symbolicEq _ _ = sTrue++instance (EqSymbolic c) => GEqSymbolic (K1 i c) where+  symbolicEq (K1 x) (K1 y) = x .== y++instance (GEqSymbolic f) => GEqSymbolic (M1 i c f) where+  symbolicEq (M1 x) (M1 y) = symbolicEq x y++instance (GEqSymbolic f, GEqSymbolic g) => GEqSymbolic (f :*: g) where+  symbolicEq (x1 :*: y1) (x2 :*: y2) = symbolicEq x1 x2 .&& symbolicEq y1 y2++instance (GEqSymbolic f, GEqSymbolic g) => GEqSymbolic (f :+: g) where+  symbolicEq (L1 l) (L1 r) = symbolicEq l r+  symbolicEq (R1 l) (R1 r) = symbolicEq l r+  symbolicEq (L1 _) (R1 _) = sFalse+  symbolicEq (R1 _) (L1 _) = sFalse++-- | A class of values that can be skolemized. Note that we don't export this class. Use+-- the 'skolemize' function instead.+class Skolemize a where+  type SkolemsTo a :: Type+  skolem :: String -> [(SVal, String)] -> a -> SkolemsTo a++  -- | Skolemization. For any formula, skolemization gives back an equisatisfiable formula that+  -- has no existential quantifiers in it. You have to provide enough names for all the+  -- existentials in the argument. (Extras OK, so you can pass an infinite list if you like.)+  -- The names should be distinct, and also different from any other uninterpreted name+  -- you might have elsewhere.+  skolemize :: (Constraint Symbolic (SkolemsTo a), Skolemize a) => a -> SkolemsTo a+  skolemize = skolem "" []++  -- | If you use the same names for skolemized arguments in different functions, they will+  -- collide; which is undesirable. Unfortunately there's no easy way for SBV to detect this.+  -- In such cases, use 'taggedSkolemize' to add a scope to the skolem-function names generated.+  taggedSkolemize :: (Constraint Symbolic (SkolemsTo a), Skolemize a) => String -> a -> SkolemsTo a+  taggedSkolemize scope = skolem (scope ++ "_") []++-- | Base case; pure symbolic values+instance Skolemize (SBV a) where+  type SkolemsTo (SBV a) = SBV a+  skolem _ _ = id++-- | Skolemize over a universal quantifier+instance (KnownSymbol nm, Skolemize r) => Skolemize (Forall nm a -> r) where+  type SkolemsTo (Forall nm a -> r) = Forall nm a -> SkolemsTo r+  skolem scope args f arg@(Forall a) = skolem scope (args ++ [(unSBV a, symbolVal (Proxy @nm))]) (f arg)++-- | Skolemize over a number of universal quantifiers+instance (KnownSymbol nm, Skolemize r) => Skolemize (ForallN n nm a -> r) where+  type SkolemsTo (ForallN n nm a -> r) = ForallN n nm a -> SkolemsTo r+  skolem scope args f arg@(ForallN xs) = skolem scope (args ++ zipWith grab xs [(1::Int)..]) (f arg)+    where pre = symbolVal (Proxy @nm)+          grab x i = (unSBV x, pre ++ "_" ++ show i)++-- | Skolemize over an existential quantifier+instance (HasKind a, KnownSymbol nm, Skolemize r) => Skolemize (Exists nm a -> r) where+  type SkolemsTo (Exists nm a -> r) = SkolemsTo r+  skolem scope args f = skolem scope args (f (Exists skolemized))+    where skolemized = SBV $ svUninterpretedNamedArgs (kindOf (Proxy @a)) (scope ++ symbolVal (Proxy @nm)) UINone args++-- | Skolemize over a number of existential quantifiers+instance (HasKind a, KnownNat n, KnownSymbol nm, Skolemize r) => Skolemize (ExistsN n nm a -> r) where+  type SkolemsTo (ExistsN n nm a -> r) = SkolemsTo r+  skolem scope args f = skolem scope args (f (ExistsN skolemized))+    where need   = intOfProxy (Proxy @n)+          prefix = symbolVal (Proxy @nm)+          fs     = [prefix ++ "_" ++ show i | i <- [1 .. need]]+          skolemized = [SBV $ svUninterpretedNamedArgs (kindOf (Proxy @a)) (scope ++ n) UINone args | n <- fs]++-- | Skolemize over a unique existential quantifier+instance (  HasKind a+          , EqSymbolic (SBV a)+          , KnownSymbol nm+          , QuantifiedBool r+          , Skolemize (Forall (AppendSymbol nm "_eu1") a -> Forall (AppendSymbol nm "_eu2") a -> SBool)+         ) => Skolemize (ExistsUnique nm a -> r) where+  type SkolemsTo (ExistsUnique nm a -> r) =  Forall (AppendSymbol nm "_eu1") a+                                          -> Forall (AppendSymbol nm "_eu2") a+                                          -> SBool+  skolem scope args f = skolem scope args (rewriteExistsUnique f (Exists skolemized))+    where skolemized = SBV $ svUninterpretedNamedArgs (kindOf (Proxy @a)) (scope ++ symbolVal (Proxy @nm)) UINone args++-- | Class of things that we can logically negate+class QNot a where+  type NegatesTo a :: Type+  -- | Negation of a quantified formula. This operation essentially lifts 'sNot' to quantified formulae.+  -- Note that you can achieve the same using @'sNot' . 'quantifiedBool'@, but that will hide the+  -- quantifiers, so prefer this version if you want to keep them around.+  qNot :: a -> NegatesTo a++-- | Base case; pure symbolic boolean+instance QNot SBool where+  type NegatesTo SBool = SBool+  qNot = sNot++-- | Negate over a universal quantifier. Switches to existential.+instance QNot r => QNot (Forall nm a -> r) where+  type NegatesTo (Forall nm a -> r) = Exists nm a -> NegatesTo r+  qNot f (Exists a) = qNot (f (Forall a))++-- | Negate over a number of universal quantifiers+instance QNot r => QNot (ForallN nm n a -> r) where+  type NegatesTo (ForallN nm n a -> r) = ExistsN nm n a -> NegatesTo r+  qNot f (ExistsN xs) = qNot (f (ForallN xs))++-- | Negate over an existential quantifier. Switches to universal.+instance QNot r => QNot (Exists nm a -> r) where+  type NegatesTo (Exists nm a -> r) = Forall nm a -> NegatesTo r+  qNot f (Forall a) = qNot (f (Exists a))++-- | Negate over a number of existential quantifiers+instance QNot r => QNot (ExistsN nm n a -> r) where+  type NegatesTo (ExistsN nm n a -> r) = ForallN nm n a -> NegatesTo r+  qNot f (ForallN xs) = qNot (f (ExistsN xs))++-- | Negate over an unique existential quantifier+instance (QNot r, QuantifiedBool r, EqSymbolic (SBV a)) => QNot (ExistsUnique nm a -> r) where+  type NegatesTo (ExistsUnique nm a -> r) =  Forall nm a+                                          -> Exists (AppendSymbol nm "_eu1") a+                                          -> Exists (AppendSymbol nm "_eu2") a+                                          -> SBool+  qNot = qNot . rewriteExistsUnique++-- | Get rid of exists unique.+rewriteExistsUnique :: ( QuantifiedBool b                 -- If b can be turned into a boolean+                       , EqSymbolic (SBV a)               -- If we can do equality on symbolic a's+                       )                                  -- THEN+                    => (ExistsUnique nm a -> b)           -- Given an unique-existential, we can+                    -> Exists nm a                        -- Turn it into an existential+                    -> Forall (AppendSymbol nm "_eu1") a  -- A universal+                    -> Forall (AppendSymbol nm "_eu2") a  -- Another universal+                    -> SBool                                  -- Making sure given holds, and if both univers hold, they're the same+rewriteExistsUnique f (Exists x) (Forall x1) (Forall x2) = fx .&& unique+  where fx    = quantifiedBool $ f (ExistsUnique x)+        fx1   = f (ExistsUnique x1)+        fx2   = f (ExistsUnique x2)++        bothHolds  = quantifiedBool fx1 .&& quantifiedBool fx2+        mustEqual  = x1 .== x2+        unique     = bothHolds .=> mustEqual
Data/SBV/Core/Model.hs view
@@ -9,24 +9,26 @@ -- Instance declarations for our symbolic world ----------------------------------------------------------------------------- -{-# LANGUAGE BangPatterns         #-}-{-# LANGUAGE DataKinds            #-}-{-# LANGUAGE DefaultSignatures    #-}-{-# LANGUAGE FlexibleContexts     #-}-{-# LANGUAGE FlexibleInstances    #-}-{-# LANGUAGE Rank2Types           #-}-{-# LANGUAGE ScopedTypeVariables  #-}-{-# LANGUAGE TypeApplications     #-}-{-# LANGUAGE TypeFamilies         #-}-{-# LANGUAGE TypeOperators        #-}-{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE BangPatterns            #-}+{-# LANGUAGE ConstrainedClassMethods #-}+{-# LANGUAGE DataKinds               #-}+{-# LANGUAGE DefaultSignatures       #-}+{-# LANGUAGE DeriveFunctor           #-}+{-# LANGUAGE FlexibleContexts        #-}+{-# LANGUAGE FlexibleInstances       #-}+{-# LANGUAGE Rank2Types              #-}+{-# LANGUAGE ScopedTypeVariables     #-}+{-# LANGUAGE TypeApplications        #-}+{-# LANGUAGE TypeFamilies            #-}+{-# LANGUAGE TypeOperators           #-}+{-# LANGUAGE UndecidableInstances    #-}  {-# OPTIONS_GHC -Wall -Werror -fno-warn-orphans -Wno-incomplete-uni-patterns #-}  module Data.SBV.Core.Model (-    Mergeable(..), Equality(..), EqSymbolic(..), OrdSymbolic(..), SDivisible(..), Uninterpreted(..), Metric(..), minimize, maximize, assertWithPenalty, SIntegral, SFiniteBits(..)+    Mergeable(..), Equality(..), EqSymbolic(..), OrdSymbolic(..), SDivisible(..), SMTDefinable(..), Metric(..), minimize, maximize, assertWithPenalty, SIntegral, SFiniteBits(..)   , ite, iteLazy, sFromIntegral, sShiftLeft, sShiftRight, sRotateLeft, sBarrelRotateLeft, sRotateRight, sBarrelRotateRight, sSignedShiftArithRight, (.^)-  , oneIf, genVar, genVar_, sbvForall, sbvForall_, sbvExists, sbvExists_+  , oneIf, genVar, genVar_   , pbAtMost, pbAtLeast, pbExactly, pbLe, pbGe, pbEq, pbMutexed, pbStronglyMutexed   , sBool, sBool_, sBools, sWord8, sWord8_, sWord8s, sWord16, sWord16_, sWord16s, sWord32, sWord32_, sWord32s   , sWord64, sWord64_, sWord64s, sInt8, sInt8_, sInt8s, sInt16, sInt16_, sInt16s, sInt32, sInt32_, sInt32s, sInt64, sInt64_@@ -44,7 +46,7 @@   , sAssert   , liftQRem, liftDMod, symbolicMergeWithKind   , genLiteral, genFromCV, genMkSymVar-  , sbvQuickCheck+  , sbvQuickCheck, lambdaAsArray   )   where @@ -86,6 +88,7 @@ import Data.SBV.Core.Symbolic import Data.SBV.Core.Operations import Data.SBV.Core.Kind+import Data.SBV.Lambda  import Data.SBV.Provers.Prover (defaultSMTCfg, SafeResult(..), prove) import Data.SBV.SMT.SMT        (ThmResult, showModel)@@ -93,13 +96,15 @@ import Data.SBV.Utils.Lib     (isKString) import Data.SBV.Utils.Numeric (fpIsEqualObjectH) +import Data.IORef (readIORef)+ -- Symbolic-Word class instances --- | Generate a finite symbolic bitvector, named+-- | Generate a variable, named genVar :: MonadSymbolic m => VarContext -> Kind -> String -> m (SBV a) genVar q k = mkSymSBV q k . Just --- | Generate a finite symbolic bitvector, unnamed+-- | Generate an unnamed variable genVar_ :: MonadSymbolic m => VarContext -> Kind -> m (SBV a) genVar_ q k = mkSymSBV q k Nothing @@ -777,70 +782,6 @@        liftIO $ do xsv <- sbvToSV st x                    recordObservable st m (const True) xsv --- | 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.-infix 4 .==, ./=, .===, ./==-class EqSymbolic a where-  -- | Symbolic equality.-  (.==) :: a -> a -> SBool-  -- | Symbolic inequality.-  (./=) :: a -> a -> SBool-  -- | Strong equality. On floats ('SFloat'/'SDouble'), strong equality is object equality; that-  -- is @NaN == NaN@ holds, but @+0 == -0@ doesn't. On other types, (.===) is simply (.==).-  -- Note that (.==) is the /right/ notion of equality for floats per IEEE754 specs, since by-  -- definition @+0 == -0@ and @NaN@ equals no other value including itself. But occasionally-  -- we want to be stronger and state @NaN@ equals @NaN@ and @+0@ and @-0@ are different from-  -- each other. In a context where your type is concrete, simply use `Data.SBV.fpIsEqualObject`. But in-  -- a polymorphic context, use the strong equality instead.-  ---  -- NB. If you do not care about or work with floats, simply use (.==) and (./=).-  (.===) :: a -> a -> SBool-  -- | Negation of strong equality. Equaivalent to negation of (.===) on all types.-  (./==) :: a -> a -> SBool--  -- | Returns (symbolic) 'sTrue' if all the elements of the given list are different.-  distinct :: [a] -> SBool--  -- | Returns (symbolic) `sTrue` if all the elements of the given list are different. The second-  -- list contains exceptions, i.e., if an element belongs to that set, it will be considered-  -- distinct regardless of repetition.-  distinctExcept :: [a] -> [a] -> SBool--  -- | Returns (symbolic) 'sTrue' if all the elements of the given list are the same.-  allEqual :: [a] -> SBool--  -- | Symbolic membership test.-  sElem    :: a -> [a] -> SBool--  -- | Symbolic negated membership test.-  sNotElem :: a -> [a] -> SBool--  {-# MINIMAL (.==) #-}--  x ./=  y = sNot (x .==  y)-  x .=== y = x .== y-  x ./== y = sNot (x .=== y)--  allEqual []     = sTrue-  allEqual (x:xs) = sAll (x .==) xs--  -- Default implementation of distinct. Note that we override-  -- this method for the base types to generate better code.-  distinct []     = sTrue-  distinct (x:xs) = sAll (x ./=) xs .&& distinct xs--  -- Default implementation of distinctExcept. Note that we override-  -- this method for the base types to generate better code.-  distinctExcept es ignored = go es-    where isIgnored = (`sElem` ignored)--          go []     = sTrue-          go (x:xs) = let xOK  = isIgnored x .|| sAll (\y -> isIgnored y .|| x ./= y) xs-                      in xOK .&& go xs--  x `sElem`    xs = sAny (.== x) xs-  x `sNotElem` xs = sNot (x `sElem` xs)- -- | Symbolic Comparisons. Similar to 'Eq', we cannot implement Haskell's 'Ord' class -- since there is no way to return an 'Ordering' value from a symbolic comparison. -- Furthermore, 'OrdSymbolic' requires 'Mergeable' to implement if-then-else, for the@@ -945,7 +886,7 @@            r st = do let zero = 0 :: SInteger -                    arr <- SArray <$> newSArr st (ek, KUnbounded) (\i -> "array_" ++ show i) (Just (unSBV zero))+                    arr <- SArray <$> newSArr st (ek, KUnbounded) (\i -> "array_" ++ show i) (Left (Just (unSBV zero)))                      let incr x table = ite (x `sElem` ignored) zero (1 + readArray table x) @@ -2256,6 +2197,24 @@ instance (GMergeable f, GMergeable g) => GMergeable (f :*: g) where   symbolicMerge' force t (x1 :*: y1) (x2 :*: y2) = symbolicMerge' force t x1 x2 :*: symbolicMerge' force t y1 y2 +{- A mergeable instance for sum-types isn't possible. Why? It would something like:++instance (GMergeable f, GMergeable g) => GMergeable (f :+: g) where+  symbolicMerge' force t (L1 x) (L1 y) = L1 $ symbolicMerge' force t x y+  symbolicMerge' force t (R1 x) (R1 y) = R1 $ symbolicMerge' force t x y+  symbolicMerge' force t l r+    | Just tv <- unliteral t = if tv then l else r+    | True                   = ????++There's really no good code to put in ????. We have no way to ask the SMT solver to merge composite values that+have different constructors. Calling "error" here would pass the type-checker, but that simply postpones the problem+to run-time. If you need mergeable on sum-types, you better write one yourself, possibly using the SEither type yourself.+As we have it, you'll get a type-error; which can be hard to read, but is preferable.++NB. This isn't a problem with the generic version of symbolic equality; since we can simply return sFalse if we+see different constructors. Such isn't the case when merging.+-}+ -- Bounded instances instance (SymVal a, Bounded a) => Bounded (SBV a) where   minBound = literal minBound@@ -2272,75 +2231,143 @@ instance SymVal b => Mergeable (SArray a b) where   symbolicMerge _ = mergeArrays --- | Uninterpreted constants and functions. An uninterpreted constant is--- a value that is indexed by its name. The only property the prover assumes--- about these values are that they are equivalent to themselves; i.e., (for+-- | 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+-- functions too. An uninterpreted constant is a value that is indexed by its name. The only+-- property the prover assumes -- about these values are that they are equivalent to themselves; i.e., (for -- functions) they return the same results when applied to same arguments. -- We support uninterpreted-functions as a general means of black-box'ing -- operations that are /irrelevant/ for the purposes of the proof; i.e., when -- the proofs can be performed without any knowledge about the function itself. ----- Minimal complete definition: 'sbvUninterpret'. However, most instances in+-- Minimal complete definition: 'sbvDefineValue'. However, most instances in -- practice are already provided by SBV, so end-users should not need to define their -- own instances.-class Uninterpreted a where-  -- | Uninterpret a value, receiving an object that can be used instead. Use this version-  -- when you do not need to add an axiom about this value.+class SMTDefinable a where+  -- | Generate the code for this value as an SMTLib function, instead of+  -- the usual unrolling semantics. This is useful for generating sub-functions+  -- in generated SMTLib problem, or handling recursive (and mutually-recursive)+  -- definitions that wouldn't terminate in an unrolling symbolic simulation context.+  --+  -- __IMPORTANT NOTE__ The string argument names this function. Note that SBV will identify+  -- this function with that name, i.e., if you use this function twice (or use it recursively),+  -- it will simply assume this name uniquely identifies the function being defined. Hence,+  -- the user has to assure that this string is unique amongst all the functions you use.+  -- Furthermore, if the call to 'smtFunction' happens in the scope of a parameter, you+  -- must make sure the string is chosen to keep it unique per parameter value. For instance,+  -- if you have:+  --+  -- @+  --   bar :: SInteger -> SInteger -> SInteger+  --   bar k = smtFunction "bar" (\x -> x+k)   -- Note the capture of k!+  -- @+  --+  -- and you call @bar 2@ and @bar 3@, you *will* get the same SMTLib function. Obviously+  -- this is unsound. The reason is that the parameter value isn't captured by the name. In general,+  -- you should simply not do this, but if you must, have a concrete argument to make sure you can+  -- create a unique name. Something like:+  --+  -- @+  --   bar :: String -> SInteger -> SInteger -> SInteger+  --   bar tag k = smtFunction ("bar_" ++ tag) (\x -> x+k)   -- Tag should make the name unique!+  -- @+  --+  -- Then, make sure you use @bar "two" 2@ and @bar "three" 3@ etc. to preserve the invariant.+  --+  -- Note that this is a design choice, to keep function creation as easy to use as possible. SBV+  -- could've made 'smtFunction' a monadic call and generated the name itself to avoid all these issues.+  -- But the ergonomics of that is worse, and doesn't fit with the general design philosophy. If you+  -- can think of a solution (perhaps using some nifty GHC tricks?) to avoid this issue without making+  -- 'smtFunction' return a monadic result, please get in touch!+  smtFunction :: Lambda Symbolic a => String -> a -> a++  -- | Uninterpret a value, i.e., add this value as a completely undefined value/function that+  -- the solver is free to instantiate to satisfy other constraints.   uninterpret :: String -> a+   -- | Uninterpret a value, only for the purposes of code-generation. For execution   -- and verification the value is used as is. For code-generation, the alternate   -- definition is used. This is useful when we want to take advantage of native   -- libraries on the target languages.   cgUninterpret :: String -> [String] -> a -> a+   -- | Most generalized form of uninterpretation, this function should not be needed   -- by end-user-code, but is rather useful for the library development.-  sbvUninterpret :: Maybe ([String], a) -> String -> a+  sbvDefineValue :: String -> UIKind a -> a+   -- | A synonym for 'uninterpret'. Allows us to create variables without   -- having to call 'free' explicitly, i.e., without being in the symbolic monad.   sym :: String -> a -  {-# MINIMAL sbvUninterpret #-}+  {-# MINIMAL sbvDefineValue #-}    -- defaults:-  uninterpret             = sbvUninterpret Nothing-  cgUninterpret nm code v = sbvUninterpret (Just (code, v)) nm-  sym                     = uninterpret+  uninterpret    nm        = sbvDefineValue nm   UIFree+  smtFunction    nm      v = sbvDefineValue nm $ UIFun   (v, \st fk -> namedLambda st nm fk v)+  cgUninterpret  nm code v = sbvDefineValue nm $ UICodeC (v, code)+  sym                      = uninterpret +-- | Kind of uninterpretation+data UIKind a = UIFree                                  -- ^ completely uninterpreted+              | UIFun   (a, State -> Kind -> IO SMTDef) -- ^ has code for SMTLib, with final type of kind (note this is the result+                                                        -- , not the arguments), which can be generated by calling the function on the state.+              | UICodeC (a, [String])                   -- ^ has code for code-generation, i.e., C+              deriving Functor++-- Get the code associated with the UI, unless we've already did this once. (To support recursive defs.)+retrieveUICode :: String -> State -> Kind -> UIKind a -> IO UICodeKind+retrieveUICode _  _  _  UIFree           = pure UINone+retrieveUICode nm st fk (UIFun   (_, f)) = do userFuncs <- readIORef (rUserFuncs st)+                                              if nm `Set.member` userFuncs+                                                 then pure UINone+                                                 else do modifyState st rUserFuncs (Set.insert nm) (pure ())+                                                         UISMT <$> f st fk+retrieveUICode _  _  _  (UICodeC (_, c)) = pure $ UICgC c++-- Get the constant value associated with the UI+retrieveConstCode :: UIKind a -> Maybe a+retrieveConstCode UIFree           = Nothing+retrieveConstCode (UIFun   (v, _)) = Just v+retrieveConstCode (UICodeC (v, _)) = Just v+ -- Plain constants-instance HasKind a => Uninterpreted (SBV a) where-  sbvUninterpret mbCgData nm-     | Just (_, v) <- mbCgData = v-     | True                    = SBV $ SVal ka $ Right $ cache result+instance HasKind a => SMTDefinable (SBV a) where+  sbvDefineValue nm uiKind+     | Just v <- retrieveConstCode uiKind+     = v+     | True+     = SBV $ SVal ka $ Right $ cache result     where ka = kindOf (Proxy @a)           result st = do isSMT <- inSMTMode st-                         case (isSMT, mbCgData) of-                           (True, Just (_, v)) -> sbvToSV st v-                           _                   -> do newUninterpreted st nm (SBVType [ka]) (fst `fmap` mbCgData)-                                                     newExpr st ka $ SBVApp (Uninterpreted nm) []+                         case (isSMT, uiKind) of+                           (True, UICodeC (v, _)) -> sbvToSV st v+                           _                      -> do newUninterpreted st (nm, Nothing) (SBVType [ka]) =<< retrieveUICode nm st ka uiKind+                                                        newExpr st ka $ SBVApp (Uninterpreted nm) []  -- Functions of one argument-instance (SymVal b, HasKind a) => Uninterpreted (SBV b -> SBV a) where-  sbvUninterpret mbCgData nm = f+instance (SymVal b, HasKind a) => SMTDefinable (SBV b -> SBV a) where+  sbvDefineValue nm uiKind = f     where f arg0-           | Just (_, v) <- mbCgData, isConcrete arg0+           | Just v <- retrieveConstCode uiKind, isConcrete arg0            = v arg0            | True            = SBV $ SVal ka $ Right $ cache result            where ka = kindOf (Proxy @a)                  kb = kindOf (Proxy @b)                  result st = do isSMT <- inSMTMode st-                                case (isSMT, mbCgData) of-                                  (True, Just (_, v)) -> sbvToSV st (v arg0)-                                  _                   -> do newUninterpreted st nm (SBVType [kb, ka]) (fst `fmap` mbCgData)-                                                            sw0 <- sbvToSV st arg0-                                                            mapM_ forceSVArg [sw0]-                                                            newExpr st ka $ SBVApp (Uninterpreted nm) [sw0]+                                case (isSMT, uiKind) of+                                  (True, UICodeC (v, _)) -> sbvToSV st (v arg0)+                                  _                      -> do newUninterpreted st (nm, Nothing) (SBVType [kb, ka]) =<< retrieveUICode nm st ka uiKind+                                                               sw0 <- sbvToSV st arg0+                                                               mapM_ forceSVArg [sw0]+                                                               newExpr st ka $ SBVApp (Uninterpreted nm) [sw0]  -- Functions of two arguments-instance (SymVal c, SymVal b, HasKind a) => Uninterpreted (SBV c -> SBV b -> SBV a) where-  sbvUninterpret mbCgData nm = f+instance (SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV c -> SBV b -> SBV a) where+  sbvDefineValue nm uiKind = f     where f arg0 arg1-           | Just (_, v) <- mbCgData, isConcrete arg0, isConcrete arg1+           | Just v <- retrieveConstCode uiKind, isConcrete arg0, isConcrete arg1            = v arg0 arg1            | True            = SBV $ SVal ka $ Right $ cache result@@ -2348,19 +2375,19 @@                  kb = kindOf (Proxy @b)                  kc = kindOf (Proxy @c)                  result st = do isSMT <- inSMTMode st-                                case (isSMT, mbCgData) of-                                  (True, Just (_, v)) -> sbvToSV st (v arg0 arg1)-                                  _                   -> do newUninterpreted st nm (SBVType [kc, kb, ka]) (fst `fmap` mbCgData)-                                                            sw0 <- sbvToSV st arg0-                                                            sw1 <- sbvToSV st arg1-                                                            mapM_ forceSVArg [sw0, sw1]-                                                            newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1]+                                case (isSMT, uiKind) of+                                  (True, UICodeC (v, _)) -> sbvToSV st (v arg0 arg1)+                                  _                      -> do newUninterpreted st (nm, Nothing) (SBVType [kc, kb, ka]) =<< retrieveUICode nm st ka uiKind+                                                               sw0 <- sbvToSV st arg0+                                                               sw1 <- sbvToSV st arg1+                                                               mapM_ forceSVArg [sw0, sw1]+                                                               newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1]  -- Functions of three arguments-instance (SymVal d, SymVal c, SymVal b, HasKind a) => Uninterpreted (SBV d -> SBV c -> SBV b -> SBV a) where-  sbvUninterpret mbCgData nm = f+instance (SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV d -> SBV c -> SBV b -> SBV a) where+  sbvDefineValue nm uiKind = f     where f arg0 arg1 arg2-           | Just (_, v) <- mbCgData, isConcrete arg0, isConcrete arg1, isConcrete arg2+           | Just v <- retrieveConstCode uiKind, isConcrete arg0, isConcrete arg1, isConcrete arg2            = v arg0 arg1 arg2            | True            = SBV $ SVal ka $ Right $ cache result@@ -2369,20 +2396,20 @@                  kc = kindOf (Proxy @c)                  kd = kindOf (Proxy @d)                  result st = do isSMT <- inSMTMode st-                                case (isSMT, mbCgData) of-                                  (True, Just (_, v)) -> sbvToSV st (v arg0 arg1 arg2)-                                  _                   -> do newUninterpreted st nm (SBVType [kd, kc, kb, ka]) (fst `fmap` mbCgData)-                                                            sw0 <- sbvToSV st arg0-                                                            sw1 <- sbvToSV st arg1-                                                            sw2 <- sbvToSV st arg2-                                                            mapM_ forceSVArg [sw0, sw1, sw2]-                                                            newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2]+                                case (isSMT, uiKind) of+                                  (True, UICodeC (v, _)) -> sbvToSV st (v arg0 arg1 arg2)+                                  _                      -> do newUninterpreted st (nm, Nothing) (SBVType [kd, kc, kb, ka]) =<< retrieveUICode nm st ka uiKind+                                                               sw0 <- sbvToSV st arg0+                                                               sw1 <- sbvToSV st arg1+                                                               sw2 <- sbvToSV st arg2+                                                               mapM_ forceSVArg [sw0, sw1, sw2]+                                                               newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2]  -- Functions of four arguments-instance (SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => Uninterpreted (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where-  sbvUninterpret mbCgData nm = f+instance (SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where+  sbvDefineValue nm uiKind = f     where f arg0 arg1 arg2 arg3-           | Just (_, v) <- mbCgData, isConcrete arg0, isConcrete arg1, isConcrete arg2, isConcrete arg3+           | Just v <- retrieveConstCode uiKind, isConcrete arg0, isConcrete arg1, isConcrete arg2, isConcrete arg3            = v arg0 arg1 arg2 arg3            | True            = SBV $ SVal ka $ Right $ cache result@@ -2392,21 +2419,21 @@                  kd = kindOf (Proxy @d)                  ke = kindOf (Proxy @e)                  result st = do isSMT <- inSMTMode st-                                case (isSMT, mbCgData) of-                                  (True, Just (_, v)) -> sbvToSV st (v arg0 arg1 arg2 arg3)-                                  _                   -> do newUninterpreted st nm (SBVType [ke, kd, kc, kb, ka]) (fst `fmap` mbCgData)-                                                            sw0 <- sbvToSV st arg0-                                                            sw1 <- sbvToSV st arg1-                                                            sw2 <- sbvToSV st arg2-                                                            sw3 <- sbvToSV st arg3-                                                            mapM_ forceSVArg [sw0, sw1, sw2, sw3]-                                                            newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3]+                                case (isSMT, uiKind) of+                                  (True, UICodeC (v, _)) -> sbvToSV st (v arg0 arg1 arg2 arg3)+                                  _                      -> do newUninterpreted st (nm, Nothing) (SBVType [ke, kd, kc, kb, ka]) =<< retrieveUICode nm st ka uiKind+                                                               sw0 <- sbvToSV st arg0+                                                               sw1 <- sbvToSV st arg1+                                                               sw2 <- sbvToSV st arg2+                                                               sw3 <- sbvToSV st arg3+                                                               mapM_ forceSVArg [sw0, sw1, sw2, sw3]+                                                               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) => Uninterpreted (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where-  sbvUninterpret mbCgData nm = f+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+  sbvDefineValue nm uiKind = f     where f arg0 arg1 arg2 arg3 arg4-           | Just (_, v) <- mbCgData, isConcrete arg0, isConcrete arg1, isConcrete arg2, isConcrete arg3, isConcrete arg4+           | Just v <- retrieveConstCode uiKind, isConcrete arg0, isConcrete arg1, isConcrete arg2, isConcrete arg3, isConcrete arg4            = v arg0 arg1 arg2 arg3 arg4            | True            = SBV $ SVal ka $ Right $ cache result@@ -2417,22 +2444,22 @@                  ke = kindOf (Proxy @e)                  kf = kindOf (Proxy @f)                  result st = do isSMT <- inSMTMode st-                                case (isSMT, mbCgData) of-                                  (True, Just (_, v)) -> sbvToSV st (v arg0 arg1 arg2 arg3 arg4)-                                  _                   -> do newUninterpreted st nm (SBVType [kf, ke, kd, kc, kb, ka]) (fst `fmap` mbCgData)-                                                            sw0 <- sbvToSV st arg0-                                                            sw1 <- sbvToSV st arg1-                                                            sw2 <- sbvToSV st arg2-                                                            sw3 <- sbvToSV st arg3-                                                            sw4 <- sbvToSV st arg4-                                                            mapM_ forceSVArg [sw0, sw1, sw2, sw3, sw4]-                                                            newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4]+                                case (isSMT, uiKind) of+                                  (True, UICodeC (v, _)) -> sbvToSV st (v arg0 arg1 arg2 arg3 arg4)+                                  _                      -> do newUninterpreted st (nm, Nothing) (SBVType [kf, ke, kd, kc, kb, ka]) =<< retrieveUICode nm st ka uiKind+                                                               sw0 <- sbvToSV st arg0+                                                               sw1 <- sbvToSV st arg1+                                                               sw2 <- sbvToSV st arg2+                                                               sw3 <- sbvToSV st arg3+                                                               sw4 <- sbvToSV st arg4+                                                               mapM_ forceSVArg [sw0, sw1, sw2, sw3, sw4]+                                                               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) => Uninterpreted (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where-  sbvUninterpret mbCgData nm = f+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+  sbvDefineValue nm uiKind = f     where f arg0 arg1 arg2 arg3 arg4 arg5-           | Just (_, v) <- mbCgData, isConcrete arg0, isConcrete arg1, isConcrete arg2, isConcrete arg3, isConcrete arg4, isConcrete arg5+           | Just v <- retrieveConstCode uiKind, isConcrete arg0, isConcrete arg1, isConcrete arg2, isConcrete arg3, isConcrete arg4, isConcrete arg5            = v arg0 arg1 arg2 arg3 arg4 arg5            | True            = SBV $ SVal ka $ Right $ cache result@@ -2444,24 +2471,24 @@                  kf = kindOf (Proxy @f)                  kg = kindOf (Proxy @g)                  result st = do isSMT <- inSMTMode st-                                case (isSMT, mbCgData) of-                                  (True, Just (_, v)) -> sbvToSV st (v arg0 arg1 arg2 arg3 arg4 arg5)-                                  _                   -> do newUninterpreted st nm (SBVType [kg, kf, ke, kd, kc, kb, ka]) (fst `fmap` mbCgData)-                                                            sw0 <- sbvToSV st arg0-                                                            sw1 <- sbvToSV st arg1-                                                            sw2 <- sbvToSV st arg2-                                                            sw3 <- sbvToSV st arg3-                                                            sw4 <- sbvToSV st arg4-                                                            sw5 <- sbvToSV st arg5-                                                            mapM_ forceSVArg [sw0, sw1, sw2, sw3, sw4, sw5]-                                                            newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4, sw5]+                                case (isSMT, uiKind) of+                                  (True, UICodeC (v, _)) -> sbvToSV st (v arg0 arg1 arg2 arg3 arg4 arg5)+                                  _                      -> do newUninterpreted st (nm, Nothing) (SBVType [kg, kf, ke, kd, kc, kb, ka]) =<< retrieveUICode nm st ka uiKind+                                                               sw0 <- sbvToSV st arg0+                                                               sw1 <- sbvToSV st arg1+                                                               sw2 <- sbvToSV st arg2+                                                               sw3 <- sbvToSV st arg3+                                                               sw4 <- sbvToSV st arg4+                                                               sw5 <- sbvToSV st arg5+                                                               mapM_ forceSVArg [sw0, sw1, sw2, sw3, sw4, sw5]+                                                               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)-            => Uninterpreted (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where-  sbvUninterpret mbCgData nm = f+            => SMTDefinable (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) where+  sbvDefineValue nm uiKind = f     where f arg0 arg1 arg2 arg3 arg4 arg5 arg6-           | Just (_, v) <- mbCgData, isConcrete arg0, isConcrete arg1, isConcrete arg2, isConcrete arg3, isConcrete arg4, isConcrete arg5, isConcrete arg6+           | Just v <- retrieveConstCode uiKind, isConcrete arg0, isConcrete arg1, isConcrete arg2, isConcrete arg3, isConcrete arg4, isConcrete arg5, isConcrete arg6            = v arg0 arg1 arg2 arg3 arg4 arg5 arg6            | True            = SBV $ SVal ka $ Right $ cache result@@ -2474,71 +2501,61 @@                  kg = kindOf (Proxy @g)                  kh = kindOf (Proxy @h)                  result st = do isSMT <- inSMTMode st-                                case (isSMT, mbCgData) of-                                  (True, Just (_, v)) -> sbvToSV st (v arg0 arg1 arg2 arg3 arg4 arg5 arg6)-                                  _                   -> do newUninterpreted st nm (SBVType [kh, kg, kf, ke, kd, kc, kb, ka]) (fst `fmap` mbCgData)-                                                            sw0 <- sbvToSV st arg0-                                                            sw1 <- sbvToSV st arg1-                                                            sw2 <- sbvToSV st arg2-                                                            sw3 <- sbvToSV st arg3-                                                            sw4 <- sbvToSV st arg4-                                                            sw5 <- sbvToSV st arg5-                                                            sw6 <- sbvToSV st arg6-                                                            mapM_ forceSVArg [sw0, sw1, sw2, sw3, sw4, sw5, sw6]-                                                            newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4, sw5, sw6]+                                case (isSMT, uiKind) of+                                  (True, UICodeC (v, _)) -> sbvToSV st (v arg0 arg1 arg2 arg3 arg4 arg5 arg6)+                                  _                      -> do newUninterpreted st (nm, Nothing) (SBVType [kh, kg, kf, ke, kd, kc, kb, ka]) =<< retrieveUICode nm st ka uiKind+                                                               sw0 <- sbvToSV st arg0+                                                               sw1 <- sbvToSV st arg1+                                                               sw2 <- sbvToSV st arg2+                                                               sw3 <- sbvToSV st arg3+                                                               sw4 <- sbvToSV st arg4+                                                               sw5 <- sbvToSV st arg5+                                                               sw6 <- sbvToSV st arg6+                                                               mapM_ forceSVArg [sw0, sw1, sw2, sw3, sw4, sw5, sw6]+                                                               newExpr st ka $ SBVApp (Uninterpreted nm) [sw0, sw1, sw2, sw3, sw4, sw5, sw6]  -- Uncurried functions of two arguments-instance (SymVal c, SymVal b, HasKind a) => Uninterpreted ((SBV c, SBV b) -> SBV a) where-  sbvUninterpret mbCgData nm = let f = sbvUninterpret (uc2 `fmap` mbCgData) nm in uncurry f-    where uc2 (cs, fn) = (cs, curry fn)+instance (SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV c, SBV b) -> SBV a) where+  sbvDefineValue nm uiKind = let f = sbvDefineValue nm (curry <$> uiKind) in uncurry f  -- Uncurried functions of three arguments-instance (SymVal d, SymVal c, SymVal b, HasKind a) => Uninterpreted ((SBV d, SBV c, SBV b) -> SBV a) where-  sbvUninterpret mbCgData nm = let f = sbvUninterpret (uc3 `fmap` mbCgData) nm in \(arg0, arg1, arg2) -> f arg0 arg1 arg2-    where uc3 (cs, fn) = (cs, \a b c -> fn (a, b, c))+instance (SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV d, SBV c, SBV b) -> SBV a) where+  sbvDefineValue nm uiKind = let f = sbvDefineValue nm (uc3 <$> 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)-            => Uninterpreted ((SBV e, SBV d, SBV c, SBV b) -> SBV a) where-  sbvUninterpret mbCgData nm = let f = sbvUninterpret (uc4 `fmap` mbCgData) nm in \(arg0, arg1, arg2, arg3) -> f arg0 arg1 arg2 arg3-    where uc4 (cs, fn) = (cs, \a b c d -> fn (a, b, c, d))+            => SMTDefinable ((SBV e, SBV d, SBV c, SBV b) -> SBV a) where+  sbvDefineValue nm uiKind = let f = sbvDefineValue nm (uc4 <$> uiKind) in \(arg0, arg1, arg2, arg3) -> f arg0 arg1 arg2 arg3+    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)-            => Uninterpreted ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where-  sbvUninterpret mbCgData nm = let f = sbvUninterpret (uc5 `fmap` mbCgData) nm in \(arg0, arg1, arg2, arg3, arg4) -> f arg0 arg1 arg2 arg3 arg4-    where uc5 (cs, fn) = (cs, \a b c d e -> fn (a, b, c, d, e))+            => SMTDefinable ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where+  sbvDefineValue nm uiKind = let f = sbvDefineValue nm (uc5 <$> uiKind) in \(arg0, arg1, arg2, arg3, arg4) -> f arg0 arg1 arg2 arg3 arg4+    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)-            => Uninterpreted ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where-  sbvUninterpret mbCgData nm = let f = sbvUninterpret (uc6 `fmap` mbCgData) nm in \(arg0, arg1, arg2, arg3, arg4, arg5) -> f arg0 arg1 arg2 arg3 arg4 arg5-    where uc6 (cs, fn) = (cs, \a b c d e f -> fn (a, b, c, d, e, f))+            => SMTDefinable ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where+  sbvDefineValue nm uiKind = let f = sbvDefineValue nm (uc6 <$> uiKind) in \(arg0, arg1, arg2, arg3, arg4, arg5) -> f arg0 arg1 arg2 arg3 arg4 arg5+    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)-            => Uninterpreted ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where-  sbvUninterpret mbCgData nm = let f = sbvUninterpret (uc7 `fmap` mbCgData) nm in \(arg0, arg1, arg2, arg3, arg4, arg5, arg6) -> f arg0 arg1 arg2 arg3 arg4 arg5 arg6-    where uc7 (cs, fn) = (cs, \a b c d e f g -> fn (a, b, c, d, e, f, g))+            => SMTDefinable ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) where+  sbvDefineValue nm uiKind = let f = sbvDefineValue nm (uc7 <$> uiKind) in \(arg0, arg1, arg2, arg3, arg4, arg5, arg6) -> f arg0 arg1 arg2 arg3 arg4 arg5 arg6+    where uc7 fn a b c d e f g = fn (a, b, c, d, e, f, g)  -- | Symbolic computations provide a context for writing symbolic programs. instance MonadIO m => SolverContext (SymbolicT m) where-   constrain                   (SBV c) = imposeConstraint False []               c-   softConstrain               (SBV c) = imposeConstraint True  []               c-   namedConstraint        nm   (SBV c) = imposeConstraint False [(":named", nm)] c-   constrainWithAttribute atts (SBV c) = imposeConstraint False atts             c-   addAxiom                            = addSymAxiom False-   addSMTDefinition                    = addSymAxiom True-   contextState                        = symbolicEnv--   setOption o = addNewSMTOption  o+   constrain                   = imposeConstraint False []               . unSBV . quantifiedBool+   softConstrain               = imposeConstraint True  []               . unSBV . quantifiedBool+   namedConstraint        nm   = imposeConstraint False [(":named", nm)] . unSBV . quantifiedBool+   constrainWithAttribute atts = imposeConstraint False atts             . unSBV . quantifiedBool --- | Add an axiom. Only used internally, use `addAxiom` from user programs which works over--- both regular and query modes of usage.-addSymAxiom :: (SolverContext m, MonadIO m) => Bool -> String -> [String] -> m ()-addSymAxiom hasDefinition nm ax = do-        st <- contextState-        liftIO $ modifyState st raxioms ((hasDefinition, nm, ax) :) (return ())+   contextState = symbolicEnv+   setOption o  = addNewSMTOption  o  -- | Generalization of 'Data.SBV.assertWithPenalty' assertWithPenalty :: MonadSymbolic m => String -> SBool -> Penalty -> m ()@@ -2630,32 +2647,48 @@ -- Quickcheck interface on symbolic-booleans.. instance Testable SBool where   property (SBV (SVal _ (Left b))) = property (cvToBool b)-  property _                       = error "Quick-check: Constant folding produced a symbolic value! Perhaps used a non-reducible expression? Please report!"+  property _                       = cantQuickCheck  instance Testable (Symbolic SBool) where    property prop = QC.monadicIO $ do (cond, r, modelVals) <- QC.run test                                      QC.pre cond                                      unless (r || null modelVals) $ QC.monitor (QC.counterexample (complain modelVals))                                      QC.assert r-     where test = do (r, Result{resTraces=tvals, resObservables=ovals, resConsts=(_, cs), resConstraints=cstrs, resUIConsts=unints}) <- runSymbolic (Concrete Nothing) prop+     where test = do (r, Result{resTraces=tvals, resObservables=ovals, resConsts=(_, cs), resConstraints=cstrs, resUIConsts=unints}) <- runSymbolic defaultSMTCfg (Concrete Nothing) prop -                     let cval = fromMaybe (error "Cannot quick-check in the presence of uninterpeted constants!") . (`lookup` cs)-                         cond = and [cvToBool (cval v) | (False, _, v) <- F.toList cstrs] -- Only pick-up "hard" constraints, as indicated by False in the fist component+                     let cval = fromMaybe cantQuickCheck . (`lookup` cs)+                         cond = -- Only pick-up "hard" constraints, as indicated by False in the fist component+                                and [cvToBool (cval v) | (False, _, v) <- F.toList cstrs]                           getObservable (nm, f, v) = case v `lookup` cs of                                                       Just cv -> if f cv then Just (nm, cv) else Nothing-                                                      Nothing -> error $ "Quick-check: Observable " ++ nm ++ " did not reduce to a constant!"+                                                      Nothing -> cantQuickCheck                       case map fst unints of                        [] -> case unliteral r of-                               Nothing -> error $ intercalate "\n" [ "Quick-check: Calls to 'observe' not supported in quick-check mode. Please use 'sObserve' for full support."-                                                                   , "             (If you haven't used 'observe', please report this as a bug!)"-                                                                   ]+                               Nothing -> cantQuickCheck                                Just b  -> return (cond, b, tvals ++ mapMaybe getObservable ovals)-                       us -> error $ "Cannot quick-check in the presence of uninterpreted constants: " ++ intercalate ", " us+                       _  -> cantQuickCheck             complain qcInfo = showModel defaultSMTCfg (SMTModel [] Nothing qcInfo []) +-- Complain if what we got isn't something we can quick-check+cantQuickCheck :: a+cantQuickCheck = error $ unlines [ "*** Data.SBV: Cannot quickcheck the given property."+                                 , "***"+                                 , "*** Certain SBV properties cannot be quick-checked. In particular,"+                                 , "*** SBV can't quick-check in the presence of:"+                                 , "***"+                                 , "***   - Uninterpreted constants."+                                 , "***   - Floating point operations with rounding modes other than RNE."+                                 , "***   - Floating point FMA operation, regardless of rounding mode."+                                 , "***   - Quantified booleans, i.e., uses of Forall/Exists/ExistsUnique."+                                 , "***   - Calls to 'observe' (use 'sObserve' instead)"+                                 , "***"+                                 , "*** If you can't avoid the above features or run into an issue with"+                                 , "*** quickcheck even though you haven't used these features, please report this as a bug!"+                                 ]+ -- | Quick check an SBV property. Note that a regular @quickCheck@ call will work just as -- well. Use this variant if you want to receive the boolean result. sbvQuickCheck :: Symbolic SBool -> IO Bool@@ -2728,6 +2761,16 @@  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++                  let extract :: SArray a b -> IO ArrayIndex+                      extract (SArray (SArr _ ci)) = uncacheAI ci st++                  extract =<< newArrayInState Nothing (Right def) st  {-# ANN module   ("HLint: ignore Reduce duplication" :: String) #-} {-# ANN module   ("HLint: ignore Eta reduce" :: String)         #-}
Data/SBV/Core/Operations.hs view
@@ -23,7 +23,7 @@   -- ** Basic operations   , svPlus, svTimes, svMinus, svUNeg, svAbs   , svDivide, svQuot, svRem, svQuotRem-  , svEqual, svNotEqual, svStrongEqual, svSetEqual+  , svEqual, svNotEqual, svStrongEqual, svImplies, svSetEqual   , svLessThan, svGreaterThan, svLessEq, svGreaterEq, svStructuralLessThan   , svAnd, svOr, svXOr, svNot   , svShl, svShr, svRol, svRor@@ -298,6 +298,24 @@   | 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@@ -1019,13 +1037,15 @@                   return k  -- | Create a named new array-newSArr :: State -> (Kind, Kind) -> (Int -> String) -> Maybe SVal -> IO SArr-newSArr st ainfo mkNm mbDef = do+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 mbDef of-                 Nothing -> return Nothing-                 Just sv -> Just <$> svToSV st sv+    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         nm  = mkNm (unArrayIndex i)
Data/SBV/Core/Sized.hs view
@@ -43,6 +43,8 @@  import Data.SBV.SMT.SMT +import Test.QuickCheck(Arbitrary(..))+ -- | An unsigned bit-vector carrying its size info newtype WordN (n :: Nat) = WordN Integer deriving (Eq, Ord) @@ -361,3 +363,22 @@   where nv    = intOfProxy (Proxy @n)         start = nv - 1         end   = start - fromIntegral (natVal i) + 1++-- | Quickcheck instance for WordN+instance KnownNat n => Arbitrary (WordN n) where+  arbitrary = (WordN . norm . abs) `fmap` arbitrary+    where sz = intOfProxy (Proxy @n)++          norm v | sz == 0 = 0+                 | True    = v .&. (((1 :: Integer) `shiftL` sz) - 1)++-- | Quickcheck instance for IntN+instance KnownNat n => Arbitrary (IntN n) where+  arbitrary = (IntN . norm) `fmap` arbitrary+    where sz = intOfProxy (Proxy @n)++          norm v | sz == 0 = 0+                 | True  = let rg = 2 ^ (sz - 1)+                           in case divMod v rg of+                                     (a, b) | even a -> b+                                     (_, b)          -> b - rg
Data/SBV/Core/Symbolic.hs view
@@ -24,9 +24,8 @@ {-# LANGUAGE PatternGuards              #-} {-# LANGUAGE Rank2Types                 #-} {-# LANGUAGE ScopedTypeVariables        #-}-{-# LANGUAGE TupleSections              #-} {-# LANGUAGE TypeOperators              #-}-{-# LANGUAGE UndecidableInstances       #-} -- for undetermined s in MonadState+{-# LANGUAGE UndecidableInstances       #-} {-# LANGUAGE ViewPatterns               #-}  {-# OPTIONS_GHC -Wall -Werror -fno-warn-orphans #-}@@ -34,11 +33,11 @@ module Data.SBV.Core.Symbolic   ( NodeId(..)   , SV(..), swKind, trueSV, falseSV-  , Op(..), PBOp(..), OvOp(..), FPOp(..), NROp(..), StrOp(..), RegExOp(..), SeqOp(..), SetOp(..)+  , Op(..), PBOp(..), OvOp(..), FPOp(..), NROp(..), StrOp(..), RegExOp(..), SeqOp(..), SetOp(..), SpecialRelOp(..)   , RegExp(..), regExpToSMTString   , Quantifier(..), needsExistentials, VarContext(..)   , RoundingMode(..)-  , SBVType(..), svUninterpreted, newUninterpreted+  , SBVType(..), svUninterpreted, svUninterpretedNamedArgs, newUninterpreted   , SVal(..)   , svMkSymVar, sWordN, sWordN_, sIntN, sIntN_   , ArrayContext(..), ArrayInfo@@ -46,26 +45,24 @@   , SBVExpr(..), newExpr, isCodeGenMode, isSafetyCheckingIStage, isRunIStage, isSetupIStage   , Cached, cache, uncache, modifyState, modifyIncState   , ArrayIndex(..), uncacheAI-  , NamedSymVar(..), Name, UserInputs, Inputs(..), getSV, swNodeId, namedNodeId, getUniversals-  , prefixExistentials, prefixUniversals, onUserInputs, onInternInputs, onAllInputs-  , addInternInput, addUserInput, getInputs, inputsFromListWith, userInputsToList-  , getUserName', internInputsToList, inputsToList, quantifier, namedSymVar, getUserName+  , NamedSymVar(..), Name, UserInputs, Inputs(..), getSV, swNodeId, namedNodeId+  , addInternInput, addUserInput+  , getUserName', getUserName   , lookupInput , getSValPathCondition, extendSValPathCondition   , getTableIndex-  , SBVPgm(..), MonadSymbolic(..), SymbolicT, Symbolic, runSymbolic, State(..), withNewIncState, IncState(..), incrementInternalCounter-  , inSMTMode, SBVRunMode(..), IStage(..), Result(..)+  , SBVPgm(..), MonadSymbolic(..), SymbolicT, Symbolic, runSymbolic, mkNewState, runSymbolicInState, State(..), SMTDef(..), smtDefGivenName, withNewIncState, IncState(..), incrementInternalCounter+  , inSMTMode, SBVRunMode(..), IStage(..), Result(..), ResultInp(..), UICodeKind(..)   , registerKind, registerLabel, recordObservable-  , addAssertion, addNewSMTOption, imposeConstraint, internalConstraint, internalVariable+  , addAssertion, addNewSMTOption, imposeConstraint, internalConstraint, internalVariable, lambdaVar, quantVar   , SMTLibPgm(..), SMTLibVersion(..), smtLibVersionExtension   , SolverCapabilities(..)   , extractSymbolicSimulationState, CnstMap   , OptimizeStyle(..), Objective(..), Penalty(..), objectiveName, addSValOptGoal   , MonadQuery(..), QueryT(..), Query, Queriable(..), Fresh(..), QueryState(..), QueryContext(..)   , SMTScript(..), Solver(..), SMTSolver(..), SMTResult(..), SMTModel(..), SMTConfig(..), SMTEngine-  , validationRequested, outputSVal+  , validationRequested, outputSVal, ProgInfo(..), mustIgnoreVar, getRootState   ) where -import Control.Arrow               ((***)) import Control.DeepSeq             (NFData(..)) import Control.Monad               (when) import Control.Monad.Except        (MonadError, ExceptT)@@ -77,8 +74,8 @@ import Control.Monad.Writer.Strict (MonadWriter) import Data.Char                   (isAlpha, isAlphaNum, toLower) import Data.IORef                  (IORef, newIORef, readIORef)-import Data.List                   (intercalate, sortBy)-import Data.Maybe                  (isJust, fromJust, fromMaybe)+import Data.List                   (intercalate, sortBy, isPrefixOf)+import Data.Maybe                  (fromMaybe, mapMaybe) import Data.String                 (IsString(fromString))  import Data.Time (getCurrentTime, UTCTime)@@ -96,7 +93,7 @@ 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)-import qualified Data.Sequence               as S    (Seq, empty, (|>), (<|), filter, takeWhileL, fromList, lookup, elemIndexL)+import qualified Data.Sequence               as S    (Seq, empty, (|>), (<|), lookup, elemIndexL) import qualified Data.Text                   as T  import System.Mem.StableName@@ -114,18 +111,26 @@ #endif  -- | A symbolic node id-newtype NodeId = NodeId { getId :: Int }-  deriving (Eq, Ord, G.Data)+newtype NodeId = NodeId { getId :: (Int, Int) } -- Lambda-level, and node-id+  deriving (Ord, G.Data) +-- Equality is pair-wise, except we accommodate for negative node-id; which is reserved for true/false+instance Eq NodeId where+  NodeId n1@(_, i) == NodeId n2@(_, j)+     | i < 0 && j < 0+     = i == j+     | True+     = n1 == n2+ -- | A symbolic word, tracking it's signedness and size. data SV = SV !Kind !NodeId         deriving G.Data --- | For equality, we merely use the node-id+-- | For equality, we merely use the lambda-level/node-id instance Eq SV where   SV _ n1 == SV _ n2 = n1 == n2 --- | Again, simply use the node-id for ordering+-- | Again, simply use the lambda-level/node-id for ordering instance Ord SV where   SV _ n1 `compare` SV _ n2 = n1 `compare` n2 @@ -133,10 +138,13 @@   kindOf (SV k _) = k  instance Show SV where-  show (SV _ (NodeId n)) = case n of-                             -2 -> "false"-                             -1 -> "true"-                             _  -> 's' : show n+  show (SV _ (NodeId (l, n))) = case n of+                                 -2 -> "false"+                                 -1 -> "true"+                                 _  -> prefix ++ 's' : show n+        where prefix = case l of+                         0 -> ""+                         _ -> 'l' : show l ++ "_"  -- | Kind of a symbolic word. swKind :: SV -> Kind@@ -152,13 +160,13 @@ forceSVArg :: SV -> IO () forceSVArg (SV k n) = k `seq` n `seq` return () --- | Constant False as an 'SV'. Note that this value always occupies slot -2.+-- | Constant False as an 'SV'. Note that this value always occupies slot -2 and level 0. falseSV :: SV-falseSV = SV KBool $ NodeId (-2)+falseSV = SV KBool $ NodeId (0, -2) --- | Constant True as an 'SV'. Note that this value always occupies slot -1.+-- | Constant True as an 'SV'. Note that this value always occupies slot -1 and level 0. trueSV :: SV-trueSV  = SV KBool $ NodeId (-1)+trueSV  = SV KBool $ NodeId (0, -1)  -- | Symbolic operations data Op = Plus@@ -169,6 +177,7 @@         | Quot         | Rem         | Equal+        | Implies         | NotEqual         | LessThan         | GreaterThan@@ -192,13 +201,15 @@         | ArrRead ArrayIndex         | KindCast Kind Kind         | Uninterpreted String+        | QuantifiedBool 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         | NonLinear NROp                        -- Non-linear ops (mostly trigonometric), categorized separately         | OverflowOp    OvOp                    -- Overflow-ops, categorized separately         | PseudoBoolean PBOp                    -- Pseudo-boolean ops, categorized separately-        | StrOp StrOp                           -- String ops, categorized separately         | RegExOp RegExOp                       -- RegEx operations, categorized separately+        | StrOp StrOp                           -- String ops, categorized separately         | SeqOp SeqOp                           -- Sequence ops, categorized separately         | SetOp SetOp                           -- Set operations, categorized separately         | TupleConstructor Int                  -- Construct an n-tuple@@ -212,6 +223,19 @@         | MaybeAccess                           -- Maybe branch access; grab the contents of the just         deriving (Eq, Ord, G.Data) +-- | Special relations supported by z3+data SpecialRelOp = IsPartialOrder         String+                  | IsLinearOrder          String+                  | IsTreeOrder            String+                  | IsPiecewiseLinearOrder String+                  deriving (Eq, Ord, G.Data, Show)++instance NFData SpecialRelOp where+  rnf (IsPartialOrder         n) = rnf n+  rnf (IsLinearOrder          n) = rnf n+  rnf (IsTreeOrder            n) = rnf n+  rnf (IsPiecewiseLinearOrder n) = rnf n+ -- | Floating point operations data FPOp = FP_Cast        Kind Kind SV   -- From-Kind, To-Kind, RoundingMode. This is "value" conversion           | FP_Reinterpret Kind Kind      -- From-Kind, To-Kind. This is bit-reinterpretation using IEEE-754 interchange format@@ -458,31 +482,40 @@   show (RegExNEq r1 r2) = "(distinct " ++ regExpToSMTString r1 ++ " " ++ regExpToSMTString r2 ++ ")"  -- | Sequence operations.-data SeqOp = SeqConcat        -- ^ See StrConcat-           | SeqLen           -- ^ See StrLen-           | SeqUnit          -- ^ See StrUnit-           | SeqNth           -- ^ See StrNth-           | SeqSubseq        -- ^ See StrSubseq-           | SeqIndexOf       -- ^ See StrIndexOf-           | SeqContains      -- ^ See StrContains-           | SeqPrefixOf      -- ^ See StrPrefixOf-           | SeqSuffixOf      -- ^ See StrSuffixOf-           | SeqReplace       -- ^ See StrReplace-           | SBVReverse Kind  -- ^ Reversal of sequences. NB. Also works for strings; hence the name.+data SeqOp = SeqConcat            -- ^ See StrConcat+           | SeqLen               -- ^ See StrLen+           | SeqUnit              -- ^ See StrUnit+           | SeqNth               -- ^ See StrNth+           | SeqSubseq            -- ^ See StrSubseq+           | SeqIndexOf           -- ^ See StrIndexOf+           | SeqContains          -- ^ See StrContains+           | SeqPrefixOf          -- ^ See StrPrefixOf+           | SeqSuffixOf          -- ^ See StrSuffixOf+           | SeqReplace           -- ^ See StrReplace+           | SeqMap       String  -- ^ Mapping over sequences+           | SeqMapI      String  -- ^ Mapping over sequences with offset+           | 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)  -- | Show instance for SeqOp. Again, mapping is important. instance Show SeqOp where-  show SeqConcat   = "seq.++"-  show SeqLen      = "seq.len"-  show SeqUnit     = "seq.unit"-  show SeqNth      = "seq.nth"-  show SeqSubseq   = "seq.extract"-  show SeqIndexOf  = "seq.indexof"-  show SeqContains = "seq.contains"-  show SeqPrefixOf = "seq.prefixof"-  show SeqSuffixOf = "seq.suffixof"-  show SeqReplace  = "seq.replace"+  show SeqConcat        = "seq.++"+  show SeqLen           = "seq.len"+  show SeqUnit          = "seq.unit"+  show SeqNth           = "seq.nth"+  show SeqSubseq        = "seq.extract"+  show SeqIndexOf       = "seq.indexof"+  show SeqContains      = "seq.contains"+  show SeqPrefixOf      = "seq.prefixof"+  show SeqSuffixOf      = "seq.suffixof"+  show SeqReplace       = "seq.replace"+  show (SeqMap       s) = "seq.map "    ++ s+  show (SeqMapI      s) = "seq.mapi "   ++ s+  show (SeqFoldLeft  s) = "seq.foldl "  ++ s+  show (SeqFoldLeftI s) = "seq.foldli " ++ s+   -- Note: This isn't part of SMTLib, we explicitly handle it   show (SBVReverse k) = "sbv.reverse[" ++ show k ++ "]" @@ -533,6 +566,7 @@    show (KindCast fr to)     = "cast_" ++ show fr ++ "_" ++ show to   show (Uninterpreted i)    = "[uninterpreted] " ++ i+  show (QuantifiedBool i)   = "[quantified boolean] " ++ i    show (Label s)            = "[label] " ++ s @@ -575,7 +609,7 @@     where syms = [ (Plus, "+"), (Times, "*"), (Minus, "-"), (UNeg, "-"), (Abs, "abs")                  , (Quot, "quot")                  , (Rem,  "rem")-                 , (Equal, "=="), (NotEqual, "/=")+                 , (Equal, "=="), (NotEqual, "/="), (Implies, "=>")                  , (LessThan, "<"), (GreaterThan, ">"), (LessEq, "<="), (GreaterEq, ">=")                  , (Ite, "if_then_else")                  , (And, "&"), (Or, "|"), (XOr, "^"), (Not, "~")@@ -783,17 +817,35 @@    rnf (Maximize          s a)   = rnf s `seq` rnf a    rnf (AssertWithPenalty s a p) = rnf s `seq` rnf a `seq` rnf p +-- | A result can either produce something at the top or as a lambda/constraint. Distinguish by inputs+data ResultInp = ResultTopInps ([NamedSymVar], [NamedSymVar])  -- user inputs -- trackers+               | ResultLamInps [(Quantifier, NamedSymVar)]     -- for constraints, we can have quantifiers++instance NFData ResultInp where+   rnf (ResultTopInps xs) = rnf xs+   rnf (ResultLamInps xs) = rnf xs++-- | Several data about the program+data ProgInfo = ProgInfo { hasQuants         :: Bool+                         , progSpecialRels   :: [SpecialRelOp]+                         , progTransClosures :: [(String, String)]+                         }++instance NFData ProgInfo where+   rnf (ProgInfo a b c) = rnf a `seq` rnf b `seq` rnf c+ -- | Result of running a symbolic computation-data Result = Result { reskinds       :: Set.Set Kind                                 -- ^ kinds used in the program+data Result = Result { progInfo       :: ProgInfo                                     -- ^ various info we collect about the program+                     , reskinds       :: Set.Set Kind                                 -- ^ kinds used in the program                      , resTraces      :: [(String, CV)]                               -- ^ quick-check counter-example information (if any)                      , resObservables :: [(String, CV -> Bool, SV)]                   -- ^ observable expressions (part of the model)                      , resUISegs      :: [(String, [String])]                         -- ^ uninterpeted code segments-                     , resInputs      :: ([(Quantifier, NamedSymVar)], [NamedSymVar]) -- ^ inputs (possibly existential) + tracker vars+                     , 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, SBVType)]                          -- ^ uninterpreted constants-                     , resAxioms      :: [(Bool, String, [String])]                   -- ^ axioms/definitions+                     , resUIConsts    :: [(String, (Maybe [String], SBVType))]        -- ^ uninterpreted constants+                     , resDefinitions :: [SMTDef]                                     -- ^ definitions created via smtFunction or lambda                      , resAsgns       :: SBVPgm                                       -- ^ assignments                      , resConstraints :: S.Seq (Bool, [(String, String)], SV)         -- ^ additional constraints (boolean)                      , resAssertions  :: [(String, Maybe CallStack, SV)]              -- ^ assertions@@ -808,11 +860,12 @@   show Result{resConsts=(_, cs), resOutputs=[r]}     | Just c <- r `lookup` cs     = show c-  show (Result kinds _ _ cgs is (_, cs) ts as uis axs xs cstrs asserts os) = intercalate "\n" $+  show (Result _ kinds _ _ cgs params (_, cs) ts as uis defns xs cstrs asserts os) = intercalate "\n" $                    (if null usorts then [] else "SORTS" : map ("  " ++) usorts)-                ++ ["INPUTS"]-                ++ map shn (fst is)-                ++ (if null (snd is) then [] else "TRACKER VARS" : map (shn . (EX,)) (snd is))+                ++ (case params of+                      ResultTopInps (i, t) -> "INPUTS" : map shn i ++ (if null t then [] else "TRACKER VARS" : map shn t)+                      ResultLamInps qs     -> "LAMBDA-CONSTRAINT PARAMS" : map shq qs+                   )                 ++ ["CONSTANTS"]                 ++ concatMap shc cs                 ++ ["TABLES"]@@ -823,8 +876,8 @@                 ++ map shui uis                 ++ ["USER GIVEN CODE SEGMENTS"]                 ++ concatMap shcg cgs-                ++ ["AXIOMS"]-                ++ map shax axs+                ++ ["AXIOMS-DEFINITIONS"]+                ++ map show defns                 ++ ["DEFINE"]                 ++ map (\(s, e) -> "  " ++ shs s ++ " = " ++ show e) (F.toList (pgmAssignments xs))                 ++ ["CONSTRAINTS"]@@ -852,14 +905,14 @@            shcg (s, ss) = ("Variable: " ++ s) : map ("  " ++) ss -          shn (q, NamedSymVar sv nm) = "  " <> ni <> " :: " ++ show (swKind sv) ++ ex ++ alias+          shn (NamedSymVar sv nm) = "  " <> ni <> " :: " ++ show (swKind sv) ++ alias             where ni = show sv-                  ex    | q == ALL          = ""-                        | True              = ", existential"                    alias | ni == T.unpack nm = ""                         | True              = ", aliasing " ++ show nm +          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@@ -868,10 +921,6 @@            shui (nm, t) = "  [uninterpreted] " ++ nm ++ " :: " ++ show t -          shax (hasDefinition, nm, ss) = "  -- user defined " ++ what ++ ": " ++ nm ++ "\n  " ++ intercalate "\n  " ss-             where what | hasDefinition = "value"-                        | True          = "axiom"-           shCstr (isSoft, [], c)               = soft isSoft ++ show c           shCstr (isSoft, [(":named", nm)], c) = soft isSoft ++ nm ++ ": " ++ show c           shCstr (isSoft, attrs, c)            = soft isSoft ++ show c ++ " (attributes: " ++ show attrs ++ ")"@@ -888,13 +937,14 @@                 stk ++ ": " ++ show p  -- | The context of a symbolic array as created-data ArrayContext = ArrayFree (Maybe SV)                   -- ^ A new array, the contents are initialized with the given value, if any+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  instance Show ArrayContext where-  show (ArrayFree Nothing)   = " initialized with random elements"-  show (ArrayFree (Just sv)) = " initialized with " ++ show sv+  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 @@ -914,19 +964,16 @@ type ArrayInfo = (String, (Kind, Kind), ArrayContext)  -- | SMT Arrays generated during a symbolic run-type ArrayMap  = IMap.IntMap ArrayInfo---- | Functional Arrays generated during a symbolic run-type FArrayMap  = IMap.IntMap (SVal -> SVal, IORef (IMap.IntMap SV))+type ArrayMap = IMap.IntMap ArrayInfo  -- | Uninterpreted-constants generated during a symbolic run-type UIMap     = Map.Map String SBVType+type UIMap = Map.Map String (Maybe [String], SBVType)  -- | Code-segments for Uninterpreted-constants, as given by the user-type CgMap     = Map.Map String [String]+type CgMap = Map.Map String [String]  -- | Cached values, implementing sharing-type Cache a   = IMap.IntMap [(StableName (State -> IO a), a)]+type Cache a = IMap.IntMap [(StableName (State -> IO a), a)]  -- | Stage of an interactive run data IStage = ISetup        -- Before we initiate contact.@@ -955,9 +1002,10 @@                   IRun   -> True  -- | Different means of running a symbolic piece of code-data SBVRunMode = SMTMode QueryContext IStage Bool SMTConfig                        -- ^ In regular mode, with a stage. Bool is True if this is SAT.-                | CodeGen                                                           -- ^ Code generation mode.-                | Concrete (Maybe (Bool, [((Quantifier, NamedSymVar), Maybe CV)]))  -- ^ Concrete simulation mode, with given environment if any. If Nothing: Random.+data SBVRunMode = SMTMode QueryContext IStage Bool SMTConfig   -- ^ In regular mode, with a stage. Bool is True if this is SAT.+                | CodeGen                                      -- ^ Code generation mode.+                | LambdaGen Int                                -- ^ Inside a lambda-expression at level+                | Concrete (Maybe (Bool, [(NamedSymVar, CV)])) -- ^ Concrete simulation mode, with given environment if any. If Nothing: Random.  -- Show instance for SBVRunMode; debugging purposes only instance Show SBVRunMode where@@ -968,6 +1016,7 @@    show (SMTMode qc ISafe  False _)  = error $ "ISafe-False is not an expected/supported combination for SBVRunMode! (" ++ show qc ++ ")"    show (SMTMode qc IRun   False _)  = "Proof (" ++ show qc ++ ")"    show CodeGen                      = "Code generation"+   show LambdaGen{}                  = "Lambda generation"    show (Concrete Nothing)           = "Concrete evaluation with random values"    show (Concrete (Just (True, _)))  = "Concrete evaluation during model validation for sat"    show (Concrete (Just (False, _))) = "Concrete evaluation during model validation for prove"@@ -976,9 +1025,10 @@ isCodeGenMode :: State -> IO Bool isCodeGenMode State{runMode} = do rm <- readIORef runMode                                   return $ case rm of-                                             Concrete{} -> False-                                             SMTMode{}  -> False-                                             CodeGen    -> True+                                             Concrete{}  -> False+                                             SMTMode{}   -> False+                                             LambdaGen{} -> False+                                             CodeGen     -> True  -- | The state in query mode, i.e., additional context data IncState = IncState { rNewInps        :: IORef [NamedSymVar]   -- always existential!@@ -1021,10 +1071,10 @@         finalIncState <- readIORef (rIncState st)         return (finalIncState, r) --- | User defined, with proper quantifiers-type UserInputs = S.Seq (Quantifier, NamedSymVar)+-- | User defined inputs+type UserInputs = S.Seq NamedSymVar --- | Internally declared, always existential+-- | Internally declared type InternInps = S.Seq NamedSymVar  -- | Entire set of names, for faster lookup@@ -1036,6 +1086,9 @@                      , allInputs    :: !AllInps                      } deriving (Eq,Show) +-- | Inputs to a lambda-abstraction. These are quantified to handle constraints+type LambdaInputs = S.Seq (Quantifier, NamedSymVar)+ -- | Semigroup instance; combining according to indexes. instance Semigroup Inputs where   (Inputs lui lii lai) <> (Inputs rui rii rai) = Inputs (lui <> rui) (lii <> rii) (lai <> rai)@@ -1047,14 +1100,6 @@                   , allInputs    = mempty                   } --- | Get the quantifier-quantifier :: (Quantifier, NamedSymVar) -> Quantifier-quantifier = fst---- | Get the named symbolic variable-namedSymVar :: (Quantifier, NamedSymVar) -> NamedSymVar-namedSymVar = snd- -- | Modify the user-inputs field onUserInputs :: (UserInputs -> UserInputs) -> Inputs -> Inputs onUserInputs f inp@Inputs{userInputs} = inp{userInputs = f userInputs}@@ -1075,75 +1120,77 @@         goAll    = onAllInputs    (Set.insert nm)  -- | Add a new user input-addUserInput :: Quantifier -> SV -> Name -> Inputs -> Inputs-addUserInput q sv nm = goAll . goUser-  where new = toNamedSV sv nm-        goUser = onUserInputs (S.|> (q, new)) -- add to the end of the sequence+addUserInput :: SV -> Name -> Inputs -> Inputs+addUserInput sv nm = goAll . goUser+  where new    = toNamedSV sv nm+        goUser = onUserInputs (S.|> new)        -- add to the end of the sequence         goAll  = onAllInputs  (Set.insert nm) --- | Return user and internal inputs-getInputs :: Inputs -> (UserInputs, InternInps)-getInputs Inputs{userInputs, internInputs} = (userInputs, internInputs)---- | Find a user-input from its SV+-- | Find a user-input from its SV. Note that only level-0 vars+-- can be found this way. lookupInput :: Eq a => (a -> SV) -> SV -> S.Seq a -> Maybe a-lookupInput f sv ns = res+lookupInput f sv ns+   | l == 0 = res+   | True   = Nothing  -- l != 0, a lambda var, so we ignore   where-    i   = getId (swNodeId sv)-    svs = fmap f ns-    res = case S.lookup i ns of -- Nothing on negative Int or Int > length seq-            Nothing    -> secondLookup-            x@(Just e) -> if sv == f e then x else secondLookup-              -- we try the fast lookup first, if the node ids don't match then-              -- we use the more expensive O (n) to find the index and the elem+    (l, i) = getId (swNodeId sv)+    svs    = fmap f ns+    res    = case S.lookup i ns of -- Nothing on negative Int or Int > length seq+               Nothing    -> secondLookup+               x@(Just e) -> if sv == f e then x else secondLookup+                 -- we try the fast lookup first, if the node ids don't match then+                 -- we use the more expensive O (n) to find the index and the elem     secondLookup = S.elemIndexL sv svs >>= flip S.lookup ns --- | Extract universals-getUniversals :: UserInputs -> S.Seq NamedSymVar-getUniversals = fmap namedSymVar . S.filter ((== ALL) . quantifier)---- | Get a prefix of the user inputs by a predicate. Note that we could not rely--- on fusion here but this is cheap and easy until there is an observable slow down from not fusing.-userInpsPrefixBy :: ((Quantifier, NamedSymVar) -> Bool) -> UserInputs -> UserInputs-userInpsPrefixBy = S.takeWhileL---- | Find prefix existentials, i.e., those that are at skolem positions and have valid model values.-prefixExistentials :: UserInputs -> UserInputs-prefixExistentials = userInpsPrefixBy ((/= ALL) . quantifier)---- | Find prefix universals. Corresponds to the above in a proof context.-prefixUniversals :: UserInputs -> UserInputs-prefixUniversals = userInpsPrefixBy ((== ALL) . quantifier)---- | Conversion from named-symvars to user-inputs-inputsFromListWith :: (NamedSymVar -> Quantifier) -> [NamedSymVar] -> UserInputs-inputsFromListWith f = S.fromList . fmap go-  where go n = (f n, n)+-- | A defined function/value+data SMTDef = SMTDef String           -- ^ Defined functions -- name+                     Kind             -- ^ Final kind of the definition (resulting kind, not the params)+                     [String]         -- ^ other definitions it refers to+                     (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+                     (Maybe String)   -- ^ parameter string+                     (Int -> String)  -- ^ Body, in SMTLib syntax, given the tab amount --- | Helper functions around inputs.--- TODO: remove these functions once lists have been pushed to edges of code base.-userInputsToList :: UserInputs -> [(Quantifier, NamedSymVar)]-userInputsToList = F.toList+-- | 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+    where shDef mbNm fk frees p body = unlines [ "-- User defined function: " ++ fromMaybe "Anonymous" mbNm+                                               , "-- Final return type    : " ++ show fk+                                               , "-- Refers to            : " ++ intercalate ", " frees+                                               , "-- Parameters           : " ++ fromMaybe "NONE" p+                                               , "-- Body                 : "+                                               , body 2+                                               ] --- | Conversion from internal-inputs to list of named sym vars-internInputsToList :: InternInps -> [NamedSymVar]-internInputsToList = F.toList+-- The name of this definition+smtDefGivenName :: SMTDef -> Maybe String+smtDefGivenName (SMTDef n _ _ _ _) = Just n+smtDefGivenName SMTLam{}           = Nothing --- | Convert to regular lists-inputsToList :: Inputs -> ([(Quantifier, NamedSymVar)], [NamedSymVar])-inputsToList =  (userInputsToList *** internInputsToList) . getInputs+-- | 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  -- | The state of the symbolic interpreter data State  = State { pathCond     :: SVal                             -- ^ kind KBool+                    , stCfg        :: SMTConfig                     , startTime    :: UTCTime+                    , rProgInfo    :: IORef ProgInfo                     , runMode      :: IORef SBVRunMode                     , rIncState    :: IORef IncState                     , rCInfo       :: IORef [(String, CV)]                     , rObservables :: IORef (S.Seq (Name, CV -> Bool, SV))                     , rctr         :: IORef Int+                    , rLambdaLevel :: IORef Int                     , rUsedKinds   :: IORef KindSet                     , rUsedLbls    :: IORef (Set.Set String)                     , rinps        :: IORef Inputs+                    , rlambdaInps  :: IORef LambdaInputs                     , rConstraints :: IORef (S.Seq (Bool, [(String, String)], SV))                     , routs        :: IORef [SV]                     , rtblMap      :: IORef TableMap@@ -1151,18 +1198,23 @@                     , rconstMap    :: IORef CnstMap                     , rexprMap     :: IORef ExprMap                     , rArrayMap    :: IORef ArrayMap-                    , rFArrayMap   :: IORef FArrayMap                     , rUIMap       :: IORef UIMap+                    , rUserFuncs   :: IORef (Set.Set String) -- Functions that the user wanted explicit code generation for                     , rCgMap       :: IORef CgMap-                    , raxioms      :: IORef [(Bool, String, [String])]+                    , rDefns       :: IORef [SMTDef]                     , rSMTOptions  :: IORef [SMTOption]                     , rOptGoals    :: IORef [Objective (SV, SV)]                     , rAsserts     :: IORef [(String, Maybe CallStack, SV)]                     , 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                     } +-- | Chase to the root state. No infinite chains!+getRootState :: State -> State+getRootState st = maybe st getRootState (parentState st)+ -- NFData is a bit of a lie, but it's sufficient, most of the content is iorefs that we don't want to touch instance NFData State where    rnf State{} = ()@@ -1179,9 +1231,10 @@ inSMTMode :: State -> IO Bool inSMTMode State{runMode} = do rm <- readIORef runMode                               return $ case rm of-                                         CodeGen    -> False-                                         Concrete{} -> False-                                         SMTMode{}  -> True+                                         CodeGen     -> False+                                         LambdaGen{} -> False+                                         Concrete{}  -> False+                                         SMTMode{}   -> True  -- | The "Symbolic" value. Either a constant (@Left@) or a symbolic -- value (@Right Cached@). Note that caching is essential for making@@ -1264,7 +1317,13 @@ incrementInternalCounter st = do ctr <- readIORef (rctr st)                                  modifyState st rctr (+1) (return ())                                  return ctr+{-# INLINE incrementInternalCounter #-} +-- | Kind of code we have for uninterpretation+data UICodeKind = UINone          -- no code+                | UISMT  SMTDef   -- SMTLib, first argument are the free-variables in it+                | UICgC  [String] -- Code-gen, currently only C+ -- | Uninterpreted constants and functions. An uninterpreted constant is -- a value that is indexed by its name. The only property the prover assumes -- about these values are that they are equivalent to themselves; i.e., (for@@ -1272,29 +1331,48 @@ -- We support uninterpreted-functions as a general means of black-box'ing -- operations that are /irrelevant/ for the purposes of the proof; i.e., when -- the proofs can be performed without any knowledge about the function itself.-svUninterpreted :: Kind -> String -> Maybe [String] -> [SVal] -> SVal-svUninterpreted k nm code args = SVal k $ Right $ cache result+svUninterpreted :: Kind -> String -> UICodeKind -> [SVal] -> SVal+svUninterpreted k nm code args = svUninterpretedGen k nm code args Nothing++svUninterpretedNamedArgs :: Kind -> String -> UICodeKind -> [(SVal, String)] -> SVal+svUninterpretedNamedArgs k nm code args = svUninterpretedGen k nm code (map fst args) (Just (map snd args))++svUninterpretedGen :: Kind -> String -> UICodeKind -> [SVal] -> Maybe [String] -> SVal+svUninterpretedGen k nm code args mbArgNames = SVal k $ Right $ cache result   where result st = do let ty = SBVType (map kindOf args ++ [k])-                       newUninterpreted st nm ty code+                       newUninterpreted st (nm, mbArgNames) ty code                        sws <- mapM (svToSV st) args                        mapM_ forceSVArg sws                        newExpr st k $ SBVApp (Uninterpreted nm) sws  -- | Create a new uninterpreted symbol, possibly with user given code-newUninterpreted :: State -> String -> SBVType -> Maybe [String] -> IO ()-newUninterpreted st nm t mbCode-  | null nm || not enclosed && (not (isAlpha (head nm)) || not (all validChar (tail nm)))-  = error $ "Bad uninterpreted constant name: " ++ show nm ++ ". Must be a valid identifier."-  | True = do uiMap <- readIORef (rUIMap st)-              case nm `Map.lookup` uiMap of-                Just t' -> checkType t' (return ())-                Nothing -> do modifyState st rUIMap (Map.insert nm t)-                                        $ modifyIncState st rNewUIs (\newUIs -> case nm `Map.lookup` newUIs of-                                                                                  Just t' -> checkType t' newUIs-                                                                                  Nothing -> Map.insert nm t newUIs)+newUninterpreted :: State -> (String, Maybe [String]) -> SBVType -> UICodeKind -> IO ()+newUninterpreted st (nm, mbArgNames) t uiCode+  | not isInternal && (null nm || not enclosed && (not (isAlpha (head nm)) || not (all validChar (tail nm))))+  = error $ "Bad uninterpreted constant name: " ++ show nm ++ ". Must be a valid SMTLib identifier."+  | True+  = do uiMap <- readIORef (rUIMap st) -                              -- No need to record the code in interactive mode: CodeGen doesn't use interactive-                              when (isJust mbCode) $ modifyState st rCgMap (Map.insert nm (fromJust mbCode)) (return ())+       () <- case uiCode of+               UINone  -> pure ()+               UISMT d -> modifyState st rDefns (\defs -> d : filter (\o -> smtDefGivenName o /= Just nm) defs)+                            $ noInteractive [ "Defined functions (smtFunction):"+                                            , "  Name: " ++ nm+                                            , "  Type: " ++ show t+                                            , ""+                                            , "You should use these functions at least once the query part starts"+                                            , "and then use them in the query section as usual."+                                            ]+               UICgC c -> -- No need to record the code in interactive mode: CodeGen doesn't use interactive+                          modifyState st rCgMap (Map.insert nm c) (return ())++       case nm `Map.lookup` uiMap of+         Just (_, t') -> checkType t' (return ())+         Nothing      -> modifyState st rUIMap (Map.insert nm (mbArgNames, t))+                           $ modifyIncState st rNewUIs+                                              (\newUIs -> case nm `Map.lookup` newUIs of+                                                            Just (_, t') -> checkType t' newUIs+                                                            Nothing      -> Map.insert nm (mbArgNames, t) newUIs)   where checkType :: SBVType -> r -> r         checkType t' cont           | t /= t' = error $  "Uninterpreted constant " ++ show nm ++ " used at incompatible types\n"@@ -1305,6 +1383,9 @@         validChar x = isAlphaNum x || x `elem` ("_" :: String)         enclosed    = head nm == '|' && last nm == '|' && length nm > 2 && not (any (`elem` ("|\\" :: String)) (tail (init nm))) +        -- let internal names go through+        isInternal = "__internal_sbv_" `isPrefixOf` nm+ -- | Add a new sAssert based constraint addAssertion :: State -> Maybe CallStack -> String -> SV -> IO () addAssertion st cs msg cond = modifyState st rAsserts ((msg, cs, cond):)@@ -1317,32 +1398,32 @@ -- Such variables are existentially quantified in a SAT context, and universally quantified -- in a proof context. internalVariable :: State -> Kind -> IO SV-internalVariable st k = do (NamedSymVar sv nm) <- newSV st k-                           rm <- readIORef (runMode st)-                           let q = case rm of-                                     SMTMode  _ _ True  _ -> EX-                                     SMTMode  _ _ False _ -> ALL-                                     CodeGen              -> ALL-                                     Concrete{}           -> ALL-                               n = "__internal_sbv_" <> nm+internalVariable st k = do NamedSymVar sv nm <- newSV st k+                           let n = "__internal_sbv_" <> nm                                v = NamedSymVar sv n-                           modifyState st rinps (addUserInput q sv n)-                                     $ modifyIncState st rNewInps (\newInps -> case q of-                                                                                 EX -> v : newInps-                                                                                 -- I don't think the following can actually happen-                                                                                 -- but just be safe:-                                                                                 ALL  -> noInteractive [ "Internal universally quantified variable creation:"-                                                                                                       , "  Named: " <> T.unpack nm-                                                                                                       ])+                           modifyState st rinps (addUserInput sv n) $ modifyIncState st rNewInps (v :)                            return sv {-# INLINE internalVariable #-} +-- | Create a variable to be used in a constraint-expression+quantVar :: Quantifier -> State -> Kind -> IO SV+quantVar q st k = do v@(NamedSymVar sv _) <- newSV st k+                     modifyState st rlambdaInps (S.|> (q, v)) (return ())+                     return sv+{-# INLINE quantVar #-}++-- | Create a variable to be used in a lambda-expression+lambdaVar :: State -> Kind -> IO SV+lambdaVar = quantVar ALL+{-# INLINE lambdaVar #-}+ -- | Create a new SV newSV :: State -> Kind -> IO NamedSymVar newSV st k = do ctr <- incrementInternalCounter st-                let sv = SV k (NodeId ctr)+                ll  <- readIORef (rLambdaLevel st)+                let sv = SV k (NodeId (ll, ctr))                 registerKind st k-                return $ NamedSymVar sv $ 's' `T.cons` T.pack (show ctr)+                return $ NamedSymVar sv $ T.pack (show sv) {-# INLINE newSV #-}  -- | Register a new kind with the system, used for uninterpreted sorts.@@ -1591,6 +1672,9 @@           (Just EX, Concrete Nothing)    -> disallow "Existentially quantified variables"           (_      , Concrete Nothing)    -> noUI (randomCV k >>= mkC) +          (Just EX, LambdaGen{})         -> disallow "Existentially quantified variables"+          (_,       LambdaGen{})         -> noUI $ mkS ALL+           -- Model validation:           (_      , Concrete (Just (_isSat, env))) -> do                         let bad why conc = error $ unlines [ ""@@ -1612,23 +1696,18 @@                                    let nm = fromMaybe (T.unpack internalName) mbNm                                        nsv = toNamedSV' sv nm -                                       cv = case [(q, v) | ((q, nsv'), v) <- env, nsv == nsv'] of-                                              []              -> if isTracker-                                                                 then  -- The sole purpose of a tracker variable is to send the optimization-                                                                       -- directive to the solver, so we can name "expressions" that are minimized-                                                                       -- or maximized. There will be no constraints on these when we are doing-                                                                       -- the validation; in fact they will not even be used anywhere during a-                                                                       -- validation run. So, simply push a zero value that inhabits all metrics.-                                                                       mkConstCV k (0::Integer)-                                                                 else bad ("Cannot locate variable: " ++ show (nsv, k)) report-                                              [(ALL, _)]      -> -- We can stop here, as we can't really validate in the presence of a universal quantifier:-                                                                 -- we'd have to validate for each possible value. But that's more or less useless. Instead,-                                                                 -- just issue a warning and use 0 for this value.-                                                                 mkConstCV k (0::Integer)-                                              [(EX, Nothing)] -> bad ("Cannot locate model value of variable: " ++ show (getUserName' nsv)) report-                                              [(EX, Just c)]  -> c-                                              r               -> bad (   "Found multiple matching values for variable: " ++ show nsv-                                                                      ++ "\n*** " ++ show r) report+                                       cv = case [v | (nsv', v) <- env, nsv == nsv'] of+                                              []    -> if isTracker+                                                       then  -- The sole purpose of a tracker variable is to send the optimization+                                                             -- directive to the solver, so we can name "expressions" that are minimized+                                                             -- or maximized. There will be no constraints on these when we are doing+                                                             -- the validation; in fact they will not even be used anywhere during a+                                                             -- validation run. So, simply push a zero value that inhabits all metrics.+                                                             mkConstCV k (0::Integer)+                                                       else bad ("Cannot locate variable: " ++ show (nsv, k)) report+                                              [c]  -> c+                                              r    -> bad (   "Found multiple matching values for variable: " ++ show nsv+                                                           ++ "\n*** " ++ show r) report                                     mkC cv @@ -1667,7 +1746,7 @@                    if isTracker                       then modifyState st rinps (addInternInput sv nm)                                      $ noInteractive ["Adding a new tracker variable in interactive mode: " ++ show nm]-                      else modifyState st rinps (addUserInput q sv nm)+                      else modifyState st rinps (addUserInput sv nm)                                      $ modifyIncState st rNewInps newInp                    return $ SVal k $ Right $ cache (const (return sv)) @@ -1677,56 +1756,69 @@          mkUnique :: T.Text -> Set.Set Name -> T.Text          mkUnique prefix names = head $ dropWhile (`Set.member` names) (prefix : [prefix <> "_" <> T.pack (show i) | i <- [(0::Int)..]]) --- | Generalization of 'Data.SBV.runSymbolic'-runSymbolic :: MonadIO m => SBVRunMode -> SymbolicT m a -> m (a, Result)-runSymbolic currentRunMode (SymbolicT c) = do-   st <- liftIO $ do-     currTime  <- getCurrentTime-     rm        <- newIORef currentRunMode-     ctr       <- newIORef (-2) -- start from -2; False and True will always occupy the first two elements-     cInfo     <- newIORef []-     observes  <- newIORef mempty-     pgm       <- newIORef (SBVPgm S.empty)-     emap      <- newIORef Map.empty-     cmap      <- newIORef Map.empty-     inps      <- newIORef mempty-     outs      <- newIORef []-     tables    <- newIORef Map.empty-     arrays    <- newIORef IMap.empty-     fArrays   <- newIORef IMap.empty-     uis       <- newIORef Map.empty-     cgs       <- newIORef Map.empty-     axioms    <- newIORef []-     swCache   <- newIORef IMap.empty-     aiCache   <- newIORef IMap.empty-     usedKinds <- newIORef Set.empty-     usedLbls  <- newIORef Set.empty-     cstrs     <- newIORef S.empty-     smtOpts   <- newIORef []-     optGoals  <- newIORef []-     asserts   <- newIORef []-     istate    <- newIORef =<< newIncState-     qstate    <- newIORef Nothing+-- | Create a new state+mkNewState :: MonadIO m => SMTConfig -> SBVRunMode -> m State+mkNewState cfg currentRunMode = liftIO $ do+     currTime   <- getCurrentTime+     progInfo   <- newIORef ProgInfo { hasQuants         = False+                                     , progSpecialRels   = []+                                     , progTransClosures = []+                                     }+     rm         <- newIORef currentRunMode+     ctr        <- newIORef (-2) -- start from -2; False and True will always occupy the first two elements+     lambda     <- newIORef $ case currentRunMode of+                                SMTMode{}   -> 0+                                CodeGen{}   -> 0+                                Concrete{}  -> 0+                                LambdaGen i -> i+     cInfo      <- newIORef []+     observes   <- newIORef mempty+     pgm        <- newIORef (SBVPgm S.empty)+     emap       <- newIORef Map.empty+     cmap       <- newIORef Map.empty+     inps       <- newIORef mempty+     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+     smtOpts    <- newIORef []+     optGoals   <- newIORef []+     asserts    <- newIORef []+     istate     <- newIORef =<< newIncState+     qstate     <- newIORef Nothing      pure $ State { runMode      = rm+                  , stCfg        = cfg                   , startTime    = currTime+                  , rProgInfo    = progInfo                   , pathCond     = SVal KBool (Left trueCV)                   , rIncState    = istate                   , rCInfo       = cInfo                   , rObservables = observes                   , rctr         = ctr+                  , rLambdaLevel = lambda                   , rUsedKinds   = usedKinds                   , rUsedLbls    = usedLbls                   , rinps        = inps+                  , rlambdaInps  = lambdaInps                   , routs        = outs                   , rtblMap      = tables                   , spgm         = pgm                   , rconstMap    = cmap                   , rArrayMap    = arrays-                  , rFArrayMap   = fArrays                   , rexprMap     = emap+                  , rUserFuncs   = userFuncs                   , rUIMap       = uis                   , rCgMap       = cgs-                  , raxioms      = axioms+                  , rDefns       = defns                   , rSVCache     = swCache                   , rAICache     = aiCache                   , rConstraints = cstrs@@ -1734,7 +1826,18 @@                   , rOptGoals    = optGoals                   , rAsserts     = asserts                   , rQueryState  = qstate+                  , parentState  = Nothing                   }++-- | Generalization of 'Data.SBV.runSymbolic'+runSymbolic :: MonadIO m => SMTConfig -> SBVRunMode -> SymbolicT m a -> m (a, Result)+runSymbolic cfg currentRunMode comp = do+   st <- mkNewState cfg currentRunMode+   runSymbolicInState st comp++-- | Run a symbolic computation in a given state+runSymbolicInState :: MonadIO m => State -> SymbolicT m a -> m (a, Result)+runSymbolicInState st (SymbolicT c) = do    _ <- liftIO $ newConst st falseCV -- s(-2) == falseSV    _ <- liftIO $ newConst st trueCV  -- s(-1) == trueSV    r <- runReaderT c st@@ -1750,12 +1853,44 @@  -- | Grab the program from a running symbolic simulation state. extractSymbolicSimulationState :: State -> IO Result-extractSymbolicSimulationState st@State{ spgm=pgm, rinps=inps, routs=outs, rtblMap=tables, rArrayMap=arrays, rUIMap=uis, raxioms=axioms+extractSymbolicSimulationState st@State{ runMode=rrm+                                       , spgm=pgm, rinps=inps, rlambdaInps=linps, routs=outs, rtblMap=tables, rArrayMap=arrays+                                       , rUIMap=uis, rDefns=defns                                        , rAsserts=asserts, rUsedKinds=usedKinds, rCgMap=cgs, rCInfo=cInfo, rConstraints=cstrs-                                       , rObservables=observes+                                       , rObservables=observes, rProgInfo=progInfo                                        } = do    SBVPgm rpgm  <- readIORef pgm-   inpsO <- inputsToList <$> readIORef inps++   rm <- readIORef rrm++   inpsO <- do Inputs{userInputs, internInputs} <- readIORef inps+               ls <- readIORef linps++               let lambdaOnly = case rm of+                                  SMTMode{}   -> False+                                  CodeGen{}   -> False+                                  Concrete{}  -> False+                                  LambdaGen{} -> True+                   topInps = (F.toList userInputs, F.toList internInputs)+                   lamInps = F.toList ls++               if lambdaOnly+                  then case topInps of+                          ([], []) -> pure $ ResultLamInps (F.toList ls)+                          (xs, ys) -> error $ unlines [ ""+                                                      , "*** Data.SBV: Impossible happened; saw inputs in lambda mode."+                                                      , "***"+                                                      , "***   Inps    : " ++ show xs+                                                      , "***   Trackers: " ++ show ys+                                                      ]+                  else case lamInps of+                          [] -> pure $ ResultTopInps topInps+                          _  -> error $ unlines [ ""+                                                , "*** Data.SBV: Impossible happened; saw lambda inputs in regular mode."+                                                , "***"+                                                , "***   Params: " ++ show lamInps+                                                ]+    outsO <- reverse <$> readIORef outs     let swap  (a, b)              = (b, a)@@ -1767,10 +1902,10 @@     tbls  <- map arrange . sortBy cmp . map swap . Map.toList <$> readIORef tables    arrs  <- IMap.toAscList <$> readIORef arrays-   axs   <- reverse <$> readIORef axioms+   ds    <- reverse <$> readIORef defns    unint <- do unints <- Map.toList <$> readIORef uis-               -- drop those that has an axiom associated with it-               let defineds = [nm | (True, nm, _) <- axs]+               -- drop those that has a definition associated with it+               let defineds = mapMaybe smtDefGivenName ds                pure [ui | ui@(nm, _) <- unints, nm `notElem` defineds]    knds  <- readIORef usedKinds    cgMap <- Map.toList <$> readIORef cgs@@ -1781,8 +1916,10 @@    extraCstrs  <- readIORef cstrs    assertions  <- reverse <$> readIORef asserts -   return $ Result knds traceVals observables cgMap inpsO (constMap, cnsts) tbls arrs unint axs (SBVPgm rpgm) extraCstrs assertions outsO+   pinfo <- readIORef progInfo +   return $ Result pinfo knds traceVals observables cgMap inpsO (constMap, cnsts) tbls arrs unint ds (SBVPgm rpgm) extraCstrs assertions outsO+ -- | Generalization of 'Data.SBV.addNewSMTOption' addNewSMTOption :: MonadSymbolic m => SMTOption -> m () addNewSMTOption o = do st <- symbolicEnv@@ -1805,12 +1942,13 @@                                           rm <- liftIO $ readIORef (runMode st)                                            -- Are we running validation? If so, we always want to-                                          -- add the constraint for debug purposes. Otherwie+                                          -- add the constraint for debug purposes. Otherwise                                           -- we only add it if it's interesting; i.e., not directly                                           -- true or has some attributes.                                           let isValidating = case rm of                                                                SMTMode _ _ _ cfg -> validationRequested cfg                                                                CodeGen           -> False+                                                               LambdaGen{}       -> False                                                                Concrete Nothing  -> False                                                                Concrete (Just _) -> True   -- The case when we *are* running the validation @@ -1940,12 +2078,12 @@   rnf (NamedSymVar s n) = rnf s `seq` rnf n  instance NFData Result where-  rnf (Result kindInfo qcInfo obs cgs inps consts tbls arrs uis axs pgm cstr asserts outs)-        = 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 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 instance NFData Kind         where rnf a          = seq a () instance NFData ArrayContext where rnf a          = seq a () instance NFData SV           where rnf a          = seq a ()@@ -1989,6 +2127,8 @@        , supportsCustomQueries      :: Bool           -- ^ Supports interactive queries per SMT-Lib?        , supportsGlobalDecls        :: Bool           -- ^ Supports global declarations? (Needed for push-pop.)        , supportsDataTypes          :: Bool           -- ^ Supports datatypes?+       , supportsFoldAndMap         :: Bool           -- ^ Does it support fold and map?+       , supportsSpecialRels        :: Bool           -- ^ Does it support special relations (orders, transitive closure etc.)        , supportsDirectAccessors    :: Bool           -- ^ Supports data-type accessors without full ascription?        , supportsFlattenedModels    :: Maybe [String] -- ^ Supports flattened model output? (With given config lines.)        }@@ -2003,7 +2143,7 @@ -- precision value on the screen. The field 'printRealPrec' controls the printing precision, by specifying the number of digits after -- the decimal point. The default value is 16, but it can be set to any positive integer. ----- When printing, SBV will add the suffix @...@ at the and of a real-value, if the given bound is not sufficient to represent the real-value+-- When printing, SBV will add the suffix @...@ at the end of a real-value, if the given bound is not sufficient to represent the real-value -- exactly. Otherwise, the number will be written out in standard decimal notation. Note that SBV will always print the whole value if it -- is precise (i.e., if it fits in a finite number of digits), regardless of the precision limit. The limit only applies if the representation -- of the real value is not finite, i.e., if it is not rational.@@ -2022,7 +2162,7 @@        , satCmd                      :: String         -- ^ Usually "(check-sat)". However, users might tweak it based on solver characteristics.        , allSatMaxModelCount         :: Maybe Int      -- ^ In a 'Data.SBV.allSat' call, return at most this many models. If nothing, return all.        , allSatPrintAlong            :: Bool           -- ^ In a 'Data.SBV.allSat' call, print models as they are found.-       , satTrackUFs                 :: Bool           -- ^ In a 'Data.SBV.sat' call, should we try to extract values of uninterpreted functions?+       , allSatTrackUFs              :: Bool           -- ^ In a 'Data.SBV.allSat' call, should we try to extract values of uninterpreted functions?        , isNonModelVar               :: String -> Bool -- ^ When constructing a model, ignore variables whose name satisfy this predicate. (Default: (const False), i.e., don't ignore anything)        , validateModel               :: Bool           -- ^ If set, SBV will attempt to validate the model it gets back from the solver.        , optimizeValidateConstraints :: Bool           -- ^ Validate optimization results. NB: Does NOT make sure the model is optimal, just checks they satisfy the constraints.@@ -2031,13 +2171,16 @@        , dsatPrecision               :: Maybe Double   -- ^ Delta-sat precision        , solver                      :: SMTSolver      -- ^ The actual SMT solver.        , extraArgs                   :: [String]       -- ^ Extra command line arguments to pass to the solver.-       , allowQuantifiedQueries      :: Bool           -- ^ Should we permit use of quantifiers in the query mode? (Default: False. See <http://github.com/LeventErkok/sbv/issues/459> for why.)        , roundingMode                :: RoundingMode   -- ^ Rounding mode to use for floating-point conversions        , 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.        } +-- | Ignore internal names and those the user told us to+mustIgnoreVar :: SMTConfig -> String -> Bool+mustIgnoreVar cfg s = "__internal_sbv" `isPrefixOf` s || isNonModelVar cfg s+ -- | We show the name of the solver for the config. Arguably this is misleading, but better than nothing. instance Show SMTConfig where   show = show . name . solver@@ -2052,12 +2195,13 @@  -- | A model, as returned by a solver data SMTModel = SMTModel {-       modelObjectives :: [(String, GeneralizedCV)]                     -- ^ Mapping of symbolic values to objective values.-     , modelBindings   :: Maybe [((Quantifier, NamedSymVar), Maybe CV)] -- ^ Mapping of input variables as reported by the solver. Only collected if model validation is requested.-     , modelAssocs     :: [(String, CV)]                                -- ^ Mapping of symbolic values to constants.-     , modelUIFuns     :: [(String, (SBVType, ([([CV], CV)], CV)))]     -- ^ Mapping of uninterpreted functions to association lists in the model.-                                                                        -- Note that an uninterpreted constant (function of arity 0) will be stored-                                                                        -- in the 'modelAssocs' field.+       modelObjectives :: [(String, GeneralizedCV)]                               -- ^ Mapping of symbolic values to objective values.+     , modelBindings   :: Maybe [(NamedSymVar, CV)]                               -- ^ Mapping of input variables as reported by the solver. Only collected if model validation is requested.+     , modelAssocs     :: [(String, CV)]                                          -- ^ Mapping of symbolic values to constants.+     , modelUIFuns     :: [(String, (SBVType, Either String ([([CV], CV)], CV)))] -- ^ Mapping of uninterpreted functions to association lists in the model.+                                                                                  -- Note that an uninterpreted constant (function of arity 0) will be stored+                                                                                  -- in the 'modelAssocs' field. Left is used when the function returned is too+                                                                                  -- difficult for SBV to figure out what it means      }      deriving Show 
Data/SBV/Dynamic.hs view
@@ -122,7 +122,7 @@   , compileToC, compileToCLib    -- ** Compilation to SMTLib-  , generateSMTBenchmark+  , generateSMTBenchmarkSat, generateSMTBenchmarkProof   ) where  import Control.Monad.Trans (liftIO)@@ -154,7 +154,7 @@                                                 ) import qualified Data.SBV.Core.Data      as SBV (SBV(..)) import qualified Data.SBV.Core.Model     as SBV (sbvQuickCheck)-import qualified Data.SBV.Provers.Prover as SBV (proveWith, satWith, safeWith, allSatWith, generateSMTBenchmark)+import qualified Data.SBV.Provers.Prover as SBV (proveWith, satWith, safeWith, allSatWith, generateSMTBenchmarkSat, generateSMTBenchmarkProof) import qualified Data.SBV.SMT.SMT        as SBV (Modelable(getModelAssignment, getModelDictionary))  import Data.Time (NominalDiffTime)@@ -166,11 +166,13 @@ toSBool :: SVal -> SBV.SBool toSBool = SBV.SBV --- | Create SMT-Lib benchmarks. The first argument is the basename of the file, we will automatically--- add ".smt2" per SMT-Lib2 convention. The 'Bool' argument controls whether this is a SAT instance, i.e.,--- translate the query directly, or a PROVE instance, i.e., translate the negated query.-generateSMTBenchmark :: Bool -> Symbolic SVal -> IO String-generateSMTBenchmark isSat s = SBV.generateSMTBenchmark isSat (fmap toSBool s)+-- | Create SMT-Lib benchmark for a sat call+generateSMTBenchmarkSat :: Symbolic SVal -> IO String+generateSMTBenchmarkSat s = SBV.generateSMTBenchmarkSat (fmap toSBool s)++-- | Create SMT-Lib benchmark for a proof call+generateSMTBenchmarkProof :: Symbolic SVal -> IO String+generateSMTBenchmarkProof s = SBV.generateSMTBenchmarkProof (fmap toSBool s)  -- | Proves the predicate using the given SMT-solver proveWith :: SMTConfig -> Symbolic SVal -> IO ThmResult
Data/SBV/Internals.hs view
@@ -25,7 +25,7 @@  module Data.SBV.Internals (   -- * Running symbolic programs /manually/-    Result(..), SBVRunMode(..), IStage(..), QueryContext(..), VarContext(..)+    Result(..), SBVRunMode(..), IStage(..), QueryContext(..), VarContext(..), mkNewState    -- * Solver capabilities   , SolverCapabilities(..)@@ -35,6 +35,7 @@    -- * Operations useful for instantiating SBV type classes   , genLiteral, genFromCV, CV(..), genMkSymVar, genParse, showModel, SMTModel(..), liftQRem, liftDMod, registerKind, svToSV+  , ProvableM(), SatisfiableM()    -- * Compilation to C, extras   , compileToC', compileToCLib'@@ -59,15 +60,19 @@   , addSValOptGoal   , sFloatAsComparableSWord32,  sDoubleAsComparableSWord64,  sFloatingPointAsComparableSWord   , sComparableSWord32AsSFloat, sComparableSWord64AsSDouble, sComparableSWordAsSFloatingPoint++  -- * lambdas and axioms+  , lambda, lambdaStr, namedLambda, namedLambdaStr, constraint, constraintStr, Lambda(..), Constraint(..)   ) where  import Control.Monad.IO.Class (MonadIO) -import Data.SBV.Core.Data+import Data.SBV.Core.Data hiding (Forall(..), Exists(..), ForallN(..), ExistsN(..), ExistsUnique(..), Skolemize(..), QNot(..))+ import Data.SBV.Core.Kind       (BVIsNonZero, ValidFloat) import Data.SBV.Core.Sized      (SWord) import Data.SBV.Core.Model      (genLiteral, genFromCV, genMkSymVar, liftQRem, liftDMod)-import Data.SBV.Core.Symbolic   (IStage(..), QueryContext(..), MonadQuery, addSValOptGoal, registerKind, VarContext(..), svToSV)+import Data.SBV.Core.Symbolic   (IStage(..), QueryContext(..), MonadQuery, addSValOptGoal, registerKind, VarContext(..), svToSV, mkNewState)  import Data.SBV.Core.Floating   ( sFloatAsComparableSWord32,  sDoubleAsComparableSWord64,  sFloatingPointAsComparableSWord) @@ -78,6 +83,8 @@  import Data.SBV.SMT.SMT (genParse, showModel) +import Data.SBV.Provers.Prover (ProvableM, SatisfiableM)+ import Data.SBV.Utils.Numeric  import Data.SBV.Utils.TDiff@@ -86,6 +93,8 @@ import GHC.TypeLits  import qualified Data.SBV.Control.Utils as Query++import Data.SBV.Lambda  --- $setup --- >>> -- For doctest purposes only:
+ Data/SBV/Lambda.hs view
@@ -0,0 +1,306 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Data.SBV.Lambda+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Generating lambda-expressions, constraints, and named functions, for (limited)+-- higher-order function support in SBV.+-----------------------------------------------------------------------------++{-# LANGUAGE FlexibleContexts      #-}+{-# LANGUAGE FlexibleInstances     #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE NamedFieldPuns        #-}+{-# LANGUAGE ScopedTypeVariables   #-}+{-# LANGUAGE UndecidableInstances  #-}++{-# OPTIONS_GHC -Wall -Werror -fno-warn-orphans #-}++module Data.SBV.Lambda (+            lambda,      lambdaStr+          , namedLambda, namedLambdaStr+          , constraint,  constraintStr+        ) where++import Control.Monad       (join)+import Control.Monad.Trans (liftIO, MonadIO)++import Data.SBV.Core.Data+import Data.SBV.Core.Kind+import Data.SBV.SMT.SMTLib2+import Data.SBV.Utils.PrettyNum++import           Data.SBV.Core.Symbolic hiding   (mkNewState, fresh)+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.IntMap.Strict as IM++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+                 (Int -> String)                 -- Body, given the tab amount.++-- | Maka a new substate from the incoming state, sharing parts as necessary+inSubState :: MonadIO m => State -> (State -> m b) -> m b+inSubState inState comp = do+        ll <- liftIO $ readIORef (rLambdaLevel inState)+        stEmpty <- S.mkNewState (stCfg inState) (LambdaGen (ll + 1))++        let share fld = fld inState   -- reuse the field from the parent-context+            fresh fld = fld stEmpty   -- create a new field here++        -- freshen certain fields, sharing some from the parent, and run the comp+        -- Here's the guidance:+        --+        --    * Anything that's "shared" updates the calling context. It better be the case+        --      that the caller can handle that info.+        --    * Anything that's "fresh" will be used in this substate, and will be forgotten.+        --      It better be the case that in "toLambda" below, you do something with it.+        --+        -- Note the above applies to all the IORefs, which is most of the state, though+        -- not all. For the time being, those are pathCond, stCfg, and startTime; which +        -- don't really impact anything.+        comp State {+                   -- These are not IORefs; so we share by copying  the value; changes won't be copied back+                     pathCond     = share pathCond+                   , startTime    = share startTime++                   -- These are shared IORef's; and is shared, so they will be copied back to the parent state+                   , rProgInfo    = share rProgInfo+                   , rIncState    = share rIncState+                   , rCInfo       = share rCInfo+                   , rUsedKinds   = share rUsedKinds+                   , rUsedLbls    = share rUsedLbls+                   , rtblMap      = share rtblMap+                   , rArrayMap    = share rArrayMap+                   , rAICache     = share rAICache+                   , rUIMap       = share rUIMap+                   , rUserFuncs   = share rUserFuncs+                   , rCgMap       = share rCgMap+                   , rDefns       = share rDefns+                   , rSMTOptions  = share rSMTOptions+                   , rOptGoals    = share rOptGoals+                   , rAsserts     = share rAsserts++                   -- Everything else is fresh in the substate; i.e., will not copy back+                   , stCfg        = fresh stCfg+                   , runMode      = fresh runMode+                   , rctr         = fresh rctr+                   , rLambdaLevel = fresh rLambdaLevel+                   , rinps        = fresh rinps+                   , rlambdaInps  = fresh rlambdaInps+                   , rConstraints = fresh rConstraints+                   , rObservables = fresh rObservables+                   , routs        = fresh routs+                   , spgm         = fresh spgm+                   , rconstMap    = fresh rconstMap+                   , rexprMap     = fresh rexprMap+                   , rSVCache     = fresh rSVCache+                   , rQueryState  = fresh rQueryState++                   -- keep track of our parent+                   , parentState  = Just inState+                   }++-- In this case, we expect just one group of parameters, with universal quantification+extractAllUniversals :: [(Quantifier, String)] -> String+extractAllUniversals [(ALL, s)] = s+extractAllUniversals other      = error $ unlines [ ""+                                                  , "*** Data.SBV.Lambda: Impossible happened. Got existential quantifiers."+                                                  , "***"+                                                  , "***  Params: " ++ show other+                                                  , "***"+                                                  , "*** Please report this as a bug!"+                                                  ]+++-- | Generic creator for anonymous lamdas.+lambdaGen :: (MonadIO m, Lambda (SymbolicT m) a) => (Defn -> b) -> State -> Kind -> a -> m b+lambdaGen trans inState fk f = inSubState inState $ \st -> trans <$> convert st fk (mkLambda st f)++-- | 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++-- | 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 ++ ")"++-- | Generaic creator for named functions,+namedLambdaGen :: (MonadIO m, Lambda (SymbolicT m) a) => (Defn -> b) -> State -> Kind -> a -> m b+namedLambdaGen trans inState fk f = inSubState inState $ \st -> trans <$> convert st fk (mkLambda st f)++-- | 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++-- | Create a named SMTLib function, in the given state, string version+namedLambdaStr :: (MonadIO m, Lambda (SymbolicT m) a) => State -> String -> Kind -> a -> m String+namedLambdaStr inState nm fk = namedLambdaGen mkDef inState fk+   where mkDef (Defn frees params body) = concat $ declUserFuns [SMTDef nm fk frees (extractAllUniversals <$> params) body]++-- | Generic constraint generator.+constraintGen :: (MonadIO m, Constraint (SymbolicT m) a) => ([String] -> (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) ')'+       mkGroup (ALL, s) = "(forall " ++ s+       mkGroup (EX,  s) = "(exists " ++ s++   inSubState inState $ \st -> mkDef <$> convert st KBool (mkConstraint st f >>= output >> pure ())++-- | A constraint can be turned into a boolean+instance Constraint Symbolic a => QuantifiedBool a where+  quantifiedBool qb = SBV $ SVal KBool $ Right $ cache f+    where f st = liftIO $ constraint st qb++-- | 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)) [])++-- | 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 ++ ")"+                                            ]++         depInfo [] = ""+         depInfo ds = "[Refers to: " ++ intercalate ", " ds ++ "]"++-- | Convert to an appropriate SMTLib representation.+convert :: MonadIO m => State -> Kind -> SymbolicT m () -> m Defn+convert st expectedKind comp = do+   ((), res)   <- runSymbolicInState st comp+   curProgInfo <- liftIO $ readIORef (rProgInfo st)+   pure $ toLambda 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+ 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"+       bugReport = "Please report this at https://github.com/LeventErkok/sbv/issues"++       sh (Result _hasQuants    -- Has quantified booleans? Does not apply++                  _ki           -- Kind info, we're assuming that all the kinds used are already available in the surrounding context.+                                -- There's no way to create a new kind in a lambda. If a new kind is used, it should be registered.++                  _qcInfo       -- Quickcheck info, does not apply, ignored++                  observables   -- Observables: There's no way to display these, so ignore++                  _codeSegs     -- UI code segments: Again, shouldn't happen; if present, error out++                  is            -- Inputs++                  ( _allConsts  -- This contains the CV->SV map, which isn't needed for lambdas since we don't support tables+                  , consts      -- constants used+                  )++                  _tbls         -- Tables                : nothing to do with them+                  _arrs         -- Arrays                : nothing to do with them+                  _uis          -- Uninterpeted constants: nothing to do with them+                  _axs          -- Axioms definitions    : nothing to do with them++                  pgm           -- Assignments++                  cstrs         -- Additional constraints: Not currently supported inside lambda's+                  assertions    -- Assertions: Not currently supported inside lambda's++                  outputs       -- Outputs of the lambda (should be singular)+         )+         | not (null cstrs)+         = tbd [ "Constraints."+               , "  Saw: " ++ show (length cstrs) ++ " additional constraint(s)."+               ]+         | not (null assertions)+         = tbd [ "Assertions."+               , "  Saw: " ++ intercalate ", " [n | (n, _, _) <- assertions]+               ]+         | 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)+               , "   Expected: " ++ show expectedKind+               ]+         | True+         = res+         where res = Defn (nub [nm | Uninterpreted nm <- G.universeBi asgnsSeq])+                          mbParam+                          (intercalate "\n" . body)++               params = case is of+                          ResultTopInps as -> bad [ "Top inputs"+                                                  , "   Saw: " ++ show as+                                                  ]+                          ResultLamInps xs -> map (\(q, v) -> (q, getSV v)) xs++               mbParam+                 | null params = Nothing+                 | True        = Just [(q, paramList (map snd l)) | l@((q, _) : _)  <- pGroups]+                 where pGroups = groupBy (\(q1, _) (q2, _) -> q1 == q2) params+                       paramList ps = '(' : unwords (map (\p -> '(' : show p ++ " " ++ smtType (kindOf p) ++ ")")  ps) ++ ")"++               body tabAmnt+                 | Just e <- simpleBody bindings out+                 = [replicate tabAmnt ' ' ++ e]+                 | True+                 = let tab = replicate tabAmnt ' '+                   in    [tab ++ "(let ((" ++ show s ++ " " ++ v ++ "))" | (s, v) <- bindings]+                      ++ [tab ++ show out ++ replicate (length bindings) ')']++               -- 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++               assignments = F.toList (pgmAssignments pgm)++               constants = filter ((`notElem` [falseSV, trueSV]) . fst) consts++               bindings :: [(SV, String)]+               bindings = map mkConst constants ++ map mkAsgn assignments++               mkConst :: (SV, CV) -> (SV, String)+               mkConst (sv, cv) = (sv, cvToSMTLib (roundingMode cfg) cv)++               out :: SV+               out = case outputs of+                       [o] -> o+                       _   -> bad [ "Unexpected non-singular output"+                                  , "   Saw: " ++ show outputs+                                  ]++               mkAsgn (sv, e) = (sv, converter e)+               converter = cvtExp curProgInfo solverCaps rm tableMap funcMap+                 where solverCaps = capabilities (solver cfg)+                       rm         = roundingMode cfg+                       tableMap   = IM.empty+                       funcMap    = M.empty++{-# ANN module ("HLint: ignore Use second" :: String) #-}
Data/SBV/List.hs view
@@ -32,14 +32,30 @@         , take, drop, subList, replace, indexOf, offsetIndexOf         -- * Reverse         , reverse+        -- * Mapping+        , map, mapi+        -- * Folding+        , foldl, foldr, foldli, foldri+        -- * Zipping+        , zip, zipWith+        -- * Filtering+        , filter+        -- * Other list functions+        , all, any         ) where -import Prelude hiding (head, tail, init, length, take, drop, concat, null, elem, notElem, reverse, (++), (!!))+import Prelude hiding (head, tail, init, length, take, drop, concat, null, elem,+                       notElem, reverse, (++), (!!), map, foldl, foldr, zip, zipWith, filter, all, any) import qualified Prelude as P  import Data.SBV.Core.Data hiding (StrOp(..)) import Data.SBV.Core.Model +import Data.SBV.Lambda+import Data.SBV.Tuple++import Data.Maybe (isNothing, catMaybes)+ import Data.List (genericLength, genericIndex, genericDrop, genericTake) import qualified Data.List as L (tails, isSuffixOf, isPrefixOf, isInfixOf) @@ -47,8 +63,10 @@  -- $setup -- >>> -- For doctest purposes only:--- >>> import Prelude hiding (head, tail, init, length, take, drop, concat, null, elem, notElem, reverse, (++), (!!))+-- >>> import Prelude hiding (head, tail, init, length, take, drop, concat, null, elem, notElem, reverse, (++), (!!), map, foldl, foldr, zip, zipWith, filter, all, any)+-- >>> import qualified Prelude as P(map) -- >>> import Data.SBV+-- >>> :set -XDataKinds -- >>> :set -XOverloadedLists -- >>> :set -XScopedTypeVariables @@ -134,7 +152,7 @@ listToListAt :: SymVal a => SList a -> SInteger -> SList a listToListAt s offset = subList s offset 1 --- | @`elemAt` l i@ is the value stored at location @i@. Unspecified if+-- | @`elemAt` l i@ is the value stored at location @i@, starting at 0. Unspecified if -- index is out of bounds. -- -- >>> prove $ \i -> i `inRange` (0, 4) .=> [1,1,1,1,1] `elemAt` i .== (1::SInteger)@@ -142,7 +160,7 @@ -- -- ->>> prove $ \(l :: SList Integer) i e -> i `inRange` (0, length l - 1) .&& l `elemAt` i .== e .=> indexOf l (singleton e) .<= i -- Q.E.D.-elemAt :: forall a. SymVal a => SList a -> SInteger -> SBV a+elemAt :: SymVal a => SList a -> SInteger -> SBV a elemAt l i   | Just xs <- unliteral l, Just ci <- unliteral i, ci >= 0, ci < genericLength xs, let x = xs `genericIndex` ci   = literal x@@ -159,16 +177,10 @@ -- -- >>> prove $ \(e1 :: SInteger) e2 e3 -> length (implode [e1, e2, e3]) .== 3 -- Q.E.D.--- >>> prove $ \(e1 :: SInteger) e2 e3 -> map (elemAt (implode [e1, e2, e3])) (map literal [0 .. 2]) .== [e1, e2, e3]+-- >>> prove $ \(e1 :: SInteger) e2 e3 -> P.map (elemAt (implode [e1, e2, e3])) (P.map literal [0 .. 2]) .== [e1, e2, e3] -- Q.E.D. implode :: SymVal a => [SBV a] -> SList a-implode = foldr ((++) . singleton) (literal [])---- | Concatenate two lists. See also `++`.-concat :: SymVal a => SList a -> SList a -> SList a-concat x y | isConcretelyEmpty x = y-           | isConcretelyEmpty y = x-           | True                = lift2 SeqConcat (Just (P.++)) x y+implode = P.foldr ((++) . singleton) (literal [])  -- | Prepend an element, the traditional @cons@. infixr 5 .:@@ -186,7 +198,7 @@ nil :: SymVal a => SList a nil = [] --- | Short cut for `concat`.+-- | Append two lists. -- -- >>> sat $ \x y z -> length x .== 5 .&& length y .== 1 .&& x ++ y ++ z .== [1 .. 12] -- Satisfiable. Model:@@ -195,7 +207,9 @@ --   s2 = [7,8,9,10,11,12] :: [Integer] infixr 5 ++ (++) :: SymVal a => SList a -> SList a -> SList a-(++) = concat+x ++ y | isConcretelyEmpty x = y+       | isConcretelyEmpty y = x+       | True                = lift2 SeqConcat (Just (P.++)) x y  -- | @`elem` e l@. Does @l@ contain the element @e@? elem :: (Eq a, SymVal a) => SBV a -> SList a -> SBool@@ -339,13 +353,18 @@   , Just n <- unliteral sub      -- a constant search pattern   , Just o <- unliteral offset   -- at a constant offset   , o >= 0, o <= genericLength c        -- offset is good-  = case [i | (i, t) <- zip [o ..] (L.tails (genericDrop o c)), n `L.isPrefixOf` t] of+  = case [i | (i, t) <- P.zip [o ..] (L.tails (genericDrop o c)), n `L.isPrefixOf` t] of       (i:_) -> literal i       _     -> -1   | True   = lift3 SeqIndexOf Nothing s sub offset  -- | @`reverse` s@ reverses the sequence.+--+-- NB. We can define @reverse@ in terms of @foldl@ as: @foldl (\soFar elt -> singleton elt ++ soFar) []@+-- But in my experiments, I found that this definition performs worse instead of the recursive definition+-- SBV generates for reverse calls. So we're keeping it intact.+-- -- >>> sat $ \(l :: SList Integer) -> reverse l .== literal [3, 2, 1] -- Satisfiable. Model: --   s0 = [1,2,3] :: [Integer]@@ -360,6 +379,209 @@   where k = kindOf l         r st = do sva <- sbvToSV st l                   newExpr st k (SBVApp (SeqOp (SBVReverse k)) [sva])++-- | @`map` op s@ maps the operation on to sequence.+--+-- >>> map (+1) [1 .. 5 :: Integer]+-- [2,3,4,5,6] :: [SInteger]+-- >>> map (+1) [1 .. 5 :: WordN 8]+-- [2,3,4,5,6] :: [SWord8]+-- >>> map singleton [1 .. 3 :: Integer]+-- [[1],[2],[3]] :: [[SInteger]]+-- >>> import Data.SBV.Tuple+-- >>> import GHC.Exts (fromList)+-- >>> map (\t -> t^._1 + t^._2) (fromList [(x, y) | x <- [1..3], y <- [4..6]] :: SList (Integer, Integer))+-- [5,6,7,6,7,8,7,8,9] :: [SInteger]+--+-- Of course, SBV's 'map' can also be reused in reverse:+--+-- >>> sat $ \l -> map (+1) l .== [1,2,3 :: Integer]+-- Satisfiable. Model:+--   s0 = [0,1,2] :: [Integer]+map :: forall a b. (SymVal a, SymVal b) => (SBV a -> SBV b) -> SList a -> SList b+map op l+  | Just l' <- unliteral l, Just concResult <- concreteMap l'+  = literal concResult+  | True+  = SBV $ SVal k $ Right $ cache r+  where concreteMap l' = case P.map (unliteral . op . literal) l' of+                           xs | P.any isNothing xs -> Nothing+                              | True               -> Just (catMaybes xs)++        k = kindOf (Proxy @(SList b))+        r st = do sva <- sbvToSV st l+                  lam <- lambdaStr st (kindOf (Proxy @b)) op+                  newExpr st k (SBVApp (SeqOp (SeqMap lam)) [sva])++-- | @`mapi` op s@ maps the operation on to sequence, with the counter given at each element, starting+-- at the given value. In Haskell terms, it is:+--+-- @+--    mapi :: (Integer -> a -> b) -> Integer -> [a] -> [b]+--    mapi f i xs = zipWith f [i..] xs+-- @+--+-- Note that `mapi` is definable in terms of `Data.SBV.List.zipWith`, with extra coding. The reason why SBV provides+-- this function natively is because it maps to a native function in the underlying solver. So, hopefully it'll perform+-- better in terms being decidable.+--+-- >>> mapi (+) 10 [1 .. 5 :: Integer]+-- [11,13,15,17,19] :: [SInteger]+mapi :: forall a b. (SymVal a, SymVal b) => (SInteger -> SBV a -> SBV b) -> SInteger -> SList a -> SList b+mapi op i l+  | Just l' <- unliteral l, Just i' <- unliteral i, Just concResult <- concMapi i' l'+  = literal concResult+  | True+  = SBV $ SVal k $ Right $ cache r+  where concMapi b xs = case P.zipWith (\o e -> unliteral (op (literal o) (literal e))) [b ..] xs of+                          vs | P.any isNothing vs -> Nothing+                             | True               -> Just (catMaybes vs)++        k = kindOf (Proxy @(SList b))+        r st = do svi <- sbvToSV st i+                  svl <- sbvToSV st l+                  lam <- lambdaStr st (kindOf (Proxy @b)) op+                  newExpr st k (SBVApp (SeqOp (SeqMapI lam)) [svi, svl])++-- | @`foldl` op base s@ folds the from the left.+--+-- >>> foldl (+) 0 [1 .. 5 :: Integer]+-- 15 :: SInteger+-- >>> foldl (*) 1 [1 .. 5 :: Integer]+-- 120 :: SInteger+-- >>> foldl (\soFar elt -> singleton elt ++ soFar) ([] :: SList Integer) [1 .. 5 :: Integer]+-- [5,4,3,2,1] :: [SInteger]+--+-- Again, we can use 'Data.SBV.List.foldl' in the reverse too:+--+-- >>> sat $ \l -> foldl (\soFar elt -> singleton elt ++ soFar) ([] :: SList Integer) l .== [5, 4, 3, 2, 1 :: Integer]+-- Satisfiable. Model:+--   s0 = [1,2,3,4,5] :: [Integer]+foldl :: (SymVal a, SymVal b) => (SBV b -> SBV a -> SBV b) -> SBV b -> SList a -> SBV b+foldl op base l+  | Just l' <- unliteral l, Just base' <- unliteral base, Just concResult <- concreteFoldl base' l'+  = literal concResult+  | True+  = SBV $ SVal k $ Right $ cache r+  where concreteFoldl b []     = Just b+        concreteFoldl b (e:es) = case unliteral (op (literal b) (literal e)) of+                                   Nothing -> Nothing+                                   Just b' -> concreteFoldl b' es++        k = kindOf base+        r st = do svb <- sbvToSV st base+                  svl <- sbvToSV st l+                  lam <- lambdaStr st k op+                  newExpr st k (SBVApp (SeqOp (SeqFoldLeft lam)) [svb, svl])++-- | @`foldli` op i base s@ folds the sequence, with the counter given at each element, starting+-- at the given value. In Haskell terms, it is:+--+-- @+--   foldli :: (Integer -> b -> a -> b) -> Integer -> b -> [a] -> b+--   foldli f c e xs = foldl (\b (i, a) -> f i b a) e (zip [c..] xs)+-- @+--+-- While this function is rather odd looking, it maps directly to the implementation in the underlying solver,+-- and proofs involving it might have better decidability.+--+-- >>> foldli (\i b a -> i+b+a) 10 0 [1 .. 5 :: Integer]+-- 75 :: SInteger+foldli :: (SymVal a, SymVal b) => (SInteger -> SBV b -> SBV a -> SBV b) -> SInteger -> SBV b -> SList a -> SBV b+foldli op baseI baseE l+   | Just l' <- unliteral l, Just baseI' <- unliteral baseI, Just baseE' <- unliteral baseE, Just concResult <- concreteFoldli baseI' baseE' l'+   = literal concResult+   | True+   = SBV $ SVal k $ Right $ cache r+  where concreteFoldli _ b []     = Just b+        concreteFoldli c b (e:es) = case unliteral (op (literal c) (literal b) (literal e)) of+                                      Nothing -> Nothing+                                      Just b' -> concreteFoldli (c+1) b' es++        k = kindOf baseE+        r st = do svi <- sbvToSV st baseI+                  sve <- sbvToSV st baseE+                  sva <- sbvToSV st l+                  lam <- lambdaStr st k op+                  newExpr st k (SBVApp (SeqOp (SeqFoldLeftI lam)) [svi, sve, sva])++-- | @`foldr` op base s@ folds the sequence from the right.+--+-- >>> foldr (+) 0 [1 .. 5 :: Integer]+-- 15 :: SInteger+-- >>> foldr (*) 1 [1 .. 5 :: Integer]+-- 120 :: SInteger+-- >>> foldr (\elt soFar -> soFar ++ singleton elt) ([] :: SList Integer) [1 .. 5 :: Integer]+-- [5,4,3,2,1] :: [SInteger]+foldr :: (SymVal a, SymVal b) => (SBV a -> SBV b -> SBV b) -> SBV b -> SList a -> SBV b+foldr op b = foldl (flip op) b . reverse++-- | @`foldri` op base i s@ folds the sequence from the right, with the counter given at each element, starting+-- at the given value. This function is provided as a parallel to `foldli`.+foldri :: (SymVal a, SymVal b) => (SBV a -> SBV b -> SInteger -> SBV b) -> SBV b -> SInteger -> SList a -> SBV b+foldri op baseE baseI = foldli (\a b i -> op i b a) baseI baseE . reverse++-- | @`zip` xs ys@ zips the lists to give a list of pairs. The length of the final list is+-- the minumum of the lengths of the given lists.+--+-- >>> zip [1..10::Integer] [11..20::Integer]+-- [(1,11),(2,12),(3,13),(4,14),(5,15),(6,16),(7,17),(8,18),(9,19),(10,20)] :: [(SInteger, SInteger)]+-- >>> import Data.SBV.Tuple+-- >>> foldr (+) 0 (map (\t -> t^._1+t^._2::SInteger) (zip [1..10::Integer] [10, 9..1::Integer]))+-- 110 :: SInteger+zip :: (SymVal a, SymVal b) => SList a -> SList b -> SList (a, b)+zip xs ys = map (\t -> tuple (t^._2, ys `elemAt` (t^._1)))+                (mapi (curry tuple) 0 (take (length ys) xs))++-- | @`zipWith` f xs ys@ zips the lists to give a list of pairs, applying the function to each pair of elements.+-- The length of the final list is the minumum of the lengths of the given lists.+--+-- >>> zipWith (+) [1..10::Integer] [11..20::Integer]+-- [12,14,16,18,20,22,24,26,28,30] :: [SInteger]+-- >>> foldr (+) 0 (zipWith (+) [1..10::Integer] [10, 9..1::Integer])+-- 110 :: SInteger+zipWith :: (SymVal a, SymVal b, SymVal c) => (SBV a -> SBV b -> SBV c) -> SList a -> SList b -> SList c+zipWith f xs ys = map (\t -> f (t^._2) (ys `elemAt` (t^._1)))+                      (mapi (curry tuple) 0 (take (length ys) xs))++-- | Concatenate list of lists.+--+-- NB. Concat is typically defined in terms of foldr. Here we prefer foldl, since the underlying solver+-- primitive is foldl: Otherwise, we'd induce an extra call to reverse.+--+-- >>> concat [[1..3::Integer], [4..7], [8..10]]+-- [1,2,3,4,5,6,7,8,9,10] :: [SInteger]+concat :: SymVal a => SList [a] -> SList a+concat = foldl (++) []++-- | Check all elements satisfy the predicate.+--+-- >>> let isEven x = x `sMod` 2 .== 0+-- >>> all isEven [2, 4, 6, 8, 10 :: Integer]+-- True+-- >>> all isEven [2, 4, 6, 1, 8, 10 :: Integer]+-- False+all :: SymVal a => (SBV a -> SBool) -> SList a -> SBool+all f = foldl (\sofar e -> sofar .&& f e) sTrue++-- | Check some element satisfies the predicate.+-- --+-- >>> let isEven x = x `sMod` 2 .== 0+-- >>> any (sNot . isEven) [2, 4, 6, 8, 10 :: Integer]+-- False+-- >>> any isEven [2, 4, 6, 1, 8, 10 :: Integer]+-- True+any :: SymVal a => (SBV a -> SBool) -> SList a -> SBool+any f = foldl (\sofar e -> sofar .|| f e) sFalse++-- | @filter f xs@ filters the list with the given predicate.+--+-- >>> filter (\x -> x `sMod` 2 .== 0) [1 .. 10 :: Integer]+-- [2,4,6,8,10] :: [SInteger]+-- >>> filter (\x -> x `sMod` 2 ./= 0) [1 .. 10 :: Integer]+-- [1,3,5,7,9] :: [SInteger]+filter :: SymVal a => (SBV a -> SBool) -> SList a -> SList a+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
Data/SBV/Provers/ABC.hs view
@@ -46,6 +46,8 @@                               , supportsCustomQueries      = False                               , supportsGlobalDecls        = False                               , supportsDataTypes          = False+                              , supportsFoldAndMap         = False+                              , supportsSpecialRels        = False                               , supportsDirectAccessors    = False                               , supportsFlattenedModels    = Nothing                               }
Data/SBV/Provers/Bitwuzla.hs view
@@ -44,6 +44,8 @@                               , supportsCustomQueries      = True                               , supportsGlobalDecls        = True                               , supportsDataTypes          = False+                              , supportsFoldAndMap         = False+                              , supportsSpecialRels        = False                               , supportsDirectAccessors    = False                               , supportsFlattenedModels    = Nothing                               }
Data/SBV/Provers/Boolector.hs view
@@ -44,6 +44,8 @@                               , supportsCustomQueries      = True                               , supportsGlobalDecls        = True                               , supportsDataTypes          = False+                              , supportsFoldAndMap         = False+                              , supportsSpecialRels        = False                               , supportsDirectAccessors    = False                               , supportsFlattenedModels    = Nothing                               }
Data/SBV/Provers/CVC4.hs view
@@ -48,6 +48,8 @@                               , supportsCustomQueries      = True                               , supportsGlobalDecls        = True                               , supportsDataTypes          = True+                              , supportsFoldAndMap         = False+                              , supportsSpecialRels        = False                               , supportsDirectAccessors    = True                               , supportsFlattenedModels    = Nothing                               }
Data/SBV/Provers/CVC5.hs view
@@ -28,7 +28,7 @@            name         = CVC5          , executable   = "cvc5"          , preprocess   = clean-         , options      = const ["--lang", "smt", "--incremental", "--no-interactive", "--nl-cov"]+         , options      = const ["--lang", "smt", "--incremental", "--nl-cov"]          , engine       = standardEngine "SBV_CVC5" "SBV_CVC5_OPTIONS"          , capabilities = SolverCapabilities {                                 supportsQuantifiers        = True@@ -48,6 +48,8 @@                               , supportsCustomQueries      = True                               , supportsGlobalDecls        = True                               , supportsDataTypes          = True+                              , supportsFoldAndMap         = False+                              , supportsSpecialRels        = False                               , supportsDirectAccessors    = True                               , supportsFlattenedModels    = Nothing                               }
Data/SBV/Provers/DReal.hs view
@@ -48,6 +48,8 @@                               , supportsCustomQueries      = False                               , supportsGlobalDecls        = False                               , supportsDataTypes          = False+                              , supportsFoldAndMap         = False+                              , supportsSpecialRels        = False                               , supportsDirectAccessors    = False                               , supportsFlattenedModels    = Nothing                               }
Data/SBV/Provers/MathSAT.hs view
@@ -48,6 +48,8 @@                               , supportsCustomQueries      = True                               , supportsGlobalDecls        = True                               , supportsDataTypes          = True+                              , supportsFoldAndMap         = False+                              , supportsSpecialRels        = False                               , supportsDirectAccessors    = True                               , supportsFlattenedModels    = Nothing                               }
Data/SBV/Provers/Prover.hs view
@@ -17,21 +17,22 @@ {-# LANGUAGE NamedFieldPuns        #-} {-# LANGUAGE ScopedTypeVariables   #-} {-# LANGUAGE TupleSections         #-}+{-# LANGUAGE UndecidableInstances  #-}  {-# OPTIONS_GHC -Wall -Werror #-}  module Data.SBV.Provers.Prover (          SMTSolver(..), SMTConfig(..), Predicate-       , MProvable(..), Provable, proveWithAll, proveWithAny , satWithAll, satWithAny-       , satConcurrentWithAny, satConcurrentWithAll, proveConcurrentWithAny, proveConcurrentWithAll-       , generateSMTBenchmark-       , Goal+       , ProvableM(..), Provable, SatisfiableM(..), Satisfiable+       , generateSMTBenchmarkSat, generateSMTBenchmarkProof, ConstraintSet        , ThmResult(..), SatResult(..), AllSatResult(..), SafeResult(..), OptimizeResult(..), SMTResult(..)        , SExecutable(..), isSafe        , runSMT, runSMTWith        , SatModel(..), Modelable(..), displayModels, extractModels        , getModelDictionaries, getModelValues, getModelUninterpretedValues        , abc, boolector, bitwuzla, cvc4, cvc5, dReal, mathSAT, yices, z3, defaultSMTCfg, defaultDeltaSMTCfg+       , proveWithAny, proveWithAll, proveConcurrentWithAny, proveConcurrentWithAll+       , satWithAny,   satWithAll,   satConcurrentWithAny,   satConcurrentWithAll        ) where  @@ -46,13 +47,11 @@ import System.IO.Unsafe (unsafeInterleaveIO)             -- only used safely!  import System.Directory  (getCurrentDirectory)- import Data.Time (getZonedTime, NominalDiffTime, UTCTime, getCurrentTime, diffUTCTime)-import Data.List (intercalate, isPrefixOf, nub)+import Data.List (intercalate, isPrefixOf)  import Data.Maybe (mapMaybe, listToMaybe) -import qualified Data.Map.Strict as M import qualified Data.Foldable   as S (toList) import qualified Data.Text       as T @@ -79,6 +78,8 @@ import qualified Data.SBV.Provers.Yices     as Yices import qualified Data.SBV.Provers.Z3        as Z3 +import GHC.TypeLits+ mkConfig :: SMTSolver -> SMTLibVersion -> [Control.SMTOption] -> SMTConfig mkConfig s smtVersion startOpts = SMTConfig { verbose                     = False                                             , timing                      = NoTiming@@ -91,13 +92,12 @@                                             , dsatPrecision               = Nothing                                             , extraArgs                   = []                                             , satCmd                      = "(check-sat)"-                                            , satTrackUFs                 = True                   -- i.e., yes, do extract UI function values+                                            , allSatTrackUFs              = True                   -- i.e., yes, do extract UI function values                                             , allSatMaxModelCount         = Nothing                -- i.e., return all satisfying models                                             , allSatPrintAlong            = False                  -- i.e., do not print models as they are found                                             , isNonModelVar               = const False            -- i.e., everything is a model-variable by default                                             , validateModel               = False                                             , optimizeValidateConstraints = False-                                            , allowQuantifiedQueries      = False                                             , roundingMode                = RoundNearestTiesToEven                                             , solverSetOptions            = startOpts                                             , ignoreExitCode              = False@@ -164,49 +164,23 @@ -- type when necessary. type Predicate = Symbolic SBool --- | A goal is a symbolic program that returns no values. The idea is that the constraints/min-max--- goals will serve as appropriate directives for sat/prove calls.-type Goal = Symbolic ()---- | A type @a@ is provable if we can turn it into a predicate.--- Note that a predicate can be made from a curried function of arbitrary arity, where--- each element is either a symbolic type or up-to a 7-tuple of symbolic-types. So--- predicates can be constructed from almost arbitrary Haskell functions that have arbitrary--- shapes. (See the instance declarations below.)-class ExtractIO m => MProvable m a where-  -- | Generalization of 'Data.SBV.universal_'-  universal_ :: a -> SymbolicT m SBool--  -- | Generalization of 'Data.SBV.universal'-  universal  :: [String] -> a -> SymbolicT m SBool--  -- | Generalization of 'Data.SBV.existential_'-  existential_ :: a -> SymbolicT m SBool--  -- | Generalization of 'Data.SBV.existential'-  existential :: [String] -> a -> SymbolicT m SBool--  -- | Generalization of 'Data.SBV.prove'-  prove :: a -> m ThmResult-  prove = proveWith defaultSMTCfg+-- | A constraint set is a symbolic program that returns no values. The idea is that the constraints/min-max+-- goals will serve as the collection of constraints that will be used for sat/optimize calls.+type ConstraintSet = Symbolic () -  -- | Generalization of 'Data.SBV.proveWith'-  proveWith :: SMTConfig -> a -> m ThmResult-  proveWith cfg a = do r <- runWithQuery False (checkNoOptimizations >> Control.getSMTResult) cfg a-                       ThmResult <$> if validationRequested cfg-                                     then validate False cfg a r-                                     else return r+-- | `Provable` is specialization of `ProvableM` to the `IO` monad. Unless you are using+-- transformers explicitly, this is the type you should prefer.+type Provable = ProvableM IO -  -- | Generalization of 'Data.SBV.dprove'-  dprove :: a -> m ThmResult-  dprove = dproveWith defaultDeltaSMTCfg+-- | `Data.SBV.Provers.Satisfiable` is specialization of `SatisfiableM` to the `IO` monad. Unless you are using+-- transformers explicitly, this is the type you should prefer.+type Satisfiable = SatisfiableM IO -  -- | Generalization of 'Data.SBV.dproveWith'-  dproveWith :: SMTConfig -> a -> m ThmResult-  dproveWith cfg a = do r <- runWithQuery False (checkNoOptimizations >> Control.getSMTResult) cfg a-                        ThmResult <$> if validationRequested cfg-                                      then validate False cfg a r-                                      else return r+-- | A type @a@ is satisfiable if it has constraints, potentially returning a boolean. This class+-- captures essentially sat and optimize calls.+class ExtractIO m => SatisfiableM m a where+  -- | Reduce an arg, for sat purposes.+  satArgReduce :: a -> SymbolicT m SBool    -- | Generalization of 'Data.SBV.sat'   sat :: a -> m SatResult@@ -214,9 +188,9 @@    -- | Generalization of 'Data.SBV.satWith'   satWith :: SMTConfig -> a -> m SatResult-  satWith cfg a = do r <- runWithQuery True (checkNoOptimizations >> Control.getSMTResult) cfg a+  satWith cfg a = do r <- runWithQuery satArgReduce True (checkNoOptimizations >> Control.getSMTResult) cfg a                      SatResult <$> if validationRequested cfg-                                   then validate True cfg a r+                                   then validate satArgReduce True cfg a r                                    else return r    -- | Generalization of 'Data.SBV.sat'@@ -225,9 +199,9 @@    -- | Generalization of 'Data.SBV.satWith'   dsatWith :: SMTConfig -> a -> m SatResult-  dsatWith cfg a = do r <- runWithQuery True (checkNoOptimizations >> Control.getSMTResult) cfg a+  dsatWith cfg a = do r <- runWithQuery satArgReduce True (checkNoOptimizations >> Control.getSMTResult) cfg a                       SatResult <$> if validationRequested cfg-                                    then validate True cfg a r+                                    then validate satArgReduce True cfg a r                                     else return r    -- | Generalization of 'Data.SBV.allSat'@@ -236,12 +210,24 @@    -- | Generalization of 'Data.SBV.allSatWith'   allSatWith :: SMTConfig -> a -> m AllSatResult-  allSatWith cfg a = do asr <- runWithQuery True (checkNoOptimizations >> Control.getAllSatResult) cfg a+  allSatWith cfg a = do asr <- runWithQuery satArgReduce True (checkNoOptimizations >> Control.getAllSatResult) cfg a                         if validationRequested cfg-                           then do rs' <- mapM (validate True cfg a) (allSatResults asr)+                           then do rs' <- mapM (validate satArgReduce True cfg a) (allSatResults asr)                                    return asr{allSatResults = rs'}                            else return asr +  -- | Generalization of 'Data.SBV.isSatisfiable'+  isSatisfiable :: a -> m Bool+  isSatisfiable = isSatisfiableWith defaultSMTCfg++  -- | Generalization of 'Data.SBV.isSatisfiableWith'+  isSatisfiableWith :: SMTConfig -> a -> m Bool+  isSatisfiableWith cfg p = do r <- satWith cfg p+                               case r of+                                 SatResult Satisfiable{}   -> return True+                                 SatResult Unsatisfiable{} -> return False+                                 _                         -> error $ "SBV.isSatisfiable: Received: " ++ show r+   -- | Generalization of 'Data.SBV.optimize'   optimize :: OptimizeStyle -> a -> m OptimizeResult   optimize = optimizeWith defaultSMTCfg@@ -249,11 +235,11 @@   -- | Generalization of 'Data.SBV.optimizeWith'   optimizeWith :: SMTConfig -> OptimizeStyle -> a -> m OptimizeResult   optimizeWith config style optGoal = do-                   res <- runWithQuery True opt config optGoal+                   res <- runWithQuery satArgReduce True opt config optGoal                    if not (optimizeValidateConstraints config)                       then return res                       else let v :: SMTResult -> m SMTResult-                               v = validate True config optGoal+                               v = validate satArgReduce True config optGoal                            in case res of                                 LexicographicResult m -> LexicographicResult <$> v m                                 IndependentResult xs  -> let w []            sofar = return (reverse sofar)@@ -262,8 +248,6 @@                                 ParetoResult (b, rs)  -> ParetoResult . (b, ) <$> mapM v rs      where opt = do objectives <- Control.getObjectives-                   qinps      <- Control.getQuantifiedInputs-                   spgm       <- Control.getSBVPgm                     when (null objectives) $                           error $ unlines [ ""@@ -288,48 +272,6 @@                                           ]  -                   let universals = S.toList $ getUniversals qinps--                       firstUniversal-                         | null universals = error "Data.SBV: Impossible happened! Universal optimization with no universals!"-                         | True            = minimum $ fmap (swNodeId . getSV) universals--                       mappings :: M.Map SV SBVExpr-                       mappings = M.fromList (S.toList (pgmAssignments spgm))--                       chaseUniversal entry = go entry []-                         where go x sofar-                                | nx >= firstUniversal-                                = nub $ [unm | unm <- universals, nx >= swNodeId (getSV unm)] ++ sofar-                                | True-                                = let oVars (LkUp _ a b)             = [a, b]-                                      oVars (IEEEFP (FP_Cast _ _ o)) = [o]-                                      oVars _                        = []-                                      vars = case x `M.lookup` mappings of-                                               Nothing            -> []-                                               Just (SBVApp o ss) -> nub (oVars o ++ ss)-                                  in foldr go sofar vars-                                where nx = swNodeId x--                   let needsUniversalOpt = let tag _  [] = Nothing-                                               tag nm xs = Just (nm, xs)-                                               needsUniversal (Maximize          nm (x, _))   = tag nm (chaseUniversal x)-                                               needsUniversal (Minimize          nm (x, _))   = tag nm (chaseUniversal x)-                                               needsUniversal (AssertWithPenalty nm (x, _) _) = tag nm (chaseUniversal x)-                                           in mapMaybe needsUniversal objectives--                   unless (null universals || null needsUniversalOpt) $-                          let len = maximum $ 0 : [length nm | (nm, _) <- needsUniversalOpt]-                              pad n = n ++ replicate (len - length n) ' '-                          in error $ unlines $ [ ""-                                               , "*** Data.SBV: Problem needs optimization of metric in the scope of universally quantified variable(s):"-                                               , "***"-                                               ]-                                           ++  [ "***          " ++  pad s ++ " [Depends on: " ++ intercalate ", " (getUserName' <$> xs) ++ "]"  | (s, xs) <- needsUniversalOpt ]-                                           ++  [ "***"-                                               , "*** Optimization is only meaningful with existentially quantified metrics."-                                               ]-                    let optimizerDirectives = concatMap minmax objectives ++ priority style                          where mkEq (x, y) = "(assert (= " ++ show x ++ " " ++ show y ++ "))" @@ -357,16 +299,76 @@                      Independent   -> IndependentResult   <$> Control.getIndependentOptResults (map objectiveName objectives)                      Pareto mbN    -> ParetoResult        <$> Control.getParetoOptResults mbN -  -- | Generalization of 'Data.SBV.isVacuous'-  isVacuous :: a -> m Bool-  isVacuous = isVacuousWith defaultSMTCfg+-- | Find a satisfying assignment to a property with multiple solvers, running them in separate threads. The+-- results will be returned in the order produced.+satWithAll :: Satisfiable a => [SMTConfig] -> a -> IO [(Solver, NominalDiffTime, SatResult)]+satWithAll = (`sbvWithAll` satWith) -  -- | Generalization of 'Data.SBV.isVacuousWith'-  isVacuousWith :: SMTConfig -> a -> m Bool-  isVacuousWith cfg a = -- NB. Can't call runWithQuery since last constraint would become the implication!-       fst <$> runSymbolic (SMTMode QueryInternal ISetup True cfg) (existential_ a >> Control.executeQuery QueryInternal check)+-- | Find a satisfying assignment to a property with multiple solvers, running them in separate threads. Only+-- the result of the first one to finish will be returned, remaining threads will be killed.+-- Note that we send an exception to the losing processes, but we do *not* actually wait for them+-- to finish. In rare cases this can lead to zombie processes. In previous experiments, we found+-- that some processes take their time to terminate. So, this solution favors quick turnaround.+satWithAny :: Satisfiable a => [SMTConfig] -> a -> IO (Solver, NominalDiffTime, SatResult)+satWithAny = (`sbvWithAny` satWith)++-- | Find a satisfying assignment to a property using a single solver, but+-- providing several query problems of interest, with each query running in a+-- separate thread and return the first one that returns. This can be useful to+-- use symbolic mode to drive to a location in the search space of the solver+-- and then refine the problem in query mode. If the computation is very hard to+-- solve for the solver than running in concurrent mode may provide a large+-- performance benefit.+satConcurrentWithAny :: Satisfiable a => SMTConfig -> [Query b] -> a -> IO (Solver, NominalDiffTime, SatResult)+satConcurrentWithAny solver qs a = do (slvr,time,result) <- sbvConcurrentWithAny solver go qs a+                                      return (slvr, time, SatResult result)+  where go cfg a' q = runWithQuery satArgReduce True (do _ <- q; checkNoOptimizations >> Control.getSMTResult) cfg a'++-- | Find a satisfying assignment to a property using a single solver, but run+-- each query problem in a separate isolated thread and wait for each thread to+-- finish. See 'satConcurrentWithAny' for more details.+satConcurrentWithAll :: Satisfiable a => SMTConfig -> [Query b] -> a -> IO [(Solver, NominalDiffTime, SatResult)]+satConcurrentWithAll solver qs a = do results <- sbvConcurrentWithAll solver go qs a+                                      return $ (\(a',b,c) -> (a',b,SatResult c)) <$> results+  where go cfg a' q = runWithQuery satArgReduce True (do _ <- q; checkNoOptimizations >> Control.getSMTResult) cfg a'++-- | A type @a@ is provable if we can turn it into a predicate, i.e., it has to return a boolean.+-- This class captures essentially prove calls.+class ExtractIO m => ProvableM m a where+  -- | Reduce an arg, for proof purposes.+  proofArgReduce :: a -> SymbolicT m SBool++  -- | Generalization of 'Data.SBV.prove'+  prove :: a -> m ThmResult+  prove = proveWith defaultSMTCfg++  -- | Generalization of 'Data.SBV.proveWith'+  proveWith :: SMTConfig -> a -> m ThmResult+  proveWith cfg a = do r <- runWithQuery proofArgReduce False (checkNoOptimizations >> Control.getSMTResult) cfg a+                       ThmResult <$> if validationRequested cfg+                                     then validate proofArgReduce False cfg a r+                                     else return r++  -- | Generalization of 'Data.SBV.dprove'+  dprove :: a -> m ThmResult+  dprove = dproveWith defaultDeltaSMTCfg++  -- | Generalization of 'Data.SBV.dproveWith'+  dproveWith :: SMTConfig -> a -> m ThmResult+  dproveWith cfg a = do r <- runWithQuery proofArgReduce False (checkNoOptimizations >> Control.getSMTResult) cfg a+                        ThmResult <$> if validationRequested cfg+                                      then validate proofArgReduce False cfg a r+                                      else return r++  -- | Generalization of 'Data.SBV.isVacuousProof'+  isVacuousProof :: a -> m Bool+  isVacuousProof = isVacuousProofWith defaultSMTCfg++  -- | Generalization of 'Data.SBV.isVacuousProofWith'+  isVacuousProofWith :: SMTConfig -> a -> m Bool+  isVacuousProofWith cfg a = -- NB. Can't call runWithQuery since last constraint would become the implication!+       fst <$> runSymbolic cfg (SMTMode QueryInternal ISetup True cfg) (proofArgReduce a >> Control.executeQuery QueryInternal check)      where-       check :: QueryT m Bool        check = do cs <- Control.checkSat                   case cs of                     Control.Unsat  -> return True@@ -390,242 +392,190 @@                              ThmResult Unknown{}       -> bad                              ThmResult ProofError{}    -> bad -  -- | Generalization of 'Data.SBV.isSatisfiable'-  isSatisfiable :: a -> m Bool-  isSatisfiable = isSatisfiableWith defaultSMTCfg--  -- | Generalization of 'Data.SBV.isSatisfiableWith'-  isSatisfiableWith :: SMTConfig -> a -> m Bool-  isSatisfiableWith cfg p = do r <- satWith cfg p-                               case r of-                                 SatResult Satisfiable{}   -> return True-                                 SatResult Unsatisfiable{} -> return False-                                 _                         -> error $ "SBV.isSatisfiable: Received: " ++ show r--  -- | Validate a model obtained from the solver-  validate :: Bool -> SMTConfig -> a -> SMTResult -> m SMTResult-  validate isSAT cfg p res = case res of-                               Unsatisfiable{} -> return res-                               Satisfiable _ m -> case modelBindings m of-                                                    Nothing  -> error "Data.SBV.validate: Impossible happened; no bindings generated during model validation."-                                                    Just env -> check env--                               DeltaSat {}     -> cant [ "The model is delta-satisfiable."-                                                       , "Cannot validate delta-satisfiable models."-                                                       ]--                               SatExtField{}   -> cant [ "The model requires an extension field value."-                                                       , "Cannot validate models with infinities/epsilons produced during optimization."-                                                       , ""-                                                       , "To turn validation off, use `cfg{optimizeValidateConstraints = False}`"-                                                       ]--                               Unknown{}       -> return res-                               ProofError{}    -> return res--    where cant msg = return $ ProofError cfg (msg ++ [ ""-                                                     , "Unable to validate the produced model."-                                                     ]) (Just res)+-- | Prove a property with multiple solvers, running them in separate threads. Only+-- the result of the first one to finish will be returned, remaining threads will be killed.+-- Note that we send an exception to the losing processes, but we do *not* actually wait for them+-- to finish. In rare cases this can lead to zombie processes. In previous experiments, we found+-- that some processes take their time to terminate. So, this solution favors quick turnaround.+proveWithAny :: Provable a => [SMTConfig] -> a -> IO (Solver, NominalDiffTime, ThmResult)+proveWithAny  = (`sbvWithAny` proveWith) -          check env = do let univs    = [T.unpack n | ((ALL, NamedSymVar _ n), _) <- env]-                             envShown = showModelDictionary True True cfg modelBinds-                                where modelBinds = [(T.unpack n, fake q s v) | ((q, NamedSymVar s n), v) <- env]-                                      fake q s Nothing-                                        | q == ALL-                                        = RegularCV $ CV (kindOf s) $ CUserSort (Nothing, "<universally quantified>")-                                        | True-                                        = RegularCV $ CV (kindOf s) $ CUserSort (Nothing, "<no binding found>")-                                      fake _ _ (Just v) = RegularCV v+-- | Prove a property with multiple solvers, running them in separate threads. The+-- results will be returned in the order produced.+proveWithAll :: Provable a => [SMTConfig] -> a -> IO [(Solver, NominalDiffTime, ThmResult)]+proveWithAll  = (`sbvWithAll` proveWith) -                             notify s-                               | not (verbose cfg) = return ()-                               | True              = debug cfg ["[VALIDATE] " `alignPlain` s]+-- | Prove a property by running many queries each isolated to their own thread+-- concurrently and return the first that finishes, killing the others+proveConcurrentWithAny :: Provable a => SMTConfig -> [Query b] -> a -> IO (Solver, NominalDiffTime, ThmResult)+proveConcurrentWithAny solver qs a = do (slvr,time,result) <- sbvConcurrentWithAny solver go qs a+                                        return (slvr, time, ThmResult result)+  where go cfg a' q = runWithQuery proofArgReduce False (do _ <- q;  checkNoOptimizations >> Control.getSMTResult) cfg a' -                         notify $ "Validating the model. " ++ if null env then "There are no assignments." else "Assignment:"-                         mapM_ notify ["    " ++ l | l <- lines envShown]+-- | Prove a property by running many queries each isolated to their own thread+-- concurrently and wait for each to finish returning all results+proveConcurrentWithAll :: Provable a => SMTConfig -> [Query b] -> a -> IO [(Solver, NominalDiffTime, ThmResult)]+proveConcurrentWithAll solver qs a = do results <- sbvConcurrentWithAll solver go qs a+                                        return $ (\(a',b,c) -> (a',b,ThmResult c)) <$> results+  where go cfg a' q = runWithQuery proofArgReduce False (do _ <- q; checkNoOptimizations >> Control.getSMTResult) cfg a' -                         unless (null univs) $ do-                                notify $ "NB. The following variable(s) are universally quantified: " ++ intercalate ", " univs-                                notify   "    We will assume that they are essentially zero for the purposes of validation."-                                notify   "    Note that this is a gross simplification of the model validation with universals!"+-- | Validate a model obtained from the solver+validate :: MonadIO m => (a -> SymbolicT m SBool) -> Bool -> SMTConfig -> a -> SMTResult -> m SMTResult+validate reducer isSAT cfg p res =+     case res of+       Unsatisfiable{} -> return res+       Satisfiable _ m -> case modelBindings m of+                            Nothing  -> error "Data.SBV.validate: Impossible happened; no bindings generated during model validation."+                            Just env -> check env -                         result <- snd <$> runSymbolic (Concrete (Just (isSAT, env))) ((if isSAT then existential_ p else universal_ p) >>= output)+       DeltaSat {}     -> cant [ "The model is delta-satisfiable."+                               , "Cannot validate delta-satisfiable models."+                               ] -                         let explain  = [ ""-                                        , "Assignment:"  ++ if null env then " <none>" else ""-                                        ]-                                     ++ [ ""          | not (null env)]-                                     ++ [ "    " ++ l | l <- lines envShown]-                                     ++ [ "" ]+       SatExtField{}   -> cant [ "The model requires an extension field value."+                               , "Cannot validate models with infinities/epsilons produced during optimization."+                               , ""+                               , "To turn validation off, use `cfg{optimizeValidateConstraints = False}`"+                               ] -                             wrap tag extras = return $ ProofError cfg (tag : explain ++ extras) (Just res)+       Unknown{}       -> return res+       ProofError{}    -> return res -                             giveUp   s     = wrap ("Data.SBV: Cannot validate the model: " ++ s)-                                                   [ "SBV's model validator is incomplete, and cannot handle this particular case."-                                                   , "Please report this as a feature request or possibly a bug!"-                                                   ]+  where cant msg = return $ ProofError cfg (msg ++ [ ""+                                                   , "Unable to validate the produced model."+                                                   ]) (Just res) -                             badModel s     = wrap ("Data.SBV: Model validation failure: " ++ s)-                                                   [ "Backend solver returned a model that does not satisfy the constraints."-                                                   , "This could indicate a bug in the backend solver, or SBV itself. Please report."-                                                   ]+        check env = do let envShown = showModelDictionary True True cfg modelBinds+                              where modelBinds = [(T.unpack n, RegularCV v) | (NamedSymVar _ n, v) <- env] -                             notConcrete sv = wrap ("Data.SBV: Cannot validate the model, since " ++ show sv ++ " is not concretely computable.")-                                                   (  perhaps (why sv)-                                                   ++ [ "SBV's model validator is incomplete, and cannot handle this particular case."-                                                      , "Please report this as a feature request or possibly a bug!"-                                                      ]-                                                   )-                                  where perhaps Nothing  = []-                                        perhaps (Just x) = [x, ""]+                           notify s+                             | not (verbose cfg) = return ()+                             | True              = debug cfg ["[VALIDATE] " `alignPlain` s] -                                        -- This is incomplete, but should capture the most common cases-                                        why s = case s `lookup` S.toList (pgmAssignments (resAsgns result)) of-                                                  Nothing            -> Nothing-                                                  Just (SBVApp o as) -> case o of-                                                                          Uninterpreted v   -> Just $ "The value depends on the uninterpreted constant " ++ show v ++ "."-                                                                          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."-                                                                          _                 -> listToMaybe $ mapMaybe why as+                       notify $ "Validating the model. " ++ if null env then "There are no assignments." else "Assignment:"+                       mapM_ notify ["    " ++ l | l <- lines envShown] -                             cstrs = S.toList $ resConstraints result+                       result <- snd <$> runSymbolic cfg (Concrete (Just (isSAT, env))) (reducer p >>= output) -                             walkConstraints [] cont = do-                                unless (null cstrs) $ notify "Validated all constraints."-                                cont-                             walkConstraints ((isSoft, attrs, sv) : rest) cont-                                | kindOf sv /= KBool-                                = giveUp $ "Constraint tied to " ++ show sv ++ " is non-boolean."-                                | isSoft || sv == trueSV-                                = walkConstraints rest cont-                                | sv == falseSV-                                = case mbName of-                                    Just nm -> badModel $ "Named constraint " ++ show nm ++ " evaluated to False."-                                    Nothing -> badModel "A constraint was violated."-                                | True-                                = notConcrete sv-                                where mbName = listToMaybe [n | (":named", n) <- attrs]+                       let explain  = [ ""+                                      , "Assignment:"  ++ if null env then " <none>" else ""+                                      ]+                                   ++ [ ""          | not (null env)]+                                   ++ [ "    " ++ l | l <- lines envShown]+                                   ++ [ "" ] -                             -- SAT: All outputs must be true-                             satLoop []-                               = do notify "All outputs are satisfied. Validation complete."-                                    return res-                             satLoop (sv:svs)-                               | kindOf sv /= KBool-                               = giveUp $ "Output tied to " ++ show sv ++ " is non-boolean."-                               | sv == trueSV-                               = satLoop svs-                               | sv == falseSV-                               = badModel "Final output evaluated to False."-                               | True-                               = notConcrete sv+                           wrap tag extras = return $ ProofError cfg (tag : explain ++ extras) (Just res) -                             -- Proof: At least one output must be false-                             proveLoop [] somethingFailed-                               | somethingFailed = do notify "Counterexample is validated."-                                                      return res-                               | True            = do notify "Counterexample violates none of the outputs."-                                                      badModel "Counter-example violates no constraints."-                             proveLoop (sv:svs) somethingFailed-                               | kindOf sv /= KBool-                               = giveUp $ "Output tied to " ++ show sv ++ " is non-boolean."-                               | sv == trueSV-                               = proveLoop svs somethingFailed-                               | sv == falseSV-                               = proveLoop svs True-                               | True-                               = notConcrete sv+                           giveUp   s     = wrap ("Data.SBV: Cannot validate the model: " ++ s)+                                                 [ "SBV's model validator is incomplete, and cannot handle this particular case."+                                                 , "Please report this as a feature request or possibly a bug!"+                                                 ] -                             -- Output checking is tricky, since we behave differently for different modes-                             checkOutputs []-                               | null cstrs-                               = giveUp "Impossible happened: There are no outputs nor any constraints to check."-                             checkOutputs os-                               = do notify "Validating outputs."-                                    if isSAT then satLoop   os-                                             else proveLoop os False+                           badModel s     = wrap ("Data.SBV: Model validation failure: " ++ s)+                                                 [ "Backend solver returned a model that does not satisfy the constraints."+                                                 , "This could indicate a bug in the backend solver, or SBV itself. Please report."+                                                 ] -                         notify $ if null cstrs-                                  then "There are no constraints to check."-                                  else "Validating " ++ show (length cstrs) ++ " constraint(s)."+                           notConcrete sv = wrap ("Data.SBV: Cannot validate the model, since " ++ show sv ++ " is not concretely computable.")+                                                 (  perhaps (why sv)+                                                 ++ [ "SBV's model validator is incomplete, and cannot handle this particular case."+                                                    , "Please report this as a feature request or possibly a bug!"+                                                    ]+                                                 )+                                where perhaps Nothing  = []+                                      perhaps (Just x) = [x, ""] -                         walkConstraints cstrs (checkOutputs (resOutputs result))+                                      -- This is incomplete, but should capture the most common cases+                                      why s = case s `lookup` S.toList (pgmAssignments (resAsgns result)) of+                                                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."+                                                                        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."+                                                                        _                -> listToMaybe $ mapMaybe why as --- | `Provable` is specialization of `MProvable` to the `IO` monad. Unless you are using--- transformers explicitly, this is the type you should prefer.-type Provable = MProvable IO+                           cstrs = S.toList $ resConstraints result --- | Prove a property with multiple solvers, running them in separate threads. The--- results will be returned in the order produced.-proveWithAll :: Provable a => [SMTConfig] -> a -> IO [(Solver, NominalDiffTime, ThmResult)]-proveWithAll  = (`sbvWithAll` proveWith)+                           walkConstraints [] cont = do+                              unless (null cstrs) $ notify "Validated all constraints."+                              cont+                           walkConstraints ((isSoft, attrs, sv) : rest) cont+                              | kindOf sv /= KBool+                              = giveUp $ "Constraint tied to " ++ show sv ++ " is non-boolean."+                              | isSoft || sv == trueSV+                              = walkConstraints rest cont+                              | sv == falseSV+                              = case mbName of+                                  Just nm -> badModel $ "Named constraint " ++ show nm ++ " evaluated to False."+                                  Nothing -> badModel "A constraint was violated."+                              | True+                              = notConcrete sv+                              where mbName = listToMaybe [n | (":named", n) <- attrs] --- | Prove a property with multiple solvers, running them in separate threads. Only--- the result of the first one to finish will be returned, remaining threads will be killed.--- Note that we send an exception to the losing processes, but we do *not* actually wait for them--- to finish. In rare cases this can lead to zombie processes. In previous experiments, we found--- that some processes take their time to terminate. So, this solution favors quick turnaround.-proveWithAny :: Provable a => [SMTConfig] -> a -> IO (Solver, NominalDiffTime, ThmResult)-proveWithAny  = (`sbvWithAny` proveWith)+                           -- SAT: All outputs must be true+                           satLoop []+                             = do notify "All outputs are satisfied. Validation complete."+                                  return res+                           satLoop (sv:svs)+                             | kindOf sv /= KBool+                             = giveUp $ "Output tied to " ++ show sv ++ " is non-boolean."+                             | sv == trueSV+                             = satLoop svs+                             | sv == falseSV+                             = badModel "Final output evaluated to False."+                             | True+                             = notConcrete sv --- | Find a satisfying assignment to a property with multiple solvers, running them in separate threads. The--- results will be returned in the order produced.-satWithAll :: Provable a => [SMTConfig] -> a -> IO [(Solver, NominalDiffTime, SatResult)]-satWithAll = (`sbvWithAll` satWith)+                           -- Proof: At least one output must be false+                           proveLoop [] somethingFailed+                             | somethingFailed = do notify "Counterexample is validated."+                                                    return res+                             | True            = do notify "Counterexample violates none of the outputs."+                                                    badModel "Counter-example violates no constraints."+                           proveLoop (sv:svs) somethingFailed+                             | kindOf sv /= KBool+                             = giveUp $ "Output tied to " ++ show sv ++ " is non-boolean."+                             | sv == trueSV+                             = proveLoop svs somethingFailed+                             | sv == falseSV+                             = proveLoop svs True+                             | True+                             = notConcrete sv --- | Find a satisfying assignment to a property with multiple solvers, running them in separate threads. Only--- the result of the first one to finish will be returned, remaining threads will be killed.--- Note that we send an exception to the losing processes, but we do *not* actually wait for them--- to finish. In rare cases this can lead to zombie processes. In previous experiments, we found--- that some processes take their time to terminate. So, this solution favors quick turnaround.-satWithAny :: Provable a => [SMTConfig] -> a -> IO (Solver, NominalDiffTime, SatResult)-satWithAny = (`sbvWithAny` satWith)+                           -- Output checking is tricky, since we behave differently for different modes+                           checkOutputs []+                             | null cstrs+                             = giveUp "Impossible happened: There are no outputs nor any constraints to check."+                           checkOutputs os+                             = do notify "Validating outputs."+                                  if isSAT then satLoop   os+                                           else proveLoop os False --- | Find a satisfying assignment to a property using a single solver, but--- providing several query problems of interest, with each query running in a--- separate thread and return the first one that returns. This can be useful to--- use symbolic mode to drive to a location in the search space of the solver--- and then refine the problem in query mode. If the computation is very hard to--- solve for the solver than running in concurrent mode may provide a large--- performance benefit.-satConcurrentWithAny :: Provable a => SMTConfig -> [Query b] -> a -> IO (Solver, NominalDiffTime, SatResult)-satConcurrentWithAny solver qs a = do (slvr,time,result) <- sbvConcurrentWithAny solver go qs a-                                      return (slvr, time, SatResult result)-  where go cfg a' q = runWithQuery True (do _ <- q; checkNoOptimizations >> Control.getSMTResult) cfg a'+                       notify $ if null cstrs+                                then "There are no constraints to check."+                                else "Validating " ++ show (length cstrs) ++ " constraint(s)." --- | Prove a property by running many queries each isolated to their own thread--- concurrently and return the first that finishes, killing the others-proveConcurrentWithAny :: Provable a => SMTConfig -> [Query b] -> a -> IO (Solver, NominalDiffTime, ThmResult)-proveConcurrentWithAny solver qs a = do (slvr,time,result) <- sbvConcurrentWithAny solver go qs a-                                        return (slvr, time, ThmResult result)-  where go cfg a' q = runWithQuery False (do _ <- q;  checkNoOptimizations >> Control.getSMTResult) cfg a'+                       walkConstraints cstrs (checkOutputs (resOutputs result)) --- | Find a satisfying assignment to a property using a single solver, but run--- each query problem in a separate isolated thread and wait for each thread to--- finish. See 'satConcurrentWithAny' for more details.-satConcurrentWithAll :: Provable a => SMTConfig -> [Query b] -> a -> IO [(Solver, NominalDiffTime, SatResult)]-satConcurrentWithAll solver qs a = do results <- sbvConcurrentWithAll solver go qs a-                                      return $ (\(a',b,c) -> (a',b,SatResult c)) <$> results-  where go cfg a' q = runWithQuery True (do _ <- q; checkNoOptimizations >> Control.getSMTResult) cfg a'+-- | Create an SMT-Lib2 benchmark, for a SAT query.+generateSMTBenchmarkSat :: SatisfiableM m a => a -> m String+generateSMTBenchmarkSat = generateSMTBenchMarkGen True satArgReduce --- | Prove a property by running many queries each isolated to their own thread--- concurrently and wait for each to finish returning all results-proveConcurrentWithAll :: Provable a => SMTConfig -> [Query b] -> a -> IO [(Solver, NominalDiffTime, ThmResult)]-proveConcurrentWithAll solver qs a = do results <- sbvConcurrentWithAll solver go qs a-                                        return $ (\(a',b,c) -> (a',b,ThmResult c)) <$> results-  where go cfg a' q = runWithQuery False (do _ <- q; checkNoOptimizations >> Control.getSMTResult) cfg a'+-- | Create an SMT-Lib2 benchmark, for a Proof query.+generateSMTBenchmarkProof :: ProvableM m a => a -> m String+generateSMTBenchmarkProof = generateSMTBenchMarkGen False proofArgReduce --- | Create an SMT-Lib2 benchmark. The 'Bool' argument controls whether this is a SAT instance, i.e.,--- translate the query directly, or a PROVE instance, i.e., translate the negated query.-generateSMTBenchmark :: (MonadIO m, MProvable m a) => Bool -> a -> m String-generateSMTBenchmark isSat a = do+-- | Generic benchmark creator+generateSMTBenchMarkGen :: MonadIO m => Bool -> (a -> SymbolicT m SBool) -> a -> m String+generateSMTBenchMarkGen isSat reduce a = do       t <- liftIO getZonedTime        let comments = ["Automatically created by SBV on " ++ show t]           cfg      = defaultSMTCfg { smtLibVersion = SMTLib2 } -      (_, res) <- runSymbolic (SMTMode QueryInternal ISetup isSat cfg) $ (if isSat then existential_ else universal_) a >>= output+      (_, res) <- runSymbolic cfg (SMTMode QueryInternal ISetup isSat cfg) $ reduce a >>= output        let SMTProblem{smtLibPgm} = Control.runProofOn (SMTMode QueryInternal IRun isSat cfg) QueryInternal comments res           out                   = show (smtLibPgm cfg)@@ -641,124 +591,129 @@                                                 , "*** Use \"optimize\"/\"optimizeWith\" to calculate optimal satisfaction!"                                                 ] --- If we get a program producing nothing (i.e., Symbolic ()), pretend it simply returns True.--- This is useful since min/max calls and constraints will provide the context-instance ExtractIO m => MProvable m (SymbolicT m ()) where-  universal_     a = universal_     ((a >> return sTrue) :: SymbolicT m SBool)-  universal ns   a = universal ns   ((a >> return sTrue) :: SymbolicT m SBool)-  existential_   a = existential_   ((a >> return sTrue) :: SymbolicT m SBool)-  existential ns a = existential ns ((a >> return sTrue) :: SymbolicT m SBool)+instance ExtractIO m => SatisfiableM m (SymbolicT m ()) where satArgReduce a = satArgReduce ((a >> pure sTrue) :: SymbolicT m SBool)+-- instance ExtractIO m => ProvableM m (SymbolicT m ())  -- NO INSTANCE ON PURPOSE; don't want to prove goals -instance ExtractIO m => MProvable m (SymbolicT m SBool) where-  universal_     = id-  universal []   = id-  universal xs   = error $ "SBV.universal: Extra unmapped name(s) in predicate construction: " ++ intercalate ", " xs-  existential_   = id-  existential [] = id-  existential xs = error $ "SBV.existential: Extra unmapped name(s) in predicate construction: " ++ intercalate ", " xs+instance ExtractIO m => SatisfiableM m (SymbolicT m SBool) where satArgReduce   = id+instance ExtractIO m => ProvableM    m (SymbolicT m SBool) where proofArgReduce = id -instance ExtractIO m => MProvable m SBool where-  universal_    = return-  universal _   = return-  existential_  = return-  existential _ = return+instance ExtractIO m => SatisfiableM m SBool where satArgReduce   = return+instance ExtractIO m => ProvableM    m SBool where proofArgReduce = return +instance (ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (Forall nm a -> r) where+  satArgReduce = satArgReduce . quantifiedBool++instance (ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (Forall nm a -> r) where+  proofArgReduce = proofArgReduce . quantifiedBool++instance (ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (Exists nm a -> r) where+  satArgReduce = satArgReduce . quantifiedBool++instance (ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r, EqSymbolic (SBV a)) => SatisfiableM m (ExistsUnique nm a -> r) where+  satArgReduce = satArgReduce . quantifiedBool++instance (KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (ForallN n nm a -> r) where+  proofArgReduce = proofArgReduce . quantifiedBool++instance (KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (ExistsN n nm a -> r) where+  satArgReduce = satArgReduce . quantifiedBool++instance (ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (Exists nm a -> r) where+  proofArgReduce = proofArgReduce . quantifiedBool++instance (ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r, EqSymbolic (SBV a)) => ProvableM m (ExistsUnique nm a -> r) where+  proofArgReduce = proofArgReduce . quantifiedBool++instance (KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (ForallN n nm a -> r) where+  satArgReduce = satArgReduce . quantifiedBool++instance (KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (ExistsN n nm a -> r) where+  proofArgReduce = proofArgReduce . quantifiedBool+ {---- The following works, but it lets us write properties that+-- The following is a possible definition, but it lets us write properties that -- are not useful.. Such as: prove $ \x y -> (x::SInt8) == y--- Running that will throw an exception since Haskell's equality--- is not be supported by symbolic things. (Needs .==).-instance Provable Bool where-  universal_  x  = universal_     (if x then true else false :: SBool)-  universal s x  = universal s    (if x then true else false :: SBool)-  existential_  x = existential_  (if x then true else false :: SBool)-  existential s x = existential s (if x then true else false :: SBool)+-- Running that will throw an exception since Haskell's equality is not be supported by symbolic things. (Needs .==).+-- So, we avoid these insteances.+instance ExtractIO m => ProvableM m Bool where+  proofArgReduce x  = proofArgReduce (if x then sTrue else sFalse :: SBool)++instance ExtractIO m => SatisfiableM m Bool where+  satArgReduce x  = satArgReduce (if x then sTrue else sFalse :: SBool) -} +-- | Create an argument+mkArg :: (SymVal a, MonadSymbolic m) => m (SBV a)+mkArg = mkSymVal (NonQueryVar Nothing) Nothing+ -- Functions-instance (SymVal a, MProvable m p) => MProvable m (SBV a -> p) where-  universal_         k = sbvForall_  >>= \a -> universal_   $ k a-  universal (s:ss)   k = sbvForall s >>= \a -> universal ss $ k a-  universal []       k = universal_ k-  existential_       k = sbvExists_  >>= \a -> existential_   $ k a-  existential (s:ss) k = sbvExists s >>= \a -> existential ss $ k a-  existential []     k = existential_ k+instance (SymVal a, SatisfiableM m p) => SatisfiableM m (SBV a -> p) where+  satArgReduce k = mkArg >>= \a -> satArgReduce $ k a +instance (SymVal a, ProvableM m p) => ProvableM m (SBV a -> p) where+  proofArgReduce k = mkArg >>= \a -> proofArgReduce $ k a+ -- Arrays-instance (HasKind a, HasKind b, MProvable m p) => MProvable m (SArray a b -> p) where-  universal_         k = newArray_  Nothing >>= \a -> universal_   $ k a-  universal  (s:ss)  k = newArray s Nothing >>= \a -> universal ss $ k a-  universal  []      k = universal_ k-  existential_       k = newArray_  Nothing >>= \a -> existential_   $ k a-  existential (s:ss) k = newArray s Nothing >>= \a -> existential ss $ k a-  existential []     k = existential_ k+instance (HasKind a, HasKind b, SatisfiableM m p) => SatisfiableM m (SArray a b -> p) where+  satArgReduce k = newArray_ Nothing >>= \a -> satArgReduce $ k a +instance (HasKind a, HasKind b, ProvableM m p) => ProvableM m (SArray a b -> p) where+  proofArgReduce k = newArray_ Nothing >>= \a -> proofArgReduce $ k a+ -- 2 Tuple-instance (SymVal a, SymVal b, MProvable m p) => MProvable m ((SBV a, SBV b) -> p) where-  universal_         k = sbvForall_  >>= \a -> universal_   $ \b -> k (a, b)-  universal (s:ss)   k = sbvForall s >>= \a -> universal ss $ \b -> k (a, b)-  universal []       k = universal_ k-  existential_       k = sbvExists_  >>= \a -> existential_   $ \b -> k (a, b)-  existential (s:ss) k = sbvExists s >>= \a -> existential ss $ \b -> k (a, b)-  existential []     k = existential_ k+instance (SymVal a, SymVal b, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b) -> p) where+  satArgReduce k = mkArg >>= \a -> satArgReduce $ \b -> k (a, b) +instance (SymVal a, SymVal b, ProvableM m p) => ProvableM m ((SBV a, SBV b) -> p) where+  proofArgReduce k = mkArg >>= \a -> proofArgReduce $ \b -> k (a, b)+ -- 3 Tuple-instance (SymVal a, SymVal b, SymVal c, MProvable m p) => MProvable m ((SBV a, SBV b, SBV c) -> p) where-  universal_         k = sbvForall_  >>= \a -> universal_   $ \b c -> k (a, b, c)-  universal (s:ss)   k = sbvForall s >>= \a -> universal ss $ \b c -> k (a, b, c)-  universal []       k = universal_ k-  existential_       k = sbvExists_  >>= \a -> existential_   $ \b c -> k (a, b, c)-  existential (s:ss) k = sbvExists s >>= \a -> existential ss $ \b c -> k (a, b, c)-  existential []     k = existential_ k+instance (SymVal a, SymVal b, SymVal c, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c) -> p) where+  satArgReduce k = mkArg >>= \a -> satArgReduce $ \b c -> k (a, b, c) +instance (SymVal a, SymVal b, SymVal c, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c) -> p) where+  proofArgReduce k = mkArg >>= \a -> proofArgReduce $ \b c -> k (a, b, c)+ -- 4 Tuple-instance (SymVal a, SymVal b, SymVal c, SymVal d, MProvable m p) => MProvable m ((SBV a, SBV b, SBV c, SBV d) -> p) where-  universal_         k = sbvForall_  >>= \a -> universal_   $ \b c d -> k (a, b, c, d)-  universal (s:ss)   k = sbvForall s >>= \a -> universal ss $ \b c d -> k (a, b, c, d)-  universal []       k = universal_ k-  existential_       k = sbvExists_  >>= \a -> existential_   $ \b c d -> k (a, b, c, d)-  existential (s:ss) k = sbvExists s >>= \a -> existential ss $ \b c d -> k (a, b, c, d)-  existential []     k = existential_ k+instance (SymVal a, SymVal b, SymVal c, SymVal d, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d) -> p) where+  satArgReduce k = mkArg  >>= \a -> satArgReduce $ \b c d -> k (a, b, c, d) +instance (SymVal a, SymVal b, SymVal c, SymVal d, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d) -> p) where+  proofArgReduce k = mkArg  >>= \a -> proofArgReduce $ \b c d -> k (a, b, c, d)+ -- 5 Tuple-instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, MProvable m p) => MProvable m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) where-  universal_         k = sbvForall_  >>= \a -> universal_   $ \b c d e -> k (a, b, c, d, e)-  universal (s:ss)   k = sbvForall s >>= \a -> universal ss $ \b c d e -> k (a, b, c, d, e)-  universal []       k = universal_ k-  existential_       k = sbvExists_  >>= \a -> existential_   $ \b c d e -> k (a, b, c, d, e)-  existential (s:ss) k = sbvExists s >>= \a -> existential ss $ \b c d e -> k (a, b, c, d, e)-  existential []     k = existential_ k+instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) where+  satArgReduce k = mkArg >>= \a -> satArgReduce $ \b c d e -> k (a, b, c, d, e) +instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) where+  proofArgReduce k = mkArg >>= \a -> proofArgReduce $ \b c d e -> k (a, b, c, d, e)+ -- 6 Tuple-instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, MProvable m p) => MProvable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) where-  universal_         k = sbvForall_  >>= \a -> universal_   $ \b c d e f -> k (a, b, c, d, e, f)-  universal (s:ss)   k = sbvForall s >>= \a -> universal ss $ \b c d e f -> k (a, b, c, d, e, f)-  universal []       k = universal_ k-  existential_       k = sbvExists_  >>= \a -> existential_   $ \b c d e f -> k (a, b, c, d, e, f)-  existential (s:ss) k = sbvExists s >>= \a -> existential ss $ \b c d e f -> k (a, b, c, d, e, f)-  existential []     k = existential_ k+instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) where+  satArgReduce k = mkArg >>= \a -> satArgReduce $ \b c d e f -> k (a, b, c, d, e, f) +instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) where+  proofArgReduce k = mkArg >>= \a -> proofArgReduce $ \b c d e f -> k (a, b, c, d, e, f)+ -- 7 Tuple-instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, MProvable m p) => MProvable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) where-  universal_         k = sbvForall_  >>= \a -> universal_   $ \b c d e f g -> k (a, b, c, d, e, f, g)-  universal (s:ss)   k = sbvForall s >>= \a -> universal ss $ \b c d e f g -> k (a, b, c, d, e, f, g)-  universal []       k = universal_ k-  existential_       k = sbvExists_  >>= \a -> existential_   $ \b c d e f g -> k (a, b, c, d, e, f, g)-  existential (s:ss) k = sbvExists s >>= \a -> existential ss $ \b c d e f g -> k (a, b, c, d, e, f, g)-  existential []     k = existential_ k+instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) where+  satArgReduce k = mkArg >>= \a -> satArgReduce $ \b c d e f g -> k (a, b, c, d, e, f, g) +instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) where+  proofArgReduce k = mkArg >>= \a -> proofArgReduce $ \b c d e f g -> k (a, b, c, d, e, f, g)+ -- | Generalization of 'Data.SBV.runSMT' runSMT :: MonadIO m => SymbolicT m a -> m a runSMT = runSMTWith defaultSMTCfg  -- | Generalization of 'Data.SBV.runSMTWith' runSMTWith :: MonadIO m => SMTConfig -> SymbolicT m a -> m a-runSMTWith cfg a = fst <$> runSymbolic (SMTMode QueryExternal ISetup True cfg) a+runSMTWith cfg a = fst <$> runSymbolic cfg (SMTMode QueryExternal ISetup True cfg) a  -- | Runs with a query.-runWithQuery :: MProvable m a => Bool -> QueryT m b -> SMTConfig -> a -> m b-runWithQuery isSAT q cfg a = fst <$> runSymbolic (SMTMode QueryInternal ISetup isSAT cfg) comp-  where comp =  do _ <- (if isSAT then existential_ else universal_) a >>= output+runWithQuery :: ExtractIO m => (a -> SymbolicT m SBool) -> Bool -> QueryT m b -> SMTConfig -> a -> m b+runWithQuery reducer isSAT q cfg a = fst <$> runSymbolic cfg (SMTMode QueryInternal ISetup isSAT cfg) comp+  where comp =  do _ <- reducer a >>= output                    Control.executeQuery QueryInternal q  -- | Check if a safe-call was safe or not, turning a 'SafeResult' to a Bool.@@ -832,10 +787,8 @@ -- | Symbolically executable program fragments. This class is mainly used for 'safe' calls, and is sufficiently populated internally to cover most use -- cases. Users can extend it as they wish to allow 'safe' checks for SBV programs that return/take types that are user-defined. class ExtractIO m => SExecutable m a where-   -- | Generalization of 'Data.SBV.sName_'-   sName_ :: a -> SymbolicT m ()    -- | Generalization of 'Data.SBV.sName'-   sName  :: [String] -> a -> SymbolicT m ()+   sName :: a -> SymbolicT m ()     -- | Generalization of 'Data.SBV.safe'    safe :: a -> m [SafeResult]@@ -847,7 +800,7 @@                        let mkRelative path                               | cwd `isPrefixOf` path = drop (length cwd) path                               | True                  = path-                       fst <$> runSymbolic (SMTMode QueryInternal ISafe True cfg) (sName_ a >> check mkRelative)+                       fst <$> runSymbolic cfg (SMTMode QueryInternal ISafe True cfg) (sName a >> check mkRelative)      where check :: (FilePath -> FilePath) -> SymbolicT m [SafeResult]            check mkRelative = Control.executeQuery QueryInternal $ Control.getSBVAssertions >>= mapM (verify mkRelative) @@ -868,94 +821,69 @@                    return $ SafeResult (location, msg, result)  instance (ExtractIO m, NFData a) => SExecutable m (SymbolicT m a) where-   sName_   a = a >>= \r -> rnf r `seq` return ()-   sName []   = sName_-   sName xs   = error $ "SBV.SExecutable.sName: Extra unmapped name(s): " ++ intercalate ", " xs+   sName a = a >>= \r -> rnf r `seq` return ()  instance ExtractIO m => SExecutable m (SBV a) where-   sName_   v = sName_   (output v :: SymbolicT m (SBV a))-   sName xs v = sName xs (output v :: SymbolicT m (SBV a))+   sName v = sName (output v :: SymbolicT m (SBV a))  -- Unit output instance ExtractIO m => SExecutable m () where-   sName_   () = sName_   (output () :: SymbolicT m ())-   sName xs () = sName xs (output () :: SymbolicT m ())+   sName () = sName (output () :: SymbolicT m ())  -- List output instance ExtractIO m => SExecutable m [SBV a] where-   sName_   vs = sName_   (output vs :: SymbolicT m [SBV a])-   sName xs vs = sName xs (output vs :: SymbolicT m [SBV a])+   sName vs = sName (output vs :: SymbolicT m [SBV a])  -- 2 Tuple output instance (ExtractIO m, NFData a, SymVal a, NFData b, SymVal b) => SExecutable m (SBV a, SBV b) where-  sName_ (a, b) = sName_ (output a >> output b :: SymbolicT m (SBV b))-  sName _       = sName_+  sName (a, b) = sName (output a >> output b :: SymbolicT m (SBV b))  -- 3 Tuple output instance (ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c) => SExecutable m (SBV a, SBV b, SBV c) where-  sName_ (a, b, c) = sName_ (output a >> output b >> output c :: SymbolicT m (SBV c))-  sName _          = sName_+  sName (a, b, c) = sName (output a >> output b >> output c :: SymbolicT m (SBV c))  -- 4 Tuple output instance (ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d) => SExecutable m (SBV a, SBV b, SBV c, SBV d) where-  sName_ (a, b, c, d) = sName_ (output a >> output b >> output c >> output c >> output d :: SymbolicT m (SBV d))-  sName _             = sName_+  sName (a, b, c, d) = sName (output a >> output b >> output c >> output c >> output d :: SymbolicT m (SBV d))  -- 5 Tuple output instance (ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e) where-  sName_ (a, b, c, d, e) = sName_ (output a >> output b >> output c >> output d >> output e :: SymbolicT m (SBV e))-  sName _                = sName_+  sName (a, b, c, d, e) = sName (output a >> output b >> output c >> output d >> output e :: SymbolicT m (SBV e))  -- 6 Tuple output instance (ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e, NFData f, SymVal f) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) where-  sName_ (a, b, c, d, e, f) = sName_ (output a >> output b >> output c >> output d >> output e >> output f :: SymbolicT m (SBV f))-  sName _                   = sName_+  sName (a, b, c, d, e, f) = sName (output a >> output b >> output c >> output d >> output e >> output f :: SymbolicT m (SBV f))  -- 7 Tuple output instance (ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e, NFData f, SymVal f, NFData g, SymVal g) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) where-  sName_ (a, b, c, d, e, f, g) = sName_ (output a >> output b >> output c >> output d >> output e >> output f >> output g :: SymbolicT m (SBV g))-  sName _                      = sName_+  sName (a, b, c, d, e, f, g) = sName (output a >> output b >> output c >> output d >> output e >> output f >> output g :: SymbolicT m (SBV g))  -- Functions instance (SymVal a, SExecutable m p) => SExecutable m (SBV a -> p) where-   sName_        k = sbvExists_   >>= \a -> sName_   $ k a-   sName (s:ss)  k = sbvExists s  >>= \a -> sName ss $ k a-   sName []      k = sName_ k+   sName k = mkArg >>= \a -> sName $ k a  -- 2 Tuple input instance (SymVal a, SymVal b, SExecutable m p) => SExecutable m ((SBV a, SBV b) -> p) where-  sName_        k = sbvExists_  >>= \a -> sName_   $ \b -> k (a, b)-  sName (s:ss)  k = sbvExists s >>= \a -> sName ss $ \b -> k (a, b)-  sName []      k = sName_ k+  sName k = mkArg >>= \a -> sName $ \b -> k (a, b)  -- 3 Tuple input instance (SymVal a, SymVal b, SymVal c, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c) -> p) where-  sName_       k  = sbvExists_  >>= \a -> sName_   $ \b c -> k (a, b, c)-  sName (s:ss) k  = sbvExists s >>= \a -> sName ss $ \b c -> k (a, b, c)-  sName []     k  = sName_ k+  sName k = mkArg >>= \a -> sName $ \b c -> k (a, b, c)  -- 4 Tuple input instance (SymVal a, SymVal b, SymVal c, SymVal d, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d) -> p) where-  sName_        k = sbvExists_  >>= \a -> sName_   $ \b c d -> k (a, b, c, d)-  sName (s:ss)  k = sbvExists s >>= \a -> sName ss $ \b c d -> k (a, b, c, d)-  sName []      k = sName_ k+  sName k = mkArg >>= \a -> sName $ \b c d -> k (a, b, c, d)  -- 5 Tuple input instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) where-  sName_        k = sbvExists_  >>= \a -> sName_   $ \b c d e -> k (a, b, c, d, e)-  sName (s:ss)  k = sbvExists s >>= \a -> sName ss $ \b c d e -> k (a, b, c, d, e)-  sName []      k = sName_ k+  sName k = mkArg >>= \a -> sName $ \b c d e -> k (a, b, c, d, e)  -- 6 Tuple input instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) where-  sName_        k = sbvExists_  >>= \a -> sName_   $ \b c d e f -> k (a, b, c, d, e, f)-  sName (s:ss)  k = sbvExists s >>= \a -> sName ss $ \b c d e f -> k (a, b, c, d, e, f)-  sName []      k = sName_ k+  sName k = mkArg >>= \a -> sName $ \b c d e f -> k (a, b, c, d, e, f)  -- 7 Tuple input instance (SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) where-  sName_        k = sbvExists_  >>= \a -> sName_   $ \b c d e f g -> k (a, b, c, d, e, f, g)-  sName (s:ss)  k = sbvExists s >>= \a -> sName ss $ \b c d e f g -> k (a, b, c, d, e, f, g)-  sName []      k = sName_ k+  sName k = mkArg >>= \a -> sName $ \b c d e f g -> k (a, b, c, d, e, f, g)  {-# ANN module ("HLint: ignore Reduce duplication" :: String) #-}
Data/SBV/Provers/Yices.hs view
@@ -46,6 +46,8 @@                               , supportsCustomQueries      = True                               , supportsGlobalDecls        = True                               , supportsDataTypes          = False+                              , supportsFoldAndMap         = False+                              , supportsSpecialRels        = False                               , supportsDirectAccessors    = False                               , supportsFlattenedModels    = Nothing                               }
Data/SBV/Provers/Z3.hs view
@@ -46,6 +46,8 @@                               , supportsCustomQueries      = True                               , supportsGlobalDecls        = True                               , supportsDataTypes          = True+                              , supportsFoldAndMap         = True+                              , supportsSpecialRels        = True                               , supportsDirectAccessors    = False -- Needs ascriptions. (See the CVC4 version of this)                               , supportsFlattenedModels    = Just [ "(set-option :pp.max_depth      4294967295)"                                                                   , "(set-option :pp.min_alias_size 4294967295)"
Data/SBV/SMT/SMT.hs view
@@ -45,7 +45,7 @@  import Control.Concurrent (newEmptyMVar, takeMVar, putMVar, forkIO) import Control.DeepSeq    (NFData(..))-import Control.Monad      (zipWithM)+import Control.Monad      (zipWithM, mplus) import Data.Char          (isSpace) import Data.Maybe         (fromMaybe, isJust) import Data.Int           (Int8, Int16, Int32, Int64)@@ -64,7 +64,7 @@ import System.Directory   (findExecutable) import System.Environment (getEnv) import System.Exit        (ExitCode(..))-import System.IO          (hClose, hFlush, hPutStrLn, hGetContents, hGetLine)+import System.IO          (hClose, hFlush, hPutStrLn, hGetContents, hGetLine, hReady, hGetChar) import System.Process     (runInteractiveProcess, waitForProcess, terminateProcess)  import qualified Data.Map.Strict as M@@ -72,7 +72,7 @@  import Data.SBV.Core.AlgReals import Data.SBV.Core.Data-import Data.SBV.Core.Symbolic (SMTEngine, State(..))+import Data.SBV.Core.Symbolic (SMTEngine, State(..), mustIgnoreVar) import Data.SBV.Core.Concrete (showCV) import Data.SBV.Core.Kind     (showBaseKind, intOfProxy) @@ -111,7 +111,6 @@  -- | An 'Data.SBV.allSat' call results in a 'AllSatResult' data AllSatResult = AllSatResult { allSatMaxModelCountReached  :: Bool          -- ^ Did we reach the user given model count limit?-                                 , allSatHasPrefixExistentials :: Bool          -- ^ Were there quantifiers in the problem (unique upto prefix existentials)                                  , allSatSolverReturnedUnknown :: Bool          -- ^ Did the solver report unknown at the end?                                  , allSatSolverReturnedDSat    :: Bool          -- ^ Did the solver report delta-satisfiable at the end?                                  , allSatResults               :: [SMTResult]   -- ^ All satisfying models@@ -169,16 +168,12 @@ -- The Show instance of AllSatResults. instance Show AllSatResult where   show AllSatResult { allSatMaxModelCountReached  = l-                    , allSatHasPrefixExistentials = e                     , allSatSolverReturnedUnknown = u                     , allSatSolverReturnedDSat    = d                     , allSatResults               = xs                     } = go (0::Int) xs-    where warnings = case (e, u) of-                       (False, False) -> ""-                       (False, True)  -> " (Search stopped since solver has returned unknown.)"-                       (True,  False) -> " (Unique up to prefix existentials.)"-                       (True,  True)  -> " (Search stopped because solver has returned unknown, only prefix existentials were considered.)"+    where warnings | u    = " (Search stopped since solver has returned unknown.)"+                   | True = ""            go c (s:ss) = let c'      = c+1                             (ok, o) = sh c' s@@ -422,10 +417,10 @@   getModelObjectiveValue v r = v `M.lookup` getModelObjectives r    -- | Extract model uninterpreted-functions-  getModelUIFuns :: a -> M.Map String (SBVType, ([([CV], CV)], CV))+  getModelUIFuns :: a -> M.Map String (SBVType, Either String ([([CV], CV)], CV))    -- | Extract the value of an uninterpreted-function as an association list-  getModelUIFunValue :: String -> a -> Maybe (SBVType, ([([CV], CV)], CV))+  getModelUIFunValue :: String -> a -> Maybe (SBVType, Either String ([([CV], CV)], CV))   getModelUIFunValue v r = v `M.lookup` getModelUIFuns r  -- | Return all the models from an 'Data.SBV.allSat' call, similar to 'extractModel' but@@ -563,7 +558,7 @@         relevantVars  = filter (not . ignore) allVars         ignore (T.pack -> s, _)           | includeEverything = False-          | True              = "__internal_sbv_" `T.isPrefixOf` s || isNonModelVar cfg (T.unpack s)+          | True              = mustIgnoreVar cfg (T.unpack s)          shM (s, RegularCV v) = let vs = shCV cfg v in ((length s, s), (vlength vs, vs))         shM (s, other)       = let vs = show other in ((length s, s), (vlength vs, vs))@@ -586,23 +581,26 @@         lTrimRight = length . dropWhile isSpace . reverse  -- | Show an uninterpreted function-showModelUI :: SMTConfig -> (String, (SBVType, ([([CV], CV)], CV))) -> String-showModelUI cfg (nm, (SBVType ts, (defs, dflt))) = intercalate "\n" ["  " ++ l | l <- sig : map align body]+showModelUI :: SMTConfig -> (String, (SBVType, Either String ([([CV], CV)], CV))) -> String+showModelUI cfg (nm, (SBVType ts, interp))+  = intercalate "\n" $ case interp of+                         Left  e  -> ["  " ++ l | l <- [sig,  e]]+                         Right ds -> ["  " ++ l | l <- sig : mkBody ds]   where noOfArgs = length ts - 1          sig      = nm ++ " :: " ++ intercalate " -> " (map showBaseKind ts) -        ls       = map line defs-        defLine  = (nm : replicate noOfArgs "_", scv dflt)--        body     = ls ++ [defLine]+        mkBody (defs, dflt) = map align body+          where ls       = map line defs+                defLine  = (nm : replicate noOfArgs "_", scv dflt)+                body     = ls ++ [defLine] -        colWidths = [maximum (0 : map length col) | col <- transpose (map fst body)]+                colWidths = [maximum (0 : map length col) | col <- transpose (map fst body)] -        resWidth  = maximum  (0 : map (length . snd) body)+                resWidth  = maximum  (0 : map (length . snd) body) -        align (xs, r) = unwords $ zipWith left colWidths xs ++ ["=", left resWidth r]-           where left i x = take i (x ++ repeat ' ')+                align (xs, r) = unwords $ zipWith left colWidths xs ++ ["=", left resWidth r]+                   where left i x = take i (x ++ repeat ' ')          -- NB. We'll ignore crackNum here. Seems to be overkill while displaying an         -- uninterpreted function.@@ -688,9 +686,9 @@     rnf pgm `seq` pipeProcess config ctx exec opts pgm continuation  -- | An internal type to track of solver interactions-data SolverLine = SolverRegular   String  -- ^ All is well-                | SolverTimeout   String  -- ^ Timeout expired-                | SolverException String  -- ^ Something else went wrong+data SolverLine = SolverRegular   String -- ^ All is well+                | SolverTimeout   String -- ^ Timeout expired+                | SolverException String -- ^ Something else went wrong  -- | A variant of @readProcessWithExitCode@; except it deals with SBV continuations runSolver :: SMTConfig -> State -> FilePath -> [String] -> String -> (State -> IO a) -> IO a@@ -700,6 +698,9 @@            clean = preprocess (solver cfg) +          -- the very first command we send+          heartbeat = "(set-option :print-success true)"+       (send, ask, getResponseFromSolver, terminateSolver, cleanUp, pid) <- do                 (inh, outh, errh, pid) <- runInteractiveProcess execPath opts Nothing Nothing @@ -708,12 +709,23 @@                                                 hFlush inh                                                 recordTranscript (transcript cfg) $ Left (command, mbTimeOut) +                    -- is this a set-command? Then we expect faster response; except for the heartbeat+                    isSetCommand = maybe False chk+                      where chk cmd = cmd /= heartbeat && "(set-option :" `isPrefixOf` cmd+                     -- Send a line, get a whole s-expr. We ignore the pathetic case that there might be a string with an unbalanced parentheses in it in a response.                     ask :: Maybe Int -> String -> IO String-                    ask mbTimeOut command =-                                  -- solvers don't respond to empty lines or comments; we just pass back-                                  -- success in these cases to keep the illusion of everything has a response-                                  let cmd = dropWhile isSpace command+                    ask mbTimeOutGiven command =+                                  let -- If the command is a set-option call, make sure there's a timeout on it+                                      -- This ensures that if we try to set an option before diagnostic-output+                                      -- is redirected to stdout and the solver chokes, then we can catch it+                                      mbTimeOut | isSetCommand (Just command) = Just 1000000+                                                | True                        = mbTimeOutGiven++                                      -- solvers don't respond to empty lines or comments; we just pass back+                                      -- success in these cases to keep the illusion of everything has a response+                                      cmd = dropWhile isSpace command+                                   in if null cmd || ";" `isPrefixOf` cmd                                      then return "success"                                      else do send mbTimeOut command@@ -731,8 +743,9 @@                                 return collated                        where safeGetLine isFirst h =-                                         let timeOutToUse | isFirst = mbTimeOut-                                                          | True    = Just 5000000+                                         let timeOutToUse | isSetCommand mbCommand = Just 1000000+                                                          | isFirst                = mbTimeOut+                                                          | True                   = Just 5000000                                              timeOutMsg t | isFirst = "User specified timeout of " ++ showTimeoutValue t ++ " exceeded"                                                           | True    = "A multiline complete response wasn't received before " ++ showTimeoutValue t ++ " exceeded" @@ -753,13 +766,28 @@                                                                                      then collect True sofar'                                                                                      else return sofar' +                                             -- Carefully grab things as they are ready. But don't block!+                                             collectH handle = reverse <$> coll ""+                                               where coll sofar = do b <- hReady handle+                                                                     if b+                                                                        then hGetChar handle >>= \c -> coll (c:sofar)+                                                                        else pure sofar++                                             -- grab the contents of a handle, and return it trimmed if any+                                             grab handle = do mbCts <- (Just <$> collectH handle) `C.catch` (\(_ :: C.SomeException) -> pure Nothing)+                                                              pure $ dropWhile isSpace <$> mbCts+                                          in case timeOutToUse of                                               Nothing -> SolverRegular <$> getFullLine                                               Just t  -> do r <- Timeout.timeout t getFullLine                                                             case r of                                                               Just l  -> return $ SolverRegular l-                                                              Nothing -> return $ SolverTimeout $ timeOutMsg t-+                                                              Nothing -> do out <- grab outh+                                                                            err <- grab errh+                                                                            -- in this case, if we have something on out/err pass that back as regular+                                                                            case err `mplus` out of+                                                                              Just x | not (null x) -> pure $ SolverRegular x+                                                                              _                     -> pure $ SolverTimeout (timeOutMsg t)                              go isFirst i sofar = do                                             errln <- safeGetLine isFirst outh `C.catch` (\(e :: C.SomeException) -> handleAsync e (return (SolverException (show e))))@@ -798,6 +826,7 @@                                                                                              }                                                SolverTimeout e -> do terminateProcess pid -- NB. Do not *wait* for the process, just quit.+                                                                     C.throwIO SBVException { sbvExceptionDescription = "Timeout! " ++ e                                                                                            , sbvExceptionSent        = mbCommand                                                                                            , sbvExceptionExpected    = Nothing@@ -914,8 +943,7 @@                              let backend = name $ solver cfg                              if not (supportsCustomQueries (capabilities (solver cfg)))                                 then debug cfg ["** Skipping heart-beat for the solver " ++ show backend]-                                else do let heartbeat = "(set-option :print-success true)"-                                        r <- ask (Just 5000000) heartbeat  -- Give the solver 5s to respond, this should be plenty enough!+                                else do r <- ask (Just 5000000) heartbeat  -- Give the solver 5s to respond, this should be plenty enough!                                         case words r of                                           ["success"]     -> debug cfg ["[GOOD] " ++ heartbeat]                                           ["unsupported"] -> error $ unlines [ ""
Data/SBV/SMT/SMTLib.hs view
@@ -19,8 +19,6 @@         , toIncSMTLib         ) where -import qualified Data.Set as Set (member, toList)- import Data.SBV.Core.Data  import Data.SBV.SMT.Utils@@ -35,38 +33,13 @@ toIncSMTLib :: SMTConfig -> SMTLibIncConverter [String] toIncSMTLib SMTConfig{smtLibVersion} = case smtLibVersion of                                          SMTLib2 -> toIncSMTLib2- -- | Convert to SMTLib-2 format toSMTLib2 :: SMTLibConverter SMTLibPgm toSMTLib2 = cvt SMTLib2-  where cvt v ctx kindInfo isSat comments qinps skolemMap consts tbls arrs uis axs asgnsSeq cstrs out config-         | KUnbounded `Set.member` kindInfo && not (supportsUnboundedInts solverCaps)-         = unsupported "unbounded integers"-         | KReal `Set.member` kindInfo  && not (supportsReals solverCaps)-         = unsupported "algebraic reals"-         | (needsFloats || needsDoubles) && not (supportsIEEE754 solverCaps)-         = unsupported "floating-point numbers"-         | needsQuantifiers && not (supportsQuantifiers solverCaps)-         = unsupported "quantifiers"-         | not (null sorts) && not (supportsUninterpretedSorts solverCaps)-         = unsupported "uninterpreted sorts"-         | True-         = SMTLibPgm v pgm-         where sorts = [s | KUserSort s _ <- Set.toList kindInfo]-               solverCaps = capabilities (solver config)-               unsupported w = error $ unlines [ "SBV: Given problem needs " ++ w-                                               , "*** Which is not supported by SBV for the chosen solver: " ++ show (name (solver config))-                                               ]-               converter = case v of+  where cvt v ctx progInfo kindInfo isSat comments qinps consts tbls arrs uis axs asgnsSeq cstrs out config = SMTLibPgm v pgm+         where converter = case v of                              SMTLib2 -> SMT2.cvt-               pgm = converter ctx kindInfo isSat comments qinps skolemMap consts tbls arrs uis axs asgnsSeq cstrs out config--               needsFloats  = KFloat  `Set.member` kindInfo-               needsDoubles = KDouble `Set.member` kindInfo-               needsQuantifiers-                 | isSat = ALL `elem` quantifiers-                 | True  = EX  `elem` quantifiers-                 where quantifiers = map fst (fst qinps)+               pgm = converter ctx progInfo kindInfo isSat comments qinps consts tbls arrs uis axs asgnsSeq cstrs out config  -- | Convert to SMTLib-2 format toIncSMTLib2 :: SMTLibIncConverter [String]
Data/SBV/SMT/SMTLib2.hs view
@@ -9,17 +9,18 @@ -- Conversion of symbolic programs to SMTLib format, Using v2 of the standard ----------------------------------------------------------------------------- +{-# LANGUAGE NamedFieldPuns      #-} {-# LANGUAGE PatternGuards       #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns        #-}  {-# OPTIONS_GHC -Wall -Werror #-} -module Data.SBV.SMT.SMTLib2(cvt, cvtInc) where+module Data.SBV.SMT.SMTLib2(cvt, cvtExp, cvtInc, declUserFuns) where  import Data.Bits  (bit)-import Data.List  (intercalate, partition, nub, sort)-import Data.Maybe (listToMaybe, fromMaybe, catMaybes)+import Data.List  (intercalate, partition, nub, elemIndex)+import Data.Maybe (listToMaybe, catMaybes)  import qualified Data.Foldable as F (toList) import qualified Data.Map.Strict      as M@@ -28,23 +29,26 @@ import qualified Data.Set             as Set  import Data.SBV.Core.Data-import Data.SBV.Core.Symbolic (QueryContext(..), SetOp(..), OvOp(..), CnstMap, getUserName', getSV, regExpToSMTString) import Data.SBV.Core.Kind (smtType, needsFlattening) import Data.SBV.SMT.Utils import Data.SBV.Control.Types +import Data.SBV.Core.Symbolic ( QueryContext(..), SetOp(..), CnstMap, getUserName', getSV, regExpToSMTString+                              , SMTDef(..), ResultInp(..), ProgInfo(..), SpecialRelOp(..)+                              )+ import Data.SBV.Utils.PrettyNum (smtRoundingMode, cvToSMTLib)  import qualified Data.Generics.Uniplate.Data as G -import Data.Either(lefts)+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]-cvt ctx kindInfo isSat comments (inputs, trackerVars) skolemInps (allConsts, consts) tbls arrs uis axs (SBVPgm asgnsSeq) cstrs out cfg = pgm+cvt ctx curProgInfo kindInfo isSat comments allInputs (allConsts, consts) tbls arrs uis defs (SBVPgm asgnsSeq) cstrs out cfg = pgm   where hasInteger     = KUnbounded `Set.member` kindInfo         hasReal        = KReal      `Set.member` kindInfo         hasFP          =  not (null [() | KFP{} <- Set.toList kindInfo])@@ -59,7 +63,8 @@         trueUSorts     = [s | (s, _) <- usorts, s /= "RoundingMode"]         tupleArities   = findTupleArities kindInfo         hasNonBVArrays = (not . null) [() | (_, (_, (k1, k2), _)) <- arrs, not (isBounded k1 && isBounded k2)]-        hasArrayInits  = (not . null) [() | (_, (_, _, ArrayFree (Just _))) <- arrs]+        hasArrayInits  = (not . null) $  [() | (_, (_, _, ArrayFree (Left  (Just _)))) <- arrs]+                                      ++ [() | (_, (_, _, ArrayFree (Right _       ))) <- arrs]         hasOverflows   = (not . null) [() | (_ :: OvOp) <- G.universeBi asgnsSeq]         hasList        = any isList kindInfo         hasSets        = any isSet kindInfo@@ -69,19 +74,36 @@         hasRational    = any isRational kindInfo         rm             = roundingMode cfg         solverCaps     = capabilities (solver cfg)+        hasFoldMap     = let isFoldMap SeqMap{}       = True+                             isFoldMap SeqMapI{}      = True+                             isFoldMap SeqFoldLeft{}  = True+                             isFoldMap SeqFoldLeftI{} = True+                             isFoldMap _              = False+                         in (not . null) [ () | o :: SeqOp <- G.universeBi asgnsSeq, isFoldMap o] +        (needsQuantifiers, needsSpecialRels) = case curProgInfo of+           ProgInfo hasQ srs tcs -> (hasQ, not (null srs && null tcs))+         -- Is there a reason why we can't handle this problem?         -- NB. There's probably a lot more checking we can do here, but this is a start:-        doesntHandle = listToMaybe [nope w | (w, have, need) <- checks, need && not have]-           where checks = [ ("data types",     supportsDataTypes  solverCaps, hasTuples || hasEither || hasMaybe)-                          , ("set operations", supportsSets       solverCaps, hasSets)-                          , ("bit vectors",    supportsBitVectors solverCaps, hasBVs)+        doesntHandle = listToMaybe [nope w | (w, have, need) <- checks, need && not (have solverCaps)]+           where checks = [ ("data types",             supportsDataTypes,          hasTuples || hasEither || hasMaybe)+                          , ("folds and maps",         supportsFoldAndMap,         hasFoldMap)+                          , ("set operations",         supportsSets,               hasSets)+                          , ("bit vectors",            supportsBitVectors,         hasBVs)+                          , ("special relations",      supportsSpecialRels,        needsSpecialRels)+                          , ("needs quantifiers",      supportsQuantifiers,        needsQuantifiers)+                          , ("unbounded integers",     supportsUnboundedInts,      hasInteger)+                          , ("algebraic reals",        supportsReals,              hasReal)+                          , ("floating-point numbers", supportsIEEE754,            hasFP)+                          , ("uninterpreted sorts",    supportsUninterpretedSorts, not (null trueUSorts))                           ]                   nope w = [ "***     Given problem requires support for " ++ w                           , "***     But the chosen solver (" ++ show (name (solver cfg)) ++ ") doesn't support this feature."                           ] +        -- Some cases require all, some require none. Sigh..         setAll reason = ["(set-logic ALL) ; "  ++ reason ++ ", using catch-all."]          -- Determining the logic is surprisingly tricky!@@ -114,6 +136,8 @@             -- we never set QF_S (ALL seems to work better in all cases) +           | needsSpecialRels      = ["; has special relations, no logic set."]+            -- Things that require ALL            | hasInteger            = setAll "has unbounded values"            | hasRational           = setAll "has rational values"@@ -132,7 +156,7 @@            | hasOverflows          = setAll "has overflow checks"             | hasFP || hasRounding-           = if not (null foralls)+           = if needsQuantifiers              then ["(set-logic ALL)"]              else if hasBVs                   then ["(set-logic QF_FPBV)"]@@ -147,12 +171,12 @@                QueryInternal -> if supportsBitVectors solverCaps                                 then ["(set-logic " ++ qs ++ as ++ ufs ++ "BV)"]                                 else ["(set-logic ALL)"] -- fall-thru-          where qs  | null foralls && null axs = "QF_"  -- axioms are likely to contain quantifiers-                    | True                     = ""-                as  | null arrs                = ""-                    | True                     = "A"-                ufs | null uis && null tbls    = ""     -- we represent tables as UFs-                    | True                     = "UF"+          where qs  | not needsQuantifiers  = "QF_"+                    | True                  = ""+                as  | null arrs             = ""+                    | True                  = "A"+                ufs | null uis && null tbls = ""     -- we represent tables as UFs+                    | True                  = "UF"          -- SBV always requires the production of models!         getModels   = "(set-option :produce-models true)"@@ -177,6 +201,15 @@                  ++ getModels                  ++ logic +        (inputs, trackerVars)+            = case allInputs of+                ResultTopInps ists -> ists+                ResultLamInps ps   -> error $ unlines [ ""+                                                      , "*** Data.SBV.smtLib2: Unexpected lambda inputs in conversion"+                                                      , "***"+                                                      , "*** Saw: " ++ show ps+                                                      ]+         pgm  =  map ("; " ++) comments              ++ settings              ++ [ "; --- uninterpreted sorts ---" ]@@ -189,117 +222,53 @@              ++ (if containsRationals kindInfo then declRationals else [])              ++ [ "; --- literal constants ---" ]              ++ concatMap (declConst cfg) consts-             ++ [ "; --- skolem constants ---" ]-             ++ concat [declareFun s (SBVType (map kindOf (ss ++ [s]))) (userName s) | Right (s, ss) <- skolemInps]+             ++ [ "; --- top level inputs ---"]+             ++ concat [declareFun s (SBVType [kindOf s]) (userName s) | var <- inputs, let s = getSV var]              ++ [ "; --- optimization tracker variables ---" | not (null trackerVars) ]              ++ concat [declareFun s (SBVType [kindOf s]) (Just ("tracks " <> nm)) | var <- trackerVars, let s = getSV var, let nm = getUserName' var]              ++ [ "; --- constant tables ---" ]-             ++ concatMap (uncurry (:) . constTable) constTables-             ++ [ "; --- skolemized tables ---" ]-             ++ map (skolemTable (unwords (map svType foralls))) skolemTables+             ++ concatMap (uncurry (:) . mkTable) constTables+             ++ [ "; --- non-constant tables ---" ]+             ++ map nonConstTable nonConstTables              ++ [ "; --- arrays ---" ]              ++ concat arrayConstants              ++ [ "; --- uninterpreted constants ---" ]-             ++ concatMap declUI uis+             ++ concatMap (declUI curProgInfo) uis              ++ [ "; --- SBV Function definitions" | not (null funcMap) ]              ++ concat [ declSBVFunc op nm | (op, nm) <- M.toAscList funcMap ]-             ++ [ "; --- user given axioms ---" ]-             ++ map declAx axs-             ++ [ "; --- preQuantifier assignments ---" ]-             ++ concatMap (declDef cfg skolemMap tableMap funcMap) preQuantifierAssigns+             ++ [ "; --- user defined functions ---"]+             ++ declUserFuns defs+             ++ [ "; --- assignments ---" ]+             ++ concatMap (declDef curProgInfo cfg tableMap funcMap) asgns              ++ [ "; --- arrayDelayeds ---" ]              ++ concat arrayDelayeds              ++ [ "; --- arraySetups ---" ]              ++ concat arraySetups-             ++ [ "; --- formula ---" ]-             ++ ["(assert (forall (" ++ intercalate "\n                 "-                                        ["(" ++ show s ++ " " ++ svType s ++ ")" | s <- foralls] ++ ")"-                | not (null foralls)-                ]-             ++ [ "; --- postQuantifier assignments ---" ]-             ++ concatMap mkAssign postQuantifierAssigns              ++ [ "; --- delayedEqualities ---" ]-             ++ delayedAsserts delayedEqualities-             ++ [ "; -- finalAssert ---" ]+             ++ map (\s -> "(assert " ++ s ++ ")") delayedEqualities+             ++ [ "; --- formula ---" ]              ++ finalAssert -        -- identify the assignments that can come before the first quantifier-        (preQuantifierAssigns, postQuantifierAssigns)-           | null foralls-           = (asgns, [])-           | True-           = span pre asgns-           where first      = nodeId (minimum foralls)-                 pre (s, _) = nodeId s < first--                 nodeId (SV _ n) = n--        noOfCloseParens-          | null foralls = 0-          | True         = length postQuantifierAssigns + 2 + (if null delayedEqualities then 0 else 1)--        foralls    = lefts skolemInps-        forallArgs = concatMap ((" " ++) . show) foralls--        (constTables, skolemTables) = ([(t, d) | (t, Left d) <- allTables], [(t, d) | (t, Right d) <- allTables])-        allTables = [(t, genTableData rm skolemMap (not (null foralls), forallArgs) (map fst consts) t) | t <- tbls]-        (arrayConstants, arrayDelayeds, arraySetups) = unzip3 $ map (declArray cfg (not (null foralls)) allConsts skolemMap) arrs-        delayedEqualities = concatMap snd skolemTables--        delayedAsserts []              = []-        delayedAsserts ds@(deH : deTs)-          | null foralls = map (\s -> "(assert " ++ s ++ ")") ds-          | True         = map letShift (("(and " ++ deH) : map (align 5) deTs)+        allTables      = [(t, genTableData rm (map fst consts) t) | t <- tbls]+        constTables    = [(t, d) | (t, Left  d) <- allTables]+        nonConstTables = [(t, d) | (t, Right d) <- allTables] -        letShift = align 12+        (arrayConstants, arrayDelayeds, arraySetups) = unzip3 $ map (declArray cfg allConsts) arrs+        delayedEqualities = concatMap snd nonConstTables          finalAssert-          | null foralls && noConstraints-          = []-          | null foralls-          =    map (\(attr, v) -> "(assert "      ++ addAnnotations attr (mkLiteral v) ++ ")") hardAsserts-            ++ map (\(attr, v) -> "(assert-soft " ++ addAnnotations attr (mkLiteral v) ++ ")") softAsserts-          | not (null namedAsserts)-          = error $ intercalate "\n" [ "SBV: Constraints with attributes and quantifiers cannot be mixed!"-                                     , "   Quantified variables: " ++ unwords (map show foralls)-                                     , "   Named constraints   : " ++ intercalate ", " (map show namedAsserts)-                                     ]-          | not (null softAsserts)-          = error $ intercalate "\n" [ "SBV: Soft constraints and quantifiers cannot be mixed!"-                                     , "   Quantified variables: " ++ unwords (map show foralls)-                                     , "   Soft constraints    : " ++ intercalate ", " (map show softAsserts)-                                     ]-          | True-          = [impAlign (letShift combined) ++ replicate noOfCloseParens ')']-          where mkLiteral (Left  v) =            cvtSV skolemMap v-                mkLiteral (Right v) = "(not " ++ cvtSV skolemMap v ++ ")"+          | noConstraints = []+          | True          =    map (\(attr, v) -> "(assert "      ++ addAnnotations attr (mkLiteral v) ++ ")") hardAsserts+                            ++ map (\(attr, v) -> "(assert-soft " ++ addAnnotations attr (mkLiteral v) ++ ")") softAsserts+          where mkLiteral (Left  v) =            cvtSV v+                mkLiteral (Right v) = "(not " ++ cvtSV v ++ ")"                  (noConstraints, assertions) = finalAssertions -                namedAsserts = [findName attrs | (_, attrs, _) <- assertions, not (null attrs)]-                 where findName attrs = fromMaybe "<anonymous>" (listToMaybe [nm | (":named", nm) <- attrs])-                 hardAsserts, softAsserts :: [([(String, String)], Either SV SV)]                 hardAsserts = [(attr, v) | (False, attr, v) <- assertions]                 softAsserts = [(attr, v) | (True,  attr, v) <- assertions] -                combined = case lits of-                             []               -> "true"-                             [x]              -> mkLiteral x-                             xs  | any bad xs -> "false"-                                 | True       -> "(and " ++ unwords (map mkLiteral xs) ++ ")"-                  where lits = filter (not . redundant) $ nub (sort (map snd hardAsserts))-                        redundant (Left v)  = v == trueSV-                        redundant (Right v) = v == falseSV-                        bad (Left  v) = v == falseSV-                        bad (Right v) = v == trueSV--        impAlign s-          | null delayedEqualities = s-          | True                   = "     " ++ s--        align n s = replicate n ' ' ++ s-         finalAssertions :: (Bool, [(Bool, [(String, String)], Either SV SV)])  -- If Left: positive, Right: negative         finalAssertions            | null finals = (True,  [(False, [], Left trueSV)])@@ -322,10 +291,8 @@                   | s == falseSV = Just $ Left falseSV                   | True         = Just $ Left s -        skolemMap = M.fromList [(s, ss) | Right (s, ss) <- skolemInps, not (null ss)]-        tableMap  = IM.fromList $ map mkConstTable constTables ++ map mkSkTable skolemTables-          where mkConstTable (((t, _, _), _), _) = (t, "table" ++ show t)-                mkSkTable    (((t, _, _), _), _) = (t, "table" ++ show t ++ forallArgs)+        tableMap  = IM.fromList $ map grab allTables+          where grab (((t, _, _), _), _) = (t, "table" ++ show t)          -- SBV only functions.         funcMap = M.fromList reverses@@ -334,17 +301,10 @@          asgns = F.toList asgnsSeq -        mkAssign a-          | null foralls = declDef cfg skolemMap tableMap funcMap a-          | True         = [letShift (mkLet a)]--        mkLet (s, SBVApp (Label m) [e]) = "(let ((" ++ show s ++ " " ++ cvtSV                skolemMap                  e ++ ")) ; " ++ m-        mkLet (s, e)                    = "(let ((" ++ show s ++ " " ++ cvtExp solverCaps rm skolemMap tableMap funcMap e ++ "))"--        userNameMap = M.fromList $ map ((\nSymVar -> (getSV nSymVar, getUserName' nSymVar)) . snd) inputs+        userNameMap = M.fromList $ map (\nSymVar -> (getSV nSymVar, getUserName' nSymVar)) inputs         userName s = case M.lookup s userNameMap of                         Just u  | show s /= u -> Just $ "tracks user variable " ++ show u-                        _ -> Nothing+                        _                     -> Nothing  -- Declare "known" SBV functions here declSBVFunc :: Op -> String -> [String]@@ -499,7 +459,7 @@ -- for a list of what we include, in case something doesn't show up -- and you need it! cvtInc :: SMTLibIncConverter [String]-cvtInc inps newKs (allConsts, consts) arrs tbls uis (SBVPgm asgnsSeq) cstrs cfg =+cvtInc curProgInfo inps newKs (allConsts, consts) arrs tbls uis (SBVPgm asgnsSeq) cstrs cfg =             -- any new settings?                settings             -- sorts@@ -516,11 +476,11 @@             -- arrays             ++ concat arrayConstants             -- uninterpreteds-            ++ concatMap declUI uis+            ++ concatMap (declUI curProgInfo) uis             -- table declarations             ++ tableDecls             -- expressions-            ++ concatMap (declDef cfg skolemMap tableMap funcMap) (F.toList asgnsSeq)+            ++ concatMap (declDef curProgInfo cfg tableMap funcMap) (F.toList asgnsSeq)             -- delayed equalities             ++ concat arrayDelayeds             -- table setups@@ -528,12 +488,8 @@             -- array setups             ++ concat arraySetups             -- extra constraints-            ++ map (\(isSoft, attr, v) -> "(assert" ++ (if isSoft then "-soft " else " ") ++ addAnnotations attr (cvtSV skolemMap v) ++ ")") (F.toList cstrs)-  where -- NB. The below setting of skolemMap to empty is OK, since we do-        -- not support queries in the context of skolemized variables-        skolemMap = M.empty--        -- The following is not really kosher; if it happens that a "new" variant of a function is used only incrementally.+            ++ 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 @@ -543,13 +499,13 @@          declInp (getSV -> s) = declareFun s (SBVType [kindOf s]) Nothing -        (arrayConstants, arrayDelayeds, arraySetups) = unzip3 $ map (declArray cfg False allConsts skolemMap) arrs+        (arrayConstants, arrayDelayeds, arraySetups) = unzip3 $ map (declArray cfg allConsts) arrs -        allTables = [(t, either id id (genTableData rm skolemMap (False, []) (map fst consts) t)) | t <- tbls]-        (tableDecls, tableAssigns) = unzip $ map constTable allTables+        allTables = [(t, either id id (genTableData rm (map fst consts) t)) | t <- tbls]+        (tableDecls, tableAssigns) = unzip $ map mkTable allTables -        tableMap  = IM.fromList $ map mkTable allTables-          where mkTable (((t, _, _), _), _) = (t, "table" ++ show t)+        tableMap  = IM.fromList $ map mkIdx allTables+          where mkIdx (((t, _, _), _), _) = (t, "table" ++ show t)          -- If we need flattening in models, do emit the required lines if preset         settings@@ -559,11 +515,11 @@           = []           where solverCaps = capabilities (solver cfg) -declDef :: SMTConfig -> SkolemMap -> TableMap -> FunctionMap -> (SV, SBVExpr) -> [String]-declDef cfg skolemMap tableMap funcMap (s, expr) =+declDef :: ProgInfo -> SMTConfig -> TableMap -> FunctionMap -> (SV, SBVExpr) -> [String]+declDef curProgInfo cfg tableMap funcMap (s, expr) =         case expr of-          SBVApp  (Label m) [e] -> defineFun cfg (s, cvtSV          skolemMap                  e) (Just m)-          e                     -> defineFun cfg (s, cvtExp caps rm skolemMap tableMap funcMap e) Nothing+          SBVApp  (Label m) [e] -> defineFun cfg (s, cvtSV                                       e) (Just m)+          e                     -> defineFun cfg (s, cvtExp curProgInfo caps rm tableMap funcMap e) Nothing   where caps = capabilities (solver cfg)         rm   = roundingMode cfg @@ -587,17 +543,101 @@   | True   = defineFun cfg (s, cvtCV (roundingMode cfg) c) Nothing -declUI :: (String, SBVType) -> [String]-declUI (i, t) = declareName i t Nothing+-- Make a function equality of nm against the internal function fun+mkRelEq :: String -> (String, String) -> Kind -> String+mkRelEq nm (fun, order) ak = res+   where lhs = "(" ++ nm ++ " x y)" +         rhs = "((_ " ++ fun ++ " " ++ order ++ ") x y)"+         tk  = smtType ak+         res = "(forall ((x " ++ tk ++ ") (y " ++ tk ++ ")) (= " ++ lhs ++ " " ++ rhs ++ "))" --- NB. We perform no check to as to whether the axiom is meaningful in any way.-declAx :: (Bool, String, [String]) -> String-declAx (hasDefinition, nm, ls) = (";; -- user given " ++ what ++ ": " ++ nm ++ "\n") ++ intercalate "\n" ls-  where what | hasDefinition = "definition"-             | True          = "axiom"+declUI :: ProgInfo -> (String, (Maybe [String], SBVType)) -> [String]+declUI ProgInfo{progTransClosures} (i, (_, t)) = declareName i t Nothing ++ declClosure+  where declClosure | Just external <- lookup i progTransClosures+                    =  declareName external t Nothing+                    ++ ["(assert " ++ mkRelEq external ("transitive-closure", i) (argKind t) ++ ")"]+                    | True+                    = [] -constTable :: (((Int, Kind, Kind), [SV]), [String]) -> (String, [String])-constTable (((i, ak, rk), _elts), is) = (decl, zipWith wrap [(0::Int)..] is ++ setup)+        argKind (SBVType [ka, _, KBool]) = ka+        argKind _                        = error $ "declUI: Unexpected type for name: " ++ show (i, t)++-- Note that even though we get all user defined-functions here (i.e., lambda and axiom), we can only have defined-functions+-- and axioms. We spit axioms as is; and topologically sort the definitions.+declUserFuns :: [SMTDef] -> [String]+declUserFuns ds+  | not (null lambdas)+  = error $ unlines $ "Data.SBV.declUserFuns: Unexpected anonymous functions in declDef:" : map show lambdas+  | True+  = declFuncs others+  where (lambdas, others) = partition isLam ds+        isLam SMTLam{} = True+        isLam SMTDef{} = False++-- We need to topologically sort the user given definitions and axioms and put them in the proper order and construct.+-- Note that there are no anonymous functions at this level.+declFuncs :: [SMTDef] -> [String]+declFuncs ds = map declGroup sorted+  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++        getDeps (SMTDef _ _ d _ _) = d+        getDeps l@SMTLam{}         = error $ "Data.SBV.declFuns: Unexpected definition kind: " ++ show l++        mkDecl Nothing  rt = "() "    ++ rt+        mkDecl (Just p) rt = p ++ " " ++ rt++        sorted = DG.stronglyConnComp (map mkNode ds)++        declGroup (DG.AcyclicSCC b)  = declUserDef False b+        declGroup (DG.CyclicSCC  bs) = case bs of+                                         []  -> error "Data.SBV.declFuns: Impossible happened: an empty cyclic group was returned!"+                                         [x] -> declUserDef True x+                                         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) = ("; -- user given definition: " ++ nm ++ recursive ++ frees ++ "\n") ++ s+           where (recursive, definer) | isRec = (" [Recursive]", "define-fun-rec")+                                      | True  = ("",             "define-fun")++                 otherDeps = filter (/= nm) deps+                 frees | null otherDeps = ""+                       | True           = " [Refers to: " ++ intercalate ", " otherDeps ++ "]"++                 decl = mkDecl param (smtType fk)++                 s = "(" ++ definer ++ " " ++ nm ++ " " ++ decl ++ "\n" ++ body 2 ++ ")"++        -- 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) = (deps, nm, '(' : nm ++ " " ++  decl ++ ")", body 3)+                  where decl = mkDecl param (smtType fk)++                render defs = intercalate "\n" $+                                  [ "; -- user given mutually-recursive definitions: " ++ intercalate ", " [n | (_, n, _, _) <- defs]+                                  , "(define-funs-rec"+                                  ]+                               ++ [ open i ++ param d ++ close1 i | (i, d) <- zip [1..] defs]+                               ++ [ open i ++ dump  d ++ close2 i | (i, d) <- zip [1..] defs]+                     where open 1 = "  ("+                           open _ = "   "++                           param (_, _, p, _) = p++                           dump (deps, nm, _, body) = "; Definition of: " ++ nm ++ ". [Refers to: " ++ intercalate ", " deps ++ "]"+                                                    ++ "\n" ++ body++                           ld = length defs++                           close1 n = if n == ld then ")"  else ""+                           close2 n = if n == ld then "))" else ""++mkTable :: (((Int, Kind, Kind), [SV]), [String]) -> (String, [String])+mkTable (((i, ak, rk), _elts), is) = (decl, zipWith wrap [(0::Int)..] is ++ setup)   where t       = "table" ++ show i         decl    = "(declare-fun " ++ t ++ " (" ++ smtType ak ++ ") " ++ smtType rk ++ ")" @@ -618,58 +658,44 @@           | True           = [ "(define-fun " ++ initializer ++ " () Bool (and " ++ unwords (map mkInit [0..lis - 1]) ++ "))"                              , "(assert " ++ initializer ++ ")"                              ]--skolemTable :: String -> (((Int, Kind, Kind), [SV]), [String]) -> String-skolemTable qsIn (((i, ak, rk), _elts), _) = decl-  where qs   = if null qsIn then "" else qsIn ++ " "-        t    = "table" ++ show i-        decl = "(declare-fun " ++ t ++ " (" ++ qs ++ smtType ak ++ ") " ++ smtType rk ++ ")"+nonConstTable :: (((Int, Kind, Kind), [SV]), [String]) -> String+nonConstTable (((i, ak, rk), _elts), _) = decl+  where t    = "table" ++ show i+        decl = "(declare-fun " ++ t ++ " (" ++ smtType ak ++ ") " ++ smtType rk ++ ")"  -- Left if all constants, Right if otherwise-genTableData :: RoundingMode -> SkolemMap -> (Bool, String) -> [SV] -> ((Int, Kind, Kind), [SV]) -> Either [String] [String]-genTableData rm skolemMap (_quantified, args) consts ((i, aknd, _), elts)-  | null post = Left  (map (topLevel . snd) pre)-  | True      = Right (map (nested   . snd) (pre ++ post))-  where ssv = cvtSV skolemMap-        (pre, post) = partition fst (zipWith mkElt elts [(0::Int)..])+genTableData :: RoundingMode -> [SV] -> ((Int, Kind, Kind), [SV]) -> Either [String] [String]+genTableData rm consts ((i, aknd, _), elts)+  | null post = Left  (map (mkEntry . snd) pre)+  | True      = Right (map (mkEntry . snd) (pre ++ post))+  where (pre, post) = partition fst (zipWith mkElt elts [(0::Int)..])         t           = "table" ++ show i -        mkElt x k   = (isReady, (idx, ssv x))+        mkElt x k   = (isReady, (idx, cvtSV x))           where idx = cvtCV rm (mkConstCV aknd k)                 isReady = x `Set.member` constsSet -        topLevel (idx, v) = "(= (" ++ t ++ " " ++ idx ++ ") " ++ v ++ ")"-        nested   (idx, v) = "(= (" ++ t ++ args ++ " " ++ idx ++ ") " ++ v ++ ")"+        mkEntry (idx, v) = "(= (" ++ t ++ " " ++ idx ++ ") " ++ v ++ ")"          constsSet = Set.fromList consts --- TODO: We currently do not support non-constant arrays when quantifiers are present, as--- we might have to skolemize those. Implement this properly.--- The difficulty is with the Mutate/Merge: We have to postpone an init if--- the components are themselves postponed, so this cannot be implemented as a simple map.-declArray :: SMTConfig -> Bool -> CnstMap -> SkolemMap -> (Int, ArrayInfo) -> ([String], [String], [String])-declArray cfg quantified consts skolemMap (i, (_, (aKnd, bKnd), ctx)) = (adecl : zipWith wrap [(0::Int)..] (map snd pre), zipWith wrap [lpre..] (map snd post), setup)+-- 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--        topLevel = not quantified || case ctx of-                                       ArrayFree mbi      -> maybe True (`elem` constNames) mbi-                                       ArrayMutate _ a b  -> all (`elem` constNames) [a, b]-                                       ArrayMerge c _ _   -> c `elem` constNames         (pre, post) = partition fst ctxInfo         nm = "array_" ++ show i -        ssv sv-         | topLevel || sv `elem` constNames-         = cvtSV skolemMap sv-         | True-         = tbd "Non-constant array initializer in a quantified context"-         atyp  = "(Array " ++ smtType aKnd ++ " " ++ smtType bKnd ++ ")"          adecl = case ctx of-                  ArrayFree (Just v) -> "(define-fun "  ++ nm ++ " () " ++ atyp ++ " ((as const " ++ atyp ++ ") " ++ constInit v ++ "))"-                  ArrayFree Nothing+                  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 ++                                                  ")"@@ -677,13 +703,13 @@         -- 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 -> ssv v                      -- Z3 will work, CVC4 will choke. Others don't even support this.+                        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 ++ " " ++ ssv a ++ " " ++ ssv b ++ "))")]-                    ArrayMerge  t j k -> [(t `elem` constNames,            "(= " ++ nm ++ " (ite " ++ ssv t ++ " array_" ++ show j ++ " array_" ++ show k ++ "))")]+                    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)@@ -695,13 +721,13 @@         lAll          = lpre + length post          setup-          | lAll == 0      = [ "(define-fun " ++ initializer ++ " () Bool true) ; no initialization needed" | not quantified]-          | lAll == 1      = [ "(define-fun " ++ initializer ++ " () Bool " ++ mkInit 0 ++ ")"-                             , "(assert " ++ initializer ++ ")"-                             ]-          | True           = [ "(define-fun " ++ initializer ++ " () Bool (and " ++ unwords (map mkInit [0..lAll - 1]) ++ "))"-                             , "(assert " ++ initializer ++ ")"-                             ]+          | 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)@@ -714,21 +740,12 @@ cvtType (SBVType xs) = "(" ++ unwords (map smtType body) ++ ") " ++ smtType ret   where (body, ret) = (init xs, last xs) -type SkolemMap   = M.Map SV [SV] type TableMap    = IM.IntMap String type FunctionMap = M.Map Op String --- Present an SV; inline true/false as needed-cvtSV :: SkolemMap -> SV -> String-cvtSV skolemMap s@(SV _ (NodeId n))-  | Just ss <- s `M.lookup` skolemMap-  = "(" ++ show s ++ concatMap ((" " ++) . show) ss ++ ")"-  | s == trueSV-  = "true"-  | s == falseSV-  = "false"-  | True-  = 's' : show n+-- Present an SV, simply show+cvtSV :: SV -> String+cvtSV = show  cvtCV :: RoundingMode -> CV -> String cvtCV = cvToSMTLib@@ -738,13 +755,12 @@   | Just tn <- i `IM.lookup` m = tn   | True                       = "table" ++ show i  -- constant tables are always named this way -cvtExp :: SolverCapabilities -> RoundingMode -> SkolemMap -> TableMap -> FunctionMap -> SBVExpr -> String-cvtExp caps rm skolemMap tableMap functionMap expr@(SBVApp _ arguments) = sh expr-  where ssv = cvtSV skolemMap--        hasPB       = supportsPseudoBooleans caps-        hasInt2bv   = supportsInt2bv caps-        hasDistinct = supportsDistinct caps+cvtExp :: ProgInfo -> SolverCapabilities -> RoundingMode -> TableMap -> FunctionMap -> SBVExpr -> String+cvtExp curProgInfo caps rm tableMap functionMap expr@(SBVApp _ arguments) = sh expr+  where hasPB       = supportsPseudoBooleans caps+        hasInt2bv   = supportsInt2bv         caps+        hasDistinct = supportsDistinct       caps+        specialRels = progSpecialRels        curProgInfo          bvOp     = all isBounded   arguments         intOp    = any isUnbounded arguments@@ -855,7 +871,7 @@         --         -- I wish it was the full type here not just the result, but we go with the spec. Also see: <http://github.com/Z3Prover/z3/issues/2135>         -- and in particular <http://github.com/Z3Prover/z3/issues/2135#issuecomment-477636435>-        dtConstructor fld args res = "((as " ++ fld ++ " " ++ smtType res ++ ") " ++ unwords (map ssv args) ++ ")"+        dtConstructor fld args res = "((as " ++ fld ++ " " ++ smtType res ++ ") " ++ unwords (map cvtSV args) ++ ")"          -- Similarly, we fully qualify the accessors with their types to work around type checking issues         -- Unfortunately, z3 and CVC4 are behaving differently, so we tie this ascription to a solver capability.@@ -866,10 +882,10 @@                 ps      = " (" ++ unwords (map smtType params) ++ ") "                 aResult = "(_ is (" ++ fld ++ ps ++ smtType res ++ "))" -        sh (SBVApp Ite [a, b, c]) = "(ite " ++ ssv a ++ " " ++ ssv b ++ " " ++ ssv c ++ ")"+        sh (SBVApp Ite [a, b, c]) = "(ite " ++ cvtSV a ++ " " ++ cvtSV b ++ " " ++ cvtSV c ++ ")"          sh (SBVApp (LkUp (t, aKnd, _, l) i e) [])-          | needsCheck = "(ite " ++ cond ++ ssv e ++ " " ++ lkUp ++ ")"+          | needsCheck = "(ite " ++ cond ++ cvtSV e ++ " " ++ lkUp ++ ")"           | True       = lkUp           where needsCheck = case aKnd of                               KBool         -> (2::Integer) > fromIntegral l@@ -889,7 +905,7 @@                               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 -                lkUp = "(" ++ getTable tableMap t ++ " " ++ ssv i ++ ")"+                lkUp = "(" ++ getTable tableMap t ++ " " ++ cvtSV i ++ ")"                  cond                  | hasSign i = "(or " ++ le0 ++ " " ++ gtl ++ ") "@@ -914,46 +930,64 @@                                 KUserSort s _ -> error $ "SBV.SMT.SMTLib2.cvtExp: unexpected uninterpreted valued index: " ++ s                  mkCnst = cvtCV rm . mkConstCV (kindOf i)-                le0  = "(" ++ less ++ " " ++ ssv i ++ " " ++ mkCnst 0 ++ ")"-                gtl  = "(" ++ leq  ++ " " ++ mkCnst l ++ " " ++ ssv i ++ ")"+                le0  = "(" ++ less ++ " " ++ cvtSV i ++ " " ++ mkCnst 0 ++ ")"+                gtl  = "(" ++ leq  ++ " " ++ mkCnst l ++ " " ++ cvtSV i ++ ")" -        sh (SBVApp (KindCast f t) [a]) = handleKindCast hasInt2bv f t (ssv a)+        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 ++ " " ++ ssv a ++ ")"+        sh (SBVApp (ArrRead i) [a]) = "(select array_" ++ show i ++ " " ++ cvtSV a ++ ")"          sh (SBVApp (Uninterpreted nm) [])   = nm-        sh (SBVApp (Uninterpreted nm) args) = "(" ++ nm ++ " " ++ unwords (map ssv args) ++ ")"+        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 (Extract i j) [a]) | ensureBV = "((_ extract " ++ show i ++ " " ++ show j ++ ") " ++ ssv a ++ ")"+        sh a@(SBVApp (SpecialRelOp k o) args)+          | not (null args)+          = error $ "SBV.SMT.SMTLib2.cvtExp: unexpected arguments to special op: " ++ show a+          | True+          = let order = case o `elemIndex` specialRels of+                          Just i -> i+                          Nothing -> error $ unlines [ "SBV.SMT.SMTLib2.cvtExp: Cannot find " ++ show o ++ " in the special-relations list."+                                                     , "Known relations: " ++ intercalate ", " (map show specialRels)+                                                     ]+                asrt nm fun = mkRelEq nm (fun, show order) k+            in case o of+                 IsPartialOrder         nm -> asrt nm "partial-order"+                 IsLinearOrder          nm -> asrt nm "linear-order"+                 IsTreeOrder            nm -> asrt nm "tree-order"+                 IsPiecewiseLinearOrder nm -> asrt nm "piecewise-linear-order" +        sh (SBVApp (Extract i j) [a]) | ensureBV = "((_ extract " ++ show i ++ " " ++ show j ++ ") " ++ cvtSV a ++ ")"+         sh (SBVApp (Rol i) [a])-           | bvOp  = rot ssv "rotate_left"  i a+           | bvOp  = rot "rotate_left"  i a            | True  = bad          sh (SBVApp (Ror i) [a])-           | bvOp  = rot  ssv "rotate_right" i a+           | bvOp  = rot  "rotate_right" i a            | True  = bad          sh (SBVApp Shl [a, i])-           | bvOp   = shft ssv "bvshl"  "bvshl" a i+           | bvOp   = shft "bvshl"  "bvshl" a i            | True   = bad          sh (SBVApp Shr [a, i])-           | bvOp  = shft ssv "bvlshr" "bvashr" a i+           | bvOp  = shft "bvlshr" "bvashr" a i            | True  = bad          sh (SBVApp (ZeroExtend i) [a])-          | bvOp = "((_ zero_extend " ++ show i ++ ") " ++ ssv a ++ ")"+          | bvOp = "((_ zero_extend " ++ show i ++ ") " ++ cvtSV a ++ ")"           | True = bad          sh (SBVApp (SignExtend i) [a])-          | bvOp = "((_ sign_extend " ++ show i ++ ") " ++ ssv a ++ ")"+          | bvOp = "((_ sign_extend " ++ show i ++ ") " ++ cvtSV a ++ ")"           | True = bad          sh (SBVApp op args)           | Just f <- lookup op smtBVOpTable, ensureBVOrBool-          = f (any hasSign args) (map ssv args)+          = f (any hasSign args) (map cvtSV args)           where -- The first 4 operators below do make sense for Integer's in Haskell, but there's                 -- no obvious counterpart for them in the SMTLib translation.                 -- TODO: provide support for these.@@ -964,87 +998,89 @@                                , (Join, lift2 "concat")                                ] -        sh (SBVApp (Label _) [a]) = cvtSV skolemMap a  -- This won't be reached; but just in case!+        sh (SBVApp (Label _) [a]) = cvtSV a  -- This won't be reached; but just in case! -        sh (SBVApp (IEEEFP (FP_Cast kFrom kTo m)) args) = handleFPCast kFrom kTo (ssv m) (unwords (map ssv args))-        sh (SBVApp (IEEEFP w                    ) args) = "(" ++ show w ++ " " ++ unwords (map ssv args) ++ ")"+        sh (SBVApp (IEEEFP (FP_Cast kFrom kTo m)) args) = handleFPCast kFrom kTo (cvtSV m) (unwords (map cvtSV args))+        sh (SBVApp (IEEEFP w                    ) args) = "(" ++ show w ++ " " ++ unwords (map cvtSV args) ++ ")" -        sh (SBVApp (NonLinear w) args) = "(" ++ show w ++ " " ++ unwords (map ssv args) ++ ")"+        sh (SBVApp (NonLinear w) args) = "(" ++ show w ++ " " ++ unwords (map cvtSV args) ++ ")"          sh (SBVApp (PseudoBoolean pb) args)           | hasPB = handlePB pb args'           | True  = reducePB pb args'-          where args' = map ssv args+          where args' = map cvtSV args          -- NB: Z3 semantics have the predicates reversed: i.e., it returns true if overflow isn't possible. Hence the not.-        sh (SBVApp (OverflowOp op) args) = "(not (" ++ show op ++ " " ++ unwords (map ssv args) ++ "))"+        sh (SBVApp (OverflowOp op) args) = "(not (" ++ show op ++ " " ++ unwords (map cvtSV args) ++ "))"          -- Note the unfortunate reversal in StrInRe..-        sh (SBVApp (StrOp (StrInRe r)) args) = "(str.in.re " ++ unwords (map ssv args) ++ " " ++ regExpToSMTString r ++ ")"+        sh (SBVApp (StrOp (StrInRe r)) args) = "(str.in.re " ++ unwords (map cvtSV args) ++ " " ++ regExpToSMTString r ++ ")"         -- StrUnit is no-op, since a character in SMTLib is the same as a string-        sh (SBVApp (StrOp StrUnit)     [a])  = ssv a-        sh (SBVApp (StrOp op)          args) = "(" ++ show op ++ " " ++ unwords (map ssv args) ++ ")"+        sh (SBVApp (StrOp StrUnit)     [a])  = cvtSV a+        sh (SBVApp (StrOp op)          args) = "(" ++ show op ++ " " ++ unwords (map cvtSV args) ++ ")"          sh (SBVApp (RegExOp o@RegExEq{})  []) = show o         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 ssv args) ++ ")"+        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 op) args) = "(" ++ show op ++ " " ++ unwords (map ssv args) ++ ")"+        sh (SBVApp (SeqOp op) args) = "(" ++ show op ++ " " ++ unwords (map cvtSV args) ++ ")" -        sh (SBVApp (SetOp SetEqual)      args)   = "(= "      ++ unwords (map ssv args) ++ ")"-        sh (SBVApp (SetOp SetMember)     [e, s]) = "(select " ++ ssv s ++ " " ++ ssv e ++ ")"-        sh (SBVApp (SetOp SetInsert)     [e, s]) = "(store "  ++ ssv s ++ " " ++ ssv e ++ " true)"-        sh (SBVApp (SetOp SetDelete)     [e, s]) = "(store "  ++ ssv s ++ " " ++ ssv e ++ " false)"-        sh (SBVApp (SetOp SetIntersect)  args)   = "(intersection " ++ unwords (map ssv args) ++ ")"-        sh (SBVApp (SetOp SetUnion)      args)   = "(union "        ++ unwords (map ssv args) ++ ")"-        sh (SBVApp (SetOp SetSubset)     args)   = "(subset "       ++ unwords (map ssv args) ++ ")"-        sh (SBVApp (SetOp SetDifference) args)   = "(setminus "     ++ unwords (map ssv args) ++ ")"-        sh (SBVApp (SetOp SetComplement) args)   = "(complement "   ++ unwords (map ssv args) ++ ")"-        sh (SBVApp (SetOp SetHasSize)    args)   = "(set-has-size " ++ unwords (map ssv args) ++ ")"+        sh (SBVApp (SetOp SetEqual)      args)   = "(= "      ++ unwords (map cvtSV args) ++ ")"+        sh (SBVApp (SetOp SetMember)     [e, s]) = "(select " ++ cvtSV s ++ " " ++ cvtSV e ++ ")"+        sh (SBVApp (SetOp SetInsert)     [e, s]) = "(store "  ++ cvtSV s ++ " " ++ cvtSV e ++ " true)"+        sh (SBVApp (SetOp SetDelete)     [e, s]) = "(store "  ++ cvtSV s ++ " " ++ cvtSV e ++ " false)"+        sh (SBVApp (SetOp SetIntersect)  args)   = "(intersection " ++ unwords (map cvtSV args) ++ ")"+        sh (SBVApp (SetOp SetUnion)      args)   = "(union "        ++ unwords (map cvtSV args) ++ ")"+        sh (SBVApp (SetOp SetSubset)     args)   = "(subset "       ++ unwords (map cvtSV args) ++ ")"+        sh (SBVApp (SetOp SetDifference) args)   = "(setminus "     ++ unwords (map cvtSV args) ++ ")"+        sh (SBVApp (SetOp SetComplement) args)   = "(complement "   ++ unwords (map cvtSV args) ++ ")"+        sh (SBVApp (SetOp SetHasSize)    args)   = "(set-has-size " ++ unwords (map cvtSV args) ++ ")"          sh (SBVApp (TupleConstructor 0)   [])    = "mkSBVTuple0"-        sh (SBVApp (TupleConstructor n)   args)  = "((as mkSBVTuple" ++ show n ++ " " ++ smtType (KTuple (map kindOf args)) ++ ") " ++ unwords (map ssv args) ++ ")"-        sh (SBVApp (TupleAccess      i n) [tup]) = "(proj_" ++ show i ++ "_SBVTuple" ++ show n ++ " " ++ ssv tup ++ ")"+        sh (SBVApp (TupleConstructor n)   args)  = "((as mkSBVTuple" ++ show n ++ " " ++ smtType (KTuple (map kindOf args)) ++ ") " ++ unwords (map cvtSV args) ++ ")"+        sh (SBVApp (TupleAccess      i n) [tup]) = "(proj_" ++ show i ++ "_SBVTuple" ++ show n ++ " " ++ cvtSV tup ++ ")"          sh (SBVApp (EitherConstructor k1 k2 False) [arg]) =       dtConstructor "left_SBVEither"  [arg] (KEither k1 k2)         sh (SBVApp (EitherConstructor k1 k2 True ) [arg]) =       dtConstructor "right_SBVEither" [arg] (KEither k1 k2)-        sh (SBVApp (EitherIs          k1 k2 False) [arg]) = '(' : dtAccessor    "left_SBVEither"  [k1]  (KEither k1 k2) ++ " " ++ ssv arg ++ ")"-        sh (SBVApp (EitherIs          k1 k2 True ) [arg]) = '(' : dtAccessor    "right_SBVEither" [k2]  (KEither k1 k2) ++ " " ++ ssv arg ++ ")"-        sh (SBVApp (EitherAccess            False) [arg]) = "(get_left_SBVEither "  ++ ssv arg ++ ")"-        sh (SBVApp (EitherAccess            True ) [arg]) = "(get_right_SBVEither " ++ ssv arg ++ ")"+        sh (SBVApp (EitherIs          k1 k2 False) [arg]) = '(' : dtAccessor    "left_SBVEither"  [k1]  (KEither k1 k2) ++ " " ++ cvtSV arg ++ ")"+        sh (SBVApp (EitherIs          k1 k2 True ) [arg]) = '(' : dtAccessor    "right_SBVEither" [k2]  (KEither k1 k2) ++ " " ++ cvtSV arg ++ ")"+        sh (SBVApp (EitherAccess            False) [arg]) = "(get_left_SBVEither "  ++ cvtSV arg ++ ")"+        sh (SBVApp (EitherAccess            True ) [arg]) = "(get_right_SBVEither " ++ cvtSV arg ++ ")" -        sh (SBVApp  RationalConstructor    [t, b]) = "(SBV.Rational " ++ ssv t ++ " " ++ ssv b ++ ")"+        sh (SBVApp  RationalConstructor    [t, b]) = "(SBV.Rational " ++ cvtSV t ++ " " ++ cvtSV b ++ ")"          sh (SBVApp (MaybeConstructor k False) [])    =       dtConstructor "nothing_SBVMaybe" []    (KMaybe k)         sh (SBVApp (MaybeConstructor k True)  [arg]) =       dtConstructor "just_SBVMaybe"    [arg] (KMaybe k)-        sh (SBVApp (MaybeIs          k False) [arg]) = '(' : dtAccessor    "nothing_SBVMaybe" []    (KMaybe k) ++ " " ++ ssv arg ++ ")"-        sh (SBVApp (MaybeIs          k True ) [arg]) = '(' : dtAccessor    "just_SBVMaybe"    [k]   (KMaybe k) ++ " " ++ ssv arg ++ ")"-        sh (SBVApp MaybeAccess                [arg]) = "(get_just_SBVMaybe " ++ ssv arg ++ ")"+        sh (SBVApp (MaybeIs          k False) [arg]) = '(' : dtAccessor    "nothing_SBVMaybe" []    (KMaybe k) ++ " " ++ cvtSV arg ++ ")"+        sh (SBVApp (MaybeIs          k True ) [arg]) = '(' : dtAccessor    "just_SBVMaybe"    [k]   (KMaybe k) ++ " " ++ cvtSV arg ++ ")"+        sh (SBVApp MaybeAccess                [arg]) = "(get_just_SBVMaybe " ++ cvtSV arg ++ ")" +        sh (SBVApp Implies [a, b]) = "(=> " ++ cvtSV a ++ " " ++ cvtSV b ++ ")"+         sh inp@(SBVApp op args)           | intOp, Just f <- lookup op smtOpIntTable-          = f True (map ssv args)+          = f True (map cvtSV args)           | boolOp, Just f <- lookup op boolComps-          = f (map ssv args)+          = f (map cvtSV args)           | bvOp, Just f <- lookup op smtOpBVTable-          = f (any hasSign args) (map ssv args)+          = f (any hasSign args) (map cvtSV args)           | realOp, Just f <- lookup op smtOpRealTable-          = f (any hasSign args) (map ssv args)+          = f (any hasSign args) (map cvtSV args)           | ratOp, Just f <- lookup op ratOpTable-          = f (map ssv args)+          = f (map cvtSV args)           | fpOp, Just f <- lookup op smtOpFloatDoubleTable-          = f (any hasSign args) (map ssv args)+          = f (any hasSign args) (map cvtSV args)           | charOp || stringOp, Just f <- lookup op smtStringTable-          = f (map ssv args)+          = f (map cvtSV args)           | listOp, Just f <- lookup op smtListTable-          = f (map ssv args)+          = f (map cvtSV args)           | Just f <- lookup op uninterpretedTable-          = f (map ssv args)+          = f (map cvtSV args)           | True           = if not (null args) && isUserSort (head args)             then error $ unlines [ ""@@ -1304,11 +1340,11 @@         -- Nothing else should come up:         cast f  d  _ = error $ "SBV.SMTLib2: Unexpected FPCast from: " ++ show f ++ " to " ++ show d -rot :: (SV -> String) -> String -> Int -> SV -> String-rot ssv o c x = "((_ " ++ o ++ " " ++ show c ++ ") " ++ ssv x ++ ")"+rot :: String -> Int -> SV -> String+rot o c x = "((_ " ++ o ++ " " ++ show c ++ ") " ++ cvtSV x ++ ")" -shft :: (SV -> String) -> String -> String -> SV -> SV -> String-shft ssv oW oS x c = "(" ++ o ++ " " ++ ssv x ++ " " ++ ssv c ++ ")"+shft :: String -> String -> SV -> SV -> String+shft oW oS x c = "(" ++ o ++ " " ++ cvtSV x ++ " " ++ cvtSV c ++ ")"    where o = if hasSign x then oS else oW  -- Various casts
Data/SBV/SMT/Utils.hs view
@@ -31,7 +31,7 @@ import Control.Monad.Trans (MonadIO, liftIO)  import Data.SBV.Core.Data-import Data.SBV.Core.Symbolic (QueryContext, CnstMap)+import Data.SBV.Core.Symbolic (QueryContext, CnstMap, SMTDef, ResultInp(..), ProgInfo(..)) import Data.SBV.Utils.Lib (joinArgs)  import Data.List (intercalate)@@ -42,16 +42,16 @@  -- | An instance of SMT-Lib converter; instantiated for SMT-Lib v1 and v2. (And potentially for newer versions in the future.) type SMTLibConverter a =  QueryContext                                  -- ^ Internal or external query?+                       -> ProgInfo                                      -- ^ Various program info                        -> Set.Set Kind                                  -- ^ Kinds used in the problem                        -> Bool                                          -- ^ is this a sat problem?                        -> [String]                                      -- ^ extra comments to place on top-                       -> ([(Quantifier, NamedSymVar)], [NamedSymVar])  -- ^ inputs and aliasing names and trackers-                       -> [Either SV (SV, [SV])]                        -- ^ skolemized inputs+                       -> 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, SBVType)]                           -- ^ uninterpreted functions/constants-                       -> [(Bool, String, [String])]                    -- ^ user given axioms/definitions+                       -> [(String, (Maybe [String], SBVType))]         -- ^ uninterpreted functions/constants+                       -> [SMTDef]                                      -- ^ user given axioms/definitions                        -> SBVPgm                                        -- ^ assignments                        -> S.Seq (Bool, [(String, String)], SV)          -- ^ extra constraints                        -> SV                                            -- ^ output variable@@ -59,12 +59,13 @@                        -> a  -- | An instance of SMT-Lib converter; instantiated for SMT-Lib v1 and v2. (And potentially for newer versions in the future.)-type SMTLibIncConverter a =  [NamedSymVar]                         -- ^ inputs+type SMTLibIncConverter a =  ProgInfo                              -- ^ Various prog info+                          -> [NamedSymVar]                         -- ^ inputs                           -> Set.Set Kind                          -- ^ new kinds-                          -> (CnstMap, [(SV, CV)])                  -- ^ all constants sofar, and new constants+                          -> (CnstMap, [(SV, CV)])                 -- ^ all constants sofar, and new constants                           -> [(Int, ArrayInfo)]                    -- ^ newly created arrays                           -> [((Int, Kind, Kind), [SV])]           -- ^ newly created tables-                          -> [(String, SBVType)]                   -- ^ newly created uninterpreted functions/constants+                          -> [(String, (Maybe [String], SBVType))] -- ^ newly created uninterpreted functions/constants                           -> SBVPgm                                -- ^ assignments                           -> S.Seq (Bool, [(String, String)], SV)  -- ^ extra constraints                           -> SMTConfig                             -- ^ configuration
Data/SBV/Set.hs view
@@ -55,7 +55,7 @@ import qualified Data.Set as Set  import Data.SBV.Core.Data-import Data.SBV.Core.Model    ((.==), (./=))+import Data.SBV.Core.Model () -- instances only import Data.SBV.Core.Symbolic (SetOp(..))  import qualified Data.Generics.Uniplate.Data as G@@ -149,8 +149,8 @@ -- -- >>> prove $ \x (s :: SSet Integer) -> x `delete` (x `insert` s) .== s -- Falsifiable. Counter-example:---   s0 =   2 :: Integer---   s1 = {2} :: {Integer}+--   s0 = 2 :: Integer+--   s1 = U :: {Integer} -- -- But the above is true if the element isn't in the set to start with: --@@ -192,8 +192,8 @@ -- -- >>> prove $ \x (s :: SSet Integer) -> x `insert` (x `delete` s) .== s -- Falsifiable. Counter-example:---   s0 =  2 :: Integer---   s1 = {} :: {Integer}+--   s0 =       2 :: Integer+--   s1 = U - {2} :: {Integer} -- -- But the above is true if the element is in the set to start with: --
Data/SBV/Tools/BoundedFix.hs view
@@ -79,7 +79,7 @@ -- final result incorrect. (Note that @7257600 = 2 * 3628800@.) A wrapper algorithm can -- then assert the actual value of @bfac 10@ here as an extra constraint and can -- search for "deeper bugs."-bfix :: (SymVal a, Uninterpreted (SBV a -> r)) => Int -> String -> ((SBV a -> r) -> (SBV a -> r)) -> SBV a -> r+bfix :: (SymVal a, SMTDefinable (SBV a -> r)) => Int -> String -> ((SBV a -> r) -> (SBV a -> r)) -> SBV a -> r bfix bound nm f x   | isConcrete x = g x   | True         = unroll bound x
Data/SBV/Tools/GenTest.hs view
@@ -16,6 +16,8 @@         genTest, TestVectors, getTestValues, renderTest, TestStyle(..)         ) where +import Control.Monad (unless)+ import Data.Bits     (testBit) import Data.Char     (isAlpha, toUpper) import Data.Function (on)@@ -26,6 +28,7 @@ import Data.SBV.Core.Data  import Data.SBV.Utils.PrettyNum+import Data.SBV.Provers.Prover(defaultSMTCfg)  import qualified Data.Foldable as F (toList) @@ -48,9 +51,10 @@          | i == n = return $ TV $ reverse sofar          | True   = do t <- tc                        gen (i+1) (t:sofar)-        tc = do (_, Result {resTraces=tvals, resConsts=(_, cs), resConstraints=cstrs, resOutputs=os}) <- runSymbolic (Concrete Nothing) (m >>= output)+        tc = do (_, Result {resTraces=tvals, resConsts=(_, cs), resDefinitions=definitions, resConstraints=cstrs, resOutputs=os}) <- runSymbolic defaultSMTCfg (Concrete Nothing) (m >>= output)                 let cval = fromMaybe (error "Cannot generate tests in the presence of uninterpeted constants!") . (`lookup` cs)                     cond = and [cvToBool (cval v) | (False, _, v) <- F.toList cstrs] -- Only pick-up "hard" constraints, as indicated by False in the fist component+                unless (null definitions) $ error "Cannot generate tests in the presence of 'smtFunction' calls!"                 if cond                    then return (map snd tvals, map cval os)                    else tc   -- try again, with the same set of constraints
Data/SBV/Tools/Overflow.hs view
@@ -32,7 +32,6 @@  import Data.SBV.Core.Data import Data.SBV.Core.Kind-import Data.SBV.Core.Symbolic import Data.SBV.Core.Model import Data.SBV.Core.Operations import Data.SBV.Core.Sized
Data/SBV/Trans.hs view
@@ -89,12 +89,11 @@   , mkSymbolicEnumeration    -- * Uninterpreted sorts, axioms, constants, and functions-  , mkUninterpretedSort, Uninterpreted(..), addAxiom+  , mkUninterpretedSort, SMTDefinable(..)    -- * Properties, proofs, and satisfiability-  , Predicate, Goal, MProvable(..), Provable, proveWithAll, proveWithAny , satWithAll-  , proveConcurrentWithAny, proveConcurrentWithAll, satConcurrentWithAny, satConcurrentWithAll-  , satWithAny, generateSMTBenchmark+  , Predicate, ConstraintSet, ProvableM(..), Provable, SatisfiableM(..), Satisfiable+  , generateSMTBenchmarkSat, generateSMTBenchmarkProof   , solve   -- * Constraints   -- ** General constraints@@ -121,7 +120,7 @@   -- ** Multiple optimization goals   , OptimizeStyle(..)   -- ** Objectives-  , Objective(..), Metric(..)+  , Objective(..)   -- ** Soft assumptions   , assertWithPenalty , Penalty(..)   -- ** Field extensions
Data/SBV/Trans/Control.hs view
@@ -21,7 +21,7 @@      , freshVar_, freshVar       -- * Create a fresh array-     , freshArray_, freshArray+     , freshArray_, freshArray, freshLambdaArray_, freshLambdaArray       -- * Checking satisfiability      , CheckSatResult(..), checkSat, ensureSat, checkSatUsing, checkSatAssuming, checkSatAssumingWithUnsatisfiableSet@@ -38,6 +38,9 @@       -- ** Extracting interpolants      , getInterpolantMathSAT, getInterpolantZ3++     -- ** Getting abducts+     , getAbduct, getAbductNext       -- ** Extracting assertions      , getAssertions
Data/SBV/Tuple.hs view
@@ -26,6 +26,8 @@     (^.), _1, _2, _3, _4, _5, _6, _7, _8   -- * Tupling and untupling   , tuple, untuple+  -- * Swapping, only for 2-tuples+  , swap   ) where  import GHC.TypeLits@@ -47,6 +49,11 @@ (^.) :: a -> (a -> b) -> b t ^. f = f t infixl 8 ^.++-- | Swap the elements of a 2-tuple+swap :: (SymVal a, SymVal b) => STuple a b -> STuple b a+swap t = tuple (b, a)+  where (a, b) = untuple t  -- | Dynamic interface to exporting tuples, this function is not -- exported on purpose; use it only via the field functions '_1', '_2', etc.
Data/SBV/Utils/PrettyNum.hs view
@@ -17,7 +17,7 @@ module Data.SBV.Utils.PrettyNum (         PrettyNum(..), readBin, shex, chex, shexI, sbin, sbinI       , showCFloat, showCDouble, showHFloat, showHDouble, showBFloat, showFloatAtBase-      , showSMTFloat, showSMTDouble, smtRoundingMode, cvToSMTLib, mkSkolemZero+      , showSMTFloat, showSMTDouble, smtRoundingMode, cvToSMTLib       , showNegativeNumber       ) where @@ -494,12 +494,6 @@         -- as there is no positive value we can provide to make the bvneg work.. (see above)         mkMinBound :: Int -> String         mkMinBound i = "#b1" ++ replicate (i-1) '0'---- | Create a skolem 0 for the kind-mkSkolemZero :: RoundingMode -> Kind -> String-mkSkolemZero _ (KUserSort _ (Just (f:_))) = f-mkSkolemZero _ (KUserSort s _)            = error $ "SBV.mkSkolemZero: Unexpected user sort: " ++ s-mkSkolemZero rm k                         = cvToSMTLib rm (mkConstCV k (0::Integer))  -- | Show a float as a binary showBFloat :: (Show a, RealFloat a) => a -> ShowS
Data/SBV/Utils/SExpr.hs view
@@ -13,12 +13,12 @@  {-# OPTIONS_GHC -Wall -Werror #-} -module Data.SBV.Utils.SExpr (SExpr(..), parenDeficit, parseSExpr, parseSExprFunction) where+module Data.SBV.Utils.SExpr (SExpr(..), parenDeficit, parseSExpr, parseSExprFunction, makeHaskellFunction) where  import Data.Bits   (setBit, testBit) import Data.Char   (isDigit, ord, isSpace) import Data.Either (partitionEithers)-import Data.List   (isPrefixOf, nubBy)+import Data.List   (isPrefixOf, nubBy, intercalate) import Data.Maybe  (fromMaybe, listToMaybe) import Data.Word   (Word32, Word64) @@ -536,5 +536,89 @@         eRank EFloatingPoint{} = 4         eRank EDouble{}        = 5         eRank EApp{}           = 6++-- Turn+--  "((F (lambda ((x!1 Int)) (+ 3 (* 2 x!1)))))"+---  into+--  "F x = 3 + 2 * x"+-- if we can. We try but don't push too hard! This is only used for display purposes.+--+-- This isn't very fool-proof; can be confused if there are binding constructs etc.+-- Also, the generated text isn't necessarily fully Haskell acceptable.+-- But it seems to do an OK job for most common use cases.+makeHaskellFunction :: String -> String -> Maybe [String] -> Maybe String+makeHaskellFunction resp nm mbArgs+   = case parseSExpr resp of+       Right (EApp [EApp [ECon o, e]]) | o == nm -> do (args, bd) <- lambda e+                                                       return $ unwords (nm : args) ++ " = " ++ bd+       _                                         -> Nothing++  where -- infinite supply of names; starting with the ones we're given+        preSupply = fromMaybe [] mbArgs++        extras =  ["x", "y", "z"]+               ++ [[c] | c <- ['a' .. 'z'], c < 'x']+               ++ ['x' : show i | i <- [(1::Int) ..]]++        mkUnique x | x `elem` preSupply = mkUnique $ x ++ "'"+                   | True               = x++        supply = preSupply ++ map mkUnique extras++        lambda :: SExpr -> Maybe ([String], String)+        lambda (EApp [ECon "lambda", EApp args, bd]) = do as <- mapM getArg args+                                                          let env = zip as supply+                                                          pure (map snd env, body env bd)+        lambda _                                     = Nothing++        getArg (EApp [ECon argName, _]) = Just argName+        getArg _                        = Nothing++        body env = go+          where go :: SExpr -> String+                go (ECon n) | Just a <- lookup n env = a+                            | True                   = n++                go (ENum (i, _))      = show i+                go (EReal  a)         = show a+                go (EFloat f)         = show f+                go (EFloatingPoint f) = show f+                go (EDouble f)        = show f+                go (EApp xs)          = app (map (wrap . go) xs)++                parens x = '(' : x ++ ")"++                wrap x | "-" `isPrefixOf` x = parens x+                       | any isSpace x      = parens x+                       | True               = x++                mkBin o a b = wrap a ++ " " ++ o ++ " " ++ wrap b++                isPlus  = (`elem` ["+",  "bvadd"])+                isTimes = (`elem` ["*",  "bvmul"])+                isLT    = (`elem` ["<",  "bvult", "bvslt", "fp.lt" ])+                isLTE   = (`elem` ["<=", "bvule", "bvsle", "fp.leq"])+                isGT    = (`elem` [">",  "bvugt", "bvsgt", "fp.gt" ])+                isGTE   = (`elem` [">=", "bvuge", "bvsge", "fp.gte"])++                -- Make an application, with some simplifications+                app :: [String] -> String+                app (o : xs) | isPlus o = intercalate " + " xs++                -- multiplication of arbitrary elements, with proviso for multiplication by -1+                app [m, "(-1)", x] | isTimes m = '-' : x+                app (m  : xs)      | isTimes m = intercalate " * " xs++                -- binary arith ops+                app ["-",  a, b] = mkBin "-"  a b+                app ["/",  a, b] = mkBin "/"  a b++                app [o, a, b] | isLT  o = mkBin "<"  a b+                app [o, a, b] | isLTE o = mkBin "<=" a b+                app [o, a, b] | isGT  o = mkBin ">"  a b+                app [o, a, b] | isGTE o = mkBin ">=" a b++                -- give up, and just do prefix!+                app xs = unwords xs  {-# ANN chainAssigns ("HLint: ignore Redundant if" :: String) #-}
Documentation/SBV/Examples/BitPrecise/BitTricks.hs view
@@ -53,8 +53,7 @@ -- | Collection of queries queries :: IO () queries =-  let check :: Provable a => String -> a -> IO ()-      check w t = do putStr $ "Proving " ++ show w ++ ": "+  let check w t = do putStr $ "Proving " ++ show w ++ ": "                      print =<< prove t   in do check "Fast min             " fastMinCorrect         check "Fast max             " fastMaxCorrect
Documentation/SBV/Examples/BitPrecise/MultMask.hs view
@@ -55,8 +55,7 @@   where find = do -- Magic incantation to make the test go fast. See <http://github.com/Z3Prover/z3/issues/5660> for details.                   setOption $ OptionKeyword ":smt.ematching" ["false"] -                  mask <- sbvExists "mask"-                  mult <- sbvExists "mult"-                  inp  <- sbvForall "inp"-                  let res = (mask .&. inp) * (mult :: SWord64)-                  solve [inp `sExtractBits` [7, 15 .. 63] .== res `sExtractBits` [56 .. 63]]+                  mask <- free "mask"+                  mult <- free "mult"+                  constrain $ \(Forall inp) -> let res = (mask .&. inp) * (mult :: SWord64)+                                                in inp `sExtractBits` [7, 15 .. 63] .== res `sExtractBits` [56 .. 63]
Documentation/SBV/Examples/BitPrecise/PrefixSum.hs view
@@ -83,7 +83,7 @@ -- | Correctness theorem, for a powerlist of given size, an associative operator, and its left-unit element. flIsCorrect :: Int -> (forall a. (OrdSymbolic a, Num a, Bits a) => (a, a -> a -> a)) -> Symbolic SBool flIsCorrect n zf = do-        args :: PowerList SWord32 <- mkForallVars n+        args :: PowerList SWord32 <- mkFreeVars n         return $ ps zf args .== lf zf args  -- | Proves Ladner-Fischer is equivalent to reference specification for addition.
Documentation/SBV/Examples/Crypto/RC4.hs view
@@ -141,8 +141,8 @@ -- large symbolic trace. rc4IsCorrect :: IO ThmResult rc4IsCorrect = prove $ do-        key <- mkForallVars 5-        pt  <- mkForallVars 5+        key <- mkFreeVars 5+        pt  <- mkFreeVars 5         let ks  = keySchedule key             ct  = zipWith xor ks pt             pt' = zipWith xor ks ct
Documentation/SBV/Examples/Crypto/SHA.hs view
@@ -29,7 +29,7 @@ import Data.SBV.Tools.CodeGen  import Data.Char (ord, toLower)-import Data.List (genericLength)+import Data.List (genericLength, foldl') import Numeric   (showHex)  import Data.Proxy (Proxy(..))@@ -241,14 +241,14 @@          step3Body xs t = error $ "Impossible! step3Body received a list of length " ++ show (length xs) ++ ", iteration: " ++ show t           -- Step 3 simply folds the body for the required loop-count-         step3 = foldl step3Body hPrev [0 .. lim]+         step3 = foldl' step3Body hPrev [0 .. lim]           -- Step 4          step4 = zipWith (+) step3 hPrev  -- | Compute the hash of a given string using the specified parameterized hash algorithm. shaP :: (Num w, Bits w, ByteConverter w) => SHA w -> String -> [w]-shaP p@SHA{h0} = foldl (hashBlock p) h0 . prepareMessage p+shaP p@SHA{h0} = foldl' (hashBlock p) h0 . prepareMessage p  ----------------------------------------------------------------------------- -- * Computing the digest@@ -373,6 +373,22 @@          let hIn   = chunkBy 4 fromBytes hInBytes             block = chunkBy 4 fromBytes blockBytes++            result = hashBlock algorithm hIn (Block block)++        cgOutputArr "hash" $ concatMap toBytes result++-- | Generate code for one block of SHA512 in action, starting from an arbitrary hash value.+cgSHA512 :: IO ()+cgSHA512 = compileToC Nothing "sha512" $ do++        let algorithm = sha512P++        hInBytes   <- cgInputArr  64 "hIn"+        blockBytes <- cgInputArr 128 "block"++        let hIn   = chunkBy 8 fromBytes hInBytes+            block = chunkBy 8 fromBytes blockBytes              result = hashBlock algorithm hIn (Block block) 
Documentation/SBV/Examples/Existentials/CRCPolynomial.hs view
@@ -51,39 +51,32 @@ -- | Generate good CRC polynomials for 48-bit words, given the hamming distance @hd@. genPoly :: SWord8 -> Int -> IO () genPoly hd maxCnt = do res <- allSatWith defaultSMTCfg{allSatMaxModelCount = Just maxCnt} $ do-                                p <- sbvExists "polynomial" -- the polynomial is existentially specified-                                s <- sbvForall "sent"       -- sent word, universal-                                r <- sbvForall "received"   -- received word, universal-                                -- assert that the polynomial @p@ is good. Note-                                -- that we also supply the extra information that-                                -- the least significant bit must be set in the-                                -- polynomial, as all CRC polynomials have the "+1"-                                -- term in them set. This simplifies the query.-                                return $ sTestBit p 0 .&& crcGood hd p s r+                                poly <- free "polynomial" -- the polynomial is existentially specified+                                constrain $ \(Forall sent) (Forall received) ->+                                   -- assert that the polynomial @p@ is good. Note+                                   -- that we also supply the extra information that+                                   -- the least significant bit must be set in the+                                   -- polynomial, as all CRC polynomials have the "+1"+                                   -- term in them set. This simplifies the query.+                                   sTestBit poly 0 .&& crcGood hd poly sent received                        cnt <- displayModels id disp res-                       putStrLn $ "Found: " ++ show cnt ++ " polynomail(s)."+                       putStrLn $ "Found: " ++ show cnt ++ " polynomial(s)."         where disp :: Int -> (Bool, Word16) -> IO ()               disp n (_, s) = putStrLn $ "Polynomial #" ++ show n ++ ". x^16 + " ++ showPolynomial False s  -- | Find and display all degree 16 polynomials with hamming distance at least 4, for 48 bit messages. ----- When run, this function prints:+-- We have: -----  @---    Polynomial #1. x^16 + x^3 + x^2 + 1---    Polynomial #2. x^16 + x^3 + x^2 + x + 1---    Polynomial #3. x^16 + x^3 + x + 1---    Polynomial #4. x^16 + x^15 + x^2 + 1---    Polynomial #5. x^16 + x^15 + x^2 + x + 1---    Found: 5 polynomial(s).---  @+-- >>> findHD4Polynomials 2+-- Polynomial #1. x^16 + x^3 + x^2 + 1+-- Polynomial #2. x^16 + x^2 + x + 1+-- Found: 2 polynomial(s). -- -- Note that different runs can produce different results, depending on the random -- numbers used by the solver, solver version, etc. (Also, the solver will take some--- time to generate these results. On my machine, the first five polynomials were--- generated in about 5 minutes.)-findHD4Polynomials :: IO ()-findHD4Polynomials = genPoly 4 cnt-  where cnt = 5 -- Generate at most this many polynomials+-- time to generate these results, as the generation of these polynomials is rather slow.)+findHD4Polynomials :: Int -> IO ()+findHD4Polynomials = genPoly 4  {-# ANN crc_48_16 ("HLint: ignore Use camelCase" :: String) #-}
Documentation/SBV/Examples/Existentials/Diophantine.hs view
@@ -10,12 +10,21 @@ -- using explicit quantification. ----------------------------------------------------------------------------- +{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeApplications    #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.Existentials.Diophantine where +import Data.List (intercalate, transpose)+ import Data.SBV+import Data.Proxy +import GHC.TypeLits+ -------------------------------------------------------------------------------------------------- -- * Representing solutions --------------------------------------------------------------------------------------------------@@ -24,22 +33,46 @@ -- second component plus one of the vectors in the first component. data Solution = Homogeneous    [[Integer]]               | NonHomogeneous [[Integer]] [[Integer]]-              deriving Show +instance Show Solution where+  show s = case s of+             Homogeneous        xss -> comb supplyH (zip (repeat False) xss)+             NonHomogeneous css xss -> intercalate "\n" [comb supplyNH ((True, cs) : zip (repeat False) xss) | cs <- css]+    where supplyH  = ['k' : replicate i '\'' | i <- [0 ..]]+          supplyNH = "" : supplyH++          comb supply xss = vec $ map add (transpose (zipWith muls supply xss))+            where muls x (isConst, cs) = map mul cs+                    where mul 0 = "0"+                          mul 1 | isConst = "1"+                                | True    = x+                          mul k | isConst = show k+                                | True    = show k ++ x++                  add [] = "0"+                  add xs = foldr1 plus xs++                  plus "0" y   = y+                  plus x   "0" = x+                  plus x   y   = x ++ "+" ++ y++          vec xs = "(" ++ intercalate ", " xs ++ ")"+ -------------------------------------------------------------------------------------------------- -- * Solving diophantine equations -------------------------------------------------------------------------------------------------- -- | ldn: Solve a (L)inear (D)iophantine equation, returning minimal solutions over (N)aturals. -- The input is given as a rows of equations, with rhs values separated into a tuple. The first--- parameter limits the search to bound: In case there are too many solutions, you might want--- to limit your search space.-ldn :: Maybe Int -> [([Integer], Integer)] -> IO Solution-ldn mbLim problem = do solution <- basis mbLim (map (map literal) m)-                       if homogeneous-                           then return $ Homogeneous solution-                           else do let ones  = [xs | (1:xs) <- solution]-                                       zeros = [xs | (0:xs) <- solution]-                                   return $ NonHomogeneous ones zeros+-- argument must be a proxy of a natural, must be total number of columns in the system. (i.e.,+-- #of variables + 1). The second parameter limits the search to bound: In case there are+-- too many solutions, you might want to limit your search space.+ldn :: forall proxy n. KnownNat n => proxy n -> Maybe Int -> [([Integer], Integer)] -> IO Solution+ldn pn mbLim problem = do solution <- basis pn mbLim (map (map literal) m)+                          if homogeneous+                              then return $ Homogeneous solution+                              else do let ones  = [xs | (1:xs) <- solution]+                                          zeros = [xs | (0:xs) <- solution]+                                      return $ NonHomogeneous ones zeros   where rhs = map snd problem         lhs = map fst problem         homogeneous = all (== 0) rhs@@ -50,12 +83,12 @@ -- that cannot be written as the sum of two other solutions. We use the mathematically equivalent -- statement that a solution is in the basis if it's least according to the natural partial -- order using the ordinary less-than relation.-basis :: Maybe Int -> [[SInteger]] -> IO [[Integer]]-basis mbLim m = extractModels `fmap` allSatWith z3{allSatMaxModelCount = mbLim} cond- where cond = do as <- mkExistVars  n-                 bs <- mkForallVars n+basis :: forall proxy n. KnownNat n => proxy n -> Maybe Int -> [[SInteger]] -> IO [[Integer]]+basis _ mbLim m = extractModels `fmap` allSatWith z3{allSatMaxModelCount = mbLim} cond+ where cond = do as <- mkFreeVars  n -                 return $ ok as .&& (ok bs .=> as .== bs .|| sNot (bs `less` as))+                 constrain $ \(ForallN bs :: ForallN n nm Integer) ->+                        ok as .&& (ok bs .=> as .== bs .|| sNot (bs `less` as))         n = if null m then 0 else length (head m) @@ -74,21 +107,14 @@ -- We have: -- -- >>> test--- NonHomogeneous [[0,2,0],[1,0,0]] [[0,1,1],[1,0,2]]------ which means that the solutions are of the form:------    @(0, 2, 0) + k (0, 1, 1) + k' (1, 0, 2) = (k', 2+k, k+2k')@------ OR------    @(1, 0, 0) + k (0, 1, 1) + k' (1, 0, 2) = (1+k', k, k+2k')@+-- (k, 2+k', 2k+k')+-- (1+k, k', 2k+k') ----- for arbitrary @k@, @k'@. It's easy to see that these are really solutions--- to the equation given. It's harder to see that they cover all possibilities,--- but a moments thought reveals that is indeed the case.+-- That is, for arbitrary @k@ and @k'@, we have two different solutions. (An infinite family.)+-- You can verify these solutuions by substituting the values for @x@, @y@ and @z@ in the above, for each choice.+-- It's harder to see that they cover all possibilities, but a moments thought reveals that is indeed the case. test :: IO Solution-test = ldn Nothing [([2,1,-1], 2)]+test = ldn (Proxy @4) Nothing [([2,1,-1], 2)]  -- | A puzzle: Five sailors and a monkey escape from a naufrage and reach an island with -- coconuts. Before dawn, they gather a few of them and decide to sleep first and share@@ -131,13 +157,15 @@ -- solutions to avoid the all-sat pitfall. sailors :: IO [Integer] sailors = search 1-  where search i = do soln <- ldn (Just i) [ ([1, -5,  0,  0,  0,  0,  0], 1)-                                           , ([0,  4, -5 , 0,  0,  0,  0], 1)-                                           , ([0,  0,  4, -5 , 0,  0,  0], 1)-                                           , ([0,  0,  0,  4, -5,  0,  0], 1)-                                           , ([0,  0,  0,  0,  4, -5,  0], 1)-                                           , ([0,  0,  0,  0,  0,  4, -5], 1)-                                           ]+  where search i = do soln <- ldn (Proxy @8)+                                  (Just i)+                                  [ ([1, -5,  0,  0,  0,  0,  0], 1)+                                  , ([0,  4, -5 , 0,  0,  0,  0], 1)+                                  , ([0,  0,  4, -5 , 0,  0,  0], 1)+                                  , ([0,  0,  0,  4, -5,  0,  0], 1)+                                  , ([0,  0,  0,  0,  4, -5,  0], 1)+                                  , ([0,  0,  0,  0,  0,  4, -5], 1)+                                  ]                       case soln of                         NonHomogeneous (xs:_) _ -> return xs                         _                       -> search (i+1)
Documentation/SBV/Examples/Misc/Definitions.hs view
@@ -11,57 +11,142 @@ -- for recursive definitions. ----------------------------------------------------------------------------- +{-# LANGUAGE OverloadedLists  #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.Misc.Definitions where  import Data.SBV+import Data.SBV.Tuple+import qualified Data.SBV.List as L --- | Sum of numbers from 0 to the given number.--- Note that this cannot be defined as a regular Haskell function, as--- it wouldn't terminate as it recurses on a symbolic argument.+-------------------------------------------------------------------------+-- * Simple functions+-------------------------------------------------------------------------++-- | Add one to an argument+add1 :: SInteger -> SInteger+add1 = smtFunction "add1" (+1)++-- | Reverse run the add1 function. Note that the generated SMTLib will have the function+-- add1 itself defined. You can verify this by running the below in verbose mode.+--+-- >>> add1Example+-- Satisfiable. Model:+--   x = 4 :: Integer+add1Example :: IO SatResult+add1Example = sat $ do+        x <- sInteger "x"+        pure $ 5 .== add1 x++-------------------------------------------------------------------------+-- * Basic recursive functions+-------------------------------------------------------------------------++-- | Sum of numbers from 0 to the given number. Since this is a recursive+-- definition, we cannot simply symbolically simulate it as it wouldn't+-- terminat. So, we use the function generation facilities to define it+-- directly in SMTLib. Note how the function itself takes a "recursive version"+-- of itself, and all recursive calls are made with this name. sumToN :: SInteger -> SInteger-sumToN = uninterpret "sumToN"+sumToN = smtFunction "sumToN" $ \x -> ite (x .<= 0) 0 (x + sumToN (x - 1)) --- | Add the definition of sum to the SMT solver. Note that SBV--- performs no checks on your definition, neither that it is--- well formed, or even has the correct type!-defineSum :: Symbolic ()-defineSum = addSMTDefinition "sumToN"-                [ "(define-fun-rec sumToN ((x Int)) Int"-                , "                (ite (<= x 0)"-                , "                     0"-                , "                     (+ x (sumToN (- x 1)))))"-                ]+-- | Prove that sumToN works as expected.+--+-- We have:+--+-- >>> sumToNExample+-- Satisfiable. Model:+--   s0 =  5 :: Integer+--   s1 = 15 :: Integer+sumToNExample :: IO SatResult+sumToNExample = sat $ \a r -> a .== 5 .&& r .== sumToN a --- | A simple proof using 'sumToN'. We get a failure, because we haven't--- given the solver the definition, and thus it goes completely uninterpreted.+-- | Coding list-length recursively. Again, we map directly to an SMTLib function.+len :: SList Integer -> SInteger+len = smtFunction "list_length" $ \xs -> ite (L.null xs) 0 (1 + len (L.tail xs))++-- | Calculate the length of a list, using recursive functions. -- -- We have: ----- >>> badExample--- Falsifiable. Counter-example:---   sumToN :: Integer -> Integer---   sumToN _ = 0+-- >>> lenExample+-- Satisfiable. Model:+--   s0 = [1,2,3] :: [Integer]+--   s1 =       3 :: Integer+lenExample :: IO SatResult+lenExample = sat $ \a r -> a .== [1,2,3::Integer] .&& r .== len a++-------------------------------------------------------------------------+-- * Mutual recursion+-------------------------------------------------------------------------++-- | A simple mutual-recursion example, from the z3 documentation. We have: ----- Since 'sumToN' remains uninterpreted, the solver gave us a model that obviously--- fails the property.-badExample :: IO ThmResult-badExample = prove $ do-        let check = sumToN 5 .== 15  -- Should fail, even though 5*6/2 = 15-        pure check :: Predicate+-- >>> pingPong+-- Satisfiable. Model:+--   s0 = 1 :: Integer+pingPong :: IO SatResult+pingPong = sat $ \x -> x .> 0 .&& ping x sTrue .> x+  where ping :: SInteger -> SBool -> SInteger+        ping = smtFunction "ping" $ \x y -> ite y (pong (x+1) (sNot y)) (x - 1) --- | Same example, except this time we give the solver the definition of the function,--- and thus the proof goes through.+        pong :: SInteger -> SBool -> SInteger+        pong = smtFunction "pong" $ \a b -> ite b (ping (a-1) (sNot b)) a++-- | Usual way to define even-odd mutually recursively. Unfortunately, while this goes through,+-- the backend solver does not terminate on this example. See 'evenOdd2' for an alternative+-- technique to handle such definitions, which seems to be more solver friendly.+evenOdd :: IO SatResult+evenOdd = satWith z3{verbose=True} $ \a r -> a .== 20 .&& r .== isE a+  where isE, isO :: SInteger -> SBool+        isE = smtFunction "isE" $ \x -> ite (x .< 0) (isE (-x)) (x .== 0 .|| isO  (x - 1))+        isO = smtFunction "isO"  $ \x -> ite (x .< 0) (isO  (-x)) (x .== 0 .|| isE (x - 1))++-- | Another technique to handle mutually definitions is to define the functions together, and pull the results out individually.+-- This usually works better than defining the functions separately, from a solver perspective.+isEvenOdd :: SInteger -> STuple Bool Bool+isEvenOdd = smtFunction "isEvenOdd" $ \x -> ite (x .<  0) (isEvenOdd (-x))+                                          $ ite (x .== 0) (tuple (sTrue, sFalse))+                                                          (swap (isEvenOdd (x - 1)))++-- | Extract the isEven function for easier use.+isEven :: SInteger -> SBool+isEven x = isEvenOdd x ^._1++-- | Extract the isOdd function for easier use.+isOdd :: SInteger -> SBool+isOdd x = isEvenOdd x ^._2++-- | We can prove 20 is even and definitely not odd, thusly: ----- We have:+-- >>> evenOdd2+-- Satisfiable. Model:+--   s0 =    20 :: Integer+--   s1 =  True :: Bool+--   s2 = False :: Bool+evenOdd2 :: IO SatResult+evenOdd2 = sat $ \a r1 r2 -> a .== 20 .&& r1 .== isEven a .&& r2 .== isOdd a++-------------------------------------------------------------------------+-- * Nested recursion+-------------------------------------------------------------------------++-- | Ackermann function, demonstrating nested recursion.+ack :: SInteger -> SInteger -> SInteger+ack = smtFunction "ack" $ \x y -> ite (x .== 0) (y + 1)+                                $ ite (y .== 0) (ack (x - 1) 1)+                                                (ack (x - 1) (ack x (y - 1)))++-- | We can prove constant-folding instances of the equality @ack 1 y == y + 2@: ----- >>> goodExample--- Q.E.D.+-- >>> ack1y+-- Satisfiable. Model:+--   s0 = 5 :: Integer+--   s1 = 7 :: Integer ----- In this case, the solver has the definition, and proves the predicate as expected.-goodExample :: IO ThmResult-goodExample = prove $ do-        defineSum-        let check = sumToN 5 .== 15  -- Should fail, even though 5*6/2 = 15-        pure check :: Predicate+-- Expecting the prover to handle the general case for arbitrary @y@ is beyond the current+-- scope of what SMT solvers do out-of-the-box for the time being.+ack1y :: IO SatResult+ack1y = sat $ \y r -> y .== 5 .&& r .== ack 1 y
Documentation/SBV/Examples/Misc/Enumerate.hs view
@@ -64,9 +64,8 @@ -- Satisfiable. Model: --   maxE = C :: E maxE :: IO SatResult-maxE = sat $ do mx <- sbvExists "maxE"-                e  <- sbvForall "e"-                return $ mx .>= (e::SE)+maxE = sat $ do mx :: SE <- free "maxE"+                constrain $ \(Forall e) -> mx .>= e  -- | Similarly, we get the minimum element. We have: --@@ -74,6 +73,5 @@ -- Satisfiable. Model: --   minE = A :: E minE :: IO SatResult-minE = sat $ do mx <- sbvExists "minE"-                e  <- sbvForall "e"-                return $ mx .<= (e::SE)+minE = sat $ do mn :: SE <- free "minE"+                constrain $ \(Forall e) -> mn .<= e
+ Documentation/SBV/Examples/Misc/FirstOrderLogic.hs view
@@ -0,0 +1,468 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.Misc.FirstOrderLogic+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Proves various first-order logic properties using SBV. The properties we+-- prove all come from <https://en.wikipedia.org/wiki/First-order_logic>+-----------------------------------------------------------------------------++{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE DeriveAnyClass      #-}+{-# LANGUAGE DeriveDataTypeable  #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE StandaloneDeriving  #-}+{-# LANGUAGE TemplateHaskell     #-}+{-# LANGUAGE TypeApplications    #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.Misc.FirstOrderLogic where++import Data.SBV++-- $setup+-- >>> -- For doctest purposes only, ignore.+-- >>> import Data.SBV+-- >>> :set -XDataKinds++-- | An uninterpreted sort for demo purposes, named 'U'+data U+mkUninterpretedSort ''U++-- | An uninterpreted sort for demo purposes, named 'V'+data V+mkUninterpretedSort ''V++-- | An enumerated type for demo purposes, named 'E'+data E = A | B | C+mkSymbolicEnumeration ''E++-- | Helper to turn quantified formula to a regular boolean. We+-- can think of this as quantifier elimination, hence the name 'qe'.+qe :: QuantifiedBool a => a -> SBool+qe = quantifiedBool++-- * Pushing negation over quantifiers+{- $negUniv+\(\lnot \forall x\,P(x)\Leftrightarrow \exists x\,\lnot P(x)\)++>>> let p = uninterpret "P" :: SU -> SBool+>>> prove $ sNot (qe (\(Forall x) -> p x)) .<=> qe (\(Exists x) -> sNot (p x))+Q.E.D.++\(\lnot \exists x\,P(x)\Leftrightarrow \forall x\,\lnot P(x)\)++>>> let p = uninterpret "P" :: SU -> SBool+>>> prove $ sNot (qe (\(Exists x) -> p x)) .<=> qe (\(Forall x) -> sNot (p x))+Q.E.D.+-}++-- * Interchanging quantifiers+{- $interchange+\(\forall x\,\forall y\,P(x,y)\Leftrightarrow \forall y\,\forall x\,P(x,y)\)++>>> let p = uninterpret "P" :: (SU, SV) -> SBool+>>> prove $ qe (\(Forall x) (Forall y) -> p (x, y)) .<=> qe (\(Forall y) (Forall x) -> p (x, y))+Q.E.D.++\(\exists x\,\exists y\,P(x,y)\Leftrightarrow \exists y\,\exists x\,P(x,y)\)++>>> let p = uninterpret "P" :: (SU, SV) -> SBool+>>> prove $ qe (\(Exists x) (Exists y) -> p (x, y)) .<=> qe (\(Exists y) (Exists x) -> p (x, y))+Q.E.D.+-}++-- * Merging quantifiers+{- $mergeQuants+\(\forall x\,P(x)\land \forall x\,Q(x)\Leftrightarrow \forall x\,(P(x)\land Q(x))\)++>>> let p = uninterpret "P" :: SU -> SBool+>>> let q = uninterpret "Q" :: SU -> SBool+>>> prove $ (qe (\(Forall x) -> p x) .&& qe (\(Forall x) -> q x)) .<=> qe (\(Forall x) -> p x .&& q x)+Q.E.D.++\(\exists x\,P(x)\lor \exists x\,Q(x)\Leftrightarrow \exists x\,(P(x)\lor Q(x))\)++>>> let p = uninterpret "P" :: SU -> SBool+>>> let q = uninterpret "Q" :: SU -> SBool+>>> prove $ (qe (\(Exists x) -> p x) .|| qe (\(Exists x) -> q x)) .<=> qe (\(Exists x) -> p x .|| q x)+Q.E.D.+-}++-- * Scoping over quantifiers+{- $scopeOverQuants+Provided \(x\) is not free in \(P\): \(P\land \exists x\,Q(x)\Leftrightarrow \exists x\,(P\land Q(x))\)++>>> let p = uninterpret "P" :: SBool+>>> let q = uninterpret "Q" :: SU -> SBool+>>> prove $ (p .&& qe (\(Exists x) -> q x)) .<=> qe (\(Exists x) -> p .&& q x)+Q.E.D.++Provided \(x\) is not free in \(P\): \(P\lor \forall x\,Q(x)\Leftrightarrow \forall x\,(P\lor Q(x))\)++>>> let p = uninterpret "P" :: SBool+>>> let q = uninterpret "Q" :: SU -> SBool+>>> prove $ (p .|| qe (\(Forall x) -> q x)) .<=> qe (\(Forall x) -> p .|| q x)+Q.E.D.+-}++-- * A non-identity+{- $nonIdentity+It's instructive to look at an example where the proof actually fails. Consider, for instance, an+example of a merging quantifiers like we did above, except when the equality doesn't hold. That+is, we try to prove the "correct" sounding, but incorrect conjecture:++\(\forall x\,P(x)\lor \forall x\,Q(x)\Leftrightarrow \forall x\,(P(x)\lor Q(x))\)++We have:++>>> let p = uninterpret "P" :: SU -> SBool+>>> let q = uninterpret "Q" :: SU -> SBool+>>> 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+<BLANKLINE>+  Q :: U -> Bool+  Q U!val!2 = False+  Q U!val!0 = 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+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.+Also arrange so that \(Q\) is false on these two elements, but true for everything else.++With this+assignment, the right hand side of our conjecture+is true no matter which element you pick, because either \(P\) or \(Q\) is true on any+given element. (Actually, only one will be true on any element, but that is tangential.)+But left-hand-side is not a tautology: Clearly neither \(P\) nor \(Q\) are true for all elements, and+hence both disjuncts are false. Thus, the alleged conjecture is not an equivalence in first order logic.+-}++-- * Exists unique+{- $existsUnique+We can use the 'ExistsUnique' constructor to indicate a value must exists uniquely. For instance,+we can prove that there is an element in 'E' that's less than 'C', but it's not unique. However,+there's a unique element that's less than all the elements in 'E':++>>> prove $ \(Exists       (me :: SE)) -> me .<= sC+Q.E.D.+>>> prove $ \(ExistsUnique (me :: SE)) -> me .<= sC+Falsifiable+>>> prove $ \(ExistsUnique (me :: SE)) (Forall e) -> me .<= e+Q.E.D.+-}++-- * Skolemization+{- $skolemization+Given a formula, skolemization produces an equisatisfiable formula that has no existential quantifiers. Instead,+the existentials are replaced by uninterpreted functions.+Skolemization is useful when we want to see the instantiation of nested existential variables. Interpretation for such variables will be+functions of the enclosing universals.+-}++-- | Consider the formula \(\forall x\,\exists y\, x \ge y\), over bit-vectors of size 8. We can ask SBV to satisfy it:+--+-- >>> sat skolemEx1+-- Satisfiable+--+-- But this isn't really illimunating. We can first skolemize, and then ask to satisfy:+--+-- >>> sat $ skolemize skolemEx1+-- Satisfiable. Model:+--   y :: Word8 -> Word8+--   y x = x+--+-- which is much better We are told that we can have the witness as the value given for each choice of @x@.+skolemEx1 :: Forall "x" Word8 -> Exists "y" Word8 -> SBool+skolemEx1 (Forall x) (Exists y) = x .>= y++-- | Consider the formula \(\forall a\,\exists b\,\forall c\,\exists d\, a + b >= c + d\), over bit-vectors of size 8. We can ask SBV to satisfy it:+--+-- >>> sat skolemEx2+-- Satisfiable+--+-- Again, we're left in the dark as to why this is satisfiable. Let's skolemize first, and then call 'sat' on it:+--+-- >>> sat $ skolemize skolemEx2+-- Satisfiable. Model:+--   b :: Word8 -> Word8+--   b _ = 0+-- <BLANKLINE>+--   d :: Word8 -> Word8 -> Word8+--   d a c = a + (255 * c)+--+-- Let's see what the solver said. It suggested we should use the value of @0@ for @b@, regardless of the+-- choice of @a@. (Note how @b@ is a function of one variable, i.e., of @a@)+-- And it suggested using @a + (255 * c)@ for @d@,+-- for whatever we choose for @a@ and @c@. Why does this work? Well, given+-- arbitrary @a@ and @c@, we end up with:+--+-- @+--     a + b >= c + d+--     --> substitute b = 0 and d = a + 255c as suggested by the solver+--     a + 0 >= c + a + 255c+--     a >= 256c + a+--     a >= a+-- @+--+-- showing the formula is satisfiable for whatever values you pick for @a@ and @c@. Note that @256@ is simply+-- @0@ when interpreted modulo @2^8@. Clever!+skolemEx2 :: Forall "a" Word8 -> Exists "b" Word8 -> Forall "c" Word8 -> Exists "d" Word8 -> SBool+skolemEx2 (Forall a) (Exists b) (Forall c) (Exists d) = a + b .>= c + d++-- | A common proof technique to show validity is to show that the negation is unsatisfiable. Note+-- that if you want to skolemize during this process, you should first /negate/ and then skolemize!+--+-- This example demonstrates the possible pitfall. The 'skolemEx3' function+-- encodes \(\exists x\, \forall y\, y \ge x\) for 8-bit bitvectors; which is a valid statement since+-- @x = 0@ acts as the witness. We can directly prove this in SBV:+--+-- >>> prove skolemEx3+-- Q.E.D.+--+-- Or, we can ask if the negation is unsatisfiable:+--+-- >>> sat (qNot skolemEx3)+-- Unsatisfiable+--+-- If we want, we can skolemize after the negation step:+--+-- >>> sat (skolemize (qNot skolemEx3))+-- Unsatisfiable+--+-- and get the same result. However, it would be __unsound__ to skolemize first and then negate:+--+-- >>> sat (qNot (skolemize skolemEx3))+-- Satisfiable. Model:+--   x = 1 :: Word8+--+-- And that would be the incorrect conclusion that our formula is invalid with a counter-example! You+-- can see the same by doing:+--+-- >>> prove (skolemize skolemEx3)+-- Falsifiable. Counter-example:+--   x = 1 :: Word8+--+-- So, if you want to check validity and want to also perform skolemization; you should negate your+-- formula first and then skolemize, not the other way around!+skolemEx3 :: Exists "x" Word8 -> Forall "y" Word8 -> SBool+skolemEx3 (Exists x) (Forall y) = y .>= x++-- | If you skolemize different formulas that share the same name for their existentials, then SBV will+-- get confused and will think those represent the same skolem function. This is unfortunate, but it follows+-- the requirement that uninterpreted function names should be unique. In this particular case, however, since+-- SBV creates these functions, it is harder to control the internal names. In such cases, use the function+-- 'taggedSkolemize' to provide a name to prefix the skolem functions. As demonstrated by 'skolemEx4'. We get:+--+-- >>> skolemEx4+-- Satisfiable. Model:+--   c1_y :: Integer -> Integer+--   c1_y x = x+-- <BLANKLINE>+--   c2_y :: Integer -> Integer+--   c2_y x = 1 + x+--+-- Note how the internal skolem functions are named according to the tag given. If you use regular 'skolemize'+-- this program will essentially do the wrong thing by assuming the skolem functions for both predicates are+-- the same, and will return unsat. Beware!+-- All skolem functions should be named differently in your program for your deductions to be sound.+skolemEx4 :: IO SatResult+skolemEx4 = sat cs+  where cs :: ConstraintSet+        cs = do constrain $ taggedSkolemize "c1" $ \(Forall @"x" x) (Exists @"y" y) -> x .== (y   :: SInteger)+                constrain $ taggedSkolemize "c2" $ \(Forall @"x" x) (Exists @"y" y) -> x .== (y-1 :: SInteger)++-- * Special relations++-- ** Partial orders+{- $partialOrder+A partial order is a reflexive, antisymmetic, and a transitive relation. We can prove these properties+for relations that are checked by the 'isPartialOrder' predicate in SBV:++\(\forall x\,R(x,x)\)++\(\forall x\,\forall y\, R(x, y) \land R(y, x) \Rightarrow x = y\)++\(\forall x\,\forall y\, \forall z\, R(x, y) \land R(y, z) \Rightarrow R(x, z)\)++>>> let r         = uninterpret "R" :: Relation U+>>> let isPartial = isPartialOrder "poR" r+>>> prove $ \(Forall x) -> isPartial .=> r (x, x)+Q.E.D.+>>> prove $ \(Forall x) (Forall y) -> isPartial .=> (r (x, y) .&& r (y, x) .=> x .== y)+Q.E.D.+>>> prove $ \(Forall x) (Forall y) (Forall z) -> isPartial .=> (r (x, y) .&& r (y, z) .=> r (x, z))+Q.E.D.+-}++-- | Demonstrates creating a partial order. We have:+--+-- >>> poExample+-- Q.E.D.+poExample :: IO ThmResult+poExample = prove $ do+  let r = uninterpret "R" :: Relation E+  constrain $ isPartialOrder "poR" r++  pure $ qe (\(Forall x) -> r (x, x)) :: Predicate++-- ** Linear orders+{- $linearOrder+A linear order, ensured by the predicate 'isLinearOrder', satisfies the following axioms:++\(\forall x\,R(x,x)\)++\(\forall x\,\forall y\, R(x, y) \land R(y, x) \Rightarrow x = y\)++\(\forall x\,\forall y\, \forall z\, R(x, y) \land R(y, z) \Rightarrow R(x, z)\)++\(\forall x\,\forall y\, R(x, y) \lor R(y, x)\)++>>> let r        = uninterpret "R" :: Relation U+>>> let isLinear = isLinearOrder "loR" r+>>> prove $ \(Forall x) -> isLinear .=> r (x, x)+Q.E.D.+>>> prove $ \(Forall x) (Forall y) -> isLinear .=> (r (x, y) .&& r (y, x) .=> x .== y)+Q.E.D.+>>> prove $ \(Forall x) (Forall y) (Forall z) -> isLinear .=> (r (x, y) .&& r (y, z) .=> r (x, z))+Q.E.D.+>>> prove $ \(Forall x) (Forall y) -> isLinear .=> (r (x, y) .|| r (y, x))+Q.E.D.+-}++-- ** Tree orders+{- $treeOrder+A tree order, ensured by the predicate 'isTreeOrder', satisfies the following axioms:++\(\forall x\,R(x,x)\)++\(\forall x\,\forall y\, R(x, y) \land R(y, x) \Rightarrow x = y\)++\(\forall x\,\forall y\, \forall z\, R(x, y) \land R(y, z) \Rightarrow R(x, z)\)++\(\forall x\,\forall y\,\forall z\, (R(y, x) \land R(z, z)) \Rightarrow (R (y, z) \lor R (z, y))\)++>>> let r      = uninterpret "R" :: Relation U+>>> let isTree = isTreeOrder "toR" r+>>> prove $ \(Forall x) -> isTree .=> r (x, x)+Q.E.D.+>>> prove $ \(Forall x) (Forall y) -> isTree .=> (r (x, y) .&& r (y, x) .=> x .== y)+Q.E.D.+>>> prove $ \(Forall x) (Forall y) (Forall z) -> isTree .=> (r (x, y) .&& r (y, z) .=> r (x, z))+Q.E.D.+>>> prove $ \(Forall x) (Forall y) (Forall z) -> isTree .=> ((r (y, x) .&& r (z, x)) .=> (r (y, z) .|| r (z, y)))+Q.E.D.+-}++-- ** Piecewise linear orders+{- $piecewiseLinear+A piecewise linear order, ensured by the predicate 'isPiecewiseLinearOrder', satisfies the following axioms:++\(\forall x\,R(x,x)\)++\(\forall x\,\forall y\, R(x, y) \land R(y, x) \Rightarrow x = y\)++\(\forall x\,\forall y\, \forall z\, R(x, y) \land R(y, z) \Rightarrow R(x, z)\)++\(\forall x\,\forall y\,\forall z\, (R(x, y) \land R(x, z)) \Rightarrow (R (y, z) \lor R (z, y))\)++\(\forall x\,\forall y\,\forall z\, (R(y, x) \land R(z, x)) \Rightarrow (R (y, z) \lor R (z, y))\)++>>> let r           = uninterpret "R" :: Relation U+>>> let isPiecewise = isPiecewiseLinearOrder "plR" r+>>> prove $ \(Forall x) -> isPiecewise .=> r (x, x)+Q.E.D.+>>> prove $ \(Forall x) (Forall y) -> isPiecewise .=> (r (x, y) .&& r (y, x) .=> x .== y)+Q.E.D.+>>> prove $ \(Forall x) (Forall y) (Forall z) -> isPiecewise .=> (r (x, y) .&& r (y, z) .=> r (x, z))+Q.E.D.+>>> prove $ \(Forall x) (Forall y) (Forall z) -> isPiecewise .=> ((r (x, y) .&& r (x, z)) .=> (r (y, z) .|| r (z, y)))+Q.E.D.+>>> prove $ \(Forall x) (Forall y) (Forall z) -> isPiecewise .=> ((r (y, x) .&& r (z, x)) .=> (r (y, z) .|| r (z, y)))+Q.E.D.+-}++-- ** Transitive closures+{- $transitiveClosures+The transitive closure of a relation can be created using 'mkTransitiveClosure'. Transitive closures+are not first-order axiomatizable. That is, we cannot write first-order formulas to uniquely+describe them. However, we can check some of the expected properties:++>>> let r   = uninterpret "R" :: Relation U+>>> let tcR = mkTransitiveClosure "tcR" r+>>> prove $ \(Forall x) (Forall y) -> r (x, y) .=> tcR (x, y)+Q.E.D.+>>> prove $ \(Forall x) (Forall y) (Forall z) -> r (x, y) .&& r (y, z) .=> tcR (x, z)+Q.E.D.++What's missing here is the check that if the transitive closure relates two elements, then they are+connected transitively in the original relation. This requirement is not axiomatizable in first order logic.+-}++-- | Create a transitive relation of a simple relation and show that transitive connections are respected.+-- We have:+--+-- >>> tcExample1+-- Q.E.D.+tcExample1 :: IO ThmResult+tcExample1 = prove $ do+  a :: SU <- free "a"+  b :: SU <- free "b"+  c :: SU <- free "c"++  let r   = uninterpret "R"+      tcR = mkTransitiveClosure "tcR" r++  -- Add R(a, b), R(b, c), but explicitly state ~R(a, c)+  constrain $ r (a, b)+  constrain $ r (b, c)+  constrain $ sNot $ r (a, c)++  -- Show that in tcR, a and c are connected+  pure $ tcR (a, c)++-- | Another transitive-closure example, this time we show the transitive closure is the smallest+-- relation, i.e., doesn't have extra connections. We have:+--+-- >>> tcExample2+-- Q.E.D.+tcExample2 :: IO ThmResult+tcExample2 = prove $ do+  let r   = uninterpret "r"+      tcR = mkTransitiveClosure "tcR" r++  -- Add R(A, B), ~R(A, C), ~R(B, C) then it shouldn't be the case that R(a, c)+  constrain $ r (sA, sB)+  constrain $ sNot $ r (sA, sC)+  constrain $ sNot $ r (sB, sC)++  -- Show that in tcR, a and c cannot be connected+  pure $ sNot $ tcR (sA, sC) :: Predicate++-- | Demonstrates computing the transitive closure of existing relations. We have:+--+-- >>> tcExample3+-- Q.E.D.+tcExample3 :: IO ThmResult+tcExample3 = prove $ do++        -- Define a relation over the type 'E', which only relates 'A' to 'B'.+        let rel :: Relation E+            rel xy = xy .== (sA, sB)++        -- Create a relation and its transitive closure, and associate it with our function:+        let tcR = mkTransitiveClosure "R" rel++        -- Show that in tcR, a and c cannot be connected+        pure $ sNot $ tcR (sA, sC) :: Predicate
Documentation/SBV/Examples/Misc/Floating.hs view
@@ -66,19 +66,19 @@ -- -- >>> assocPlusRegular -- Falsifiable. Counter-example:---   x =  1.5652655e23 :: Float---   y = -1.3279453e22 :: Float---   z =  1.8019954e20 :: Float+--   x =  2097149.9 :: Float+--   y =  13.999817 :: Float+--   z = -1.9998167 :: Float -- -- Indeed, we have: ----- >>> let x =  1.5652655e23 :: Float--- >>> let y = -1.3279453e22 :: Float--- >>> let z =  1.8019954e20 :: Float+-- >>> let x =  2097149.9 :: Float+-- >>> let y =  13.999817 :: Float+-- >>> let z = -1.9998167 :: Float -- >>> x + (y + z)--- 1.434273e23+-- 2097162.0 -- >>> (x + y) + z--- 1.4342729e23+-- 2097161.8 -- -- Note the difference in the results! assocPlusRegular :: IO ThmResult@@ -100,13 +100,13 @@ -- -- >>> nonZeroAddition -- Falsifiable. Counter-example:---   a =   9.072796e16 :: Float---   b = 1.7942292e-24 :: Float+--   a =   -7.441692e23 :: Float+--   b = -7.5039685e-27 :: Float -- -- Indeed, we have: ----- >>> let a =   9.072796e16 :: Float--- >>> let b = 1.7942292e-24 :: Float+-- >>> let a =   -7.441692e23 :: Float+-- >>> let b = -7.5039685e-27 :: Float -- >>> a + b == a -- True -- >>> b == 0@@ -129,11 +129,11 @@ -- -- >>> multInverse -- Falsifiable. Counter-example:---   a = -13539.329 :: Float+--   a = -5.69379e-39 :: Float -- -- Indeed, we have: ----- >>> let a = -13539.329 :: Float+-- >>> let a = -5.69379e-39 :: Float -- >>> a * (1/a) -- 0.99999994 multInverse :: IO ThmResult@@ -156,27 +156,27 @@ -- >>> roundingAdd -- Satisfiable. Model: --   rm = RoundTowardZero :: RoundingMode---   x  =    4.0564797e31 :: Float---   y  =     2.055174e25 :: Float+--   x  =  -1.0579198e-37 :: Float+--   y  =   4.7017266e-38 :: 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: ----- >>> fpAdd sRoundNearestTiesToEven 4.0564797e31 2.055174e25 :: SFPSingle--- 4.05648192e31 :: SFloatingPoint 8 24--- >>> fpAdd sRoundTowardZero 4.0564797e31 2.055174e25 :: SFPSingle--- 4.05648168e31 :: SFloatingPoint 8 24+-- >>> fpAdd sRoundTowardZero (-1.0579198e-37) (4.7017266e-38) :: SFPSingle+-- -5.87747119e-38 :: SFloatingPoint 8 24+-- >>> fpAdd sRoundNearestTiesToEven (-1.0579198e-37) (4.7017266e-38) :: SFPSingle+-- -5.87747175e-38 :: SFloatingPoint 8 24 -- -- We can see why these two results are indeed different: The 'RoundTowardZero'--- (which rounds towards zero) produces a smaller result. Indeed, if we treat these numbers+-- (which rounds towards zero) produces a larger result, closer to 0. Indeed, if we treat these numbers -- as 'Double' values, we get: ----- >>> 4.0564797e31 + 2.055174e25 :: Double--- 4.056481755174e31+-- >>> (-1.0579198e-37) + (4.7017266e-38) :: Double+-- -5.8774714e-38 ----- 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 'RoundTowardZero'. 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
@@ -0,0 +1,69 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.Misc.LambdaArray+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Demonstrates how lambda-abstractions can be used to model arrays.+-----------------------------------------------------------------------------++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.Misc.LambdaArray where++import Data.SBV++-- | 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+  where update :: SInteger -> SInteger+        update idx = let oldVal = readArray mem idx+                     in ite (lo .<= idx .&& idx .<= hi) newVal oldVal++-- | Prove a simple property: If we read from the initialized region, we get the initial value. We have:+--+-- >>> memsetExample+-- Q.E.D.+memsetExample :: IO ThmResult+memsetExample = prove $ do+   mem  <- newArray "mem" Nothing++   lo   <- sInteger "lo"+   hi   <- sInteger "hi"+   zero <- sInteger "zero"++   -- Get an index within lo/hi+   idx  <- sInteger "idx"+   constrain $ idx .>= lo .&& idx .<= hi++   -- It must be the case that we get zero back after mem-setting+   pure $ readArray (memset mem lo hi zero) idx .== zero++-- | Get an example of reading a value out of range. The value returned should be out-of-range for lo/hi+--+-- >>> outOfInit+-- Satisfiable. Model:+--   Read = 1 :: Integer+--   lo   = 0 :: Integer+--   hi   = 0 :: Integer+--   zero = 0 :: Integer+--   idx  = 1 :: Integer+outOfInit :: IO SatResult+outOfInit = sat $ do+   mem  <- newArray "mem" Nothing++   lo   <- sInteger "lo"+   hi   <- sInteger "hi"+   zero <- sInteger "zero"++   -- Get a meaningful range:+   constrain $ lo .<= hi++   -- Get an index+   idx  <- sInteger "idx"++   -- Let read produce non-zero+   constrain $ observe "Read" (readArray (memset mem lo hi zero) idx) ./= zero
Documentation/SBV/Examples/Misc/SetAlgebra.hs view
@@ -15,7 +15,6 @@ module Documentation.SBV.Examples.Misc.SetAlgebra where  import Data.SBV hiding (complement)-import Data.SBV.Set ()   -- This import shouldn't be necessary, but I can't get doctest to work otherwise. Sigh.  -- $setup -- >>> -- For doctest purposes only:@@ -27,7 +26,6 @@ type SI = SSet Integer  -- * Commutativity--- $commutativity {- $commutativity \(A\cup B=B\cup A\) @@ -41,7 +39,6 @@ -}  -- * Associativity--- $associativity {- $associativity  \((A\cup B)\cup C=A\cup (B\cup C)\)@@ -56,7 +53,6 @@ -}  -- * Distributivity--- $distributivity {- $distributivity \(A\cup (B\cap C)=(A\cup B)\cap (A\cup C)\) @@ -70,7 +66,6 @@ -}  -- * Identity properties--- $identity {- $identity  \(A\cup \varnothing = A\)@@ -85,7 +80,6 @@ -}  -- * Complement properties--- $complement {- $complement  \( A\cup A^{C}=U \)@@ -116,7 +110,6 @@  -- * Uniqueness of the complement ----- $compUnique {- $compUnique The complement of a set is the only set that satisfies the first two complement properties above. That is complementation is characterized by those two laws, as we can formally establish:@@ -128,7 +121,6 @@ -}  -- * Idempotency--- $idempotent {- $idempotent  \( A\cup A=A \)@@ -143,7 +135,6 @@ -}  -- * Domination properties--- $domination {- $domination  \( A\cup U=U \)@@ -158,7 +149,6 @@ -}  -- * Absorption properties--- $absorption {- $absorption  \( A\cup (A\cap B)=A \)@@ -173,7 +163,6 @@ -}  -- * Intersection and set difference--- $intdiff {- $intdiff  \( A\cap B=A\setminus (A\setminus B) \)@@ -183,7 +172,6 @@ -}  -- * De Morgan's laws--- $deMorgan {- $deMorgan  \( (A\cup B)^{C}=A^{C}\cap B^{C} \)@@ -198,7 +186,6 @@ -}  -- * Inclusion is a partial order--- $incPO {- $incPO Subset inclusion is a partial order, i.e., it is reflexive, antisymmetric, and transitive: @@ -219,7 +206,6 @@ -}  -- * Joins and meets--- $joinMeet {- $joinMeet  \( A\subseteq A\cup B \)@@ -250,7 +236,6 @@ -}  -- * Subset characterization--- $subsetChar {- $subsetChar There are multiple equivalent ways of characterizing the subset relationship: @@ -277,7 +262,6 @@ -}  -- * Relative complements--- $relComp {- $relComp  \( C\setminus (A\cap B)=(C\setminus A)\cup (C\setminus B) \)@@ -350,7 +334,6 @@ -}  -- * Distributing subset relation--- $distSubset {- $distSubset  A common mistake newcomers to set theory make is to distribute the subset relationship over intersection
Documentation/SBV/Examples/Optimization/ExtField.hs view
@@ -38,7 +38,7 @@ --   one-x =  oo :: Integer --   min_y = 7.0 :: Real --   min_z = 5.0 :: Real-problem :: Goal+problem :: ConstraintSet problem = do x <- sInteger "x"              y <- sReal "y"              z <- sReal "z"
Documentation/SBV/Examples/Optimization/LinearOpt.hs view
@@ -35,7 +35,7 @@ --   x1   =  47 % 9 :: Real --   x2   =  20 % 9 :: Real --   goal = 355 % 9 :: Real-problem :: Goal+problem :: ConstraintSet problem = do [x1, x2] <- mapM sReal ["x1", "x2"]               constrain $ x1 + x2 .<= 10
Documentation/SBV/Examples/Optimization/Production.hs view
@@ -50,7 +50,7 @@ --   stock =  1 :: Integer -- -- That is, we should produce 45 X's and 6 Y's, with the final maximum stock of just 1 expected!-production :: Goal+production :: ConstraintSet production = do x <- sInteger "X" -- Units of X produced                 y <- sInteger "Y" -- Units of X produced 
Documentation/SBV/Examples/Optimization/VM.hs view
@@ -48,7 +48,7 @@ --   cost        =    20 :: Integer -- -- That is, we should put all the jobs on the third server, for a total cost of 20.-allocate :: Goal+allocate :: ConstraintSet allocate = do     -- xij means VM i is running on server j     x1@[x11, x12, x13] <- sBools ["x11", "x12", "x13"]
Documentation/SBV/Examples/ProofTools/Fibonacci.hs view
@@ -74,14 +74,7 @@         setup :: Symbolic ()         setup = do constrain $ fib 0 .== 0                    constrain $ fib 1 .== 1--                   -- This is unfortunate; but SBV currently does not support-                   -- adding quantified constraints in the query mode. So we-                   -- have to write this axiom in SMT-Lib. Note also how carefully-                   -- we've chosen this axiom to work with our proof!-                   addAxiom "fib_n" [ "(assert (forall ((x Int))"-                                    , "                (= (fib (+ x 2)) (+ (fib (+ x 1)) (fib x)))))"-                                    ]+                   constrain $ \(Forall x) -> fib (x+2) .== fib (x+1) + fib x          -- Initialize variables         initial :: S SInteger -> SBool
Documentation/SBV/Examples/Puzzles/AOC_2021_24.hs view
@@ -29,6 +29,7 @@  import Prelude hiding (read, mod, div) +import Control.Monad (forM_) import Data.Maybe  import qualified Data.Map.Strict          as M@@ -169,7 +170,7 @@                      let digits = reverse inputs                       -- Each digit is between 1-9-                     ST.forM_ digits $ \d -> constrain $ d `inRange` (1, 9)+                     forM_ digits $ \d -> constrain $ d `inRange` (1, 9)                       -- Digits spell out the model number. We minimize/maximize this value as requested:                      let modelNum = foldl (\sofar d -> 10 * sofar + d) 0 digits
Documentation/SBV/Examples/Puzzles/Birthday.hs view
@@ -12,16 +12,16 @@ -- Here's the puzzle: -- -- @--- Albert and Bernard just met Cheryl. “When’s your birthday?” Albert asked Cheryl.+-- Albert and Bernard just met Cheryl. "When’s your birthday?" Albert asked Cheryl. ----- Cheryl thought a second and said, “I’m not going to tell you, but I’ll give you some clues.” She wrote down a list of 10 dates:+-- Cheryl thought a second and said, "I’m not going to tell you, but I’ll give you some clues." She wrote down a list of 10 dates: -- --   May 15, May 16, May 19 --   June 17, June 18 --   July 14, July 16 --   August 14, August 15, August 17 ----- “My birthday is one of these,” she said.+-- "My birthday is one of these," she said. -- -- Then Cheryl whispered in Albert’s ear the month — and only the month — of her birthday. To Bernard, she whispered the day, and only the day.  -- “Can you figure it out now?” she asked Albert.@@ -36,8 +36,13 @@ -- NB. Thanks to Amit Goel for suggesting the formalization strategy used in here. ----------------------------------------------------------------------------- -{-# OPTIONS_GHC -Wall -Werror -Wno-incomplete-uni-patterns #-}+{-# LANGUAGE DeriveAnyClass      #-}+{-# LANGUAGE DeriveDataTypeable  #-}+{-# LANGUAGE StandaloneDeriving  #-}+{-# LANGUAGE TemplateHaskell     #-} +{-# OPTIONS_GHC -Wall -Werror #-}+ module Documentation.SBV.Examples.Puzzles.Birthday where  import Data.SBV@@ -46,45 +51,30 @@ -- * Types and values ----------------------------------------------------------------------------------------------- --- | Represent month by 8-bit words; We can also use an uninterpreted type, but numbers work well here.-type Month = SWord8---- | Represent day by 8-bit words; Again, an uninterpreted type would work as well.-type Day = SWord8---- | Months referenced in the problem.-may, june, july, august :: SWord8-[may, june, july, august] = [5, 6, 7, 8]---------------------------------------------------------------------------------------------------- * Helper predicates------------------------------------------------------------------------------------------------+-- | Months. We only put in the months involved in the puzzle for simplicity+data Month = May | Jun | Jul | Aug --- | Check that a given month/day combo is a possible birth-date.-valid :: Month -> Day -> SBool-valid month day = (month, day) `sElem` candidates-  where candidates :: [(Month, Day)]-        candidates = [ (   may, 15), (   may, 16), (   may, 19)-                     , (  june, 17), (  june, 18)-                     , (  july, 14), (  july, 16)-                     , (august, 14), (august, 15), (august, 17)-                     ]+-- | Days. Again, only the ones mentioned in the puzzle.+data Day = D14 | D15 | D16 | D17 | D18 | D19 --- | Assert that the given function holds for one of the possible days.-existsDay :: (Day -> SBool) -> SBool-existsDay f = sAny (f . literal) [14 .. 19]+mkSymbolicEnumeration ''Month+mkSymbolicEnumeration ''Day --- | Assert that the given function holds for all of the possible days.-forallDay :: (Day -> SBool) -> SBool-forallDay f = sAll (f . literal) [14 .. 19]+-- | Represent the birthday as a record+data Birthday = BD SMonth SDay --- | Assert that the given function holds for one of the possible months.-existsMonth :: (Month -> SBool) -> SBool-existsMonth f = sAny f [may .. august]+-- | Make a valid symbolic birthday+mkBirthday :: Symbolic Birthday+mkBirthday = do b <- BD <$> free "birthMonth" <*> free "birthDay"+                constrain $ valid b+                pure b --- | Assert that the given function holds for all of the possible months.-forallMonth :: (Month -> SBool) -> SBool-forallMonth f = sAll f [may .. august]+-- | Is this a valid birthday? i.e., one that was declared by Cheryl to be a possibility.+valid :: Birthday -> SBool+valid (BD m d) =   (m .== sMay .=> d `sElem` [sD15, sD16, sD19])+               .&& (m .== sJun .=> d `sElem` [sD17, sD18])+               .&& (m .== sJul .=> d `sElem` [sD14, sD16])+               .&& (m .== sAug .=> d `sElem` [sD14, sD15, sD17])  ----------------------------------------------------------------------------------------------- -- * The puzzle@@ -99,49 +89,40 @@ -- is a unique solution. Thanks to Lee for pointing this out! In fact, it is instructive to -- assert the conversation line-by-line, and see how the search-space gets reduced in each -- step.-puzzle :: Predicate-puzzle = do birthDay   <- sbvExists "birthDay"-            birthMonth <- sbvExists "birthMonth"+puzzle :: ConstraintSet+puzzle = do BD birthMonth birthDay <- mkBirthday +            let ok    = sAll valid+                qe qb = quantifiedBool qb+             -- Albert: I do not know-            let a1 m = existsDay $ \d1 -> existsDay $ \d2 ->-                           d1 ./= d2 .&& valid m d1 .&& valid m d2+            let a1 m = qe $ \(Exists d1) (Exists d2) -> ok [BD m d1, BD m d2] .&& d1 ./= d2+            constrain $ a1 birthMonth              -- Albert: I know that Bernard doesn't know-            let a2 m = forallDay $ \d -> valid m d .=>-                          existsMonth (\m1 -> existsMonth $ \m2 ->-                                m1 ./= m2 .&& valid m1 d .&& valid m2 d)+            let a2 m = qe $ \(Forall d) -> ok [BD m d] .=> qe (\(Exists m1) (Exists m2) -> ok [BD m1 d, BD m2 d] .&& m1 ./= m2)+            constrain $ a2 birthMonth              -- Bernard: I did not know-            let b1 d = existsMonth $ \m1 -> existsMonth $ \m2 ->-                           m1 ./= m2 .&& valid m1 d .&& valid m2 d+            let b1 d = qe $ \(Exists m1) (Exists m2) -> ok [BD m1 d, BD m2 d] .&& m1 ./= m2+            constrain $ b1 birthDay              -- Bernard: But now I know-            let b2p m d = valid m d .&& a1 m .&& a2 m-                b2  d   = forallMonth $ \m1 -> forallMonth $ \m2 ->-                                (b2p m1 d .&& b2p m2 d) .=> m1 .== m2+            let b2p m d = ok [BD m d] .&& a1 m .&& a2 m+                b2  d   = qe $ \(Forall m1) (Forall m2) -> (b2p m1 d .&& b2p m2 d) .=> m1 .== m2+            constrain $ b2 birthDay              -- Albert: Now I know too-            let a3p m d = valid m d .&& a1 m .&& a2 m .&& b1 d .&& b2 d-                a3 m    = forallDay $ \d1 -> forallDay $ \d2 ->-                                (a3p m d1 .&& a3p m d2) .=> d1 .== d2--            -- Assert all the statements made:-            constrain $ a1 birthMonth-            constrain $ a2 birthMonth-            constrain $ b1 birthDay-            constrain $ b2 birthDay+            let a3p m d = ok [BD m d] .&& a1 m .&& a2 m .&& b1 d .&& b2 d+                a3  m   = \(Forall d1) (Forall d2) -> (a3p m d1 .&& a3p m d2) .=> d1 .== d2             constrain $ a3 birthMonth -            -- Find a valid birth-day that satisfies the above constraints:-            return $ valid birthMonth birthDay- -- | Find all solutions to the birthday problem. We have: -- -- >>> cheryl -- Solution #1:---   birthDay   = 16 :: Word8---   birthMonth =  7 :: Word8+--   birthMonth = Jul :: Month+--   birthDay   = D16 :: Day -- This is the only solution. cheryl :: IO () cheryl = print =<< allSat puzzle
Documentation/SBV/Examples/Puzzles/Coins.hs view
@@ -42,7 +42,7 @@ -- | Create a coin. The argument Int argument just used for naming the coin. Note that -- we constrain the value to be one of the valid U.S. coin values as we create it. mkCoin :: Int -> Symbolic Coin-mkCoin i = do c <- sbvExists $ 'c' : show i+mkCoin i = do c <- free $ 'c' : show i               constrain $ sAny (.== c) [1, 5, 10, 25, 50, 100]               return c 
Documentation/SBV/Examples/Puzzles/Counts.hs view
@@ -33,7 +33,7 @@ import Data.List (sortOn)  -- | We will assume each number can be represented by an 8-bit word, i.e., can be at most 128.-type Count  = SWord8+type Count = SWord8  -- | Given a number, increment the count array depending on the digits of the number count :: Count -> [Count] -> [Count]@@ -64,7 +64,7 @@ -- In this sentence, the number of occurrences of 0 is 1, of 1 is 7, of 2 is 3, of 3 is 2, of 4 is 1, of 5 is 1, of 6 is 1, of 7 is 2, of 8 is 1, of 9 is 1. -- Found: 2 solution(s). counts :: IO ()-counts = do res <- allSat $ puzzle `fmap` mkExistVars 10+counts = do res <- allSat $ puzzle `fmap` mkFreeVars 10             cnt <- displayModels (sortOn show) disp res             putStrLn $ "Found: " ++ show cnt ++ " solution(s)."   where disp n (_, s) = do putStrLn $ "Solution #" ++ show n
Documentation/SBV/Examples/Puzzles/Drinker.hs view
@@ -14,18 +14,6 @@ -- @ --     ∃x : P. D(x) -> ∀y : P. D(y) -- @------ In SBV, quantifiers are allowed, but you need to put the formula into prenex normal form manually. See--- <http://en.wikipedia.org/wiki/Prenex_normal_form> for details. (Note that you do not need to do skolemization--- by hand, though SBV will do that for you automatically as well as it casts the problem into an SMT query.)--- If we transform the above to prenex form, we get:------ @---     ∃x : P. ∀y : P. D(x) -> D(y)--- @------ In this file, we show two different ways of proving the above in SBV; one using the monadic style,--- and the other using the expression style. -----------------------------------------------------------------------------  {-# LANGUAGE DeriveAnyClass     #-}@@ -51,23 +39,9 @@ d :: SP -> SBool d = uninterpret "D" --- | Monadic formulation. In this style, we use the 'sbvExists' and 'sbvForall' constructs to create--- our quantified variables. We have:------ >>> drinker1--- Q.E.D.-drinker1 :: IO ThmResult-drinker1 = prove $ do x <- sbvExists "x"-                      y <- sbvForall "y"--                      pure $ d x .=> d y---- | Expression level formulation. In this style, we use the 'existential' and 'universal' functions instead.--- We have:+-- | Formulate the drinkers paradox, if some one is drinking, then everyone is! ----- >>> drinker2+-- >>> drinker -- Q.E.D.-drinker2 :: IO ThmResult-drinker2 = prove $ existential ["x"] $ \x ->-                     universal ["y"] $ \y ->-                        d x .=> d y+drinker :: IO ThmResult+drinker = prove $ \(Exists x) (Forall y) -> d x .=> d y
Documentation/SBV/Examples/Puzzles/Euler185.hs view
@@ -33,7 +33,7 @@ -- generated by zipping the alleged solution with each guess, and making sure the -- number of matching digits match what's given in the problem statement. euler185 :: Symbolic SBool-euler185 = do soln <- mkExistVars 16+euler185 = do soln <- mkFreeVars 16               return $ sAll digit soln .&& sAnd (map (genConstr soln) guesses)   where genConstr a (b, c) = sum (zipWith eq a b) .== (c :: SWord8)         digit x = (x :: SWord8) .>= 0 .&& x .<= 9
Documentation/SBV/Examples/Puzzles/Fish.hs view
@@ -76,10 +76,10 @@ -- -- It's not hard to modify this program to grab the values of all the assignments, i.e., the full -- solution to the puzzle. We leave that as an exercise to the interested reader!--- NB. We use the 'satTrackUFs' configuration to indicate that the uninterpreted function+-- NB. We use the 'allSatTrackUFs' configuration to indicate that the uninterpreted function -- changes do not matter for generating different values. All we care is that the fishOwner changes! fishOwner :: IO ()-fishOwner = do vs <- getModelValues "fishOwner" `fmap` allSatWith z3{satTrackUFs = False} puzzle+fishOwner = do vs <- getModelValues "fishOwner" `fmap` allSatWith z3{allSatTrackUFs = False} puzzle                case vs of                  [Just (v::Nationality)] -> print v                  []                      -> error "no solution"
Documentation/SBV/Examples/Puzzles/Garden.hs view
@@ -39,7 +39,6 @@ module Documentation.SBV.Examples.Puzzles.Garden where  import Data.SBV-import Data.List(isSuffixOf)  -- | Colors of the flowers data Color = Red | Yellow | Blue@@ -66,46 +65,29 @@ count c fs = sum [ite (col f .== literal c) 1 0 | f <- fs]  -- | Smullyan's puzzle.-puzzle :: Goal+puzzle :: ConstraintSet puzzle = do n <- sInteger "N"              let valid = validPick n -            -- Declare three existential flowers. We declare these with-            -- _modelIgnore suffix, because we don't care different assignments-            -- to them to be a different model. See 'isNonModelVar' below.-            ef1 <- sbvExists "ef1_modelIgnore"-            ef2 <- sbvExists "ef2_modelIgnore"-            ef3 <- sbvExists "ef3_modelIgnore"--            -- Declare three universal flowers to aid in encoding the-            -- statements made by students.-            af1 <- sbvForall "af1"-            af2 <- sbvForall "af2"-            af3 <- sbvForall "af3"-             -- Each color is represented:-            constrain $ valid ef1 ef2 ef3-            constrain $ map col [ef1, ef2, ef3] .== [sRed, sYellow, sBlue]--            -- Pick any three, at least one is Red-            constrain $ valid af1 af2 af3 .=> count Red    [af1, af2, af3] .>= 1--            -- Pick any three, at least one is Yellow-            constrain $ valid af1 af2 af3 .=> count Yellow [af1, af2, af3] .>= 1+            constrain $ \(Exists ef1) (Exists ef2) (Exists ef3) ->+               valid ef1 ef2 ef3 .&& map col [ef1, ef2, ef3] .== [sRed, sYellow, sBlue] -            -- Pick any three, at least one is Blue-            constrain $ valid af1 af2 af3 .=> count Blue   [af1, af2, af3] .>= 1+            -- Pick any three, at least one is Red, one is Yellow, one is Blue+            constrain $ \(Forall af1) (Forall af2) (Forall af3) ->+                let atLeastOne c = count c [af1, af2, af3] .>= 1+                in valid af1 af2 af3 .=> atLeastOne Red .&& atLeastOne Yellow .&& atLeastOne Blue  -- | Solve the puzzle. We have: -- -- >>> flowerCount -- Solution #1: --   N = 3 :: Integer--- This is the only solution. (Unique up to prefix existentials.)+-- This is the only solution. -- -- So, a garden with 3 flowers is the only solution. (Note that we simply skip -- over the prefix existentials and the assignments to uninterpreted function 'col' -- for model purposes here, as they don't represent a different solution.) flowerCount :: IO ()-flowerCount = print =<< allSatWith z3{satTrackUFs = False, isNonModelVar = ("_modelIgnore" `isSuffixOf`)} puzzle+flowerCount = print =<< allSatWith z3{allSatTrackUFs=False} puzzle
+ Documentation/SBV/Examples/Puzzles/KnightsAndKnaves.hs view
@@ -0,0 +1,133 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.Puzzles.KnightsAndKnaves+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- From Raymond Smullyan: On a fictional island, all inhabitants are either knights,+-- who always tell the truth, or knaves, who always lie. John and Bill are residents+-- of the island of knights and knaves. John and Bill make several utterances.+-- Determine which one is a knave or a knight, depending on their answers.+-----------------------------------------------------------------------------++{-# LANGUAGE DeriveAnyClass     #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE TemplateHaskell    #-}++module Documentation.SBV.Examples.Puzzles.KnightsAndKnaves where++import Prelude hiding (and, not)++import Data.SBV+import Data.SBV.Control++-- | Inhabitants of the island, as an uninterpreted sort+data Inhabitant+mkUninterpretedSort ''Inhabitant++-- | Each inhabitant is either a knave or a knight+data Identity = Knave | Knight+mkSymbolicEnumeration ''Identity++-- | Statements are utterances which are either true or false+data Statement = Truth | Falsity+mkSymbolicEnumeration ''Statement++-- | John is an inhabitant of the island.+john :: SInhabitant+john = uninterpret "John"++-- | Bill is an inhabitant of the island.+bill :: SInhabitant+bill = uninterpret "Bill"++-- | The connective 'is' makes a statement about an inhabitant regarding his/her identity.+is :: SInhabitant -> SIdentity -> SStatement+is = uninterpret "is"++-- | The connective 'says' makes a predicate from what an inhabitant states+says :: SInhabitant -> SStatement -> SBool+says = uninterpret "says"++-- | The connective 'holds' is will be true if the statement is true+holds :: SStatement -> SBool+holds = uninterpret "holds"++-- | The connective 'and' creates the conjunction of two statements+and :: SStatement -> SStatement -> SStatement+and = uninterpret "AND"++-- | The connective 'not' negates a statement+not :: SStatement -> SStatement+not = uninterpret "NOT"++-- | The connective 'iff' creates a statement that equates the truth values of its argument statements+iff :: SStatement -> SStatement -> SStatement+iff = uninterpret "IFF"++-- | Encode Smullyan's puzzle. We have:+--+-- >>> puzzle+-- Question 1.+--   John says, We are both knaves+--     Then, John is: Knave+--     And,  Bill is: Knight+-- Question 2.+--   John says If (and only if) Bill is a knave, then I am a knave.+--   Bill says We are of different kinds.+--     Then, John is: Knave+--     And,  Bill is: Knight+puzzle :: IO ()+puzzle = runSMT $ do++    -- truth holds, falsity doesn't+    constrain $ holds sTruth+    constrain $ sNot $ holds sFalsity++    -- Each inhabitant is either a knave or a knight+    constrain $ \(Forall x) -> holds (is x sKnave) .<+> holds (is x sKnight)++    -- If x is a knave and he says something, then that statement is false+    constrain $ \(Forall x) (Forall y) -> holds (is x sKnave)  .=> (says x y .=> sNot (holds y))++    -- If x is a knight and he says something, then that statement is true+    constrain $ \(Forall x) (Forall y) -> holds (is x sKnight) .=> (says x y .=> holds y)++    -- The meaning of conjunction: It holds whenever both statements hold+    constrain $ \(Forall x) (Forall y) -> holds (and x y) .== (holds x .&& holds y)++    -- The meaning of negation: It holds when the original doesn't+    constrain $ \(Forall x) -> holds (not x) .== sNot (holds x)++    -- The meaning of iff: both statements hold or don't hold at the same time+    constrain $ \(Forall x) (Forall y) -> holds (iff x y) .== (holds x .== holds y)++    query $ do++      -- helper to get the responses out+      let checkStatus = do cs <- checkSat+                           case cs of+                             Sat -> do jk <- getValue (holds (is john sKnight))+                                       bk <- getValue (holds (is bill sKnight))+                                       io $ putStrLn $ "    Then, John is: " ++ if jk then "Knight" else "Knave"+                                       io $ putStrLn $ "    And,  Bill is: " ++ if bk then "Knight" else "Knave"+                             _   -> error $ "Solver said: " ++ show cs++          question w q = inNewAssertionStack $ do+                io $ putStrLn w+                q >> checkStatus++      -- Question 1+      question "Question 1." $ do+         io $ putStrLn "  John says, We are both knaves"+         constrain $ says john (and (is john sKnave) (is bill sKnave))++      -- Question 2+      question "Question 2." $ do+         io $ putStrLn "  John says If (and only if) Bill is a knave, then I am a knave."+         io $ putStrLn "  Bill says We are of different kinds."+         constrain $ says john (iff (is bill sKnave) (is john sKnave))+         constrain $ says bill (not (iff (is bill sKnave) (is john sKnave)))
Documentation/SBV/Examples/Puzzles/MagicSquare.hs view
@@ -58,7 +58,7 @@ magic n  | n < 0 = putStrLn $ "n must be non-negative, received: " ++ show n  | True  = do putStrLn $ "Finding all " ++ show n ++ "-magic squares.."-              res <- allSat $ (isMagic . chunk n) `fmap` mkExistVars n2+              res <- allSat $ (isMagic . chunk n) `fmap` mkFreeVars n2               cnt <- displayModels id disp res               putStrLn $ "Found: " ++ show cnt ++ " solution(s)."    where n2 = n * n
Documentation/SBV/Examples/Puzzles/NQueens.hs view
@@ -35,7 +35,7 @@ nQueens n  | n < 0 = putStrLn $ "n must be non-negative, received: " ++ show n  | True  = do putStrLn $ "Finding all " ++ show n ++ "-queens solutions.."-              res <- allSat $ isValid n `fmap` mkExistVars n+              res <- allSat $ isValid n `fmap` mkFreeVars n               cnt <- displayModels id disp res               putStrLn $ "Found: " ++ show cnt ++ " solution(s)."    where disp i (_, s) = do putStr $ "Solution #" ++ show i ++ ": "
+ Documentation/SBV/Examples/Puzzles/Orangutans.hs view
@@ -0,0 +1,114 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.Puzzles.Orangutans+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Based on <http://github.com/goldfirere/video-resources/blob/main/2022-08-12-java/Haskell.hs>+-----------------------------------------------------------------------------++{-# LANGUAGE DeriveAnyClass      #-}+{-# LANGUAGE DeriveDataTypeable  #-}+{-# LANGUAGE DeriveGeneric       #-}+{-# LANGUAGE FlexibleContexts    #-}+{-# LANGUAGE TemplateHaskell     #-}+{-# LANGUAGE StandaloneDeriving  #-}+{-# LANGUAGE OverloadedRecordDot #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.Puzzles.Orangutans where++import Data.SBV+import GHC.Generics (Generic)++-- $setup+-- >>> -- For doctest purposes only:+-- >>> import Data.SBV++-- | Orangutans in the puzzle.+data Orangutan = Merah   | Ofallo  | Quirrel  | Shamir   deriving (Enum, Bounded)++-- | Handlers for each orangutan.+data Handler   = Dolly   | Eva     | Francine | Gracie++-- | Location for each orangutan.+data Location  = Ambalat | Basahan | Kendisi  | Tarakan++mkSymbolicEnumeration ''Orangutan+mkSymbolicEnumeration ''Handler+mkSymbolicEnumeration ''Location++-- | An assignment is solution to the puzzle+data Assignment = MkAssignment { orangutan :: SOrangutan+                               , handler   :: SHandler+                               , location  :: SLocation+                               , age       :: SInteger+                               }+                               deriving (Generic, Mergeable)++-- | Create a symbolic assignment, using symbolic fields.+mkSym :: Orangutan -> Symbolic Assignment+mkSym o = do let h = show o ++ ".handler"+                 l = show o ++ ".location"+                 a = show o ++ ".age"+             s <- MkAssignment (literal o) <$> free h <*> free l <*> free a+             constrain $ s.age `sElem` [4, 7, 10, 13]+             pure s++-- | We get:+--+-- >>> allSat puzzle+-- Solution #1:+--   Merah.handler    =   Gracie :: Handler+--   Merah.location   =  Tarakan :: Location+--   Merah.age        =       10 :: Integer+--   Ofallo.handler   =      Eva :: Handler+--   Ofallo.location  =  Kendisi :: Location+--   Ofallo.age       =       13 :: Integer+--   Quirrel.handler  =    Dolly :: Handler+--   Quirrel.location =  Basahan :: Location+--   Quirrel.age      =        4 :: Integer+--   Shamir.handler   = Francine :: Handler+--   Shamir.location  =  Ambalat :: Location+--   Shamir.age       =        7 :: Integer+-- This is the only solution.+puzzle :: ConstraintSet+puzzle = do+   solution@[_merah, ofallo, quirrel, shamir] <- mapM mkSym [minBound .. maxBound]++   let find f = foldr1 (\a1 a2 -> ite (f a1) a1 a2) solution++   -- 0. All are different in terms of handlers, locations, and ages+   constrain $ distinct (map (.handler)  solution)+   constrain $ distinct (map (.location) solution)+   constrain $ distinct (map (.age)      solution)++   -- 1. Shamir is 7 years old.+   constrain $ shamir.age .== 7++   -- 2. Shamir came from Ambalat.+   constrain $ shamir.location .== sAmbalat++   -- 3. Quirrel is younger than the ape that was found in Tarakan.+   let tarakan = find (\a -> a.location .== sTarakan)+   constrain $ quirrel.age .< tarakan.age++   -- 4. Of Ofallo and the ape that was found in Tarakan, one is cared for by Gracie and the other is 13 years old.+   let clue4 a1 a2 = a1.handler .== sGracie .&& a2.age .== 13+   constrain $ clue4 ofallo tarakan .|| clue4 tarakan ofallo+   constrain $ sOfallo ./= tarakan.orangutan++   -- 5. The animal that was found in Ambalat is either the 10-year-old or the animal Francine works with.+   let ambalat = find (\a -> a.location .== sAmbalat)+   constrain $ ambalat.age .== 10 .|| ambalat.handler .== sFrancine++   -- 6. Ofallo isn't 10 years old.+   constrain $ ofallo.age ./= 10++   -- 7. The ape that was found in Kendisi is older than the ape Dolly works with.+   let kendisi = find (\a -> a.location .== sKendisi)+   let dolly   = find (\a -> a.handler  .== sDolly)+   constrain $ kendisi.age .> dolly.age
+ Documentation/SBV/Examples/Puzzles/Rabbits.hs view
@@ -0,0 +1,66 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.Puzzles.Rabbits+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- A puzzle, attributed to Lewis Caroll:+--+--   - All rabbits, that are not greedy, are black+--   - No old rabbits are free from greediness+--   - Therefore: Some black rabbits are not old+--+-- What's implicit here is that there is a rabbit that must be not-greedy;+-- which we add to our constraints.+-----------------------------------------------------------------------------+{-# LANGUAGE DeriveAnyClass     #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE TemplateHaskell    #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.Puzzles.Rabbits where++import Data.SBV++-- | A universe of rabbits+data Rabbit++-- | Make rabbits symbolically available.+mkUninterpretedSort ''Rabbit++-- | Identify those rabbits that are greedy. Note that we leave the predicate uninterpreted.+greedy :: SRabbit -> SBool+greedy = uninterpret "greedy"++-- | Identify those rabbits that are black. Note that we leave the predicate uninterpreted.+black :: SRabbit -> SBool+black = uninterpret "black"++-- | Identify those rabbits that are old. Note that we leave the predicate uninterpreted.+old :: SRabbit -> SBool+old = uninterpret "old"++-- | Express the puzzle.+rabbits :: Predicate+rabbits = do -- All rabbits that are not greedy are black+             constrain $ \(Forall x) -> sNot (greedy x) .=> black  x++             -- No old rabbits are free from greediness+             constrain $ \(Forall x) -> old x .=> greedy x++             -- There is at least one non-greedy rabbit+             constrain $ \(Exists x) -> sNot (greedy x)++             -- Therefore, there must be a black rabbit that's not old:+             pure $ quantifiedBool $ \(Exists x) -> black x .&& sNot (old x)++-- | Prove the claim. We have:+--+-- >>> rabbitsAreOK+-- Q.E.D.+rabbitsAreOK :: IO ThmResult+rabbitsAreOK = prove rabbits
Documentation/SBV/Examples/Puzzles/Sudoku.hs view
@@ -9,246 +9,183 @@ -- The Sudoku solver, quintessential SMT solver example! ----------------------------------------------------------------------------- +{-# LANGUAGE FlexibleContexts #-}+ {-# OPTIONS_GHC -Wall -Werror #-}  module Documentation.SBV.Examples.Puzzles.Sudoku where -import Data.List  (transpose)-import Data.Maybe (fromJust)+import Control.Monad (when)+import Control.Monad.State.Lazy +import Data.List     (transpose)+ import Data.SBV+import Data.SBV.Control  ------------------------------------------------------------------- -- * Modeling Sudoku ---------------------------------------------------------------------- | A row is a sequence of 8-bit words, too large indeed for representing 1-9, but does not harm-type Row   = [SWord8]+-- | A row is a sequence of digits that we represent symbolic integers+type Row = [SInteger]  -- | A Sudoku board is a sequence of 9 rows type Board = [Row]  -- | Given a series of elements, make sure they are all different -- and they all are numbers between 1 and 9-check :: [SWord8] -> SBool+check :: [SInteger] -> SBool check grp = sAnd $ distinct grp : map rangeFine grp-  where rangeFine x = x .> 0 .&& x .<= 9+  where rangeFine x = x `inRange` (1, 9)  -- | Given a full Sudoku board, check that it is valid valid :: Board -> SBool valid rows = sAnd $ literal sizesOK : map check (rows ++ columns ++ squares)   where sizesOK = length rows == 9 && all (\r -> length r == 9) rows+         columns = transpose rows         regions = transpose [chunk 3 row | row <- rows]         squares = [concat sq | sq <- chunk 3 (concat regions)]+         chunk :: Int -> [a] -> [[a]]         chunk _ [] = []         chunk i xs = let (f, r) = splitAt i xs in f : chunk i r --- | A puzzle is a pair: First is the number of missing elements, second--- is a function that given that many elements returns the final board.-type Puzzle = (Int, [SWord8] -> Board)+-- | A puzzle is simply a list of rows. Put 0 to indicate blanks.+type Puzzle = [[Integer]]  ------------------------------------------------------------------- -- * Solving Sudoku puzzles ------------------------------------------------------------------- +-- | Fill a given board, replacing 0's with appropriate elements to solve the puzzle+fillBoard :: Puzzle -> IO Puzzle+fillBoard board = runSMT $ do+     let emptyCellCount = length $ filter (== 0) $ concat board+     subst <- mkFreeVars emptyCellCount+     constrain $ valid (fill literal subst)++     query $ do cs <- checkSat+                case cs of+                  Sat   -> do vals <- mapM getValue subst+                              pure $ fill id vals+                  Unsat -> error $ "Unsolvable puzzle!"+                  _     -> error $ "Solver said: " ++ show cs++ where fill xform = evalState (mapM (mapM replace) board)+         where replace 0 = do supply <- get+                              case supply of+                                []     -> error "Run out of supplies while filling in the board!"+                                (s:ss) -> put ss >> pure s+               replace n = pure $ xform n+ -- | Solve a given puzzle and print the results sudoku :: Puzzle -> IO ()-sudoku p@(i, f) = do putStrLn "Solving the puzzle.."-                     model <- getModelAssignment `fmap` sat ((valid . f) `fmap` mkExistVars i)-                     case model of-                       Right sln -> dispSolution p sln-                       Left m    -> putStrLn $ "Unsolvable puzzle: " ++ m---- | Helper function to display results nicely, not really needed, but helps presentation-dispSolution :: Puzzle -> (Bool, [Word8]) -> IO ()-dispSolution (i, f) (_, fs)-  | lmod /= i = error $ "Impossible! Backend solver returned " ++ show lmod ++ " values, was expecting: " ++ show i-  | True      = do putStrLn "Final board:"-                   mapM_ printRow final-                   putStrLn $ "Valid Check: " ++ show (valid final)-                   putStrLn "Done."-  where lmod = length fs-        final = f (map literal fs)-        printRow r = putStr "   " >> mapM_ (\x -> putStr (show (fromJust (unliteral x)) ++ " ")) r >> putStrLn ""+sudoku board = fillBoard board >>= displayBoard+ where displayBoard :: Puzzle -> IO ()+       displayBoard puzzle = do+            let sh       (i, r) = show r ++ if i `elem` [3, 6] then " " else ""+                printRow (i, r) = do putStrLn $ "    " ++ unwords (map sh (zip [(1::Int)..] r))+                                     when (i `elem` [3, 6]) $ putStrLn ""+            mapM_ printRow (zip [(1::Int)..] puzzle) --- | Find all solutions to a puzzle-solveAll :: Puzzle -> IO ()-solveAll p@(i, f) = do putStrLn "Finding all solutions.."-                       res <- allSat $ (valid . f) `fmap` mkExistVars i-                       cnt <- displayModels id disp res-                       putStrLn $ "Found: " ++ show cnt ++ " solution(s)."-   where disp n s = do putStrLn $ "Solution #" ++ show n-                       dispSolution p s+            let isValid = valid (map (map literal) puzzle)+            case unliteral isValid of+               Just True  -> pure ()+               Just False -> error "Invalid solution generated!"+               Nothing    -> error "Impossible happened, got a symbolic result for valid."  ------------------------------------------------------------------- -- * Example boards ------------------------------------------------------------------- --- | Find an arbitrary good board-puzzle0 :: Puzzle-puzzle0 = (81, f)-  where f   [ a1, a2, a3, a4, a5, a6, a7, a8, a9,-              b1, b2, b3, b4, b5, b6, b7, b8, b9,-              c1, c2, c3, c4, c5, c6, c7, c8, c9,-              d1, d2, d3, d4, d5, d6, d7, d8, d9,-              e1, e2, e3, e4, e5, e6, e7, e8, e9,-              f1, f2, f3, f4, f5, f6, f7, f8, f9,-              g1, g2, g3, g4, g5, g6, g7, g8, g9,-              h1, h2, h3, h4, h5, h6, h7, h8, h9,-              i1, i2, i3, i4, i5, i6, i7, i8, i9 ]-         = [ [a1, a2, a3, a4, a5, a6, a7, a8, a9],-             [b1, b2, b3, b4, b5, b6, b7, b8, b9],-             [c1, c2, c3, c4, c5, c6, c7, c8, c9],-             [d1, d2, d3, d4, d5, d6, d7, d8, d9],-             [e1, e2, e3, e4, e5, e6, e7, e8, e9],-             [f1, f2, f3, f4, f5, f6, f7, f8, f9],-             [g1, g2, g3, g4, g5, g6, g7, g8, g9],-             [h1, h2, h3, h4, h5, h6, h7, h8, h9],-             [i1, i2, i3, i4, i5, i6, i7, i8, i9] ]-        f _ = error "puzzle0 needs exactly 81 elements!"- -- | A random puzzle, found on the internet.. puzzle1 :: Puzzle-puzzle1 = (49, f)-  where f   [ a1,     a3, a4, a5, a6, a7,     a9,-              b1, b2, b3,             b7, b8, b9,-                  c2,     c4, c5, c6,     c8,-                      d3,     d5,     d7,-              e1, e2,     e4, e5, e6,     e8, e9,-                      f3,     f5,     f7,-                  g2,     g4, g5, g6,     g8,-              h1, h2, h3,             h7, h8, h9,-              i1,     i3, i4, i5, i6, i7,     i9 ]-         = [ [a1,  6, a3, a4, a5, a6, a7,  1, a9],-             [b1, b2, b3,  6,  5,  1, b7, b8, b9],-             [ 1, c2,  7, c4, c5, c6,  6, c8,  2],-             [ 6,  2, d3,  3, d5,  5, d7,  9,  4],-             [e1, e2,  3, e4, e5, e6,  2, e8, e9],-             [ 4,  8, f3,  9, f5,  7, f7,  3,  6],-             [ 9, g2,  6, g4, g5, g6,  4, g8,  8],-             [h1, h2, h3,  7,  9,  4, h7, h8, h9],-             [i1,  5, i3, i4, i5, i6, i7,  7, i9] ]-        f _ = error "puzzle1 needs exactly 49 elements!"+puzzle1 = [ [0, 6, 0,   0, 0, 0,   0, 1, 0]+          , [0, 0, 0,   6, 5, 1,   0, 0, 0]+          , [1, 0, 7,   0, 0, 0,   6, 0, 2] +          , [6, 2, 0,   3, 0, 5,   0, 9, 4]+          , [0, 0, 3,   0, 0, 0,   2, 0, 0]+          , [4, 8, 0,   9, 0, 7,   0, 3, 6]++          , [9, 0, 6,   0, 0, 0,   4, 0, 8]+          , [0, 0, 0,   7, 9, 4,   0, 0, 0]+          , [0, 5, 0,   0, 0, 0,   0, 7, 0] ]+ -- | Another random puzzle, found on the internet.. puzzle2 :: Puzzle-puzzle2 = (55, f)-  where f   [     a2,     a4, a5, a6, a7,     a9,-              b1, b2,     b4,         b7, b8, b9,-              c1,     c3, c4, c5, c6, c7, c8, c9,-                  d2, d3, d4,             d8, d9,-              e1,     e3,     e5,     e7,     e9,-              f1, f2,             f6, f7, f8,-              g1, g2, g3, g4, g5, g6, g7,     g9,-              h1, h2, h3,         h6,     h8, h9,-              i1,     i3, i4, i5, i6,     i8     ]-         = [ [ 1, a2,  3, a4, a5, a6, a7,  8, a9],-             [b1, b2,  6, b4,  4,  8, b7, b8, b9],-             [c1,  4, c3, c4, c5, c6, c7, c8, c9],-             [ 2, d2, d3, d4,  9,  6,  1, d8, d9],-             [e1,  9, e3,  8, e5,  1, e7,  4, e9],-             [f1, f2,  4,  3,  2, f6, f7, f8,  8],-             [g1, g2, g3, g4, g5, g6, g7,  7, g9],-             [h1, h2, h3,  1,  5, h6,  4, h8, h9],-             [i1,  6, i3, i4, i5, i6,  2, i8,  3] ]-        f _ = error "puzzle2 needs exactly 55 elements!"+puzzle2 = [ [1, 0, 3,   0, 0, 0,   0, 8, 0]+          , [0, 0, 6,   0, 4, 8,   0, 0, 0]+          , [0, 4, 0,   0, 0, 0,   0, 0, 0] +          , [2, 0, 0,   0, 9, 6,   1, 0, 0]+          , [0, 9, 0,   8, 0, 1,   0, 4, 0]+          , [0, 0, 4,   3, 2, 0,   0, 0, 8]++          , [0, 0, 0,   0, 0, 0,   0, 7, 0]+          , [0, 0, 0,   1, 5, 0,   4, 0, 0]+          , [0, 6, 0,   0, 0, 0,   2, 0, 3] ]+ -- | Another random puzzle, found on the internet.. puzzle3 :: Puzzle-puzzle3 = (56, f)-  where f   [     a2, a3, a4,     a6,     a8, a9,-                  b2,     b4, b5, b6, b7, b8, b9,-              c1, c2, c3, c4,     c6, c7,     c9,-              d1,     d3,     d5,     d7,     d9,-                  e2, e3, e4,     e6, e7, e8,-              f1,     f3,     f5,     f7,     f9,-              g1,     g3, g4,     g6, g7, g8, g9,-              h1, h2, h3, h4, h5, h6,     h8,-              i1, i2,     i4,     i6, i7, i8     ]-         = [ [ 6, a2, a3, a4,  1, a6,  5, a8, a9],-             [ 8, b2,  3, b4, b5, b6, b7, b8, b9],-             [c1, c2, c3, c4,  6, c6, c7,  2, c9],-             [d1,  3, d3,  1, d5,  8, d7,  9, d9],-             [ 1, e2, e3, e4,  9, e6, e7, e8,  4],-             [f1,  5, f3,  2, f5,  3, f7,  1, f9],-             [g1,  7, g3, g4,  3, g6, g7, g8, g9],-             [h1, h2, h3, h4, h5, h6,  3, h8,  6],-             [i1, i2,  4, i4,  5, i6, i7, i8,  9] ]-        f _ = error "puzzle3 needs exactly 56 elements!"+puzzle3 = [ [6, 0, 0,   0, 1, 0,   5, 0, 0]+          , [8, 0, 3,   0, 0, 0,   0, 0, 0]+          , [0, 0, 0,   0, 6, 0,   0, 2, 0] +          , [0, 3, 0,   1, 0, 8,   0, 9, 0]+          , [1, 0, 0,   0, 9, 0,   0, 0, 4]+          , [0, 5, 0,   2, 0, 3,   0, 1, 0]++          , [0, 7, 0,   0, 3, 0,   0, 0, 0]+          , [0, 0, 0,   0, 0, 0,   3, 0, 6]+          , [0, 0, 4,   0, 5, 0,   0, 0, 9] ]+ -- | According to the web, this is the toughest  -- sudoku puzzle ever.. It even has a name: Al Escargot: -- <http://zonkedyak.blogspot.com/2006/11/worlds-hardest-sudoku-puzzle-al.html> puzzle4 :: Puzzle-puzzle4 = (58, f)-  where f   [     a2, a3, a4, a5,     a7,     a9,-              b1,     b3, b4,     b6, b7, b8,-              c1, c2,         c5, c6,     c8, c9,-              d1, d2,         d5, d6,     d8, d9,-              e1,     e3, e4,     e6, e7, e8,-                  f2, f3, f4, f5,     f7, f8, f9,-                  g2, g3, g4, g5, g6, g7,     g9,-              h1,     h3, h4, h5, h6, h7, h8,-              i1, i2,     i4, i5, i6,     i8, i9 ]-         = [ [ 1, a2, a3, a4, a5,  7, a7,  9, a9],-             [b1,  3, b3, b4,  2, b6, b7, b8,  8],-             [c1, c2,  9,  6, c5, c6,  5, c8, c9],-             [d1, d2,  5,  3, d5, d6,  9, d8, d9],-             [e1,  1, e3, e4,  8, e6, e7, e8,  2],-             [ 6, f2, f3, f4, f5,  4, f7, f8, f9],-             [ 3, g2, g3, g4, g5, g6, g7,  1, g9],-             [h1,  4, h3, h4, h5, h6, h7, h8,  7],-             [i1, i2,  7, i4, i5, i6,  3, i8, i9] ]-        f _ = error "puzzle4 needs exactly 58 elements!"+puzzle4 = [ [1, 0, 0,   0, 0, 7,   0, 9, 0]+          , [0, 3, 0,   0, 2, 0,   0, 0, 8]+          , [0, 0, 9,   6, 0, 0,   5, 0, 0] +          , [0, 0, 5,   3, 0, 0,   9, 0, 0]+          , [0, 1, 0,   0, 8, 0,   0, 0, 2]+          , [6, 0, 0,   0, 0, 4,   0, 0, 0]++          , [3, 0, 0,   0, 0, 0,   0, 1, 0]+          , [0, 4, 0,   0, 0, 0,   0, 0, 7]+          , [0, 0, 7,   0, 0, 0,   3, 0, 0] ]+ -- | This one has been called diabolical, apparently puzzle5 :: Puzzle-puzzle5 = (53, f)-  where f   [ a1,     a3,     a5, a6,         a9,-              b1,         b4, b5,     b7,     b9,-                  c2,     c4, c5, c6, c7, c8, c9,-              d1, d2,     d4,     d6, d7, d8,-              e1, e2, e3,     e5,     e7, e8, e9,-                  f2, f3, f4,     f6,     f8, f9,-              g1, g2, g3, g4, g5, g6,     g8,-              h1,     h3,     h5, h6,         h9,-              i1,         i4, i5,     i7,     i9 ]-         = [ [a1,  9, a3,  7, a5, a6,  8,  6, a9],-             [b1,  3,  1, b4, b5,  5, b7,  2, b9],-             [ 8, c2,  6, c4, c5, c6, c7, c8, c9],-             [d1, d2,  7, d4,  5, d6, d7, d8,  6],-             [e1, e2, e3,  3, e5,  7, e7, e8, e9],-             [ 5, f2, f3, f4,  1, f6,  7, f8, f9],-             [g1, g2, g3, g4, g5, g6,  1, g8,  9],-             [h1,  2, h3,  6, h5, h6,  3,  5, h9],-             [i1,  5,  4, i4, i5,  8, i7,  7, i9] ]-        f _ = error "puzzle5 needs exactly 53 elements!"+puzzle5 = [ [ 0, 9, 0,   7, 0, 0,   8, 6, 0]+          , [ 0, 3, 1,   0, 0, 5,   0, 2, 0]+          , [ 8, 0, 6,   0, 0, 0,   0, 0, 0] +          , [ 0, 0, 7,   0, 5, 0,   0, 0, 6]+          , [ 0, 0, 0,   3, 0, 7,   0, 0, 0]+          , [ 5, 0, 0,   0, 1, 0,   7, 0, 0]++          , [ 0, 0, 0,   0, 0, 0,   1, 0, 9]+          , [ 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> puzzle6 :: Puzzle-puzzle6 = (64, f)-  where f   [ a1, a2, a3, a4,     a6, a7,     a9,-              b1,     b3, b4, b5, b6, b7, b8, b9,-              c1, c2,     c4, c5, c6, c7, c8, c9,-              d1,     d3, d4, d5, d6,     d8,-                  e2, e3, e4,     e6, e7, e8, e9,-              f1, f2, f3, f4, f5, f6,     f8, f9,-              g1, g2,         g5,     g7, g8, g9,-                  h2, h3,     h5, h6,     h8, h9,-              i1, i2, i3, i4, i5, i6, i7,     i9  ]-         = [ [a1, a2, a3, a4,  6, a6, a7,  8, a9],-             [b1,  2, b3, b4, b5, b6, b7, b8, b9],-             [c1, c2,  1, c4, c5, c6, c7, c8, c9],-             [d1,  7, d3, d4, d5, d6,  1, d8,  2],-             [ 5, e2, e3, e4,  3, e6, e7, e8, e9],-             [f1, f2, f3, f4, f5, f6,  4, f8, f9],-             [g1, g2,  4,  2, g5,  1, g7, g8, g9],-             [ 3, h2, h3,  7, h5, h6,  6, h8, h9],-             [i1, i2, i3, i4, i5, i6, i7,  5, i9] ]-        f _ = error "puzzle6 needs exactly 64 elements!"+puzzle6 = [ [0, 0, 0,   0, 6, 0,   0, 8, 0]+          , [0, 2, 0,   0, 0, 0,   0, 0, 0]+          , [0, 0, 1,   0, 0, 0,   0, 0, 0] +          , [0, 7, 0,   0, 0, 0,   1, 0, 2]+          , [5, 0, 0,   0, 3, 0,   0, 0, 0]+          , [0, 0, 0,   0, 0, 0,   4, 0, 0]++          , [0, 0, 4,   2, 0, 1,   0, 0, 0]+          , [3, 0, 0,   7, 0, 0,   6, 0, 0]+          , [0, 0, 0,   0, 0, 0,   0, 5, 0] ]+ -- | Solve them all, this takes a fraction of a second to run for each case allPuzzles :: IO ()-allPuzzles = mapM_ sudoku [puzzle0, puzzle1, puzzle2, puzzle3, puzzle4, puzzle5, puzzle6]+allPuzzles = mapM_ sudoku [puzzle1, puzzle2, puzzle3, puzzle4, puzzle5, puzzle6]
Documentation/SBV/Examples/Puzzles/U2Bridge.hs view
@@ -209,9 +209,9 @@ -- | See if there is a solution that has precisely @n@ steps solveN :: Int -> IO Bool solveN n = do putStrLn $ "Checking for solutions with " ++ show n ++ " move" ++ plu n ++ "."-              let genAct = do b  <- sbvExists_-                              p1 <- sbvExists_-                              p2 <- sbvExists_+              let genAct = do b  <- free_+                              p1 <- free_+                              p2 <- free_                               return (b, p1, p2)               res <- allSat $ isValid `fmap` mapM (const genAct) [1..n]               cnt <- displayModels (sortOn show) disp res
+ Documentation/SBV/Examples/Queries/Abducts.hs view
@@ -0,0 +1,50 @@+-----------------------------------------------------------------------------+-- |+-- Module    : Documentation.SBV.Examples.Queries.Abducts+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Demonstrates extraction of abducts via queries.+--+-- N.B. Interpolants are only supported by CVC5 currently.+-----------------------------------------------------------------------------++{-# OPTIONS_GHC -Wall -Werror #-}++module Documentation.SBV.Examples.Queries.Abducts where++import Data.SBV+import Data.SBV.Control++-- | Abduct extraction example. We have the constraint @x >= 0@+-- and we want to make @x + y >= 2@. We have:+--+-- >>> example+-- Got: (define-fun abd () Bool (= s1 2))+-- Got: (define-fun abd () Bool (<= 2 s1))+-- Got: (define-fun abd () Bool (= (+ s1 s0) 2))+-- Got: (define-fun abd () Bool (= (+ s0 2) s1))+--+-- Note that @s0@ refers to @x@ and @s1@ refers to @y@ above. You can verify+-- that adding any of these will ensure @x + y >= 2@.+example :: IO ()+example = runSMTWith cvc5 $ do++       setOption $ ProduceAbducts True++       x <- sInteger "x"+       y <- sInteger "y"++       constrain $ x .>= 0++       query $ do abd <- getAbduct Nothing "abd" $ x + y .>= 2+                  io $ putStrLn $ "Got: " ++ abd++                  let next = getAbductNext >>= io . putStrLn . ("Got: " ++)++                  -- Get and display a couple of abducts+                  next+                  next+                  next
Documentation/SBV/Examples/Queries/Concurrency.hs view
@@ -11,10 +11,10 @@ -- to perform push's and pop's. However performing a push and a pop is still -- single threaded and so each solution will need to wait for the previous -- solution to be found. In this example we show a class of functions--- 'Data.SBV.satConcurrentAll' and 'Data.SBV.satConcurrentAny' which spin up+-- 'Data.SBV.satConcurrentWithAll' and 'Data.SBV.satConcurrentWithAny' which spin up -- independent solver instances and runs query computations concurrently. The -- children query computations are allowed to communicate with one another as--- demonstrated in the second demo+-- demonstrated in the second demo. -----------------------------------------------------------------------------  {-# OPTIONS_GHC -Wall -Werror #-}
Documentation/SBV/Examples/Queries/GuessNumber.hs view
@@ -73,7 +73,7 @@ -- Current bounds: (41,1000) -- Current bounds: (42,1000) -- Solved in: 8 guesses:---   0 21 31 36 39 40 41 42+--   8 21 31 36 39 40 41 42 play :: IO () play = do gs <- runSMT (guess 42)           putStrLn $ "Solved in: " ++ show (length gs) ++ " guesses:"
Documentation/SBV/Examples/Strings/SQLInjection.hs view
@@ -48,7 +48,7 @@ eval :: SQLExpr -> M SString eval (Query q)         = do q' <- eval q                             tell [q']-                            lift $ lift sbvExists_+                            lift $ lift free_ eval (Const str)       = return $ literal str eval (Concat e1 e2)    = (++) <$> eval e1 <*> eval e2 eval (ReadVar nm)      = do n   <- eval nm
Documentation/SBV/Examples/Uninterpreted/Deduce.hs view
@@ -54,31 +54,6 @@ not = uninterpret "NOT"  -------------------------------------------------------------------------------- * Axioms of the logical system---------------------------------------------------------------------------------- | Distributivity of OR over AND, as an axiom in terms of--- the uninterpreted functions we have introduced. Note how--- variables range over the uninterpreted sort 'B'.-ax1 :: [String]-ax1 = [ "(assert (forall ((p B) (q B) (r B))"-      , "   (= (AND (OR p q) (OR p r))"-      , "      (OR p (AND q r)))))"-      ]---- | One of De Morgan's laws, again as an axiom in terms--- of our uninterpeted logical connectives.-ax2 :: [String]-ax2 = [ "(assert (forall ((p B) (q B))"-      , "   (= (NOT (OR p q))"-      , "      (AND (NOT p) (NOT q)))))"-      ]---- | Double negation axiom, similar to the above.-ax3 :: [String]-ax3 = ["(assert (forall ((p B)) (= (NOT (NOT p)) p)))"]------------------------------------------------------------------------------- -- * Demonstrated deduction ----------------------------------------------------------------------------- @@ -88,9 +63,9 @@ -- >>> test -- Q.E.D. test :: IO ThmResult-test = prove $ do addAxiom "OR distributes over AND" ax1-                  addAxiom "de Morgan"               ax2-                  addAxiom "double negation"         ax3+test = prove $ do constrain $ \(Forall p) (Forall q) (Forall r) -> (p `or` q) `and` (p `or` r) .== p `or` (q `and` r)+                  constrain $ \(Forall p) (Forall q)            -> not (p `or` q) .== not p `and` not q+                  constrain $ \(Forall p)                       -> not (not p) .== p                   p <- free "p"                   q <- free "q"                   r <- free "r"
Documentation/SBV/Examples/Uninterpreted/Multiply.hs view
@@ -47,11 +47,11 @@ -- >>> sat synthMul22 -- Satisfiable. Model: --   mul22_hi :: Bool -> Bool -> Bool -> Bool -> Bool---   mul22_hi False True  True  True  = True---   mul22_hi True  True  False True  = True --   mul22_hi True  False False True  = True---   mul22_hi False True  True  False = True+--   mul22_hi True  True  False True  = True+--   mul22_hi False True  True  True  = True --   mul22_hi True  False True  True  = True+--   mul22_hi False True  True  False = True --   mul22_hi True  True  True  False = True --   mul22_hi _     _     _     _     = False -- <BLANKLINE>@@ -67,12 +67,12 @@ -- -- >>> :{ -- mul22_hi :: (SBool, SBool, SBool, SBool) -> SBool--- mul22_hi params = params `sElem` [ (sFalse, sTrue , sTrue , sTrue )---                                  , (sTrue , sTrue , sFalse, sTrue )---                                  , (sTrue , sFalse, sFalse, sTrue )---                                  , (sFalse, sTrue , sTrue , sFalse)---                                  , (sTrue , sFalse, sTrue , sTrue )---                                  , (sTrue , sTrue , sTrue , sFalse)+-- mul22_hi params = params `sElem` [ (sTrue,  sFalse, sFalse, sTrue)+--                                  , (sTrue,  sTrue,  sFalse, sTrue)+--                                  , (sFalse, sTrue,  sTrue,  sTrue)+--                                  , (sTrue,  sFalse, sTrue,  sTrue)+--                                  , (sFalse, sTrue,  sTrue,  sFalse)+--                                  , (sTrue,  sTrue,  sTrue,  sFalse) --                                  ] -- :} --@@ -82,11 +82,7 @@ -- Q.E.D. -- -- and rest assured that we have a correctly synthesized circuit!-synthMul22 :: Goal-synthMul22 = do a :: SWord8 <- sbvForall "a"-                b :: SWord8 <- sbvForall "b"--                let lsb2 x = let [x1, x0] = reverse $ take 2 $ blastLE x-                             in (x1, x0)--                constrain $ mul22 (lsb2 a) (lsb2 b) .== lsb2 (a * b)+synthMul22 :: ConstraintSet+synthMul22 = constrain $ \(Forall (a :: SWord8)) (Forall b) -> mul22 (lsb2 a) (lsb2 b) .== lsb2 (a * b)+  where lsb2 x = let [x1, x0] = reverse $ take 2 $ blastLE x+                 in (x1, x0)
Documentation/SBV/Examples/Uninterpreted/Shannon.hs view
@@ -14,7 +14,7 @@  module Documentation.SBV.Examples.Uninterpreted.Shannon where -import Data.SBV hiding (universal, existential)+import Data.SBV  ----------------------------------------------------------------------------- -- * Boolean functions
Documentation/SBV/Examples/Uninterpreted/Sort.hs view
@@ -55,5 +55,5 @@ -- Unsatisfiable t2 :: IO SatResult t2 = sat $ do x <- free "x"-              addAxiom "Q" ["(assert (forall ((x Q) (y Q)) (= x y)))"]+              constrain $ \(Forall a) (Forall b) -> a .== (b :: SQ)               return $ f x ./= x
Documentation/SBV/Examples/WeakestPreconditions/Fib.hs view
@@ -113,18 +113,11 @@                    --                    -- As otherwise they would be concretely evaluated and                    -- would not be sent to the SMT solver!-                    x <- sInteger_                    constrain $ x .== 0 .=> fib x .== 0                    constrain $ x .== 1 .=> fib x .== 1 -                   -- The inductive case. Unfortunately; SBV does not support-                   -- adding quantified constraints in the query mode. So we-                   -- have to write this axiom directly in SMT-Lib. Note also how-                   -- carefully we've chosen this axiom to work with our proof!-                   addAxiom "fib_n" [ "(assert (forall ((x Int))"-                                    , "                (= (fib (+ x 2)) (+ (fib (+ x 1)) (fib x)))))"-                                    ]+                   constrain $ \(Forall n) -> fib (n+2) .== fib (n+1) + fib n  -- | Precondition for our program: @n@ must be non-negative. pre :: F -> SBool
Documentation/SBV/Examples/WeakestPreconditions/GCD.hs view
@@ -121,28 +121,9 @@ -- | Constraints and axioms we need to state explicitly to tell -- the SMT solver about our specification for GCD. axiomatizeGCD :: Symbolic ()-axiomatizeGCD = do -- Base case. Strictly speaking, we don't really need this case-                   -- here, but it declares the presence of gcd as an uninterpreted-                   -- function to SBV so it gets registered as such.-                   x <- sInteger_-                   constrain $ gcd x x .== x--                   -- Unfortunately; SBV does not support adding quantified constraints-                   -- in the query mode. So we have to write this axiom directly in SMT-Lib.-                   -- Note also how carefully we've chosen these axioms to work with our proof!-                   -- Actually proving these is beyond the scope of our WP proof, but obviously-                   -- should be done in some other system. (Note that SMT solvers will have hard-                   -- time with the definition of GCD in general as the axiomatization requires-                   -- quantification and definition requires recursion.)-                   addAxiom "gcd_equal"    [ "(assert (forall ((x Int))"-                                           , "                (=> (> x 0) (= (gcd x x) x))))"-                                           ]-                   addAxiom "gcd_unequal1" [ "(assert (forall ((x Int) (y Int))"-                                           , "                (=> (and (> x 0) (> y 0)) (= (gcd (+ x y) y) (gcd x y)))))"-                                           ]-                   addAxiom "gcd_unequal2" [ "(assert (forall ((x Int) (y Int))"-                                           , "                (=> (and (> x 0) (> y 0)) (= (gcd x (+ y x)) (gcd x y)))))"-                                           ]+axiomatizeGCD = do constrain $ \(Forall x)            -> x .> 0            .=> gcd x x     .== x+                   constrain $ \(Forall x) (Forall y) -> x .> 0 .&& y .> 0 .=> gcd (x+y) y .== gcd x y+                   constrain $ \(Forall x) (Forall y) -> x .> 0 .&& y .> 0 .=> gcd x (y+x) .== gcd x y  -- | Precondition for our program: @x@ and @y@ must be strictly positive pre :: G -> SBool
Documentation/SBV/Examples/WeakestPreconditions/Sum.hs view
@@ -217,12 +217,12 @@ The termination measure must always be non-negative:  >>> let invariant SumS{n, i, s} = s .== (i*(i+1)) `sDiv` 2 .&& i .<= n->>> let measure   SumS{n, i}    = [- i]+>>> let measure   SumS{n, i}    = [1-i] >>> void $ correctness invariant (Just measure) Following proof obligation failed: ==================================   Measure for loop "i < n" is negative:-    State  : SumS {n = 2, i = 1, s = 1}+    State  : SumS {n = 3, i = 2, s = 3}     Measure: -1  The failure is pretty obvious in this case: Measure produces a negative value.
SBVBenchSuite/BenchSuite/Bench/Bench.hs view
@@ -44,7 +44,7 @@  -- | The type of the problem to benchmark. This allows us to operate on Runners -- as values themselves yet still have a unified interface with gauge.-data Problem = forall a . U.Provable a => Problem a+data Problem = forall a . (U.Provable a, U.Satisfiable a) => Problem a  -- | Similarly to Problem, BenchResult is boilerplate for a nice api data BenchResult = forall a . (Show a, NFData a) => BenchResult a@@ -80,14 +80,14 @@  -- | Set the runner function runner :: (Show c, NFData c) =>-  (forall a. U.Provable a => U.SMTConfig -> a -> IO c) -> Runner -> Runner+  (forall a. (U.Provable a, U.Satisfiable a) => U.SMTConfig -> a -> IO c) -> Runner -> Runner runner r' (Runner r@RunnerI{}) = Runner $ r{runI = toRun r'} runner r' (RunnerGroup rs)     = RunnerGroup $ runner r' <$> rs runner _  x                    = x {-# INLINE runner #-}  toRun :: (Show c, NFData c) =>-  (forall a. U.Provable a => U.SMTConfig -> a -> IO c)+  (forall a. (U.Provable a, U.Satisfiable a) => U.SMTConfig -> a -> IO c)   -> U.SMTConfig   -> Problem   -> IO BenchResult@@ -133,7 +133,7 @@ -- | This is just a wrapper around the RunnerI constructor and serves as the main -- entry point to make a runner for a user in case they need something custom. run' :: (NFData b, Show b) =>-  (forall a. U.Provable a => U.SMTConfig -> a -> IO b)+  (forall a. (U.Provable a, U.Satisfiable a) => U.SMTConfig -> a -> IO b)   -> U.SMTConfig   -> String   -> Problem@@ -143,14 +143,14 @@ {-# INLINE run' #-}  -- | Convenience function for creating benchmarks that exposes a configuration-runWith :: U.Provable a => U.SMTConfig -> String -> a -> Runner+runWith :: (U.Provable a, U.Satisfiable a) => U.SMTConfig -> String -> a -> Runner runWith c d p = run' U.satWith c d (Problem p) {-# INLINE runWith #-}  -- | Main entry point for simple benchmarks. See 'mkRunner'' or 'mkRunnerWith' -- for versions of this function that allows custom inputs. If you have some use -- case that is not considered then you can simply overload the record fields.-run :: U.Provable a => String -> a -> Runner+run :: (U.Provable a, U.Satisfiable a) => String -> a -> Runner run d p = runWith U.z3 d p `using` runner U.satWith {-# INLINE run #-} @@ -180,8 +180,8 @@  -- | Orphaned instances just for benchmarking instance NFData U.AllSatResult where-  rnf (U.AllSatResult a b c d results) =-    rnf a `seq` rnf b `seq` rnf c `seq` rnf d `seq` rwhnf results+  rnf (U.AllSatResult a b c results) =+    rnf a `seq` rnf b `seq` rnf c `seq` rwhnf results  -- | Unwrap the existential type to make gauge happy instance NFData BenchResult where rnf (BenchResult a) = rnf a
SBVBenchSuite/BenchSuite/BitPrecise/MultMask.hs view
@@ -23,9 +23,9 @@ benchmarks = rGroup   [ B.runWith conf "MultMask" find   ]-  where find = do mask <- sbvExists "mask"-                  mult <- sbvExists "mult"-                  inp  <- sbvForall "inp"-                  let res = (mask .&. inp) * (mult :: SWord64)-                  solve [inp `sExtractBits` [7, 15 .. 63] .== res `sExtractBits` [56 .. 63]]+  where find = do mask <- free "mask"+                  mult <- free "mult"+                  constrain $ \(Forall inp) ->+                        let res = (mask .&. inp) * (mult :: SWord64)+                        in inp `sExtractBits` [7, 15 .. 63] .== res `sExtractBits` [56 .. 63]         conf = z3{printBase=16, satCmd = "(check-sat-using (and-then simplify smtfd))"}
SBVBenchSuite/BenchSuite/Existentials/CRCPolynomial.hs view
@@ -20,4 +20,4 @@  -- benchmark suite benchmarks :: Runner-benchmarks =  runIO "FindPolynomials" findHD4Polynomials+benchmarks =  runIO "FindPolynomials" (findHD4Polynomials 5)
SBVBenchSuite/BenchSuite/Misc/Enumerate.hs view
@@ -31,9 +31,7 @@              ]   where _elts = \(x::SE) -> x .== x         _four = \a b c (d::SE) -> distinct [a, b, c, d]-        _maxE = do mx <- sbvExists "maxE"-                   e  <- sbvForall "e"-                   return $ mx .>= (e::SE)-        _minE = do mx <- sbvExists "minE"-                   e  <- sbvForall "e"-                   return $ mx .<= (e::SE)+        _maxE = do mx <- free "maxE"+                   constrain $ \(Forall e) -> mx .>= (e::SE)+        _minE = do mx <- free "minE"+                   constrain $ \(Forall e) -> mx .<= (e::SE)
SBVBenchSuite/BenchSuite/Puzzles/Counts.hs view
@@ -23,5 +23,4 @@ -- benchmark suite benchmarks :: Runner benchmarks = rGroup [ S.run "Counts" countPgm ]- where countPgm = puzzle `fmap` mkExistVars 10-       -- puzzle' d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 = puzzle [d0, d1, d2, d3, d4, d5, d6, d7, d8, d9]+ where countPgm = puzzle `fmap` mkFreeVars 10
SBVBenchSuite/BenchSuite/Puzzles/Garden.hs view
@@ -26,4 +26,4 @@ -- benchmark suite benchmarks :: Runner benchmarks = rGroup [ S.runWith s "Garden" puzzle `using` runner allSatWith ]-  where s = z3{satTrackUFs = False, isNonModelVar = ("_modelIgnore" `isSuffixOf`)}+  where s = z3{allSatTrackUFs = False, isNonModelVar = ("_modelIgnore" `isSuffixOf`)}
SBVBenchSuite/BenchSuite/Puzzles/MagicSquare.hs view
@@ -28,4 +28,4 @@   ]  mkMagic :: Int -> Symbolic SBool-mkMagic n = (isMagic . chunk n) `fmap` mkExistVars (n*n)+mkMagic n = (isMagic . chunk n) `fmap` mkFreeVars (n*n)
SBVBenchSuite/BenchSuite/Puzzles/NQueens.hs view
@@ -34,4 +34,4 @@   ]  mkQueens :: Int -> Symbolic SBool-mkQueens n = isValid n `fmap` mkExistVars n+mkQueens n = isValid n `fmap` mkFreeVars n
SBVBenchSuite/BenchSuite/Puzzles/Sudoku.hs view
@@ -19,16 +19,17 @@ import Utils.SBVBenchFramework import BenchSuite.Bench.Bench as S +import Data.Maybe (fromMaybe) + -- benchmark suite benchmarks :: Runner benchmarks = rGroup-    [ S.run ("sudoku " ++ show n) (checkPuzzle s) `using` runner satWith-       | (n, s) <--           zip-             [(0::Int)..]-             [puzzle0, puzzle1, puzzle2, puzzle3, puzzle4, puzzle5, puzzle6] ]+    [ runIO ("sudoku" ++ show n) (checkPuzzle s)+    | (n, s) <- zip [(0::Int)..] [puzzle1, puzzle2, puzzle3, puzzle4, puzzle5, puzzle6] ]  -checkPuzzle :: Puzzle -> Symbolic SBool-checkPuzzle (i, f) = (valid . f) `fmap` mkExistVars i+checkPuzzle :: Puzzle -> IO Bool+checkPuzzle p = do final <- fillBoard p+                   let vld = valid (map (map literal) final)+                   pure $ fromMaybe False (unliteral vld)
SBVBenchSuite/BenchSuite/Puzzles/U2Bridge.hs view
@@ -30,5 +30,5 @@   , S.run "U2Bridge_cnt6" (count 6) `using` runner satWith   ]   where-    act     = do b <- sbvExists_; p1 <- sbvExists_; p2 <- sbvExists_; return (b, p1, p2)+    act     = do b <- free_; p1 <- free_; p2 <- free_; return (b, p1, p2)     count n = isValid `fmap` mapM (const act) [1..(n::Int)]
SBVBenchSuite/BenchSuite/Uninterpreted/Deduce.hs view
@@ -25,9 +25,9 @@ benchmarks = rGroup   [ run "test" t `using` runner proveWith   ]-  where t = do addAxiom "OR distributes over AND" ax1-               addAxiom "de Morgan"               ax2-               addAxiom "double negation"         ax3+  where t = do constrain $ \(Forall p) (Forall q) (Forall r) -> (p `or` q) `and` (p `or` r) .== p `or` (q `and` r)+               constrain $ \(Forall p) (Forall q)            -> not (p `or` q) .== not p `and` not q+               constrain $ \(Forall p)                       -> not (not p) .== p                p <- free "p"                q <- free "q"                r <- free "r"
SBVBenchSuite/BenchSuite/Uninterpreted/Shannon.hs view
@@ -16,7 +16,7 @@ module BenchSuite.Uninterpreted.Shannon(benchmarks) where  import Documentation.SBV.Examples.Uninterpreted.Shannon-import Data.SBV hiding (universal, existential)+import Data.SBV  import BenchSuite.Bench.Bench 
SBVBenchSuite/BenchSuite/Uninterpreted/Sort.hs view
@@ -22,11 +22,11 @@ benchmarks :: Runner benchmarks = rGroup   [ run "t1" _t1 `using` runner satWith-  , run "r2" _t1 `using` runner satWith+  , run "t2" _t2 `using` runner satWith   ]   where _t1 = do x <- free "x"                  return $ f x ./= x -        _t2 = do x <- free "x"-                 addAxiom "Q" ["(assert (forall ((x Q) (y Q)) (= x y)))"]+        _t2 = do constrain $ \(Forall x) (Forall y) -> x .== (y :: SQ)+                 x <- free "x"                  return $ f x ./= x
SBVBenchSuite/Utils/SBVBenchFramework.hs view
@@ -11,7 +11,11 @@ -----------------------------------------------------------------------------  {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-} +{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-missing-methods #-} -- for ProvableM orphan+ module Utils.SBVBenchFramework   ( mkExecString   , mkFileName@@ -34,6 +38,7 @@ import           Data.Time.Calendar  import           Data.SBV+import           Data.SBV.Internals  -- | make the string to call executable from the command line. All the heavy -- lifting is done by 'System.Process.showCommandForUser', the rest is just@@ -112,3 +117,10 @@                              filteredFilePath  = fp ++ "_filtered"                          writeFile  filteredFilePath (concat $ header:filteredContent)                          return filteredFilePath++-- NO INSTANCE ON PURPOSE; don't want to prove goals. We provide this instance+-- just to allow the testsuite to run tests with try to Prove Goals. In general,+-- this violates the invariants promised by the @ProvableM@ and @SatisfiableM@+-- type classes. Thus, this should not be publicly exposed under any+-- circumstances.+instance ProvableM IO (SymbolicT IO ())
SBVTestSuite/GoldFiles/allSat6.gold view
@@ -7,4 +7,4 @@ Solution #3:   x = 0 :: Word8   y = 1 :: Word8-Found 3 different solutions. (Unique up to prefix existentials.)+Found 3 different solutions.
SBVTestSuite/GoldFiles/allSat7.gold view
@@ -12,16 +12,16 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () Int 1) [GOOD] (define-fun s5 () Int 15)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "x" [GOOD] (declare-fun s1 () Int) ; tracks user variable "y" [GOOD] (declare-fun s2 () Int) ; tracks user variable "z" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s4 () Bool (>= s0 s3)) [GOOD] (define-fun s6 () Bool (<= s0 s5)) [GOOD] (define-fun s7 () Bool (and s4 s6))@@ -34,10 +34,8 @@ [GOOD] (define-fun s14 () Bool (distinct s0 s1 s2)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s7) [GOOD] (assert s10) [GOOD] (assert s13)
+ SBVTestSuite/GoldFiles/allSat8.gold view
@@ -0,0 +1,64 @@+** 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 ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+*** Checking Satisfiability, all solutions..+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+Looking for solution 1+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (f))+[RECV] ((f (lambda ((x!1 Int)) (+ 1 x!1))))++EXCEPTION CAUGHT:++*** allSat: Unsupported: Building a rejecting instance for:+***+***     f :: SInteger -> SInteger+***     f x = 1 + x+***+*** At this time, SBV cannot compute allSat when the model has a non-table definition.+***+*** You can ignore specific functions via the 'isNonModelVar' filter:+***+***    allSatWith z3{isNonModelVar = (`elem` ["f"])} ...+***+*** Or you can ignore all uninterpreted functions for all-sat purposes using the 'allSatTrackUFs' parameter:+***+***    allSatWith z3{allSatTrackUFs = False} ...+***+*** You can see the response from the solver by running with the '{verbose = True}' option.+***+*** 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:1464:57 in sbv-10.0-inplace:Data.SBV.Control.Utils
SBVTestSuite/GoldFiles/array_caching_01.gold view
@@ -13,10 +13,10 @@ [GOOD] (define-fun s0 () Int 0) [GOOD] (define-fun s3 () Int 2) [GOOD] (define-fun s4 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s1 () Int) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized 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))@@ -24,8 +24,8 @@ [GOOD] (declare-fun array_2 () (Array Int Int)) [GOOD] (declare-fun array_3 () (Array Int Int)) [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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))@@ -44,10 +44,8 @@ [GOOD] (assert array_2_initializer) [GOOD] (define-fun array_3_initializer () Bool array_3_initializer_0) [GOOD] (assert array_3_initializer)-[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s10) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/array_caching_02.gold view
@@ -13,10 +13,10 @@ [GOOD] (define-fun s0 () Int 0) [GOOD] (define-fun s3 () Int 2) [GOOD] (define-fun s4 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s1 () Int) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized 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))@@ -24,8 +24,8 @@ [GOOD] (declare-fun array_2 () (Array Int Int)) [GOOD] (declare-fun array_3 () (Array Int Int)) [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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))@@ -44,10 +44,8 @@ [GOOD] (assert array_2_initializer) [GOOD] (define-fun array_3_initializer () Bool array_3_initializer_0) [GOOD] (assert array_3_initializer)-[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s10) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/auf-1.gold view
@@ -1,33 +1,32 @@ INPUTS-  s0 :: SWord32, existential, aliasing "x"-  s1 :: SWord32, existential, aliasing "y"+  s0 :: SWord32, aliasing "x"+  s1 :: SWord32, aliasing "y" CONSTANTS   s2 = 2 :: Word32-  s6 = 3 :: Word32-  s11 = 1 :: Word32+  s5 = 3 :: Word32+  s10 = 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 |-> s6 :: SWord32+     Context:  cloned from array_0 with s0 :: SWord32 |-> s5 :: SWord32 UNINTERPRETED CONSTANTS-  [uninterpreted] f :: SWord32 -> SWord64+  [uninterpreted] f :: (Nothing,SWord32 -> SWord64) USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s3 :: SWord32 = s0 + s2   s4 :: SBool = s1 == s3-  s5 :: SBool = ~ s4-  s7 :: SWord32 = s1 - s2-  s8 :: SWord32 = select array_1 s7-  s9 :: SWord64 = [uninterpreted] f s8-  s10 :: SWord32 = s1 - s0-  s12 :: SWord32 = s10 + s11-  s13 :: SWord64 = [uninterpreted] f s12-  s14 :: SBool = s9 == s13-  s15 :: SBool = s5 | s14+  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 CONSTRAINTS ASSERTIONS OUTPUTS-  s15+  s14
SBVTestSuite/GoldFiles/barrelRotate_Left_Int16_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x000d) s32)) [GOOD] (assert (= (table0 #x000e) s33)) [GOOD] (assert (= (table0 #x000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int16_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x0000000d) s32)) [GOOD] (assert (= (table0 #x0000000e) s33)) [GOOD] (assert (= (table0 #x0000000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int16_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x000000000000000d) s32)) [GOOD] (assert (= (table0 #x000000000000000e) s33)) [GOOD] (assert (= (table0 #x000000000000000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int16_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x10) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x0d) s32)) [GOOD] (assert (= (table0 #x0e) s33)) [GOOD] (assert (= (table0 #x0f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int32_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x001d) s52)) [GOOD] (assert (= (table0 #x001e) s53)) [GOOD] (assert (= (table0 #x001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int32_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x0000001d) s52)) [GOOD] (assert (= (table0 #x0000001e) s53)) [GOOD] (assert (= (table0 #x0000001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int32_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x000000000000001d) s52)) [GOOD] (assert (= (table0 #x000000000000001e) s53)) [GOOD] (assert (= (table0 #x000000000000001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int32_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x20) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x1d) s52)) [GOOD] (assert (= (table0 #x1e) s53)) [GOOD] (assert (= (table0 #x1f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int64_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x003d) s88)) [GOOD] (assert (= (table0 #x003e) s89)) [GOOD] (assert (= (table0 #x003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int64_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x0000003d) s88)) [GOOD] (assert (= (table0 #x0000003e) s89)) [GOOD] (assert (= (table0 #x0000003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int64_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x000000000000003d) s88)) [GOOD] (assert (= (table0 #x000000000000003e) s89)) [GOOD] (assert (= (table0 #x000000000000003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int64_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x40) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x3d) s88)) [GOOD] (assert (= (table0 #x3e) s89)) [GOOD] (assert (= (table0 #x3f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int8_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x0005) s20)) [GOOD] (assert (= (table0 #x0006) s21)) [GOOD] (assert (= (table0 #x0007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int8_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x00000005) s20)) [GOOD] (assert (= (table0 #x00000006) s21)) [GOOD] (assert (= (table0 #x00000007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int8_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x0000000000000005) s20)) [GOOD] (assert (= (table0 #x0000000000000006) s21)) [GOOD] (assert (= (table0 #x0000000000000007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Int8_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x08) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x05) s20)) [GOOD] (assert (= (table0 #x06) s21)) [GOOD] (assert (= (table0 #x07) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word16_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x000d) s32)) [GOOD] (assert (= (table0 #x000e) s33)) [GOOD] (assert (= (table0 #x000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word16_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x0000000d) s32)) [GOOD] (assert (= (table0 #x0000000e) s33)) [GOOD] (assert (= (table0 #x0000000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word16_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x000000000000000d) s32)) [GOOD] (assert (= (table0 #x000000000000000e) s33)) [GOOD] (assert (= (table0 #x000000000000000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word16_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x10) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x0d) s32)) [GOOD] (assert (= (table0 #x0e) s33)) [GOOD] (assert (= (table0 #x0f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word32_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x001d) s52)) [GOOD] (assert (= (table0 #x001e) s53)) [GOOD] (assert (= (table0 #x001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word32_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x0000001d) s52)) [GOOD] (assert (= (table0 #x0000001e) s53)) [GOOD] (assert (= (table0 #x0000001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word32_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x000000000000001d) s52)) [GOOD] (assert (= (table0 #x000000000000001e) s53)) [GOOD] (assert (= (table0 #x000000000000001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word32_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x20) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x1d) s52)) [GOOD] (assert (= (table0 #x1e) s53)) [GOOD] (assert (= (table0 #x1f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word64_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x003d) s88)) [GOOD] (assert (= (table0 #x003e) s89)) [GOOD] (assert (= (table0 #x003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word64_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x0000003d) s88)) [GOOD] (assert (= (table0 #x0000003e) s89)) [GOOD] (assert (= (table0 #x0000003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word64_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x000000000000003d) s88)) [GOOD] (assert (= (table0 #x000000000000003e) s89)) [GOOD] (assert (= (table0 #x000000000000003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word64_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x40) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x3d) s88)) [GOOD] (assert (= (table0 #x3e) s89)) [GOOD] (assert (= (table0 #x3f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word8_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x0005) s20)) [GOOD] (assert (= (table0 #x0006) s21)) [GOOD] (assert (= (table0 #x0007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word8_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x00000005) s20)) [GOOD] (assert (= (table0 #x00000006) s21)) [GOOD] (assert (= (table0 #x00000007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word8_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x0000000000000005) s20)) [GOOD] (assert (= (table0 #x0000000000000006) s21)) [GOOD] (assert (= (table0 #x0000000000000007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Left_Word8_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x08) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x05) s20)) [GOOD] (assert (= (table0 #x06) s21)) [GOOD] (assert (= (table0 #x07) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int16_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x000d) s32)) [GOOD] (assert (= (table0 #x000e) s33)) [GOOD] (assert (= (table0 #x000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int16_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x0000000d) s32)) [GOOD] (assert (= (table0 #x0000000e) s33)) [GOOD] (assert (= (table0 #x0000000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int16_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x000000000000000d) s32)) [GOOD] (assert (= (table0 #x000000000000000e) s33)) [GOOD] (assert (= (table0 #x000000000000000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int16_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x10) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x0d) s32)) [GOOD] (assert (= (table0 #x0e) s33)) [GOOD] (assert (= (table0 #x0f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int32_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x001d) s52)) [GOOD] (assert (= (table0 #x001e) s53)) [GOOD] (assert (= (table0 #x001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int32_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x0000001d) s52)) [GOOD] (assert (= (table0 #x0000001e) s53)) [GOOD] (assert (= (table0 #x0000001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int32_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x000000000000001d) s52)) [GOOD] (assert (= (table0 #x000000000000001e) s53)) [GOOD] (assert (= (table0 #x000000000000001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int32_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x20) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x1d) s52)) [GOOD] (assert (= (table0 #x1e) s53)) [GOOD] (assert (= (table0 #x1f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int64_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x003d) s88)) [GOOD] (assert (= (table0 #x003e) s89)) [GOOD] (assert (= (table0 #x003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int64_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x0000003d) s88)) [GOOD] (assert (= (table0 #x0000003e) s89)) [GOOD] (assert (= (table0 #x0000003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int64_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x000000000000003d) s88)) [GOOD] (assert (= (table0 #x000000000000003e) s89)) [GOOD] (assert (= (table0 #x000000000000003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int64_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x40) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x3d) s88)) [GOOD] (assert (= (table0 #x3e) s89)) [GOOD] (assert (= (table0 #x3f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int8_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x0005) s20)) [GOOD] (assert (= (table0 #x0006) s21)) [GOOD] (assert (= (table0 #x0007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int8_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x00000005) s20)) [GOOD] (assert (= (table0 #x00000006) s21)) [GOOD] (assert (= (table0 #x00000007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int8_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x0000000000000005) s20)) [GOOD] (assert (= (table0 #x0000000000000006) s21)) [GOOD] (assert (= (table0 #x0000000000000007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Int8_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x08) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x05) s20)) [GOOD] (assert (= (table0 #x06) s21)) [GOOD] (assert (= (table0 #x07) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word16_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x000d) s32)) [GOOD] (assert (= (table0 #x000e) s33)) [GOOD] (assert (= (table0 #x000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word16_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x0000000d) s32)) [GOOD] (assert (= (table0 #x0000000e) s33)) [GOOD] (assert (= (table0 #x0000000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word16_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000010) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x000000000000000d) s32)) [GOOD] (assert (= (table0 #x000000000000000e) s33)) [GOOD] (assert (= (table0 #x000000000000000f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word16_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x10) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s35 () (_ BitVec 16) #x0000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 16)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 3 3) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -57,8 +57,6 @@ [GOOD] (define-fun s37 () Bool (= s20 s36)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s13))@@ -76,7 +74,7 @@ [GOOD] (assert (= (table0 #x0d) s32)) [GOOD] (assert (= (table0 #x0e) s33)) [GOOD] (assert (= (table0 #x0f) s34))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s37)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word32_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x001d) s52)) [GOOD] (assert (= (table0 #x001e) s53)) [GOOD] (assert (= (table0 #x001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word32_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x0000001d) s52)) [GOOD] (assert (= (table0 #x0000001e) s53)) [GOOD] (assert (= (table0 #x0000001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word32_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000020) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x000000000000001d) s52)) [GOOD] (assert (= (table0 #x000000000000001e) s53)) [GOOD] (assert (= (table0 #x000000000000001f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word32_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x20) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s55 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 32)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 4 4) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -77,8 +77,6 @@ [GOOD] (define-fun s57 () Bool (= s24 s56)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s15))@@ -112,7 +110,7 @@ [GOOD] (assert (= (table0 #x1d) s52)) [GOOD] (assert (= (table0 #x1e) s53)) [GOOD] (assert (= (table0 #x1f) s54))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s57)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word64_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x003d) s88)) [GOOD] (assert (= (table0 #x003e) s89)) [GOOD] (assert (= (table0 #x003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word64_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x0000003d) s88)) [GOOD] (assert (= (table0 #x0000003e) s89)) [GOOD] (assert (= (table0 #x0000003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word64_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000040) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x000000000000003d) s88)) [GOOD] (assert (= (table0 #x000000000000003e) s89)) [GOOD] (assert (= (table0 #x000000000000003f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word64_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x40) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s91 () (_ BitVec 64) #x0000000000000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 64)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 64)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 5 5) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -113,8 +113,6 @@ [GOOD] (define-fun s93 () Bool (= s28 s92)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s17))@@ -180,7 +178,7 @@ [GOOD] (assert (= (table0 #x3d) s88)) [GOOD] (assert (= (table0 #x3e) s89)) [GOOD] (assert (= (table0 #x3f) s90))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s93)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word8_Word16.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 16) #x0008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 16)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 16)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 16) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000) s0)) [GOOD] (assert (= (table0 #x0001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x0005) s20)) [GOOD] (assert (= (table0 #x0006) s21)) [GOOD] (assert (= (table0 #x0007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word8_Word32.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 32) #x00000008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 32)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 32)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 32) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00000000) s0)) [GOOD] (assert (= (table0 #x00000001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x00000005) s20)) [GOOD] (assert (= (table0 #x00000006) s21)) [GOOD] (assert (= (table0 #x00000007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word8_Word64.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 64) #x0000000000000008) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 64)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 64)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 64) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x0000000000000000) s0)) [GOOD] (assert (= (table0 #x0000000000000001) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x0000000000000005) s20)) [GOOD] (assert (= (table0 #x0000000000000006) s21)) [GOOD] (assert (= (table0 #x0000000000000007) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/barrelRotate_Right_Word8_Word8.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -12,16 +12,16 @@ [GOOD] (define-fun s2 () (_ BitVec 8) #x08) [GOOD] (define-fun s5 () (_ BitVec 1) #b0) [GOOD] (define-fun s23 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] (declare-fun s1 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 8)) [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (_ BitVec 8) (bvurem s1 s2)) [GOOD] (define-fun s4 () (_ BitVec 1) ((_ extract 2 2) s3)) [GOOD] (define-fun s6 () Bool (distinct s4 s5))@@ -45,8 +45,6 @@ [GOOD] (define-fun s25 () Bool (= s16 s24)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities --- [GOOD] (assert (= (table0 #x00) s0)) [GOOD] (assert (= (table0 #x01) s11))@@ -56,7 +54,7 @@ [GOOD] (assert (= (table0 #x05) s20)) [GOOD] (assert (= (table0 #x06) s21)) [GOOD] (assert (= (table0 #x07) s22))-[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (not s25)) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/basic-2_1.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 + s1   s3 :: SWord8 = s1 - s0
SBVTestSuite/GoldFiles/basic-2_2.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 * s0   s3 :: SWord8 = s1 - s2
SBVTestSuite/GoldFiles/basic-2_3.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 + s1   s3 :: SWord8 = s2 * s2
SBVTestSuite/GoldFiles/basic-2_4.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 + s1   s3 :: SWord8 = s2 * s2
SBVTestSuite/GoldFiles/basic-3_1.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 + s1   s3 :: SWord8 = s0 - s1
SBVTestSuite/GoldFiles/basic-3_2.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 * s0   s3 :: SWord8 = s1 * s1
SBVTestSuite/GoldFiles/basic-3_3.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 + s1   s3 :: SWord8 = s2 * s2
SBVTestSuite/GoldFiles/basic-3_4.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 + s1   s3 :: SWord8 = s2 * s2
SBVTestSuite/GoldFiles/basic-3_5.gold view
@@ -7,7 +7,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s3 :: SWord8 = s0 + s2 CONSTRAINTS
SBVTestSuite/GoldFiles/basic-4_1.gold view
@@ -5,7 +5,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s1 :: SWord8 = s0 + s0   s2 :: SWord8 = s0 - s0
SBVTestSuite/GoldFiles/basic-4_2.gold view
@@ -5,7 +5,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s1 :: SWord8 = s0 * s0   s2 :: SWord8 = s1 - s1
SBVTestSuite/GoldFiles/basic-4_3.gold view
@@ -5,7 +5,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s1 :: SWord8 = s0 + s0   s2 :: SWord8 = s1 * s1
SBVTestSuite/GoldFiles/basic-4_4.gold view
@@ -5,7 +5,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s1 :: SWord8 = s0 + s0   s2 :: SWord8 = s1 * s1
SBVTestSuite/GoldFiles/basic-4_5.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 + s1 CONSTRAINTS
SBVTestSuite/GoldFiles/basic-5_1.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 + s0   s3 :: SWord8 = s0 - s0
SBVTestSuite/GoldFiles/basic-5_2.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 * s0   s3 :: SWord8 = s2 - s2
SBVTestSuite/GoldFiles/basic-5_3.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 + s0   s3 :: SWord8 = s2 * s2
SBVTestSuite/GoldFiles/basic-5_4.gold view
@@ -6,7 +6,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SWord8 = s0 + s0   s3 :: SWord8 = s2 * s2
SBVTestSuite/GoldFiles/basic-5_5.gold view
@@ -7,7 +7,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s3 :: SWord8 = s0 + s2 CONSTRAINTS
SBVTestSuite/GoldFiles/ccitt.gold view
@@ -2,2197 +2,2196 @@   s0 :: SWord 48   s1 :: SWord 48 CONSTANTS-  s5 = 0 :: WordN 1-  s101 = 65536 :: Word64-  s102 = 0 :: Word64-  s104 = 131072 :: Word64-  s107 = 262144 :: Word64-  s110 = 524288 :: Word64-  s113 = 1048576 :: Word64-  s116 = 2097152 :: Word64-  s119 = 4194304 :: Word64-  s122 = 8388608 :: Word64-  s125 = 16777216 :: Word64-  s128 = 33554432 :: Word64-  s131 = 67108864 :: Word64-  s134 = 134217728 :: Word64-  s137 = 268435456 :: Word64-  s140 = 536870912 :: Word64-  s143 = 1073741824 :: Word64-  s146 = 2147483648 :: Word64-  s149 = 4294967296 :: Word64-  s152 = 8589934592 :: Word64-  s155 = 17179869184 :: Word64-  s158 = 34359738368 :: Word64-  s161 = 68719476736 :: Word64-  s164 = 137438953472 :: Word64-  s167 = 274877906944 :: Word64-  s170 = 549755813888 :: Word64-  s173 = 1099511627776 :: Word64-  s176 = 2199023255552 :: Word64-  s179 = 4398046511104 :: Word64-  s182 = 8796093022208 :: Word64-  s185 = 17592186044416 :: Word64-  s188 = 35184372088832 :: Word64-  s191 = 70368744177664 :: Word64-  s194 = 140737488355328 :: Word64-  s197 = 281474976710656 :: Word64-  s200 = 562949953421312 :: Word64-  s203 = 1125899906842624 :: Word64-  s206 = 2251799813685248 :: Word64-  s209 = 4503599627370496 :: Word64-  s212 = 9007199254740992 :: Word64-  s215 = 18014398509481984 :: Word64-  s218 = 36028797018963968 :: Word64-  s221 = 72057594037927936 :: Word64-  s224 = 144115188075855872 :: Word64-  s227 = 288230376151711744 :: Word64-  s230 = 576460752303423488 :: Word64-  s233 = 1152921504606846976 :: Word64-  s236 = 2305843009213693952 :: Word64-  s239 = 4611686018427387904 :: Word64-  s242 = 9223372036854775808 :: Word64-  s757 = 1 :: Word64-  s759 = 2 :: Word64-  s762 = 4 :: Word64-  s765 = 8 :: Word64-  s768 = 16 :: Word64-  s771 = 32 :: Word64-  s774 = 64 :: Word64-  s777 = 128 :: Word64-  s780 = 256 :: Word64-  s783 = 512 :: Word64-  s786 = 1024 :: Word64-  s789 = 2048 :: Word64-  s792 = 4096 :: Word64-  s795 = 8192 :: Word64-  s798 = 16384 :: Word64-  s801 = 32768 :: Word64-  s2054 = 0 :: Word8-  s2055 = 1 :: Word8-  s2183 = 3 :: Word8-TABLES-ARRAYS-UNINTERPRETED CONSTANTS-USER GIVEN CODE SEGMENTS-AXIOMS-DEFINE-  s2 :: SBool = s0 /= s1-  s3 :: SBool = ~ s2-  s4 :: SWord 1 = choose [47:47] s0-  s6 :: SBool = s4 /= s5-  s7 :: SWord 1 = choose [46:46] s0-  s8 :: SBool = s5 /= s7-  s9 :: SWord 1 = choose [45:45] s0-  s10 :: SBool = s5 /= s9-  s11 :: SWord 1 = choose [44:44] s0-  s12 :: SBool = s5 /= s11-  s13 :: SWord 1 = choose [43:43] s0-  s14 :: SBool = s5 /= s13-  s15 :: SWord 1 = choose [42:42] s0-  s16 :: SBool = s5 /= s15-  s17 :: SWord 1 = choose [41:41] s0-  s18 :: SBool = s5 /= s17-  s19 :: SWord 1 = choose [40:40] s0-  s20 :: SBool = s5 /= s19-  s21 :: SWord 1 = choose [39:39] s0-  s22 :: SBool = s5 /= s21-  s23 :: SWord 1 = choose [38:38] s0-  s24 :: SBool = s5 /= s23-  s25 :: SWord 1 = choose [37:37] s0-  s26 :: SBool = s5 /= s25-  s27 :: SWord 1 = choose [36:36] s0-  s28 :: SBool = s5 /= s27-  s29 :: SWord 1 = choose [35:35] s0-  s30 :: SBool = s5 /= s29-  s31 :: SWord 1 = choose [34:34] s0-  s32 :: SBool = s5 /= s31-  s33 :: SWord 1 = choose [33:33] s0-  s34 :: SBool = s5 /= s33-  s35 :: SWord 1 = choose [32:32] s0-  s36 :: SBool = s5 /= s35-  s37 :: SWord 1 = choose [31:31] s0-  s38 :: SBool = s5 /= s37-  s39 :: SWord 1 = choose [30:30] s0-  s40 :: SBool = s5 /= s39-  s41 :: SWord 1 = choose [29:29] s0-  s42 :: SBool = s5 /= s41-  s43 :: SWord 1 = choose [28:28] s0-  s44 :: SBool = s5 /= s43-  s45 :: SWord 1 = choose [27:27] s0-  s46 :: SBool = s5 /= s45-  s47 :: SWord 1 = choose [26:26] s0-  s48 :: SBool = s5 /= s47-  s49 :: SWord 1 = choose [25:25] s0-  s50 :: SBool = s5 /= s49-  s51 :: SWord 1 = choose [24:24] s0-  s52 :: SBool = s5 /= s51-  s53 :: SWord 1 = choose [23:23] s0-  s54 :: SBool = s5 /= s53-  s55 :: SWord 1 = choose [22:22] s0-  s56 :: SBool = s5 /= s55-  s57 :: SWord 1 = choose [21:21] s0-  s58 :: SBool = s5 /= s57-  s59 :: SWord 1 = choose [20:20] s0-  s60 :: SBool = s5 /= s59-  s61 :: SWord 1 = choose [19:19] s0-  s62 :: SBool = s5 /= s61-  s63 :: SWord 1 = choose [18:18] s0-  s64 :: SBool = s5 /= s63-  s65 :: SWord 1 = choose [17:17] s0-  s66 :: SBool = s5 /= s65-  s67 :: SWord 1 = choose [16:16] s0-  s68 :: SBool = s5 /= s67-  s69 :: SWord 1 = choose [15:15] s0-  s70 :: SBool = s5 /= s69-  s71 :: SWord 1 = choose [14:14] s0-  s72 :: SBool = s5 /= s71-  s73 :: SWord 1 = choose [13:13] s0-  s74 :: SBool = s5 /= s73-  s75 :: SWord 1 = choose [12:12] s0-  s76 :: SBool = s5 /= s75-  s77 :: SWord 1 = choose [11:11] s0-  s78 :: SBool = s5 /= s77-  s79 :: SWord 1 = choose [10:10] s0-  s80 :: SBool = s5 /= s79-  s81 :: SWord 1 = choose [9:9] s0-  s82 :: SBool = s5 /= s81-  s83 :: SWord 1 = choose [8:8] s0-  s84 :: SBool = s5 /= s83-  s85 :: SWord 1 = choose [7:7] s0-  s86 :: SBool = s5 /= s85-  s87 :: SWord 1 = choose [6:6] s0-  s88 :: SBool = s5 /= s87-  s89 :: SWord 1 = choose [5:5] s0-  s90 :: SBool = s5 /= s89-  s91 :: SWord 1 = choose [4:4] s0-  s92 :: SBool = s5 /= s91-  s93 :: SWord 1 = choose [3:3] s0-  s94 :: SBool = s5 /= s93-  s95 :: SWord 1 = choose [2:2] s0-  s96 :: SBool = s5 /= s95-  s97 :: SWord 1 = choose [1:1] s0-  s98 :: SBool = s5 /= s97-  s99 :: SWord 1 = choose [0:0] s0-  s100 :: SBool = s5 /= s99-  s103 :: SWord64 = if s100 then s101 else s102-  s105 :: SWord64 = s103 | s104-  s106 :: SWord64 = if s98 then s105 else s103-  s108 :: SWord64 = s106 | s107-  s109 :: SWord64 = if s96 then s108 else s106-  s111 :: SWord64 = s109 | s110-  s112 :: SWord64 = if s94 then s111 else s109-  s114 :: SWord64 = s112 | s113-  s115 :: SWord64 = if s92 then s114 else s112-  s117 :: SWord64 = s115 | s116-  s118 :: SWord64 = if s90 then s117 else s115-  s120 :: SWord64 = s118 | s119-  s121 :: SWord64 = if s88 then s120 else s118-  s123 :: SWord64 = s121 | s122-  s124 :: SWord64 = if s86 then s123 else s121-  s126 :: SWord64 = s124 | s125-  s127 :: SWord64 = if s84 then s126 else s124-  s129 :: SWord64 = s127 | s128-  s130 :: SWord64 = if s82 then s129 else s127-  s132 :: SWord64 = s130 | s131-  s133 :: SWord64 = if s80 then s132 else s130-  s135 :: SWord64 = s133 | s134-  s136 :: SWord64 = if s78 then s135 else s133-  s138 :: SWord64 = s136 | s137-  s139 :: SWord64 = if s76 then s138 else s136-  s141 :: SWord64 = s139 | s140-  s142 :: SWord64 = if s74 then s141 else s139-  s144 :: SWord64 = s142 | s143-  s145 :: SWord64 = if s72 then s144 else s142-  s147 :: SWord64 = s145 | s146-  s148 :: SWord64 = if s70 then s147 else s145-  s150 :: SWord64 = s148 | s149-  s151 :: SWord64 = if s68 then s150 else s148-  s153 :: SWord64 = s151 | s152-  s154 :: SWord64 = if s66 then s153 else s151-  s156 :: SWord64 = s154 | s155-  s157 :: SWord64 = if s64 then s156 else s154-  s159 :: SWord64 = s157 | s158-  s160 :: SWord64 = if s62 then s159 else s157-  s162 :: SWord64 = s160 | s161-  s163 :: SWord64 = if s60 then s162 else s160-  s165 :: SWord64 = s163 | s164-  s166 :: SWord64 = if s58 then s165 else s163-  s168 :: SWord64 = s166 | s167-  s169 :: SWord64 = if s56 then s168 else s166-  s171 :: SWord64 = s169 | s170-  s172 :: SWord64 = if s54 then s171 else s169-  s174 :: SWord64 = s172 | s173-  s175 :: SWord64 = if s52 then s174 else s172-  s177 :: SWord64 = s175 | s176-  s178 :: SWord64 = if s50 then s177 else s175-  s180 :: SWord64 = s178 | s179-  s181 :: SWord64 = if s48 then s180 else s178-  s183 :: SWord64 = s181 | s182-  s184 :: SWord64 = if s46 then s183 else s181-  s186 :: SWord64 = s184 | s185-  s187 :: SWord64 = if s44 then s186 else s184-  s189 :: SWord64 = s187 | s188-  s190 :: SWord64 = if s42 then s189 else s187-  s192 :: SWord64 = s190 | s191-  s193 :: SWord64 = if s40 then s192 else s190-  s195 :: SWord64 = s193 | s194-  s196 :: SWord64 = if s38 then s195 else s193-  s198 :: SWord64 = s196 | s197-  s199 :: SWord64 = if s36 then s198 else s196-  s201 :: SWord64 = s199 | s200-  s202 :: SWord64 = if s34 then s201 else s199-  s204 :: SWord64 = s202 | s203-  s205 :: SWord64 = if s32 then s204 else s202-  s207 :: SWord64 = s205 | s206-  s208 :: SWord64 = if s30 then s207 else s205-  s210 :: SWord64 = s208 | s209-  s211 :: SWord64 = if s28 then s210 else s208-  s213 :: SWord64 = s211 | s212-  s214 :: SWord64 = if s26 then s213 else s211-  s216 :: SWord64 = s214 | s215-  s217 :: SWord64 = if s24 then s216 else s214-  s219 :: SWord64 = s217 | s218-  s220 :: SWord64 = if s22 then s219 else s217-  s222 :: SWord64 = s220 | s221-  s223 :: SWord64 = if s20 then s222 else s220-  s225 :: SWord64 = s223 | s224-  s226 :: SWord64 = if s18 then s225 else s223-  s228 :: SWord64 = s226 | s227-  s229 :: SWord64 = if s16 then s228 else s226-  s231 :: SWord64 = s229 | s230-  s232 :: SWord64 = if s14 then s231 else s229-  s234 :: SWord64 = s232 | s233-  s235 :: SWord64 = if s12 then s234 else s232-  s237 :: SWord64 = s235 | s236-  s238 :: SWord64 = if s10 then s237 else s235-  s240 :: SWord64 = s238 | s239-  s241 :: SWord64 = if s8 then s240 else s238-  s243 :: SWord64 = s241 | s242-  s244 :: SWord64 = if s6 then s243 else s241-  s245 :: SWord 1 = choose [63:63] s244-  s246 :: SBool = s5 /= s245-  s247 :: SWord 1 = choose [62:62] s244-  s248 :: SBool = s5 /= s247-  s249 :: SWord 1 = choose [61:61] s244-  s250 :: SBool = s5 /= s249-  s251 :: SWord 1 = choose [60:60] s244-  s252 :: SBool = s5 /= s251-  s253 :: SWord 1 = choose [59:59] s244-  s254 :: SBool = s5 /= s253-  s255 :: SBool = ~ s254-  s256 :: SBool = if s246 then s255 else s254-  s257 :: SWord 1 = choose [58:58] s244-  s258 :: SBool = s5 /= s257-  s259 :: SBool = ~ s258-  s260 :: SBool = if s248 then s259 else s258-  s261 :: SWord 1 = choose [57:57] s244-  s262 :: SBool = s5 /= s261-  s263 :: SBool = ~ s262-  s264 :: SBool = if s250 then s263 else s262-  s265 :: SWord 1 = choose [56:56] s244-  s266 :: SBool = s5 /= s265-  s267 :: SBool = ~ s266-  s268 :: SBool = if s252 then s267 else s266-  s269 :: SWord 1 = choose [55:55] s244-  s270 :: SBool = s5 /= s269-  s271 :: SBool = ~ s270-  s272 :: SBool = if s256 then s271 else s270-  s273 :: SWord 1 = choose [54:54] s244-  s274 :: SBool = s5 /= s273-  s275 :: SBool = ~ s274-  s276 :: SBool = if s260 then s275 else s274-  s277 :: SWord 1 = choose [53:53] s244-  s278 :: SBool = s5 /= s277-  s279 :: SBool = ~ s278-  s280 :: SBool = if s264 then s279 else s278-  s281 :: SWord 1 = choose [52:52] s244-  s282 :: SBool = s5 /= s281-  s283 :: SBool = ~ s282-  s284 :: SBool = if s246 then s283 else s282-  s285 :: SBool = ~ s284-  s286 :: SBool = if s268 then s285 else s284-  s287 :: SWord 1 = choose [51:51] s244-  s288 :: SBool = s5 /= s287-  s289 :: SBool = ~ s288-  s290 :: SBool = if s248 then s289 else s288-  s291 :: SBool = ~ s290-  s292 :: SBool = if s272 then s291 else s290-  s293 :: SWord 1 = choose [50:50] s244-  s294 :: SBool = s5 /= s293-  s295 :: SBool = ~ s294-  s296 :: SBool = if s250 then s295 else s294-  s297 :: SBool = ~ s296-  s298 :: SBool = if s276 then s297 else s296-  s299 :: SWord 1 = choose [49:49] s244-  s300 :: SBool = s5 /= s299-  s301 :: SBool = ~ s300-  s302 :: SBool = if s252 then s301 else s300-  s303 :: SBool = ~ s302-  s304 :: SBool = if s280 then s303 else s302-  s305 :: SWord 1 = choose [48:48] s244-  s306 :: SBool = s5 /= s305-  s307 :: SBool = ~ s306-  s308 :: SBool = if s256 then s307 else s306-  s309 :: SBool = ~ s308-  s310 :: SBool = if s286 then s309 else s308-  s311 :: SWord 1 = choose [47:47] s244-  s312 :: SBool = s5 /= s311-  s313 :: SBool = ~ s312-  s314 :: SBool = if s246 then s313 else s312-  s315 :: SBool = ~ s314-  s316 :: SBool = if s260 then s315 else s314-  s317 :: SBool = ~ s316-  s318 :: SBool = if s292 then s317 else s316-  s319 :: SWord 1 = choose [46:46] s244-  s320 :: SBool = s5 /= s319-  s321 :: SBool = ~ s320-  s322 :: SBool = if s248 then s321 else s320-  s323 :: SBool = ~ s322-  s324 :: SBool = if s264 then s323 else s322-  s325 :: SBool = ~ s324-  s326 :: SBool = if s298 then s325 else s324-  s327 :: SWord 1 = choose [45:45] s244-  s328 :: SBool = s5 /= s327-  s329 :: SBool = ~ s328-  s330 :: SBool = if s250 then s329 else s328-  s331 :: SBool = ~ s330-  s332 :: SBool = if s268 then s331 else s330-  s333 :: SBool = ~ s332-  s334 :: SBool = if s304 then s333 else s332-  s335 :: SWord 1 = choose [44:44] s244-  s336 :: SBool = s5 /= s335-  s337 :: SBool = ~ s336-  s338 :: SBool = if s252 then s337 else s336-  s339 :: SBool = ~ s338-  s340 :: SBool = if s272 then s339 else s338-  s341 :: SBool = ~ s340-  s342 :: SBool = if s310 then s341 else s340-  s343 :: SWord 1 = choose [43:43] s244-  s344 :: SBool = s5 /= s343-  s345 :: SBool = ~ s344-  s346 :: SBool = if s256 then s345 else s344-  s347 :: SBool = ~ s346-  s348 :: SBool = if s276 then s347 else s346-  s349 :: SBool = ~ s348-  s350 :: SBool = if s318 then s349 else s348-  s351 :: SWord 1 = choose [42:42] s244-  s352 :: SBool = s5 /= s351-  s353 :: SBool = ~ s352-  s354 :: SBool = if s260 then s353 else s352-  s355 :: SBool = ~ s354-  s356 :: SBool = if s280 then s355 else s354-  s357 :: SBool = ~ s356-  s358 :: SBool = if s326 then s357 else s356-  s359 :: SWord 1 = choose [41:41] s244-  s360 :: SBool = s5 /= s359-  s361 :: SBool = ~ s360-  s362 :: SBool = if s264 then s361 else s360-  s363 :: SBool = ~ s362-  s364 :: SBool = if s286 then s363 else s362-  s365 :: SBool = ~ s364-  s366 :: SBool = if s334 then s365 else s364-  s367 :: SWord 1 = choose [40:40] s244-  s368 :: SBool = s5 /= s367-  s369 :: SBool = ~ s368-  s370 :: SBool = if s268 then s369 else s368-  s371 :: SBool = ~ s370-  s372 :: SBool = if s292 then s371 else s370-  s373 :: SBool = ~ s372-  s374 :: SBool = if s342 then s373 else s372-  s375 :: SWord 1 = choose [39:39] s244-  s376 :: SBool = s5 /= s375-  s377 :: SBool = ~ s376-  s378 :: SBool = if s272 then s377 else s376-  s379 :: SBool = ~ s378-  s380 :: SBool = if s298 then s379 else s378-  s381 :: SBool = ~ s380-  s382 :: SBool = if s350 then s381 else s380-  s383 :: SWord 1 = choose [38:38] s244-  s384 :: SBool = s5 /= s383-  s385 :: SBool = ~ s384-  s386 :: SBool = if s276 then s385 else s384-  s387 :: SBool = ~ s386-  s388 :: SBool = if s304 then s387 else s386-  s389 :: SBool = ~ s388-  s390 :: SBool = if s358 then s389 else s388-  s391 :: SWord 1 = choose [37:37] s244-  s392 :: SBool = s5 /= s391-  s393 :: SBool = ~ s392-  s394 :: SBool = if s280 then s393 else s392-  s395 :: SBool = ~ s394-  s396 :: SBool = if s310 then s395 else s394-  s397 :: SBool = ~ s396-  s398 :: SBool = if s366 then s397 else s396-  s399 :: SWord 1 = choose [36:36] s244-  s400 :: SBool = s5 /= s399-  s401 :: SBool = ~ s400-  s402 :: SBool = if s286 then s401 else s400-  s403 :: SBool = ~ s402-  s404 :: SBool = if s318 then s403 else s402-  s405 :: SBool = ~ s404-  s406 :: SBool = if s374 then s405 else s404-  s407 :: SWord 1 = choose [35:35] s244-  s408 :: SBool = s5 /= s407-  s409 :: SBool = ~ s408-  s410 :: SBool = if s292 then s409 else s408-  s411 :: SBool = ~ s410-  s412 :: SBool = if s326 then s411 else s410-  s413 :: SBool = ~ s412-  s414 :: SBool = if s382 then s413 else s412-  s415 :: SWord 1 = choose [34:34] s244-  s416 :: SBool = s5 /= s415-  s417 :: SBool = ~ s416-  s418 :: SBool = if s298 then s417 else s416-  s419 :: SBool = ~ s418-  s420 :: SBool = if s334 then s419 else s418-  s421 :: SBool = ~ s420-  s422 :: SBool = if s390 then s421 else s420-  s423 :: SWord 1 = choose [33:33] s244-  s424 :: SBool = s5 /= s423-  s425 :: SBool = ~ s424-  s426 :: SBool = if s304 then s425 else s424-  s427 :: SBool = ~ s426-  s428 :: SBool = if s342 then s427 else s426-  s429 :: SBool = ~ s428-  s430 :: SBool = if s398 then s429 else s428-  s431 :: SWord 1 = choose [32:32] s244-  s432 :: SBool = s5 /= s431-  s433 :: SBool = ~ s432-  s434 :: SBool = if s310 then s433 else s432-  s435 :: SBool = ~ s434-  s436 :: SBool = if s350 then s435 else s434-  s437 :: SBool = ~ s436-  s438 :: SBool = if s406 then s437 else s436-  s439 :: SWord 1 = choose [31:31] s244-  s440 :: SBool = s5 /= s439-  s441 :: SBool = ~ s440-  s442 :: SBool = if s318 then s441 else s440-  s443 :: SBool = ~ s442-  s444 :: SBool = if s358 then s443 else s442-  s445 :: SBool = ~ s444-  s446 :: SBool = if s414 then s445 else s444-  s447 :: SWord 1 = choose [30:30] s244-  s448 :: SBool = s5 /= s447-  s449 :: SBool = ~ s448-  s450 :: SBool = if s326 then s449 else s448-  s451 :: SBool = ~ s450-  s452 :: SBool = if s366 then s451 else s450-  s453 :: SBool = ~ s452-  s454 :: SBool = if s422 then s453 else s452-  s455 :: SWord 1 = choose [29:29] s244-  s456 :: SBool = s5 /= s455-  s457 :: SBool = ~ s456-  s458 :: SBool = if s334 then s457 else s456-  s459 :: SBool = ~ s458-  s460 :: SBool = if s374 then s459 else s458-  s461 :: SBool = ~ s460-  s462 :: SBool = if s430 then s461 else s460-  s463 :: SWord 1 = choose [28:28] s244-  s464 :: SBool = s5 /= s463-  s465 :: SBool = ~ s464-  s466 :: SBool = if s342 then s465 else s464-  s467 :: SBool = ~ s466-  s468 :: SBool = if s382 then s467 else s466-  s469 :: SBool = ~ s468-  s470 :: SBool = if s438 then s469 else s468-  s471 :: SWord 1 = choose [27:27] s244-  s472 :: SBool = s5 /= s471-  s473 :: SBool = ~ s472-  s474 :: SBool = if s350 then s473 else s472-  s475 :: SBool = ~ s474-  s476 :: SBool = if s390 then s475 else s474-  s477 :: SBool = ~ s476-  s478 :: SBool = if s446 then s477 else s476-  s479 :: SWord 1 = choose [26:26] s244-  s480 :: SBool = s5 /= s479-  s481 :: SBool = ~ s480-  s482 :: SBool = if s358 then s481 else s480-  s483 :: SBool = ~ s482-  s484 :: SBool = if s398 then s483 else s482-  s485 :: SBool = ~ s484-  s486 :: SBool = if s454 then s485 else s484-  s487 :: SWord 1 = choose [25:25] s244-  s488 :: SBool = s5 /= s487-  s489 :: SBool = ~ s488-  s490 :: SBool = if s366 then s489 else s488-  s491 :: SBool = ~ s490-  s492 :: SBool = if s406 then s491 else s490-  s493 :: SBool = ~ s492-  s494 :: SBool = if s462 then s493 else s492-  s495 :: SWord 1 = choose [24:24] s244-  s496 :: SBool = s5 /= s495-  s497 :: SBool = ~ s496-  s498 :: SBool = if s374 then s497 else s496-  s499 :: SBool = ~ s498-  s500 :: SBool = if s414 then s499 else s498-  s501 :: SBool = ~ s500-  s502 :: SBool = if s470 then s501 else s500-  s503 :: SWord 1 = choose [23:23] s244-  s504 :: SBool = s5 /= s503-  s505 :: SBool = ~ s504-  s506 :: SBool = if s382 then s505 else s504-  s507 :: SBool = ~ s506-  s508 :: SBool = if s422 then s507 else s506-  s509 :: SBool = ~ s508-  s510 :: SBool = if s478 then s509 else s508-  s511 :: SWord 1 = choose [22:22] s244-  s512 :: SBool = s5 /= s511-  s513 :: SBool = ~ s512-  s514 :: SBool = if s390 then s513 else s512-  s515 :: SBool = ~ s514-  s516 :: SBool = if s430 then s515 else s514-  s517 :: SBool = ~ s516-  s518 :: SBool = if s486 then s517 else s516-  s519 :: SWord 1 = choose [21:21] s244-  s520 :: SBool = s5 /= s519-  s521 :: SBool = ~ s520-  s522 :: SBool = if s398 then s521 else s520-  s523 :: SBool = ~ s522-  s524 :: SBool = if s438 then s523 else s522-  s525 :: SBool = ~ s524-  s526 :: SBool = if s494 then s525 else s524-  s527 :: SWord 1 = choose [20:20] s244-  s528 :: SBool = s5 /= s527-  s529 :: SBool = ~ s528-  s530 :: SBool = if s406 then s529 else s528-  s531 :: SBool = ~ s530-  s532 :: SBool = if s446 then s531 else s530-  s533 :: SBool = ~ s532-  s534 :: SBool = if s502 then s533 else s532-  s535 :: SWord 1 = choose [19:19] s244-  s536 :: SBool = s5 /= s535-  s537 :: SBool = ~ s536-  s538 :: SBool = if s414 then s537 else s536-  s539 :: SBool = ~ s538-  s540 :: SBool = if s454 then s539 else s538-  s541 :: SBool = ~ s540-  s542 :: SBool = if s510 then s541 else s540-  s543 :: SWord 1 = choose [18:18] s244-  s544 :: SBool = s5 /= s543-  s545 :: SBool = ~ s544-  s546 :: SBool = if s422 then s545 else s544-  s547 :: SBool = ~ s546-  s548 :: SBool = if s462 then s547 else s546-  s549 :: SBool = ~ s548-  s550 :: SBool = if s518 then s549 else s548-  s551 :: SWord 1 = choose [17:17] s244-  s552 :: SBool = s5 /= s551-  s553 :: SBool = ~ s552-  s554 :: SBool = if s430 then s553 else s552-  s555 :: SBool = ~ s554-  s556 :: SBool = if s470 then s555 else s554-  s557 :: SBool = ~ s556-  s558 :: SBool = if s526 then s557 else s556-  s559 :: SWord 1 = choose [16:16] s244-  s560 :: SBool = s5 /= s559-  s561 :: SBool = ~ s560-  s562 :: SBool = if s438 then s561 else s560-  s563 :: SBool = ~ s562-  s564 :: SBool = if s478 then s563 else s562-  s565 :: SBool = ~ s564-  s566 :: SBool = if s534 then s565 else s564-  s567 :: SBool = ~ s246-  s568 :: SBool = if s246 then s567 else s246-  s569 :: SBool = ~ s248-  s570 :: SBool = if s248 then s569 else s248-  s571 :: SBool = ~ s250-  s572 :: SBool = if s250 then s571 else s250-  s573 :: SBool = ~ s252-  s574 :: SBool = if s252 then s573 else s252-  s575 :: SBool = ~ s256-  s576 :: SBool = if s256 then s575 else s256-  s577 :: SBool = ~ s260-  s578 :: SBool = if s260 then s577 else s260-  s579 :: SBool = ~ s264-  s580 :: SBool = if s264 then s579 else s264-  s581 :: SBool = ~ s268-  s582 :: SBool = if s268 then s581 else s268-  s583 :: SBool = ~ s272-  s584 :: SBool = if s272 then s583 else s272-  s585 :: SBool = ~ s276-  s586 :: SBool = if s276 then s585 else s276-  s587 :: SBool = ~ s280-  s588 :: SBool = if s280 then s587 else s280-  s589 :: SBool = ~ s286-  s590 :: SBool = if s286 then s589 else s286-  s591 :: SBool = ~ s292-  s592 :: SBool = if s292 then s591 else s292-  s593 :: SBool = ~ s298-  s594 :: SBool = if s298 then s593 else s298-  s595 :: SBool = ~ s304-  s596 :: SBool = if s304 then s595 else s304-  s597 :: SBool = ~ s310-  s598 :: SBool = if s310 then s597 else s310-  s599 :: SBool = ~ s318-  s600 :: SBool = if s318 then s599 else s318-  s601 :: SBool = ~ s326-  s602 :: SBool = if s326 then s601 else s326-  s603 :: SBool = ~ s334-  s604 :: SBool = if s334 then s603 else s334-  s605 :: SBool = ~ s342-  s606 :: SBool = if s342 then s605 else s342-  s607 :: SBool = ~ s350-  s608 :: SBool = if s350 then s607 else s350-  s609 :: SBool = ~ s358-  s610 :: SBool = if s358 then s609 else s358-  s611 :: SBool = ~ s366-  s612 :: SBool = if s366 then s611 else s366-  s613 :: SBool = ~ s374-  s614 :: SBool = if s374 then s613 else s374-  s615 :: SBool = ~ s382-  s616 :: SBool = if s382 then s615 else s382-  s617 :: SBool = ~ s390-  s618 :: SBool = if s390 then s617 else s390-  s619 :: SBool = ~ s398-  s620 :: SBool = if s398 then s619 else s398-  s621 :: SBool = ~ s406-  s622 :: SBool = if s406 then s621 else s406-  s623 :: SBool = ~ s414-  s624 :: SBool = if s414 then s623 else s414-  s625 :: SBool = ~ s422-  s626 :: SBool = if s422 then s625 else s422-  s627 :: SBool = ~ s430-  s628 :: SBool = if s430 then s627 else s430-  s629 :: SBool = ~ s438-  s630 :: SBool = if s438 then s629 else s438-  s631 :: SBool = ~ s446-  s632 :: SBool = if s446 then s631 else s446-  s633 :: SBool = ~ s454-  s634 :: SBool = if s454 then s633 else s454-  s635 :: SBool = ~ s462-  s636 :: SBool = if s462 then s635 else s462-  s637 :: SBool = ~ s470-  s638 :: SBool = if s470 then s637 else s470-  s639 :: SBool = ~ s478-  s640 :: SBool = if s478 then s639 else s478-  s641 :: SBool = ~ s486-  s642 :: SBool = if s486 then s641 else s486-  s643 :: SBool = ~ s494-  s644 :: SBool = if s494 then s643 else s494-  s645 :: SBool = ~ s502-  s646 :: SBool = if s502 then s645 else s502-  s647 :: SBool = ~ s510-  s648 :: SBool = if s510 then s647 else s510-  s649 :: SBool = ~ s518-  s650 :: SBool = if s518 then s649 else s518-  s651 :: SBool = ~ s526-  s652 :: SBool = if s526 then s651 else s526-  s653 :: SBool = ~ s534-  s654 :: SBool = if s534 then s653 else s534-  s655 :: SBool = ~ s542-  s656 :: SBool = if s542 then s655 else s542-  s657 :: SBool = ~ s550-  s658 :: SBool = if s550 then s657 else s550-  s659 :: SBool = ~ s558-  s660 :: SBool = if s558 then s659 else s558-  s661 :: SBool = ~ s566-  s662 :: SBool = if s566 then s661 else s566-  s663 :: SWord 1 = choose [15:15] s244-  s664 :: SBool = s5 /= s663-  s665 :: SBool = ~ s664-  s666 :: SBool = if s446 then s665 else s664-  s667 :: SBool = ~ s666-  s668 :: SBool = if s486 then s667 else s666-  s669 :: SBool = ~ s668-  s670 :: SBool = if s542 then s669 else s668-  s671 :: SWord 1 = choose [14:14] s244-  s672 :: SBool = s5 /= s671-  s673 :: SBool = ~ s672-  s674 :: SBool = if s454 then s673 else s672-  s675 :: SBool = ~ s674-  s676 :: SBool = if s494 then s675 else s674-  s677 :: SBool = ~ s676-  s678 :: SBool = if s550 then s677 else s676-  s679 :: SWord 1 = choose [13:13] s244-  s680 :: SBool = s5 /= s679-  s681 :: SBool = ~ s680-  s682 :: SBool = if s462 then s681 else s680-  s683 :: SBool = ~ s682-  s684 :: SBool = if s502 then s683 else s682-  s685 :: SBool = ~ s684-  s686 :: SBool = if s558 then s685 else s684-  s687 :: SWord 1 = choose [12:12] s244-  s688 :: SBool = s5 /= s687-  s689 :: SBool = ~ s688-  s690 :: SBool = if s470 then s689 else s688-  s691 :: SBool = ~ s690-  s692 :: SBool = if s510 then s691 else s690-  s693 :: SBool = ~ s692-  s694 :: SBool = if s566 then s693 else s692-  s695 :: SWord 1 = choose [11:11] s244-  s696 :: SBool = s5 /= s695-  s697 :: SBool = ~ s696-  s698 :: SBool = if s478 then s697 else s696-  s699 :: SBool = ~ s698-  s700 :: SBool = if s518 then s699 else s698-  s701 :: SWord 1 = choose [10:10] s244-  s702 :: SBool = s5 /= s701-  s703 :: SBool = ~ s702-  s704 :: SBool = if s486 then s703 else s702-  s705 :: SBool = ~ s704-  s706 :: SBool = if s526 then s705 else s704-  s707 :: SWord 1 = choose [9:9] s244-  s708 :: SBool = s5 /= s707-  s709 :: SBool = ~ s708-  s710 :: SBool = if s494 then s709 else s708-  s711 :: SBool = ~ s710-  s712 :: SBool = if s534 then s711 else s710-  s713 :: SWord 1 = choose [8:8] s244-  s714 :: SBool = s5 /= s713-  s715 :: SBool = ~ s714-  s716 :: SBool = if s502 then s715 else s714-  s717 :: SBool = ~ s716-  s718 :: SBool = if s542 then s717 else s716-  s719 :: SWord 1 = choose [7:7] s244-  s720 :: SBool = s5 /= s719-  s721 :: SBool = ~ s720-  s722 :: SBool = if s510 then s721 else s720-  s723 :: SBool = ~ s722-  s724 :: SBool = if s550 then s723 else s722-  s725 :: SWord 1 = choose [6:6] s244-  s726 :: SBool = s5 /= s725-  s727 :: SBool = ~ s726-  s728 :: SBool = if s518 then s727 else s726-  s729 :: SBool = ~ s728-  s730 :: SBool = if s558 then s729 else s728-  s731 :: SWord 1 = choose [5:5] s244-  s732 :: SBool = s5 /= s731-  s733 :: SBool = ~ s732-  s734 :: SBool = if s526 then s733 else s732-  s735 :: SBool = ~ s734-  s736 :: SBool = if s566 then s735 else s734-  s737 :: SWord 1 = choose [4:4] s244-  s738 :: SBool = s5 /= s737-  s739 :: SBool = ~ s738-  s740 :: SBool = if s534 then s739 else s738-  s741 :: SWord 1 = choose [3:3] s244-  s742 :: SBool = s5 /= s741-  s743 :: SBool = ~ s742-  s744 :: SBool = if s542 then s743 else s742-  s745 :: SWord 1 = choose [2:2] s244-  s746 :: SBool = s5 /= s745-  s747 :: SBool = ~ s746-  s748 :: SBool = if s550 then s747 else s746-  s749 :: SWord 1 = choose [1:1] s244-  s750 :: SBool = s5 /= s749-  s751 :: SBool = ~ s750-  s752 :: SBool = if s558 then s751 else s750-  s753 :: SWord 1 = choose [0:0] s244-  s754 :: SBool = s5 /= s753-  s755 :: SBool = ~ s754-  s756 :: SBool = if s566 then s755 else s754-  s758 :: SWord64 = if s756 then s757 else s102-  s760 :: SWord64 = s758 | s759-  s761 :: SWord64 = if s752 then s760 else s758-  s763 :: SWord64 = s761 | s762-  s764 :: SWord64 = if s748 then s763 else s761-  s766 :: SWord64 = s764 | s765-  s767 :: SWord64 = if s744 then s766 else s764-  s769 :: SWord64 = s767 | s768-  s770 :: SWord64 = if s740 then s769 else s767-  s772 :: SWord64 = s770 | s771-  s773 :: SWord64 = if s736 then s772 else s770-  s775 :: SWord64 = s773 | s774-  s776 :: SWord64 = if s730 then s775 else s773-  s778 :: SWord64 = s776 | s777-  s779 :: SWord64 = if s724 then s778 else s776-  s781 :: SWord64 = s779 | s780-  s782 :: SWord64 = if s718 then s781 else s779-  s784 :: SWord64 = s782 | s783-  s785 :: SWord64 = if s712 then s784 else s782-  s787 :: SWord64 = s785 | s786-  s788 :: SWord64 = if s706 then s787 else s785-  s790 :: SWord64 = s788 | s789-  s791 :: SWord64 = if s700 then s790 else s788-  s793 :: SWord64 = s791 | s792-  s794 :: SWord64 = if s694 then s793 else s791-  s796 :: SWord64 = s794 | s795-  s797 :: SWord64 = if s686 then s796 else s794-  s799 :: SWord64 = s797 | s798-  s800 :: SWord64 = if s678 then s799 else s797-  s802 :: SWord64 = s800 | s801-  s803 :: SWord64 = if s670 then s802 else s800-  s804 :: SWord64 = s101 | s803-  s805 :: SWord64 = if s662 then s804 else s803-  s806 :: SWord64 = s104 | s805-  s807 :: SWord64 = if s660 then s806 else s805-  s808 :: SWord64 = s107 | s807-  s809 :: SWord64 = if s658 then s808 else s807-  s810 :: SWord64 = s110 | s809-  s811 :: SWord64 = if s656 then s810 else s809-  s812 :: SWord64 = s113 | s811-  s813 :: SWord64 = if s654 then s812 else s811-  s814 :: SWord64 = s116 | s813-  s815 :: SWord64 = if s652 then s814 else s813-  s816 :: SWord64 = s119 | s815-  s817 :: SWord64 = if s650 then s816 else s815-  s818 :: SWord64 = s122 | s817-  s819 :: SWord64 = if s648 then s818 else s817-  s820 :: SWord64 = s125 | s819-  s821 :: SWord64 = if s646 then s820 else s819-  s822 :: SWord64 = s128 | s821-  s823 :: SWord64 = if s644 then s822 else s821-  s824 :: SWord64 = s131 | s823-  s825 :: SWord64 = if s642 then s824 else s823-  s826 :: SWord64 = s134 | s825-  s827 :: SWord64 = if s640 then s826 else s825-  s828 :: SWord64 = s137 | s827-  s829 :: SWord64 = if s638 then s828 else s827-  s830 :: SWord64 = s140 | s829-  s831 :: SWord64 = if s636 then s830 else s829-  s832 :: SWord64 = s143 | s831-  s833 :: SWord64 = if s634 then s832 else s831-  s834 :: SWord64 = s146 | s833-  s835 :: SWord64 = if s632 then s834 else s833-  s836 :: SWord64 = s149 | s835-  s837 :: SWord64 = if s630 then s836 else s835-  s838 :: SWord64 = s152 | s837-  s839 :: SWord64 = if s628 then s838 else s837-  s840 :: SWord64 = s155 | s839-  s841 :: SWord64 = if s626 then s840 else s839-  s842 :: SWord64 = s158 | s841-  s843 :: SWord64 = if s624 then s842 else s841-  s844 :: SWord64 = s161 | s843-  s845 :: SWord64 = if s622 then s844 else s843-  s846 :: SWord64 = s164 | s845-  s847 :: SWord64 = if s620 then s846 else s845-  s848 :: SWord64 = s167 | s847-  s849 :: SWord64 = if s618 then s848 else s847-  s850 :: SWord64 = s170 | s849-  s851 :: SWord64 = if s616 then s850 else s849-  s852 :: SWord64 = s173 | s851-  s853 :: SWord64 = if s614 then s852 else s851-  s854 :: SWord64 = s176 | s853-  s855 :: SWord64 = if s612 then s854 else s853-  s856 :: SWord64 = s179 | s855-  s857 :: SWord64 = if s610 then s856 else s855-  s858 :: SWord64 = s182 | s857-  s859 :: SWord64 = if s608 then s858 else s857-  s860 :: SWord64 = s185 | s859-  s861 :: SWord64 = if s606 then s860 else s859-  s862 :: SWord64 = s188 | s861-  s863 :: SWord64 = if s604 then s862 else s861-  s864 :: SWord64 = s191 | s863-  s865 :: SWord64 = if s602 then s864 else s863-  s866 :: SWord64 = s194 | s865-  s867 :: SWord64 = if s600 then s866 else s865-  s868 :: SWord64 = s197 | s867-  s869 :: SWord64 = if s598 then s868 else s867-  s870 :: SWord64 = s200 | s869-  s871 :: SWord64 = if s596 then s870 else s869-  s872 :: SWord64 = s203 | s871-  s873 :: SWord64 = if s594 then s872 else s871-  s874 :: SWord64 = s206 | s873-  s875 :: SWord64 = if s592 then s874 else s873-  s876 :: SWord64 = s209 | s875-  s877 :: SWord64 = if s590 then s876 else s875-  s878 :: SWord64 = s212 | s877-  s879 :: SWord64 = if s588 then s878 else s877-  s880 :: SWord64 = s215 | s879-  s881 :: SWord64 = if s586 then s880 else s879-  s882 :: SWord64 = s218 | s881-  s883 :: SWord64 = if s584 then s882 else s881-  s884 :: SWord64 = s221 | s883-  s885 :: SWord64 = if s582 then s884 else s883-  s886 :: SWord64 = s224 | s885-  s887 :: SWord64 = if s580 then s886 else s885-  s888 :: SWord64 = s227 | s887-  s889 :: SWord64 = if s578 then s888 else s887-  s890 :: SWord64 = s230 | s889-  s891 :: SWord64 = if s576 then s890 else s889-  s892 :: SWord64 = s233 | s891-  s893 :: SWord64 = if s574 then s892 else s891-  s894 :: SWord64 = s236 | s893-  s895 :: SWord64 = if s572 then s894 else s893-  s896 :: SWord64 = s239 | s895-  s897 :: SWord64 = if s570 then s896 else s895-  s898 :: SWord64 = s242 | s897-  s899 :: SWord64 = if s568 then s898 else s897-  s900 :: SWord16 = choose [15:0] s899-  s901 :: SWord64 = s0 # s900-  s902 :: SWord 1 = choose [0:0] s901-  s903 :: SBool = s5 /= s902-  s904 :: SWord 1 = choose [47:47] s1-  s905 :: SBool = s5 /= s904-  s906 :: SWord 1 = choose [46:46] s1-  s907 :: SBool = s5 /= s906-  s908 :: SWord 1 = choose [45:45] s1-  s909 :: SBool = s5 /= s908-  s910 :: SWord 1 = choose [44:44] s1-  s911 :: SBool = s5 /= s910-  s912 :: SWord 1 = choose [43:43] s1-  s913 :: SBool = s5 /= s912-  s914 :: SWord 1 = choose [42:42] s1-  s915 :: SBool = s5 /= s914-  s916 :: SWord 1 = choose [41:41] s1-  s917 :: SBool = s5 /= s916-  s918 :: SWord 1 = choose [40:40] s1-  s919 :: SBool = s5 /= s918-  s920 :: SWord 1 = choose [39:39] s1-  s921 :: SBool = s5 /= s920-  s922 :: SWord 1 = choose [38:38] s1-  s923 :: SBool = s5 /= s922-  s924 :: SWord 1 = choose [37:37] s1-  s925 :: SBool = s5 /= s924-  s926 :: SWord 1 = choose [36:36] s1-  s927 :: SBool = s5 /= s926-  s928 :: SWord 1 = choose [35:35] s1-  s929 :: SBool = s5 /= s928-  s930 :: SWord 1 = choose [34:34] s1-  s931 :: SBool = s5 /= s930-  s932 :: SWord 1 = choose [33:33] s1-  s933 :: SBool = s5 /= s932-  s934 :: SWord 1 = choose [32:32] s1-  s935 :: SBool = s5 /= s934-  s936 :: SWord 1 = choose [31:31] s1-  s937 :: SBool = s5 /= s936-  s938 :: SWord 1 = choose [30:30] s1-  s939 :: SBool = s5 /= s938-  s940 :: SWord 1 = choose [29:29] s1-  s941 :: SBool = s5 /= s940-  s942 :: SWord 1 = choose [28:28] s1-  s943 :: SBool = s5 /= s942-  s944 :: SWord 1 = choose [27:27] s1-  s945 :: SBool = s5 /= s944-  s946 :: SWord 1 = choose [26:26] s1-  s947 :: SBool = s5 /= s946-  s948 :: SWord 1 = choose [25:25] s1-  s949 :: SBool = s5 /= s948-  s950 :: SWord 1 = choose [24:24] s1-  s951 :: SBool = s5 /= s950-  s952 :: SWord 1 = choose [23:23] s1-  s953 :: SBool = s5 /= s952-  s954 :: SWord 1 = choose [22:22] s1-  s955 :: SBool = s5 /= s954-  s956 :: SWord 1 = choose [21:21] s1-  s957 :: SBool = s5 /= s956-  s958 :: SWord 1 = choose [20:20] s1-  s959 :: SBool = s5 /= s958-  s960 :: SWord 1 = choose [19:19] s1-  s961 :: SBool = s5 /= s960-  s962 :: SWord 1 = choose [18:18] s1-  s963 :: SBool = s5 /= s962-  s964 :: SWord 1 = choose [17:17] s1-  s965 :: SBool = s5 /= s964-  s966 :: SWord 1 = choose [16:16] s1-  s967 :: SBool = s5 /= s966-  s968 :: SWord 1 = choose [15:15] s1-  s969 :: SBool = s5 /= s968-  s970 :: SWord 1 = choose [14:14] s1-  s971 :: SBool = s5 /= s970-  s972 :: SWord 1 = choose [13:13] s1-  s973 :: SBool = s5 /= s972-  s974 :: SWord 1 = choose [12:12] s1-  s975 :: SBool = s5 /= s974-  s976 :: SWord 1 = choose [11:11] s1-  s977 :: SBool = s5 /= s976-  s978 :: SWord 1 = choose [10:10] s1-  s979 :: SBool = s5 /= s978-  s980 :: SWord 1 = choose [9:9] s1-  s981 :: SBool = s5 /= s980-  s982 :: SWord 1 = choose [8:8] s1-  s983 :: SBool = s5 /= s982-  s984 :: SWord 1 = choose [7:7] s1-  s985 :: SBool = s5 /= s984-  s986 :: SWord 1 = choose [6:6] s1-  s987 :: SBool = s5 /= s986-  s988 :: SWord 1 = choose [5:5] s1-  s989 :: SBool = s5 /= s988-  s990 :: SWord 1 = choose [4:4] s1-  s991 :: SBool = s5 /= s990-  s992 :: SWord 1 = choose [3:3] s1-  s993 :: SBool = s5 /= s992-  s994 :: SWord 1 = choose [2:2] s1-  s995 :: SBool = s5 /= s994-  s996 :: SWord 1 = choose [1:1] s1-  s997 :: SBool = s5 /= s996-  s998 :: SWord 1 = choose [0:0] s1-  s999 :: SBool = s5 /= s998-  s1000 :: SWord64 = if s999 then s101 else s102-  s1001 :: SWord64 = s104 | s1000-  s1002 :: SWord64 = if s997 then s1001 else s1000-  s1003 :: SWord64 = s107 | s1002-  s1004 :: SWord64 = if s995 then s1003 else s1002-  s1005 :: SWord64 = s110 | s1004-  s1006 :: SWord64 = if s993 then s1005 else s1004-  s1007 :: SWord64 = s113 | s1006-  s1008 :: SWord64 = if s991 then s1007 else s1006-  s1009 :: SWord64 = s116 | s1008-  s1010 :: SWord64 = if s989 then s1009 else s1008-  s1011 :: SWord64 = s119 | s1010-  s1012 :: SWord64 = if s987 then s1011 else s1010-  s1013 :: SWord64 = s122 | s1012-  s1014 :: SWord64 = if s985 then s1013 else s1012-  s1015 :: SWord64 = s125 | s1014-  s1016 :: SWord64 = if s983 then s1015 else s1014-  s1017 :: SWord64 = s128 | s1016-  s1018 :: SWord64 = if s981 then s1017 else s1016-  s1019 :: SWord64 = s131 | s1018-  s1020 :: SWord64 = if s979 then s1019 else s1018-  s1021 :: SWord64 = s134 | s1020-  s1022 :: SWord64 = if s977 then s1021 else s1020-  s1023 :: SWord64 = s137 | s1022-  s1024 :: SWord64 = if s975 then s1023 else s1022-  s1025 :: SWord64 = s140 | s1024-  s1026 :: SWord64 = if s973 then s1025 else s1024-  s1027 :: SWord64 = s143 | s1026-  s1028 :: SWord64 = if s971 then s1027 else s1026-  s1029 :: SWord64 = s146 | s1028-  s1030 :: SWord64 = if s969 then s1029 else s1028-  s1031 :: SWord64 = s149 | s1030-  s1032 :: SWord64 = if s967 then s1031 else s1030-  s1033 :: SWord64 = s152 | s1032-  s1034 :: SWord64 = if s965 then s1033 else s1032-  s1035 :: SWord64 = s155 | s1034-  s1036 :: SWord64 = if s963 then s1035 else s1034-  s1037 :: SWord64 = s158 | s1036-  s1038 :: SWord64 = if s961 then s1037 else s1036-  s1039 :: SWord64 = s161 | s1038-  s1040 :: SWord64 = if s959 then s1039 else s1038-  s1041 :: SWord64 = s164 | s1040-  s1042 :: SWord64 = if s957 then s1041 else s1040-  s1043 :: SWord64 = s167 | s1042-  s1044 :: SWord64 = if s955 then s1043 else s1042-  s1045 :: SWord64 = s170 | s1044-  s1046 :: SWord64 = if s953 then s1045 else s1044-  s1047 :: SWord64 = s173 | s1046-  s1048 :: SWord64 = if s951 then s1047 else s1046-  s1049 :: SWord64 = s176 | s1048-  s1050 :: SWord64 = if s949 then s1049 else s1048-  s1051 :: SWord64 = s179 | s1050-  s1052 :: SWord64 = if s947 then s1051 else s1050-  s1053 :: SWord64 = s182 | s1052-  s1054 :: SWord64 = if s945 then s1053 else s1052-  s1055 :: SWord64 = s185 | s1054-  s1056 :: SWord64 = if s943 then s1055 else s1054-  s1057 :: SWord64 = s188 | s1056-  s1058 :: SWord64 = if s941 then s1057 else s1056-  s1059 :: SWord64 = s191 | s1058-  s1060 :: SWord64 = if s939 then s1059 else s1058-  s1061 :: SWord64 = s194 | s1060-  s1062 :: SWord64 = if s937 then s1061 else s1060-  s1063 :: SWord64 = s197 | s1062-  s1064 :: SWord64 = if s935 then s1063 else s1062-  s1065 :: SWord64 = s200 | s1064-  s1066 :: SWord64 = if s933 then s1065 else s1064-  s1067 :: SWord64 = s203 | s1066-  s1068 :: SWord64 = if s931 then s1067 else s1066-  s1069 :: SWord64 = s206 | s1068-  s1070 :: SWord64 = if s929 then s1069 else s1068-  s1071 :: SWord64 = s209 | s1070-  s1072 :: SWord64 = if s927 then s1071 else s1070-  s1073 :: SWord64 = s212 | s1072-  s1074 :: SWord64 = if s925 then s1073 else s1072-  s1075 :: SWord64 = s215 | s1074-  s1076 :: SWord64 = if s923 then s1075 else s1074-  s1077 :: SWord64 = s218 | s1076-  s1078 :: SWord64 = if s921 then s1077 else s1076-  s1079 :: SWord64 = s221 | s1078-  s1080 :: SWord64 = if s919 then s1079 else s1078-  s1081 :: SWord64 = s224 | s1080-  s1082 :: SWord64 = if s917 then s1081 else s1080-  s1083 :: SWord64 = s227 | s1082-  s1084 :: SWord64 = if s915 then s1083 else s1082-  s1085 :: SWord64 = s230 | s1084-  s1086 :: SWord64 = if s913 then s1085 else s1084-  s1087 :: SWord64 = s233 | s1086-  s1088 :: SWord64 = if s911 then s1087 else s1086-  s1089 :: SWord64 = s236 | s1088-  s1090 :: SWord64 = if s909 then s1089 else s1088-  s1091 :: SWord64 = s239 | s1090-  s1092 :: SWord64 = if s907 then s1091 else s1090-  s1093 :: SWord64 = s242 | s1092-  s1094 :: SWord64 = if s905 then s1093 else s1092-  s1095 :: SWord 1 = choose [63:63] s1094-  s1096 :: SBool = s5 /= s1095-  s1097 :: SWord 1 = choose [62:62] s1094-  s1098 :: SBool = s5 /= s1097-  s1099 :: SWord 1 = choose [61:61] s1094-  s1100 :: SBool = s5 /= s1099-  s1101 :: SWord 1 = choose [60:60] s1094-  s1102 :: SBool = s5 /= s1101-  s1103 :: SWord 1 = choose [59:59] s1094-  s1104 :: SBool = s5 /= s1103-  s1105 :: SBool = ~ s1104-  s1106 :: SBool = if s1096 then s1105 else s1104-  s1107 :: SWord 1 = choose [58:58] s1094-  s1108 :: SBool = s5 /= s1107-  s1109 :: SBool = ~ s1108-  s1110 :: SBool = if s1098 then s1109 else s1108-  s1111 :: SWord 1 = choose [57:57] s1094-  s1112 :: SBool = s5 /= s1111-  s1113 :: SBool = ~ s1112-  s1114 :: SBool = if s1100 then s1113 else s1112-  s1115 :: SWord 1 = choose [56:56] s1094-  s1116 :: SBool = s5 /= s1115-  s1117 :: SBool = ~ s1116-  s1118 :: SBool = if s1102 then s1117 else s1116-  s1119 :: SWord 1 = choose [55:55] s1094-  s1120 :: SBool = s5 /= s1119-  s1121 :: SBool = ~ s1120-  s1122 :: SBool = if s1106 then s1121 else s1120-  s1123 :: SWord 1 = choose [54:54] s1094-  s1124 :: SBool = s5 /= s1123-  s1125 :: SBool = ~ s1124-  s1126 :: SBool = if s1110 then s1125 else s1124-  s1127 :: SWord 1 = choose [53:53] s1094-  s1128 :: SBool = s5 /= s1127-  s1129 :: SBool = ~ s1128-  s1130 :: SBool = if s1114 then s1129 else s1128-  s1131 :: SWord 1 = choose [52:52] s1094-  s1132 :: SBool = s5 /= s1131-  s1133 :: SBool = ~ s1132-  s1134 :: SBool = if s1096 then s1133 else s1132-  s1135 :: SBool = ~ s1134-  s1136 :: SBool = if s1118 then s1135 else s1134-  s1137 :: SWord 1 = choose [51:51] s1094-  s1138 :: SBool = s5 /= s1137-  s1139 :: SBool = ~ s1138-  s1140 :: SBool = if s1098 then s1139 else s1138-  s1141 :: SBool = ~ s1140-  s1142 :: SBool = if s1122 then s1141 else s1140-  s1143 :: SWord 1 = choose [50:50] s1094-  s1144 :: SBool = s5 /= s1143-  s1145 :: SBool = ~ s1144-  s1146 :: SBool = if s1100 then s1145 else s1144-  s1147 :: SBool = ~ s1146-  s1148 :: SBool = if s1126 then s1147 else s1146-  s1149 :: SWord 1 = choose [49:49] s1094-  s1150 :: SBool = s5 /= s1149-  s1151 :: SBool = ~ s1150-  s1152 :: SBool = if s1102 then s1151 else s1150-  s1153 :: SBool = ~ s1152-  s1154 :: SBool = if s1130 then s1153 else s1152-  s1155 :: SWord 1 = choose [48:48] s1094-  s1156 :: SBool = s5 /= s1155-  s1157 :: SBool = ~ s1156-  s1158 :: SBool = if s1106 then s1157 else s1156-  s1159 :: SBool = ~ s1158-  s1160 :: SBool = if s1136 then s1159 else s1158-  s1161 :: SWord 1 = choose [47:47] s1094-  s1162 :: SBool = s5 /= s1161-  s1163 :: SBool = ~ s1162-  s1164 :: SBool = if s1096 then s1163 else s1162-  s1165 :: SBool = ~ s1164-  s1166 :: SBool = if s1110 then s1165 else s1164-  s1167 :: SBool = ~ s1166-  s1168 :: SBool = if s1142 then s1167 else s1166-  s1169 :: SWord 1 = choose [46:46] s1094-  s1170 :: SBool = s5 /= s1169-  s1171 :: SBool = ~ s1170-  s1172 :: SBool = if s1098 then s1171 else s1170-  s1173 :: SBool = ~ s1172-  s1174 :: SBool = if s1114 then s1173 else s1172-  s1175 :: SBool = ~ s1174-  s1176 :: SBool = if s1148 then s1175 else s1174-  s1177 :: SWord 1 = choose [45:45] s1094-  s1178 :: SBool = s5 /= s1177-  s1179 :: SBool = ~ s1178-  s1180 :: SBool = if s1100 then s1179 else s1178-  s1181 :: SBool = ~ s1180-  s1182 :: SBool = if s1118 then s1181 else s1180-  s1183 :: SBool = ~ s1182-  s1184 :: SBool = if s1154 then s1183 else s1182-  s1185 :: SWord 1 = choose [44:44] s1094-  s1186 :: SBool = s5 /= s1185-  s1187 :: SBool = ~ s1186-  s1188 :: SBool = if s1102 then s1187 else s1186-  s1189 :: SBool = ~ s1188-  s1190 :: SBool = if s1122 then s1189 else s1188-  s1191 :: SBool = ~ s1190-  s1192 :: SBool = if s1160 then s1191 else s1190-  s1193 :: SWord 1 = choose [43:43] s1094-  s1194 :: SBool = s5 /= s1193-  s1195 :: SBool = ~ s1194-  s1196 :: SBool = if s1106 then s1195 else s1194-  s1197 :: SBool = ~ s1196-  s1198 :: SBool = if s1126 then s1197 else s1196-  s1199 :: SBool = ~ s1198-  s1200 :: SBool = if s1168 then s1199 else s1198-  s1201 :: SWord 1 = choose [42:42] s1094-  s1202 :: SBool = s5 /= s1201-  s1203 :: SBool = ~ s1202-  s1204 :: SBool = if s1110 then s1203 else s1202-  s1205 :: SBool = ~ s1204-  s1206 :: SBool = if s1130 then s1205 else s1204-  s1207 :: SBool = ~ s1206-  s1208 :: SBool = if s1176 then s1207 else s1206-  s1209 :: SWord 1 = choose [41:41] s1094-  s1210 :: SBool = s5 /= s1209-  s1211 :: SBool = ~ s1210-  s1212 :: SBool = if s1114 then s1211 else s1210-  s1213 :: SBool = ~ s1212-  s1214 :: SBool = if s1136 then s1213 else s1212-  s1215 :: SBool = ~ s1214-  s1216 :: SBool = if s1184 then s1215 else s1214-  s1217 :: SWord 1 = choose [40:40] s1094-  s1218 :: SBool = s5 /= s1217-  s1219 :: SBool = ~ s1218-  s1220 :: SBool = if s1118 then s1219 else s1218-  s1221 :: SBool = ~ s1220-  s1222 :: SBool = if s1142 then s1221 else s1220-  s1223 :: SBool = ~ s1222-  s1224 :: SBool = if s1192 then s1223 else s1222-  s1225 :: SWord 1 = choose [39:39] s1094-  s1226 :: SBool = s5 /= s1225-  s1227 :: SBool = ~ s1226-  s1228 :: SBool = if s1122 then s1227 else s1226-  s1229 :: SBool = ~ s1228-  s1230 :: SBool = if s1148 then s1229 else s1228-  s1231 :: SBool = ~ s1230-  s1232 :: SBool = if s1200 then s1231 else s1230-  s1233 :: SWord 1 = choose [38:38] s1094-  s1234 :: SBool = s5 /= s1233-  s1235 :: SBool = ~ s1234-  s1236 :: SBool = if s1126 then s1235 else s1234-  s1237 :: SBool = ~ s1236-  s1238 :: SBool = if s1154 then s1237 else s1236-  s1239 :: SBool = ~ s1238-  s1240 :: SBool = if s1208 then s1239 else s1238-  s1241 :: SWord 1 = choose [37:37] s1094-  s1242 :: SBool = s5 /= s1241-  s1243 :: SBool = ~ s1242-  s1244 :: SBool = if s1130 then s1243 else s1242-  s1245 :: SBool = ~ s1244-  s1246 :: SBool = if s1160 then s1245 else s1244-  s1247 :: SBool = ~ s1246-  s1248 :: SBool = if s1216 then s1247 else s1246-  s1249 :: SWord 1 = choose [36:36] s1094-  s1250 :: SBool = s5 /= s1249-  s1251 :: SBool = ~ s1250-  s1252 :: SBool = if s1136 then s1251 else s1250-  s1253 :: SBool = ~ s1252-  s1254 :: SBool = if s1168 then s1253 else s1252-  s1255 :: SBool = ~ s1254-  s1256 :: SBool = if s1224 then s1255 else s1254-  s1257 :: SWord 1 = choose [35:35] s1094-  s1258 :: SBool = s5 /= s1257-  s1259 :: SBool = ~ s1258-  s1260 :: SBool = if s1142 then s1259 else s1258-  s1261 :: SBool = ~ s1260-  s1262 :: SBool = if s1176 then s1261 else s1260-  s1263 :: SBool = ~ s1262-  s1264 :: SBool = if s1232 then s1263 else s1262-  s1265 :: SWord 1 = choose [34:34] s1094-  s1266 :: SBool = s5 /= s1265-  s1267 :: SBool = ~ s1266-  s1268 :: SBool = if s1148 then s1267 else s1266-  s1269 :: SBool = ~ s1268-  s1270 :: SBool = if s1184 then s1269 else s1268-  s1271 :: SBool = ~ s1270-  s1272 :: SBool = if s1240 then s1271 else s1270-  s1273 :: SWord 1 = choose [33:33] s1094-  s1274 :: SBool = s5 /= s1273-  s1275 :: SBool = ~ s1274-  s1276 :: SBool = if s1154 then s1275 else s1274-  s1277 :: SBool = ~ s1276-  s1278 :: SBool = if s1192 then s1277 else s1276-  s1279 :: SBool = ~ s1278-  s1280 :: SBool = if s1248 then s1279 else s1278-  s1281 :: SWord 1 = choose [32:32] s1094-  s1282 :: SBool = s5 /= s1281-  s1283 :: SBool = ~ s1282-  s1284 :: SBool = if s1160 then s1283 else s1282-  s1285 :: SBool = ~ s1284-  s1286 :: SBool = if s1200 then s1285 else s1284-  s1287 :: SBool = ~ s1286-  s1288 :: SBool = if s1256 then s1287 else s1286-  s1289 :: SWord 1 = choose [31:31] s1094-  s1290 :: SBool = s5 /= s1289-  s1291 :: SBool = ~ s1290-  s1292 :: SBool = if s1168 then s1291 else s1290-  s1293 :: SBool = ~ s1292-  s1294 :: SBool = if s1208 then s1293 else s1292-  s1295 :: SBool = ~ s1294-  s1296 :: SBool = if s1264 then s1295 else s1294-  s1297 :: SWord 1 = choose [30:30] s1094-  s1298 :: SBool = s5 /= s1297-  s1299 :: SBool = ~ s1298-  s1300 :: SBool = if s1176 then s1299 else s1298-  s1301 :: SBool = ~ s1300-  s1302 :: SBool = if s1216 then s1301 else s1300-  s1303 :: SBool = ~ s1302-  s1304 :: SBool = if s1272 then s1303 else s1302-  s1305 :: SWord 1 = choose [29:29] s1094-  s1306 :: SBool = s5 /= s1305-  s1307 :: SBool = ~ s1306-  s1308 :: SBool = if s1184 then s1307 else s1306-  s1309 :: SBool = ~ s1308-  s1310 :: SBool = if s1224 then s1309 else s1308-  s1311 :: SBool = ~ s1310-  s1312 :: SBool = if s1280 then s1311 else s1310-  s1313 :: SWord 1 = choose [28:28] s1094-  s1314 :: SBool = s5 /= s1313-  s1315 :: SBool = ~ s1314-  s1316 :: SBool = if s1192 then s1315 else s1314-  s1317 :: SBool = ~ s1316-  s1318 :: SBool = if s1232 then s1317 else s1316-  s1319 :: SBool = ~ s1318-  s1320 :: SBool = if s1288 then s1319 else s1318-  s1321 :: SWord 1 = choose [27:27] s1094-  s1322 :: SBool = s5 /= s1321-  s1323 :: SBool = ~ s1322-  s1324 :: SBool = if s1200 then s1323 else s1322-  s1325 :: SBool = ~ s1324-  s1326 :: SBool = if s1240 then s1325 else s1324-  s1327 :: SBool = ~ s1326-  s1328 :: SBool = if s1296 then s1327 else s1326-  s1329 :: SWord 1 = choose [26:26] s1094-  s1330 :: SBool = s5 /= s1329-  s1331 :: SBool = ~ s1330-  s1332 :: SBool = if s1208 then s1331 else s1330-  s1333 :: SBool = ~ s1332-  s1334 :: SBool = if s1248 then s1333 else s1332-  s1335 :: SBool = ~ s1334-  s1336 :: SBool = if s1304 then s1335 else s1334-  s1337 :: SWord 1 = choose [25:25] s1094-  s1338 :: SBool = s5 /= s1337-  s1339 :: SBool = ~ s1338-  s1340 :: SBool = if s1216 then s1339 else s1338-  s1341 :: SBool = ~ s1340-  s1342 :: SBool = if s1256 then s1341 else s1340-  s1343 :: SBool = ~ s1342-  s1344 :: SBool = if s1312 then s1343 else s1342-  s1345 :: SWord 1 = choose [24:24] s1094-  s1346 :: SBool = s5 /= s1345-  s1347 :: SBool = ~ s1346-  s1348 :: SBool = if s1224 then s1347 else s1346-  s1349 :: SBool = ~ s1348-  s1350 :: SBool = if s1264 then s1349 else s1348-  s1351 :: SBool = ~ s1350-  s1352 :: SBool = if s1320 then s1351 else s1350-  s1353 :: SWord 1 = choose [23:23] s1094-  s1354 :: SBool = s5 /= s1353-  s1355 :: SBool = ~ s1354-  s1356 :: SBool = if s1232 then s1355 else s1354-  s1357 :: SBool = ~ s1356-  s1358 :: SBool = if s1272 then s1357 else s1356-  s1359 :: SBool = ~ s1358-  s1360 :: SBool = if s1328 then s1359 else s1358-  s1361 :: SWord 1 = choose [22:22] s1094-  s1362 :: SBool = s5 /= s1361-  s1363 :: SBool = ~ s1362-  s1364 :: SBool = if s1240 then s1363 else s1362-  s1365 :: SBool = ~ s1364-  s1366 :: SBool = if s1280 then s1365 else s1364-  s1367 :: SBool = ~ s1366-  s1368 :: SBool = if s1336 then s1367 else s1366-  s1369 :: SWord 1 = choose [21:21] s1094-  s1370 :: SBool = s5 /= s1369-  s1371 :: SBool = ~ s1370-  s1372 :: SBool = if s1248 then s1371 else s1370-  s1373 :: SBool = ~ s1372-  s1374 :: SBool = if s1288 then s1373 else s1372-  s1375 :: SBool = ~ s1374-  s1376 :: SBool = if s1344 then s1375 else s1374-  s1377 :: SWord 1 = choose [20:20] s1094-  s1378 :: SBool = s5 /= s1377-  s1379 :: SBool = ~ s1378-  s1380 :: SBool = if s1256 then s1379 else s1378-  s1381 :: SBool = ~ s1380-  s1382 :: SBool = if s1296 then s1381 else s1380-  s1383 :: SBool = ~ s1382-  s1384 :: SBool = if s1352 then s1383 else s1382-  s1385 :: SWord 1 = choose [19:19] s1094-  s1386 :: SBool = s5 /= s1385-  s1387 :: SBool = ~ s1386-  s1388 :: SBool = if s1264 then s1387 else s1386-  s1389 :: SBool = ~ s1388-  s1390 :: SBool = if s1304 then s1389 else s1388-  s1391 :: SBool = ~ s1390-  s1392 :: SBool = if s1360 then s1391 else s1390-  s1393 :: SWord 1 = choose [18:18] s1094-  s1394 :: SBool = s5 /= s1393-  s1395 :: SBool = ~ s1394-  s1396 :: SBool = if s1272 then s1395 else s1394-  s1397 :: SBool = ~ s1396-  s1398 :: SBool = if s1312 then s1397 else s1396-  s1399 :: SBool = ~ s1398-  s1400 :: SBool = if s1368 then s1399 else s1398-  s1401 :: SWord 1 = choose [17:17] s1094-  s1402 :: SBool = s5 /= s1401-  s1403 :: SBool = ~ s1402-  s1404 :: SBool = if s1280 then s1403 else s1402-  s1405 :: SBool = ~ s1404-  s1406 :: SBool = if s1320 then s1405 else s1404-  s1407 :: SBool = ~ s1406-  s1408 :: SBool = if s1376 then s1407 else s1406-  s1409 :: SWord 1 = choose [16:16] s1094-  s1410 :: SBool = s5 /= s1409-  s1411 :: SBool = ~ s1410-  s1412 :: SBool = if s1288 then s1411 else s1410-  s1413 :: SBool = ~ s1412-  s1414 :: SBool = if s1328 then s1413 else s1412-  s1415 :: SBool = ~ s1414-  s1416 :: SBool = if s1384 then s1415 else s1414-  s1417 :: SBool = ~ s1096-  s1418 :: SBool = if s1096 then s1417 else s1096-  s1419 :: SBool = ~ s1098-  s1420 :: SBool = if s1098 then s1419 else s1098-  s1421 :: SBool = ~ s1100-  s1422 :: SBool = if s1100 then s1421 else s1100-  s1423 :: SBool = ~ s1102-  s1424 :: SBool = if s1102 then s1423 else s1102-  s1425 :: SBool = ~ s1106-  s1426 :: SBool = if s1106 then s1425 else s1106-  s1427 :: SBool = ~ s1110-  s1428 :: SBool = if s1110 then s1427 else s1110-  s1429 :: SBool = ~ s1114-  s1430 :: SBool = if s1114 then s1429 else s1114-  s1431 :: SBool = ~ s1118-  s1432 :: SBool = if s1118 then s1431 else s1118-  s1433 :: SBool = ~ s1122-  s1434 :: SBool = if s1122 then s1433 else s1122-  s1435 :: SBool = ~ s1126-  s1436 :: SBool = if s1126 then s1435 else s1126-  s1437 :: SBool = ~ s1130-  s1438 :: SBool = if s1130 then s1437 else s1130-  s1439 :: SBool = ~ s1136-  s1440 :: SBool = if s1136 then s1439 else s1136-  s1441 :: SBool = ~ s1142-  s1442 :: SBool = if s1142 then s1441 else s1142-  s1443 :: SBool = ~ s1148-  s1444 :: SBool = if s1148 then s1443 else s1148-  s1445 :: SBool = ~ s1154-  s1446 :: SBool = if s1154 then s1445 else s1154-  s1447 :: SBool = ~ s1160-  s1448 :: SBool = if s1160 then s1447 else s1160-  s1449 :: SBool = ~ s1168-  s1450 :: SBool = if s1168 then s1449 else s1168-  s1451 :: SBool = ~ s1176-  s1452 :: SBool = if s1176 then s1451 else s1176-  s1453 :: SBool = ~ s1184-  s1454 :: SBool = if s1184 then s1453 else s1184-  s1455 :: SBool = ~ s1192-  s1456 :: SBool = if s1192 then s1455 else s1192-  s1457 :: SBool = ~ s1200-  s1458 :: SBool = if s1200 then s1457 else s1200-  s1459 :: SBool = ~ s1208-  s1460 :: SBool = if s1208 then s1459 else s1208-  s1461 :: SBool = ~ s1216-  s1462 :: SBool = if s1216 then s1461 else s1216-  s1463 :: SBool = ~ s1224-  s1464 :: SBool = if s1224 then s1463 else s1224-  s1465 :: SBool = ~ s1232-  s1466 :: SBool = if s1232 then s1465 else s1232-  s1467 :: SBool = ~ s1240-  s1468 :: SBool = if s1240 then s1467 else s1240-  s1469 :: SBool = ~ s1248-  s1470 :: SBool = if s1248 then s1469 else s1248-  s1471 :: SBool = ~ s1256-  s1472 :: SBool = if s1256 then s1471 else s1256-  s1473 :: SBool = ~ s1264-  s1474 :: SBool = if s1264 then s1473 else s1264-  s1475 :: SBool = ~ s1272-  s1476 :: SBool = if s1272 then s1475 else s1272-  s1477 :: SBool = ~ s1280-  s1478 :: SBool = if s1280 then s1477 else s1280-  s1479 :: SBool = ~ s1288-  s1480 :: SBool = if s1288 then s1479 else s1288-  s1481 :: SBool = ~ s1296-  s1482 :: SBool = if s1296 then s1481 else s1296-  s1483 :: SBool = ~ s1304-  s1484 :: SBool = if s1304 then s1483 else s1304-  s1485 :: SBool = ~ s1312-  s1486 :: SBool = if s1312 then s1485 else s1312-  s1487 :: SBool = ~ s1320-  s1488 :: SBool = if s1320 then s1487 else s1320-  s1489 :: SBool = ~ s1328-  s1490 :: SBool = if s1328 then s1489 else s1328-  s1491 :: SBool = ~ s1336-  s1492 :: SBool = if s1336 then s1491 else s1336-  s1493 :: SBool = ~ s1344-  s1494 :: SBool = if s1344 then s1493 else s1344-  s1495 :: SBool = ~ s1352-  s1496 :: SBool = if s1352 then s1495 else s1352-  s1497 :: SBool = ~ s1360-  s1498 :: SBool = if s1360 then s1497 else s1360-  s1499 :: SBool = ~ s1368-  s1500 :: SBool = if s1368 then s1499 else s1368-  s1501 :: SBool = ~ s1376-  s1502 :: SBool = if s1376 then s1501 else s1376-  s1503 :: SBool = ~ s1384-  s1504 :: SBool = if s1384 then s1503 else s1384-  s1505 :: SBool = ~ s1392-  s1506 :: SBool = if s1392 then s1505 else s1392-  s1507 :: SBool = ~ s1400-  s1508 :: SBool = if s1400 then s1507 else s1400-  s1509 :: SBool = ~ s1408-  s1510 :: SBool = if s1408 then s1509 else s1408-  s1511 :: SBool = ~ s1416-  s1512 :: SBool = if s1416 then s1511 else s1416-  s1513 :: SWord 1 = choose [15:15] s1094-  s1514 :: SBool = s5 /= s1513-  s1515 :: SBool = ~ s1514-  s1516 :: SBool = if s1296 then s1515 else s1514-  s1517 :: SBool = ~ s1516-  s1518 :: SBool = if s1336 then s1517 else s1516-  s1519 :: SBool = ~ s1518-  s1520 :: SBool = if s1392 then s1519 else s1518-  s1521 :: SWord 1 = choose [14:14] s1094-  s1522 :: SBool = s5 /= s1521-  s1523 :: SBool = ~ s1522-  s1524 :: SBool = if s1304 then s1523 else s1522-  s1525 :: SBool = ~ s1524-  s1526 :: SBool = if s1344 then s1525 else s1524-  s1527 :: SBool = ~ s1526-  s1528 :: SBool = if s1400 then s1527 else s1526-  s1529 :: SWord 1 = choose [13:13] s1094-  s1530 :: SBool = s5 /= s1529-  s1531 :: SBool = ~ s1530-  s1532 :: SBool = if s1312 then s1531 else s1530-  s1533 :: SBool = ~ s1532-  s1534 :: SBool = if s1352 then s1533 else s1532-  s1535 :: SBool = ~ s1534-  s1536 :: SBool = if s1408 then s1535 else s1534-  s1537 :: SWord 1 = choose [12:12] s1094-  s1538 :: SBool = s5 /= s1537-  s1539 :: SBool = ~ s1538-  s1540 :: SBool = if s1320 then s1539 else s1538-  s1541 :: SBool = ~ s1540-  s1542 :: SBool = if s1360 then s1541 else s1540-  s1543 :: SBool = ~ s1542-  s1544 :: SBool = if s1416 then s1543 else s1542-  s1545 :: SWord 1 = choose [11:11] s1094-  s1546 :: SBool = s5 /= s1545-  s1547 :: SBool = ~ s1546-  s1548 :: SBool = if s1328 then s1547 else s1546-  s1549 :: SBool = ~ s1548-  s1550 :: SBool = if s1368 then s1549 else s1548-  s1551 :: SWord 1 = choose [10:10] s1094-  s1552 :: SBool = s5 /= s1551-  s1553 :: SBool = ~ s1552-  s1554 :: SBool = if s1336 then s1553 else s1552-  s1555 :: SBool = ~ s1554-  s1556 :: SBool = if s1376 then s1555 else s1554-  s1557 :: SWord 1 = choose [9:9] s1094-  s1558 :: SBool = s5 /= s1557-  s1559 :: SBool = ~ s1558-  s1560 :: SBool = if s1344 then s1559 else s1558-  s1561 :: SBool = ~ s1560-  s1562 :: SBool = if s1384 then s1561 else s1560-  s1563 :: SWord 1 = choose [8:8] s1094-  s1564 :: SBool = s5 /= s1563-  s1565 :: SBool = ~ s1564-  s1566 :: SBool = if s1352 then s1565 else s1564-  s1567 :: SBool = ~ s1566-  s1568 :: SBool = if s1392 then s1567 else s1566-  s1569 :: SWord 1 = choose [7:7] s1094-  s1570 :: SBool = s5 /= s1569-  s1571 :: SBool = ~ s1570-  s1572 :: SBool = if s1360 then s1571 else s1570-  s1573 :: SBool = ~ s1572-  s1574 :: SBool = if s1400 then s1573 else s1572-  s1575 :: SWord 1 = choose [6:6] s1094-  s1576 :: SBool = s5 /= s1575-  s1577 :: SBool = ~ s1576-  s1578 :: SBool = if s1368 then s1577 else s1576-  s1579 :: SBool = ~ s1578-  s1580 :: SBool = if s1408 then s1579 else s1578-  s1581 :: SWord 1 = choose [5:5] s1094-  s1582 :: SBool = s5 /= s1581-  s1583 :: SBool = ~ s1582-  s1584 :: SBool = if s1376 then s1583 else s1582-  s1585 :: SBool = ~ s1584-  s1586 :: SBool = if s1416 then s1585 else s1584-  s1587 :: SWord 1 = choose [4:4] s1094-  s1588 :: SBool = s5 /= s1587-  s1589 :: SBool = ~ s1588-  s1590 :: SBool = if s1384 then s1589 else s1588-  s1591 :: SWord 1 = choose [3:3] s1094-  s1592 :: SBool = s5 /= s1591-  s1593 :: SBool = ~ s1592-  s1594 :: SBool = if s1392 then s1593 else s1592-  s1595 :: SWord 1 = choose [2:2] s1094-  s1596 :: SBool = s5 /= s1595-  s1597 :: SBool = ~ s1596-  s1598 :: SBool = if s1400 then s1597 else s1596-  s1599 :: SWord 1 = choose [1:1] s1094-  s1600 :: SBool = s5 /= s1599-  s1601 :: SBool = ~ s1600-  s1602 :: SBool = if s1408 then s1601 else s1600-  s1603 :: SWord 1 = choose [0:0] s1094-  s1604 :: SBool = s5 /= s1603-  s1605 :: SBool = ~ s1604-  s1606 :: SBool = if s1416 then s1605 else s1604-  s1607 :: SWord64 = if s1606 then s757 else s102-  s1608 :: SWord64 = s759 | s1607-  s1609 :: SWord64 = if s1602 then s1608 else s1607-  s1610 :: SWord64 = s762 | s1609-  s1611 :: SWord64 = if s1598 then s1610 else s1609-  s1612 :: SWord64 = s765 | s1611-  s1613 :: SWord64 = if s1594 then s1612 else s1611-  s1614 :: SWord64 = s768 | s1613-  s1615 :: SWord64 = if s1590 then s1614 else s1613-  s1616 :: SWord64 = s771 | s1615-  s1617 :: SWord64 = if s1586 then s1616 else s1615-  s1618 :: SWord64 = s774 | s1617-  s1619 :: SWord64 = if s1580 then s1618 else s1617-  s1620 :: SWord64 = s777 | s1619-  s1621 :: SWord64 = if s1574 then s1620 else s1619-  s1622 :: SWord64 = s780 | s1621-  s1623 :: SWord64 = if s1568 then s1622 else s1621-  s1624 :: SWord64 = s783 | s1623-  s1625 :: SWord64 = if s1562 then s1624 else s1623-  s1626 :: SWord64 = s786 | s1625-  s1627 :: SWord64 = if s1556 then s1626 else s1625-  s1628 :: SWord64 = s789 | s1627-  s1629 :: SWord64 = if s1550 then s1628 else s1627-  s1630 :: SWord64 = s792 | s1629-  s1631 :: SWord64 = if s1544 then s1630 else s1629-  s1632 :: SWord64 = s795 | s1631-  s1633 :: SWord64 = if s1536 then s1632 else s1631-  s1634 :: SWord64 = s798 | s1633-  s1635 :: SWord64 = if s1528 then s1634 else s1633-  s1636 :: SWord64 = s801 | s1635-  s1637 :: SWord64 = if s1520 then s1636 else s1635-  s1638 :: SWord64 = s101 | s1637-  s1639 :: SWord64 = if s1512 then s1638 else s1637-  s1640 :: SWord64 = s104 | s1639-  s1641 :: SWord64 = if s1510 then s1640 else s1639-  s1642 :: SWord64 = s107 | s1641-  s1643 :: SWord64 = if s1508 then s1642 else s1641-  s1644 :: SWord64 = s110 | s1643-  s1645 :: SWord64 = if s1506 then s1644 else s1643-  s1646 :: SWord64 = s113 | s1645-  s1647 :: SWord64 = if s1504 then s1646 else s1645-  s1648 :: SWord64 = s116 | s1647-  s1649 :: SWord64 = if s1502 then s1648 else s1647-  s1650 :: SWord64 = s119 | s1649-  s1651 :: SWord64 = if s1500 then s1650 else s1649-  s1652 :: SWord64 = s122 | s1651-  s1653 :: SWord64 = if s1498 then s1652 else s1651-  s1654 :: SWord64 = s125 | s1653-  s1655 :: SWord64 = if s1496 then s1654 else s1653-  s1656 :: SWord64 = s128 | s1655-  s1657 :: SWord64 = if s1494 then s1656 else s1655-  s1658 :: SWord64 = s131 | s1657-  s1659 :: SWord64 = if s1492 then s1658 else s1657-  s1660 :: SWord64 = s134 | s1659-  s1661 :: SWord64 = if s1490 then s1660 else s1659-  s1662 :: SWord64 = s137 | s1661-  s1663 :: SWord64 = if s1488 then s1662 else s1661-  s1664 :: SWord64 = s140 | s1663-  s1665 :: SWord64 = if s1486 then s1664 else s1663-  s1666 :: SWord64 = s143 | s1665-  s1667 :: SWord64 = if s1484 then s1666 else s1665-  s1668 :: SWord64 = s146 | s1667-  s1669 :: SWord64 = if s1482 then s1668 else s1667-  s1670 :: SWord64 = s149 | s1669-  s1671 :: SWord64 = if s1480 then s1670 else s1669-  s1672 :: SWord64 = s152 | s1671-  s1673 :: SWord64 = if s1478 then s1672 else s1671-  s1674 :: SWord64 = s155 | s1673-  s1675 :: SWord64 = if s1476 then s1674 else s1673-  s1676 :: SWord64 = s158 | s1675-  s1677 :: SWord64 = if s1474 then s1676 else s1675-  s1678 :: SWord64 = s161 | s1677-  s1679 :: SWord64 = if s1472 then s1678 else s1677-  s1680 :: SWord64 = s164 | s1679-  s1681 :: SWord64 = if s1470 then s1680 else s1679-  s1682 :: SWord64 = s167 | s1681-  s1683 :: SWord64 = if s1468 then s1682 else s1681-  s1684 :: SWord64 = s170 | s1683-  s1685 :: SWord64 = if s1466 then s1684 else s1683-  s1686 :: SWord64 = s173 | s1685-  s1687 :: SWord64 = if s1464 then s1686 else s1685-  s1688 :: SWord64 = s176 | s1687-  s1689 :: SWord64 = if s1462 then s1688 else s1687-  s1690 :: SWord64 = s179 | s1689-  s1691 :: SWord64 = if s1460 then s1690 else s1689-  s1692 :: SWord64 = s182 | s1691-  s1693 :: SWord64 = if s1458 then s1692 else s1691-  s1694 :: SWord64 = s185 | s1693-  s1695 :: SWord64 = if s1456 then s1694 else s1693-  s1696 :: SWord64 = s188 | s1695-  s1697 :: SWord64 = if s1454 then s1696 else s1695-  s1698 :: SWord64 = s191 | s1697-  s1699 :: SWord64 = if s1452 then s1698 else s1697-  s1700 :: SWord64 = s194 | s1699-  s1701 :: SWord64 = if s1450 then s1700 else s1699-  s1702 :: SWord64 = s197 | s1701-  s1703 :: SWord64 = if s1448 then s1702 else s1701-  s1704 :: SWord64 = s200 | s1703-  s1705 :: SWord64 = if s1446 then s1704 else s1703-  s1706 :: SWord64 = s203 | s1705-  s1707 :: SWord64 = if s1444 then s1706 else s1705-  s1708 :: SWord64 = s206 | s1707-  s1709 :: SWord64 = if s1442 then s1708 else s1707-  s1710 :: SWord64 = s209 | s1709-  s1711 :: SWord64 = if s1440 then s1710 else s1709-  s1712 :: SWord64 = s212 | s1711-  s1713 :: SWord64 = if s1438 then s1712 else s1711-  s1714 :: SWord64 = s215 | s1713-  s1715 :: SWord64 = if s1436 then s1714 else s1713-  s1716 :: SWord64 = s218 | s1715-  s1717 :: SWord64 = if s1434 then s1716 else s1715-  s1718 :: SWord64 = s221 | s1717-  s1719 :: SWord64 = if s1432 then s1718 else s1717-  s1720 :: SWord64 = s224 | s1719-  s1721 :: SWord64 = if s1430 then s1720 else s1719-  s1722 :: SWord64 = s227 | s1721-  s1723 :: SWord64 = if s1428 then s1722 else s1721-  s1724 :: SWord64 = s230 | s1723-  s1725 :: SWord64 = if s1426 then s1724 else s1723-  s1726 :: SWord64 = s233 | s1725-  s1727 :: SWord64 = if s1424 then s1726 else s1725-  s1728 :: SWord64 = s236 | s1727-  s1729 :: SWord64 = if s1422 then s1728 else s1727-  s1730 :: SWord64 = s239 | s1729-  s1731 :: SWord64 = if s1420 then s1730 else s1729-  s1732 :: SWord64 = s242 | s1731-  s1733 :: SWord64 = if s1418 then s1732 else s1731-  s1734 :: SWord16 = choose [15:0] s1733-  s1735 :: SWord64 = s1 # s1734-  s1736 :: SWord 1 = choose [0:0] s1735-  s1737 :: SBool = s5 /= s1736-  s1738 :: SBool = s903 == s1737-  s1739 :: SWord 1 = choose [1:1] s901-  s1740 :: SBool = s5 /= s1739-  s1741 :: SWord 1 = choose [1:1] s1735-  s1742 :: SBool = s5 /= s1741-  s1743 :: SBool = s1740 == s1742-  s1744 :: SWord 1 = choose [2:2] s901-  s1745 :: SBool = s5 /= s1744-  s1746 :: SWord 1 = choose [2:2] s1735-  s1747 :: SBool = s5 /= s1746-  s1748 :: SBool = s1745 == s1747-  s1749 :: SWord 1 = choose [3:3] s901-  s1750 :: SBool = s5 /= s1749-  s1751 :: SWord 1 = choose [3:3] s1735-  s1752 :: SBool = s5 /= s1751-  s1753 :: SBool = s1750 == s1752-  s1754 :: SWord 1 = choose [4:4] s901-  s1755 :: SBool = s5 /= s1754-  s1756 :: SWord 1 = choose [4:4] s1735-  s1757 :: SBool = s5 /= s1756-  s1758 :: SBool = s1755 == s1757-  s1759 :: SWord 1 = choose [5:5] s901-  s1760 :: SBool = s5 /= s1759-  s1761 :: SWord 1 = choose [5:5] s1735-  s1762 :: SBool = s5 /= s1761-  s1763 :: SBool = s1760 == s1762-  s1764 :: SWord 1 = choose [6:6] s901-  s1765 :: SBool = s5 /= s1764-  s1766 :: SWord 1 = choose [6:6] s1735-  s1767 :: SBool = s5 /= s1766-  s1768 :: SBool = s1765 == s1767-  s1769 :: SWord 1 = choose [7:7] s901-  s1770 :: SBool = s5 /= s1769-  s1771 :: SWord 1 = choose [7:7] s1735-  s1772 :: SBool = s5 /= s1771-  s1773 :: SBool = s1770 == s1772-  s1774 :: SWord 1 = choose [8:8] s901-  s1775 :: SBool = s5 /= s1774-  s1776 :: SWord 1 = choose [8:8] s1735-  s1777 :: SBool = s5 /= s1776-  s1778 :: SBool = s1775 == s1777-  s1779 :: SWord 1 = choose [9:9] s901-  s1780 :: SBool = s5 /= s1779-  s1781 :: SWord 1 = choose [9:9] s1735-  s1782 :: SBool = s5 /= s1781-  s1783 :: SBool = s1780 == s1782-  s1784 :: SWord 1 = choose [10:10] s901-  s1785 :: SBool = s5 /= s1784-  s1786 :: SWord 1 = choose [10:10] s1735-  s1787 :: SBool = s5 /= s1786-  s1788 :: SBool = s1785 == s1787-  s1789 :: SWord 1 = choose [11:11] s901-  s1790 :: SBool = s5 /= s1789-  s1791 :: SWord 1 = choose [11:11] s1735-  s1792 :: SBool = s5 /= s1791-  s1793 :: SBool = s1790 == s1792-  s1794 :: SWord 1 = choose [12:12] s901-  s1795 :: SBool = s5 /= s1794-  s1796 :: SWord 1 = choose [12:12] s1735-  s1797 :: SBool = s5 /= s1796-  s1798 :: SBool = s1795 == s1797-  s1799 :: SWord 1 = choose [13:13] s901-  s1800 :: SBool = s5 /= s1799-  s1801 :: SWord 1 = choose [13:13] s1735-  s1802 :: SBool = s5 /= s1801-  s1803 :: SBool = s1800 == s1802-  s1804 :: SWord 1 = choose [14:14] s901-  s1805 :: SBool = s5 /= s1804-  s1806 :: SWord 1 = choose [14:14] s1735-  s1807 :: SBool = s5 /= s1806-  s1808 :: SBool = s1805 == s1807-  s1809 :: SWord 1 = choose [15:15] s901-  s1810 :: SBool = s5 /= s1809-  s1811 :: SWord 1 = choose [15:15] s1735-  s1812 :: SBool = s5 /= s1811-  s1813 :: SBool = s1810 == s1812-  s1814 :: SWord 1 = choose [16:16] s901-  s1815 :: SBool = s5 /= s1814-  s1816 :: SWord 1 = choose [16:16] s1735-  s1817 :: SBool = s5 /= s1816-  s1818 :: SBool = s1815 == s1817-  s1819 :: SWord 1 = choose [17:17] s901-  s1820 :: SBool = s5 /= s1819-  s1821 :: SWord 1 = choose [17:17] s1735-  s1822 :: SBool = s5 /= s1821-  s1823 :: SBool = s1820 == s1822-  s1824 :: SWord 1 = choose [18:18] s901-  s1825 :: SBool = s5 /= s1824-  s1826 :: SWord 1 = choose [18:18] s1735-  s1827 :: SBool = s5 /= s1826-  s1828 :: SBool = s1825 == s1827-  s1829 :: SWord 1 = choose [19:19] s901-  s1830 :: SBool = s5 /= s1829-  s1831 :: SWord 1 = choose [19:19] s1735-  s1832 :: SBool = s5 /= s1831-  s1833 :: SBool = s1830 == s1832-  s1834 :: SWord 1 = choose [20:20] s901-  s1835 :: SBool = s5 /= s1834-  s1836 :: SWord 1 = choose [20:20] s1735-  s1837 :: SBool = s5 /= s1836-  s1838 :: SBool = s1835 == s1837-  s1839 :: SWord 1 = choose [21:21] s901-  s1840 :: SBool = s5 /= s1839-  s1841 :: SWord 1 = choose [21:21] s1735-  s1842 :: SBool = s5 /= s1841-  s1843 :: SBool = s1840 == s1842-  s1844 :: SWord 1 = choose [22:22] s901-  s1845 :: SBool = s5 /= s1844-  s1846 :: SWord 1 = choose [22:22] s1735-  s1847 :: SBool = s5 /= s1846-  s1848 :: SBool = s1845 == s1847-  s1849 :: SWord 1 = choose [23:23] s901-  s1850 :: SBool = s5 /= s1849-  s1851 :: SWord 1 = choose [23:23] s1735-  s1852 :: SBool = s5 /= s1851-  s1853 :: SBool = s1850 == s1852-  s1854 :: SWord 1 = choose [24:24] s901-  s1855 :: SBool = s5 /= s1854-  s1856 :: SWord 1 = choose [24:24] s1735-  s1857 :: SBool = s5 /= s1856-  s1858 :: SBool = s1855 == s1857-  s1859 :: SWord 1 = choose [25:25] s901-  s1860 :: SBool = s5 /= s1859-  s1861 :: SWord 1 = choose [25:25] s1735-  s1862 :: SBool = s5 /= s1861-  s1863 :: SBool = s1860 == s1862-  s1864 :: SWord 1 = choose [26:26] s901-  s1865 :: SBool = s5 /= s1864-  s1866 :: SWord 1 = choose [26:26] s1735-  s1867 :: SBool = s5 /= s1866-  s1868 :: SBool = s1865 == s1867-  s1869 :: SWord 1 = choose [27:27] s901-  s1870 :: SBool = s5 /= s1869-  s1871 :: SWord 1 = choose [27:27] s1735-  s1872 :: SBool = s5 /= s1871-  s1873 :: SBool = s1870 == s1872-  s1874 :: SWord 1 = choose [28:28] s901-  s1875 :: SBool = s5 /= s1874-  s1876 :: SWord 1 = choose [28:28] s1735-  s1877 :: SBool = s5 /= s1876-  s1878 :: SBool = s1875 == s1877-  s1879 :: SWord 1 = choose [29:29] s901-  s1880 :: SBool = s5 /= s1879-  s1881 :: SWord 1 = choose [29:29] s1735-  s1882 :: SBool = s5 /= s1881-  s1883 :: SBool = s1880 == s1882-  s1884 :: SWord 1 = choose [30:30] s901-  s1885 :: SBool = s5 /= s1884-  s1886 :: SWord 1 = choose [30:30] s1735-  s1887 :: SBool = s5 /= s1886-  s1888 :: SBool = s1885 == s1887-  s1889 :: SWord 1 = choose [31:31] s901-  s1890 :: SBool = s5 /= s1889-  s1891 :: SWord 1 = choose [31:31] s1735-  s1892 :: SBool = s5 /= s1891-  s1893 :: SBool = s1890 == s1892-  s1894 :: SWord 1 = choose [32:32] s901-  s1895 :: SBool = s5 /= s1894-  s1896 :: SWord 1 = choose [32:32] s1735-  s1897 :: SBool = s5 /= s1896-  s1898 :: SBool = s1895 == s1897-  s1899 :: SWord 1 = choose [33:33] s901-  s1900 :: SBool = s5 /= s1899-  s1901 :: SWord 1 = choose [33:33] s1735-  s1902 :: SBool = s5 /= s1901-  s1903 :: SBool = s1900 == s1902-  s1904 :: SWord 1 = choose [34:34] s901-  s1905 :: SBool = s5 /= s1904-  s1906 :: SWord 1 = choose [34:34] s1735-  s1907 :: SBool = s5 /= s1906-  s1908 :: SBool = s1905 == s1907-  s1909 :: SWord 1 = choose [35:35] s901-  s1910 :: SBool = s5 /= s1909-  s1911 :: SWord 1 = choose [35:35] s1735-  s1912 :: SBool = s5 /= s1911-  s1913 :: SBool = s1910 == s1912-  s1914 :: SWord 1 = choose [36:36] s901-  s1915 :: SBool = s5 /= s1914-  s1916 :: SWord 1 = choose [36:36] s1735-  s1917 :: SBool = s5 /= s1916-  s1918 :: SBool = s1915 == s1917-  s1919 :: SWord 1 = choose [37:37] s901-  s1920 :: SBool = s5 /= s1919-  s1921 :: SWord 1 = choose [37:37] s1735-  s1922 :: SBool = s5 /= s1921-  s1923 :: SBool = s1920 == s1922-  s1924 :: SWord 1 = choose [38:38] s901-  s1925 :: SBool = s5 /= s1924-  s1926 :: SWord 1 = choose [38:38] s1735-  s1927 :: SBool = s5 /= s1926-  s1928 :: SBool = s1925 == s1927-  s1929 :: SWord 1 = choose [39:39] s901-  s1930 :: SBool = s5 /= s1929-  s1931 :: SWord 1 = choose [39:39] s1735-  s1932 :: SBool = s5 /= s1931-  s1933 :: SBool = s1930 == s1932-  s1934 :: SWord 1 = choose [40:40] s901-  s1935 :: SBool = s5 /= s1934-  s1936 :: SWord 1 = choose [40:40] s1735-  s1937 :: SBool = s5 /= s1936-  s1938 :: SBool = s1935 == s1937-  s1939 :: SWord 1 = choose [41:41] s901-  s1940 :: SBool = s5 /= s1939-  s1941 :: SWord 1 = choose [41:41] s1735-  s1942 :: SBool = s5 /= s1941-  s1943 :: SBool = s1940 == s1942-  s1944 :: SWord 1 = choose [42:42] s901-  s1945 :: SBool = s5 /= s1944-  s1946 :: SWord 1 = choose [42:42] s1735-  s1947 :: SBool = s5 /= s1946-  s1948 :: SBool = s1945 == s1947-  s1949 :: SWord 1 = choose [43:43] s901-  s1950 :: SBool = s5 /= s1949-  s1951 :: SWord 1 = choose [43:43] s1735-  s1952 :: SBool = s5 /= s1951-  s1953 :: SBool = s1950 == s1952-  s1954 :: SWord 1 = choose [44:44] s901-  s1955 :: SBool = s5 /= s1954-  s1956 :: SWord 1 = choose [44:44] s1735-  s1957 :: SBool = s5 /= s1956-  s1958 :: SBool = s1955 == s1957-  s1959 :: SWord 1 = choose [45:45] s901-  s1960 :: SBool = s5 /= s1959-  s1961 :: SWord 1 = choose [45:45] s1735-  s1962 :: SBool = s5 /= s1961-  s1963 :: SBool = s1960 == s1962-  s1964 :: SWord 1 = choose [46:46] s901-  s1965 :: SBool = s5 /= s1964-  s1966 :: SWord 1 = choose [46:46] s1735-  s1967 :: SBool = s5 /= s1966-  s1968 :: SBool = s1965 == s1967-  s1969 :: SWord 1 = choose [47:47] s901-  s1970 :: SBool = s5 /= s1969-  s1971 :: SWord 1 = choose [47:47] s1735-  s1972 :: SBool = s5 /= s1971-  s1973 :: SBool = s1970 == s1972-  s1974 :: SWord 1 = choose [48:48] s901-  s1975 :: SBool = s5 /= s1974-  s1976 :: SWord 1 = choose [48:48] s1735-  s1977 :: SBool = s5 /= s1976-  s1978 :: SBool = s1975 == s1977-  s1979 :: SWord 1 = choose [49:49] s901-  s1980 :: SBool = s5 /= s1979-  s1981 :: SWord 1 = choose [49:49] s1735-  s1982 :: SBool = s5 /= s1981-  s1983 :: SBool = s1980 == s1982-  s1984 :: SWord 1 = choose [50:50] s901-  s1985 :: SBool = s5 /= s1984-  s1986 :: SWord 1 = choose [50:50] s1735-  s1987 :: SBool = s5 /= s1986-  s1988 :: SBool = s1985 == s1987-  s1989 :: SWord 1 = choose [51:51] s901-  s1990 :: SBool = s5 /= s1989-  s1991 :: SWord 1 = choose [51:51] s1735-  s1992 :: SBool = s5 /= s1991-  s1993 :: SBool = s1990 == s1992-  s1994 :: SWord 1 = choose [52:52] s901-  s1995 :: SBool = s5 /= s1994-  s1996 :: SWord 1 = choose [52:52] s1735-  s1997 :: SBool = s5 /= s1996-  s1998 :: SBool = s1995 == s1997-  s1999 :: SWord 1 = choose [53:53] s901-  s2000 :: SBool = s5 /= s1999-  s2001 :: SWord 1 = choose [53:53] s1735-  s2002 :: SBool = s5 /= s2001-  s2003 :: SBool = s2000 == s2002-  s2004 :: SWord 1 = choose [54:54] s901-  s2005 :: SBool = s5 /= s2004-  s2006 :: SWord 1 = choose [54:54] s1735-  s2007 :: SBool = s5 /= s2006-  s2008 :: SBool = s2005 == s2007-  s2009 :: SWord 1 = choose [55:55] s901-  s2010 :: SBool = s5 /= s2009-  s2011 :: SWord 1 = choose [55:55] s1735-  s2012 :: SBool = s5 /= s2011-  s2013 :: SBool = s2010 == s2012-  s2014 :: SWord 1 = choose [56:56] s901-  s2015 :: SBool = s5 /= s2014-  s2016 :: SWord 1 = choose [56:56] s1735-  s2017 :: SBool = s5 /= s2016-  s2018 :: SBool = s2015 == s2017-  s2019 :: SWord 1 = choose [57:57] s901-  s2020 :: SBool = s5 /= s2019-  s2021 :: SWord 1 = choose [57:57] s1735-  s2022 :: SBool = s5 /= s2021-  s2023 :: SBool = s2020 == s2022-  s2024 :: SWord 1 = choose [58:58] s901-  s2025 :: SBool = s5 /= s2024-  s2026 :: SWord 1 = choose [58:58] s1735-  s2027 :: SBool = s5 /= s2026-  s2028 :: SBool = s2025 == s2027-  s2029 :: SWord 1 = choose [59:59] s901-  s2030 :: SBool = s5 /= s2029-  s2031 :: SWord 1 = choose [59:59] s1735-  s2032 :: SBool = s5 /= s2031-  s2033 :: SBool = s2030 == s2032-  s2034 :: SWord 1 = choose [60:60] s901-  s2035 :: SBool = s5 /= s2034-  s2036 :: SWord 1 = choose [60:60] s1735-  s2037 :: SBool = s5 /= s2036-  s2038 :: SBool = s2035 == s2037-  s2039 :: SWord 1 = choose [61:61] s901-  s2040 :: SBool = s5 /= s2039-  s2041 :: SWord 1 = choose [61:61] s1735-  s2042 :: SBool = s5 /= s2041-  s2043 :: SBool = s2040 == s2042-  s2044 :: SWord 1 = choose [62:62] s901-  s2045 :: SBool = s5 /= s2044-  s2046 :: SWord 1 = choose [62:62] s1735-  s2047 :: SBool = s5 /= s2046-  s2048 :: SBool = s2045 == s2047-  s2049 :: SWord 1 = choose [63:63] s901-  s2050 :: SBool = s5 /= s2049-  s2051 :: SWord 1 = choose [63:63] s1735-  s2052 :: SBool = s5 /= s2051-  s2053 :: SBool = s2050 == s2052-  s2056 :: SWord8 = if s2053 then s2054 else s2055-  s2057 :: SWord8 = s2055 + s2056-  s2058 :: SWord8 = if s2048 then s2056 else s2057-  s2059 :: SWord8 = s2055 + s2058-  s2060 :: SWord8 = if s2043 then s2058 else s2059-  s2061 :: SWord8 = s2055 + s2060-  s2062 :: SWord8 = if s2038 then s2060 else s2061-  s2063 :: SWord8 = s2055 + s2062-  s2064 :: SWord8 = if s2033 then s2062 else s2063-  s2065 :: SWord8 = s2055 + s2064-  s2066 :: SWord8 = if s2028 then s2064 else s2065-  s2067 :: SWord8 = s2055 + s2066-  s2068 :: SWord8 = if s2023 then s2066 else s2067-  s2069 :: SWord8 = s2055 + s2068-  s2070 :: SWord8 = if s2018 then s2068 else s2069-  s2071 :: SWord8 = s2055 + s2070-  s2072 :: SWord8 = if s2013 then s2070 else s2071-  s2073 :: SWord8 = s2055 + s2072-  s2074 :: SWord8 = if s2008 then s2072 else s2073-  s2075 :: SWord8 = s2055 + s2074-  s2076 :: SWord8 = if s2003 then s2074 else s2075-  s2077 :: SWord8 = s2055 + s2076-  s2078 :: SWord8 = if s1998 then s2076 else s2077-  s2079 :: SWord8 = s2055 + s2078-  s2080 :: SWord8 = if s1993 then s2078 else s2079-  s2081 :: SWord8 = s2055 + s2080-  s2082 :: SWord8 = if s1988 then s2080 else s2081-  s2083 :: SWord8 = s2055 + s2082-  s2084 :: SWord8 = if s1983 then s2082 else s2083-  s2085 :: SWord8 = s2055 + s2084-  s2086 :: SWord8 = if s1978 then s2084 else s2085-  s2087 :: SWord8 = s2055 + s2086-  s2088 :: SWord8 = if s1973 then s2086 else s2087-  s2089 :: SWord8 = s2055 + s2088-  s2090 :: SWord8 = if s1968 then s2088 else s2089-  s2091 :: SWord8 = s2055 + s2090-  s2092 :: SWord8 = if s1963 then s2090 else s2091-  s2093 :: SWord8 = s2055 + s2092-  s2094 :: SWord8 = if s1958 then s2092 else s2093-  s2095 :: SWord8 = s2055 + s2094-  s2096 :: SWord8 = if s1953 then s2094 else s2095-  s2097 :: SWord8 = s2055 + s2096-  s2098 :: SWord8 = if s1948 then s2096 else s2097-  s2099 :: SWord8 = s2055 + s2098-  s2100 :: SWord8 = if s1943 then s2098 else s2099-  s2101 :: SWord8 = s2055 + s2100-  s2102 :: SWord8 = if s1938 then s2100 else s2101-  s2103 :: SWord8 = s2055 + s2102-  s2104 :: SWord8 = if s1933 then s2102 else s2103-  s2105 :: SWord8 = s2055 + s2104-  s2106 :: SWord8 = if s1928 then s2104 else s2105-  s2107 :: SWord8 = s2055 + s2106-  s2108 :: SWord8 = if s1923 then s2106 else s2107-  s2109 :: SWord8 = s2055 + s2108-  s2110 :: SWord8 = if s1918 then s2108 else s2109-  s2111 :: SWord8 = s2055 + s2110-  s2112 :: SWord8 = if s1913 then s2110 else s2111-  s2113 :: SWord8 = s2055 + s2112-  s2114 :: SWord8 = if s1908 then s2112 else s2113-  s2115 :: SWord8 = s2055 + s2114-  s2116 :: SWord8 = if s1903 then s2114 else s2115-  s2117 :: SWord8 = s2055 + s2116-  s2118 :: SWord8 = if s1898 then s2116 else s2117-  s2119 :: SWord8 = s2055 + s2118-  s2120 :: SWord8 = if s1893 then s2118 else s2119-  s2121 :: SWord8 = s2055 + s2120-  s2122 :: SWord8 = if s1888 then s2120 else s2121-  s2123 :: SWord8 = s2055 + s2122-  s2124 :: SWord8 = if s1883 then s2122 else s2123-  s2125 :: SWord8 = s2055 + s2124-  s2126 :: SWord8 = if s1878 then s2124 else s2125-  s2127 :: SWord8 = s2055 + s2126-  s2128 :: SWord8 = if s1873 then s2126 else s2127-  s2129 :: SWord8 = s2055 + s2128-  s2130 :: SWord8 = if s1868 then s2128 else s2129-  s2131 :: SWord8 = s2055 + s2130-  s2132 :: SWord8 = if s1863 then s2130 else s2131-  s2133 :: SWord8 = s2055 + s2132-  s2134 :: SWord8 = if s1858 then s2132 else s2133-  s2135 :: SWord8 = s2055 + s2134-  s2136 :: SWord8 = if s1853 then s2134 else s2135-  s2137 :: SWord8 = s2055 + s2136-  s2138 :: SWord8 = if s1848 then s2136 else s2137-  s2139 :: SWord8 = s2055 + s2138-  s2140 :: SWord8 = if s1843 then s2138 else s2139-  s2141 :: SWord8 = s2055 + s2140-  s2142 :: SWord8 = if s1838 then s2140 else s2141-  s2143 :: SWord8 = s2055 + s2142-  s2144 :: SWord8 = if s1833 then s2142 else s2143-  s2145 :: SWord8 = s2055 + s2144-  s2146 :: SWord8 = if s1828 then s2144 else s2145-  s2147 :: SWord8 = s2055 + s2146-  s2148 :: SWord8 = if s1823 then s2146 else s2147-  s2149 :: SWord8 = s2055 + s2148-  s2150 :: SWord8 = if s1818 then s2148 else s2149-  s2151 :: SWord8 = s2055 + s2150-  s2152 :: SWord8 = if s1813 then s2150 else s2151-  s2153 :: SWord8 = s2055 + s2152-  s2154 :: SWord8 = if s1808 then s2152 else s2153-  s2155 :: SWord8 = s2055 + s2154-  s2156 :: SWord8 = if s1803 then s2154 else s2155-  s2157 :: SWord8 = s2055 + s2156-  s2158 :: SWord8 = if s1798 then s2156 else s2157-  s2159 :: SWord8 = s2055 + s2158-  s2160 :: SWord8 = if s1793 then s2158 else s2159-  s2161 :: SWord8 = s2055 + s2160-  s2162 :: SWord8 = if s1788 then s2160 else s2161-  s2163 :: SWord8 = s2055 + s2162-  s2164 :: SWord8 = if s1783 then s2162 else s2163-  s2165 :: SWord8 = s2055 + s2164-  s2166 :: SWord8 = if s1778 then s2164 else s2165-  s2167 :: SWord8 = s2055 + s2166-  s2168 :: SWord8 = if s1773 then s2166 else s2167-  s2169 :: SWord8 = s2055 + s2168-  s2170 :: SWord8 = if s1768 then s2168 else s2169-  s2171 :: SWord8 = s2055 + s2170-  s2172 :: SWord8 = if s1763 then s2170 else s2171-  s2173 :: SWord8 = s2055 + s2172-  s2174 :: SWord8 = if s1758 then s2172 else s2173-  s2175 :: SWord8 = s2055 + s2174-  s2176 :: SWord8 = if s1753 then s2174 else s2175-  s2177 :: SWord8 = s2055 + s2176-  s2178 :: SWord8 = if s1748 then s2176 else s2177-  s2179 :: SWord8 = s2055 + s2178-  s2180 :: SWord8 = if s1743 then s2178 else s2179-  s2181 :: SWord8 = s2055 + s2180-  s2182 :: SWord8 = if s1738 then s2180 else s2181-  s2184 :: SBool = s2182 > s2183-  s2185 :: SBool = s3 | s2184-CONSTRAINTS-ASSERTIONS-OUTPUTS-  s2185+  s4 = 0 :: WordN 1+  s100 = 65536 :: Word64+  s101 = 0 :: Word64+  s103 = 131072 :: Word64+  s106 = 262144 :: Word64+  s109 = 524288 :: Word64+  s112 = 1048576 :: Word64+  s115 = 2097152 :: Word64+  s118 = 4194304 :: Word64+  s121 = 8388608 :: Word64+  s124 = 16777216 :: Word64+  s127 = 33554432 :: Word64+  s130 = 67108864 :: Word64+  s133 = 134217728 :: Word64+  s136 = 268435456 :: Word64+  s139 = 536870912 :: Word64+  s142 = 1073741824 :: Word64+  s145 = 2147483648 :: Word64+  s148 = 4294967296 :: Word64+  s151 = 8589934592 :: Word64+  s154 = 17179869184 :: Word64+  s157 = 34359738368 :: Word64+  s160 = 68719476736 :: Word64+  s163 = 137438953472 :: Word64+  s166 = 274877906944 :: Word64+  s169 = 549755813888 :: Word64+  s172 = 1099511627776 :: Word64+  s175 = 2199023255552 :: Word64+  s178 = 4398046511104 :: Word64+  s181 = 8796093022208 :: Word64+  s184 = 17592186044416 :: Word64+  s187 = 35184372088832 :: Word64+  s190 = 70368744177664 :: Word64+  s193 = 140737488355328 :: Word64+  s196 = 281474976710656 :: Word64+  s199 = 562949953421312 :: Word64+  s202 = 1125899906842624 :: Word64+  s205 = 2251799813685248 :: Word64+  s208 = 4503599627370496 :: Word64+  s211 = 9007199254740992 :: Word64+  s214 = 18014398509481984 :: Word64+  s217 = 36028797018963968 :: Word64+  s220 = 72057594037927936 :: Word64+  s223 = 144115188075855872 :: Word64+  s226 = 288230376151711744 :: Word64+  s229 = 576460752303423488 :: Word64+  s232 = 1152921504606846976 :: Word64+  s235 = 2305843009213693952 :: Word64+  s238 = 4611686018427387904 :: Word64+  s241 = 9223372036854775808 :: Word64+  s756 = 1 :: Word64+  s758 = 2 :: Word64+  s761 = 4 :: Word64+  s764 = 8 :: Word64+  s767 = 16 :: Word64+  s770 = 32 :: Word64+  s773 = 64 :: Word64+  s776 = 128 :: Word64+  s779 = 256 :: Word64+  s782 = 512 :: Word64+  s785 = 1024 :: Word64+  s788 = 2048 :: Word64+  s791 = 4096 :: Word64+  s794 = 8192 :: Word64+  s797 = 16384 :: Word64+  s800 = 32768 :: Word64+  s2053 = 0 :: Word8+  s2054 = 1 :: Word8+  s2182 = 3 :: Word8+TABLES+ARRAYS+UNINTERPRETED CONSTANTS+USER GIVEN CODE SEGMENTS+AXIOMS-DEFINITIONS+DEFINE+  s2 :: SBool = s0 /= s1+  s3 :: SWord 1 = choose [47:47] s0+  s5 :: SBool = s3 /= s4+  s6 :: SWord 1 = choose [46:46] s0+  s7 :: SBool = s4 /= s6+  s8 :: SWord 1 = choose [45:45] s0+  s9 :: SBool = s4 /= s8+  s10 :: SWord 1 = choose [44:44] s0+  s11 :: SBool = s4 /= s10+  s12 :: SWord 1 = choose [43:43] s0+  s13 :: SBool = s4 /= s12+  s14 :: SWord 1 = choose [42:42] s0+  s15 :: SBool = s4 /= s14+  s16 :: SWord 1 = choose [41:41] s0+  s17 :: SBool = s4 /= s16+  s18 :: SWord 1 = choose [40:40] s0+  s19 :: SBool = s4 /= s18+  s20 :: SWord 1 = choose [39:39] s0+  s21 :: SBool = s4 /= s20+  s22 :: SWord 1 = choose [38:38] s0+  s23 :: SBool = s4 /= s22+  s24 :: SWord 1 = choose [37:37] s0+  s25 :: SBool = s4 /= s24+  s26 :: SWord 1 = choose [36:36] s0+  s27 :: SBool = s4 /= s26+  s28 :: SWord 1 = choose [35:35] s0+  s29 :: SBool = s4 /= s28+  s30 :: SWord 1 = choose [34:34] s0+  s31 :: SBool = s4 /= s30+  s32 :: SWord 1 = choose [33:33] s0+  s33 :: SBool = s4 /= s32+  s34 :: SWord 1 = choose [32:32] s0+  s35 :: SBool = s4 /= s34+  s36 :: SWord 1 = choose [31:31] s0+  s37 :: SBool = s4 /= s36+  s38 :: SWord 1 = choose [30:30] s0+  s39 :: SBool = s4 /= s38+  s40 :: SWord 1 = choose [29:29] s0+  s41 :: SBool = s4 /= s40+  s42 :: SWord 1 = choose [28:28] s0+  s43 :: SBool = s4 /= s42+  s44 :: SWord 1 = choose [27:27] s0+  s45 :: SBool = s4 /= s44+  s46 :: SWord 1 = choose [26:26] s0+  s47 :: SBool = s4 /= s46+  s48 :: SWord 1 = choose [25:25] s0+  s49 :: SBool = s4 /= s48+  s50 :: SWord 1 = choose [24:24] s0+  s51 :: SBool = s4 /= s50+  s52 :: SWord 1 = choose [23:23] s0+  s53 :: SBool = s4 /= s52+  s54 :: SWord 1 = choose [22:22] s0+  s55 :: SBool = s4 /= s54+  s56 :: SWord 1 = choose [21:21] s0+  s57 :: SBool = s4 /= s56+  s58 :: SWord 1 = choose [20:20] s0+  s59 :: SBool = s4 /= s58+  s60 :: SWord 1 = choose [19:19] s0+  s61 :: SBool = s4 /= s60+  s62 :: SWord 1 = choose [18:18] s0+  s63 :: SBool = s4 /= s62+  s64 :: SWord 1 = choose [17:17] s0+  s65 :: SBool = s4 /= s64+  s66 :: SWord 1 = choose [16:16] s0+  s67 :: SBool = s4 /= s66+  s68 :: SWord 1 = choose [15:15] s0+  s69 :: SBool = s4 /= s68+  s70 :: SWord 1 = choose [14:14] s0+  s71 :: SBool = s4 /= s70+  s72 :: SWord 1 = choose [13:13] s0+  s73 :: SBool = s4 /= s72+  s74 :: SWord 1 = choose [12:12] s0+  s75 :: SBool = s4 /= s74+  s76 :: SWord 1 = choose [11:11] s0+  s77 :: SBool = s4 /= s76+  s78 :: SWord 1 = choose [10:10] s0+  s79 :: SBool = s4 /= s78+  s80 :: SWord 1 = choose [9:9] s0+  s81 :: SBool = s4 /= s80+  s82 :: SWord 1 = choose [8:8] s0+  s83 :: SBool = s4 /= s82+  s84 :: SWord 1 = choose [7:7] s0+  s85 :: SBool = s4 /= s84+  s86 :: SWord 1 = choose [6:6] s0+  s87 :: SBool = s4 /= s86+  s88 :: SWord 1 = choose [5:5] s0+  s89 :: SBool = s4 /= s88+  s90 :: SWord 1 = choose [4:4] s0+  s91 :: SBool = s4 /= s90+  s92 :: SWord 1 = choose [3:3] s0+  s93 :: SBool = s4 /= s92+  s94 :: SWord 1 = choose [2:2] s0+  s95 :: SBool = s4 /= s94+  s96 :: SWord 1 = choose [1:1] s0+  s97 :: SBool = s4 /= s96+  s98 :: SWord 1 = choose [0:0] s0+  s99 :: SBool = s4 /= s98+  s102 :: SWord64 = if s99 then s100 else s101+  s104 :: SWord64 = s102 | s103+  s105 :: SWord64 = if s97 then s104 else s102+  s107 :: SWord64 = s105 | s106+  s108 :: SWord64 = if s95 then s107 else s105+  s110 :: SWord64 = s108 | s109+  s111 :: SWord64 = if s93 then s110 else s108+  s113 :: SWord64 = s111 | s112+  s114 :: SWord64 = if s91 then s113 else s111+  s116 :: SWord64 = s114 | s115+  s117 :: SWord64 = if s89 then s116 else s114+  s119 :: SWord64 = s117 | s118+  s120 :: SWord64 = if s87 then s119 else s117+  s122 :: SWord64 = s120 | s121+  s123 :: SWord64 = if s85 then s122 else s120+  s125 :: SWord64 = s123 | s124+  s126 :: SWord64 = if s83 then s125 else s123+  s128 :: SWord64 = s126 | s127+  s129 :: SWord64 = if s81 then s128 else s126+  s131 :: SWord64 = s129 | s130+  s132 :: SWord64 = if s79 then s131 else s129+  s134 :: SWord64 = s132 | s133+  s135 :: SWord64 = if s77 then s134 else s132+  s137 :: SWord64 = s135 | s136+  s138 :: SWord64 = if s75 then s137 else s135+  s140 :: SWord64 = s138 | s139+  s141 :: SWord64 = if s73 then s140 else s138+  s143 :: SWord64 = s141 | s142+  s144 :: SWord64 = if s71 then s143 else s141+  s146 :: SWord64 = s144 | s145+  s147 :: SWord64 = if s69 then s146 else s144+  s149 :: SWord64 = s147 | s148+  s150 :: SWord64 = if s67 then s149 else s147+  s152 :: SWord64 = s150 | s151+  s153 :: SWord64 = if s65 then s152 else s150+  s155 :: SWord64 = s153 | s154+  s156 :: SWord64 = if s63 then s155 else s153+  s158 :: SWord64 = s156 | s157+  s159 :: SWord64 = if s61 then s158 else s156+  s161 :: SWord64 = s159 | s160+  s162 :: SWord64 = if s59 then s161 else s159+  s164 :: SWord64 = s162 | s163+  s165 :: SWord64 = if s57 then s164 else s162+  s167 :: SWord64 = s165 | s166+  s168 :: SWord64 = if s55 then s167 else s165+  s170 :: SWord64 = s168 | s169+  s171 :: SWord64 = if s53 then s170 else s168+  s173 :: SWord64 = s171 | s172+  s174 :: SWord64 = if s51 then s173 else s171+  s176 :: SWord64 = s174 | s175+  s177 :: SWord64 = if s49 then s176 else s174+  s179 :: SWord64 = s177 | s178+  s180 :: SWord64 = if s47 then s179 else s177+  s182 :: SWord64 = s180 | s181+  s183 :: SWord64 = if s45 then s182 else s180+  s185 :: SWord64 = s183 | s184+  s186 :: SWord64 = if s43 then s185 else s183+  s188 :: SWord64 = s186 | s187+  s189 :: SWord64 = if s41 then s188 else s186+  s191 :: SWord64 = s189 | s190+  s192 :: SWord64 = if s39 then s191 else s189+  s194 :: SWord64 = s192 | s193+  s195 :: SWord64 = if s37 then s194 else s192+  s197 :: SWord64 = s195 | s196+  s198 :: SWord64 = if s35 then s197 else s195+  s200 :: SWord64 = s198 | s199+  s201 :: SWord64 = if s33 then s200 else s198+  s203 :: SWord64 = s201 | s202+  s204 :: SWord64 = if s31 then s203 else s201+  s206 :: SWord64 = s204 | s205+  s207 :: SWord64 = if s29 then s206 else s204+  s209 :: SWord64 = s207 | s208+  s210 :: SWord64 = if s27 then s209 else s207+  s212 :: SWord64 = s210 | s211+  s213 :: SWord64 = if s25 then s212 else s210+  s215 :: SWord64 = s213 | s214+  s216 :: SWord64 = if s23 then s215 else s213+  s218 :: SWord64 = s216 | s217+  s219 :: SWord64 = if s21 then s218 else s216+  s221 :: SWord64 = s219 | s220+  s222 :: SWord64 = if s19 then s221 else s219+  s224 :: SWord64 = s222 | s223+  s225 :: SWord64 = if s17 then s224 else s222+  s227 :: SWord64 = s225 | s226+  s228 :: SWord64 = if s15 then s227 else s225+  s230 :: SWord64 = s228 | s229+  s231 :: SWord64 = if s13 then s230 else s228+  s233 :: SWord64 = s231 | s232+  s234 :: SWord64 = if s11 then s233 else s231+  s236 :: SWord64 = s234 | s235+  s237 :: SWord64 = if s9 then s236 else s234+  s239 :: SWord64 = s237 | s238+  s240 :: SWord64 = if s7 then s239 else s237+  s242 :: SWord64 = s240 | s241+  s243 :: SWord64 = if s5 then s242 else s240+  s244 :: SWord 1 = choose [63:63] s243+  s245 :: SBool = s4 /= s244+  s246 :: SWord 1 = choose [62:62] s243+  s247 :: SBool = s4 /= s246+  s248 :: SWord 1 = choose [61:61] s243+  s249 :: SBool = s4 /= s248+  s250 :: SWord 1 = choose [60:60] s243+  s251 :: SBool = s4 /= s250+  s252 :: SWord 1 = choose [59:59] s243+  s253 :: SBool = s4 /= s252+  s254 :: SBool = ~ s253+  s255 :: SBool = if s245 then s254 else s253+  s256 :: SWord 1 = choose [58:58] s243+  s257 :: SBool = s4 /= s256+  s258 :: SBool = ~ s257+  s259 :: SBool = if s247 then s258 else s257+  s260 :: SWord 1 = choose [57:57] s243+  s261 :: SBool = s4 /= s260+  s262 :: SBool = ~ s261+  s263 :: SBool = if s249 then s262 else s261+  s264 :: SWord 1 = choose [56:56] s243+  s265 :: SBool = s4 /= s264+  s266 :: SBool = ~ s265+  s267 :: SBool = if s251 then s266 else s265+  s268 :: SWord 1 = choose [55:55] s243+  s269 :: SBool = s4 /= s268+  s270 :: SBool = ~ s269+  s271 :: SBool = if s255 then s270 else s269+  s272 :: SWord 1 = choose [54:54] s243+  s273 :: SBool = s4 /= s272+  s274 :: SBool = ~ s273+  s275 :: SBool = if s259 then s274 else s273+  s276 :: SWord 1 = choose [53:53] s243+  s277 :: SBool = s4 /= s276+  s278 :: SBool = ~ s277+  s279 :: SBool = if s263 then s278 else s277+  s280 :: SWord 1 = choose [52:52] s243+  s281 :: SBool = s4 /= s280+  s282 :: SBool = ~ s281+  s283 :: SBool = if s245 then s282 else s281+  s284 :: SBool = ~ s283+  s285 :: SBool = if s267 then s284 else s283+  s286 :: SWord 1 = choose [51:51] s243+  s287 :: SBool = s4 /= s286+  s288 :: SBool = ~ s287+  s289 :: SBool = if s247 then s288 else s287+  s290 :: SBool = ~ s289+  s291 :: SBool = if s271 then s290 else s289+  s292 :: SWord 1 = choose [50:50] s243+  s293 :: SBool = s4 /= s292+  s294 :: SBool = ~ s293+  s295 :: SBool = if s249 then s294 else s293+  s296 :: SBool = ~ s295+  s297 :: SBool = if s275 then s296 else s295+  s298 :: SWord 1 = choose [49:49] s243+  s299 :: SBool = s4 /= s298+  s300 :: SBool = ~ s299+  s301 :: SBool = if s251 then s300 else s299+  s302 :: SBool = ~ s301+  s303 :: SBool = if s279 then s302 else s301+  s304 :: SWord 1 = choose [48:48] s243+  s305 :: SBool = s4 /= s304+  s306 :: SBool = ~ s305+  s307 :: SBool = if s255 then s306 else s305+  s308 :: SBool = ~ s307+  s309 :: SBool = if s285 then s308 else s307+  s310 :: SWord 1 = choose [47:47] s243+  s311 :: SBool = s4 /= s310+  s312 :: SBool = ~ s311+  s313 :: SBool = if s245 then s312 else s311+  s314 :: SBool = ~ s313+  s315 :: SBool = if s259 then s314 else s313+  s316 :: SBool = ~ s315+  s317 :: SBool = if s291 then s316 else s315+  s318 :: SWord 1 = choose [46:46] s243+  s319 :: SBool = s4 /= s318+  s320 :: SBool = ~ s319+  s321 :: SBool = if s247 then s320 else s319+  s322 :: SBool = ~ s321+  s323 :: SBool = if s263 then s322 else s321+  s324 :: SBool = ~ s323+  s325 :: SBool = if s297 then s324 else s323+  s326 :: SWord 1 = choose [45:45] s243+  s327 :: SBool = s4 /= s326+  s328 :: SBool = ~ s327+  s329 :: SBool = if s249 then s328 else s327+  s330 :: SBool = ~ s329+  s331 :: SBool = if s267 then s330 else s329+  s332 :: SBool = ~ s331+  s333 :: SBool = if s303 then s332 else s331+  s334 :: SWord 1 = choose [44:44] s243+  s335 :: SBool = s4 /= s334+  s336 :: SBool = ~ s335+  s337 :: SBool = if s251 then s336 else s335+  s338 :: SBool = ~ s337+  s339 :: SBool = if s271 then s338 else s337+  s340 :: SBool = ~ s339+  s341 :: SBool = if s309 then s340 else s339+  s342 :: SWord 1 = choose [43:43] s243+  s343 :: SBool = s4 /= s342+  s344 :: SBool = ~ s343+  s345 :: SBool = if s255 then s344 else s343+  s346 :: SBool = ~ s345+  s347 :: SBool = if s275 then s346 else s345+  s348 :: SBool = ~ s347+  s349 :: SBool = if s317 then s348 else s347+  s350 :: SWord 1 = choose [42:42] s243+  s351 :: SBool = s4 /= s350+  s352 :: SBool = ~ s351+  s353 :: SBool = if s259 then s352 else s351+  s354 :: SBool = ~ s353+  s355 :: SBool = if s279 then s354 else s353+  s356 :: SBool = ~ s355+  s357 :: SBool = if s325 then s356 else s355+  s358 :: SWord 1 = choose [41:41] s243+  s359 :: SBool = s4 /= s358+  s360 :: SBool = ~ s359+  s361 :: SBool = if s263 then s360 else s359+  s362 :: SBool = ~ s361+  s363 :: SBool = if s285 then s362 else s361+  s364 :: SBool = ~ s363+  s365 :: SBool = if s333 then s364 else s363+  s366 :: SWord 1 = choose [40:40] s243+  s367 :: SBool = s4 /= s366+  s368 :: SBool = ~ s367+  s369 :: SBool = if s267 then s368 else s367+  s370 :: SBool = ~ s369+  s371 :: SBool = if s291 then s370 else s369+  s372 :: SBool = ~ s371+  s373 :: SBool = if s341 then s372 else s371+  s374 :: SWord 1 = choose [39:39] s243+  s375 :: SBool = s4 /= s374+  s376 :: SBool = ~ s375+  s377 :: SBool = if s271 then s376 else s375+  s378 :: SBool = ~ s377+  s379 :: SBool = if s297 then s378 else s377+  s380 :: SBool = ~ s379+  s381 :: SBool = if s349 then s380 else s379+  s382 :: SWord 1 = choose [38:38] s243+  s383 :: SBool = s4 /= s382+  s384 :: SBool = ~ s383+  s385 :: SBool = if s275 then s384 else s383+  s386 :: SBool = ~ s385+  s387 :: SBool = if s303 then s386 else s385+  s388 :: SBool = ~ s387+  s389 :: SBool = if s357 then s388 else s387+  s390 :: SWord 1 = choose [37:37] s243+  s391 :: SBool = s4 /= s390+  s392 :: SBool = ~ s391+  s393 :: SBool = if s279 then s392 else s391+  s394 :: SBool = ~ s393+  s395 :: SBool = if s309 then s394 else s393+  s396 :: SBool = ~ s395+  s397 :: SBool = if s365 then s396 else s395+  s398 :: SWord 1 = choose [36:36] s243+  s399 :: SBool = s4 /= s398+  s400 :: SBool = ~ s399+  s401 :: SBool = if s285 then s400 else s399+  s402 :: SBool = ~ s401+  s403 :: SBool = if s317 then s402 else s401+  s404 :: SBool = ~ s403+  s405 :: SBool = if s373 then s404 else s403+  s406 :: SWord 1 = choose [35:35] s243+  s407 :: SBool = s4 /= s406+  s408 :: SBool = ~ s407+  s409 :: SBool = if s291 then s408 else s407+  s410 :: SBool = ~ s409+  s411 :: SBool = if s325 then s410 else s409+  s412 :: SBool = ~ s411+  s413 :: SBool = if s381 then s412 else s411+  s414 :: SWord 1 = choose [34:34] s243+  s415 :: SBool = s4 /= s414+  s416 :: SBool = ~ s415+  s417 :: SBool = if s297 then s416 else s415+  s418 :: SBool = ~ s417+  s419 :: SBool = if s333 then s418 else s417+  s420 :: SBool = ~ s419+  s421 :: SBool = if s389 then s420 else s419+  s422 :: SWord 1 = choose [33:33] s243+  s423 :: SBool = s4 /= s422+  s424 :: SBool = ~ s423+  s425 :: SBool = if s303 then s424 else s423+  s426 :: SBool = ~ s425+  s427 :: SBool = if s341 then s426 else s425+  s428 :: SBool = ~ s427+  s429 :: SBool = if s397 then s428 else s427+  s430 :: SWord 1 = choose [32:32] s243+  s431 :: SBool = s4 /= s430+  s432 :: SBool = ~ s431+  s433 :: SBool = if s309 then s432 else s431+  s434 :: SBool = ~ s433+  s435 :: SBool = if s349 then s434 else s433+  s436 :: SBool = ~ s435+  s437 :: SBool = if s405 then s436 else s435+  s438 :: SWord 1 = choose [31:31] s243+  s439 :: SBool = s4 /= s438+  s440 :: SBool = ~ s439+  s441 :: SBool = if s317 then s440 else s439+  s442 :: SBool = ~ s441+  s443 :: SBool = if s357 then s442 else s441+  s444 :: SBool = ~ s443+  s445 :: SBool = if s413 then s444 else s443+  s446 :: SWord 1 = choose [30:30] s243+  s447 :: SBool = s4 /= s446+  s448 :: SBool = ~ s447+  s449 :: SBool = if s325 then s448 else s447+  s450 :: SBool = ~ s449+  s451 :: SBool = if s365 then s450 else s449+  s452 :: SBool = ~ s451+  s453 :: SBool = if s421 then s452 else s451+  s454 :: SWord 1 = choose [29:29] s243+  s455 :: SBool = s4 /= s454+  s456 :: SBool = ~ s455+  s457 :: SBool = if s333 then s456 else s455+  s458 :: SBool = ~ s457+  s459 :: SBool = if s373 then s458 else s457+  s460 :: SBool = ~ s459+  s461 :: SBool = if s429 then s460 else s459+  s462 :: SWord 1 = choose [28:28] s243+  s463 :: SBool = s4 /= s462+  s464 :: SBool = ~ s463+  s465 :: SBool = if s341 then s464 else s463+  s466 :: SBool = ~ s465+  s467 :: SBool = if s381 then s466 else s465+  s468 :: SBool = ~ s467+  s469 :: SBool = if s437 then s468 else s467+  s470 :: SWord 1 = choose [27:27] s243+  s471 :: SBool = s4 /= s470+  s472 :: SBool = ~ s471+  s473 :: SBool = if s349 then s472 else s471+  s474 :: SBool = ~ s473+  s475 :: SBool = if s389 then s474 else s473+  s476 :: SBool = ~ s475+  s477 :: SBool = if s445 then s476 else s475+  s478 :: SWord 1 = choose [26:26] s243+  s479 :: SBool = s4 /= s478+  s480 :: SBool = ~ s479+  s481 :: SBool = if s357 then s480 else s479+  s482 :: SBool = ~ s481+  s483 :: SBool = if s397 then s482 else s481+  s484 :: SBool = ~ s483+  s485 :: SBool = if s453 then s484 else s483+  s486 :: SWord 1 = choose [25:25] s243+  s487 :: SBool = s4 /= s486+  s488 :: SBool = ~ s487+  s489 :: SBool = if s365 then s488 else s487+  s490 :: SBool = ~ s489+  s491 :: SBool = if s405 then s490 else s489+  s492 :: SBool = ~ s491+  s493 :: SBool = if s461 then s492 else s491+  s494 :: SWord 1 = choose [24:24] s243+  s495 :: SBool = s4 /= s494+  s496 :: SBool = ~ s495+  s497 :: SBool = if s373 then s496 else s495+  s498 :: SBool = ~ s497+  s499 :: SBool = if s413 then s498 else s497+  s500 :: SBool = ~ s499+  s501 :: SBool = if s469 then s500 else s499+  s502 :: SWord 1 = choose [23:23] s243+  s503 :: SBool = s4 /= s502+  s504 :: SBool = ~ s503+  s505 :: SBool = if s381 then s504 else s503+  s506 :: SBool = ~ s505+  s507 :: SBool = if s421 then s506 else s505+  s508 :: SBool = ~ s507+  s509 :: SBool = if s477 then s508 else s507+  s510 :: SWord 1 = choose [22:22] s243+  s511 :: SBool = s4 /= s510+  s512 :: SBool = ~ s511+  s513 :: SBool = if s389 then s512 else s511+  s514 :: SBool = ~ s513+  s515 :: SBool = if s429 then s514 else s513+  s516 :: SBool = ~ s515+  s517 :: SBool = if s485 then s516 else s515+  s518 :: SWord 1 = choose [21:21] s243+  s519 :: SBool = s4 /= s518+  s520 :: SBool = ~ s519+  s521 :: SBool = if s397 then s520 else s519+  s522 :: SBool = ~ s521+  s523 :: SBool = if s437 then s522 else s521+  s524 :: SBool = ~ s523+  s525 :: SBool = if s493 then s524 else s523+  s526 :: SWord 1 = choose [20:20] s243+  s527 :: SBool = s4 /= s526+  s528 :: SBool = ~ s527+  s529 :: SBool = if s405 then s528 else s527+  s530 :: SBool = ~ s529+  s531 :: SBool = if s445 then s530 else s529+  s532 :: SBool = ~ s531+  s533 :: SBool = if s501 then s532 else s531+  s534 :: SWord 1 = choose [19:19] s243+  s535 :: SBool = s4 /= s534+  s536 :: SBool = ~ s535+  s537 :: SBool = if s413 then s536 else s535+  s538 :: SBool = ~ s537+  s539 :: SBool = if s453 then s538 else s537+  s540 :: SBool = ~ s539+  s541 :: SBool = if s509 then s540 else s539+  s542 :: SWord 1 = choose [18:18] s243+  s543 :: SBool = s4 /= s542+  s544 :: SBool = ~ s543+  s545 :: SBool = if s421 then s544 else s543+  s546 :: SBool = ~ s545+  s547 :: SBool = if s461 then s546 else s545+  s548 :: SBool = ~ s547+  s549 :: SBool = if s517 then s548 else s547+  s550 :: SWord 1 = choose [17:17] s243+  s551 :: SBool = s4 /= s550+  s552 :: SBool = ~ s551+  s553 :: SBool = if s429 then s552 else s551+  s554 :: SBool = ~ s553+  s555 :: SBool = if s469 then s554 else s553+  s556 :: SBool = ~ s555+  s557 :: SBool = if s525 then s556 else s555+  s558 :: SWord 1 = choose [16:16] s243+  s559 :: SBool = s4 /= s558+  s560 :: SBool = ~ s559+  s561 :: SBool = if s437 then s560 else s559+  s562 :: SBool = ~ s561+  s563 :: SBool = if s477 then s562 else s561+  s564 :: SBool = ~ s563+  s565 :: SBool = if s533 then s564 else s563+  s566 :: SBool = ~ s245+  s567 :: SBool = if s245 then s566 else s245+  s568 :: SBool = ~ s247+  s569 :: SBool = if s247 then s568 else s247+  s570 :: SBool = ~ s249+  s571 :: SBool = if s249 then s570 else s249+  s572 :: SBool = ~ s251+  s573 :: SBool = if s251 then s572 else s251+  s574 :: SBool = ~ s255+  s575 :: SBool = if s255 then s574 else s255+  s576 :: SBool = ~ s259+  s577 :: SBool = if s259 then s576 else s259+  s578 :: SBool = ~ s263+  s579 :: SBool = if s263 then s578 else s263+  s580 :: SBool = ~ s267+  s581 :: SBool = if s267 then s580 else s267+  s582 :: SBool = ~ s271+  s583 :: SBool = if s271 then s582 else s271+  s584 :: SBool = ~ s275+  s585 :: SBool = if s275 then s584 else s275+  s586 :: SBool = ~ s279+  s587 :: SBool = if s279 then s586 else s279+  s588 :: SBool = ~ s285+  s589 :: SBool = if s285 then s588 else s285+  s590 :: SBool = ~ s291+  s591 :: SBool = if s291 then s590 else s291+  s592 :: SBool = ~ s297+  s593 :: SBool = if s297 then s592 else s297+  s594 :: SBool = ~ s303+  s595 :: SBool = if s303 then s594 else s303+  s596 :: SBool = ~ s309+  s597 :: SBool = if s309 then s596 else s309+  s598 :: SBool = ~ s317+  s599 :: SBool = if s317 then s598 else s317+  s600 :: SBool = ~ s325+  s601 :: SBool = if s325 then s600 else s325+  s602 :: SBool = ~ s333+  s603 :: SBool = if s333 then s602 else s333+  s604 :: SBool = ~ s341+  s605 :: SBool = if s341 then s604 else s341+  s606 :: SBool = ~ s349+  s607 :: SBool = if s349 then s606 else s349+  s608 :: SBool = ~ s357+  s609 :: SBool = if s357 then s608 else s357+  s610 :: SBool = ~ s365+  s611 :: SBool = if s365 then s610 else s365+  s612 :: SBool = ~ s373+  s613 :: SBool = if s373 then s612 else s373+  s614 :: SBool = ~ s381+  s615 :: SBool = if s381 then s614 else s381+  s616 :: SBool = ~ s389+  s617 :: SBool = if s389 then s616 else s389+  s618 :: SBool = ~ s397+  s619 :: SBool = if s397 then s618 else s397+  s620 :: SBool = ~ s405+  s621 :: SBool = if s405 then s620 else s405+  s622 :: SBool = ~ s413+  s623 :: SBool = if s413 then s622 else s413+  s624 :: SBool = ~ s421+  s625 :: SBool = if s421 then s624 else s421+  s626 :: SBool = ~ s429+  s627 :: SBool = if s429 then s626 else s429+  s628 :: SBool = ~ s437+  s629 :: SBool = if s437 then s628 else s437+  s630 :: SBool = ~ s445+  s631 :: SBool = if s445 then s630 else s445+  s632 :: SBool = ~ s453+  s633 :: SBool = if s453 then s632 else s453+  s634 :: SBool = ~ s461+  s635 :: SBool = if s461 then s634 else s461+  s636 :: SBool = ~ s469+  s637 :: SBool = if s469 then s636 else s469+  s638 :: SBool = ~ s477+  s639 :: SBool = if s477 then s638 else s477+  s640 :: SBool = ~ s485+  s641 :: SBool = if s485 then s640 else s485+  s642 :: SBool = ~ s493+  s643 :: SBool = if s493 then s642 else s493+  s644 :: SBool = ~ s501+  s645 :: SBool = if s501 then s644 else s501+  s646 :: SBool = ~ s509+  s647 :: SBool = if s509 then s646 else s509+  s648 :: SBool = ~ s517+  s649 :: SBool = if s517 then s648 else s517+  s650 :: SBool = ~ s525+  s651 :: SBool = if s525 then s650 else s525+  s652 :: SBool = ~ s533+  s653 :: SBool = if s533 then s652 else s533+  s654 :: SBool = ~ s541+  s655 :: SBool = if s541 then s654 else s541+  s656 :: SBool = ~ s549+  s657 :: SBool = if s549 then s656 else s549+  s658 :: SBool = ~ s557+  s659 :: SBool = if s557 then s658 else s557+  s660 :: SBool = ~ s565+  s661 :: SBool = if s565 then s660 else s565+  s662 :: SWord 1 = choose [15:15] s243+  s663 :: SBool = s4 /= s662+  s664 :: SBool = ~ s663+  s665 :: SBool = if s445 then s664 else s663+  s666 :: SBool = ~ s665+  s667 :: SBool = if s485 then s666 else s665+  s668 :: SBool = ~ s667+  s669 :: SBool = if s541 then s668 else s667+  s670 :: SWord 1 = choose [14:14] s243+  s671 :: SBool = s4 /= s670+  s672 :: SBool = ~ s671+  s673 :: SBool = if s453 then s672 else s671+  s674 :: SBool = ~ s673+  s675 :: SBool = if s493 then s674 else s673+  s676 :: SBool = ~ s675+  s677 :: SBool = if s549 then s676 else s675+  s678 :: SWord 1 = choose [13:13] s243+  s679 :: SBool = s4 /= s678+  s680 :: SBool = ~ s679+  s681 :: SBool = if s461 then s680 else s679+  s682 :: SBool = ~ s681+  s683 :: SBool = if s501 then s682 else s681+  s684 :: SBool = ~ s683+  s685 :: SBool = if s557 then s684 else s683+  s686 :: SWord 1 = choose [12:12] s243+  s687 :: SBool = s4 /= s686+  s688 :: SBool = ~ s687+  s689 :: SBool = if s469 then s688 else s687+  s690 :: SBool = ~ s689+  s691 :: SBool = if s509 then s690 else s689+  s692 :: SBool = ~ s691+  s693 :: SBool = if s565 then s692 else s691+  s694 :: SWord 1 = choose [11:11] s243+  s695 :: SBool = s4 /= s694+  s696 :: SBool = ~ s695+  s697 :: SBool = if s477 then s696 else s695+  s698 :: SBool = ~ s697+  s699 :: SBool = if s517 then s698 else s697+  s700 :: SWord 1 = choose [10:10] s243+  s701 :: SBool = s4 /= s700+  s702 :: SBool = ~ s701+  s703 :: SBool = if s485 then s702 else s701+  s704 :: SBool = ~ s703+  s705 :: SBool = if s525 then s704 else s703+  s706 :: SWord 1 = choose [9:9] s243+  s707 :: SBool = s4 /= s706+  s708 :: SBool = ~ s707+  s709 :: SBool = if s493 then s708 else s707+  s710 :: SBool = ~ s709+  s711 :: SBool = if s533 then s710 else s709+  s712 :: SWord 1 = choose [8:8] s243+  s713 :: SBool = s4 /= s712+  s714 :: SBool = ~ s713+  s715 :: SBool = if s501 then s714 else s713+  s716 :: SBool = ~ s715+  s717 :: SBool = if s541 then s716 else s715+  s718 :: SWord 1 = choose [7:7] s243+  s719 :: SBool = s4 /= s718+  s720 :: SBool = ~ s719+  s721 :: SBool = if s509 then s720 else s719+  s722 :: SBool = ~ s721+  s723 :: SBool = if s549 then s722 else s721+  s724 :: SWord 1 = choose [6:6] s243+  s725 :: SBool = s4 /= s724+  s726 :: SBool = ~ s725+  s727 :: SBool = if s517 then s726 else s725+  s728 :: SBool = ~ s727+  s729 :: SBool = if s557 then s728 else s727+  s730 :: SWord 1 = choose [5:5] s243+  s731 :: SBool = s4 /= s730+  s732 :: SBool = ~ s731+  s733 :: SBool = if s525 then s732 else s731+  s734 :: SBool = ~ s733+  s735 :: SBool = if s565 then s734 else s733+  s736 :: SWord 1 = choose [4:4] s243+  s737 :: SBool = s4 /= s736+  s738 :: SBool = ~ s737+  s739 :: SBool = if s533 then s738 else s737+  s740 :: SWord 1 = choose [3:3] s243+  s741 :: SBool = s4 /= s740+  s742 :: SBool = ~ s741+  s743 :: SBool = if s541 then s742 else s741+  s744 :: SWord 1 = choose [2:2] s243+  s745 :: SBool = s4 /= s744+  s746 :: SBool = ~ s745+  s747 :: SBool = if s549 then s746 else s745+  s748 :: SWord 1 = choose [1:1] s243+  s749 :: SBool = s4 /= s748+  s750 :: SBool = ~ s749+  s751 :: SBool = if s557 then s750 else s749+  s752 :: SWord 1 = choose [0:0] s243+  s753 :: SBool = s4 /= s752+  s754 :: SBool = ~ s753+  s755 :: SBool = if s565 then s754 else s753+  s757 :: SWord64 = if s755 then s756 else s101+  s759 :: SWord64 = s757 | s758+  s760 :: SWord64 = if s751 then s759 else s757+  s762 :: SWord64 = s760 | s761+  s763 :: SWord64 = if s747 then s762 else s760+  s765 :: SWord64 = s763 | s764+  s766 :: SWord64 = if s743 then s765 else s763+  s768 :: SWord64 = s766 | s767+  s769 :: SWord64 = if s739 then s768 else s766+  s771 :: SWord64 = s769 | s770+  s772 :: SWord64 = if s735 then s771 else s769+  s774 :: SWord64 = s772 | s773+  s775 :: SWord64 = if s729 then s774 else s772+  s777 :: SWord64 = s775 | s776+  s778 :: SWord64 = if s723 then s777 else s775+  s780 :: SWord64 = s778 | s779+  s781 :: SWord64 = if s717 then s780 else s778+  s783 :: SWord64 = s781 | s782+  s784 :: SWord64 = if s711 then s783 else s781+  s786 :: SWord64 = s784 | s785+  s787 :: SWord64 = if s705 then s786 else s784+  s789 :: SWord64 = s787 | s788+  s790 :: SWord64 = if s699 then s789 else s787+  s792 :: SWord64 = s790 | s791+  s793 :: SWord64 = if s693 then s792 else s790+  s795 :: SWord64 = s793 | s794+  s796 :: SWord64 = if s685 then s795 else s793+  s798 :: SWord64 = s796 | s797+  s799 :: SWord64 = if s677 then s798 else s796+  s801 :: SWord64 = s799 | s800+  s802 :: SWord64 = if s669 then s801 else s799+  s803 :: SWord64 = s100 | s802+  s804 :: SWord64 = if s661 then s803 else s802+  s805 :: SWord64 = s103 | s804+  s806 :: SWord64 = if s659 then s805 else s804+  s807 :: SWord64 = s106 | s806+  s808 :: SWord64 = if s657 then s807 else s806+  s809 :: SWord64 = s109 | s808+  s810 :: SWord64 = if s655 then s809 else s808+  s811 :: SWord64 = s112 | s810+  s812 :: SWord64 = if s653 then s811 else s810+  s813 :: SWord64 = s115 | s812+  s814 :: SWord64 = if s651 then s813 else s812+  s815 :: SWord64 = s118 | s814+  s816 :: SWord64 = if s649 then s815 else s814+  s817 :: SWord64 = s121 | s816+  s818 :: SWord64 = if s647 then s817 else s816+  s819 :: SWord64 = s124 | s818+  s820 :: SWord64 = if s645 then s819 else s818+  s821 :: SWord64 = s127 | s820+  s822 :: SWord64 = if s643 then s821 else s820+  s823 :: SWord64 = s130 | s822+  s824 :: SWord64 = if s641 then s823 else s822+  s825 :: SWord64 = s133 | s824+  s826 :: SWord64 = if s639 then s825 else s824+  s827 :: SWord64 = s136 | s826+  s828 :: SWord64 = if s637 then s827 else s826+  s829 :: SWord64 = s139 | s828+  s830 :: SWord64 = if s635 then s829 else s828+  s831 :: SWord64 = s142 | s830+  s832 :: SWord64 = if s633 then s831 else s830+  s833 :: SWord64 = s145 | s832+  s834 :: SWord64 = if s631 then s833 else s832+  s835 :: SWord64 = s148 | s834+  s836 :: SWord64 = if s629 then s835 else s834+  s837 :: SWord64 = s151 | s836+  s838 :: SWord64 = if s627 then s837 else s836+  s839 :: SWord64 = s154 | s838+  s840 :: SWord64 = if s625 then s839 else s838+  s841 :: SWord64 = s157 | s840+  s842 :: SWord64 = if s623 then s841 else s840+  s843 :: SWord64 = s160 | s842+  s844 :: SWord64 = if s621 then s843 else s842+  s845 :: SWord64 = s163 | s844+  s846 :: SWord64 = if s619 then s845 else s844+  s847 :: SWord64 = s166 | s846+  s848 :: SWord64 = if s617 then s847 else s846+  s849 :: SWord64 = s169 | s848+  s850 :: SWord64 = if s615 then s849 else s848+  s851 :: SWord64 = s172 | s850+  s852 :: SWord64 = if s613 then s851 else s850+  s853 :: SWord64 = s175 | s852+  s854 :: SWord64 = if s611 then s853 else s852+  s855 :: SWord64 = s178 | s854+  s856 :: SWord64 = if s609 then s855 else s854+  s857 :: SWord64 = s181 | s856+  s858 :: SWord64 = if s607 then s857 else s856+  s859 :: SWord64 = s184 | s858+  s860 :: SWord64 = if s605 then s859 else s858+  s861 :: SWord64 = s187 | s860+  s862 :: SWord64 = if s603 then s861 else s860+  s863 :: SWord64 = s190 | s862+  s864 :: SWord64 = if s601 then s863 else s862+  s865 :: SWord64 = s193 | s864+  s866 :: SWord64 = if s599 then s865 else s864+  s867 :: SWord64 = s196 | s866+  s868 :: SWord64 = if s597 then s867 else s866+  s869 :: SWord64 = s199 | s868+  s870 :: SWord64 = if s595 then s869 else s868+  s871 :: SWord64 = s202 | s870+  s872 :: SWord64 = if s593 then s871 else s870+  s873 :: SWord64 = s205 | s872+  s874 :: SWord64 = if s591 then s873 else s872+  s875 :: SWord64 = s208 | s874+  s876 :: SWord64 = if s589 then s875 else s874+  s877 :: SWord64 = s211 | s876+  s878 :: SWord64 = if s587 then s877 else s876+  s879 :: SWord64 = s214 | s878+  s880 :: SWord64 = if s585 then s879 else s878+  s881 :: SWord64 = s217 | s880+  s882 :: SWord64 = if s583 then s881 else s880+  s883 :: SWord64 = s220 | s882+  s884 :: SWord64 = if s581 then s883 else s882+  s885 :: SWord64 = s223 | s884+  s886 :: SWord64 = if s579 then s885 else s884+  s887 :: SWord64 = s226 | s886+  s888 :: SWord64 = if s577 then s887 else s886+  s889 :: SWord64 = s229 | s888+  s890 :: SWord64 = if s575 then s889 else s888+  s891 :: SWord64 = s232 | s890+  s892 :: SWord64 = if s573 then s891 else s890+  s893 :: SWord64 = s235 | s892+  s894 :: SWord64 = if s571 then s893 else s892+  s895 :: SWord64 = s238 | s894+  s896 :: SWord64 = if s569 then s895 else s894+  s897 :: SWord64 = s241 | s896+  s898 :: SWord64 = if s567 then s897 else s896+  s899 :: SWord16 = choose [15:0] s898+  s900 :: SWord64 = s0 # s899+  s901 :: SWord 1 = choose [0:0] s900+  s902 :: SBool = s4 /= s901+  s903 :: SWord 1 = choose [47:47] s1+  s904 :: SBool = s4 /= s903+  s905 :: SWord 1 = choose [46:46] s1+  s906 :: SBool = s4 /= s905+  s907 :: SWord 1 = choose [45:45] s1+  s908 :: SBool = s4 /= s907+  s909 :: SWord 1 = choose [44:44] s1+  s910 :: SBool = s4 /= s909+  s911 :: SWord 1 = choose [43:43] s1+  s912 :: SBool = s4 /= s911+  s913 :: SWord 1 = choose [42:42] s1+  s914 :: SBool = s4 /= s913+  s915 :: SWord 1 = choose [41:41] s1+  s916 :: SBool = s4 /= s915+  s917 :: SWord 1 = choose [40:40] s1+  s918 :: SBool = s4 /= s917+  s919 :: SWord 1 = choose [39:39] s1+  s920 :: SBool = s4 /= s919+  s921 :: SWord 1 = choose [38:38] s1+  s922 :: SBool = s4 /= s921+  s923 :: SWord 1 = choose [37:37] s1+  s924 :: SBool = s4 /= s923+  s925 :: SWord 1 = choose [36:36] s1+  s926 :: SBool = s4 /= s925+  s927 :: SWord 1 = choose [35:35] s1+  s928 :: SBool = s4 /= s927+  s929 :: SWord 1 = choose [34:34] s1+  s930 :: SBool = s4 /= s929+  s931 :: SWord 1 = choose [33:33] s1+  s932 :: SBool = s4 /= s931+  s933 :: SWord 1 = choose [32:32] s1+  s934 :: SBool = s4 /= s933+  s935 :: SWord 1 = choose [31:31] s1+  s936 :: SBool = s4 /= s935+  s937 :: SWord 1 = choose [30:30] s1+  s938 :: SBool = s4 /= s937+  s939 :: SWord 1 = choose [29:29] s1+  s940 :: SBool = s4 /= s939+  s941 :: SWord 1 = choose [28:28] s1+  s942 :: SBool = s4 /= s941+  s943 :: SWord 1 = choose [27:27] s1+  s944 :: SBool = s4 /= s943+  s945 :: SWord 1 = choose [26:26] s1+  s946 :: SBool = s4 /= s945+  s947 :: SWord 1 = choose [25:25] s1+  s948 :: SBool = s4 /= s947+  s949 :: SWord 1 = choose [24:24] s1+  s950 :: SBool = s4 /= s949+  s951 :: SWord 1 = choose [23:23] s1+  s952 :: SBool = s4 /= s951+  s953 :: SWord 1 = choose [22:22] s1+  s954 :: SBool = s4 /= s953+  s955 :: SWord 1 = choose [21:21] s1+  s956 :: SBool = s4 /= s955+  s957 :: SWord 1 = choose [20:20] s1+  s958 :: SBool = s4 /= s957+  s959 :: SWord 1 = choose [19:19] s1+  s960 :: SBool = s4 /= s959+  s961 :: SWord 1 = choose [18:18] s1+  s962 :: SBool = s4 /= s961+  s963 :: SWord 1 = choose [17:17] s1+  s964 :: SBool = s4 /= s963+  s965 :: SWord 1 = choose [16:16] s1+  s966 :: SBool = s4 /= s965+  s967 :: SWord 1 = choose [15:15] s1+  s968 :: SBool = s4 /= s967+  s969 :: SWord 1 = choose [14:14] s1+  s970 :: SBool = s4 /= s969+  s971 :: SWord 1 = choose [13:13] s1+  s972 :: SBool = s4 /= s971+  s973 :: SWord 1 = choose [12:12] s1+  s974 :: SBool = s4 /= s973+  s975 :: SWord 1 = choose [11:11] s1+  s976 :: SBool = s4 /= s975+  s977 :: SWord 1 = choose [10:10] s1+  s978 :: SBool = s4 /= s977+  s979 :: SWord 1 = choose [9:9] s1+  s980 :: SBool = s4 /= s979+  s981 :: SWord 1 = choose [8:8] s1+  s982 :: SBool = s4 /= s981+  s983 :: SWord 1 = choose [7:7] s1+  s984 :: SBool = s4 /= s983+  s985 :: SWord 1 = choose [6:6] s1+  s986 :: SBool = s4 /= s985+  s987 :: SWord 1 = choose [5:5] s1+  s988 :: SBool = s4 /= s987+  s989 :: SWord 1 = choose [4:4] s1+  s990 :: SBool = s4 /= s989+  s991 :: SWord 1 = choose [3:3] s1+  s992 :: SBool = s4 /= s991+  s993 :: SWord 1 = choose [2:2] s1+  s994 :: SBool = s4 /= s993+  s995 :: SWord 1 = choose [1:1] s1+  s996 :: SBool = s4 /= s995+  s997 :: SWord 1 = choose [0:0] s1+  s998 :: SBool = s4 /= s997+  s999 :: SWord64 = if s998 then s100 else s101+  s1000 :: SWord64 = s103 | s999+  s1001 :: SWord64 = if s996 then s1000 else s999+  s1002 :: SWord64 = s106 | s1001+  s1003 :: SWord64 = if s994 then s1002 else s1001+  s1004 :: SWord64 = s109 | s1003+  s1005 :: SWord64 = if s992 then s1004 else s1003+  s1006 :: SWord64 = s112 | s1005+  s1007 :: SWord64 = if s990 then s1006 else s1005+  s1008 :: SWord64 = s115 | s1007+  s1009 :: SWord64 = if s988 then s1008 else s1007+  s1010 :: SWord64 = s118 | s1009+  s1011 :: SWord64 = if s986 then s1010 else s1009+  s1012 :: SWord64 = s121 | s1011+  s1013 :: SWord64 = if s984 then s1012 else s1011+  s1014 :: SWord64 = s124 | s1013+  s1015 :: SWord64 = if s982 then s1014 else s1013+  s1016 :: SWord64 = s127 | s1015+  s1017 :: SWord64 = if s980 then s1016 else s1015+  s1018 :: SWord64 = s130 | s1017+  s1019 :: SWord64 = if s978 then s1018 else s1017+  s1020 :: SWord64 = s133 | s1019+  s1021 :: SWord64 = if s976 then s1020 else s1019+  s1022 :: SWord64 = s136 | s1021+  s1023 :: SWord64 = if s974 then s1022 else s1021+  s1024 :: SWord64 = s139 | s1023+  s1025 :: SWord64 = if s972 then s1024 else s1023+  s1026 :: SWord64 = s142 | s1025+  s1027 :: SWord64 = if s970 then s1026 else s1025+  s1028 :: SWord64 = s145 | s1027+  s1029 :: SWord64 = if s968 then s1028 else s1027+  s1030 :: SWord64 = s148 | s1029+  s1031 :: SWord64 = if s966 then s1030 else s1029+  s1032 :: SWord64 = s151 | s1031+  s1033 :: SWord64 = if s964 then s1032 else s1031+  s1034 :: SWord64 = s154 | s1033+  s1035 :: SWord64 = if s962 then s1034 else s1033+  s1036 :: SWord64 = s157 | s1035+  s1037 :: SWord64 = if s960 then s1036 else s1035+  s1038 :: SWord64 = s160 | s1037+  s1039 :: SWord64 = if s958 then s1038 else s1037+  s1040 :: SWord64 = s163 | s1039+  s1041 :: SWord64 = if s956 then s1040 else s1039+  s1042 :: SWord64 = s166 | s1041+  s1043 :: SWord64 = if s954 then s1042 else s1041+  s1044 :: SWord64 = s169 | s1043+  s1045 :: SWord64 = if s952 then s1044 else s1043+  s1046 :: SWord64 = s172 | s1045+  s1047 :: SWord64 = if s950 then s1046 else s1045+  s1048 :: SWord64 = s175 | s1047+  s1049 :: SWord64 = if s948 then s1048 else s1047+  s1050 :: SWord64 = s178 | s1049+  s1051 :: SWord64 = if s946 then s1050 else s1049+  s1052 :: SWord64 = s181 | s1051+  s1053 :: SWord64 = if s944 then s1052 else s1051+  s1054 :: SWord64 = s184 | s1053+  s1055 :: SWord64 = if s942 then s1054 else s1053+  s1056 :: SWord64 = s187 | s1055+  s1057 :: SWord64 = if s940 then s1056 else s1055+  s1058 :: SWord64 = s190 | s1057+  s1059 :: SWord64 = if s938 then s1058 else s1057+  s1060 :: SWord64 = s193 | s1059+  s1061 :: SWord64 = if s936 then s1060 else s1059+  s1062 :: SWord64 = s196 | s1061+  s1063 :: SWord64 = if s934 then s1062 else s1061+  s1064 :: SWord64 = s199 | s1063+  s1065 :: SWord64 = if s932 then s1064 else s1063+  s1066 :: SWord64 = s202 | s1065+  s1067 :: SWord64 = if s930 then s1066 else s1065+  s1068 :: SWord64 = s205 | s1067+  s1069 :: SWord64 = if s928 then s1068 else s1067+  s1070 :: SWord64 = s208 | s1069+  s1071 :: SWord64 = if s926 then s1070 else s1069+  s1072 :: SWord64 = s211 | s1071+  s1073 :: SWord64 = if s924 then s1072 else s1071+  s1074 :: SWord64 = s214 | s1073+  s1075 :: SWord64 = if s922 then s1074 else s1073+  s1076 :: SWord64 = s217 | s1075+  s1077 :: SWord64 = if s920 then s1076 else s1075+  s1078 :: SWord64 = s220 | s1077+  s1079 :: SWord64 = if s918 then s1078 else s1077+  s1080 :: SWord64 = s223 | s1079+  s1081 :: SWord64 = if s916 then s1080 else s1079+  s1082 :: SWord64 = s226 | s1081+  s1083 :: SWord64 = if s914 then s1082 else s1081+  s1084 :: SWord64 = s229 | s1083+  s1085 :: SWord64 = if s912 then s1084 else s1083+  s1086 :: SWord64 = s232 | s1085+  s1087 :: SWord64 = if s910 then s1086 else s1085+  s1088 :: SWord64 = s235 | s1087+  s1089 :: SWord64 = if s908 then s1088 else s1087+  s1090 :: SWord64 = s238 | s1089+  s1091 :: SWord64 = if s906 then s1090 else s1089+  s1092 :: SWord64 = s241 | s1091+  s1093 :: SWord64 = if s904 then s1092 else s1091+  s1094 :: SWord 1 = choose [63:63] s1093+  s1095 :: SBool = s4 /= s1094+  s1096 :: SWord 1 = choose [62:62] s1093+  s1097 :: SBool = s4 /= s1096+  s1098 :: SWord 1 = choose [61:61] s1093+  s1099 :: SBool = s4 /= s1098+  s1100 :: SWord 1 = choose [60:60] s1093+  s1101 :: SBool = s4 /= s1100+  s1102 :: SWord 1 = choose [59:59] s1093+  s1103 :: SBool = s4 /= s1102+  s1104 :: SBool = ~ s1103+  s1105 :: SBool = if s1095 then s1104 else s1103+  s1106 :: SWord 1 = choose [58:58] s1093+  s1107 :: SBool = s4 /= s1106+  s1108 :: SBool = ~ s1107+  s1109 :: SBool = if s1097 then s1108 else s1107+  s1110 :: SWord 1 = choose [57:57] s1093+  s1111 :: SBool = s4 /= s1110+  s1112 :: SBool = ~ s1111+  s1113 :: SBool = if s1099 then s1112 else s1111+  s1114 :: SWord 1 = choose [56:56] s1093+  s1115 :: SBool = s4 /= s1114+  s1116 :: SBool = ~ s1115+  s1117 :: SBool = if s1101 then s1116 else s1115+  s1118 :: SWord 1 = choose [55:55] s1093+  s1119 :: SBool = s4 /= s1118+  s1120 :: SBool = ~ s1119+  s1121 :: SBool = if s1105 then s1120 else s1119+  s1122 :: SWord 1 = choose [54:54] s1093+  s1123 :: SBool = s4 /= s1122+  s1124 :: SBool = ~ s1123+  s1125 :: SBool = if s1109 then s1124 else s1123+  s1126 :: SWord 1 = choose [53:53] s1093+  s1127 :: SBool = s4 /= s1126+  s1128 :: SBool = ~ s1127+  s1129 :: SBool = if s1113 then s1128 else s1127+  s1130 :: SWord 1 = choose [52:52] s1093+  s1131 :: SBool = s4 /= s1130+  s1132 :: SBool = ~ s1131+  s1133 :: SBool = if s1095 then s1132 else s1131+  s1134 :: SBool = ~ s1133+  s1135 :: SBool = if s1117 then s1134 else s1133+  s1136 :: SWord 1 = choose [51:51] s1093+  s1137 :: SBool = s4 /= s1136+  s1138 :: SBool = ~ s1137+  s1139 :: SBool = if s1097 then s1138 else s1137+  s1140 :: SBool = ~ s1139+  s1141 :: SBool = if s1121 then s1140 else s1139+  s1142 :: SWord 1 = choose [50:50] s1093+  s1143 :: SBool = s4 /= s1142+  s1144 :: SBool = ~ s1143+  s1145 :: SBool = if s1099 then s1144 else s1143+  s1146 :: SBool = ~ s1145+  s1147 :: SBool = if s1125 then s1146 else s1145+  s1148 :: SWord 1 = choose [49:49] s1093+  s1149 :: SBool = s4 /= s1148+  s1150 :: SBool = ~ s1149+  s1151 :: SBool = if s1101 then s1150 else s1149+  s1152 :: SBool = ~ s1151+  s1153 :: SBool = if s1129 then s1152 else s1151+  s1154 :: SWord 1 = choose [48:48] s1093+  s1155 :: SBool = s4 /= s1154+  s1156 :: SBool = ~ s1155+  s1157 :: SBool = if s1105 then s1156 else s1155+  s1158 :: SBool = ~ s1157+  s1159 :: SBool = if s1135 then s1158 else s1157+  s1160 :: SWord 1 = choose [47:47] s1093+  s1161 :: SBool = s4 /= s1160+  s1162 :: SBool = ~ s1161+  s1163 :: SBool = if s1095 then s1162 else s1161+  s1164 :: SBool = ~ s1163+  s1165 :: SBool = if s1109 then s1164 else s1163+  s1166 :: SBool = ~ s1165+  s1167 :: SBool = if s1141 then s1166 else s1165+  s1168 :: SWord 1 = choose [46:46] s1093+  s1169 :: SBool = s4 /= s1168+  s1170 :: SBool = ~ s1169+  s1171 :: SBool = if s1097 then s1170 else s1169+  s1172 :: SBool = ~ s1171+  s1173 :: SBool = if s1113 then s1172 else s1171+  s1174 :: SBool = ~ s1173+  s1175 :: SBool = if s1147 then s1174 else s1173+  s1176 :: SWord 1 = choose [45:45] s1093+  s1177 :: SBool = s4 /= s1176+  s1178 :: SBool = ~ s1177+  s1179 :: SBool = if s1099 then s1178 else s1177+  s1180 :: SBool = ~ s1179+  s1181 :: SBool = if s1117 then s1180 else s1179+  s1182 :: SBool = ~ s1181+  s1183 :: SBool = if s1153 then s1182 else s1181+  s1184 :: SWord 1 = choose [44:44] s1093+  s1185 :: SBool = s4 /= s1184+  s1186 :: SBool = ~ s1185+  s1187 :: SBool = if s1101 then s1186 else s1185+  s1188 :: SBool = ~ s1187+  s1189 :: SBool = if s1121 then s1188 else s1187+  s1190 :: SBool = ~ s1189+  s1191 :: SBool = if s1159 then s1190 else s1189+  s1192 :: SWord 1 = choose [43:43] s1093+  s1193 :: SBool = s4 /= s1192+  s1194 :: SBool = ~ s1193+  s1195 :: SBool = if s1105 then s1194 else s1193+  s1196 :: SBool = ~ s1195+  s1197 :: SBool = if s1125 then s1196 else s1195+  s1198 :: SBool = ~ s1197+  s1199 :: SBool = if s1167 then s1198 else s1197+  s1200 :: SWord 1 = choose [42:42] s1093+  s1201 :: SBool = s4 /= s1200+  s1202 :: SBool = ~ s1201+  s1203 :: SBool = if s1109 then s1202 else s1201+  s1204 :: SBool = ~ s1203+  s1205 :: SBool = if s1129 then s1204 else s1203+  s1206 :: SBool = ~ s1205+  s1207 :: SBool = if s1175 then s1206 else s1205+  s1208 :: SWord 1 = choose [41:41] s1093+  s1209 :: SBool = s4 /= s1208+  s1210 :: SBool = ~ s1209+  s1211 :: SBool = if s1113 then s1210 else s1209+  s1212 :: SBool = ~ s1211+  s1213 :: SBool = if s1135 then s1212 else s1211+  s1214 :: SBool = ~ s1213+  s1215 :: SBool = if s1183 then s1214 else s1213+  s1216 :: SWord 1 = choose [40:40] s1093+  s1217 :: SBool = s4 /= s1216+  s1218 :: SBool = ~ s1217+  s1219 :: SBool = if s1117 then s1218 else s1217+  s1220 :: SBool = ~ s1219+  s1221 :: SBool = if s1141 then s1220 else s1219+  s1222 :: SBool = ~ s1221+  s1223 :: SBool = if s1191 then s1222 else s1221+  s1224 :: SWord 1 = choose [39:39] s1093+  s1225 :: SBool = s4 /= s1224+  s1226 :: SBool = ~ s1225+  s1227 :: SBool = if s1121 then s1226 else s1225+  s1228 :: SBool = ~ s1227+  s1229 :: SBool = if s1147 then s1228 else s1227+  s1230 :: SBool = ~ s1229+  s1231 :: SBool = if s1199 then s1230 else s1229+  s1232 :: SWord 1 = choose [38:38] s1093+  s1233 :: SBool = s4 /= s1232+  s1234 :: SBool = ~ s1233+  s1235 :: SBool = if s1125 then s1234 else s1233+  s1236 :: SBool = ~ s1235+  s1237 :: SBool = if s1153 then s1236 else s1235+  s1238 :: SBool = ~ s1237+  s1239 :: SBool = if s1207 then s1238 else s1237+  s1240 :: SWord 1 = choose [37:37] s1093+  s1241 :: SBool = s4 /= s1240+  s1242 :: SBool = ~ s1241+  s1243 :: SBool = if s1129 then s1242 else s1241+  s1244 :: SBool = ~ s1243+  s1245 :: SBool = if s1159 then s1244 else s1243+  s1246 :: SBool = ~ s1245+  s1247 :: SBool = if s1215 then s1246 else s1245+  s1248 :: SWord 1 = choose [36:36] s1093+  s1249 :: SBool = s4 /= s1248+  s1250 :: SBool = ~ s1249+  s1251 :: SBool = if s1135 then s1250 else s1249+  s1252 :: SBool = ~ s1251+  s1253 :: SBool = if s1167 then s1252 else s1251+  s1254 :: SBool = ~ s1253+  s1255 :: SBool = if s1223 then s1254 else s1253+  s1256 :: SWord 1 = choose [35:35] s1093+  s1257 :: SBool = s4 /= s1256+  s1258 :: SBool = ~ s1257+  s1259 :: SBool = if s1141 then s1258 else s1257+  s1260 :: SBool = ~ s1259+  s1261 :: SBool = if s1175 then s1260 else s1259+  s1262 :: SBool = ~ s1261+  s1263 :: SBool = if s1231 then s1262 else s1261+  s1264 :: SWord 1 = choose [34:34] s1093+  s1265 :: SBool = s4 /= s1264+  s1266 :: SBool = ~ s1265+  s1267 :: SBool = if s1147 then s1266 else s1265+  s1268 :: SBool = ~ s1267+  s1269 :: SBool = if s1183 then s1268 else s1267+  s1270 :: SBool = ~ s1269+  s1271 :: SBool = if s1239 then s1270 else s1269+  s1272 :: SWord 1 = choose [33:33] s1093+  s1273 :: SBool = s4 /= s1272+  s1274 :: SBool = ~ s1273+  s1275 :: SBool = if s1153 then s1274 else s1273+  s1276 :: SBool = ~ s1275+  s1277 :: SBool = if s1191 then s1276 else s1275+  s1278 :: SBool = ~ s1277+  s1279 :: SBool = if s1247 then s1278 else s1277+  s1280 :: SWord 1 = choose [32:32] s1093+  s1281 :: SBool = s4 /= s1280+  s1282 :: SBool = ~ s1281+  s1283 :: SBool = if s1159 then s1282 else s1281+  s1284 :: SBool = ~ s1283+  s1285 :: SBool = if s1199 then s1284 else s1283+  s1286 :: SBool = ~ s1285+  s1287 :: SBool = if s1255 then s1286 else s1285+  s1288 :: SWord 1 = choose [31:31] s1093+  s1289 :: SBool = s4 /= s1288+  s1290 :: SBool = ~ s1289+  s1291 :: SBool = if s1167 then s1290 else s1289+  s1292 :: SBool = ~ s1291+  s1293 :: SBool = if s1207 then s1292 else s1291+  s1294 :: SBool = ~ s1293+  s1295 :: SBool = if s1263 then s1294 else s1293+  s1296 :: SWord 1 = choose [30:30] s1093+  s1297 :: SBool = s4 /= s1296+  s1298 :: SBool = ~ s1297+  s1299 :: SBool = if s1175 then s1298 else s1297+  s1300 :: SBool = ~ s1299+  s1301 :: SBool = if s1215 then s1300 else s1299+  s1302 :: SBool = ~ s1301+  s1303 :: SBool = if s1271 then s1302 else s1301+  s1304 :: SWord 1 = choose [29:29] s1093+  s1305 :: SBool = s4 /= s1304+  s1306 :: SBool = ~ s1305+  s1307 :: SBool = if s1183 then s1306 else s1305+  s1308 :: SBool = ~ s1307+  s1309 :: SBool = if s1223 then s1308 else s1307+  s1310 :: SBool = ~ s1309+  s1311 :: SBool = if s1279 then s1310 else s1309+  s1312 :: SWord 1 = choose [28:28] s1093+  s1313 :: SBool = s4 /= s1312+  s1314 :: SBool = ~ s1313+  s1315 :: SBool = if s1191 then s1314 else s1313+  s1316 :: SBool = ~ s1315+  s1317 :: SBool = if s1231 then s1316 else s1315+  s1318 :: SBool = ~ s1317+  s1319 :: SBool = if s1287 then s1318 else s1317+  s1320 :: SWord 1 = choose [27:27] s1093+  s1321 :: SBool = s4 /= s1320+  s1322 :: SBool = ~ s1321+  s1323 :: SBool = if s1199 then s1322 else s1321+  s1324 :: SBool = ~ s1323+  s1325 :: SBool = if s1239 then s1324 else s1323+  s1326 :: SBool = ~ s1325+  s1327 :: SBool = if s1295 then s1326 else s1325+  s1328 :: SWord 1 = choose [26:26] s1093+  s1329 :: SBool = s4 /= s1328+  s1330 :: SBool = ~ s1329+  s1331 :: SBool = if s1207 then s1330 else s1329+  s1332 :: SBool = ~ s1331+  s1333 :: SBool = if s1247 then s1332 else s1331+  s1334 :: SBool = ~ s1333+  s1335 :: SBool = if s1303 then s1334 else s1333+  s1336 :: SWord 1 = choose [25:25] s1093+  s1337 :: SBool = s4 /= s1336+  s1338 :: SBool = ~ s1337+  s1339 :: SBool = if s1215 then s1338 else s1337+  s1340 :: SBool = ~ s1339+  s1341 :: SBool = if s1255 then s1340 else s1339+  s1342 :: SBool = ~ s1341+  s1343 :: SBool = if s1311 then s1342 else s1341+  s1344 :: SWord 1 = choose [24:24] s1093+  s1345 :: SBool = s4 /= s1344+  s1346 :: SBool = ~ s1345+  s1347 :: SBool = if s1223 then s1346 else s1345+  s1348 :: SBool = ~ s1347+  s1349 :: SBool = if s1263 then s1348 else s1347+  s1350 :: SBool = ~ s1349+  s1351 :: SBool = if s1319 then s1350 else s1349+  s1352 :: SWord 1 = choose [23:23] s1093+  s1353 :: SBool = s4 /= s1352+  s1354 :: SBool = ~ s1353+  s1355 :: SBool = if s1231 then s1354 else s1353+  s1356 :: SBool = ~ s1355+  s1357 :: SBool = if s1271 then s1356 else s1355+  s1358 :: SBool = ~ s1357+  s1359 :: SBool = if s1327 then s1358 else s1357+  s1360 :: SWord 1 = choose [22:22] s1093+  s1361 :: SBool = s4 /= s1360+  s1362 :: SBool = ~ s1361+  s1363 :: SBool = if s1239 then s1362 else s1361+  s1364 :: SBool = ~ s1363+  s1365 :: SBool = if s1279 then s1364 else s1363+  s1366 :: SBool = ~ s1365+  s1367 :: SBool = if s1335 then s1366 else s1365+  s1368 :: SWord 1 = choose [21:21] s1093+  s1369 :: SBool = s4 /= s1368+  s1370 :: SBool = ~ s1369+  s1371 :: SBool = if s1247 then s1370 else s1369+  s1372 :: SBool = ~ s1371+  s1373 :: SBool = if s1287 then s1372 else s1371+  s1374 :: SBool = ~ s1373+  s1375 :: SBool = if s1343 then s1374 else s1373+  s1376 :: SWord 1 = choose [20:20] s1093+  s1377 :: SBool = s4 /= s1376+  s1378 :: SBool = ~ s1377+  s1379 :: SBool = if s1255 then s1378 else s1377+  s1380 :: SBool = ~ s1379+  s1381 :: SBool = if s1295 then s1380 else s1379+  s1382 :: SBool = ~ s1381+  s1383 :: SBool = if s1351 then s1382 else s1381+  s1384 :: SWord 1 = choose [19:19] s1093+  s1385 :: SBool = s4 /= s1384+  s1386 :: SBool = ~ s1385+  s1387 :: SBool = if s1263 then s1386 else s1385+  s1388 :: SBool = ~ s1387+  s1389 :: SBool = if s1303 then s1388 else s1387+  s1390 :: SBool = ~ s1389+  s1391 :: SBool = if s1359 then s1390 else s1389+  s1392 :: SWord 1 = choose [18:18] s1093+  s1393 :: SBool = s4 /= s1392+  s1394 :: SBool = ~ s1393+  s1395 :: SBool = if s1271 then s1394 else s1393+  s1396 :: SBool = ~ s1395+  s1397 :: SBool = if s1311 then s1396 else s1395+  s1398 :: SBool = ~ s1397+  s1399 :: SBool = if s1367 then s1398 else s1397+  s1400 :: SWord 1 = choose [17:17] s1093+  s1401 :: SBool = s4 /= s1400+  s1402 :: SBool = ~ s1401+  s1403 :: SBool = if s1279 then s1402 else s1401+  s1404 :: SBool = ~ s1403+  s1405 :: SBool = if s1319 then s1404 else s1403+  s1406 :: SBool = ~ s1405+  s1407 :: SBool = if s1375 then s1406 else s1405+  s1408 :: SWord 1 = choose [16:16] s1093+  s1409 :: SBool = s4 /= s1408+  s1410 :: SBool = ~ s1409+  s1411 :: SBool = if s1287 then s1410 else s1409+  s1412 :: SBool = ~ s1411+  s1413 :: SBool = if s1327 then s1412 else s1411+  s1414 :: SBool = ~ s1413+  s1415 :: SBool = if s1383 then s1414 else s1413+  s1416 :: SBool = ~ s1095+  s1417 :: SBool = if s1095 then s1416 else s1095+  s1418 :: SBool = ~ s1097+  s1419 :: SBool = if s1097 then s1418 else s1097+  s1420 :: SBool = ~ s1099+  s1421 :: SBool = if s1099 then s1420 else s1099+  s1422 :: SBool = ~ s1101+  s1423 :: SBool = if s1101 then s1422 else s1101+  s1424 :: SBool = ~ s1105+  s1425 :: SBool = if s1105 then s1424 else s1105+  s1426 :: SBool = ~ s1109+  s1427 :: SBool = if s1109 then s1426 else s1109+  s1428 :: SBool = ~ s1113+  s1429 :: SBool = if s1113 then s1428 else s1113+  s1430 :: SBool = ~ s1117+  s1431 :: SBool = if s1117 then s1430 else s1117+  s1432 :: SBool = ~ s1121+  s1433 :: SBool = if s1121 then s1432 else s1121+  s1434 :: SBool = ~ s1125+  s1435 :: SBool = if s1125 then s1434 else s1125+  s1436 :: SBool = ~ s1129+  s1437 :: SBool = if s1129 then s1436 else s1129+  s1438 :: SBool = ~ s1135+  s1439 :: SBool = if s1135 then s1438 else s1135+  s1440 :: SBool = ~ s1141+  s1441 :: SBool = if s1141 then s1440 else s1141+  s1442 :: SBool = ~ s1147+  s1443 :: SBool = if s1147 then s1442 else s1147+  s1444 :: SBool = ~ s1153+  s1445 :: SBool = if s1153 then s1444 else s1153+  s1446 :: SBool = ~ s1159+  s1447 :: SBool = if s1159 then s1446 else s1159+  s1448 :: SBool = ~ s1167+  s1449 :: SBool = if s1167 then s1448 else s1167+  s1450 :: SBool = ~ s1175+  s1451 :: SBool = if s1175 then s1450 else s1175+  s1452 :: SBool = ~ s1183+  s1453 :: SBool = if s1183 then s1452 else s1183+  s1454 :: SBool = ~ s1191+  s1455 :: SBool = if s1191 then s1454 else s1191+  s1456 :: SBool = ~ s1199+  s1457 :: SBool = if s1199 then s1456 else s1199+  s1458 :: SBool = ~ s1207+  s1459 :: SBool = if s1207 then s1458 else s1207+  s1460 :: SBool = ~ s1215+  s1461 :: SBool = if s1215 then s1460 else s1215+  s1462 :: SBool = ~ s1223+  s1463 :: SBool = if s1223 then s1462 else s1223+  s1464 :: SBool = ~ s1231+  s1465 :: SBool = if s1231 then s1464 else s1231+  s1466 :: SBool = ~ s1239+  s1467 :: SBool = if s1239 then s1466 else s1239+  s1468 :: SBool = ~ s1247+  s1469 :: SBool = if s1247 then s1468 else s1247+  s1470 :: SBool = ~ s1255+  s1471 :: SBool = if s1255 then s1470 else s1255+  s1472 :: SBool = ~ s1263+  s1473 :: SBool = if s1263 then s1472 else s1263+  s1474 :: SBool = ~ s1271+  s1475 :: SBool = if s1271 then s1474 else s1271+  s1476 :: SBool = ~ s1279+  s1477 :: SBool = if s1279 then s1476 else s1279+  s1478 :: SBool = ~ s1287+  s1479 :: SBool = if s1287 then s1478 else s1287+  s1480 :: SBool = ~ s1295+  s1481 :: SBool = if s1295 then s1480 else s1295+  s1482 :: SBool = ~ s1303+  s1483 :: SBool = if s1303 then s1482 else s1303+  s1484 :: SBool = ~ s1311+  s1485 :: SBool = if s1311 then s1484 else s1311+  s1486 :: SBool = ~ s1319+  s1487 :: SBool = if s1319 then s1486 else s1319+  s1488 :: SBool = ~ s1327+  s1489 :: SBool = if s1327 then s1488 else s1327+  s1490 :: SBool = ~ s1335+  s1491 :: SBool = if s1335 then s1490 else s1335+  s1492 :: SBool = ~ s1343+  s1493 :: SBool = if s1343 then s1492 else s1343+  s1494 :: SBool = ~ s1351+  s1495 :: SBool = if s1351 then s1494 else s1351+  s1496 :: SBool = ~ s1359+  s1497 :: SBool = if s1359 then s1496 else s1359+  s1498 :: SBool = ~ s1367+  s1499 :: SBool = if s1367 then s1498 else s1367+  s1500 :: SBool = ~ s1375+  s1501 :: SBool = if s1375 then s1500 else s1375+  s1502 :: SBool = ~ s1383+  s1503 :: SBool = if s1383 then s1502 else s1383+  s1504 :: SBool = ~ s1391+  s1505 :: SBool = if s1391 then s1504 else s1391+  s1506 :: SBool = ~ s1399+  s1507 :: SBool = if s1399 then s1506 else s1399+  s1508 :: SBool = ~ s1407+  s1509 :: SBool = if s1407 then s1508 else s1407+  s1510 :: SBool = ~ s1415+  s1511 :: SBool = if s1415 then s1510 else s1415+  s1512 :: SWord 1 = choose [15:15] s1093+  s1513 :: SBool = s4 /= s1512+  s1514 :: SBool = ~ s1513+  s1515 :: SBool = if s1295 then s1514 else s1513+  s1516 :: SBool = ~ s1515+  s1517 :: SBool = if s1335 then s1516 else s1515+  s1518 :: SBool = ~ s1517+  s1519 :: SBool = if s1391 then s1518 else s1517+  s1520 :: SWord 1 = choose [14:14] s1093+  s1521 :: SBool = s4 /= s1520+  s1522 :: SBool = ~ s1521+  s1523 :: SBool = if s1303 then s1522 else s1521+  s1524 :: SBool = ~ s1523+  s1525 :: SBool = if s1343 then s1524 else s1523+  s1526 :: SBool = ~ s1525+  s1527 :: SBool = if s1399 then s1526 else s1525+  s1528 :: SWord 1 = choose [13:13] s1093+  s1529 :: SBool = s4 /= s1528+  s1530 :: SBool = ~ s1529+  s1531 :: SBool = if s1311 then s1530 else s1529+  s1532 :: SBool = ~ s1531+  s1533 :: SBool = if s1351 then s1532 else s1531+  s1534 :: SBool = ~ s1533+  s1535 :: SBool = if s1407 then s1534 else s1533+  s1536 :: SWord 1 = choose [12:12] s1093+  s1537 :: SBool = s4 /= s1536+  s1538 :: SBool = ~ s1537+  s1539 :: SBool = if s1319 then s1538 else s1537+  s1540 :: SBool = ~ s1539+  s1541 :: SBool = if s1359 then s1540 else s1539+  s1542 :: SBool = ~ s1541+  s1543 :: SBool = if s1415 then s1542 else s1541+  s1544 :: SWord 1 = choose [11:11] s1093+  s1545 :: SBool = s4 /= s1544+  s1546 :: SBool = ~ s1545+  s1547 :: SBool = if s1327 then s1546 else s1545+  s1548 :: SBool = ~ s1547+  s1549 :: SBool = if s1367 then s1548 else s1547+  s1550 :: SWord 1 = choose [10:10] s1093+  s1551 :: SBool = s4 /= s1550+  s1552 :: SBool = ~ s1551+  s1553 :: SBool = if s1335 then s1552 else s1551+  s1554 :: SBool = ~ s1553+  s1555 :: SBool = if s1375 then s1554 else s1553+  s1556 :: SWord 1 = choose [9:9] s1093+  s1557 :: SBool = s4 /= s1556+  s1558 :: SBool = ~ s1557+  s1559 :: SBool = if s1343 then s1558 else s1557+  s1560 :: SBool = ~ s1559+  s1561 :: SBool = if s1383 then s1560 else s1559+  s1562 :: SWord 1 = choose [8:8] s1093+  s1563 :: SBool = s4 /= s1562+  s1564 :: SBool = ~ s1563+  s1565 :: SBool = if s1351 then s1564 else s1563+  s1566 :: SBool = ~ s1565+  s1567 :: SBool = if s1391 then s1566 else s1565+  s1568 :: SWord 1 = choose [7:7] s1093+  s1569 :: SBool = s4 /= s1568+  s1570 :: SBool = ~ s1569+  s1571 :: SBool = if s1359 then s1570 else s1569+  s1572 :: SBool = ~ s1571+  s1573 :: SBool = if s1399 then s1572 else s1571+  s1574 :: SWord 1 = choose [6:6] s1093+  s1575 :: SBool = s4 /= s1574+  s1576 :: SBool = ~ s1575+  s1577 :: SBool = if s1367 then s1576 else s1575+  s1578 :: SBool = ~ s1577+  s1579 :: SBool = if s1407 then s1578 else s1577+  s1580 :: SWord 1 = choose [5:5] s1093+  s1581 :: SBool = s4 /= s1580+  s1582 :: SBool = ~ s1581+  s1583 :: SBool = if s1375 then s1582 else s1581+  s1584 :: SBool = ~ s1583+  s1585 :: SBool = if s1415 then s1584 else s1583+  s1586 :: SWord 1 = choose [4:4] s1093+  s1587 :: SBool = s4 /= s1586+  s1588 :: SBool = ~ s1587+  s1589 :: SBool = if s1383 then s1588 else s1587+  s1590 :: SWord 1 = choose [3:3] s1093+  s1591 :: SBool = s4 /= s1590+  s1592 :: SBool = ~ s1591+  s1593 :: SBool = if s1391 then s1592 else s1591+  s1594 :: SWord 1 = choose [2:2] s1093+  s1595 :: SBool = s4 /= s1594+  s1596 :: SBool = ~ s1595+  s1597 :: SBool = if s1399 then s1596 else s1595+  s1598 :: SWord 1 = choose [1:1] s1093+  s1599 :: SBool = s4 /= s1598+  s1600 :: SBool = ~ s1599+  s1601 :: SBool = if s1407 then s1600 else s1599+  s1602 :: SWord 1 = choose [0:0] s1093+  s1603 :: SBool = s4 /= s1602+  s1604 :: SBool = ~ s1603+  s1605 :: SBool = if s1415 then s1604 else s1603+  s1606 :: SWord64 = if s1605 then s756 else s101+  s1607 :: SWord64 = s758 | s1606+  s1608 :: SWord64 = if s1601 then s1607 else s1606+  s1609 :: SWord64 = s761 | s1608+  s1610 :: SWord64 = if s1597 then s1609 else s1608+  s1611 :: SWord64 = s764 | s1610+  s1612 :: SWord64 = if s1593 then s1611 else s1610+  s1613 :: SWord64 = s767 | s1612+  s1614 :: SWord64 = if s1589 then s1613 else s1612+  s1615 :: SWord64 = s770 | s1614+  s1616 :: SWord64 = if s1585 then s1615 else s1614+  s1617 :: SWord64 = s773 | s1616+  s1618 :: SWord64 = if s1579 then s1617 else s1616+  s1619 :: SWord64 = s776 | s1618+  s1620 :: SWord64 = if s1573 then s1619 else s1618+  s1621 :: SWord64 = s779 | s1620+  s1622 :: SWord64 = if s1567 then s1621 else s1620+  s1623 :: SWord64 = s782 | s1622+  s1624 :: SWord64 = if s1561 then s1623 else s1622+  s1625 :: SWord64 = s785 | s1624+  s1626 :: SWord64 = if s1555 then s1625 else s1624+  s1627 :: SWord64 = s788 | s1626+  s1628 :: SWord64 = if s1549 then s1627 else s1626+  s1629 :: SWord64 = s791 | s1628+  s1630 :: SWord64 = if s1543 then s1629 else s1628+  s1631 :: SWord64 = s794 | s1630+  s1632 :: SWord64 = if s1535 then s1631 else s1630+  s1633 :: SWord64 = s797 | s1632+  s1634 :: SWord64 = if s1527 then s1633 else s1632+  s1635 :: SWord64 = s800 | s1634+  s1636 :: SWord64 = if s1519 then s1635 else s1634+  s1637 :: SWord64 = s100 | s1636+  s1638 :: SWord64 = if s1511 then s1637 else s1636+  s1639 :: SWord64 = s103 | s1638+  s1640 :: SWord64 = if s1509 then s1639 else s1638+  s1641 :: SWord64 = s106 | s1640+  s1642 :: SWord64 = if s1507 then s1641 else s1640+  s1643 :: SWord64 = s109 | s1642+  s1644 :: SWord64 = if s1505 then s1643 else s1642+  s1645 :: SWord64 = s112 | s1644+  s1646 :: SWord64 = if s1503 then s1645 else s1644+  s1647 :: SWord64 = s115 | s1646+  s1648 :: SWord64 = if s1501 then s1647 else s1646+  s1649 :: SWord64 = s118 | s1648+  s1650 :: SWord64 = if s1499 then s1649 else s1648+  s1651 :: SWord64 = s121 | s1650+  s1652 :: SWord64 = if s1497 then s1651 else s1650+  s1653 :: SWord64 = s124 | s1652+  s1654 :: SWord64 = if s1495 then s1653 else s1652+  s1655 :: SWord64 = s127 | s1654+  s1656 :: SWord64 = if s1493 then s1655 else s1654+  s1657 :: SWord64 = s130 | s1656+  s1658 :: SWord64 = if s1491 then s1657 else s1656+  s1659 :: SWord64 = s133 | s1658+  s1660 :: SWord64 = if s1489 then s1659 else s1658+  s1661 :: SWord64 = s136 | s1660+  s1662 :: SWord64 = if s1487 then s1661 else s1660+  s1663 :: SWord64 = s139 | s1662+  s1664 :: SWord64 = if s1485 then s1663 else s1662+  s1665 :: SWord64 = s142 | s1664+  s1666 :: SWord64 = if s1483 then s1665 else s1664+  s1667 :: SWord64 = s145 | s1666+  s1668 :: SWord64 = if s1481 then s1667 else s1666+  s1669 :: SWord64 = s148 | s1668+  s1670 :: SWord64 = if s1479 then s1669 else s1668+  s1671 :: SWord64 = s151 | s1670+  s1672 :: SWord64 = if s1477 then s1671 else s1670+  s1673 :: SWord64 = s154 | s1672+  s1674 :: SWord64 = if s1475 then s1673 else s1672+  s1675 :: SWord64 = s157 | s1674+  s1676 :: SWord64 = if s1473 then s1675 else s1674+  s1677 :: SWord64 = s160 | s1676+  s1678 :: SWord64 = if s1471 then s1677 else s1676+  s1679 :: SWord64 = s163 | s1678+  s1680 :: SWord64 = if s1469 then s1679 else s1678+  s1681 :: SWord64 = s166 | s1680+  s1682 :: SWord64 = if s1467 then s1681 else s1680+  s1683 :: SWord64 = s169 | s1682+  s1684 :: SWord64 = if s1465 then s1683 else s1682+  s1685 :: SWord64 = s172 | s1684+  s1686 :: SWord64 = if s1463 then s1685 else s1684+  s1687 :: SWord64 = s175 | s1686+  s1688 :: SWord64 = if s1461 then s1687 else s1686+  s1689 :: SWord64 = s178 | s1688+  s1690 :: SWord64 = if s1459 then s1689 else s1688+  s1691 :: SWord64 = s181 | s1690+  s1692 :: SWord64 = if s1457 then s1691 else s1690+  s1693 :: SWord64 = s184 | s1692+  s1694 :: SWord64 = if s1455 then s1693 else s1692+  s1695 :: SWord64 = s187 | s1694+  s1696 :: SWord64 = if s1453 then s1695 else s1694+  s1697 :: SWord64 = s190 | s1696+  s1698 :: SWord64 = if s1451 then s1697 else s1696+  s1699 :: SWord64 = s193 | s1698+  s1700 :: SWord64 = if s1449 then s1699 else s1698+  s1701 :: SWord64 = s196 | s1700+  s1702 :: SWord64 = if s1447 then s1701 else s1700+  s1703 :: SWord64 = s199 | s1702+  s1704 :: SWord64 = if s1445 then s1703 else s1702+  s1705 :: SWord64 = s202 | s1704+  s1706 :: SWord64 = if s1443 then s1705 else s1704+  s1707 :: SWord64 = s205 | s1706+  s1708 :: SWord64 = if s1441 then s1707 else s1706+  s1709 :: SWord64 = s208 | s1708+  s1710 :: SWord64 = if s1439 then s1709 else s1708+  s1711 :: SWord64 = s211 | s1710+  s1712 :: SWord64 = if s1437 then s1711 else s1710+  s1713 :: SWord64 = s214 | s1712+  s1714 :: SWord64 = if s1435 then s1713 else s1712+  s1715 :: SWord64 = s217 | s1714+  s1716 :: SWord64 = if s1433 then s1715 else s1714+  s1717 :: SWord64 = s220 | s1716+  s1718 :: SWord64 = if s1431 then s1717 else s1716+  s1719 :: SWord64 = s223 | s1718+  s1720 :: SWord64 = if s1429 then s1719 else s1718+  s1721 :: SWord64 = s226 | s1720+  s1722 :: SWord64 = if s1427 then s1721 else s1720+  s1723 :: SWord64 = s229 | s1722+  s1724 :: SWord64 = if s1425 then s1723 else s1722+  s1725 :: SWord64 = s232 | s1724+  s1726 :: SWord64 = if s1423 then s1725 else s1724+  s1727 :: SWord64 = s235 | s1726+  s1728 :: SWord64 = if s1421 then s1727 else s1726+  s1729 :: SWord64 = s238 | s1728+  s1730 :: SWord64 = if s1419 then s1729 else s1728+  s1731 :: SWord64 = s241 | s1730+  s1732 :: SWord64 = if s1417 then s1731 else s1730+  s1733 :: SWord16 = choose [15:0] s1732+  s1734 :: SWord64 = s1 # s1733+  s1735 :: SWord 1 = choose [0:0] s1734+  s1736 :: SBool = s4 /= s1735+  s1737 :: SBool = s902 == s1736+  s1738 :: SWord 1 = choose [1:1] s900+  s1739 :: SBool = s4 /= s1738+  s1740 :: SWord 1 = choose [1:1] s1734+  s1741 :: SBool = s4 /= s1740+  s1742 :: SBool = s1739 == s1741+  s1743 :: SWord 1 = choose [2:2] s900+  s1744 :: SBool = s4 /= s1743+  s1745 :: SWord 1 = choose [2:2] s1734+  s1746 :: SBool = s4 /= s1745+  s1747 :: SBool = s1744 == s1746+  s1748 :: SWord 1 = choose [3:3] s900+  s1749 :: SBool = s4 /= s1748+  s1750 :: SWord 1 = choose [3:3] s1734+  s1751 :: SBool = s4 /= s1750+  s1752 :: SBool = s1749 == s1751+  s1753 :: SWord 1 = choose [4:4] s900+  s1754 :: SBool = s4 /= s1753+  s1755 :: SWord 1 = choose [4:4] s1734+  s1756 :: SBool = s4 /= s1755+  s1757 :: SBool = s1754 == s1756+  s1758 :: SWord 1 = choose [5:5] s900+  s1759 :: SBool = s4 /= s1758+  s1760 :: SWord 1 = choose [5:5] s1734+  s1761 :: SBool = s4 /= s1760+  s1762 :: SBool = s1759 == s1761+  s1763 :: SWord 1 = choose [6:6] s900+  s1764 :: SBool = s4 /= s1763+  s1765 :: SWord 1 = choose [6:6] s1734+  s1766 :: SBool = s4 /= s1765+  s1767 :: SBool = s1764 == s1766+  s1768 :: SWord 1 = choose [7:7] s900+  s1769 :: SBool = s4 /= s1768+  s1770 :: SWord 1 = choose [7:7] s1734+  s1771 :: SBool = s4 /= s1770+  s1772 :: SBool = s1769 == s1771+  s1773 :: SWord 1 = choose [8:8] s900+  s1774 :: SBool = s4 /= s1773+  s1775 :: SWord 1 = choose [8:8] s1734+  s1776 :: SBool = s4 /= s1775+  s1777 :: SBool = s1774 == s1776+  s1778 :: SWord 1 = choose [9:9] s900+  s1779 :: SBool = s4 /= s1778+  s1780 :: SWord 1 = choose [9:9] s1734+  s1781 :: SBool = s4 /= s1780+  s1782 :: SBool = s1779 == s1781+  s1783 :: SWord 1 = choose [10:10] s900+  s1784 :: SBool = s4 /= s1783+  s1785 :: SWord 1 = choose [10:10] s1734+  s1786 :: SBool = s4 /= s1785+  s1787 :: SBool = s1784 == s1786+  s1788 :: SWord 1 = choose [11:11] s900+  s1789 :: SBool = s4 /= s1788+  s1790 :: SWord 1 = choose [11:11] s1734+  s1791 :: SBool = s4 /= s1790+  s1792 :: SBool = s1789 == s1791+  s1793 :: SWord 1 = choose [12:12] s900+  s1794 :: SBool = s4 /= s1793+  s1795 :: SWord 1 = choose [12:12] s1734+  s1796 :: SBool = s4 /= s1795+  s1797 :: SBool = s1794 == s1796+  s1798 :: SWord 1 = choose [13:13] s900+  s1799 :: SBool = s4 /= s1798+  s1800 :: SWord 1 = choose [13:13] s1734+  s1801 :: SBool = s4 /= s1800+  s1802 :: SBool = s1799 == s1801+  s1803 :: SWord 1 = choose [14:14] s900+  s1804 :: SBool = s4 /= s1803+  s1805 :: SWord 1 = choose [14:14] s1734+  s1806 :: SBool = s4 /= s1805+  s1807 :: SBool = s1804 == s1806+  s1808 :: SWord 1 = choose [15:15] s900+  s1809 :: SBool = s4 /= s1808+  s1810 :: SWord 1 = choose [15:15] s1734+  s1811 :: SBool = s4 /= s1810+  s1812 :: SBool = s1809 == s1811+  s1813 :: SWord 1 = choose [16:16] s900+  s1814 :: SBool = s4 /= s1813+  s1815 :: SWord 1 = choose [16:16] s1734+  s1816 :: SBool = s4 /= s1815+  s1817 :: SBool = s1814 == s1816+  s1818 :: SWord 1 = choose [17:17] s900+  s1819 :: SBool = s4 /= s1818+  s1820 :: SWord 1 = choose [17:17] s1734+  s1821 :: SBool = s4 /= s1820+  s1822 :: SBool = s1819 == s1821+  s1823 :: SWord 1 = choose [18:18] s900+  s1824 :: SBool = s4 /= s1823+  s1825 :: SWord 1 = choose [18:18] s1734+  s1826 :: SBool = s4 /= s1825+  s1827 :: SBool = s1824 == s1826+  s1828 :: SWord 1 = choose [19:19] s900+  s1829 :: SBool = s4 /= s1828+  s1830 :: SWord 1 = choose [19:19] s1734+  s1831 :: SBool = s4 /= s1830+  s1832 :: SBool = s1829 == s1831+  s1833 :: SWord 1 = choose [20:20] s900+  s1834 :: SBool = s4 /= s1833+  s1835 :: SWord 1 = choose [20:20] s1734+  s1836 :: SBool = s4 /= s1835+  s1837 :: SBool = s1834 == s1836+  s1838 :: SWord 1 = choose [21:21] s900+  s1839 :: SBool = s4 /= s1838+  s1840 :: SWord 1 = choose [21:21] s1734+  s1841 :: SBool = s4 /= s1840+  s1842 :: SBool = s1839 == s1841+  s1843 :: SWord 1 = choose [22:22] s900+  s1844 :: SBool = s4 /= s1843+  s1845 :: SWord 1 = choose [22:22] s1734+  s1846 :: SBool = s4 /= s1845+  s1847 :: SBool = s1844 == s1846+  s1848 :: SWord 1 = choose [23:23] s900+  s1849 :: SBool = s4 /= s1848+  s1850 :: SWord 1 = choose [23:23] s1734+  s1851 :: SBool = s4 /= s1850+  s1852 :: SBool = s1849 == s1851+  s1853 :: SWord 1 = choose [24:24] s900+  s1854 :: SBool = s4 /= s1853+  s1855 :: SWord 1 = choose [24:24] s1734+  s1856 :: SBool = s4 /= s1855+  s1857 :: SBool = s1854 == s1856+  s1858 :: SWord 1 = choose [25:25] s900+  s1859 :: SBool = s4 /= s1858+  s1860 :: SWord 1 = choose [25:25] s1734+  s1861 :: SBool = s4 /= s1860+  s1862 :: SBool = s1859 == s1861+  s1863 :: SWord 1 = choose [26:26] s900+  s1864 :: SBool = s4 /= s1863+  s1865 :: SWord 1 = choose [26:26] s1734+  s1866 :: SBool = s4 /= s1865+  s1867 :: SBool = s1864 == s1866+  s1868 :: SWord 1 = choose [27:27] s900+  s1869 :: SBool = s4 /= s1868+  s1870 :: SWord 1 = choose [27:27] s1734+  s1871 :: SBool = s4 /= s1870+  s1872 :: SBool = s1869 == s1871+  s1873 :: SWord 1 = choose [28:28] s900+  s1874 :: SBool = s4 /= s1873+  s1875 :: SWord 1 = choose [28:28] s1734+  s1876 :: SBool = s4 /= s1875+  s1877 :: SBool = s1874 == s1876+  s1878 :: SWord 1 = choose [29:29] s900+  s1879 :: SBool = s4 /= s1878+  s1880 :: SWord 1 = choose [29:29] s1734+  s1881 :: SBool = s4 /= s1880+  s1882 :: SBool = s1879 == s1881+  s1883 :: SWord 1 = choose [30:30] s900+  s1884 :: SBool = s4 /= s1883+  s1885 :: SWord 1 = choose [30:30] s1734+  s1886 :: SBool = s4 /= s1885+  s1887 :: SBool = s1884 == s1886+  s1888 :: SWord 1 = choose [31:31] s900+  s1889 :: SBool = s4 /= s1888+  s1890 :: SWord 1 = choose [31:31] s1734+  s1891 :: SBool = s4 /= s1890+  s1892 :: SBool = s1889 == s1891+  s1893 :: SWord 1 = choose [32:32] s900+  s1894 :: SBool = s4 /= s1893+  s1895 :: SWord 1 = choose [32:32] s1734+  s1896 :: SBool = s4 /= s1895+  s1897 :: SBool = s1894 == s1896+  s1898 :: SWord 1 = choose [33:33] s900+  s1899 :: SBool = s4 /= s1898+  s1900 :: SWord 1 = choose [33:33] s1734+  s1901 :: SBool = s4 /= s1900+  s1902 :: SBool = s1899 == s1901+  s1903 :: SWord 1 = choose [34:34] s900+  s1904 :: SBool = s4 /= s1903+  s1905 :: SWord 1 = choose [34:34] s1734+  s1906 :: SBool = s4 /= s1905+  s1907 :: SBool = s1904 == s1906+  s1908 :: SWord 1 = choose [35:35] s900+  s1909 :: SBool = s4 /= s1908+  s1910 :: SWord 1 = choose [35:35] s1734+  s1911 :: SBool = s4 /= s1910+  s1912 :: SBool = s1909 == s1911+  s1913 :: SWord 1 = choose [36:36] s900+  s1914 :: SBool = s4 /= s1913+  s1915 :: SWord 1 = choose [36:36] s1734+  s1916 :: SBool = s4 /= s1915+  s1917 :: SBool = s1914 == s1916+  s1918 :: SWord 1 = choose [37:37] s900+  s1919 :: SBool = s4 /= s1918+  s1920 :: SWord 1 = choose [37:37] s1734+  s1921 :: SBool = s4 /= s1920+  s1922 :: SBool = s1919 == s1921+  s1923 :: SWord 1 = choose [38:38] s900+  s1924 :: SBool = s4 /= s1923+  s1925 :: SWord 1 = choose [38:38] s1734+  s1926 :: SBool = s4 /= s1925+  s1927 :: SBool = s1924 == s1926+  s1928 :: SWord 1 = choose [39:39] s900+  s1929 :: SBool = s4 /= s1928+  s1930 :: SWord 1 = choose [39:39] s1734+  s1931 :: SBool = s4 /= s1930+  s1932 :: SBool = s1929 == s1931+  s1933 :: SWord 1 = choose [40:40] s900+  s1934 :: SBool = s4 /= s1933+  s1935 :: SWord 1 = choose [40:40] s1734+  s1936 :: SBool = s4 /= s1935+  s1937 :: SBool = s1934 == s1936+  s1938 :: SWord 1 = choose [41:41] s900+  s1939 :: SBool = s4 /= s1938+  s1940 :: SWord 1 = choose [41:41] s1734+  s1941 :: SBool = s4 /= s1940+  s1942 :: SBool = s1939 == s1941+  s1943 :: SWord 1 = choose [42:42] s900+  s1944 :: SBool = s4 /= s1943+  s1945 :: SWord 1 = choose [42:42] s1734+  s1946 :: SBool = s4 /= s1945+  s1947 :: SBool = s1944 == s1946+  s1948 :: SWord 1 = choose [43:43] s900+  s1949 :: SBool = s4 /= s1948+  s1950 :: SWord 1 = choose [43:43] s1734+  s1951 :: SBool = s4 /= s1950+  s1952 :: SBool = s1949 == s1951+  s1953 :: SWord 1 = choose [44:44] s900+  s1954 :: SBool = s4 /= s1953+  s1955 :: SWord 1 = choose [44:44] s1734+  s1956 :: SBool = s4 /= s1955+  s1957 :: SBool = s1954 == s1956+  s1958 :: SWord 1 = choose [45:45] s900+  s1959 :: SBool = s4 /= s1958+  s1960 :: SWord 1 = choose [45:45] s1734+  s1961 :: SBool = s4 /= s1960+  s1962 :: SBool = s1959 == s1961+  s1963 :: SWord 1 = choose [46:46] s900+  s1964 :: SBool = s4 /= s1963+  s1965 :: SWord 1 = choose [46:46] s1734+  s1966 :: SBool = s4 /= s1965+  s1967 :: SBool = s1964 == s1966+  s1968 :: SWord 1 = choose [47:47] s900+  s1969 :: SBool = s4 /= s1968+  s1970 :: SWord 1 = choose [47:47] s1734+  s1971 :: SBool = s4 /= s1970+  s1972 :: SBool = s1969 == s1971+  s1973 :: SWord 1 = choose [48:48] s900+  s1974 :: SBool = s4 /= s1973+  s1975 :: SWord 1 = choose [48:48] s1734+  s1976 :: SBool = s4 /= s1975+  s1977 :: SBool = s1974 == s1976+  s1978 :: SWord 1 = choose [49:49] s900+  s1979 :: SBool = s4 /= s1978+  s1980 :: SWord 1 = choose [49:49] s1734+  s1981 :: SBool = s4 /= s1980+  s1982 :: SBool = s1979 == s1981+  s1983 :: SWord 1 = choose [50:50] s900+  s1984 :: SBool = s4 /= s1983+  s1985 :: SWord 1 = choose [50:50] s1734+  s1986 :: SBool = s4 /= s1985+  s1987 :: SBool = s1984 == s1986+  s1988 :: SWord 1 = choose [51:51] s900+  s1989 :: SBool = s4 /= s1988+  s1990 :: SWord 1 = choose [51:51] s1734+  s1991 :: SBool = s4 /= s1990+  s1992 :: SBool = s1989 == s1991+  s1993 :: SWord 1 = choose [52:52] s900+  s1994 :: SBool = s4 /= s1993+  s1995 :: SWord 1 = choose [52:52] s1734+  s1996 :: SBool = s4 /= s1995+  s1997 :: SBool = s1994 == s1996+  s1998 :: SWord 1 = choose [53:53] s900+  s1999 :: SBool = s4 /= s1998+  s2000 :: SWord 1 = choose [53:53] s1734+  s2001 :: SBool = s4 /= s2000+  s2002 :: SBool = s1999 == s2001+  s2003 :: SWord 1 = choose [54:54] s900+  s2004 :: SBool = s4 /= s2003+  s2005 :: SWord 1 = choose [54:54] s1734+  s2006 :: SBool = s4 /= s2005+  s2007 :: SBool = s2004 == s2006+  s2008 :: SWord 1 = choose [55:55] s900+  s2009 :: SBool = s4 /= s2008+  s2010 :: SWord 1 = choose [55:55] s1734+  s2011 :: SBool = s4 /= s2010+  s2012 :: SBool = s2009 == s2011+  s2013 :: SWord 1 = choose [56:56] s900+  s2014 :: SBool = s4 /= s2013+  s2015 :: SWord 1 = choose [56:56] s1734+  s2016 :: SBool = s4 /= s2015+  s2017 :: SBool = s2014 == s2016+  s2018 :: SWord 1 = choose [57:57] s900+  s2019 :: SBool = s4 /= s2018+  s2020 :: SWord 1 = choose [57:57] s1734+  s2021 :: SBool = s4 /= s2020+  s2022 :: SBool = s2019 == s2021+  s2023 :: SWord 1 = choose [58:58] s900+  s2024 :: SBool = s4 /= s2023+  s2025 :: SWord 1 = choose [58:58] s1734+  s2026 :: SBool = s4 /= s2025+  s2027 :: SBool = s2024 == s2026+  s2028 :: SWord 1 = choose [59:59] s900+  s2029 :: SBool = s4 /= s2028+  s2030 :: SWord 1 = choose [59:59] s1734+  s2031 :: SBool = s4 /= s2030+  s2032 :: SBool = s2029 == s2031+  s2033 :: SWord 1 = choose [60:60] s900+  s2034 :: SBool = s4 /= s2033+  s2035 :: SWord 1 = choose [60:60] s1734+  s2036 :: SBool = s4 /= s2035+  s2037 :: SBool = s2034 == s2036+  s2038 :: SWord 1 = choose [61:61] s900+  s2039 :: SBool = s4 /= s2038+  s2040 :: SWord 1 = choose [61:61] s1734+  s2041 :: SBool = s4 /= s2040+  s2042 :: SBool = s2039 == s2041+  s2043 :: SWord 1 = choose [62:62] s900+  s2044 :: SBool = s4 /= s2043+  s2045 :: SWord 1 = choose [62:62] s1734+  s2046 :: SBool = s4 /= s2045+  s2047 :: SBool = s2044 == s2046+  s2048 :: SWord 1 = choose [63:63] s900+  s2049 :: SBool = s4 /= s2048+  s2050 :: SWord 1 = choose [63:63] s1734+  s2051 :: SBool = s4 /= s2050+  s2052 :: SBool = s2049 == s2051+  s2055 :: SWord8 = if s2052 then s2053 else s2054+  s2056 :: SWord8 = s2054 + s2055+  s2057 :: SWord8 = if s2047 then s2055 else s2056+  s2058 :: SWord8 = s2054 + s2057+  s2059 :: SWord8 = if s2042 then s2057 else s2058+  s2060 :: SWord8 = s2054 + s2059+  s2061 :: SWord8 = if s2037 then s2059 else s2060+  s2062 :: SWord8 = s2054 + s2061+  s2063 :: SWord8 = if s2032 then s2061 else s2062+  s2064 :: SWord8 = s2054 + s2063+  s2065 :: SWord8 = if s2027 then s2063 else s2064+  s2066 :: SWord8 = s2054 + s2065+  s2067 :: SWord8 = if s2022 then s2065 else s2066+  s2068 :: SWord8 = s2054 + s2067+  s2069 :: SWord8 = if s2017 then s2067 else s2068+  s2070 :: SWord8 = s2054 + s2069+  s2071 :: SWord8 = if s2012 then s2069 else s2070+  s2072 :: SWord8 = s2054 + s2071+  s2073 :: SWord8 = if s2007 then s2071 else s2072+  s2074 :: SWord8 = s2054 + s2073+  s2075 :: SWord8 = if s2002 then s2073 else s2074+  s2076 :: SWord8 = s2054 + s2075+  s2077 :: SWord8 = if s1997 then s2075 else s2076+  s2078 :: SWord8 = s2054 + s2077+  s2079 :: SWord8 = if s1992 then s2077 else s2078+  s2080 :: SWord8 = s2054 + s2079+  s2081 :: SWord8 = if s1987 then s2079 else s2080+  s2082 :: SWord8 = s2054 + s2081+  s2083 :: SWord8 = if s1982 then s2081 else s2082+  s2084 :: SWord8 = s2054 + s2083+  s2085 :: SWord8 = if s1977 then s2083 else s2084+  s2086 :: SWord8 = s2054 + s2085+  s2087 :: SWord8 = if s1972 then s2085 else s2086+  s2088 :: SWord8 = s2054 + s2087+  s2089 :: SWord8 = if s1967 then s2087 else s2088+  s2090 :: SWord8 = s2054 + s2089+  s2091 :: SWord8 = if s1962 then s2089 else s2090+  s2092 :: SWord8 = s2054 + s2091+  s2093 :: SWord8 = if s1957 then s2091 else s2092+  s2094 :: SWord8 = s2054 + s2093+  s2095 :: SWord8 = if s1952 then s2093 else s2094+  s2096 :: SWord8 = s2054 + s2095+  s2097 :: SWord8 = if s1947 then s2095 else s2096+  s2098 :: SWord8 = s2054 + s2097+  s2099 :: SWord8 = if s1942 then s2097 else s2098+  s2100 :: SWord8 = s2054 + s2099+  s2101 :: SWord8 = if s1937 then s2099 else s2100+  s2102 :: SWord8 = s2054 + s2101+  s2103 :: SWord8 = if s1932 then s2101 else s2102+  s2104 :: SWord8 = s2054 + s2103+  s2105 :: SWord8 = if s1927 then s2103 else s2104+  s2106 :: SWord8 = s2054 + s2105+  s2107 :: SWord8 = if s1922 then s2105 else s2106+  s2108 :: SWord8 = s2054 + s2107+  s2109 :: SWord8 = if s1917 then s2107 else s2108+  s2110 :: SWord8 = s2054 + s2109+  s2111 :: SWord8 = if s1912 then s2109 else s2110+  s2112 :: SWord8 = s2054 + s2111+  s2113 :: SWord8 = if s1907 then s2111 else s2112+  s2114 :: SWord8 = s2054 + s2113+  s2115 :: SWord8 = if s1902 then s2113 else s2114+  s2116 :: SWord8 = s2054 + s2115+  s2117 :: SWord8 = if s1897 then s2115 else s2116+  s2118 :: SWord8 = s2054 + s2117+  s2119 :: SWord8 = if s1892 then s2117 else s2118+  s2120 :: SWord8 = s2054 + s2119+  s2121 :: SWord8 = if s1887 then s2119 else s2120+  s2122 :: SWord8 = s2054 + s2121+  s2123 :: SWord8 = if s1882 then s2121 else s2122+  s2124 :: SWord8 = s2054 + s2123+  s2125 :: SWord8 = if s1877 then s2123 else s2124+  s2126 :: SWord8 = s2054 + s2125+  s2127 :: SWord8 = if s1872 then s2125 else s2126+  s2128 :: SWord8 = s2054 + s2127+  s2129 :: SWord8 = if s1867 then s2127 else s2128+  s2130 :: SWord8 = s2054 + s2129+  s2131 :: SWord8 = if s1862 then s2129 else s2130+  s2132 :: SWord8 = s2054 + s2131+  s2133 :: SWord8 = if s1857 then s2131 else s2132+  s2134 :: SWord8 = s2054 + s2133+  s2135 :: SWord8 = if s1852 then s2133 else s2134+  s2136 :: SWord8 = s2054 + s2135+  s2137 :: SWord8 = if s1847 then s2135 else s2136+  s2138 :: SWord8 = s2054 + s2137+  s2139 :: SWord8 = if s1842 then s2137 else s2138+  s2140 :: SWord8 = s2054 + s2139+  s2141 :: SWord8 = if s1837 then s2139 else s2140+  s2142 :: SWord8 = s2054 + s2141+  s2143 :: SWord8 = if s1832 then s2141 else s2142+  s2144 :: SWord8 = s2054 + s2143+  s2145 :: SWord8 = if s1827 then s2143 else s2144+  s2146 :: SWord8 = s2054 + s2145+  s2147 :: SWord8 = if s1822 then s2145 else s2146+  s2148 :: SWord8 = s2054 + s2147+  s2149 :: SWord8 = if s1817 then s2147 else s2148+  s2150 :: SWord8 = s2054 + s2149+  s2151 :: SWord8 = if s1812 then s2149 else s2150+  s2152 :: SWord8 = s2054 + s2151+  s2153 :: SWord8 = if s1807 then s2151 else s2152+  s2154 :: SWord8 = s2054 + s2153+  s2155 :: SWord8 = if s1802 then s2153 else s2154+  s2156 :: SWord8 = s2054 + s2155+  s2157 :: SWord8 = if s1797 then s2155 else s2156+  s2158 :: SWord8 = s2054 + s2157+  s2159 :: SWord8 = if s1792 then s2157 else s2158+  s2160 :: SWord8 = s2054 + s2159+  s2161 :: SWord8 = if s1787 then s2159 else s2160+  s2162 :: SWord8 = s2054 + s2161+  s2163 :: SWord8 = if s1782 then s2161 else s2162+  s2164 :: SWord8 = s2054 + s2163+  s2165 :: SWord8 = if s1777 then s2163 else s2164+  s2166 :: SWord8 = s2054 + s2165+  s2167 :: SWord8 = if s1772 then s2165 else s2166+  s2168 :: SWord8 = s2054 + s2167+  s2169 :: SWord8 = if s1767 then s2167 else s2168+  s2170 :: SWord8 = s2054 + s2169+  s2171 :: SWord8 = if s1762 then s2169 else s2170+  s2172 :: SWord8 = s2054 + s2171+  s2173 :: SWord8 = if s1757 then s2171 else s2172+  s2174 :: SWord8 = s2054 + s2173+  s2175 :: SWord8 = if s1752 then s2173 else s2174+  s2176 :: SWord8 = s2054 + s2175+  s2177 :: SWord8 = if s1747 then s2175 else s2176+  s2178 :: SWord8 = s2054 + s2177+  s2179 :: SWord8 = if s1742 then s2177 else s2178+  s2180 :: SWord8 = s2054 + s2179+  s2181 :: SWord8 = if s1737 then s2179 else s2180+  s2183 :: SBool = s2181 > s2182+  s2184 :: SBool = s2 => s2183+CONSTRAINTS+ASSERTIONS+OUTPUTS+  s2184
SBVTestSuite/GoldFiles/charConstr00.gold view
@@ -11,22 +11,20 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () String (_ char #x41))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "x" [GOOD] (assert (= 1 (str.len s0))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/charConstr01.gold view
@@ -12,9 +12,9 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s0 () Int 4) [GOOD] (define-fun s2 () String (_ char #x41))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun cf (Int) String)@@ -22,16 +22,14 @@                        (let ((result (cf a1)))                             (= 1 (str.len result))                        )))-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () String (cf s0)) [GOOD] (define-fun s3 () Bool (distinct s1 s2)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat@@ -41,6 +39,6 @@ [SEND] (get-value (cf)) [RECV] ((cf ((as const Array) "B"))) -MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [], modelUIFuns = [("cf",(SInteger -> SChar,([],'B' :: Char)))]}+MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [], modelUIFuns = [("cf",(SInteger -> SChar,Right ([],'B' :: Char)))]} DONE.*** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/charConstr02.gold view
@@ -19,9 +19,9 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s0 () Int 4) [GOOD] (define-fun s2 () (SBVTuple3 String String String) (mkSBVTuple3 (_ char #x41) (_ char #x42) (_ char #x43)))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun cf3 (Int) (SBVTuple3 String String String))@@ -32,16 +32,14 @@                                  (= 1 (str.len (proj_3_SBVTuple3 result)))                             )                        )))-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat@@ -51,6 +49,6 @@ [SEND] (get-value (cf3)) [RECV] ((cf3 ((as const Array) (mkSBVTuple3 "A" "A" "A")))) -MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [], modelUIFuns = [("cf3",(SInteger -> (SChar, SChar, SChar),([],('A','A','A') :: (Char, Char, Char))))]}+MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [], modelUIFuns = [("cf3",(SInteger -> (SChar, SChar, SChar),Right ([],('A','A','A') :: (Char, Char, Char))))]} DONE.*** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/charConstr03.gold view
@@ -17,24 +17,22 @@                                             (right_SBVEither (get_right_SBVEither T2)))))) [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () (SBVEither String String) ((as left_SBVEither (SBVEither String String)) (_ char #x41)))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVEither String String)) ; tracks user variable "x" [GOOD] (assert (and (=> ((_ is (left_SBVEither (String) (SBVEither String String))) s0) (= 1 (str.len (get_left_SBVEither s0))))                     (=> ((_ is (right_SBVEither (String) (SBVEither String String))) s0) (= 1 (str.len (get_right_SBVEither s0))))                )) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/charConstr04.gold view
@@ -17,22 +17,20 @@                                             (right_SBVEither (get_right_SBVEither T2)))))) [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () (SBVEither Int String) ((as right_SBVEither (SBVEither Int String)) (_ char #x41)))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVEither Int String)) ; tracks user variable "x" [GOOD] (assert (=> ((_ is (right_SBVEither (String) (SBVEither Int String))) s0) (= 1 (str.len (get_right_SBVEither s0))))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/charConstr05.gold view
@@ -17,22 +17,20 @@                                             (right_SBVEither (get_right_SBVEither T2)))))) [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () (SBVEither String Int) ((as left_SBVEither (SBVEither String Int)) (_ char #x41)))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVEither String Int)) ; tracks user variable "x" [GOOD] (assert (=> ((_ is (left_SBVEither (String) (SBVEither String Int))) s0) (= 1 (str.len (get_left_SBVEither s0))))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/charConstr06.gold view
@@ -17,24 +17,22 @@                                             (right_SBVEither (get_right_SBVEither T2)))))) [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () (SBVEither String (SBVEither String Int)) ((as left_SBVEither (SBVEither String (SBVEither String Int))) (_ char #x41)))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVEither String (SBVEither String Int))) ; tracks user variable "x" [GOOD] (assert (and (=> ((_ is (left_SBVEither (String) (SBVEither String (SBVEither String Int)))) s0) (= 1 (str.len (get_left_SBVEither s0))))                     (=> ((_ is (right_SBVEither ((SBVEither String Int)) (SBVEither String (SBVEither String Int)))) s0) (=> ((_ is (left_SBVEither (String) (SBVEither String Int))) (get_right_SBVEither s0)) (= 1 (str.len (get_left_SBVEither (get_right_SBVEither s0))))))                )) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/charConstr07.gold view
@@ -17,25 +17,23 @@                                             (just_SBVMaybe (get_just_SBVMaybe T)))))) [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () (SBVMaybe String) ((as just_SBVMaybe (SBVMaybe String)) (_ char #x41)))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVMaybe String)) ; tracks user variable "x" [GOOD] (assert (=> ((_ is (just_SBVMaybe (String) (SBVMaybe String))) s0) (= 1 (str.len (get_just_SBVMaybe s0))))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Bool ((_ is (nothing_SBVMaybe () (SBVMaybe String))) s0)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/charConstr08.gold view
@@ -15,31 +15,30 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () String (_ char #x41)) [GOOD] (define-fun s3 () String (_ char #x42))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array String Bool)) ; tracks user variable "x" [GOOD] (assert (forall ((set0 String)) (=> (select s0 set0) (= 1 (str.len set0))))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (select s0 s1)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s6) [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (store (store ((as const (Array String Bool)) true) "B" false) "A" true)))+[RECV] ((s0 (lambda ((x!1 String))+         (and (not (and (not (= x!1 "A")) (not (= x!1 "B")))) (not (= x!1 "B")))))) -MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [("x",U - {'B'} :: {Char})], modelUIFuns = []}+MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [("x",{'A'} :: {Char})], modelUIFuns = []} DONE.*** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/charConstr09.gold view
@@ -17,23 +17,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq (SBVTuple2 (SBVTuple2 String String) (Seq Int)))) ; tracks user variable "x" [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] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/charConstr10.gold view
@@ -19,15 +19,15 @@ [GOOD] (define-fun s2 () Int 1) [GOOD] (define-fun s4 () Int 0) [GOOD] (define-fun s8 () String (_ char #x42))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq (SBVTuple2 (SBVTuple2 String String) (Seq Int)))) ; tracks user variable "x" [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] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (seq.len s0)) [GOOD] (define-fun s3 () Bool (= s1 s2)) [GOOD] (define-fun s5 () (SBVTuple2 (SBVTuple2 String String) (Seq Int)) (seq.nth s0 s4))@@ -36,10 +36,8 @@ [GOOD] (define-fun s9 () Bool (= s7 s8)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s9) [SEND] (check-sat)
SBVTestSuite/GoldFiles/charConstr11.gold view
@@ -17,12 +17,12 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s4 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "x" [GOOD] (declare-fun s1 () String) ; tracks user variable "c" [GOOD] (assert (= 1 (str.len s1))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun cf4 (Int String) (Seq (SBVTuple2 (SBVTuple2 String String) (Seq Int))))@@ -30,17 +30,15 @@                        (let ((result (cf4 a1 a2)))                             (forall ((seq0 Int)) (=> (and (>= seq0 0) (< seq0 (seq.len result))) (and (= 1 (str.len (proj_1_SBVTuple2 (proj_1_SBVTuple2 (seq.nth result seq0))))) (= 1 (str.len (proj_2_SBVTuple2 (proj_1_SBVTuple2 (seq.nth result seq0))))))))                        )))-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [SEND] (check-sat) [RECV] sat@@ -54,6 +52,6 @@ [SEND] (get-value (cf4)) [RECV] ((cf4 ((as const Array) (seq.unit (mkSBVTuple2 (mkSBVTuple2 "A" "A") (seq.unit 2)))))) -MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [("x",3 :: Integer),("c",'A' :: Char)], modelUIFuns = [("cf4",(SInteger -> SChar -> [((SChar, SChar), [SInteger])],([],[(('A','A'),[2])] :: [((Char, Char), [Integer])])))]}+MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [("x",3 :: Integer),("c",'A' :: Char)], modelUIFuns = [("cf4",(SInteger -> SChar -> [((SChar, SChar), [SInteger])],Right ([],[(('A','A'),[2])] :: [((Char, Char), [Integer])])))]} DONE.*** Solver   : Z3 *** Exit code: ExitSuccess
+ SBVTestSuite/GoldFiles/check1.gold view
@@ -0,0 +1,43 @@+** 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] (declare-fun s0 () (_ BitVec 8))+[GOOD] (declare-fun s1 () (_ BitVec 16))+[GOOD] (declare-fun s2 () (_ BitVec 8))+[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))+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 #xff))+[SEND] (get-value (s1))+[RECV] ((s1 #x0000))+[SEND] (get-value (s2))+[RECV] ((s2 #x00))+[SEND] (get-value (s3))+[RECV] ((s3 #x0000))+*** Solver   : Z3+*** Exit code: ExitSuccess
+ SBVTestSuite/GoldFiles/check2.gold view
@@ -0,0 +1,33 @@+** 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] (declare-fun s0 () (_ BitVec 8))+[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)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 #x00))+[SEND] (get-value (s1))+[RECV] ((s1 #x0000))+*** Solver   : Z3+*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/coins.gold view
@@ -1,10 +1,10 @@ INPUTS-  s0 :: SWord16, existential, aliasing "c1"-  s18 :: SWord16, existential, aliasing "c2"-  s30 :: SWord16, existential, aliasing "c3"-  s42 :: SWord16, existential, aliasing "c4"-  s54 :: SWord16, existential, aliasing "c5"-  s66 :: SWord16, existential, aliasing "c6"+  s0 :: SWord16, aliasing "c1"+  s18 :: SWord16, aliasing "c2"+  s30 :: SWord16, aliasing "c3"+  s42 :: SWord16, aliasing "c4"+  s54 :: SWord16, aliasing "c5"+  s66 :: SWord16, aliasing "c6" CONSTANTS   s1 = 1 :: Word16   s3 = 5 :: Word16@@ -19,7 +19,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s2 :: SBool = s0 == s1   s4 :: SBool = s0 == s3
SBVTestSuite/GoldFiles/concreteFoldl.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/concreteFoldr.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/concreteReverse.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/concreteSort.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/constArr2_SArray.gold view
@@ -17,11 +17,11 @@ [GOOD] (define-fun s14 () Int 12) [GOOD] (define-fun s15 () Int 5) [GOOD] (define-fun s16 () Int 6)-[GOOD] ; --- skolem constants ---+[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] ; --- skolemized 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))@@ -33,8 +33,8 @@ [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 given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (< s0 s1)) [GOOD] (define-fun s4 () Bool (= s0 s3)) [GOOD] (define-fun s6 () Bool (= s0 s5))@@ -57,10 +57,8 @@ [GOOD] (assert array_3_initializer) [GOOD] (define-fun array_4_initializer () Bool array_4_initializer_0) [GOOD] (assert array_4_initializer)-[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (assert s13) [GOOD] (assert s19)
SBVTestSuite/GoldFiles/constArr_SArray.gold view
@@ -18,11 +18,11 @@ [GOOD] (define-fun s15 () Int 12) [GOOD] (define-fun s16 () Int 5) [GOOD] (define-fun s17 () Int 6)-[GOOD] ; --- skolem constants ---+[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] ; --- skolemized 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))@@ -34,8 +34,8 @@ [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 given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (< s0 s1)) [GOOD] (define-fun s4 () Bool (= s0 s3)) [GOOD] (define-fun s6 () Bool (= s0 s5))@@ -58,10 +58,8 @@ [GOOD] (assert array_3_initializer) [GOOD] (define-fun array_4_initializer () Bool array_4_initializer_0) [GOOD] (assert array_4_initializer)-[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (assert s13) [GOOD] (assert s20)
SBVTestSuite/GoldFiles/counts.gold view
@@ -26,7 +26,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s11 :: SBool = s9 < s10   s13 :: SBool = s9 == s12
SBVTestSuite/GoldFiles/crcPolyExist.gold view
@@ -1,14 +1,3478 @@ INPUTS-  s0 :: SWord16, existential, aliasing "poly"-  s1 :: SWord 48, aliasing "sent"-  s2 :: SWord 48, aliasing "received"-CONSTANTS-TABLES-ARRAYS-UNINTERPRETED CONSTANTS-USER GIVEN CODE SEGMENTS-AXIOMS-DEFINE-CONSTRAINTS-ASSERTIONS-OUTPUTS+  s0 :: SWord16, aliasing "poly"+CONSTANTS+TABLES+ARRAYS+UNINTERPRETED CONSTANTS+USER GIVEN CODE SEGMENTS+AXIOMS-DEFINITIONS+DEFINE+  s1 :: SBool = [quantified boolean] (forall ((l1_s0 (_ BitVec 48)) (l1_s1 (_ BitVec 48)))+  (let ((l1_s3 #b0))+  (let ((l1_s11 #x01))+  (let ((l1_s3333 #x00))+  (let ((l1_s3461 #x04))+  (let ((l1_s2 ((_ extract 0 0) s0)))+  (let ((l1_s4 (distinct l1_s2 l1_s3)))+  (let ((l1_s5 (distinct l1_s0 l1_s1)))+  (let ((l1_s6 ((_ extract 47 47) l1_s0)))+  (let ((l1_s7 (distinct l1_s3 l1_s6)))+  (let ((l1_s8 ((_ extract 47 47) l1_s1)))+  (let ((l1_s9 (distinct l1_s3 l1_s8)))+  (let ((l1_s10 (xor l1_s7 l1_s9)))+  (let ((l1_s12 ((_ extract 46 46) l1_s0)))+  (let ((l1_s13 (distinct l1_s3 l1_s12)))+  (let ((l1_s14 ((_ extract 46 46) l1_s1)))+  (let ((l1_s15 (distinct l1_s3 l1_s14)))+  (let ((l1_s16 (xor l1_s13 l1_s15)))+  (let ((l1_s17 ((_ extract 45 45) l1_s0)))+  (let ((l1_s18 (distinct l1_s3 l1_s17)))+  (let ((l1_s19 ((_ extract 45 45) l1_s1)))+  (let ((l1_s20 (distinct l1_s3 l1_s19)))+  (let ((l1_s21 (xor l1_s18 l1_s20)))+  (let ((l1_s22 ((_ extract 44 44) l1_s0)))+  (let ((l1_s23 (distinct l1_s3 l1_s22)))+  (let ((l1_s24 ((_ extract 44 44) l1_s1)))+  (let ((l1_s25 (distinct l1_s3 l1_s24)))+  (let ((l1_s26 (xor l1_s23 l1_s25)))+  (let ((l1_s27 ((_ extract 43 43) l1_s0)))+  (let ((l1_s28 (distinct l1_s3 l1_s27)))+  (let ((l1_s29 ((_ extract 43 43) l1_s1)))+  (let ((l1_s30 (distinct l1_s3 l1_s29)))+  (let ((l1_s31 (xor l1_s28 l1_s30)))+  (let ((l1_s32 ((_ extract 42 42) l1_s0)))+  (let ((l1_s33 (distinct l1_s3 l1_s32)))+  (let ((l1_s34 ((_ extract 42 42) l1_s1)))+  (let ((l1_s35 (distinct l1_s3 l1_s34)))+  (let ((l1_s36 (xor l1_s33 l1_s35)))+  (let ((l1_s37 ((_ extract 41 41) l1_s0)))+  (let ((l1_s38 (distinct l1_s3 l1_s37)))+  (let ((l1_s39 ((_ extract 41 41) l1_s1)))+  (let ((l1_s40 (distinct l1_s3 l1_s39)))+  (let ((l1_s41 (xor l1_s38 l1_s40)))+  (let ((l1_s42 ((_ extract 40 40) l1_s0)))+  (let ((l1_s43 (distinct l1_s3 l1_s42)))+  (let ((l1_s44 ((_ extract 40 40) l1_s1)))+  (let ((l1_s45 (distinct l1_s3 l1_s44)))+  (let ((l1_s46 (xor l1_s43 l1_s45)))+  (let ((l1_s47 ((_ extract 39 39) l1_s0)))+  (let ((l1_s48 (distinct l1_s3 l1_s47)))+  (let ((l1_s49 ((_ extract 39 39) l1_s1)))+  (let ((l1_s50 (distinct l1_s3 l1_s49)))+  (let ((l1_s51 (xor l1_s48 l1_s50)))+  (let ((l1_s52 ((_ extract 38 38) l1_s0)))+  (let ((l1_s53 (distinct l1_s3 l1_s52)))+  (let ((l1_s54 ((_ extract 38 38) l1_s1)))+  (let ((l1_s55 (distinct l1_s3 l1_s54)))+  (let ((l1_s56 (xor l1_s53 l1_s55)))+  (let ((l1_s57 ((_ extract 37 37) l1_s0)))+  (let ((l1_s58 (distinct l1_s3 l1_s57)))+  (let ((l1_s59 ((_ extract 37 37) l1_s1)))+  (let ((l1_s60 (distinct l1_s3 l1_s59)))+  (let ((l1_s61 (xor l1_s58 l1_s60)))+  (let ((l1_s62 ((_ extract 36 36) l1_s0)))+  (let ((l1_s63 (distinct l1_s3 l1_s62)))+  (let ((l1_s64 ((_ extract 36 36) l1_s1)))+  (let ((l1_s65 (distinct l1_s3 l1_s64)))+  (let ((l1_s66 (xor l1_s63 l1_s65)))+  (let ((l1_s67 ((_ extract 35 35) l1_s0)))+  (let ((l1_s68 (distinct l1_s3 l1_s67)))+  (let ((l1_s69 ((_ extract 35 35) l1_s1)))+  (let ((l1_s70 (distinct l1_s3 l1_s69)))+  (let ((l1_s71 (xor l1_s68 l1_s70)))+  (let ((l1_s72 ((_ extract 34 34) l1_s0)))+  (let ((l1_s73 (distinct l1_s3 l1_s72)))+  (let ((l1_s74 ((_ extract 34 34) l1_s1)))+  (let ((l1_s75 (distinct l1_s3 l1_s74)))+  (let ((l1_s76 (xor l1_s73 l1_s75)))+  (let ((l1_s77 ((_ extract 33 33) l1_s0)))+  (let ((l1_s78 (distinct l1_s3 l1_s77)))+  (let ((l1_s79 ((_ extract 33 33) l1_s1)))+  (let ((l1_s80 (distinct l1_s3 l1_s79)))+  (let ((l1_s81 (xor l1_s78 l1_s80)))+  (let ((l1_s82 ((_ extract 32 32) l1_s0)))+  (let ((l1_s83 (distinct l1_s3 l1_s82)))+  (let ((l1_s84 ((_ extract 32 32) l1_s1)))+  (let ((l1_s85 (distinct l1_s3 l1_s84)))+  (let ((l1_s86 (xor l1_s83 l1_s85)))+  (let ((l1_s87 ((_ extract 31 31) l1_s0)))+  (let ((l1_s88 (distinct l1_s3 l1_s87)))+  (let ((l1_s89 ((_ extract 31 31) l1_s1)))+  (let ((l1_s90 (distinct l1_s3 l1_s89)))+  (let ((l1_s91 (xor l1_s88 l1_s90)))+  (let ((l1_s92 ((_ extract 30 30) l1_s0)))+  (let ((l1_s93 (distinct l1_s3 l1_s92)))+  (let ((l1_s94 ((_ extract 30 30) l1_s1)))+  (let ((l1_s95 (distinct l1_s3 l1_s94)))+  (let ((l1_s96 (xor l1_s93 l1_s95)))+  (let ((l1_s97 ((_ extract 29 29) l1_s0)))+  (let ((l1_s98 (distinct l1_s3 l1_s97)))+  (let ((l1_s99 ((_ extract 29 29) l1_s1)))+  (let ((l1_s100 (distinct l1_s3 l1_s99)))+  (let ((l1_s101 (xor l1_s98 l1_s100)))+  (let ((l1_s102 ((_ extract 28 28) l1_s0)))+  (let ((l1_s103 (distinct l1_s3 l1_s102)))+  (let ((l1_s104 ((_ extract 28 28) l1_s1)))+  (let ((l1_s105 (distinct l1_s3 l1_s104)))+  (let ((l1_s106 (xor l1_s103 l1_s105)))+  (let ((l1_s107 ((_ extract 27 27) l1_s0)))+  (let ((l1_s108 (distinct l1_s3 l1_s107)))+  (let ((l1_s109 ((_ extract 27 27) l1_s1)))+  (let ((l1_s110 (distinct l1_s3 l1_s109)))+  (let ((l1_s111 (xor l1_s108 l1_s110)))+  (let ((l1_s112 ((_ extract 26 26) l1_s0)))+  (let ((l1_s113 (distinct l1_s3 l1_s112)))+  (let ((l1_s114 ((_ extract 26 26) l1_s1)))+  (let ((l1_s115 (distinct l1_s3 l1_s114)))+  (let ((l1_s116 (xor l1_s113 l1_s115)))+  (let ((l1_s117 ((_ extract 25 25) l1_s0)))+  (let ((l1_s118 (distinct l1_s3 l1_s117)))+  (let ((l1_s119 ((_ extract 25 25) l1_s1)))+  (let ((l1_s120 (distinct l1_s3 l1_s119)))+  (let ((l1_s121 (xor l1_s118 l1_s120)))+  (let ((l1_s122 ((_ extract 24 24) l1_s0)))+  (let ((l1_s123 (distinct l1_s3 l1_s122)))+  (let ((l1_s124 ((_ extract 24 24) l1_s1)))+  (let ((l1_s125 (distinct l1_s3 l1_s124)))+  (let ((l1_s126 (xor l1_s123 l1_s125)))+  (let ((l1_s127 ((_ extract 23 23) l1_s0)))+  (let ((l1_s128 (distinct l1_s3 l1_s127)))+  (let ((l1_s129 ((_ extract 23 23) l1_s1)))+  (let ((l1_s130 (distinct l1_s3 l1_s129)))+  (let ((l1_s131 (xor l1_s128 l1_s130)))+  (let ((l1_s132 ((_ extract 22 22) l1_s0)))+  (let ((l1_s133 (distinct l1_s3 l1_s132)))+  (let ((l1_s134 ((_ extract 22 22) l1_s1)))+  (let ((l1_s135 (distinct l1_s3 l1_s134)))+  (let ((l1_s136 (xor l1_s133 l1_s135)))+  (let ((l1_s137 ((_ extract 21 21) l1_s0)))+  (let ((l1_s138 (distinct l1_s3 l1_s137)))+  (let ((l1_s139 ((_ extract 21 21) l1_s1)))+  (let ((l1_s140 (distinct l1_s3 l1_s139)))+  (let ((l1_s141 (xor l1_s138 l1_s140)))+  (let ((l1_s142 ((_ extract 20 20) l1_s0)))+  (let ((l1_s143 (distinct l1_s3 l1_s142)))+  (let ((l1_s144 ((_ extract 20 20) l1_s1)))+  (let ((l1_s145 (distinct l1_s3 l1_s144)))+  (let ((l1_s146 (xor l1_s143 l1_s145)))+  (let ((l1_s147 ((_ extract 19 19) l1_s0)))+  (let ((l1_s148 (distinct l1_s3 l1_s147)))+  (let ((l1_s149 ((_ extract 19 19) l1_s1)))+  (let ((l1_s150 (distinct l1_s3 l1_s149)))+  (let ((l1_s151 (xor l1_s148 l1_s150)))+  (let ((l1_s152 ((_ extract 18 18) l1_s0)))+  (let ((l1_s153 (distinct l1_s3 l1_s152)))+  (let ((l1_s154 ((_ extract 18 18) l1_s1)))+  (let ((l1_s155 (distinct l1_s3 l1_s154)))+  (let ((l1_s156 (xor l1_s153 l1_s155)))+  (let ((l1_s157 ((_ extract 17 17) l1_s0)))+  (let ((l1_s158 (distinct l1_s3 l1_s157)))+  (let ((l1_s159 ((_ extract 17 17) l1_s1)))+  (let ((l1_s160 (distinct l1_s3 l1_s159)))+  (let ((l1_s161 (xor l1_s158 l1_s160)))+  (let ((l1_s162 ((_ extract 16 16) l1_s0)))+  (let ((l1_s163 (distinct l1_s3 l1_s162)))+  (let ((l1_s164 ((_ extract 16 16) l1_s1)))+  (let ((l1_s165 (distinct l1_s3 l1_s164)))+  (let ((l1_s166 (xor l1_s163 l1_s165)))+  (let ((l1_s167 ((_ extract 15 15) l1_s0)))+  (let ((l1_s168 (distinct l1_s3 l1_s167)))+  (let ((l1_s169 ((_ extract 15 15) l1_s1)))+  (let ((l1_s170 (distinct l1_s3 l1_s169)))+  (let ((l1_s171 (xor l1_s168 l1_s170)))+  (let ((l1_s172 ((_ extract 14 14) l1_s0)))+  (let ((l1_s173 (distinct l1_s3 l1_s172)))+  (let ((l1_s174 ((_ extract 14 14) l1_s1)))+  (let ((l1_s175 (distinct l1_s3 l1_s174)))+  (let ((l1_s176 (xor l1_s173 l1_s175)))+  (let ((l1_s177 ((_ extract 13 13) l1_s0)))+  (let ((l1_s178 (distinct l1_s3 l1_s177)))+  (let ((l1_s179 ((_ extract 13 13) l1_s1)))+  (let ((l1_s180 (distinct l1_s3 l1_s179)))+  (let ((l1_s181 (xor l1_s178 l1_s180)))+  (let ((l1_s182 ((_ extract 12 12) l1_s0)))+  (let ((l1_s183 (distinct l1_s3 l1_s182)))+  (let ((l1_s184 ((_ extract 12 12) l1_s1)))+  (let ((l1_s185 (distinct l1_s3 l1_s184)))+  (let ((l1_s186 (xor l1_s183 l1_s185)))+  (let ((l1_s187 ((_ extract 11 11) l1_s0)))+  (let ((l1_s188 (distinct l1_s3 l1_s187)))+  (let ((l1_s189 ((_ extract 11 11) l1_s1)))+  (let ((l1_s190 (distinct l1_s3 l1_s189)))+  (let ((l1_s191 (xor l1_s188 l1_s190)))+  (let ((l1_s192 ((_ extract 10 10) l1_s0)))+  (let ((l1_s193 (distinct l1_s3 l1_s192)))+  (let ((l1_s194 ((_ extract 10 10) l1_s1)))+  (let ((l1_s195 (distinct l1_s3 l1_s194)))+  (let ((l1_s196 (xor l1_s193 l1_s195)))+  (let ((l1_s197 ((_ extract 9 9) l1_s0)))+  (let ((l1_s198 (distinct l1_s3 l1_s197)))+  (let ((l1_s199 ((_ extract 9 9) l1_s1)))+  (let ((l1_s200 (distinct l1_s3 l1_s199)))+  (let ((l1_s201 (xor l1_s198 l1_s200)))+  (let ((l1_s202 ((_ extract 8 8) l1_s0)))+  (let ((l1_s203 (distinct l1_s3 l1_s202)))+  (let ((l1_s204 ((_ extract 8 8) l1_s1)))+  (let ((l1_s205 (distinct l1_s3 l1_s204)))+  (let ((l1_s206 (xor l1_s203 l1_s205)))+  (let ((l1_s207 ((_ extract 7 7) l1_s0)))+  (let ((l1_s208 (distinct l1_s3 l1_s207)))+  (let ((l1_s209 ((_ extract 7 7) l1_s1)))+  (let ((l1_s210 (distinct l1_s3 l1_s209)))+  (let ((l1_s211 (xor l1_s208 l1_s210)))+  (let ((l1_s212 ((_ extract 6 6) l1_s0)))+  (let ((l1_s213 (distinct l1_s3 l1_s212)))+  (let ((l1_s214 ((_ extract 6 6) l1_s1)))+  (let ((l1_s215 (distinct l1_s3 l1_s214)))+  (let ((l1_s216 (xor l1_s213 l1_s215)))+  (let ((l1_s217 ((_ extract 5 5) l1_s0)))+  (let ((l1_s218 (distinct l1_s3 l1_s217)))+  (let ((l1_s219 ((_ extract 5 5) l1_s1)))+  (let ((l1_s220 (distinct l1_s3 l1_s219)))+  (let ((l1_s221 (xor l1_s218 l1_s220)))+  (let ((l1_s222 ((_ extract 4 4) l1_s0)))+  (let ((l1_s223 (distinct l1_s3 l1_s222)))+  (let ((l1_s224 ((_ extract 4 4) l1_s1)))+  (let ((l1_s225 (distinct l1_s3 l1_s224)))+  (let ((l1_s226 (xor l1_s223 l1_s225)))+  (let ((l1_s227 ((_ extract 3 3) l1_s0)))+  (let ((l1_s228 (distinct l1_s3 l1_s227)))+  (let ((l1_s229 ((_ extract 3 3) l1_s1)))+  (let ((l1_s230 (distinct l1_s3 l1_s229)))+  (let ((l1_s231 (xor l1_s228 l1_s230)))+  (let ((l1_s232 ((_ extract 2 2) l1_s0)))+  (let ((l1_s233 (distinct l1_s3 l1_s232)))+  (let ((l1_s234 ((_ extract 2 2) l1_s1)))+  (let ((l1_s235 (distinct l1_s3 l1_s234)))+  (let ((l1_s236 (xor l1_s233 l1_s235)))+  (let ((l1_s237 ((_ extract 1 1) l1_s0)))+  (let ((l1_s238 (distinct l1_s3 l1_s237)))+  (let ((l1_s239 ((_ extract 1 1) l1_s1)))+  (let ((l1_s240 (distinct l1_s3 l1_s239)))+  (let ((l1_s241 (xor l1_s238 l1_s240)))+  (let ((l1_s242 ((_ extract 0 0) l1_s0)))+  (let ((l1_s243 (distinct l1_s3 l1_s242)))+  (let ((l1_s244 ((_ extract 0 0) l1_s1)))+  (let ((l1_s245 (distinct l1_s3 l1_s244)))+  (let ((l1_s246 (xor l1_s243 l1_s245)))+  (let ((l1_s247 ((_ extract 15 15) s0)))+  (let ((l1_s248 (distinct l1_s3 l1_s247)))+  (let ((l1_s249 (xor l1_s13 l1_s248)))+  (let ((l1_s250 (ite l1_s7 l1_s249 l1_s13)))+  (let ((l1_s251 ((_ extract 14 14) s0)))+  (let ((l1_s252 (distinct l1_s3 l1_s251)))+  (let ((l1_s253 (xor l1_s18 l1_s252)))+  (let ((l1_s254 (ite l1_s7 l1_s253 l1_s18)))+  (let ((l1_s255 (xor l1_s248 l1_s254)))+  (let ((l1_s256 (ite l1_s250 l1_s255 l1_s254)))+  (let ((l1_s257 ((_ extract 13 13) s0)))+  (let ((l1_s258 (distinct l1_s3 l1_s257)))+  (let ((l1_s259 (xor l1_s23 l1_s258)))+  (let ((l1_s260 (ite l1_s7 l1_s259 l1_s23)))+  (let ((l1_s261 (xor l1_s252 l1_s260)))+  (let ((l1_s262 (ite l1_s250 l1_s261 l1_s260)))+  (let ((l1_s263 (xor l1_s248 l1_s262)))+  (let ((l1_s264 (ite l1_s256 l1_s263 l1_s262)))+  (let ((l1_s265 ((_ extract 12 12) s0)))+  (let ((l1_s266 (distinct l1_s3 l1_s265)))+  (let ((l1_s267 (xor l1_s28 l1_s266)))+  (let ((l1_s268 (ite l1_s7 l1_s267 l1_s28)))+  (let ((l1_s269 (xor l1_s258 l1_s268)))+  (let ((l1_s270 (ite l1_s250 l1_s269 l1_s268)))+  (let ((l1_s271 (xor l1_s252 l1_s270)))+  (let ((l1_s272 (ite l1_s256 l1_s271 l1_s270)))+  (let ((l1_s273 (xor l1_s248 l1_s272)))+  (let ((l1_s274 (ite l1_s264 l1_s273 l1_s272)))+  (let ((l1_s275 ((_ extract 11 11) s0)))+  (let ((l1_s276 (distinct l1_s3 l1_s275)))+  (let ((l1_s277 (xor l1_s33 l1_s276)))+  (let ((l1_s278 (ite l1_s7 l1_s277 l1_s33)))+  (let ((l1_s279 (xor l1_s266 l1_s278)))+  (let ((l1_s280 (ite l1_s250 l1_s279 l1_s278)))+  (let ((l1_s281 (xor l1_s258 l1_s280)))+  (let ((l1_s282 (ite l1_s256 l1_s281 l1_s280)))+  (let ((l1_s283 (xor l1_s252 l1_s282)))+  (let ((l1_s284 (ite l1_s264 l1_s283 l1_s282)))+  (let ((l1_s285 (xor l1_s248 l1_s284)))+  (let ((l1_s286 (ite l1_s274 l1_s285 l1_s284)))+  (let ((l1_s287 ((_ extract 10 10) s0)))+  (let ((l1_s288 (distinct l1_s3 l1_s287)))+  (let ((l1_s289 (xor l1_s38 l1_s288)))+  (let ((l1_s290 (ite l1_s7 l1_s289 l1_s38)))+  (let ((l1_s291 (xor l1_s276 l1_s290)))+  (let ((l1_s292 (ite l1_s250 l1_s291 l1_s290)))+  (let ((l1_s293 (xor l1_s266 l1_s292)))+  (let ((l1_s294 (ite l1_s256 l1_s293 l1_s292)))+  (let ((l1_s295 (xor l1_s258 l1_s294)))+  (let ((l1_s296 (ite l1_s264 l1_s295 l1_s294)))+  (let ((l1_s297 (xor l1_s252 l1_s296)))+  (let ((l1_s298 (ite l1_s274 l1_s297 l1_s296)))+  (let ((l1_s299 (xor l1_s248 l1_s298)))+  (let ((l1_s300 (ite l1_s286 l1_s299 l1_s298)))+  (let ((l1_s301 ((_ extract 9 9) s0)))+  (let ((l1_s302 (distinct l1_s3 l1_s301)))+  (let ((l1_s303 (xor l1_s43 l1_s302)))+  (let ((l1_s304 (ite l1_s7 l1_s303 l1_s43)))+  (let ((l1_s305 (xor l1_s288 l1_s304)))+  (let ((l1_s306 (ite l1_s250 l1_s305 l1_s304)))+  (let ((l1_s307 (xor l1_s276 l1_s306)))+  (let ((l1_s308 (ite l1_s256 l1_s307 l1_s306)))+  (let ((l1_s309 (xor l1_s266 l1_s308)))+  (let ((l1_s310 (ite l1_s264 l1_s309 l1_s308)))+  (let ((l1_s311 (xor l1_s258 l1_s310)))+  (let ((l1_s312 (ite l1_s274 l1_s311 l1_s310)))+  (let ((l1_s313 (xor l1_s252 l1_s312)))+  (let ((l1_s314 (ite l1_s286 l1_s313 l1_s312)))+  (let ((l1_s315 (xor l1_s248 l1_s314)))+  (let ((l1_s316 (ite l1_s300 l1_s315 l1_s314)))+  (let ((l1_s317 ((_ extract 8 8) s0)))+  (let ((l1_s318 (distinct l1_s3 l1_s317)))+  (let ((l1_s319 (xor l1_s48 l1_s318)))+  (let ((l1_s320 (ite l1_s7 l1_s319 l1_s48)))+  (let ((l1_s321 (xor l1_s302 l1_s320)))+  (let ((l1_s322 (ite l1_s250 l1_s321 l1_s320)))+  (let ((l1_s323 (xor l1_s288 l1_s322)))+  (let ((l1_s324 (ite l1_s256 l1_s323 l1_s322)))+  (let ((l1_s325 (xor l1_s276 l1_s324)))+  (let ((l1_s326 (ite l1_s264 l1_s325 l1_s324)))+  (let ((l1_s327 (xor l1_s266 l1_s326)))+  (let ((l1_s328 (ite l1_s274 l1_s327 l1_s326)))+  (let ((l1_s329 (xor l1_s258 l1_s328)))+  (let ((l1_s330 (ite l1_s286 l1_s329 l1_s328)))+  (let ((l1_s331 (xor l1_s252 l1_s330)))+  (let ((l1_s332 (ite l1_s300 l1_s331 l1_s330)))+  (let ((l1_s333 (xor l1_s248 l1_s332)))+  (let ((l1_s334 (ite l1_s316 l1_s333 l1_s332)))+  (let ((l1_s335 ((_ extract 7 7) s0)))+  (let ((l1_s336 (distinct l1_s3 l1_s335)))+  (let ((l1_s337 (xor l1_s53 l1_s336)))+  (let ((l1_s338 (ite l1_s7 l1_s337 l1_s53)))+  (let ((l1_s339 (xor l1_s318 l1_s338)))+  (let ((l1_s340 (ite l1_s250 l1_s339 l1_s338)))+  (let ((l1_s341 (xor l1_s302 l1_s340)))+  (let ((l1_s342 (ite l1_s256 l1_s341 l1_s340)))+  (let ((l1_s343 (xor l1_s288 l1_s342)))+  (let ((l1_s344 (ite l1_s264 l1_s343 l1_s342)))+  (let ((l1_s345 (xor l1_s276 l1_s344)))+  (let ((l1_s346 (ite l1_s274 l1_s345 l1_s344)))+  (let ((l1_s347 (xor l1_s266 l1_s346)))+  (let ((l1_s348 (ite l1_s286 l1_s347 l1_s346)))+  (let ((l1_s349 (xor l1_s258 l1_s348)))+  (let ((l1_s350 (ite l1_s300 l1_s349 l1_s348)))+  (let ((l1_s351 (xor l1_s252 l1_s350)))+  (let ((l1_s352 (ite l1_s316 l1_s351 l1_s350)))+  (let ((l1_s353 (xor l1_s248 l1_s352)))+  (let ((l1_s354 (ite l1_s334 l1_s353 l1_s352)))+  (let ((l1_s355 ((_ extract 6 6) s0)))+  (let ((l1_s356 (distinct l1_s3 l1_s355)))+  (let ((l1_s357 (xor l1_s58 l1_s356)))+  (let ((l1_s358 (ite l1_s7 l1_s357 l1_s58)))+  (let ((l1_s359 (xor l1_s336 l1_s358)))+  (let ((l1_s360 (ite l1_s250 l1_s359 l1_s358)))+  (let ((l1_s361 (xor l1_s318 l1_s360)))+  (let ((l1_s362 (ite l1_s256 l1_s361 l1_s360)))+  (let ((l1_s363 (xor l1_s302 l1_s362)))+  (let ((l1_s364 (ite l1_s264 l1_s363 l1_s362)))+  (let ((l1_s365 (xor l1_s288 l1_s364)))+  (let ((l1_s366 (ite l1_s274 l1_s365 l1_s364)))+  (let ((l1_s367 (xor l1_s276 l1_s366)))+  (let ((l1_s368 (ite l1_s286 l1_s367 l1_s366)))+  (let ((l1_s369 (xor l1_s266 l1_s368)))+  (let ((l1_s370 (ite l1_s300 l1_s369 l1_s368)))+  (let ((l1_s371 (xor l1_s258 l1_s370)))+  (let ((l1_s372 (ite l1_s316 l1_s371 l1_s370)))+  (let ((l1_s373 (xor l1_s252 l1_s372)))+  (let ((l1_s374 (ite l1_s334 l1_s373 l1_s372)))+  (let ((l1_s375 (xor l1_s248 l1_s374)))+  (let ((l1_s376 (ite l1_s354 l1_s375 l1_s374)))+  (let ((l1_s377 ((_ extract 5 5) s0)))+  (let ((l1_s378 (distinct l1_s3 l1_s377)))+  (let ((l1_s379 (xor l1_s63 l1_s378)))+  (let ((l1_s380 (ite l1_s7 l1_s379 l1_s63)))+  (let ((l1_s381 (xor l1_s356 l1_s380)))+  (let ((l1_s382 (ite l1_s250 l1_s381 l1_s380)))+  (let ((l1_s383 (xor l1_s336 l1_s382)))+  (let ((l1_s384 (ite l1_s256 l1_s383 l1_s382)))+  (let ((l1_s385 (xor l1_s318 l1_s384)))+  (let ((l1_s386 (ite l1_s264 l1_s385 l1_s384)))+  (let ((l1_s387 (xor l1_s302 l1_s386)))+  (let ((l1_s388 (ite l1_s274 l1_s387 l1_s386)))+  (let ((l1_s389 (xor l1_s288 l1_s388)))+  (let ((l1_s390 (ite l1_s286 l1_s389 l1_s388)))+  (let ((l1_s391 (xor l1_s276 l1_s390)))+  (let ((l1_s392 (ite l1_s300 l1_s391 l1_s390)))+  (let ((l1_s393 (xor l1_s266 l1_s392)))+  (let ((l1_s394 (ite l1_s316 l1_s393 l1_s392)))+  (let ((l1_s395 (xor l1_s258 l1_s394)))+  (let ((l1_s396 (ite l1_s334 l1_s395 l1_s394)))+  (let ((l1_s397 (xor l1_s252 l1_s396)))+  (let ((l1_s398 (ite l1_s354 l1_s397 l1_s396)))+  (let ((l1_s399 (xor l1_s248 l1_s398)))+  (let ((l1_s400 (ite l1_s376 l1_s399 l1_s398)))+  (let ((l1_s401 ((_ extract 4 4) s0)))+  (let ((l1_s402 (distinct l1_s3 l1_s401)))+  (let ((l1_s403 (xor l1_s68 l1_s402)))+  (let ((l1_s404 (ite l1_s7 l1_s403 l1_s68)))+  (let ((l1_s405 (xor l1_s378 l1_s404)))+  (let ((l1_s406 (ite l1_s250 l1_s405 l1_s404)))+  (let ((l1_s407 (xor l1_s356 l1_s406)))+  (let ((l1_s408 (ite l1_s256 l1_s407 l1_s406)))+  (let ((l1_s409 (xor l1_s336 l1_s408)))+  (let ((l1_s410 (ite l1_s264 l1_s409 l1_s408)))+  (let ((l1_s411 (xor l1_s318 l1_s410)))+  (let ((l1_s412 (ite l1_s274 l1_s411 l1_s410)))+  (let ((l1_s413 (xor l1_s302 l1_s412)))+  (let ((l1_s414 (ite l1_s286 l1_s413 l1_s412)))+  (let ((l1_s415 (xor l1_s288 l1_s414)))+  (let ((l1_s416 (ite l1_s300 l1_s415 l1_s414)))+  (let ((l1_s417 (xor l1_s276 l1_s416)))+  (let ((l1_s418 (ite l1_s316 l1_s417 l1_s416)))+  (let ((l1_s419 (xor l1_s266 l1_s418)))+  (let ((l1_s420 (ite l1_s334 l1_s419 l1_s418)))+  (let ((l1_s421 (xor l1_s258 l1_s420)))+  (let ((l1_s422 (ite l1_s354 l1_s421 l1_s420)))+  (let ((l1_s423 (xor l1_s252 l1_s422)))+  (let ((l1_s424 (ite l1_s376 l1_s423 l1_s422)))+  (let ((l1_s425 (xor l1_s248 l1_s424)))+  (let ((l1_s426 (ite l1_s400 l1_s425 l1_s424)))+  (let ((l1_s427 ((_ extract 3 3) s0)))+  (let ((l1_s428 (distinct l1_s3 l1_s427)))+  (let ((l1_s429 (xor l1_s73 l1_s428)))+  (let ((l1_s430 (ite l1_s7 l1_s429 l1_s73)))+  (let ((l1_s431 (xor l1_s402 l1_s430)))+  (let ((l1_s432 (ite l1_s250 l1_s431 l1_s430)))+  (let ((l1_s433 (xor l1_s378 l1_s432)))+  (let ((l1_s434 (ite l1_s256 l1_s433 l1_s432)))+  (let ((l1_s435 (xor l1_s356 l1_s434)))+  (let ((l1_s436 (ite l1_s264 l1_s435 l1_s434)))+  (let ((l1_s437 (xor l1_s336 l1_s436)))+  (let ((l1_s438 (ite l1_s274 l1_s437 l1_s436)))+  (let ((l1_s439 (xor l1_s318 l1_s438)))+  (let ((l1_s440 (ite l1_s286 l1_s439 l1_s438)))+  (let ((l1_s441 (xor l1_s302 l1_s440)))+  (let ((l1_s442 (ite l1_s300 l1_s441 l1_s440)))+  (let ((l1_s443 (xor l1_s288 l1_s442)))+  (let ((l1_s444 (ite l1_s316 l1_s443 l1_s442)))+  (let ((l1_s445 (xor l1_s276 l1_s444)))+  (let ((l1_s446 (ite l1_s334 l1_s445 l1_s444)))+  (let ((l1_s447 (xor l1_s266 l1_s446)))+  (let ((l1_s448 (ite l1_s354 l1_s447 l1_s446)))+  (let ((l1_s449 (xor l1_s258 l1_s448)))+  (let ((l1_s450 (ite l1_s376 l1_s449 l1_s448)))+  (let ((l1_s451 (xor l1_s252 l1_s450)))+  (let ((l1_s452 (ite l1_s400 l1_s451 l1_s450)))+  (let ((l1_s453 (xor l1_s248 l1_s452)))+  (let ((l1_s454 (ite l1_s426 l1_s453 l1_s452)))+  (let ((l1_s455 ((_ extract 2 2) s0)))+  (let ((l1_s456 (distinct l1_s3 l1_s455)))+  (let ((l1_s457 (xor l1_s78 l1_s456)))+  (let ((l1_s458 (ite l1_s7 l1_s457 l1_s78)))+  (let ((l1_s459 (xor l1_s428 l1_s458)))+  (let ((l1_s460 (ite l1_s250 l1_s459 l1_s458)))+  (let ((l1_s461 (xor l1_s402 l1_s460)))+  (let ((l1_s462 (ite l1_s256 l1_s461 l1_s460)))+  (let ((l1_s463 (xor l1_s378 l1_s462)))+  (let ((l1_s464 (ite l1_s264 l1_s463 l1_s462)))+  (let ((l1_s465 (xor l1_s356 l1_s464)))+  (let ((l1_s466 (ite l1_s274 l1_s465 l1_s464)))+  (let ((l1_s467 (xor l1_s336 l1_s466)))+  (let ((l1_s468 (ite l1_s286 l1_s467 l1_s466)))+  (let ((l1_s469 (xor l1_s318 l1_s468)))+  (let ((l1_s470 (ite l1_s300 l1_s469 l1_s468)))+  (let ((l1_s471 (xor l1_s302 l1_s470)))+  (let ((l1_s472 (ite l1_s316 l1_s471 l1_s470)))+  (let ((l1_s473 (xor l1_s288 l1_s472)))+  (let ((l1_s474 (ite l1_s334 l1_s473 l1_s472)))+  (let ((l1_s475 (xor l1_s276 l1_s474)))+  (let ((l1_s476 (ite l1_s354 l1_s475 l1_s474)))+  (let ((l1_s477 (xor l1_s266 l1_s476)))+  (let ((l1_s478 (ite l1_s376 l1_s477 l1_s476)))+  (let ((l1_s479 (xor l1_s258 l1_s478)))+  (let ((l1_s480 (ite l1_s400 l1_s479 l1_s478)))+  (let ((l1_s481 (xor l1_s252 l1_s480)))+  (let ((l1_s482 (ite l1_s426 l1_s481 l1_s480)))+  (let ((l1_s483 (xor l1_s248 l1_s482)))+  (let ((l1_s484 (ite l1_s454 l1_s483 l1_s482)))+  (let ((l1_s485 ((_ extract 1 1) s0)))+  (let ((l1_s486 (distinct l1_s3 l1_s485)))+  (let ((l1_s487 (xor l1_s83 l1_s486)))+  (let ((l1_s488 (ite l1_s7 l1_s487 l1_s83)))+  (let ((l1_s489 (xor l1_s456 l1_s488)))+  (let ((l1_s490 (ite l1_s250 l1_s489 l1_s488)))+  (let ((l1_s491 (xor l1_s428 l1_s490)))+  (let ((l1_s492 (ite l1_s256 l1_s491 l1_s490)))+  (let ((l1_s493 (xor l1_s402 l1_s492)))+  (let ((l1_s494 (ite l1_s264 l1_s493 l1_s492)))+  (let ((l1_s495 (xor l1_s378 l1_s494)))+  (let ((l1_s496 (ite l1_s274 l1_s495 l1_s494)))+  (let ((l1_s497 (xor l1_s356 l1_s496)))+  (let ((l1_s498 (ite l1_s286 l1_s497 l1_s496)))+  (let ((l1_s499 (xor l1_s336 l1_s498)))+  (let ((l1_s500 (ite l1_s300 l1_s499 l1_s498)))+  (let ((l1_s501 (xor l1_s318 l1_s500)))+  (let ((l1_s502 (ite l1_s316 l1_s501 l1_s500)))+  (let ((l1_s503 (xor l1_s302 l1_s502)))+  (let ((l1_s504 (ite l1_s334 l1_s503 l1_s502)))+  (let ((l1_s505 (xor l1_s288 l1_s504)))+  (let ((l1_s506 (ite l1_s354 l1_s505 l1_s504)))+  (let ((l1_s507 (xor l1_s276 l1_s506)))+  (let ((l1_s508 (ite l1_s376 l1_s507 l1_s506)))+  (let ((l1_s509 (xor l1_s266 l1_s508)))+  (let ((l1_s510 (ite l1_s400 l1_s509 l1_s508)))+  (let ((l1_s511 (xor l1_s258 l1_s510)))+  (let ((l1_s512 (ite l1_s426 l1_s511 l1_s510)))+  (let ((l1_s513 (xor l1_s252 l1_s512)))+  (let ((l1_s514 (ite l1_s454 l1_s513 l1_s512)))+  (let ((l1_s515 (xor l1_s248 l1_s514)))+  (let ((l1_s516 (ite l1_s484 l1_s515 l1_s514)))+  (let ((l1_s517 (xor l1_s4 l1_s88)))+  (let ((l1_s518 (ite l1_s7 l1_s517 l1_s88)))+  (let ((l1_s519 (xor l1_s486 l1_s518)))+  (let ((l1_s520 (ite l1_s250 l1_s519 l1_s518)))+  (let ((l1_s521 (xor l1_s456 l1_s520)))+  (let ((l1_s522 (ite l1_s256 l1_s521 l1_s520)))+  (let ((l1_s523 (xor l1_s428 l1_s522)))+  (let ((l1_s524 (ite l1_s264 l1_s523 l1_s522)))+  (let ((l1_s525 (xor l1_s402 l1_s524)))+  (let ((l1_s526 (ite l1_s274 l1_s525 l1_s524)))+  (let ((l1_s527 (xor l1_s378 l1_s526)))+  (let ((l1_s528 (ite l1_s286 l1_s527 l1_s526)))+  (let ((l1_s529 (xor l1_s356 l1_s528)))+  (let ((l1_s530 (ite l1_s300 l1_s529 l1_s528)))+  (let ((l1_s531 (xor l1_s336 l1_s530)))+  (let ((l1_s532 (ite l1_s316 l1_s531 l1_s530)))+  (let ((l1_s533 (xor l1_s318 l1_s532)))+  (let ((l1_s534 (ite l1_s334 l1_s533 l1_s532)))+  (let ((l1_s535 (xor l1_s302 l1_s534)))+  (let ((l1_s536 (ite l1_s354 l1_s535 l1_s534)))+  (let ((l1_s537 (xor l1_s288 l1_s536)))+  (let ((l1_s538 (ite l1_s376 l1_s537 l1_s536)))+  (let ((l1_s539 (xor l1_s276 l1_s538)))+  (let ((l1_s540 (ite l1_s400 l1_s539 l1_s538)))+  (let ((l1_s541 (xor l1_s266 l1_s540)))+  (let ((l1_s542 (ite l1_s426 l1_s541 l1_s540)))+  (let ((l1_s543 (xor l1_s258 l1_s542)))+  (let ((l1_s544 (ite l1_s454 l1_s543 l1_s542)))+  (let ((l1_s545 (xor l1_s252 l1_s544)))+  (let ((l1_s546 (ite l1_s484 l1_s545 l1_s544)))+  (let ((l1_s547 (xor l1_s248 l1_s546)))+  (let ((l1_s548 (ite l1_s516 l1_s547 l1_s546)))+  (let ((l1_s549 (xor l1_s4 l1_s93)))+  (let ((l1_s550 (ite l1_s250 l1_s549 l1_s93)))+  (let ((l1_s551 (xor l1_s486 l1_s550)))+  (let ((l1_s552 (ite l1_s256 l1_s551 l1_s550)))+  (let ((l1_s553 (xor l1_s456 l1_s552)))+  (let ((l1_s554 (ite l1_s264 l1_s553 l1_s552)))+  (let ((l1_s555 (xor l1_s428 l1_s554)))+  (let ((l1_s556 (ite l1_s274 l1_s555 l1_s554)))+  (let ((l1_s557 (xor l1_s402 l1_s556)))+  (let ((l1_s558 (ite l1_s286 l1_s557 l1_s556)))+  (let ((l1_s559 (xor l1_s378 l1_s558)))+  (let ((l1_s560 (ite l1_s300 l1_s559 l1_s558)))+  (let ((l1_s561 (xor l1_s356 l1_s560)))+  (let ((l1_s562 (ite l1_s316 l1_s561 l1_s560)))+  (let ((l1_s563 (xor l1_s336 l1_s562)))+  (let ((l1_s564 (ite l1_s334 l1_s563 l1_s562)))+  (let ((l1_s565 (xor l1_s318 l1_s564)))+  (let ((l1_s566 (ite l1_s354 l1_s565 l1_s564)))+  (let ((l1_s567 (xor l1_s302 l1_s566)))+  (let ((l1_s568 (ite l1_s376 l1_s567 l1_s566)))+  (let ((l1_s569 (xor l1_s288 l1_s568)))+  (let ((l1_s570 (ite l1_s400 l1_s569 l1_s568)))+  (let ((l1_s571 (xor l1_s276 l1_s570)))+  (let ((l1_s572 (ite l1_s426 l1_s571 l1_s570)))+  (let ((l1_s573 (xor l1_s266 l1_s572)))+  (let ((l1_s574 (ite l1_s454 l1_s573 l1_s572)))+  (let ((l1_s575 (xor l1_s258 l1_s574)))+  (let ((l1_s576 (ite l1_s484 l1_s575 l1_s574)))+  (let ((l1_s577 (xor l1_s252 l1_s576)))+  (let ((l1_s578 (ite l1_s516 l1_s577 l1_s576)))+  (let ((l1_s579 (xor l1_s248 l1_s578)))+  (let ((l1_s580 (ite l1_s548 l1_s579 l1_s578)))+  (let ((l1_s581 (xor l1_s4 l1_s98)))+  (let ((l1_s582 (ite l1_s256 l1_s581 l1_s98)))+  (let ((l1_s583 (xor l1_s486 l1_s582)))+  (let ((l1_s584 (ite l1_s264 l1_s583 l1_s582)))+  (let ((l1_s585 (xor l1_s456 l1_s584)))+  (let ((l1_s586 (ite l1_s274 l1_s585 l1_s584)))+  (let ((l1_s587 (xor l1_s428 l1_s586)))+  (let ((l1_s588 (ite l1_s286 l1_s587 l1_s586)))+  (let ((l1_s589 (xor l1_s402 l1_s588)))+  (let ((l1_s590 (ite l1_s300 l1_s589 l1_s588)))+  (let ((l1_s591 (xor l1_s378 l1_s590)))+  (let ((l1_s592 (ite l1_s316 l1_s591 l1_s590)))+  (let ((l1_s593 (xor l1_s356 l1_s592)))+  (let ((l1_s594 (ite l1_s334 l1_s593 l1_s592)))+  (let ((l1_s595 (xor l1_s336 l1_s594)))+  (let ((l1_s596 (ite l1_s354 l1_s595 l1_s594)))+  (let ((l1_s597 (xor l1_s318 l1_s596)))+  (let ((l1_s598 (ite l1_s376 l1_s597 l1_s596)))+  (let ((l1_s599 (xor l1_s302 l1_s598)))+  (let ((l1_s600 (ite l1_s400 l1_s599 l1_s598)))+  (let ((l1_s601 (xor l1_s288 l1_s600)))+  (let ((l1_s602 (ite l1_s426 l1_s601 l1_s600)))+  (let ((l1_s603 (xor l1_s276 l1_s602)))+  (let ((l1_s604 (ite l1_s454 l1_s603 l1_s602)))+  (let ((l1_s605 (xor l1_s266 l1_s604)))+  (let ((l1_s606 (ite l1_s484 l1_s605 l1_s604)))+  (let ((l1_s607 (xor l1_s258 l1_s606)))+  (let ((l1_s608 (ite l1_s516 l1_s607 l1_s606)))+  (let ((l1_s609 (xor l1_s252 l1_s608)))+  (let ((l1_s610 (ite l1_s548 l1_s609 l1_s608)))+  (let ((l1_s611 (xor l1_s248 l1_s610)))+  (let ((l1_s612 (ite l1_s580 l1_s611 l1_s610)))+  (let ((l1_s613 (xor l1_s4 l1_s103)))+  (let ((l1_s614 (ite l1_s264 l1_s613 l1_s103)))+  (let ((l1_s615 (xor l1_s486 l1_s614)))+  (let ((l1_s616 (ite l1_s274 l1_s615 l1_s614)))+  (let ((l1_s617 (xor l1_s456 l1_s616)))+  (let ((l1_s618 (ite l1_s286 l1_s617 l1_s616)))+  (let ((l1_s619 (xor l1_s428 l1_s618)))+  (let ((l1_s620 (ite l1_s300 l1_s619 l1_s618)))+  (let ((l1_s621 (xor l1_s402 l1_s620)))+  (let ((l1_s622 (ite l1_s316 l1_s621 l1_s620)))+  (let ((l1_s623 (xor l1_s378 l1_s622)))+  (let ((l1_s624 (ite l1_s334 l1_s623 l1_s622)))+  (let ((l1_s625 (xor l1_s356 l1_s624)))+  (let ((l1_s626 (ite l1_s354 l1_s625 l1_s624)))+  (let ((l1_s627 (xor l1_s336 l1_s626)))+  (let ((l1_s628 (ite l1_s376 l1_s627 l1_s626)))+  (let ((l1_s629 (xor l1_s318 l1_s628)))+  (let ((l1_s630 (ite l1_s400 l1_s629 l1_s628)))+  (let ((l1_s631 (xor l1_s302 l1_s630)))+  (let ((l1_s632 (ite l1_s426 l1_s631 l1_s630)))+  (let ((l1_s633 (xor l1_s288 l1_s632)))+  (let ((l1_s634 (ite l1_s454 l1_s633 l1_s632)))+  (let ((l1_s635 (xor l1_s276 l1_s634)))+  (let ((l1_s636 (ite l1_s484 l1_s635 l1_s634)))+  (let ((l1_s637 (xor l1_s266 l1_s636)))+  (let ((l1_s638 (ite l1_s516 l1_s637 l1_s636)))+  (let ((l1_s639 (xor l1_s258 l1_s638)))+  (let ((l1_s640 (ite l1_s548 l1_s639 l1_s638)))+  (let ((l1_s641 (xor l1_s252 l1_s640)))+  (let ((l1_s642 (ite l1_s580 l1_s641 l1_s640)))+  (let ((l1_s643 (xor l1_s248 l1_s642)))+  (let ((l1_s644 (ite l1_s612 l1_s643 l1_s642)))+  (let ((l1_s645 (xor l1_s4 l1_s108)))+  (let ((l1_s646 (ite l1_s274 l1_s645 l1_s108)))+  (let ((l1_s647 (xor l1_s486 l1_s646)))+  (let ((l1_s648 (ite l1_s286 l1_s647 l1_s646)))+  (let ((l1_s649 (xor l1_s456 l1_s648)))+  (let ((l1_s650 (ite l1_s300 l1_s649 l1_s648)))+  (let ((l1_s651 (xor l1_s428 l1_s650)))+  (let ((l1_s652 (ite l1_s316 l1_s651 l1_s650)))+  (let ((l1_s653 (xor l1_s402 l1_s652)))+  (let ((l1_s654 (ite l1_s334 l1_s653 l1_s652)))+  (let ((l1_s655 (xor l1_s378 l1_s654)))+  (let ((l1_s656 (ite l1_s354 l1_s655 l1_s654)))+  (let ((l1_s657 (xor l1_s356 l1_s656)))+  (let ((l1_s658 (ite l1_s376 l1_s657 l1_s656)))+  (let ((l1_s659 (xor l1_s336 l1_s658)))+  (let ((l1_s660 (ite l1_s400 l1_s659 l1_s658)))+  (let ((l1_s661 (xor l1_s318 l1_s660)))+  (let ((l1_s662 (ite l1_s426 l1_s661 l1_s660)))+  (let ((l1_s663 (xor l1_s302 l1_s662)))+  (let ((l1_s664 (ite l1_s454 l1_s663 l1_s662)))+  (let ((l1_s665 (xor l1_s288 l1_s664)))+  (let ((l1_s666 (ite l1_s484 l1_s665 l1_s664)))+  (let ((l1_s667 (xor l1_s276 l1_s666)))+  (let ((l1_s668 (ite l1_s516 l1_s667 l1_s666)))+  (let ((l1_s669 (xor l1_s266 l1_s668)))+  (let ((l1_s670 (ite l1_s548 l1_s669 l1_s668)))+  (let ((l1_s671 (xor l1_s258 l1_s670)))+  (let ((l1_s672 (ite l1_s580 l1_s671 l1_s670)))+  (let ((l1_s673 (xor l1_s252 l1_s672)))+  (let ((l1_s674 (ite l1_s612 l1_s673 l1_s672)))+  (let ((l1_s675 (xor l1_s248 l1_s674)))+  (let ((l1_s676 (ite l1_s644 l1_s675 l1_s674)))+  (let ((l1_s677 (xor l1_s4 l1_s113)))+  (let ((l1_s678 (ite l1_s286 l1_s677 l1_s113)))+  (let ((l1_s679 (xor l1_s486 l1_s678)))+  (let ((l1_s680 (ite l1_s300 l1_s679 l1_s678)))+  (let ((l1_s681 (xor l1_s456 l1_s680)))+  (let ((l1_s682 (ite l1_s316 l1_s681 l1_s680)))+  (let ((l1_s683 (xor l1_s428 l1_s682)))+  (let ((l1_s684 (ite l1_s334 l1_s683 l1_s682)))+  (let ((l1_s685 (xor l1_s402 l1_s684)))+  (let ((l1_s686 (ite l1_s354 l1_s685 l1_s684)))+  (let ((l1_s687 (xor l1_s378 l1_s686)))+  (let ((l1_s688 (ite l1_s376 l1_s687 l1_s686)))+  (let ((l1_s689 (xor l1_s356 l1_s688)))+  (let ((l1_s690 (ite l1_s400 l1_s689 l1_s688)))+  (let ((l1_s691 (xor l1_s336 l1_s690)))+  (let ((l1_s692 (ite l1_s426 l1_s691 l1_s690)))+  (let ((l1_s693 (xor l1_s318 l1_s692)))+  (let ((l1_s694 (ite l1_s454 l1_s693 l1_s692)))+  (let ((l1_s695 (xor l1_s302 l1_s694)))+  (let ((l1_s696 (ite l1_s484 l1_s695 l1_s694)))+  (let ((l1_s697 (xor l1_s288 l1_s696)))+  (let ((l1_s698 (ite l1_s516 l1_s697 l1_s696)))+  (let ((l1_s699 (xor l1_s276 l1_s698)))+  (let ((l1_s700 (ite l1_s548 l1_s699 l1_s698)))+  (let ((l1_s701 (xor l1_s266 l1_s700)))+  (let ((l1_s702 (ite l1_s580 l1_s701 l1_s700)))+  (let ((l1_s703 (xor l1_s258 l1_s702)))+  (let ((l1_s704 (ite l1_s612 l1_s703 l1_s702)))+  (let ((l1_s705 (xor l1_s252 l1_s704)))+  (let ((l1_s706 (ite l1_s644 l1_s705 l1_s704)))+  (let ((l1_s707 (xor l1_s248 l1_s706)))+  (let ((l1_s708 (ite l1_s676 l1_s707 l1_s706)))+  (let ((l1_s709 (xor l1_s4 l1_s118)))+  (let ((l1_s710 (ite l1_s300 l1_s709 l1_s118)))+  (let ((l1_s711 (xor l1_s486 l1_s710)))+  (let ((l1_s712 (ite l1_s316 l1_s711 l1_s710)))+  (let ((l1_s713 (xor l1_s456 l1_s712)))+  (let ((l1_s714 (ite l1_s334 l1_s713 l1_s712)))+  (let ((l1_s715 (xor l1_s428 l1_s714)))+  (let ((l1_s716 (ite l1_s354 l1_s715 l1_s714)))+  (let ((l1_s717 (xor l1_s402 l1_s716)))+  (let ((l1_s718 (ite l1_s376 l1_s717 l1_s716)))+  (let ((l1_s719 (xor l1_s378 l1_s718)))+  (let ((l1_s720 (ite l1_s400 l1_s719 l1_s718)))+  (let ((l1_s721 (xor l1_s356 l1_s720)))+  (let ((l1_s722 (ite l1_s426 l1_s721 l1_s720)))+  (let ((l1_s723 (xor l1_s336 l1_s722)))+  (let ((l1_s724 (ite l1_s454 l1_s723 l1_s722)))+  (let ((l1_s725 (xor l1_s318 l1_s724)))+  (let ((l1_s726 (ite l1_s484 l1_s725 l1_s724)))+  (let ((l1_s727 (xor l1_s302 l1_s726)))+  (let ((l1_s728 (ite l1_s516 l1_s727 l1_s726)))+  (let ((l1_s729 (xor l1_s288 l1_s728)))+  (let ((l1_s730 (ite l1_s548 l1_s729 l1_s728)))+  (let ((l1_s731 (xor l1_s276 l1_s730)))+  (let ((l1_s732 (ite l1_s580 l1_s731 l1_s730)))+  (let ((l1_s733 (xor l1_s266 l1_s732)))+  (let ((l1_s734 (ite l1_s612 l1_s733 l1_s732)))+  (let ((l1_s735 (xor l1_s258 l1_s734)))+  (let ((l1_s736 (ite l1_s644 l1_s735 l1_s734)))+  (let ((l1_s737 (xor l1_s252 l1_s736)))+  (let ((l1_s738 (ite l1_s676 l1_s737 l1_s736)))+  (let ((l1_s739 (xor l1_s248 l1_s738)))+  (let ((l1_s740 (ite l1_s708 l1_s739 l1_s738)))+  (let ((l1_s741 (xor l1_s4 l1_s123)))+  (let ((l1_s742 (ite l1_s316 l1_s741 l1_s123)))+  (let ((l1_s743 (xor l1_s486 l1_s742)))+  (let ((l1_s744 (ite l1_s334 l1_s743 l1_s742)))+  (let ((l1_s745 (xor l1_s456 l1_s744)))+  (let ((l1_s746 (ite l1_s354 l1_s745 l1_s744)))+  (let ((l1_s747 (xor l1_s428 l1_s746)))+  (let ((l1_s748 (ite l1_s376 l1_s747 l1_s746)))+  (let ((l1_s749 (xor l1_s402 l1_s748)))+  (let ((l1_s750 (ite l1_s400 l1_s749 l1_s748)))+  (let ((l1_s751 (xor l1_s378 l1_s750)))+  (let ((l1_s752 (ite l1_s426 l1_s751 l1_s750)))+  (let ((l1_s753 (xor l1_s356 l1_s752)))+  (let ((l1_s754 (ite l1_s454 l1_s753 l1_s752)))+  (let ((l1_s755 (xor l1_s336 l1_s754)))+  (let ((l1_s756 (ite l1_s484 l1_s755 l1_s754)))+  (let ((l1_s757 (xor l1_s318 l1_s756)))+  (let ((l1_s758 (ite l1_s516 l1_s757 l1_s756)))+  (let ((l1_s759 (xor l1_s302 l1_s758)))+  (let ((l1_s760 (ite l1_s548 l1_s759 l1_s758)))+  (let ((l1_s761 (xor l1_s288 l1_s760)))+  (let ((l1_s762 (ite l1_s580 l1_s761 l1_s760)))+  (let ((l1_s763 (xor l1_s276 l1_s762)))+  (let ((l1_s764 (ite l1_s612 l1_s763 l1_s762)))+  (let ((l1_s765 (xor l1_s266 l1_s764)))+  (let ((l1_s766 (ite l1_s644 l1_s765 l1_s764)))+  (let ((l1_s767 (xor l1_s258 l1_s766)))+  (let ((l1_s768 (ite l1_s676 l1_s767 l1_s766)))+  (let ((l1_s769 (xor l1_s252 l1_s768)))+  (let ((l1_s770 (ite l1_s708 l1_s769 l1_s768)))+  (let ((l1_s771 (xor l1_s248 l1_s770)))+  (let ((l1_s772 (ite l1_s740 l1_s771 l1_s770)))+  (let ((l1_s773 (xor l1_s4 l1_s128)))+  (let ((l1_s774 (ite l1_s334 l1_s773 l1_s128)))+  (let ((l1_s775 (xor l1_s486 l1_s774)))+  (let ((l1_s776 (ite l1_s354 l1_s775 l1_s774)))+  (let ((l1_s777 (xor l1_s456 l1_s776)))+  (let ((l1_s778 (ite l1_s376 l1_s777 l1_s776)))+  (let ((l1_s779 (xor l1_s428 l1_s778)))+  (let ((l1_s780 (ite l1_s400 l1_s779 l1_s778)))+  (let ((l1_s781 (xor l1_s402 l1_s780)))+  (let ((l1_s782 (ite l1_s426 l1_s781 l1_s780)))+  (let ((l1_s783 (xor l1_s378 l1_s782)))+  (let ((l1_s784 (ite l1_s454 l1_s783 l1_s782)))+  (let ((l1_s785 (xor l1_s356 l1_s784)))+  (let ((l1_s786 (ite l1_s484 l1_s785 l1_s784)))+  (let ((l1_s787 (xor l1_s336 l1_s786)))+  (let ((l1_s788 (ite l1_s516 l1_s787 l1_s786)))+  (let ((l1_s789 (xor l1_s318 l1_s788)))+  (let ((l1_s790 (ite l1_s548 l1_s789 l1_s788)))+  (let ((l1_s791 (xor l1_s302 l1_s790)))+  (let ((l1_s792 (ite l1_s580 l1_s791 l1_s790)))+  (let ((l1_s793 (xor l1_s288 l1_s792)))+  (let ((l1_s794 (ite l1_s612 l1_s793 l1_s792)))+  (let ((l1_s795 (xor l1_s276 l1_s794)))+  (let ((l1_s796 (ite l1_s644 l1_s795 l1_s794)))+  (let ((l1_s797 (xor l1_s266 l1_s796)))+  (let ((l1_s798 (ite l1_s676 l1_s797 l1_s796)))+  (let ((l1_s799 (xor l1_s258 l1_s798)))+  (let ((l1_s800 (ite l1_s708 l1_s799 l1_s798)))+  (let ((l1_s801 (xor l1_s252 l1_s800)))+  (let ((l1_s802 (ite l1_s740 l1_s801 l1_s800)))+  (let ((l1_s803 (xor l1_s248 l1_s802)))+  (let ((l1_s804 (ite l1_s772 l1_s803 l1_s802)))+  (let ((l1_s805 (xor l1_s4 l1_s133)))+  (let ((l1_s806 (ite l1_s354 l1_s805 l1_s133)))+  (let ((l1_s807 (xor l1_s486 l1_s806)))+  (let ((l1_s808 (ite l1_s376 l1_s807 l1_s806)))+  (let ((l1_s809 (xor l1_s456 l1_s808)))+  (let ((l1_s810 (ite l1_s400 l1_s809 l1_s808)))+  (let ((l1_s811 (xor l1_s428 l1_s810)))+  (let ((l1_s812 (ite l1_s426 l1_s811 l1_s810)))+  (let ((l1_s813 (xor l1_s402 l1_s812)))+  (let ((l1_s814 (ite l1_s454 l1_s813 l1_s812)))+  (let ((l1_s815 (xor l1_s378 l1_s814)))+  (let ((l1_s816 (ite l1_s484 l1_s815 l1_s814)))+  (let ((l1_s817 (xor l1_s356 l1_s816)))+  (let ((l1_s818 (ite l1_s516 l1_s817 l1_s816)))+  (let ((l1_s819 (xor l1_s336 l1_s818)))+  (let ((l1_s820 (ite l1_s548 l1_s819 l1_s818)))+  (let ((l1_s821 (xor l1_s318 l1_s820)))+  (let ((l1_s822 (ite l1_s580 l1_s821 l1_s820)))+  (let ((l1_s823 (xor l1_s302 l1_s822)))+  (let ((l1_s824 (ite l1_s612 l1_s823 l1_s822)))+  (let ((l1_s825 (xor l1_s288 l1_s824)))+  (let ((l1_s826 (ite l1_s644 l1_s825 l1_s824)))+  (let ((l1_s827 (xor l1_s276 l1_s826)))+  (let ((l1_s828 (ite l1_s676 l1_s827 l1_s826)))+  (let ((l1_s829 (xor l1_s266 l1_s828)))+  (let ((l1_s830 (ite l1_s708 l1_s829 l1_s828)))+  (let ((l1_s831 (xor l1_s258 l1_s830)))+  (let ((l1_s832 (ite l1_s740 l1_s831 l1_s830)))+  (let ((l1_s833 (xor l1_s252 l1_s832)))+  (let ((l1_s834 (ite l1_s772 l1_s833 l1_s832)))+  (let ((l1_s835 (xor l1_s248 l1_s834)))+  (let ((l1_s836 (ite l1_s804 l1_s835 l1_s834)))+  (let ((l1_s837 (xor l1_s4 l1_s138)))+  (let ((l1_s838 (ite l1_s376 l1_s837 l1_s138)))+  (let ((l1_s839 (xor l1_s486 l1_s838)))+  (let ((l1_s840 (ite l1_s400 l1_s839 l1_s838)))+  (let ((l1_s841 (xor l1_s456 l1_s840)))+  (let ((l1_s842 (ite l1_s426 l1_s841 l1_s840)))+  (let ((l1_s843 (xor l1_s428 l1_s842)))+  (let ((l1_s844 (ite l1_s454 l1_s843 l1_s842)))+  (let ((l1_s845 (xor l1_s402 l1_s844)))+  (let ((l1_s846 (ite l1_s484 l1_s845 l1_s844)))+  (let ((l1_s847 (xor l1_s378 l1_s846)))+  (let ((l1_s848 (ite l1_s516 l1_s847 l1_s846)))+  (let ((l1_s849 (xor l1_s356 l1_s848)))+  (let ((l1_s850 (ite l1_s548 l1_s849 l1_s848)))+  (let ((l1_s851 (xor l1_s336 l1_s850)))+  (let ((l1_s852 (ite l1_s580 l1_s851 l1_s850)))+  (let ((l1_s853 (xor l1_s318 l1_s852)))+  (let ((l1_s854 (ite l1_s612 l1_s853 l1_s852)))+  (let ((l1_s855 (xor l1_s302 l1_s854)))+  (let ((l1_s856 (ite l1_s644 l1_s855 l1_s854)))+  (let ((l1_s857 (xor l1_s288 l1_s856)))+  (let ((l1_s858 (ite l1_s676 l1_s857 l1_s856)))+  (let ((l1_s859 (xor l1_s276 l1_s858)))+  (let ((l1_s860 (ite l1_s708 l1_s859 l1_s858)))+  (let ((l1_s861 (xor l1_s266 l1_s860)))+  (let ((l1_s862 (ite l1_s740 l1_s861 l1_s860)))+  (let ((l1_s863 (xor l1_s258 l1_s862)))+  (let ((l1_s864 (ite l1_s772 l1_s863 l1_s862)))+  (let ((l1_s865 (xor l1_s252 l1_s864)))+  (let ((l1_s866 (ite l1_s804 l1_s865 l1_s864)))+  (let ((l1_s867 (xor l1_s248 l1_s866)))+  (let ((l1_s868 (ite l1_s836 l1_s867 l1_s866)))+  (let ((l1_s869 (xor l1_s4 l1_s143)))+  (let ((l1_s870 (ite l1_s400 l1_s869 l1_s143)))+  (let ((l1_s871 (xor l1_s486 l1_s870)))+  (let ((l1_s872 (ite l1_s426 l1_s871 l1_s870)))+  (let ((l1_s873 (xor l1_s456 l1_s872)))+  (let ((l1_s874 (ite l1_s454 l1_s873 l1_s872)))+  (let ((l1_s875 (xor l1_s428 l1_s874)))+  (let ((l1_s876 (ite l1_s484 l1_s875 l1_s874)))+  (let ((l1_s877 (xor l1_s402 l1_s876)))+  (let ((l1_s878 (ite l1_s516 l1_s877 l1_s876)))+  (let ((l1_s879 (xor l1_s378 l1_s878)))+  (let ((l1_s880 (ite l1_s548 l1_s879 l1_s878)))+  (let ((l1_s881 (xor l1_s356 l1_s880)))+  (let ((l1_s882 (ite l1_s580 l1_s881 l1_s880)))+  (let ((l1_s883 (xor l1_s336 l1_s882)))+  (let ((l1_s884 (ite l1_s612 l1_s883 l1_s882)))+  (let ((l1_s885 (xor l1_s318 l1_s884)))+  (let ((l1_s886 (ite l1_s644 l1_s885 l1_s884)))+  (let ((l1_s887 (xor l1_s302 l1_s886)))+  (let ((l1_s888 (ite l1_s676 l1_s887 l1_s886)))+  (let ((l1_s889 (xor l1_s288 l1_s888)))+  (let ((l1_s890 (ite l1_s708 l1_s889 l1_s888)))+  (let ((l1_s891 (xor l1_s276 l1_s890)))+  (let ((l1_s892 (ite l1_s740 l1_s891 l1_s890)))+  (let ((l1_s893 (xor l1_s266 l1_s892)))+  (let ((l1_s894 (ite l1_s772 l1_s893 l1_s892)))+  (let ((l1_s895 (xor l1_s258 l1_s894)))+  (let ((l1_s896 (ite l1_s804 l1_s895 l1_s894)))+  (let ((l1_s897 (xor l1_s252 l1_s896)))+  (let ((l1_s898 (ite l1_s836 l1_s897 l1_s896)))+  (let ((l1_s899 (xor l1_s248 l1_s898)))+  (let ((l1_s900 (ite l1_s868 l1_s899 l1_s898)))+  (let ((l1_s901 (xor l1_s4 l1_s148)))+  (let ((l1_s902 (ite l1_s426 l1_s901 l1_s148)))+  (let ((l1_s903 (xor l1_s486 l1_s902)))+  (let ((l1_s904 (ite l1_s454 l1_s903 l1_s902)))+  (let ((l1_s905 (xor l1_s456 l1_s904)))+  (let ((l1_s906 (ite l1_s484 l1_s905 l1_s904)))+  (let ((l1_s907 (xor l1_s428 l1_s906)))+  (let ((l1_s908 (ite l1_s516 l1_s907 l1_s906)))+  (let ((l1_s909 (xor l1_s402 l1_s908)))+  (let ((l1_s910 (ite l1_s548 l1_s909 l1_s908)))+  (let ((l1_s911 (xor l1_s378 l1_s910)))+  (let ((l1_s912 (ite l1_s580 l1_s911 l1_s910)))+  (let ((l1_s913 (xor l1_s356 l1_s912)))+  (let ((l1_s914 (ite l1_s612 l1_s913 l1_s912)))+  (let ((l1_s915 (xor l1_s336 l1_s914)))+  (let ((l1_s916 (ite l1_s644 l1_s915 l1_s914)))+  (let ((l1_s917 (xor l1_s318 l1_s916)))+  (let ((l1_s918 (ite l1_s676 l1_s917 l1_s916)))+  (let ((l1_s919 (xor l1_s302 l1_s918)))+  (let ((l1_s920 (ite l1_s708 l1_s919 l1_s918)))+  (let ((l1_s921 (xor l1_s288 l1_s920)))+  (let ((l1_s922 (ite l1_s740 l1_s921 l1_s920)))+  (let ((l1_s923 (xor l1_s276 l1_s922)))+  (let ((l1_s924 (ite l1_s772 l1_s923 l1_s922)))+  (let ((l1_s925 (xor l1_s266 l1_s924)))+  (let ((l1_s926 (ite l1_s804 l1_s925 l1_s924)))+  (let ((l1_s927 (xor l1_s258 l1_s926)))+  (let ((l1_s928 (ite l1_s836 l1_s927 l1_s926)))+  (let ((l1_s929 (xor l1_s252 l1_s928)))+  (let ((l1_s930 (ite l1_s868 l1_s929 l1_s928)))+  (let ((l1_s931 (xor l1_s248 l1_s930)))+  (let ((l1_s932 (ite l1_s900 l1_s931 l1_s930)))+  (let ((l1_s933 (xor l1_s4 l1_s153)))+  (let ((l1_s934 (ite l1_s454 l1_s933 l1_s153)))+  (let ((l1_s935 (xor l1_s486 l1_s934)))+  (let ((l1_s936 (ite l1_s484 l1_s935 l1_s934)))+  (let ((l1_s937 (xor l1_s456 l1_s936)))+  (let ((l1_s938 (ite l1_s516 l1_s937 l1_s936)))+  (let ((l1_s939 (xor l1_s428 l1_s938)))+  (let ((l1_s940 (ite l1_s548 l1_s939 l1_s938)))+  (let ((l1_s941 (xor l1_s402 l1_s940)))+  (let ((l1_s942 (ite l1_s580 l1_s941 l1_s940)))+  (let ((l1_s943 (xor l1_s378 l1_s942)))+  (let ((l1_s944 (ite l1_s612 l1_s943 l1_s942)))+  (let ((l1_s945 (xor l1_s356 l1_s944)))+  (let ((l1_s946 (ite l1_s644 l1_s945 l1_s944)))+  (let ((l1_s947 (xor l1_s336 l1_s946)))+  (let ((l1_s948 (ite l1_s676 l1_s947 l1_s946)))+  (let ((l1_s949 (xor l1_s318 l1_s948)))+  (let ((l1_s950 (ite l1_s708 l1_s949 l1_s948)))+  (let ((l1_s951 (xor l1_s302 l1_s950)))+  (let ((l1_s952 (ite l1_s740 l1_s951 l1_s950)))+  (let ((l1_s953 (xor l1_s288 l1_s952)))+  (let ((l1_s954 (ite l1_s772 l1_s953 l1_s952)))+  (let ((l1_s955 (xor l1_s276 l1_s954)))+  (let ((l1_s956 (ite l1_s804 l1_s955 l1_s954)))+  (let ((l1_s957 (xor l1_s266 l1_s956)))+  (let ((l1_s958 (ite l1_s836 l1_s957 l1_s956)))+  (let ((l1_s959 (xor l1_s258 l1_s958)))+  (let ((l1_s960 (ite l1_s868 l1_s959 l1_s958)))+  (let ((l1_s961 (xor l1_s252 l1_s960)))+  (let ((l1_s962 (ite l1_s900 l1_s961 l1_s960)))+  (let ((l1_s963 (xor l1_s248 l1_s962)))+  (let ((l1_s964 (ite l1_s932 l1_s963 l1_s962)))+  (let ((l1_s965 (xor l1_s4 l1_s158)))+  (let ((l1_s966 (ite l1_s484 l1_s965 l1_s158)))+  (let ((l1_s967 (xor l1_s486 l1_s966)))+  (let ((l1_s968 (ite l1_s516 l1_s967 l1_s966)))+  (let ((l1_s969 (xor l1_s456 l1_s968)))+  (let ((l1_s970 (ite l1_s548 l1_s969 l1_s968)))+  (let ((l1_s971 (xor l1_s428 l1_s970)))+  (let ((l1_s972 (ite l1_s580 l1_s971 l1_s970)))+  (let ((l1_s973 (xor l1_s402 l1_s972)))+  (let ((l1_s974 (ite l1_s612 l1_s973 l1_s972)))+  (let ((l1_s975 (xor l1_s378 l1_s974)))+  (let ((l1_s976 (ite l1_s644 l1_s975 l1_s974)))+  (let ((l1_s977 (xor l1_s356 l1_s976)))+  (let ((l1_s978 (ite l1_s676 l1_s977 l1_s976)))+  (let ((l1_s979 (xor l1_s336 l1_s978)))+  (let ((l1_s980 (ite l1_s708 l1_s979 l1_s978)))+  (let ((l1_s981 (xor l1_s318 l1_s980)))+  (let ((l1_s982 (ite l1_s740 l1_s981 l1_s980)))+  (let ((l1_s983 (xor l1_s302 l1_s982)))+  (let ((l1_s984 (ite l1_s772 l1_s983 l1_s982)))+  (let ((l1_s985 (xor l1_s288 l1_s984)))+  (let ((l1_s986 (ite l1_s804 l1_s985 l1_s984)))+  (let ((l1_s987 (xor l1_s276 l1_s986)))+  (let ((l1_s988 (ite l1_s836 l1_s987 l1_s986)))+  (let ((l1_s989 (xor l1_s266 l1_s988)))+  (let ((l1_s990 (ite l1_s868 l1_s989 l1_s988)))+  (let ((l1_s991 (xor l1_s258 l1_s990)))+  (let ((l1_s992 (ite l1_s900 l1_s991 l1_s990)))+  (let ((l1_s993 (xor l1_s252 l1_s992)))+  (let ((l1_s994 (ite l1_s932 l1_s993 l1_s992)))+  (let ((l1_s995 (xor l1_s248 l1_s994)))+  (let ((l1_s996 (ite l1_s964 l1_s995 l1_s994)))+  (let ((l1_s997 (xor l1_s4 l1_s163)))+  (let ((l1_s998 (ite l1_s516 l1_s997 l1_s163)))+  (let ((l1_s999 (xor l1_s486 l1_s998)))+  (let ((l1_s1000 (ite l1_s548 l1_s999 l1_s998)))+  (let ((l1_s1001 (xor l1_s456 l1_s1000)))+  (let ((l1_s1002 (ite l1_s580 l1_s1001 l1_s1000)))+  (let ((l1_s1003 (xor l1_s428 l1_s1002)))+  (let ((l1_s1004 (ite l1_s612 l1_s1003 l1_s1002)))+  (let ((l1_s1005 (xor l1_s402 l1_s1004)))+  (let ((l1_s1006 (ite l1_s644 l1_s1005 l1_s1004)))+  (let ((l1_s1007 (xor l1_s378 l1_s1006)))+  (let ((l1_s1008 (ite l1_s676 l1_s1007 l1_s1006)))+  (let ((l1_s1009 (xor l1_s356 l1_s1008)))+  (let ((l1_s1010 (ite l1_s708 l1_s1009 l1_s1008)))+  (let ((l1_s1011 (xor l1_s336 l1_s1010)))+  (let ((l1_s1012 (ite l1_s740 l1_s1011 l1_s1010)))+  (let ((l1_s1013 (xor l1_s318 l1_s1012)))+  (let ((l1_s1014 (ite l1_s772 l1_s1013 l1_s1012)))+  (let ((l1_s1015 (xor l1_s302 l1_s1014)))+  (let ((l1_s1016 (ite l1_s804 l1_s1015 l1_s1014)))+  (let ((l1_s1017 (xor l1_s288 l1_s1016)))+  (let ((l1_s1018 (ite l1_s836 l1_s1017 l1_s1016)))+  (let ((l1_s1019 (xor l1_s276 l1_s1018)))+  (let ((l1_s1020 (ite l1_s868 l1_s1019 l1_s1018)))+  (let ((l1_s1021 (xor l1_s266 l1_s1020)))+  (let ((l1_s1022 (ite l1_s900 l1_s1021 l1_s1020)))+  (let ((l1_s1023 (xor l1_s258 l1_s1022)))+  (let ((l1_s1024 (ite l1_s932 l1_s1023 l1_s1022)))+  (let ((l1_s1025 (xor l1_s252 l1_s1024)))+  (let ((l1_s1026 (ite l1_s964 l1_s1025 l1_s1024)))+  (let ((l1_s1027 (xor l1_s248 l1_s1026)))+  (let ((l1_s1028 (ite l1_s996 l1_s1027 l1_s1026)))+  (let ((l1_s1029 (xor l1_s4 l1_s168)))+  (let ((l1_s1030 (ite l1_s548 l1_s1029 l1_s168)))+  (let ((l1_s1031 (xor l1_s486 l1_s1030)))+  (let ((l1_s1032 (ite l1_s580 l1_s1031 l1_s1030)))+  (let ((l1_s1033 (xor l1_s456 l1_s1032)))+  (let ((l1_s1034 (ite l1_s612 l1_s1033 l1_s1032)))+  (let ((l1_s1035 (xor l1_s428 l1_s1034)))+  (let ((l1_s1036 (ite l1_s644 l1_s1035 l1_s1034)))+  (let ((l1_s1037 (xor l1_s402 l1_s1036)))+  (let ((l1_s1038 (ite l1_s676 l1_s1037 l1_s1036)))+  (let ((l1_s1039 (xor l1_s378 l1_s1038)))+  (let ((l1_s1040 (ite l1_s708 l1_s1039 l1_s1038)))+  (let ((l1_s1041 (xor l1_s356 l1_s1040)))+  (let ((l1_s1042 (ite l1_s740 l1_s1041 l1_s1040)))+  (let ((l1_s1043 (xor l1_s336 l1_s1042)))+  (let ((l1_s1044 (ite l1_s772 l1_s1043 l1_s1042)))+  (let ((l1_s1045 (xor l1_s318 l1_s1044)))+  (let ((l1_s1046 (ite l1_s804 l1_s1045 l1_s1044)))+  (let ((l1_s1047 (xor l1_s302 l1_s1046)))+  (let ((l1_s1048 (ite l1_s836 l1_s1047 l1_s1046)))+  (let ((l1_s1049 (xor l1_s288 l1_s1048)))+  (let ((l1_s1050 (ite l1_s868 l1_s1049 l1_s1048)))+  (let ((l1_s1051 (xor l1_s276 l1_s1050)))+  (let ((l1_s1052 (ite l1_s900 l1_s1051 l1_s1050)))+  (let ((l1_s1053 (xor l1_s266 l1_s1052)))+  (let ((l1_s1054 (ite l1_s932 l1_s1053 l1_s1052)))+  (let ((l1_s1055 (xor l1_s258 l1_s1054)))+  (let ((l1_s1056 (ite l1_s964 l1_s1055 l1_s1054)))+  (let ((l1_s1057 (xor l1_s252 l1_s1056)))+  (let ((l1_s1058 (ite l1_s996 l1_s1057 l1_s1056)))+  (let ((l1_s1059 (xor l1_s248 l1_s1058)))+  (let ((l1_s1060 (ite l1_s1028 l1_s1059 l1_s1058)))+  (let ((l1_s1061 (xor l1_s4 l1_s173)))+  (let ((l1_s1062 (ite l1_s580 l1_s1061 l1_s173)))+  (let ((l1_s1063 (xor l1_s486 l1_s1062)))+  (let ((l1_s1064 (ite l1_s612 l1_s1063 l1_s1062)))+  (let ((l1_s1065 (xor l1_s456 l1_s1064)))+  (let ((l1_s1066 (ite l1_s644 l1_s1065 l1_s1064)))+  (let ((l1_s1067 (xor l1_s428 l1_s1066)))+  (let ((l1_s1068 (ite l1_s676 l1_s1067 l1_s1066)))+  (let ((l1_s1069 (xor l1_s402 l1_s1068)))+  (let ((l1_s1070 (ite l1_s708 l1_s1069 l1_s1068)))+  (let ((l1_s1071 (xor l1_s378 l1_s1070)))+  (let ((l1_s1072 (ite l1_s740 l1_s1071 l1_s1070)))+  (let ((l1_s1073 (xor l1_s356 l1_s1072)))+  (let ((l1_s1074 (ite l1_s772 l1_s1073 l1_s1072)))+  (let ((l1_s1075 (xor l1_s336 l1_s1074)))+  (let ((l1_s1076 (ite l1_s804 l1_s1075 l1_s1074)))+  (let ((l1_s1077 (xor l1_s318 l1_s1076)))+  (let ((l1_s1078 (ite l1_s836 l1_s1077 l1_s1076)))+  (let ((l1_s1079 (xor l1_s302 l1_s1078)))+  (let ((l1_s1080 (ite l1_s868 l1_s1079 l1_s1078)))+  (let ((l1_s1081 (xor l1_s288 l1_s1080)))+  (let ((l1_s1082 (ite l1_s900 l1_s1081 l1_s1080)))+  (let ((l1_s1083 (xor l1_s276 l1_s1082)))+  (let ((l1_s1084 (ite l1_s932 l1_s1083 l1_s1082)))+  (let ((l1_s1085 (xor l1_s266 l1_s1084)))+  (let ((l1_s1086 (ite l1_s964 l1_s1085 l1_s1084)))+  (let ((l1_s1087 (xor l1_s258 l1_s1086)))+  (let ((l1_s1088 (ite l1_s996 l1_s1087 l1_s1086)))+  (let ((l1_s1089 (xor l1_s252 l1_s1088)))+  (let ((l1_s1090 (ite l1_s1028 l1_s1089 l1_s1088)))+  (let ((l1_s1091 (xor l1_s248 l1_s1090)))+  (let ((l1_s1092 (ite l1_s1060 l1_s1091 l1_s1090)))+  (let ((l1_s1093 (xor l1_s4 l1_s178)))+  (let ((l1_s1094 (ite l1_s612 l1_s1093 l1_s178)))+  (let ((l1_s1095 (xor l1_s486 l1_s1094)))+  (let ((l1_s1096 (ite l1_s644 l1_s1095 l1_s1094)))+  (let ((l1_s1097 (xor l1_s456 l1_s1096)))+  (let ((l1_s1098 (ite l1_s676 l1_s1097 l1_s1096)))+  (let ((l1_s1099 (xor l1_s428 l1_s1098)))+  (let ((l1_s1100 (ite l1_s708 l1_s1099 l1_s1098)))+  (let ((l1_s1101 (xor l1_s402 l1_s1100)))+  (let ((l1_s1102 (ite l1_s740 l1_s1101 l1_s1100)))+  (let ((l1_s1103 (xor l1_s378 l1_s1102)))+  (let ((l1_s1104 (ite l1_s772 l1_s1103 l1_s1102)))+  (let ((l1_s1105 (xor l1_s356 l1_s1104)))+  (let ((l1_s1106 (ite l1_s804 l1_s1105 l1_s1104)))+  (let ((l1_s1107 (xor l1_s336 l1_s1106)))+  (let ((l1_s1108 (ite l1_s836 l1_s1107 l1_s1106)))+  (let ((l1_s1109 (xor l1_s318 l1_s1108)))+  (let ((l1_s1110 (ite l1_s868 l1_s1109 l1_s1108)))+  (let ((l1_s1111 (xor l1_s302 l1_s1110)))+  (let ((l1_s1112 (ite l1_s900 l1_s1111 l1_s1110)))+  (let ((l1_s1113 (xor l1_s288 l1_s1112)))+  (let ((l1_s1114 (ite l1_s932 l1_s1113 l1_s1112)))+  (let ((l1_s1115 (xor l1_s276 l1_s1114)))+  (let ((l1_s1116 (ite l1_s964 l1_s1115 l1_s1114)))+  (let ((l1_s1117 (xor l1_s266 l1_s1116)))+  (let ((l1_s1118 (ite l1_s996 l1_s1117 l1_s1116)))+  (let ((l1_s1119 (xor l1_s258 l1_s1118)))+  (let ((l1_s1120 (ite l1_s1028 l1_s1119 l1_s1118)))+  (let ((l1_s1121 (xor l1_s252 l1_s1120)))+  (let ((l1_s1122 (ite l1_s1060 l1_s1121 l1_s1120)))+  (let ((l1_s1123 (xor l1_s248 l1_s1122)))+  (let ((l1_s1124 (ite l1_s1092 l1_s1123 l1_s1122)))+  (let ((l1_s1125 (xor l1_s4 l1_s183)))+  (let ((l1_s1126 (ite l1_s644 l1_s1125 l1_s183)))+  (let ((l1_s1127 (xor l1_s486 l1_s1126)))+  (let ((l1_s1128 (ite l1_s676 l1_s1127 l1_s1126)))+  (let ((l1_s1129 (xor l1_s456 l1_s1128)))+  (let ((l1_s1130 (ite l1_s708 l1_s1129 l1_s1128)))+  (let ((l1_s1131 (xor l1_s428 l1_s1130)))+  (let ((l1_s1132 (ite l1_s740 l1_s1131 l1_s1130)))+  (let ((l1_s1133 (xor l1_s402 l1_s1132)))+  (let ((l1_s1134 (ite l1_s772 l1_s1133 l1_s1132)))+  (let ((l1_s1135 (xor l1_s378 l1_s1134)))+  (let ((l1_s1136 (ite l1_s804 l1_s1135 l1_s1134)))+  (let ((l1_s1137 (xor l1_s356 l1_s1136)))+  (let ((l1_s1138 (ite l1_s836 l1_s1137 l1_s1136)))+  (let ((l1_s1139 (xor l1_s336 l1_s1138)))+  (let ((l1_s1140 (ite l1_s868 l1_s1139 l1_s1138)))+  (let ((l1_s1141 (xor l1_s318 l1_s1140)))+  (let ((l1_s1142 (ite l1_s900 l1_s1141 l1_s1140)))+  (let ((l1_s1143 (xor l1_s302 l1_s1142)))+  (let ((l1_s1144 (ite l1_s932 l1_s1143 l1_s1142)))+  (let ((l1_s1145 (xor l1_s288 l1_s1144)))+  (let ((l1_s1146 (ite l1_s964 l1_s1145 l1_s1144)))+  (let ((l1_s1147 (xor l1_s276 l1_s1146)))+  (let ((l1_s1148 (ite l1_s996 l1_s1147 l1_s1146)))+  (let ((l1_s1149 (xor l1_s266 l1_s1148)))+  (let ((l1_s1150 (ite l1_s1028 l1_s1149 l1_s1148)))+  (let ((l1_s1151 (xor l1_s258 l1_s1150)))+  (let ((l1_s1152 (ite l1_s1060 l1_s1151 l1_s1150)))+  (let ((l1_s1153 (xor l1_s252 l1_s1152)))+  (let ((l1_s1154 (ite l1_s1092 l1_s1153 l1_s1152)))+  (let ((l1_s1155 (xor l1_s248 l1_s1154)))+  (let ((l1_s1156 (ite l1_s1124 l1_s1155 l1_s1154)))+  (let ((l1_s1157 (xor l1_s4 l1_s188)))+  (let ((l1_s1158 (ite l1_s676 l1_s1157 l1_s188)))+  (let ((l1_s1159 (xor l1_s486 l1_s1158)))+  (let ((l1_s1160 (ite l1_s708 l1_s1159 l1_s1158)))+  (let ((l1_s1161 (xor l1_s456 l1_s1160)))+  (let ((l1_s1162 (ite l1_s740 l1_s1161 l1_s1160)))+  (let ((l1_s1163 (xor l1_s428 l1_s1162)))+  (let ((l1_s1164 (ite l1_s772 l1_s1163 l1_s1162)))+  (let ((l1_s1165 (xor l1_s402 l1_s1164)))+  (let ((l1_s1166 (ite l1_s804 l1_s1165 l1_s1164)))+  (let ((l1_s1167 (xor l1_s378 l1_s1166)))+  (let ((l1_s1168 (ite l1_s836 l1_s1167 l1_s1166)))+  (let ((l1_s1169 (xor l1_s356 l1_s1168)))+  (let ((l1_s1170 (ite l1_s868 l1_s1169 l1_s1168)))+  (let ((l1_s1171 (xor l1_s336 l1_s1170)))+  (let ((l1_s1172 (ite l1_s900 l1_s1171 l1_s1170)))+  (let ((l1_s1173 (xor l1_s318 l1_s1172)))+  (let ((l1_s1174 (ite l1_s932 l1_s1173 l1_s1172)))+  (let ((l1_s1175 (xor l1_s302 l1_s1174)))+  (let ((l1_s1176 (ite l1_s964 l1_s1175 l1_s1174)))+  (let ((l1_s1177 (xor l1_s288 l1_s1176)))+  (let ((l1_s1178 (ite l1_s996 l1_s1177 l1_s1176)))+  (let ((l1_s1179 (xor l1_s276 l1_s1178)))+  (let ((l1_s1180 (ite l1_s1028 l1_s1179 l1_s1178)))+  (let ((l1_s1181 (xor l1_s266 l1_s1180)))+  (let ((l1_s1182 (ite l1_s1060 l1_s1181 l1_s1180)))+  (let ((l1_s1183 (xor l1_s258 l1_s1182)))+  (let ((l1_s1184 (ite l1_s1092 l1_s1183 l1_s1182)))+  (let ((l1_s1185 (xor l1_s252 l1_s1184)))+  (let ((l1_s1186 (ite l1_s1124 l1_s1185 l1_s1184)))+  (let ((l1_s1187 (xor l1_s248 l1_s1186)))+  (let ((l1_s1188 (ite l1_s1156 l1_s1187 l1_s1186)))+  (let ((l1_s1189 (xor l1_s4 l1_s193)))+  (let ((l1_s1190 (ite l1_s708 l1_s1189 l1_s193)))+  (let ((l1_s1191 (xor l1_s486 l1_s1190)))+  (let ((l1_s1192 (ite l1_s740 l1_s1191 l1_s1190)))+  (let ((l1_s1193 (xor l1_s456 l1_s1192)))+  (let ((l1_s1194 (ite l1_s772 l1_s1193 l1_s1192)))+  (let ((l1_s1195 (xor l1_s428 l1_s1194)))+  (let ((l1_s1196 (ite l1_s804 l1_s1195 l1_s1194)))+  (let ((l1_s1197 (xor l1_s402 l1_s1196)))+  (let ((l1_s1198 (ite l1_s836 l1_s1197 l1_s1196)))+  (let ((l1_s1199 (xor l1_s378 l1_s1198)))+  (let ((l1_s1200 (ite l1_s868 l1_s1199 l1_s1198)))+  (let ((l1_s1201 (xor l1_s356 l1_s1200)))+  (let ((l1_s1202 (ite l1_s900 l1_s1201 l1_s1200)))+  (let ((l1_s1203 (xor l1_s336 l1_s1202)))+  (let ((l1_s1204 (ite l1_s932 l1_s1203 l1_s1202)))+  (let ((l1_s1205 (xor l1_s318 l1_s1204)))+  (let ((l1_s1206 (ite l1_s964 l1_s1205 l1_s1204)))+  (let ((l1_s1207 (xor l1_s302 l1_s1206)))+  (let ((l1_s1208 (ite l1_s996 l1_s1207 l1_s1206)))+  (let ((l1_s1209 (xor l1_s288 l1_s1208)))+  (let ((l1_s1210 (ite l1_s1028 l1_s1209 l1_s1208)))+  (let ((l1_s1211 (xor l1_s276 l1_s1210)))+  (let ((l1_s1212 (ite l1_s1060 l1_s1211 l1_s1210)))+  (let ((l1_s1213 (xor l1_s266 l1_s1212)))+  (let ((l1_s1214 (ite l1_s1092 l1_s1213 l1_s1212)))+  (let ((l1_s1215 (xor l1_s258 l1_s1214)))+  (let ((l1_s1216 (ite l1_s1124 l1_s1215 l1_s1214)))+  (let ((l1_s1217 (xor l1_s252 l1_s1216)))+  (let ((l1_s1218 (ite l1_s1156 l1_s1217 l1_s1216)))+  (let ((l1_s1219 (xor l1_s248 l1_s1218)))+  (let ((l1_s1220 (ite l1_s1188 l1_s1219 l1_s1218)))+  (let ((l1_s1221 (xor l1_s4 l1_s198)))+  (let ((l1_s1222 (ite l1_s740 l1_s1221 l1_s198)))+  (let ((l1_s1223 (xor l1_s486 l1_s1222)))+  (let ((l1_s1224 (ite l1_s772 l1_s1223 l1_s1222)))+  (let ((l1_s1225 (xor l1_s456 l1_s1224)))+  (let ((l1_s1226 (ite l1_s804 l1_s1225 l1_s1224)))+  (let ((l1_s1227 (xor l1_s428 l1_s1226)))+  (let ((l1_s1228 (ite l1_s836 l1_s1227 l1_s1226)))+  (let ((l1_s1229 (xor l1_s402 l1_s1228)))+  (let ((l1_s1230 (ite l1_s868 l1_s1229 l1_s1228)))+  (let ((l1_s1231 (xor l1_s378 l1_s1230)))+  (let ((l1_s1232 (ite l1_s900 l1_s1231 l1_s1230)))+  (let ((l1_s1233 (xor l1_s356 l1_s1232)))+  (let ((l1_s1234 (ite l1_s932 l1_s1233 l1_s1232)))+  (let ((l1_s1235 (xor l1_s336 l1_s1234)))+  (let ((l1_s1236 (ite l1_s964 l1_s1235 l1_s1234)))+  (let ((l1_s1237 (xor l1_s318 l1_s1236)))+  (let ((l1_s1238 (ite l1_s996 l1_s1237 l1_s1236)))+  (let ((l1_s1239 (xor l1_s302 l1_s1238)))+  (let ((l1_s1240 (ite l1_s1028 l1_s1239 l1_s1238)))+  (let ((l1_s1241 (xor l1_s288 l1_s1240)))+  (let ((l1_s1242 (ite l1_s1060 l1_s1241 l1_s1240)))+  (let ((l1_s1243 (xor l1_s276 l1_s1242)))+  (let ((l1_s1244 (ite l1_s1092 l1_s1243 l1_s1242)))+  (let ((l1_s1245 (xor l1_s266 l1_s1244)))+  (let ((l1_s1246 (ite l1_s1124 l1_s1245 l1_s1244)))+  (let ((l1_s1247 (xor l1_s258 l1_s1246)))+  (let ((l1_s1248 (ite l1_s1156 l1_s1247 l1_s1246)))+  (let ((l1_s1249 (xor l1_s252 l1_s1248)))+  (let ((l1_s1250 (ite l1_s1188 l1_s1249 l1_s1248)))+  (let ((l1_s1251 (xor l1_s248 l1_s1250)))+  (let ((l1_s1252 (ite l1_s1220 l1_s1251 l1_s1250)))+  (let ((l1_s1253 (xor l1_s4 l1_s203)))+  (let ((l1_s1254 (ite l1_s772 l1_s1253 l1_s203)))+  (let ((l1_s1255 (xor l1_s486 l1_s1254)))+  (let ((l1_s1256 (ite l1_s804 l1_s1255 l1_s1254)))+  (let ((l1_s1257 (xor l1_s456 l1_s1256)))+  (let ((l1_s1258 (ite l1_s836 l1_s1257 l1_s1256)))+  (let ((l1_s1259 (xor l1_s428 l1_s1258)))+  (let ((l1_s1260 (ite l1_s868 l1_s1259 l1_s1258)))+  (let ((l1_s1261 (xor l1_s402 l1_s1260)))+  (let ((l1_s1262 (ite l1_s900 l1_s1261 l1_s1260)))+  (let ((l1_s1263 (xor l1_s378 l1_s1262)))+  (let ((l1_s1264 (ite l1_s932 l1_s1263 l1_s1262)))+  (let ((l1_s1265 (xor l1_s356 l1_s1264)))+  (let ((l1_s1266 (ite l1_s964 l1_s1265 l1_s1264)))+  (let ((l1_s1267 (xor l1_s336 l1_s1266)))+  (let ((l1_s1268 (ite l1_s996 l1_s1267 l1_s1266)))+  (let ((l1_s1269 (xor l1_s318 l1_s1268)))+  (let ((l1_s1270 (ite l1_s1028 l1_s1269 l1_s1268)))+  (let ((l1_s1271 (xor l1_s302 l1_s1270)))+  (let ((l1_s1272 (ite l1_s1060 l1_s1271 l1_s1270)))+  (let ((l1_s1273 (xor l1_s288 l1_s1272)))+  (let ((l1_s1274 (ite l1_s1092 l1_s1273 l1_s1272)))+  (let ((l1_s1275 (xor l1_s276 l1_s1274)))+  (let ((l1_s1276 (ite l1_s1124 l1_s1275 l1_s1274)))+  (let ((l1_s1277 (xor l1_s266 l1_s1276)))+  (let ((l1_s1278 (ite l1_s1156 l1_s1277 l1_s1276)))+  (let ((l1_s1279 (xor l1_s258 l1_s1278)))+  (let ((l1_s1280 (ite l1_s1188 l1_s1279 l1_s1278)))+  (let ((l1_s1281 (xor l1_s252 l1_s1280)))+  (let ((l1_s1282 (ite l1_s1220 l1_s1281 l1_s1280)))+  (let ((l1_s1283 (xor l1_s248 l1_s1282)))+  (let ((l1_s1284 (ite l1_s1252 l1_s1283 l1_s1282)))+  (let ((l1_s1285 (xor l1_s4 l1_s208)))+  (let ((l1_s1286 (ite l1_s804 l1_s1285 l1_s208)))+  (let ((l1_s1287 (xor l1_s486 l1_s1286)))+  (let ((l1_s1288 (ite l1_s836 l1_s1287 l1_s1286)))+  (let ((l1_s1289 (xor l1_s456 l1_s1288)))+  (let ((l1_s1290 (ite l1_s868 l1_s1289 l1_s1288)))+  (let ((l1_s1291 (xor l1_s428 l1_s1290)))+  (let ((l1_s1292 (ite l1_s900 l1_s1291 l1_s1290)))+  (let ((l1_s1293 (xor l1_s402 l1_s1292)))+  (let ((l1_s1294 (ite l1_s932 l1_s1293 l1_s1292)))+  (let ((l1_s1295 (xor l1_s378 l1_s1294)))+  (let ((l1_s1296 (ite l1_s964 l1_s1295 l1_s1294)))+  (let ((l1_s1297 (xor l1_s356 l1_s1296)))+  (let ((l1_s1298 (ite l1_s996 l1_s1297 l1_s1296)))+  (let ((l1_s1299 (xor l1_s336 l1_s1298)))+  (let ((l1_s1300 (ite l1_s1028 l1_s1299 l1_s1298)))+  (let ((l1_s1301 (xor l1_s318 l1_s1300)))+  (let ((l1_s1302 (ite l1_s1060 l1_s1301 l1_s1300)))+  (let ((l1_s1303 (xor l1_s302 l1_s1302)))+  (let ((l1_s1304 (ite l1_s1092 l1_s1303 l1_s1302)))+  (let ((l1_s1305 (xor l1_s288 l1_s1304)))+  (let ((l1_s1306 (ite l1_s1124 l1_s1305 l1_s1304)))+  (let ((l1_s1307 (xor l1_s276 l1_s1306)))+  (let ((l1_s1308 (ite l1_s1156 l1_s1307 l1_s1306)))+  (let ((l1_s1309 (xor l1_s266 l1_s1308)))+  (let ((l1_s1310 (ite l1_s1188 l1_s1309 l1_s1308)))+  (let ((l1_s1311 (xor l1_s258 l1_s1310)))+  (let ((l1_s1312 (ite l1_s1220 l1_s1311 l1_s1310)))+  (let ((l1_s1313 (xor l1_s252 l1_s1312)))+  (let ((l1_s1314 (ite l1_s1252 l1_s1313 l1_s1312)))+  (let ((l1_s1315 (xor l1_s248 l1_s1314)))+  (let ((l1_s1316 (ite l1_s1284 l1_s1315 l1_s1314)))+  (let ((l1_s1317 (xor l1_s4 l1_s213)))+  (let ((l1_s1318 (ite l1_s836 l1_s1317 l1_s213)))+  (let ((l1_s1319 (xor l1_s486 l1_s1318)))+  (let ((l1_s1320 (ite l1_s868 l1_s1319 l1_s1318)))+  (let ((l1_s1321 (xor l1_s456 l1_s1320)))+  (let ((l1_s1322 (ite l1_s900 l1_s1321 l1_s1320)))+  (let ((l1_s1323 (xor l1_s428 l1_s1322)))+  (let ((l1_s1324 (ite l1_s932 l1_s1323 l1_s1322)))+  (let ((l1_s1325 (xor l1_s402 l1_s1324)))+  (let ((l1_s1326 (ite l1_s964 l1_s1325 l1_s1324)))+  (let ((l1_s1327 (xor l1_s378 l1_s1326)))+  (let ((l1_s1328 (ite l1_s996 l1_s1327 l1_s1326)))+  (let ((l1_s1329 (xor l1_s356 l1_s1328)))+  (let ((l1_s1330 (ite l1_s1028 l1_s1329 l1_s1328)))+  (let ((l1_s1331 (xor l1_s336 l1_s1330)))+  (let ((l1_s1332 (ite l1_s1060 l1_s1331 l1_s1330)))+  (let ((l1_s1333 (xor l1_s318 l1_s1332)))+  (let ((l1_s1334 (ite l1_s1092 l1_s1333 l1_s1332)))+  (let ((l1_s1335 (xor l1_s302 l1_s1334)))+  (let ((l1_s1336 (ite l1_s1124 l1_s1335 l1_s1334)))+  (let ((l1_s1337 (xor l1_s288 l1_s1336)))+  (let ((l1_s1338 (ite l1_s1156 l1_s1337 l1_s1336)))+  (let ((l1_s1339 (xor l1_s276 l1_s1338)))+  (let ((l1_s1340 (ite l1_s1188 l1_s1339 l1_s1338)))+  (let ((l1_s1341 (xor l1_s266 l1_s1340)))+  (let ((l1_s1342 (ite l1_s1220 l1_s1341 l1_s1340)))+  (let ((l1_s1343 (xor l1_s258 l1_s1342)))+  (let ((l1_s1344 (ite l1_s1252 l1_s1343 l1_s1342)))+  (let ((l1_s1345 (xor l1_s252 l1_s1344)))+  (let ((l1_s1346 (ite l1_s1284 l1_s1345 l1_s1344)))+  (let ((l1_s1347 (xor l1_s248 l1_s1346)))+  (let ((l1_s1348 (ite l1_s1316 l1_s1347 l1_s1346)))+  (let ((l1_s1349 (xor l1_s4 l1_s218)))+  (let ((l1_s1350 (ite l1_s868 l1_s1349 l1_s218)))+  (let ((l1_s1351 (xor l1_s486 l1_s1350)))+  (let ((l1_s1352 (ite l1_s900 l1_s1351 l1_s1350)))+  (let ((l1_s1353 (xor l1_s456 l1_s1352)))+  (let ((l1_s1354 (ite l1_s932 l1_s1353 l1_s1352)))+  (let ((l1_s1355 (xor l1_s428 l1_s1354)))+  (let ((l1_s1356 (ite l1_s964 l1_s1355 l1_s1354)))+  (let ((l1_s1357 (xor l1_s402 l1_s1356)))+  (let ((l1_s1358 (ite l1_s996 l1_s1357 l1_s1356)))+  (let ((l1_s1359 (xor l1_s378 l1_s1358)))+  (let ((l1_s1360 (ite l1_s1028 l1_s1359 l1_s1358)))+  (let ((l1_s1361 (xor l1_s356 l1_s1360)))+  (let ((l1_s1362 (ite l1_s1060 l1_s1361 l1_s1360)))+  (let ((l1_s1363 (xor l1_s336 l1_s1362)))+  (let ((l1_s1364 (ite l1_s1092 l1_s1363 l1_s1362)))+  (let ((l1_s1365 (xor l1_s318 l1_s1364)))+  (let ((l1_s1366 (ite l1_s1124 l1_s1365 l1_s1364)))+  (let ((l1_s1367 (xor l1_s302 l1_s1366)))+  (let ((l1_s1368 (ite l1_s1156 l1_s1367 l1_s1366)))+  (let ((l1_s1369 (xor l1_s288 l1_s1368)))+  (let ((l1_s1370 (ite l1_s1188 l1_s1369 l1_s1368)))+  (let ((l1_s1371 (xor l1_s276 l1_s1370)))+  (let ((l1_s1372 (ite l1_s1220 l1_s1371 l1_s1370)))+  (let ((l1_s1373 (xor l1_s266 l1_s1372)))+  (let ((l1_s1374 (ite l1_s1252 l1_s1373 l1_s1372)))+  (let ((l1_s1375 (xor l1_s258 l1_s1374)))+  (let ((l1_s1376 (ite l1_s1284 l1_s1375 l1_s1374)))+  (let ((l1_s1377 (xor l1_s252 l1_s1376)))+  (let ((l1_s1378 (ite l1_s1316 l1_s1377 l1_s1376)))+  (let ((l1_s1379 (xor l1_s248 l1_s1378)))+  (let ((l1_s1380 (ite l1_s1348 l1_s1379 l1_s1378)))+  (let ((l1_s1381 (xor l1_s4 l1_s223)))+  (let ((l1_s1382 (ite l1_s900 l1_s1381 l1_s223)))+  (let ((l1_s1383 (xor l1_s486 l1_s1382)))+  (let ((l1_s1384 (ite l1_s932 l1_s1383 l1_s1382)))+  (let ((l1_s1385 (xor l1_s456 l1_s1384)))+  (let ((l1_s1386 (ite l1_s964 l1_s1385 l1_s1384)))+  (let ((l1_s1387 (xor l1_s428 l1_s1386)))+  (let ((l1_s1388 (ite l1_s996 l1_s1387 l1_s1386)))+  (let ((l1_s1389 (xor l1_s402 l1_s1388)))+  (let ((l1_s1390 (ite l1_s1028 l1_s1389 l1_s1388)))+  (let ((l1_s1391 (xor l1_s378 l1_s1390)))+  (let ((l1_s1392 (ite l1_s1060 l1_s1391 l1_s1390)))+  (let ((l1_s1393 (xor l1_s356 l1_s1392)))+  (let ((l1_s1394 (ite l1_s1092 l1_s1393 l1_s1392)))+  (let ((l1_s1395 (xor l1_s336 l1_s1394)))+  (let ((l1_s1396 (ite l1_s1124 l1_s1395 l1_s1394)))+  (let ((l1_s1397 (xor l1_s318 l1_s1396)))+  (let ((l1_s1398 (ite l1_s1156 l1_s1397 l1_s1396)))+  (let ((l1_s1399 (xor l1_s302 l1_s1398)))+  (let ((l1_s1400 (ite l1_s1188 l1_s1399 l1_s1398)))+  (let ((l1_s1401 (xor l1_s288 l1_s1400)))+  (let ((l1_s1402 (ite l1_s1220 l1_s1401 l1_s1400)))+  (let ((l1_s1403 (xor l1_s276 l1_s1402)))+  (let ((l1_s1404 (ite l1_s1252 l1_s1403 l1_s1402)))+  (let ((l1_s1405 (xor l1_s266 l1_s1404)))+  (let ((l1_s1406 (ite l1_s1284 l1_s1405 l1_s1404)))+  (let ((l1_s1407 (xor l1_s258 l1_s1406)))+  (let ((l1_s1408 (ite l1_s1316 l1_s1407 l1_s1406)))+  (let ((l1_s1409 (xor l1_s252 l1_s1408)))+  (let ((l1_s1410 (ite l1_s1348 l1_s1409 l1_s1408)))+  (let ((l1_s1411 (xor l1_s248 l1_s1410)))+  (let ((l1_s1412 (ite l1_s1380 l1_s1411 l1_s1410)))+  (let ((l1_s1413 (xor l1_s4 l1_s228)))+  (let ((l1_s1414 (ite l1_s932 l1_s1413 l1_s228)))+  (let ((l1_s1415 (xor l1_s486 l1_s1414)))+  (let ((l1_s1416 (ite l1_s964 l1_s1415 l1_s1414)))+  (let ((l1_s1417 (xor l1_s456 l1_s1416)))+  (let ((l1_s1418 (ite l1_s996 l1_s1417 l1_s1416)))+  (let ((l1_s1419 (xor l1_s428 l1_s1418)))+  (let ((l1_s1420 (ite l1_s1028 l1_s1419 l1_s1418)))+  (let ((l1_s1421 (xor l1_s402 l1_s1420)))+  (let ((l1_s1422 (ite l1_s1060 l1_s1421 l1_s1420)))+  (let ((l1_s1423 (xor l1_s378 l1_s1422)))+  (let ((l1_s1424 (ite l1_s1092 l1_s1423 l1_s1422)))+  (let ((l1_s1425 (xor l1_s356 l1_s1424)))+  (let ((l1_s1426 (ite l1_s1124 l1_s1425 l1_s1424)))+  (let ((l1_s1427 (xor l1_s336 l1_s1426)))+  (let ((l1_s1428 (ite l1_s1156 l1_s1427 l1_s1426)))+  (let ((l1_s1429 (xor l1_s318 l1_s1428)))+  (let ((l1_s1430 (ite l1_s1188 l1_s1429 l1_s1428)))+  (let ((l1_s1431 (xor l1_s302 l1_s1430)))+  (let ((l1_s1432 (ite l1_s1220 l1_s1431 l1_s1430)))+  (let ((l1_s1433 (xor l1_s288 l1_s1432)))+  (let ((l1_s1434 (ite l1_s1252 l1_s1433 l1_s1432)))+  (let ((l1_s1435 (xor l1_s276 l1_s1434)))+  (let ((l1_s1436 (ite l1_s1284 l1_s1435 l1_s1434)))+  (let ((l1_s1437 (xor l1_s266 l1_s1436)))+  (let ((l1_s1438 (ite l1_s1316 l1_s1437 l1_s1436)))+  (let ((l1_s1439 (xor l1_s258 l1_s1438)))+  (let ((l1_s1440 (ite l1_s1348 l1_s1439 l1_s1438)))+  (let ((l1_s1441 (xor l1_s252 l1_s1440)))+  (let ((l1_s1442 (ite l1_s1380 l1_s1441 l1_s1440)))+  (let ((l1_s1443 (xor l1_s248 l1_s1442)))+  (let ((l1_s1444 (ite l1_s1412 l1_s1443 l1_s1442)))+  (let ((l1_s1445 (xor l1_s4 l1_s233)))+  (let ((l1_s1446 (ite l1_s964 l1_s1445 l1_s233)))+  (let ((l1_s1447 (xor l1_s486 l1_s1446)))+  (let ((l1_s1448 (ite l1_s996 l1_s1447 l1_s1446)))+  (let ((l1_s1449 (xor l1_s456 l1_s1448)))+  (let ((l1_s1450 (ite l1_s1028 l1_s1449 l1_s1448)))+  (let ((l1_s1451 (xor l1_s428 l1_s1450)))+  (let ((l1_s1452 (ite l1_s1060 l1_s1451 l1_s1450)))+  (let ((l1_s1453 (xor l1_s402 l1_s1452)))+  (let ((l1_s1454 (ite l1_s1092 l1_s1453 l1_s1452)))+  (let ((l1_s1455 (xor l1_s378 l1_s1454)))+  (let ((l1_s1456 (ite l1_s1124 l1_s1455 l1_s1454)))+  (let ((l1_s1457 (xor l1_s356 l1_s1456)))+  (let ((l1_s1458 (ite l1_s1156 l1_s1457 l1_s1456)))+  (let ((l1_s1459 (xor l1_s336 l1_s1458)))+  (let ((l1_s1460 (ite l1_s1188 l1_s1459 l1_s1458)))+  (let ((l1_s1461 (xor l1_s318 l1_s1460)))+  (let ((l1_s1462 (ite l1_s1220 l1_s1461 l1_s1460)))+  (let ((l1_s1463 (xor l1_s302 l1_s1462)))+  (let ((l1_s1464 (ite l1_s1252 l1_s1463 l1_s1462)))+  (let ((l1_s1465 (xor l1_s288 l1_s1464)))+  (let ((l1_s1466 (ite l1_s1284 l1_s1465 l1_s1464)))+  (let ((l1_s1467 (xor l1_s276 l1_s1466)))+  (let ((l1_s1468 (ite l1_s1316 l1_s1467 l1_s1466)))+  (let ((l1_s1469 (xor l1_s266 l1_s1468)))+  (let ((l1_s1470 (ite l1_s1348 l1_s1469 l1_s1468)))+  (let ((l1_s1471 (xor l1_s258 l1_s1470)))+  (let ((l1_s1472 (ite l1_s1380 l1_s1471 l1_s1470)))+  (let ((l1_s1473 (xor l1_s252 l1_s1472)))+  (let ((l1_s1474 (ite l1_s1412 l1_s1473 l1_s1472)))+  (let ((l1_s1475 (xor l1_s248 l1_s1474)))+  (let ((l1_s1476 (ite l1_s1444 l1_s1475 l1_s1474)))+  (let ((l1_s1477 (xor l1_s4 l1_s238)))+  (let ((l1_s1478 (ite l1_s996 l1_s1477 l1_s238)))+  (let ((l1_s1479 (xor l1_s486 l1_s1478)))+  (let ((l1_s1480 (ite l1_s1028 l1_s1479 l1_s1478)))+  (let ((l1_s1481 (xor l1_s456 l1_s1480)))+  (let ((l1_s1482 (ite l1_s1060 l1_s1481 l1_s1480)))+  (let ((l1_s1483 (xor l1_s428 l1_s1482)))+  (let ((l1_s1484 (ite l1_s1092 l1_s1483 l1_s1482)))+  (let ((l1_s1485 (xor l1_s402 l1_s1484)))+  (let ((l1_s1486 (ite l1_s1124 l1_s1485 l1_s1484)))+  (let ((l1_s1487 (xor l1_s378 l1_s1486)))+  (let ((l1_s1488 (ite l1_s1156 l1_s1487 l1_s1486)))+  (let ((l1_s1489 (xor l1_s356 l1_s1488)))+  (let ((l1_s1490 (ite l1_s1188 l1_s1489 l1_s1488)))+  (let ((l1_s1491 (xor l1_s336 l1_s1490)))+  (let ((l1_s1492 (ite l1_s1220 l1_s1491 l1_s1490)))+  (let ((l1_s1493 (xor l1_s318 l1_s1492)))+  (let ((l1_s1494 (ite l1_s1252 l1_s1493 l1_s1492)))+  (let ((l1_s1495 (xor l1_s302 l1_s1494)))+  (let ((l1_s1496 (ite l1_s1284 l1_s1495 l1_s1494)))+  (let ((l1_s1497 (xor l1_s288 l1_s1496)))+  (let ((l1_s1498 (ite l1_s1316 l1_s1497 l1_s1496)))+  (let ((l1_s1499 (xor l1_s276 l1_s1498)))+  (let ((l1_s1500 (ite l1_s1348 l1_s1499 l1_s1498)))+  (let ((l1_s1501 (xor l1_s266 l1_s1500)))+  (let ((l1_s1502 (ite l1_s1380 l1_s1501 l1_s1500)))+  (let ((l1_s1503 (xor l1_s258 l1_s1502)))+  (let ((l1_s1504 (ite l1_s1412 l1_s1503 l1_s1502)))+  (let ((l1_s1505 (xor l1_s252 l1_s1504)))+  (let ((l1_s1506 (ite l1_s1444 l1_s1505 l1_s1504)))+  (let ((l1_s1507 (xor l1_s248 l1_s1506)))+  (let ((l1_s1508 (ite l1_s1476 l1_s1507 l1_s1506)))+  (let ((l1_s1509 (xor l1_s4 l1_s243)))+  (let ((l1_s1510 (ite l1_s1028 l1_s1509 l1_s243)))+  (let ((l1_s1511 (xor l1_s486 l1_s1510)))+  (let ((l1_s1512 (ite l1_s1060 l1_s1511 l1_s1510)))+  (let ((l1_s1513 (xor l1_s456 l1_s1512)))+  (let ((l1_s1514 (ite l1_s1092 l1_s1513 l1_s1512)))+  (let ((l1_s1515 (xor l1_s428 l1_s1514)))+  (let ((l1_s1516 (ite l1_s1124 l1_s1515 l1_s1514)))+  (let ((l1_s1517 (xor l1_s402 l1_s1516)))+  (let ((l1_s1518 (ite l1_s1156 l1_s1517 l1_s1516)))+  (let ((l1_s1519 (xor l1_s378 l1_s1518)))+  (let ((l1_s1520 (ite l1_s1188 l1_s1519 l1_s1518)))+  (let ((l1_s1521 (xor l1_s356 l1_s1520)))+  (let ((l1_s1522 (ite l1_s1220 l1_s1521 l1_s1520)))+  (let ((l1_s1523 (xor l1_s336 l1_s1522)))+  (let ((l1_s1524 (ite l1_s1252 l1_s1523 l1_s1522)))+  (let ((l1_s1525 (xor l1_s318 l1_s1524)))+  (let ((l1_s1526 (ite l1_s1284 l1_s1525 l1_s1524)))+  (let ((l1_s1527 (xor l1_s302 l1_s1526)))+  (let ((l1_s1528 (ite l1_s1316 l1_s1527 l1_s1526)))+  (let ((l1_s1529 (xor l1_s288 l1_s1528)))+  (let ((l1_s1530 (ite l1_s1348 l1_s1529 l1_s1528)))+  (let ((l1_s1531 (xor l1_s276 l1_s1530)))+  (let ((l1_s1532 (ite l1_s1380 l1_s1531 l1_s1530)))+  (let ((l1_s1533 (xor l1_s266 l1_s1532)))+  (let ((l1_s1534 (ite l1_s1412 l1_s1533 l1_s1532)))+  (let ((l1_s1535 (xor l1_s258 l1_s1534)))+  (let ((l1_s1536 (ite l1_s1444 l1_s1535 l1_s1534)))+  (let ((l1_s1537 (xor l1_s252 l1_s1536)))+  (let ((l1_s1538 (ite l1_s1476 l1_s1537 l1_s1536)))+  (let ((l1_s1539 (xor l1_s248 l1_s1538)))+  (let ((l1_s1540 (ite l1_s1508 l1_s1539 l1_s1538)))+  (let ((l1_s1541 (and l1_s4 l1_s1060)))+  (let ((l1_s1542 (xor l1_s486 l1_s1541)))+  (let ((l1_s1543 (ite l1_s1092 l1_s1542 l1_s1541)))+  (let ((l1_s1544 (xor l1_s456 l1_s1543)))+  (let ((l1_s1545 (ite l1_s1124 l1_s1544 l1_s1543)))+  (let ((l1_s1546 (xor l1_s428 l1_s1545)))+  (let ((l1_s1547 (ite l1_s1156 l1_s1546 l1_s1545)))+  (let ((l1_s1548 (xor l1_s402 l1_s1547)))+  (let ((l1_s1549 (ite l1_s1188 l1_s1548 l1_s1547)))+  (let ((l1_s1550 (xor l1_s378 l1_s1549)))+  (let ((l1_s1551 (ite l1_s1220 l1_s1550 l1_s1549)))+  (let ((l1_s1552 (xor l1_s356 l1_s1551)))+  (let ((l1_s1553 (ite l1_s1252 l1_s1552 l1_s1551)))+  (let ((l1_s1554 (xor l1_s336 l1_s1553)))+  (let ((l1_s1555 (ite l1_s1284 l1_s1554 l1_s1553)))+  (let ((l1_s1556 (xor l1_s318 l1_s1555)))+  (let ((l1_s1557 (ite l1_s1316 l1_s1556 l1_s1555)))+  (let ((l1_s1558 (xor l1_s302 l1_s1557)))+  (let ((l1_s1559 (ite l1_s1348 l1_s1558 l1_s1557)))+  (let ((l1_s1560 (xor l1_s288 l1_s1559)))+  (let ((l1_s1561 (ite l1_s1380 l1_s1560 l1_s1559)))+  (let ((l1_s1562 (xor l1_s276 l1_s1561)))+  (let ((l1_s1563 (ite l1_s1412 l1_s1562 l1_s1561)))+  (let ((l1_s1564 (xor l1_s266 l1_s1563)))+  (let ((l1_s1565 (ite l1_s1444 l1_s1564 l1_s1563)))+  (let ((l1_s1566 (xor l1_s258 l1_s1565)))+  (let ((l1_s1567 (ite l1_s1476 l1_s1566 l1_s1565)))+  (let ((l1_s1568 (xor l1_s252 l1_s1567)))+  (let ((l1_s1569 (ite l1_s1508 l1_s1568 l1_s1567)))+  (let ((l1_s1570 (xor l1_s248 l1_s1569)))+  (let ((l1_s1571 (ite l1_s1540 l1_s1570 l1_s1569)))+  (let ((l1_s1572 (xor l1_s15 l1_s248)))+  (let ((l1_s1573 (ite l1_s9 l1_s1572 l1_s15)))+  (let ((l1_s1574 (xor l1_s20 l1_s252)))+  (let ((l1_s1575 (ite l1_s9 l1_s1574 l1_s20)))+  (let ((l1_s1576 (xor l1_s248 l1_s1575)))+  (let ((l1_s1577 (ite l1_s1573 l1_s1576 l1_s1575)))+  (let ((l1_s1578 (xor l1_s25 l1_s258)))+  (let ((l1_s1579 (ite l1_s9 l1_s1578 l1_s25)))+  (let ((l1_s1580 (xor l1_s252 l1_s1579)))+  (let ((l1_s1581 (ite l1_s1573 l1_s1580 l1_s1579)))+  (let ((l1_s1582 (xor l1_s248 l1_s1581)))+  (let ((l1_s1583 (ite l1_s1577 l1_s1582 l1_s1581)))+  (let ((l1_s1584 (xor l1_s30 l1_s266)))+  (let ((l1_s1585 (ite l1_s9 l1_s1584 l1_s30)))+  (let ((l1_s1586 (xor l1_s258 l1_s1585)))+  (let ((l1_s1587 (ite l1_s1573 l1_s1586 l1_s1585)))+  (let ((l1_s1588 (xor l1_s252 l1_s1587)))+  (let ((l1_s1589 (ite l1_s1577 l1_s1588 l1_s1587)))+  (let ((l1_s1590 (xor l1_s248 l1_s1589)))+  (let ((l1_s1591 (ite l1_s1583 l1_s1590 l1_s1589)))+  (let ((l1_s1592 (xor l1_s35 l1_s276)))+  (let ((l1_s1593 (ite l1_s9 l1_s1592 l1_s35)))+  (let ((l1_s1594 (xor l1_s266 l1_s1593)))+  (let ((l1_s1595 (ite l1_s1573 l1_s1594 l1_s1593)))+  (let ((l1_s1596 (xor l1_s258 l1_s1595)))+  (let ((l1_s1597 (ite l1_s1577 l1_s1596 l1_s1595)))+  (let ((l1_s1598 (xor l1_s252 l1_s1597)))+  (let ((l1_s1599 (ite l1_s1583 l1_s1598 l1_s1597)))+  (let ((l1_s1600 (xor l1_s248 l1_s1599)))+  (let ((l1_s1601 (ite l1_s1591 l1_s1600 l1_s1599)))+  (let ((l1_s1602 (xor l1_s40 l1_s288)))+  (let ((l1_s1603 (ite l1_s9 l1_s1602 l1_s40)))+  (let ((l1_s1604 (xor l1_s276 l1_s1603)))+  (let ((l1_s1605 (ite l1_s1573 l1_s1604 l1_s1603)))+  (let ((l1_s1606 (xor l1_s266 l1_s1605)))+  (let ((l1_s1607 (ite l1_s1577 l1_s1606 l1_s1605)))+  (let ((l1_s1608 (xor l1_s258 l1_s1607)))+  (let ((l1_s1609 (ite l1_s1583 l1_s1608 l1_s1607)))+  (let ((l1_s1610 (xor l1_s252 l1_s1609)))+  (let ((l1_s1611 (ite l1_s1591 l1_s1610 l1_s1609)))+  (let ((l1_s1612 (xor l1_s248 l1_s1611)))+  (let ((l1_s1613 (ite l1_s1601 l1_s1612 l1_s1611)))+  (let ((l1_s1614 (xor l1_s45 l1_s302)))+  (let ((l1_s1615 (ite l1_s9 l1_s1614 l1_s45)))+  (let ((l1_s1616 (xor l1_s288 l1_s1615)))+  (let ((l1_s1617 (ite l1_s1573 l1_s1616 l1_s1615)))+  (let ((l1_s1618 (xor l1_s276 l1_s1617)))+  (let ((l1_s1619 (ite l1_s1577 l1_s1618 l1_s1617)))+  (let ((l1_s1620 (xor l1_s266 l1_s1619)))+  (let ((l1_s1621 (ite l1_s1583 l1_s1620 l1_s1619)))+  (let ((l1_s1622 (xor l1_s258 l1_s1621)))+  (let ((l1_s1623 (ite l1_s1591 l1_s1622 l1_s1621)))+  (let ((l1_s1624 (xor l1_s252 l1_s1623)))+  (let ((l1_s1625 (ite l1_s1601 l1_s1624 l1_s1623)))+  (let ((l1_s1626 (xor l1_s248 l1_s1625)))+  (let ((l1_s1627 (ite l1_s1613 l1_s1626 l1_s1625)))+  (let ((l1_s1628 (xor l1_s50 l1_s318)))+  (let ((l1_s1629 (ite l1_s9 l1_s1628 l1_s50)))+  (let ((l1_s1630 (xor l1_s302 l1_s1629)))+  (let ((l1_s1631 (ite l1_s1573 l1_s1630 l1_s1629)))+  (let ((l1_s1632 (xor l1_s288 l1_s1631)))+  (let ((l1_s1633 (ite l1_s1577 l1_s1632 l1_s1631)))+  (let ((l1_s1634 (xor l1_s276 l1_s1633)))+  (let ((l1_s1635 (ite l1_s1583 l1_s1634 l1_s1633)))+  (let ((l1_s1636 (xor l1_s266 l1_s1635)))+  (let ((l1_s1637 (ite l1_s1591 l1_s1636 l1_s1635)))+  (let ((l1_s1638 (xor l1_s258 l1_s1637)))+  (let ((l1_s1639 (ite l1_s1601 l1_s1638 l1_s1637)))+  (let ((l1_s1640 (xor l1_s252 l1_s1639)))+  (let ((l1_s1641 (ite l1_s1613 l1_s1640 l1_s1639)))+  (let ((l1_s1642 (xor l1_s248 l1_s1641)))+  (let ((l1_s1643 (ite l1_s1627 l1_s1642 l1_s1641)))+  (let ((l1_s1644 (xor l1_s55 l1_s336)))+  (let ((l1_s1645 (ite l1_s9 l1_s1644 l1_s55)))+  (let ((l1_s1646 (xor l1_s318 l1_s1645)))+  (let ((l1_s1647 (ite l1_s1573 l1_s1646 l1_s1645)))+  (let ((l1_s1648 (xor l1_s302 l1_s1647)))+  (let ((l1_s1649 (ite l1_s1577 l1_s1648 l1_s1647)))+  (let ((l1_s1650 (xor l1_s288 l1_s1649)))+  (let ((l1_s1651 (ite l1_s1583 l1_s1650 l1_s1649)))+  (let ((l1_s1652 (xor l1_s276 l1_s1651)))+  (let ((l1_s1653 (ite l1_s1591 l1_s1652 l1_s1651)))+  (let ((l1_s1654 (xor l1_s266 l1_s1653)))+  (let ((l1_s1655 (ite l1_s1601 l1_s1654 l1_s1653)))+  (let ((l1_s1656 (xor l1_s258 l1_s1655)))+  (let ((l1_s1657 (ite l1_s1613 l1_s1656 l1_s1655)))+  (let ((l1_s1658 (xor l1_s252 l1_s1657)))+  (let ((l1_s1659 (ite l1_s1627 l1_s1658 l1_s1657)))+  (let ((l1_s1660 (xor l1_s248 l1_s1659)))+  (let ((l1_s1661 (ite l1_s1643 l1_s1660 l1_s1659)))+  (let ((l1_s1662 (xor l1_s60 l1_s356)))+  (let ((l1_s1663 (ite l1_s9 l1_s1662 l1_s60)))+  (let ((l1_s1664 (xor l1_s336 l1_s1663)))+  (let ((l1_s1665 (ite l1_s1573 l1_s1664 l1_s1663)))+  (let ((l1_s1666 (xor l1_s318 l1_s1665)))+  (let ((l1_s1667 (ite l1_s1577 l1_s1666 l1_s1665)))+  (let ((l1_s1668 (xor l1_s302 l1_s1667)))+  (let ((l1_s1669 (ite l1_s1583 l1_s1668 l1_s1667)))+  (let ((l1_s1670 (xor l1_s288 l1_s1669)))+  (let ((l1_s1671 (ite l1_s1591 l1_s1670 l1_s1669)))+  (let ((l1_s1672 (xor l1_s276 l1_s1671)))+  (let ((l1_s1673 (ite l1_s1601 l1_s1672 l1_s1671)))+  (let ((l1_s1674 (xor l1_s266 l1_s1673)))+  (let ((l1_s1675 (ite l1_s1613 l1_s1674 l1_s1673)))+  (let ((l1_s1676 (xor l1_s258 l1_s1675)))+  (let ((l1_s1677 (ite l1_s1627 l1_s1676 l1_s1675)))+  (let ((l1_s1678 (xor l1_s252 l1_s1677)))+  (let ((l1_s1679 (ite l1_s1643 l1_s1678 l1_s1677)))+  (let ((l1_s1680 (xor l1_s248 l1_s1679)))+  (let ((l1_s1681 (ite l1_s1661 l1_s1680 l1_s1679)))+  (let ((l1_s1682 (xor l1_s65 l1_s378)))+  (let ((l1_s1683 (ite l1_s9 l1_s1682 l1_s65)))+  (let ((l1_s1684 (xor l1_s356 l1_s1683)))+  (let ((l1_s1685 (ite l1_s1573 l1_s1684 l1_s1683)))+  (let ((l1_s1686 (xor l1_s336 l1_s1685)))+  (let ((l1_s1687 (ite l1_s1577 l1_s1686 l1_s1685)))+  (let ((l1_s1688 (xor l1_s318 l1_s1687)))+  (let ((l1_s1689 (ite l1_s1583 l1_s1688 l1_s1687)))+  (let ((l1_s1690 (xor l1_s302 l1_s1689)))+  (let ((l1_s1691 (ite l1_s1591 l1_s1690 l1_s1689)))+  (let ((l1_s1692 (xor l1_s288 l1_s1691)))+  (let ((l1_s1693 (ite l1_s1601 l1_s1692 l1_s1691)))+  (let ((l1_s1694 (xor l1_s276 l1_s1693)))+  (let ((l1_s1695 (ite l1_s1613 l1_s1694 l1_s1693)))+  (let ((l1_s1696 (xor l1_s266 l1_s1695)))+  (let ((l1_s1697 (ite l1_s1627 l1_s1696 l1_s1695)))+  (let ((l1_s1698 (xor l1_s258 l1_s1697)))+  (let ((l1_s1699 (ite l1_s1643 l1_s1698 l1_s1697)))+  (let ((l1_s1700 (xor l1_s252 l1_s1699)))+  (let ((l1_s1701 (ite l1_s1661 l1_s1700 l1_s1699)))+  (let ((l1_s1702 (xor l1_s248 l1_s1701)))+  (let ((l1_s1703 (ite l1_s1681 l1_s1702 l1_s1701)))+  (let ((l1_s1704 (xor l1_s70 l1_s402)))+  (let ((l1_s1705 (ite l1_s9 l1_s1704 l1_s70)))+  (let ((l1_s1706 (xor l1_s378 l1_s1705)))+  (let ((l1_s1707 (ite l1_s1573 l1_s1706 l1_s1705)))+  (let ((l1_s1708 (xor l1_s356 l1_s1707)))+  (let ((l1_s1709 (ite l1_s1577 l1_s1708 l1_s1707)))+  (let ((l1_s1710 (xor l1_s336 l1_s1709)))+  (let ((l1_s1711 (ite l1_s1583 l1_s1710 l1_s1709)))+  (let ((l1_s1712 (xor l1_s318 l1_s1711)))+  (let ((l1_s1713 (ite l1_s1591 l1_s1712 l1_s1711)))+  (let ((l1_s1714 (xor l1_s302 l1_s1713)))+  (let ((l1_s1715 (ite l1_s1601 l1_s1714 l1_s1713)))+  (let ((l1_s1716 (xor l1_s288 l1_s1715)))+  (let ((l1_s1717 (ite l1_s1613 l1_s1716 l1_s1715)))+  (let ((l1_s1718 (xor l1_s276 l1_s1717)))+  (let ((l1_s1719 (ite l1_s1627 l1_s1718 l1_s1717)))+  (let ((l1_s1720 (xor l1_s266 l1_s1719)))+  (let ((l1_s1721 (ite l1_s1643 l1_s1720 l1_s1719)))+  (let ((l1_s1722 (xor l1_s258 l1_s1721)))+  (let ((l1_s1723 (ite l1_s1661 l1_s1722 l1_s1721)))+  (let ((l1_s1724 (xor l1_s252 l1_s1723)))+  (let ((l1_s1725 (ite l1_s1681 l1_s1724 l1_s1723)))+  (let ((l1_s1726 (xor l1_s248 l1_s1725)))+  (let ((l1_s1727 (ite l1_s1703 l1_s1726 l1_s1725)))+  (let ((l1_s1728 (xor l1_s75 l1_s428)))+  (let ((l1_s1729 (ite l1_s9 l1_s1728 l1_s75)))+  (let ((l1_s1730 (xor l1_s402 l1_s1729)))+  (let ((l1_s1731 (ite l1_s1573 l1_s1730 l1_s1729)))+  (let ((l1_s1732 (xor l1_s378 l1_s1731)))+  (let ((l1_s1733 (ite l1_s1577 l1_s1732 l1_s1731)))+  (let ((l1_s1734 (xor l1_s356 l1_s1733)))+  (let ((l1_s1735 (ite l1_s1583 l1_s1734 l1_s1733)))+  (let ((l1_s1736 (xor l1_s336 l1_s1735)))+  (let ((l1_s1737 (ite l1_s1591 l1_s1736 l1_s1735)))+  (let ((l1_s1738 (xor l1_s318 l1_s1737)))+  (let ((l1_s1739 (ite l1_s1601 l1_s1738 l1_s1737)))+  (let ((l1_s1740 (xor l1_s302 l1_s1739)))+  (let ((l1_s1741 (ite l1_s1613 l1_s1740 l1_s1739)))+  (let ((l1_s1742 (xor l1_s288 l1_s1741)))+  (let ((l1_s1743 (ite l1_s1627 l1_s1742 l1_s1741)))+  (let ((l1_s1744 (xor l1_s276 l1_s1743)))+  (let ((l1_s1745 (ite l1_s1643 l1_s1744 l1_s1743)))+  (let ((l1_s1746 (xor l1_s266 l1_s1745)))+  (let ((l1_s1747 (ite l1_s1661 l1_s1746 l1_s1745)))+  (let ((l1_s1748 (xor l1_s258 l1_s1747)))+  (let ((l1_s1749 (ite l1_s1681 l1_s1748 l1_s1747)))+  (let ((l1_s1750 (xor l1_s252 l1_s1749)))+  (let ((l1_s1751 (ite l1_s1703 l1_s1750 l1_s1749)))+  (let ((l1_s1752 (xor l1_s248 l1_s1751)))+  (let ((l1_s1753 (ite l1_s1727 l1_s1752 l1_s1751)))+  (let ((l1_s1754 (xor l1_s80 l1_s456)))+  (let ((l1_s1755 (ite l1_s9 l1_s1754 l1_s80)))+  (let ((l1_s1756 (xor l1_s428 l1_s1755)))+  (let ((l1_s1757 (ite l1_s1573 l1_s1756 l1_s1755)))+  (let ((l1_s1758 (xor l1_s402 l1_s1757)))+  (let ((l1_s1759 (ite l1_s1577 l1_s1758 l1_s1757)))+  (let ((l1_s1760 (xor l1_s378 l1_s1759)))+  (let ((l1_s1761 (ite l1_s1583 l1_s1760 l1_s1759)))+  (let ((l1_s1762 (xor l1_s356 l1_s1761)))+  (let ((l1_s1763 (ite l1_s1591 l1_s1762 l1_s1761)))+  (let ((l1_s1764 (xor l1_s336 l1_s1763)))+  (let ((l1_s1765 (ite l1_s1601 l1_s1764 l1_s1763)))+  (let ((l1_s1766 (xor l1_s318 l1_s1765)))+  (let ((l1_s1767 (ite l1_s1613 l1_s1766 l1_s1765)))+  (let ((l1_s1768 (xor l1_s302 l1_s1767)))+  (let ((l1_s1769 (ite l1_s1627 l1_s1768 l1_s1767)))+  (let ((l1_s1770 (xor l1_s288 l1_s1769)))+  (let ((l1_s1771 (ite l1_s1643 l1_s1770 l1_s1769)))+  (let ((l1_s1772 (xor l1_s276 l1_s1771)))+  (let ((l1_s1773 (ite l1_s1661 l1_s1772 l1_s1771)))+  (let ((l1_s1774 (xor l1_s266 l1_s1773)))+  (let ((l1_s1775 (ite l1_s1681 l1_s1774 l1_s1773)))+  (let ((l1_s1776 (xor l1_s258 l1_s1775)))+  (let ((l1_s1777 (ite l1_s1703 l1_s1776 l1_s1775)))+  (let ((l1_s1778 (xor l1_s252 l1_s1777)))+  (let ((l1_s1779 (ite l1_s1727 l1_s1778 l1_s1777)))+  (let ((l1_s1780 (xor l1_s248 l1_s1779)))+  (let ((l1_s1781 (ite l1_s1753 l1_s1780 l1_s1779)))+  (let ((l1_s1782 (xor l1_s85 l1_s486)))+  (let ((l1_s1783 (ite l1_s9 l1_s1782 l1_s85)))+  (let ((l1_s1784 (xor l1_s456 l1_s1783)))+  (let ((l1_s1785 (ite l1_s1573 l1_s1784 l1_s1783)))+  (let ((l1_s1786 (xor l1_s428 l1_s1785)))+  (let ((l1_s1787 (ite l1_s1577 l1_s1786 l1_s1785)))+  (let ((l1_s1788 (xor l1_s402 l1_s1787)))+  (let ((l1_s1789 (ite l1_s1583 l1_s1788 l1_s1787)))+  (let ((l1_s1790 (xor l1_s378 l1_s1789)))+  (let ((l1_s1791 (ite l1_s1591 l1_s1790 l1_s1789)))+  (let ((l1_s1792 (xor l1_s356 l1_s1791)))+  (let ((l1_s1793 (ite l1_s1601 l1_s1792 l1_s1791)))+  (let ((l1_s1794 (xor l1_s336 l1_s1793)))+  (let ((l1_s1795 (ite l1_s1613 l1_s1794 l1_s1793)))+  (let ((l1_s1796 (xor l1_s318 l1_s1795)))+  (let ((l1_s1797 (ite l1_s1627 l1_s1796 l1_s1795)))+  (let ((l1_s1798 (xor l1_s302 l1_s1797)))+  (let ((l1_s1799 (ite l1_s1643 l1_s1798 l1_s1797)))+  (let ((l1_s1800 (xor l1_s288 l1_s1799)))+  (let ((l1_s1801 (ite l1_s1661 l1_s1800 l1_s1799)))+  (let ((l1_s1802 (xor l1_s276 l1_s1801)))+  (let ((l1_s1803 (ite l1_s1681 l1_s1802 l1_s1801)))+  (let ((l1_s1804 (xor l1_s266 l1_s1803)))+  (let ((l1_s1805 (ite l1_s1703 l1_s1804 l1_s1803)))+  (let ((l1_s1806 (xor l1_s258 l1_s1805)))+  (let ((l1_s1807 (ite l1_s1727 l1_s1806 l1_s1805)))+  (let ((l1_s1808 (xor l1_s252 l1_s1807)))+  (let ((l1_s1809 (ite l1_s1753 l1_s1808 l1_s1807)))+  (let ((l1_s1810 (xor l1_s248 l1_s1809)))+  (let ((l1_s1811 (ite l1_s1781 l1_s1810 l1_s1809)))+  (let ((l1_s1812 (xor l1_s4 l1_s90)))+  (let ((l1_s1813 (ite l1_s9 l1_s1812 l1_s90)))+  (let ((l1_s1814 (xor l1_s486 l1_s1813)))+  (let ((l1_s1815 (ite l1_s1573 l1_s1814 l1_s1813)))+  (let ((l1_s1816 (xor l1_s456 l1_s1815)))+  (let ((l1_s1817 (ite l1_s1577 l1_s1816 l1_s1815)))+  (let ((l1_s1818 (xor l1_s428 l1_s1817)))+  (let ((l1_s1819 (ite l1_s1583 l1_s1818 l1_s1817)))+  (let ((l1_s1820 (xor l1_s402 l1_s1819)))+  (let ((l1_s1821 (ite l1_s1591 l1_s1820 l1_s1819)))+  (let ((l1_s1822 (xor l1_s378 l1_s1821)))+  (let ((l1_s1823 (ite l1_s1601 l1_s1822 l1_s1821)))+  (let ((l1_s1824 (xor l1_s356 l1_s1823)))+  (let ((l1_s1825 (ite l1_s1613 l1_s1824 l1_s1823)))+  (let ((l1_s1826 (xor l1_s336 l1_s1825)))+  (let ((l1_s1827 (ite l1_s1627 l1_s1826 l1_s1825)))+  (let ((l1_s1828 (xor l1_s318 l1_s1827)))+  (let ((l1_s1829 (ite l1_s1643 l1_s1828 l1_s1827)))+  (let ((l1_s1830 (xor l1_s302 l1_s1829)))+  (let ((l1_s1831 (ite l1_s1661 l1_s1830 l1_s1829)))+  (let ((l1_s1832 (xor l1_s288 l1_s1831)))+  (let ((l1_s1833 (ite l1_s1681 l1_s1832 l1_s1831)))+  (let ((l1_s1834 (xor l1_s276 l1_s1833)))+  (let ((l1_s1835 (ite l1_s1703 l1_s1834 l1_s1833)))+  (let ((l1_s1836 (xor l1_s266 l1_s1835)))+  (let ((l1_s1837 (ite l1_s1727 l1_s1836 l1_s1835)))+  (let ((l1_s1838 (xor l1_s258 l1_s1837)))+  (let ((l1_s1839 (ite l1_s1753 l1_s1838 l1_s1837)))+  (let ((l1_s1840 (xor l1_s252 l1_s1839)))+  (let ((l1_s1841 (ite l1_s1781 l1_s1840 l1_s1839)))+  (let ((l1_s1842 (xor l1_s248 l1_s1841)))+  (let ((l1_s1843 (ite l1_s1811 l1_s1842 l1_s1841)))+  (let ((l1_s1844 (xor l1_s4 l1_s95)))+  (let ((l1_s1845 (ite l1_s1573 l1_s1844 l1_s95)))+  (let ((l1_s1846 (xor l1_s486 l1_s1845)))+  (let ((l1_s1847 (ite l1_s1577 l1_s1846 l1_s1845)))+  (let ((l1_s1848 (xor l1_s456 l1_s1847)))+  (let ((l1_s1849 (ite l1_s1583 l1_s1848 l1_s1847)))+  (let ((l1_s1850 (xor l1_s428 l1_s1849)))+  (let ((l1_s1851 (ite l1_s1591 l1_s1850 l1_s1849)))+  (let ((l1_s1852 (xor l1_s402 l1_s1851)))+  (let ((l1_s1853 (ite l1_s1601 l1_s1852 l1_s1851)))+  (let ((l1_s1854 (xor l1_s378 l1_s1853)))+  (let ((l1_s1855 (ite l1_s1613 l1_s1854 l1_s1853)))+  (let ((l1_s1856 (xor l1_s356 l1_s1855)))+  (let ((l1_s1857 (ite l1_s1627 l1_s1856 l1_s1855)))+  (let ((l1_s1858 (xor l1_s336 l1_s1857)))+  (let ((l1_s1859 (ite l1_s1643 l1_s1858 l1_s1857)))+  (let ((l1_s1860 (xor l1_s318 l1_s1859)))+  (let ((l1_s1861 (ite l1_s1661 l1_s1860 l1_s1859)))+  (let ((l1_s1862 (xor l1_s302 l1_s1861)))+  (let ((l1_s1863 (ite l1_s1681 l1_s1862 l1_s1861)))+  (let ((l1_s1864 (xor l1_s288 l1_s1863)))+  (let ((l1_s1865 (ite l1_s1703 l1_s1864 l1_s1863)))+  (let ((l1_s1866 (xor l1_s276 l1_s1865)))+  (let ((l1_s1867 (ite l1_s1727 l1_s1866 l1_s1865)))+  (let ((l1_s1868 (xor l1_s266 l1_s1867)))+  (let ((l1_s1869 (ite l1_s1753 l1_s1868 l1_s1867)))+  (let ((l1_s1870 (xor l1_s258 l1_s1869)))+  (let ((l1_s1871 (ite l1_s1781 l1_s1870 l1_s1869)))+  (let ((l1_s1872 (xor l1_s252 l1_s1871)))+  (let ((l1_s1873 (ite l1_s1811 l1_s1872 l1_s1871)))+  (let ((l1_s1874 (xor l1_s248 l1_s1873)))+  (let ((l1_s1875 (ite l1_s1843 l1_s1874 l1_s1873)))+  (let ((l1_s1876 (xor l1_s4 l1_s100)))+  (let ((l1_s1877 (ite l1_s1577 l1_s1876 l1_s100)))+  (let ((l1_s1878 (xor l1_s486 l1_s1877)))+  (let ((l1_s1879 (ite l1_s1583 l1_s1878 l1_s1877)))+  (let ((l1_s1880 (xor l1_s456 l1_s1879)))+  (let ((l1_s1881 (ite l1_s1591 l1_s1880 l1_s1879)))+  (let ((l1_s1882 (xor l1_s428 l1_s1881)))+  (let ((l1_s1883 (ite l1_s1601 l1_s1882 l1_s1881)))+  (let ((l1_s1884 (xor l1_s402 l1_s1883)))+  (let ((l1_s1885 (ite l1_s1613 l1_s1884 l1_s1883)))+  (let ((l1_s1886 (xor l1_s378 l1_s1885)))+  (let ((l1_s1887 (ite l1_s1627 l1_s1886 l1_s1885)))+  (let ((l1_s1888 (xor l1_s356 l1_s1887)))+  (let ((l1_s1889 (ite l1_s1643 l1_s1888 l1_s1887)))+  (let ((l1_s1890 (xor l1_s336 l1_s1889)))+  (let ((l1_s1891 (ite l1_s1661 l1_s1890 l1_s1889)))+  (let ((l1_s1892 (xor l1_s318 l1_s1891)))+  (let ((l1_s1893 (ite l1_s1681 l1_s1892 l1_s1891)))+  (let ((l1_s1894 (xor l1_s302 l1_s1893)))+  (let ((l1_s1895 (ite l1_s1703 l1_s1894 l1_s1893)))+  (let ((l1_s1896 (xor l1_s288 l1_s1895)))+  (let ((l1_s1897 (ite l1_s1727 l1_s1896 l1_s1895)))+  (let ((l1_s1898 (xor l1_s276 l1_s1897)))+  (let ((l1_s1899 (ite l1_s1753 l1_s1898 l1_s1897)))+  (let ((l1_s1900 (xor l1_s266 l1_s1899)))+  (let ((l1_s1901 (ite l1_s1781 l1_s1900 l1_s1899)))+  (let ((l1_s1902 (xor l1_s258 l1_s1901)))+  (let ((l1_s1903 (ite l1_s1811 l1_s1902 l1_s1901)))+  (let ((l1_s1904 (xor l1_s252 l1_s1903)))+  (let ((l1_s1905 (ite l1_s1843 l1_s1904 l1_s1903)))+  (let ((l1_s1906 (xor l1_s248 l1_s1905)))+  (let ((l1_s1907 (ite l1_s1875 l1_s1906 l1_s1905)))+  (let ((l1_s1908 (xor l1_s4 l1_s105)))+  (let ((l1_s1909 (ite l1_s1583 l1_s1908 l1_s105)))+  (let ((l1_s1910 (xor l1_s486 l1_s1909)))+  (let ((l1_s1911 (ite l1_s1591 l1_s1910 l1_s1909)))+  (let ((l1_s1912 (xor l1_s456 l1_s1911)))+  (let ((l1_s1913 (ite l1_s1601 l1_s1912 l1_s1911)))+  (let ((l1_s1914 (xor l1_s428 l1_s1913)))+  (let ((l1_s1915 (ite l1_s1613 l1_s1914 l1_s1913)))+  (let ((l1_s1916 (xor l1_s402 l1_s1915)))+  (let ((l1_s1917 (ite l1_s1627 l1_s1916 l1_s1915)))+  (let ((l1_s1918 (xor l1_s378 l1_s1917)))+  (let ((l1_s1919 (ite l1_s1643 l1_s1918 l1_s1917)))+  (let ((l1_s1920 (xor l1_s356 l1_s1919)))+  (let ((l1_s1921 (ite l1_s1661 l1_s1920 l1_s1919)))+  (let ((l1_s1922 (xor l1_s336 l1_s1921)))+  (let ((l1_s1923 (ite l1_s1681 l1_s1922 l1_s1921)))+  (let ((l1_s1924 (xor l1_s318 l1_s1923)))+  (let ((l1_s1925 (ite l1_s1703 l1_s1924 l1_s1923)))+  (let ((l1_s1926 (xor l1_s302 l1_s1925)))+  (let ((l1_s1927 (ite l1_s1727 l1_s1926 l1_s1925)))+  (let ((l1_s1928 (xor l1_s288 l1_s1927)))+  (let ((l1_s1929 (ite l1_s1753 l1_s1928 l1_s1927)))+  (let ((l1_s1930 (xor l1_s276 l1_s1929)))+  (let ((l1_s1931 (ite l1_s1781 l1_s1930 l1_s1929)))+  (let ((l1_s1932 (xor l1_s266 l1_s1931)))+  (let ((l1_s1933 (ite l1_s1811 l1_s1932 l1_s1931)))+  (let ((l1_s1934 (xor l1_s258 l1_s1933)))+  (let ((l1_s1935 (ite l1_s1843 l1_s1934 l1_s1933)))+  (let ((l1_s1936 (xor l1_s252 l1_s1935)))+  (let ((l1_s1937 (ite l1_s1875 l1_s1936 l1_s1935)))+  (let ((l1_s1938 (xor l1_s248 l1_s1937)))+  (let ((l1_s1939 (ite l1_s1907 l1_s1938 l1_s1937)))+  (let ((l1_s1940 (xor l1_s4 l1_s110)))+  (let ((l1_s1941 (ite l1_s1591 l1_s1940 l1_s110)))+  (let ((l1_s1942 (xor l1_s486 l1_s1941)))+  (let ((l1_s1943 (ite l1_s1601 l1_s1942 l1_s1941)))+  (let ((l1_s1944 (xor l1_s456 l1_s1943)))+  (let ((l1_s1945 (ite l1_s1613 l1_s1944 l1_s1943)))+  (let ((l1_s1946 (xor l1_s428 l1_s1945)))+  (let ((l1_s1947 (ite l1_s1627 l1_s1946 l1_s1945)))+  (let ((l1_s1948 (xor l1_s402 l1_s1947)))+  (let ((l1_s1949 (ite l1_s1643 l1_s1948 l1_s1947)))+  (let ((l1_s1950 (xor l1_s378 l1_s1949)))+  (let ((l1_s1951 (ite l1_s1661 l1_s1950 l1_s1949)))+  (let ((l1_s1952 (xor l1_s356 l1_s1951)))+  (let ((l1_s1953 (ite l1_s1681 l1_s1952 l1_s1951)))+  (let ((l1_s1954 (xor l1_s336 l1_s1953)))+  (let ((l1_s1955 (ite l1_s1703 l1_s1954 l1_s1953)))+  (let ((l1_s1956 (xor l1_s318 l1_s1955)))+  (let ((l1_s1957 (ite l1_s1727 l1_s1956 l1_s1955)))+  (let ((l1_s1958 (xor l1_s302 l1_s1957)))+  (let ((l1_s1959 (ite l1_s1753 l1_s1958 l1_s1957)))+  (let ((l1_s1960 (xor l1_s288 l1_s1959)))+  (let ((l1_s1961 (ite l1_s1781 l1_s1960 l1_s1959)))+  (let ((l1_s1962 (xor l1_s276 l1_s1961)))+  (let ((l1_s1963 (ite l1_s1811 l1_s1962 l1_s1961)))+  (let ((l1_s1964 (xor l1_s266 l1_s1963)))+  (let ((l1_s1965 (ite l1_s1843 l1_s1964 l1_s1963)))+  (let ((l1_s1966 (xor l1_s258 l1_s1965)))+  (let ((l1_s1967 (ite l1_s1875 l1_s1966 l1_s1965)))+  (let ((l1_s1968 (xor l1_s252 l1_s1967)))+  (let ((l1_s1969 (ite l1_s1907 l1_s1968 l1_s1967)))+  (let ((l1_s1970 (xor l1_s248 l1_s1969)))+  (let ((l1_s1971 (ite l1_s1939 l1_s1970 l1_s1969)))+  (let ((l1_s1972 (xor l1_s4 l1_s115)))+  (let ((l1_s1973 (ite l1_s1601 l1_s1972 l1_s115)))+  (let ((l1_s1974 (xor l1_s486 l1_s1973)))+  (let ((l1_s1975 (ite l1_s1613 l1_s1974 l1_s1973)))+  (let ((l1_s1976 (xor l1_s456 l1_s1975)))+  (let ((l1_s1977 (ite l1_s1627 l1_s1976 l1_s1975)))+  (let ((l1_s1978 (xor l1_s428 l1_s1977)))+  (let ((l1_s1979 (ite l1_s1643 l1_s1978 l1_s1977)))+  (let ((l1_s1980 (xor l1_s402 l1_s1979)))+  (let ((l1_s1981 (ite l1_s1661 l1_s1980 l1_s1979)))+  (let ((l1_s1982 (xor l1_s378 l1_s1981)))+  (let ((l1_s1983 (ite l1_s1681 l1_s1982 l1_s1981)))+  (let ((l1_s1984 (xor l1_s356 l1_s1983)))+  (let ((l1_s1985 (ite l1_s1703 l1_s1984 l1_s1983)))+  (let ((l1_s1986 (xor l1_s336 l1_s1985)))+  (let ((l1_s1987 (ite l1_s1727 l1_s1986 l1_s1985)))+  (let ((l1_s1988 (xor l1_s318 l1_s1987)))+  (let ((l1_s1989 (ite l1_s1753 l1_s1988 l1_s1987)))+  (let ((l1_s1990 (xor l1_s302 l1_s1989)))+  (let ((l1_s1991 (ite l1_s1781 l1_s1990 l1_s1989)))+  (let ((l1_s1992 (xor l1_s288 l1_s1991)))+  (let ((l1_s1993 (ite l1_s1811 l1_s1992 l1_s1991)))+  (let ((l1_s1994 (xor l1_s276 l1_s1993)))+  (let ((l1_s1995 (ite l1_s1843 l1_s1994 l1_s1993)))+  (let ((l1_s1996 (xor l1_s266 l1_s1995)))+  (let ((l1_s1997 (ite l1_s1875 l1_s1996 l1_s1995)))+  (let ((l1_s1998 (xor l1_s258 l1_s1997)))+  (let ((l1_s1999 (ite l1_s1907 l1_s1998 l1_s1997)))+  (let ((l1_s2000 (xor l1_s252 l1_s1999)))+  (let ((l1_s2001 (ite l1_s1939 l1_s2000 l1_s1999)))+  (let ((l1_s2002 (xor l1_s248 l1_s2001)))+  (let ((l1_s2003 (ite l1_s1971 l1_s2002 l1_s2001)))+  (let ((l1_s2004 (xor l1_s4 l1_s120)))+  (let ((l1_s2005 (ite l1_s1613 l1_s2004 l1_s120)))+  (let ((l1_s2006 (xor l1_s486 l1_s2005)))+  (let ((l1_s2007 (ite l1_s1627 l1_s2006 l1_s2005)))+  (let ((l1_s2008 (xor l1_s456 l1_s2007)))+  (let ((l1_s2009 (ite l1_s1643 l1_s2008 l1_s2007)))+  (let ((l1_s2010 (xor l1_s428 l1_s2009)))+  (let ((l1_s2011 (ite l1_s1661 l1_s2010 l1_s2009)))+  (let ((l1_s2012 (xor l1_s402 l1_s2011)))+  (let ((l1_s2013 (ite l1_s1681 l1_s2012 l1_s2011)))+  (let ((l1_s2014 (xor l1_s378 l1_s2013)))+  (let ((l1_s2015 (ite l1_s1703 l1_s2014 l1_s2013)))+  (let ((l1_s2016 (xor l1_s356 l1_s2015)))+  (let ((l1_s2017 (ite l1_s1727 l1_s2016 l1_s2015)))+  (let ((l1_s2018 (xor l1_s336 l1_s2017)))+  (let ((l1_s2019 (ite l1_s1753 l1_s2018 l1_s2017)))+  (let ((l1_s2020 (xor l1_s318 l1_s2019)))+  (let ((l1_s2021 (ite l1_s1781 l1_s2020 l1_s2019)))+  (let ((l1_s2022 (xor l1_s302 l1_s2021)))+  (let ((l1_s2023 (ite l1_s1811 l1_s2022 l1_s2021)))+  (let ((l1_s2024 (xor l1_s288 l1_s2023)))+  (let ((l1_s2025 (ite l1_s1843 l1_s2024 l1_s2023)))+  (let ((l1_s2026 (xor l1_s276 l1_s2025)))+  (let ((l1_s2027 (ite l1_s1875 l1_s2026 l1_s2025)))+  (let ((l1_s2028 (xor l1_s266 l1_s2027)))+  (let ((l1_s2029 (ite l1_s1907 l1_s2028 l1_s2027)))+  (let ((l1_s2030 (xor l1_s258 l1_s2029)))+  (let ((l1_s2031 (ite l1_s1939 l1_s2030 l1_s2029)))+  (let ((l1_s2032 (xor l1_s252 l1_s2031)))+  (let ((l1_s2033 (ite l1_s1971 l1_s2032 l1_s2031)))+  (let ((l1_s2034 (xor l1_s248 l1_s2033)))+  (let ((l1_s2035 (ite l1_s2003 l1_s2034 l1_s2033)))+  (let ((l1_s2036 (xor l1_s4 l1_s125)))+  (let ((l1_s2037 (ite l1_s1627 l1_s2036 l1_s125)))+  (let ((l1_s2038 (xor l1_s486 l1_s2037)))+  (let ((l1_s2039 (ite l1_s1643 l1_s2038 l1_s2037)))+  (let ((l1_s2040 (xor l1_s456 l1_s2039)))+  (let ((l1_s2041 (ite l1_s1661 l1_s2040 l1_s2039)))+  (let ((l1_s2042 (xor l1_s428 l1_s2041)))+  (let ((l1_s2043 (ite l1_s1681 l1_s2042 l1_s2041)))+  (let ((l1_s2044 (xor l1_s402 l1_s2043)))+  (let ((l1_s2045 (ite l1_s1703 l1_s2044 l1_s2043)))+  (let ((l1_s2046 (xor l1_s378 l1_s2045)))+  (let ((l1_s2047 (ite l1_s1727 l1_s2046 l1_s2045)))+  (let ((l1_s2048 (xor l1_s356 l1_s2047)))+  (let ((l1_s2049 (ite l1_s1753 l1_s2048 l1_s2047)))+  (let ((l1_s2050 (xor l1_s336 l1_s2049)))+  (let ((l1_s2051 (ite l1_s1781 l1_s2050 l1_s2049)))+  (let ((l1_s2052 (xor l1_s318 l1_s2051)))+  (let ((l1_s2053 (ite l1_s1811 l1_s2052 l1_s2051)))+  (let ((l1_s2054 (xor l1_s302 l1_s2053)))+  (let ((l1_s2055 (ite l1_s1843 l1_s2054 l1_s2053)))+  (let ((l1_s2056 (xor l1_s288 l1_s2055)))+  (let ((l1_s2057 (ite l1_s1875 l1_s2056 l1_s2055)))+  (let ((l1_s2058 (xor l1_s276 l1_s2057)))+  (let ((l1_s2059 (ite l1_s1907 l1_s2058 l1_s2057)))+  (let ((l1_s2060 (xor l1_s266 l1_s2059)))+  (let ((l1_s2061 (ite l1_s1939 l1_s2060 l1_s2059)))+  (let ((l1_s2062 (xor l1_s258 l1_s2061)))+  (let ((l1_s2063 (ite l1_s1971 l1_s2062 l1_s2061)))+  (let ((l1_s2064 (xor l1_s252 l1_s2063)))+  (let ((l1_s2065 (ite l1_s2003 l1_s2064 l1_s2063)))+  (let ((l1_s2066 (xor l1_s248 l1_s2065)))+  (let ((l1_s2067 (ite l1_s2035 l1_s2066 l1_s2065)))+  (let ((l1_s2068 (xor l1_s4 l1_s130)))+  (let ((l1_s2069 (ite l1_s1643 l1_s2068 l1_s130)))+  (let ((l1_s2070 (xor l1_s486 l1_s2069)))+  (let ((l1_s2071 (ite l1_s1661 l1_s2070 l1_s2069)))+  (let ((l1_s2072 (xor l1_s456 l1_s2071)))+  (let ((l1_s2073 (ite l1_s1681 l1_s2072 l1_s2071)))+  (let ((l1_s2074 (xor l1_s428 l1_s2073)))+  (let ((l1_s2075 (ite l1_s1703 l1_s2074 l1_s2073)))+  (let ((l1_s2076 (xor l1_s402 l1_s2075)))+  (let ((l1_s2077 (ite l1_s1727 l1_s2076 l1_s2075)))+  (let ((l1_s2078 (xor l1_s378 l1_s2077)))+  (let ((l1_s2079 (ite l1_s1753 l1_s2078 l1_s2077)))+  (let ((l1_s2080 (xor l1_s356 l1_s2079)))+  (let ((l1_s2081 (ite l1_s1781 l1_s2080 l1_s2079)))+  (let ((l1_s2082 (xor l1_s336 l1_s2081)))+  (let ((l1_s2083 (ite l1_s1811 l1_s2082 l1_s2081)))+  (let ((l1_s2084 (xor l1_s318 l1_s2083)))+  (let ((l1_s2085 (ite l1_s1843 l1_s2084 l1_s2083)))+  (let ((l1_s2086 (xor l1_s302 l1_s2085)))+  (let ((l1_s2087 (ite l1_s1875 l1_s2086 l1_s2085)))+  (let ((l1_s2088 (xor l1_s288 l1_s2087)))+  (let ((l1_s2089 (ite l1_s1907 l1_s2088 l1_s2087)))+  (let ((l1_s2090 (xor l1_s276 l1_s2089)))+  (let ((l1_s2091 (ite l1_s1939 l1_s2090 l1_s2089)))+  (let ((l1_s2092 (xor l1_s266 l1_s2091)))+  (let ((l1_s2093 (ite l1_s1971 l1_s2092 l1_s2091)))+  (let ((l1_s2094 (xor l1_s258 l1_s2093)))+  (let ((l1_s2095 (ite l1_s2003 l1_s2094 l1_s2093)))+  (let ((l1_s2096 (xor l1_s252 l1_s2095)))+  (let ((l1_s2097 (ite l1_s2035 l1_s2096 l1_s2095)))+  (let ((l1_s2098 (xor l1_s248 l1_s2097)))+  (let ((l1_s2099 (ite l1_s2067 l1_s2098 l1_s2097)))+  (let ((l1_s2100 (xor l1_s4 l1_s135)))+  (let ((l1_s2101 (ite l1_s1661 l1_s2100 l1_s135)))+  (let ((l1_s2102 (xor l1_s486 l1_s2101)))+  (let ((l1_s2103 (ite l1_s1681 l1_s2102 l1_s2101)))+  (let ((l1_s2104 (xor l1_s456 l1_s2103)))+  (let ((l1_s2105 (ite l1_s1703 l1_s2104 l1_s2103)))+  (let ((l1_s2106 (xor l1_s428 l1_s2105)))+  (let ((l1_s2107 (ite l1_s1727 l1_s2106 l1_s2105)))+  (let ((l1_s2108 (xor l1_s402 l1_s2107)))+  (let ((l1_s2109 (ite l1_s1753 l1_s2108 l1_s2107)))+  (let ((l1_s2110 (xor l1_s378 l1_s2109)))+  (let ((l1_s2111 (ite l1_s1781 l1_s2110 l1_s2109)))+  (let ((l1_s2112 (xor l1_s356 l1_s2111)))+  (let ((l1_s2113 (ite l1_s1811 l1_s2112 l1_s2111)))+  (let ((l1_s2114 (xor l1_s336 l1_s2113)))+  (let ((l1_s2115 (ite l1_s1843 l1_s2114 l1_s2113)))+  (let ((l1_s2116 (xor l1_s318 l1_s2115)))+  (let ((l1_s2117 (ite l1_s1875 l1_s2116 l1_s2115)))+  (let ((l1_s2118 (xor l1_s302 l1_s2117)))+  (let ((l1_s2119 (ite l1_s1907 l1_s2118 l1_s2117)))+  (let ((l1_s2120 (xor l1_s288 l1_s2119)))+  (let ((l1_s2121 (ite l1_s1939 l1_s2120 l1_s2119)))+  (let ((l1_s2122 (xor l1_s276 l1_s2121)))+  (let ((l1_s2123 (ite l1_s1971 l1_s2122 l1_s2121)))+  (let ((l1_s2124 (xor l1_s266 l1_s2123)))+  (let ((l1_s2125 (ite l1_s2003 l1_s2124 l1_s2123)))+  (let ((l1_s2126 (xor l1_s258 l1_s2125)))+  (let ((l1_s2127 (ite l1_s2035 l1_s2126 l1_s2125)))+  (let ((l1_s2128 (xor l1_s252 l1_s2127)))+  (let ((l1_s2129 (ite l1_s2067 l1_s2128 l1_s2127)))+  (let ((l1_s2130 (xor l1_s248 l1_s2129)))+  (let ((l1_s2131 (ite l1_s2099 l1_s2130 l1_s2129)))+  (let ((l1_s2132 (xor l1_s4 l1_s140)))+  (let ((l1_s2133 (ite l1_s1681 l1_s2132 l1_s140)))+  (let ((l1_s2134 (xor l1_s486 l1_s2133)))+  (let ((l1_s2135 (ite l1_s1703 l1_s2134 l1_s2133)))+  (let ((l1_s2136 (xor l1_s456 l1_s2135)))+  (let ((l1_s2137 (ite l1_s1727 l1_s2136 l1_s2135)))+  (let ((l1_s2138 (xor l1_s428 l1_s2137)))+  (let ((l1_s2139 (ite l1_s1753 l1_s2138 l1_s2137)))+  (let ((l1_s2140 (xor l1_s402 l1_s2139)))+  (let ((l1_s2141 (ite l1_s1781 l1_s2140 l1_s2139)))+  (let ((l1_s2142 (xor l1_s378 l1_s2141)))+  (let ((l1_s2143 (ite l1_s1811 l1_s2142 l1_s2141)))+  (let ((l1_s2144 (xor l1_s356 l1_s2143)))+  (let ((l1_s2145 (ite l1_s1843 l1_s2144 l1_s2143)))+  (let ((l1_s2146 (xor l1_s336 l1_s2145)))+  (let ((l1_s2147 (ite l1_s1875 l1_s2146 l1_s2145)))+  (let ((l1_s2148 (xor l1_s318 l1_s2147)))+  (let ((l1_s2149 (ite l1_s1907 l1_s2148 l1_s2147)))+  (let ((l1_s2150 (xor l1_s302 l1_s2149)))+  (let ((l1_s2151 (ite l1_s1939 l1_s2150 l1_s2149)))+  (let ((l1_s2152 (xor l1_s288 l1_s2151)))+  (let ((l1_s2153 (ite l1_s1971 l1_s2152 l1_s2151)))+  (let ((l1_s2154 (xor l1_s276 l1_s2153)))+  (let ((l1_s2155 (ite l1_s2003 l1_s2154 l1_s2153)))+  (let ((l1_s2156 (xor l1_s266 l1_s2155)))+  (let ((l1_s2157 (ite l1_s2035 l1_s2156 l1_s2155)))+  (let ((l1_s2158 (xor l1_s258 l1_s2157)))+  (let ((l1_s2159 (ite l1_s2067 l1_s2158 l1_s2157)))+  (let ((l1_s2160 (xor l1_s252 l1_s2159)))+  (let ((l1_s2161 (ite l1_s2099 l1_s2160 l1_s2159)))+  (let ((l1_s2162 (xor l1_s248 l1_s2161)))+  (let ((l1_s2163 (ite l1_s2131 l1_s2162 l1_s2161)))+  (let ((l1_s2164 (xor l1_s4 l1_s145)))+  (let ((l1_s2165 (ite l1_s1703 l1_s2164 l1_s145)))+  (let ((l1_s2166 (xor l1_s486 l1_s2165)))+  (let ((l1_s2167 (ite l1_s1727 l1_s2166 l1_s2165)))+  (let ((l1_s2168 (xor l1_s456 l1_s2167)))+  (let ((l1_s2169 (ite l1_s1753 l1_s2168 l1_s2167)))+  (let ((l1_s2170 (xor l1_s428 l1_s2169)))+  (let ((l1_s2171 (ite l1_s1781 l1_s2170 l1_s2169)))+  (let ((l1_s2172 (xor l1_s402 l1_s2171)))+  (let ((l1_s2173 (ite l1_s1811 l1_s2172 l1_s2171)))+  (let ((l1_s2174 (xor l1_s378 l1_s2173)))+  (let ((l1_s2175 (ite l1_s1843 l1_s2174 l1_s2173)))+  (let ((l1_s2176 (xor l1_s356 l1_s2175)))+  (let ((l1_s2177 (ite l1_s1875 l1_s2176 l1_s2175)))+  (let ((l1_s2178 (xor l1_s336 l1_s2177)))+  (let ((l1_s2179 (ite l1_s1907 l1_s2178 l1_s2177)))+  (let ((l1_s2180 (xor l1_s318 l1_s2179)))+  (let ((l1_s2181 (ite l1_s1939 l1_s2180 l1_s2179)))+  (let ((l1_s2182 (xor l1_s302 l1_s2181)))+  (let ((l1_s2183 (ite l1_s1971 l1_s2182 l1_s2181)))+  (let ((l1_s2184 (xor l1_s288 l1_s2183)))+  (let ((l1_s2185 (ite l1_s2003 l1_s2184 l1_s2183)))+  (let ((l1_s2186 (xor l1_s276 l1_s2185)))+  (let ((l1_s2187 (ite l1_s2035 l1_s2186 l1_s2185)))+  (let ((l1_s2188 (xor l1_s266 l1_s2187)))+  (let ((l1_s2189 (ite l1_s2067 l1_s2188 l1_s2187)))+  (let ((l1_s2190 (xor l1_s258 l1_s2189)))+  (let ((l1_s2191 (ite l1_s2099 l1_s2190 l1_s2189)))+  (let ((l1_s2192 (xor l1_s252 l1_s2191)))+  (let ((l1_s2193 (ite l1_s2131 l1_s2192 l1_s2191)))+  (let ((l1_s2194 (xor l1_s248 l1_s2193)))+  (let ((l1_s2195 (ite l1_s2163 l1_s2194 l1_s2193)))+  (let ((l1_s2196 (xor l1_s4 l1_s150)))+  (let ((l1_s2197 (ite l1_s1727 l1_s2196 l1_s150)))+  (let ((l1_s2198 (xor l1_s486 l1_s2197)))+  (let ((l1_s2199 (ite l1_s1753 l1_s2198 l1_s2197)))+  (let ((l1_s2200 (xor l1_s456 l1_s2199)))+  (let ((l1_s2201 (ite l1_s1781 l1_s2200 l1_s2199)))+  (let ((l1_s2202 (xor l1_s428 l1_s2201)))+  (let ((l1_s2203 (ite l1_s1811 l1_s2202 l1_s2201)))+  (let ((l1_s2204 (xor l1_s402 l1_s2203)))+  (let ((l1_s2205 (ite l1_s1843 l1_s2204 l1_s2203)))+  (let ((l1_s2206 (xor l1_s378 l1_s2205)))+  (let ((l1_s2207 (ite l1_s1875 l1_s2206 l1_s2205)))+  (let ((l1_s2208 (xor l1_s356 l1_s2207)))+  (let ((l1_s2209 (ite l1_s1907 l1_s2208 l1_s2207)))+  (let ((l1_s2210 (xor l1_s336 l1_s2209)))+  (let ((l1_s2211 (ite l1_s1939 l1_s2210 l1_s2209)))+  (let ((l1_s2212 (xor l1_s318 l1_s2211)))+  (let ((l1_s2213 (ite l1_s1971 l1_s2212 l1_s2211)))+  (let ((l1_s2214 (xor l1_s302 l1_s2213)))+  (let ((l1_s2215 (ite l1_s2003 l1_s2214 l1_s2213)))+  (let ((l1_s2216 (xor l1_s288 l1_s2215)))+  (let ((l1_s2217 (ite l1_s2035 l1_s2216 l1_s2215)))+  (let ((l1_s2218 (xor l1_s276 l1_s2217)))+  (let ((l1_s2219 (ite l1_s2067 l1_s2218 l1_s2217)))+  (let ((l1_s2220 (xor l1_s266 l1_s2219)))+  (let ((l1_s2221 (ite l1_s2099 l1_s2220 l1_s2219)))+  (let ((l1_s2222 (xor l1_s258 l1_s2221)))+  (let ((l1_s2223 (ite l1_s2131 l1_s2222 l1_s2221)))+  (let ((l1_s2224 (xor l1_s252 l1_s2223)))+  (let ((l1_s2225 (ite l1_s2163 l1_s2224 l1_s2223)))+  (let ((l1_s2226 (xor l1_s248 l1_s2225)))+  (let ((l1_s2227 (ite l1_s2195 l1_s2226 l1_s2225)))+  (let ((l1_s2228 (xor l1_s4 l1_s155)))+  (let ((l1_s2229 (ite l1_s1753 l1_s2228 l1_s155)))+  (let ((l1_s2230 (xor l1_s486 l1_s2229)))+  (let ((l1_s2231 (ite l1_s1781 l1_s2230 l1_s2229)))+  (let ((l1_s2232 (xor l1_s456 l1_s2231)))+  (let ((l1_s2233 (ite l1_s1811 l1_s2232 l1_s2231)))+  (let ((l1_s2234 (xor l1_s428 l1_s2233)))+  (let ((l1_s2235 (ite l1_s1843 l1_s2234 l1_s2233)))+  (let ((l1_s2236 (xor l1_s402 l1_s2235)))+  (let ((l1_s2237 (ite l1_s1875 l1_s2236 l1_s2235)))+  (let ((l1_s2238 (xor l1_s378 l1_s2237)))+  (let ((l1_s2239 (ite l1_s1907 l1_s2238 l1_s2237)))+  (let ((l1_s2240 (xor l1_s356 l1_s2239)))+  (let ((l1_s2241 (ite l1_s1939 l1_s2240 l1_s2239)))+  (let ((l1_s2242 (xor l1_s336 l1_s2241)))+  (let ((l1_s2243 (ite l1_s1971 l1_s2242 l1_s2241)))+  (let ((l1_s2244 (xor l1_s318 l1_s2243)))+  (let ((l1_s2245 (ite l1_s2003 l1_s2244 l1_s2243)))+  (let ((l1_s2246 (xor l1_s302 l1_s2245)))+  (let ((l1_s2247 (ite l1_s2035 l1_s2246 l1_s2245)))+  (let ((l1_s2248 (xor l1_s288 l1_s2247)))+  (let ((l1_s2249 (ite l1_s2067 l1_s2248 l1_s2247)))+  (let ((l1_s2250 (xor l1_s276 l1_s2249)))+  (let ((l1_s2251 (ite l1_s2099 l1_s2250 l1_s2249)))+  (let ((l1_s2252 (xor l1_s266 l1_s2251)))+  (let ((l1_s2253 (ite l1_s2131 l1_s2252 l1_s2251)))+  (let ((l1_s2254 (xor l1_s258 l1_s2253)))+  (let ((l1_s2255 (ite l1_s2163 l1_s2254 l1_s2253)))+  (let ((l1_s2256 (xor l1_s252 l1_s2255)))+  (let ((l1_s2257 (ite l1_s2195 l1_s2256 l1_s2255)))+  (let ((l1_s2258 (xor l1_s248 l1_s2257)))+  (let ((l1_s2259 (ite l1_s2227 l1_s2258 l1_s2257)))+  (let ((l1_s2260 (xor l1_s4 l1_s160)))+  (let ((l1_s2261 (ite l1_s1781 l1_s2260 l1_s160)))+  (let ((l1_s2262 (xor l1_s486 l1_s2261)))+  (let ((l1_s2263 (ite l1_s1811 l1_s2262 l1_s2261)))+  (let ((l1_s2264 (xor l1_s456 l1_s2263)))+  (let ((l1_s2265 (ite l1_s1843 l1_s2264 l1_s2263)))+  (let ((l1_s2266 (xor l1_s428 l1_s2265)))+  (let ((l1_s2267 (ite l1_s1875 l1_s2266 l1_s2265)))+  (let ((l1_s2268 (xor l1_s402 l1_s2267)))+  (let ((l1_s2269 (ite l1_s1907 l1_s2268 l1_s2267)))+  (let ((l1_s2270 (xor l1_s378 l1_s2269)))+  (let ((l1_s2271 (ite l1_s1939 l1_s2270 l1_s2269)))+  (let ((l1_s2272 (xor l1_s356 l1_s2271)))+  (let ((l1_s2273 (ite l1_s1971 l1_s2272 l1_s2271)))+  (let ((l1_s2274 (xor l1_s336 l1_s2273)))+  (let ((l1_s2275 (ite l1_s2003 l1_s2274 l1_s2273)))+  (let ((l1_s2276 (xor l1_s318 l1_s2275)))+  (let ((l1_s2277 (ite l1_s2035 l1_s2276 l1_s2275)))+  (let ((l1_s2278 (xor l1_s302 l1_s2277)))+  (let ((l1_s2279 (ite l1_s2067 l1_s2278 l1_s2277)))+  (let ((l1_s2280 (xor l1_s288 l1_s2279)))+  (let ((l1_s2281 (ite l1_s2099 l1_s2280 l1_s2279)))+  (let ((l1_s2282 (xor l1_s276 l1_s2281)))+  (let ((l1_s2283 (ite l1_s2131 l1_s2282 l1_s2281)))+  (let ((l1_s2284 (xor l1_s266 l1_s2283)))+  (let ((l1_s2285 (ite l1_s2163 l1_s2284 l1_s2283)))+  (let ((l1_s2286 (xor l1_s258 l1_s2285)))+  (let ((l1_s2287 (ite l1_s2195 l1_s2286 l1_s2285)))+  (let ((l1_s2288 (xor l1_s252 l1_s2287)))+  (let ((l1_s2289 (ite l1_s2227 l1_s2288 l1_s2287)))+  (let ((l1_s2290 (xor l1_s248 l1_s2289)))+  (let ((l1_s2291 (ite l1_s2259 l1_s2290 l1_s2289)))+  (let ((l1_s2292 (xor l1_s4 l1_s165)))+  (let ((l1_s2293 (ite l1_s1811 l1_s2292 l1_s165)))+  (let ((l1_s2294 (xor l1_s486 l1_s2293)))+  (let ((l1_s2295 (ite l1_s1843 l1_s2294 l1_s2293)))+  (let ((l1_s2296 (xor l1_s456 l1_s2295)))+  (let ((l1_s2297 (ite l1_s1875 l1_s2296 l1_s2295)))+  (let ((l1_s2298 (xor l1_s428 l1_s2297)))+  (let ((l1_s2299 (ite l1_s1907 l1_s2298 l1_s2297)))+  (let ((l1_s2300 (xor l1_s402 l1_s2299)))+  (let ((l1_s2301 (ite l1_s1939 l1_s2300 l1_s2299)))+  (let ((l1_s2302 (xor l1_s378 l1_s2301)))+  (let ((l1_s2303 (ite l1_s1971 l1_s2302 l1_s2301)))+  (let ((l1_s2304 (xor l1_s356 l1_s2303)))+  (let ((l1_s2305 (ite l1_s2003 l1_s2304 l1_s2303)))+  (let ((l1_s2306 (xor l1_s336 l1_s2305)))+  (let ((l1_s2307 (ite l1_s2035 l1_s2306 l1_s2305)))+  (let ((l1_s2308 (xor l1_s318 l1_s2307)))+  (let ((l1_s2309 (ite l1_s2067 l1_s2308 l1_s2307)))+  (let ((l1_s2310 (xor l1_s302 l1_s2309)))+  (let ((l1_s2311 (ite l1_s2099 l1_s2310 l1_s2309)))+  (let ((l1_s2312 (xor l1_s288 l1_s2311)))+  (let ((l1_s2313 (ite l1_s2131 l1_s2312 l1_s2311)))+  (let ((l1_s2314 (xor l1_s276 l1_s2313)))+  (let ((l1_s2315 (ite l1_s2163 l1_s2314 l1_s2313)))+  (let ((l1_s2316 (xor l1_s266 l1_s2315)))+  (let ((l1_s2317 (ite l1_s2195 l1_s2316 l1_s2315)))+  (let ((l1_s2318 (xor l1_s258 l1_s2317)))+  (let ((l1_s2319 (ite l1_s2227 l1_s2318 l1_s2317)))+  (let ((l1_s2320 (xor l1_s252 l1_s2319)))+  (let ((l1_s2321 (ite l1_s2259 l1_s2320 l1_s2319)))+  (let ((l1_s2322 (xor l1_s248 l1_s2321)))+  (let ((l1_s2323 (ite l1_s2291 l1_s2322 l1_s2321)))+  (let ((l1_s2324 (xor l1_s4 l1_s170)))+  (let ((l1_s2325 (ite l1_s1843 l1_s2324 l1_s170)))+  (let ((l1_s2326 (xor l1_s486 l1_s2325)))+  (let ((l1_s2327 (ite l1_s1875 l1_s2326 l1_s2325)))+  (let ((l1_s2328 (xor l1_s456 l1_s2327)))+  (let ((l1_s2329 (ite l1_s1907 l1_s2328 l1_s2327)))+  (let ((l1_s2330 (xor l1_s428 l1_s2329)))+  (let ((l1_s2331 (ite l1_s1939 l1_s2330 l1_s2329)))+  (let ((l1_s2332 (xor l1_s402 l1_s2331)))+  (let ((l1_s2333 (ite l1_s1971 l1_s2332 l1_s2331)))+  (let ((l1_s2334 (xor l1_s378 l1_s2333)))+  (let ((l1_s2335 (ite l1_s2003 l1_s2334 l1_s2333)))+  (let ((l1_s2336 (xor l1_s356 l1_s2335)))+  (let ((l1_s2337 (ite l1_s2035 l1_s2336 l1_s2335)))+  (let ((l1_s2338 (xor l1_s336 l1_s2337)))+  (let ((l1_s2339 (ite l1_s2067 l1_s2338 l1_s2337)))+  (let ((l1_s2340 (xor l1_s318 l1_s2339)))+  (let ((l1_s2341 (ite l1_s2099 l1_s2340 l1_s2339)))+  (let ((l1_s2342 (xor l1_s302 l1_s2341)))+  (let ((l1_s2343 (ite l1_s2131 l1_s2342 l1_s2341)))+  (let ((l1_s2344 (xor l1_s288 l1_s2343)))+  (let ((l1_s2345 (ite l1_s2163 l1_s2344 l1_s2343)))+  (let ((l1_s2346 (xor l1_s276 l1_s2345)))+  (let ((l1_s2347 (ite l1_s2195 l1_s2346 l1_s2345)))+  (let ((l1_s2348 (xor l1_s266 l1_s2347)))+  (let ((l1_s2349 (ite l1_s2227 l1_s2348 l1_s2347)))+  (let ((l1_s2350 (xor l1_s258 l1_s2349)))+  (let ((l1_s2351 (ite l1_s2259 l1_s2350 l1_s2349)))+  (let ((l1_s2352 (xor l1_s252 l1_s2351)))+  (let ((l1_s2353 (ite l1_s2291 l1_s2352 l1_s2351)))+  (let ((l1_s2354 (xor l1_s248 l1_s2353)))+  (let ((l1_s2355 (ite l1_s2323 l1_s2354 l1_s2353)))+  (let ((l1_s2356 (xor l1_s4 l1_s175)))+  (let ((l1_s2357 (ite l1_s1875 l1_s2356 l1_s175)))+  (let ((l1_s2358 (xor l1_s486 l1_s2357)))+  (let ((l1_s2359 (ite l1_s1907 l1_s2358 l1_s2357)))+  (let ((l1_s2360 (xor l1_s456 l1_s2359)))+  (let ((l1_s2361 (ite l1_s1939 l1_s2360 l1_s2359)))+  (let ((l1_s2362 (xor l1_s428 l1_s2361)))+  (let ((l1_s2363 (ite l1_s1971 l1_s2362 l1_s2361)))+  (let ((l1_s2364 (xor l1_s402 l1_s2363)))+  (let ((l1_s2365 (ite l1_s2003 l1_s2364 l1_s2363)))+  (let ((l1_s2366 (xor l1_s378 l1_s2365)))+  (let ((l1_s2367 (ite l1_s2035 l1_s2366 l1_s2365)))+  (let ((l1_s2368 (xor l1_s356 l1_s2367)))+  (let ((l1_s2369 (ite l1_s2067 l1_s2368 l1_s2367)))+  (let ((l1_s2370 (xor l1_s336 l1_s2369)))+  (let ((l1_s2371 (ite l1_s2099 l1_s2370 l1_s2369)))+  (let ((l1_s2372 (xor l1_s318 l1_s2371)))+  (let ((l1_s2373 (ite l1_s2131 l1_s2372 l1_s2371)))+  (let ((l1_s2374 (xor l1_s302 l1_s2373)))+  (let ((l1_s2375 (ite l1_s2163 l1_s2374 l1_s2373)))+  (let ((l1_s2376 (xor l1_s288 l1_s2375)))+  (let ((l1_s2377 (ite l1_s2195 l1_s2376 l1_s2375)))+  (let ((l1_s2378 (xor l1_s276 l1_s2377)))+  (let ((l1_s2379 (ite l1_s2227 l1_s2378 l1_s2377)))+  (let ((l1_s2380 (xor l1_s266 l1_s2379)))+  (let ((l1_s2381 (ite l1_s2259 l1_s2380 l1_s2379)))+  (let ((l1_s2382 (xor l1_s258 l1_s2381)))+  (let ((l1_s2383 (ite l1_s2291 l1_s2382 l1_s2381)))+  (let ((l1_s2384 (xor l1_s252 l1_s2383)))+  (let ((l1_s2385 (ite l1_s2323 l1_s2384 l1_s2383)))+  (let ((l1_s2386 (xor l1_s248 l1_s2385)))+  (let ((l1_s2387 (ite l1_s2355 l1_s2386 l1_s2385)))+  (let ((l1_s2388 (xor l1_s4 l1_s180)))+  (let ((l1_s2389 (ite l1_s1907 l1_s2388 l1_s180)))+  (let ((l1_s2390 (xor l1_s486 l1_s2389)))+  (let ((l1_s2391 (ite l1_s1939 l1_s2390 l1_s2389)))+  (let ((l1_s2392 (xor l1_s456 l1_s2391)))+  (let ((l1_s2393 (ite l1_s1971 l1_s2392 l1_s2391)))+  (let ((l1_s2394 (xor l1_s428 l1_s2393)))+  (let ((l1_s2395 (ite l1_s2003 l1_s2394 l1_s2393)))+  (let ((l1_s2396 (xor l1_s402 l1_s2395)))+  (let ((l1_s2397 (ite l1_s2035 l1_s2396 l1_s2395)))+  (let ((l1_s2398 (xor l1_s378 l1_s2397)))+  (let ((l1_s2399 (ite l1_s2067 l1_s2398 l1_s2397)))+  (let ((l1_s2400 (xor l1_s356 l1_s2399)))+  (let ((l1_s2401 (ite l1_s2099 l1_s2400 l1_s2399)))+  (let ((l1_s2402 (xor l1_s336 l1_s2401)))+  (let ((l1_s2403 (ite l1_s2131 l1_s2402 l1_s2401)))+  (let ((l1_s2404 (xor l1_s318 l1_s2403)))+  (let ((l1_s2405 (ite l1_s2163 l1_s2404 l1_s2403)))+  (let ((l1_s2406 (xor l1_s302 l1_s2405)))+  (let ((l1_s2407 (ite l1_s2195 l1_s2406 l1_s2405)))+  (let ((l1_s2408 (xor l1_s288 l1_s2407)))+  (let ((l1_s2409 (ite l1_s2227 l1_s2408 l1_s2407)))+  (let ((l1_s2410 (xor l1_s276 l1_s2409)))+  (let ((l1_s2411 (ite l1_s2259 l1_s2410 l1_s2409)))+  (let ((l1_s2412 (xor l1_s266 l1_s2411)))+  (let ((l1_s2413 (ite l1_s2291 l1_s2412 l1_s2411)))+  (let ((l1_s2414 (xor l1_s258 l1_s2413)))+  (let ((l1_s2415 (ite l1_s2323 l1_s2414 l1_s2413)))+  (let ((l1_s2416 (xor l1_s252 l1_s2415)))+  (let ((l1_s2417 (ite l1_s2355 l1_s2416 l1_s2415)))+  (let ((l1_s2418 (xor l1_s248 l1_s2417)))+  (let ((l1_s2419 (ite l1_s2387 l1_s2418 l1_s2417)))+  (let ((l1_s2420 (xor l1_s4 l1_s185)))+  (let ((l1_s2421 (ite l1_s1939 l1_s2420 l1_s185)))+  (let ((l1_s2422 (xor l1_s486 l1_s2421)))+  (let ((l1_s2423 (ite l1_s1971 l1_s2422 l1_s2421)))+  (let ((l1_s2424 (xor l1_s456 l1_s2423)))+  (let ((l1_s2425 (ite l1_s2003 l1_s2424 l1_s2423)))+  (let ((l1_s2426 (xor l1_s428 l1_s2425)))+  (let ((l1_s2427 (ite l1_s2035 l1_s2426 l1_s2425)))+  (let ((l1_s2428 (xor l1_s402 l1_s2427)))+  (let ((l1_s2429 (ite l1_s2067 l1_s2428 l1_s2427)))+  (let ((l1_s2430 (xor l1_s378 l1_s2429)))+  (let ((l1_s2431 (ite l1_s2099 l1_s2430 l1_s2429)))+  (let ((l1_s2432 (xor l1_s356 l1_s2431)))+  (let ((l1_s2433 (ite l1_s2131 l1_s2432 l1_s2431)))+  (let ((l1_s2434 (xor l1_s336 l1_s2433)))+  (let ((l1_s2435 (ite l1_s2163 l1_s2434 l1_s2433)))+  (let ((l1_s2436 (xor l1_s318 l1_s2435)))+  (let ((l1_s2437 (ite l1_s2195 l1_s2436 l1_s2435)))+  (let ((l1_s2438 (xor l1_s302 l1_s2437)))+  (let ((l1_s2439 (ite l1_s2227 l1_s2438 l1_s2437)))+  (let ((l1_s2440 (xor l1_s288 l1_s2439)))+  (let ((l1_s2441 (ite l1_s2259 l1_s2440 l1_s2439)))+  (let ((l1_s2442 (xor l1_s276 l1_s2441)))+  (let ((l1_s2443 (ite l1_s2291 l1_s2442 l1_s2441)))+  (let ((l1_s2444 (xor l1_s266 l1_s2443)))+  (let ((l1_s2445 (ite l1_s2323 l1_s2444 l1_s2443)))+  (let ((l1_s2446 (xor l1_s258 l1_s2445)))+  (let ((l1_s2447 (ite l1_s2355 l1_s2446 l1_s2445)))+  (let ((l1_s2448 (xor l1_s252 l1_s2447)))+  (let ((l1_s2449 (ite l1_s2387 l1_s2448 l1_s2447)))+  (let ((l1_s2450 (xor l1_s248 l1_s2449)))+  (let ((l1_s2451 (ite l1_s2419 l1_s2450 l1_s2449)))+  (let ((l1_s2452 (xor l1_s4 l1_s190)))+  (let ((l1_s2453 (ite l1_s1971 l1_s2452 l1_s190)))+  (let ((l1_s2454 (xor l1_s486 l1_s2453)))+  (let ((l1_s2455 (ite l1_s2003 l1_s2454 l1_s2453)))+  (let ((l1_s2456 (xor l1_s456 l1_s2455)))+  (let ((l1_s2457 (ite l1_s2035 l1_s2456 l1_s2455)))+  (let ((l1_s2458 (xor l1_s428 l1_s2457)))+  (let ((l1_s2459 (ite l1_s2067 l1_s2458 l1_s2457)))+  (let ((l1_s2460 (xor l1_s402 l1_s2459)))+  (let ((l1_s2461 (ite l1_s2099 l1_s2460 l1_s2459)))+  (let ((l1_s2462 (xor l1_s378 l1_s2461)))+  (let ((l1_s2463 (ite l1_s2131 l1_s2462 l1_s2461)))+  (let ((l1_s2464 (xor l1_s356 l1_s2463)))+  (let ((l1_s2465 (ite l1_s2163 l1_s2464 l1_s2463)))+  (let ((l1_s2466 (xor l1_s336 l1_s2465)))+  (let ((l1_s2467 (ite l1_s2195 l1_s2466 l1_s2465)))+  (let ((l1_s2468 (xor l1_s318 l1_s2467)))+  (let ((l1_s2469 (ite l1_s2227 l1_s2468 l1_s2467)))+  (let ((l1_s2470 (xor l1_s302 l1_s2469)))+  (let ((l1_s2471 (ite l1_s2259 l1_s2470 l1_s2469)))+  (let ((l1_s2472 (xor l1_s288 l1_s2471)))+  (let ((l1_s2473 (ite l1_s2291 l1_s2472 l1_s2471)))+  (let ((l1_s2474 (xor l1_s276 l1_s2473)))+  (let ((l1_s2475 (ite l1_s2323 l1_s2474 l1_s2473)))+  (let ((l1_s2476 (xor l1_s266 l1_s2475)))+  (let ((l1_s2477 (ite l1_s2355 l1_s2476 l1_s2475)))+  (let ((l1_s2478 (xor l1_s258 l1_s2477)))+  (let ((l1_s2479 (ite l1_s2387 l1_s2478 l1_s2477)))+  (let ((l1_s2480 (xor l1_s252 l1_s2479)))+  (let ((l1_s2481 (ite l1_s2419 l1_s2480 l1_s2479)))+  (let ((l1_s2482 (xor l1_s248 l1_s2481)))+  (let ((l1_s2483 (ite l1_s2451 l1_s2482 l1_s2481)))+  (let ((l1_s2484 (xor l1_s4 l1_s195)))+  (let ((l1_s2485 (ite l1_s2003 l1_s2484 l1_s195)))+  (let ((l1_s2486 (xor l1_s486 l1_s2485)))+  (let ((l1_s2487 (ite l1_s2035 l1_s2486 l1_s2485)))+  (let ((l1_s2488 (xor l1_s456 l1_s2487)))+  (let ((l1_s2489 (ite l1_s2067 l1_s2488 l1_s2487)))+  (let ((l1_s2490 (xor l1_s428 l1_s2489)))+  (let ((l1_s2491 (ite l1_s2099 l1_s2490 l1_s2489)))+  (let ((l1_s2492 (xor l1_s402 l1_s2491)))+  (let ((l1_s2493 (ite l1_s2131 l1_s2492 l1_s2491)))+  (let ((l1_s2494 (xor l1_s378 l1_s2493)))+  (let ((l1_s2495 (ite l1_s2163 l1_s2494 l1_s2493)))+  (let ((l1_s2496 (xor l1_s356 l1_s2495)))+  (let ((l1_s2497 (ite l1_s2195 l1_s2496 l1_s2495)))+  (let ((l1_s2498 (xor l1_s336 l1_s2497)))+  (let ((l1_s2499 (ite l1_s2227 l1_s2498 l1_s2497)))+  (let ((l1_s2500 (xor l1_s318 l1_s2499)))+  (let ((l1_s2501 (ite l1_s2259 l1_s2500 l1_s2499)))+  (let ((l1_s2502 (xor l1_s302 l1_s2501)))+  (let ((l1_s2503 (ite l1_s2291 l1_s2502 l1_s2501)))+  (let ((l1_s2504 (xor l1_s288 l1_s2503)))+  (let ((l1_s2505 (ite l1_s2323 l1_s2504 l1_s2503)))+  (let ((l1_s2506 (xor l1_s276 l1_s2505)))+  (let ((l1_s2507 (ite l1_s2355 l1_s2506 l1_s2505)))+  (let ((l1_s2508 (xor l1_s266 l1_s2507)))+  (let ((l1_s2509 (ite l1_s2387 l1_s2508 l1_s2507)))+  (let ((l1_s2510 (xor l1_s258 l1_s2509)))+  (let ((l1_s2511 (ite l1_s2419 l1_s2510 l1_s2509)))+  (let ((l1_s2512 (xor l1_s252 l1_s2511)))+  (let ((l1_s2513 (ite l1_s2451 l1_s2512 l1_s2511)))+  (let ((l1_s2514 (xor l1_s248 l1_s2513)))+  (let ((l1_s2515 (ite l1_s2483 l1_s2514 l1_s2513)))+  (let ((l1_s2516 (xor l1_s4 l1_s200)))+  (let ((l1_s2517 (ite l1_s2035 l1_s2516 l1_s200)))+  (let ((l1_s2518 (xor l1_s486 l1_s2517)))+  (let ((l1_s2519 (ite l1_s2067 l1_s2518 l1_s2517)))+  (let ((l1_s2520 (xor l1_s456 l1_s2519)))+  (let ((l1_s2521 (ite l1_s2099 l1_s2520 l1_s2519)))+  (let ((l1_s2522 (xor l1_s428 l1_s2521)))+  (let ((l1_s2523 (ite l1_s2131 l1_s2522 l1_s2521)))+  (let ((l1_s2524 (xor l1_s402 l1_s2523)))+  (let ((l1_s2525 (ite l1_s2163 l1_s2524 l1_s2523)))+  (let ((l1_s2526 (xor l1_s378 l1_s2525)))+  (let ((l1_s2527 (ite l1_s2195 l1_s2526 l1_s2525)))+  (let ((l1_s2528 (xor l1_s356 l1_s2527)))+  (let ((l1_s2529 (ite l1_s2227 l1_s2528 l1_s2527)))+  (let ((l1_s2530 (xor l1_s336 l1_s2529)))+  (let ((l1_s2531 (ite l1_s2259 l1_s2530 l1_s2529)))+  (let ((l1_s2532 (xor l1_s318 l1_s2531)))+  (let ((l1_s2533 (ite l1_s2291 l1_s2532 l1_s2531)))+  (let ((l1_s2534 (xor l1_s302 l1_s2533)))+  (let ((l1_s2535 (ite l1_s2323 l1_s2534 l1_s2533)))+  (let ((l1_s2536 (xor l1_s288 l1_s2535)))+  (let ((l1_s2537 (ite l1_s2355 l1_s2536 l1_s2535)))+  (let ((l1_s2538 (xor l1_s276 l1_s2537)))+  (let ((l1_s2539 (ite l1_s2387 l1_s2538 l1_s2537)))+  (let ((l1_s2540 (xor l1_s266 l1_s2539)))+  (let ((l1_s2541 (ite l1_s2419 l1_s2540 l1_s2539)))+  (let ((l1_s2542 (xor l1_s258 l1_s2541)))+  (let ((l1_s2543 (ite l1_s2451 l1_s2542 l1_s2541)))+  (let ((l1_s2544 (xor l1_s252 l1_s2543)))+  (let ((l1_s2545 (ite l1_s2483 l1_s2544 l1_s2543)))+  (let ((l1_s2546 (xor l1_s248 l1_s2545)))+  (let ((l1_s2547 (ite l1_s2515 l1_s2546 l1_s2545)))+  (let ((l1_s2548 (xor l1_s4 l1_s205)))+  (let ((l1_s2549 (ite l1_s2067 l1_s2548 l1_s205)))+  (let ((l1_s2550 (xor l1_s486 l1_s2549)))+  (let ((l1_s2551 (ite l1_s2099 l1_s2550 l1_s2549)))+  (let ((l1_s2552 (xor l1_s456 l1_s2551)))+  (let ((l1_s2553 (ite l1_s2131 l1_s2552 l1_s2551)))+  (let ((l1_s2554 (xor l1_s428 l1_s2553)))+  (let ((l1_s2555 (ite l1_s2163 l1_s2554 l1_s2553)))+  (let ((l1_s2556 (xor l1_s402 l1_s2555)))+  (let ((l1_s2557 (ite l1_s2195 l1_s2556 l1_s2555)))+  (let ((l1_s2558 (xor l1_s378 l1_s2557)))+  (let ((l1_s2559 (ite l1_s2227 l1_s2558 l1_s2557)))+  (let ((l1_s2560 (xor l1_s356 l1_s2559)))+  (let ((l1_s2561 (ite l1_s2259 l1_s2560 l1_s2559)))+  (let ((l1_s2562 (xor l1_s336 l1_s2561)))+  (let ((l1_s2563 (ite l1_s2291 l1_s2562 l1_s2561)))+  (let ((l1_s2564 (xor l1_s318 l1_s2563)))+  (let ((l1_s2565 (ite l1_s2323 l1_s2564 l1_s2563)))+  (let ((l1_s2566 (xor l1_s302 l1_s2565)))+  (let ((l1_s2567 (ite l1_s2355 l1_s2566 l1_s2565)))+  (let ((l1_s2568 (xor l1_s288 l1_s2567)))+  (let ((l1_s2569 (ite l1_s2387 l1_s2568 l1_s2567)))+  (let ((l1_s2570 (xor l1_s276 l1_s2569)))+  (let ((l1_s2571 (ite l1_s2419 l1_s2570 l1_s2569)))+  (let ((l1_s2572 (xor l1_s266 l1_s2571)))+  (let ((l1_s2573 (ite l1_s2451 l1_s2572 l1_s2571)))+  (let ((l1_s2574 (xor l1_s258 l1_s2573)))+  (let ((l1_s2575 (ite l1_s2483 l1_s2574 l1_s2573)))+  (let ((l1_s2576 (xor l1_s252 l1_s2575)))+  (let ((l1_s2577 (ite l1_s2515 l1_s2576 l1_s2575)))+  (let ((l1_s2578 (xor l1_s248 l1_s2577)))+  (let ((l1_s2579 (ite l1_s2547 l1_s2578 l1_s2577)))+  (let ((l1_s2580 (xor l1_s4 l1_s210)))+  (let ((l1_s2581 (ite l1_s2099 l1_s2580 l1_s210)))+  (let ((l1_s2582 (xor l1_s486 l1_s2581)))+  (let ((l1_s2583 (ite l1_s2131 l1_s2582 l1_s2581)))+  (let ((l1_s2584 (xor l1_s456 l1_s2583)))+  (let ((l1_s2585 (ite l1_s2163 l1_s2584 l1_s2583)))+  (let ((l1_s2586 (xor l1_s428 l1_s2585)))+  (let ((l1_s2587 (ite l1_s2195 l1_s2586 l1_s2585)))+  (let ((l1_s2588 (xor l1_s402 l1_s2587)))+  (let ((l1_s2589 (ite l1_s2227 l1_s2588 l1_s2587)))+  (let ((l1_s2590 (xor l1_s378 l1_s2589)))+  (let ((l1_s2591 (ite l1_s2259 l1_s2590 l1_s2589)))+  (let ((l1_s2592 (xor l1_s356 l1_s2591)))+  (let ((l1_s2593 (ite l1_s2291 l1_s2592 l1_s2591)))+  (let ((l1_s2594 (xor l1_s336 l1_s2593)))+  (let ((l1_s2595 (ite l1_s2323 l1_s2594 l1_s2593)))+  (let ((l1_s2596 (xor l1_s318 l1_s2595)))+  (let ((l1_s2597 (ite l1_s2355 l1_s2596 l1_s2595)))+  (let ((l1_s2598 (xor l1_s302 l1_s2597)))+  (let ((l1_s2599 (ite l1_s2387 l1_s2598 l1_s2597)))+  (let ((l1_s2600 (xor l1_s288 l1_s2599)))+  (let ((l1_s2601 (ite l1_s2419 l1_s2600 l1_s2599)))+  (let ((l1_s2602 (xor l1_s276 l1_s2601)))+  (let ((l1_s2603 (ite l1_s2451 l1_s2602 l1_s2601)))+  (let ((l1_s2604 (xor l1_s266 l1_s2603)))+  (let ((l1_s2605 (ite l1_s2483 l1_s2604 l1_s2603)))+  (let ((l1_s2606 (xor l1_s258 l1_s2605)))+  (let ((l1_s2607 (ite l1_s2515 l1_s2606 l1_s2605)))+  (let ((l1_s2608 (xor l1_s252 l1_s2607)))+  (let ((l1_s2609 (ite l1_s2547 l1_s2608 l1_s2607)))+  (let ((l1_s2610 (xor l1_s248 l1_s2609)))+  (let ((l1_s2611 (ite l1_s2579 l1_s2610 l1_s2609)))+  (let ((l1_s2612 (xor l1_s4 l1_s215)))+  (let ((l1_s2613 (ite l1_s2131 l1_s2612 l1_s215)))+  (let ((l1_s2614 (xor l1_s486 l1_s2613)))+  (let ((l1_s2615 (ite l1_s2163 l1_s2614 l1_s2613)))+  (let ((l1_s2616 (xor l1_s456 l1_s2615)))+  (let ((l1_s2617 (ite l1_s2195 l1_s2616 l1_s2615)))+  (let ((l1_s2618 (xor l1_s428 l1_s2617)))+  (let ((l1_s2619 (ite l1_s2227 l1_s2618 l1_s2617)))+  (let ((l1_s2620 (xor l1_s402 l1_s2619)))+  (let ((l1_s2621 (ite l1_s2259 l1_s2620 l1_s2619)))+  (let ((l1_s2622 (xor l1_s378 l1_s2621)))+  (let ((l1_s2623 (ite l1_s2291 l1_s2622 l1_s2621)))+  (let ((l1_s2624 (xor l1_s356 l1_s2623)))+  (let ((l1_s2625 (ite l1_s2323 l1_s2624 l1_s2623)))+  (let ((l1_s2626 (xor l1_s336 l1_s2625)))+  (let ((l1_s2627 (ite l1_s2355 l1_s2626 l1_s2625)))+  (let ((l1_s2628 (xor l1_s318 l1_s2627)))+  (let ((l1_s2629 (ite l1_s2387 l1_s2628 l1_s2627)))+  (let ((l1_s2630 (xor l1_s302 l1_s2629)))+  (let ((l1_s2631 (ite l1_s2419 l1_s2630 l1_s2629)))+  (let ((l1_s2632 (xor l1_s288 l1_s2631)))+  (let ((l1_s2633 (ite l1_s2451 l1_s2632 l1_s2631)))+  (let ((l1_s2634 (xor l1_s276 l1_s2633)))+  (let ((l1_s2635 (ite l1_s2483 l1_s2634 l1_s2633)))+  (let ((l1_s2636 (xor l1_s266 l1_s2635)))+  (let ((l1_s2637 (ite l1_s2515 l1_s2636 l1_s2635)))+  (let ((l1_s2638 (xor l1_s258 l1_s2637)))+  (let ((l1_s2639 (ite l1_s2547 l1_s2638 l1_s2637)))+  (let ((l1_s2640 (xor l1_s252 l1_s2639)))+  (let ((l1_s2641 (ite l1_s2579 l1_s2640 l1_s2639)))+  (let ((l1_s2642 (xor l1_s248 l1_s2641)))+  (let ((l1_s2643 (ite l1_s2611 l1_s2642 l1_s2641)))+  (let ((l1_s2644 (xor l1_s4 l1_s220)))+  (let ((l1_s2645 (ite l1_s2163 l1_s2644 l1_s220)))+  (let ((l1_s2646 (xor l1_s486 l1_s2645)))+  (let ((l1_s2647 (ite l1_s2195 l1_s2646 l1_s2645)))+  (let ((l1_s2648 (xor l1_s456 l1_s2647)))+  (let ((l1_s2649 (ite l1_s2227 l1_s2648 l1_s2647)))+  (let ((l1_s2650 (xor l1_s428 l1_s2649)))+  (let ((l1_s2651 (ite l1_s2259 l1_s2650 l1_s2649)))+  (let ((l1_s2652 (xor l1_s402 l1_s2651)))+  (let ((l1_s2653 (ite l1_s2291 l1_s2652 l1_s2651)))+  (let ((l1_s2654 (xor l1_s378 l1_s2653)))+  (let ((l1_s2655 (ite l1_s2323 l1_s2654 l1_s2653)))+  (let ((l1_s2656 (xor l1_s356 l1_s2655)))+  (let ((l1_s2657 (ite l1_s2355 l1_s2656 l1_s2655)))+  (let ((l1_s2658 (xor l1_s336 l1_s2657)))+  (let ((l1_s2659 (ite l1_s2387 l1_s2658 l1_s2657)))+  (let ((l1_s2660 (xor l1_s318 l1_s2659)))+  (let ((l1_s2661 (ite l1_s2419 l1_s2660 l1_s2659)))+  (let ((l1_s2662 (xor l1_s302 l1_s2661)))+  (let ((l1_s2663 (ite l1_s2451 l1_s2662 l1_s2661)))+  (let ((l1_s2664 (xor l1_s288 l1_s2663)))+  (let ((l1_s2665 (ite l1_s2483 l1_s2664 l1_s2663)))+  (let ((l1_s2666 (xor l1_s276 l1_s2665)))+  (let ((l1_s2667 (ite l1_s2515 l1_s2666 l1_s2665)))+  (let ((l1_s2668 (xor l1_s266 l1_s2667)))+  (let ((l1_s2669 (ite l1_s2547 l1_s2668 l1_s2667)))+  (let ((l1_s2670 (xor l1_s258 l1_s2669)))+  (let ((l1_s2671 (ite l1_s2579 l1_s2670 l1_s2669)))+  (let ((l1_s2672 (xor l1_s252 l1_s2671)))+  (let ((l1_s2673 (ite l1_s2611 l1_s2672 l1_s2671)))+  (let ((l1_s2674 (xor l1_s248 l1_s2673)))+  (let ((l1_s2675 (ite l1_s2643 l1_s2674 l1_s2673)))+  (let ((l1_s2676 (xor l1_s4 l1_s225)))+  (let ((l1_s2677 (ite l1_s2195 l1_s2676 l1_s225)))+  (let ((l1_s2678 (xor l1_s486 l1_s2677)))+  (let ((l1_s2679 (ite l1_s2227 l1_s2678 l1_s2677)))+  (let ((l1_s2680 (xor l1_s456 l1_s2679)))+  (let ((l1_s2681 (ite l1_s2259 l1_s2680 l1_s2679)))+  (let ((l1_s2682 (xor l1_s428 l1_s2681)))+  (let ((l1_s2683 (ite l1_s2291 l1_s2682 l1_s2681)))+  (let ((l1_s2684 (xor l1_s402 l1_s2683)))+  (let ((l1_s2685 (ite l1_s2323 l1_s2684 l1_s2683)))+  (let ((l1_s2686 (xor l1_s378 l1_s2685)))+  (let ((l1_s2687 (ite l1_s2355 l1_s2686 l1_s2685)))+  (let ((l1_s2688 (xor l1_s356 l1_s2687)))+  (let ((l1_s2689 (ite l1_s2387 l1_s2688 l1_s2687)))+  (let ((l1_s2690 (xor l1_s336 l1_s2689)))+  (let ((l1_s2691 (ite l1_s2419 l1_s2690 l1_s2689)))+  (let ((l1_s2692 (xor l1_s318 l1_s2691)))+  (let ((l1_s2693 (ite l1_s2451 l1_s2692 l1_s2691)))+  (let ((l1_s2694 (xor l1_s302 l1_s2693)))+  (let ((l1_s2695 (ite l1_s2483 l1_s2694 l1_s2693)))+  (let ((l1_s2696 (xor l1_s288 l1_s2695)))+  (let ((l1_s2697 (ite l1_s2515 l1_s2696 l1_s2695)))+  (let ((l1_s2698 (xor l1_s276 l1_s2697)))+  (let ((l1_s2699 (ite l1_s2547 l1_s2698 l1_s2697)))+  (let ((l1_s2700 (xor l1_s266 l1_s2699)))+  (let ((l1_s2701 (ite l1_s2579 l1_s2700 l1_s2699)))+  (let ((l1_s2702 (xor l1_s258 l1_s2701)))+  (let ((l1_s2703 (ite l1_s2611 l1_s2702 l1_s2701)))+  (let ((l1_s2704 (xor l1_s252 l1_s2703)))+  (let ((l1_s2705 (ite l1_s2643 l1_s2704 l1_s2703)))+  (let ((l1_s2706 (xor l1_s248 l1_s2705)))+  (let ((l1_s2707 (ite l1_s2675 l1_s2706 l1_s2705)))+  (let ((l1_s2708 (xor l1_s4 l1_s230)))+  (let ((l1_s2709 (ite l1_s2227 l1_s2708 l1_s230)))+  (let ((l1_s2710 (xor l1_s486 l1_s2709)))+  (let ((l1_s2711 (ite l1_s2259 l1_s2710 l1_s2709)))+  (let ((l1_s2712 (xor l1_s456 l1_s2711)))+  (let ((l1_s2713 (ite l1_s2291 l1_s2712 l1_s2711)))+  (let ((l1_s2714 (xor l1_s428 l1_s2713)))+  (let ((l1_s2715 (ite l1_s2323 l1_s2714 l1_s2713)))+  (let ((l1_s2716 (xor l1_s402 l1_s2715)))+  (let ((l1_s2717 (ite l1_s2355 l1_s2716 l1_s2715)))+  (let ((l1_s2718 (xor l1_s378 l1_s2717)))+  (let ((l1_s2719 (ite l1_s2387 l1_s2718 l1_s2717)))+  (let ((l1_s2720 (xor l1_s356 l1_s2719)))+  (let ((l1_s2721 (ite l1_s2419 l1_s2720 l1_s2719)))+  (let ((l1_s2722 (xor l1_s336 l1_s2721)))+  (let ((l1_s2723 (ite l1_s2451 l1_s2722 l1_s2721)))+  (let ((l1_s2724 (xor l1_s318 l1_s2723)))+  (let ((l1_s2725 (ite l1_s2483 l1_s2724 l1_s2723)))+  (let ((l1_s2726 (xor l1_s302 l1_s2725)))+  (let ((l1_s2727 (ite l1_s2515 l1_s2726 l1_s2725)))+  (let ((l1_s2728 (xor l1_s288 l1_s2727)))+  (let ((l1_s2729 (ite l1_s2547 l1_s2728 l1_s2727)))+  (let ((l1_s2730 (xor l1_s276 l1_s2729)))+  (let ((l1_s2731 (ite l1_s2579 l1_s2730 l1_s2729)))+  (let ((l1_s2732 (xor l1_s266 l1_s2731)))+  (let ((l1_s2733 (ite l1_s2611 l1_s2732 l1_s2731)))+  (let ((l1_s2734 (xor l1_s258 l1_s2733)))+  (let ((l1_s2735 (ite l1_s2643 l1_s2734 l1_s2733)))+  (let ((l1_s2736 (xor l1_s252 l1_s2735)))+  (let ((l1_s2737 (ite l1_s2675 l1_s2736 l1_s2735)))+  (let ((l1_s2738 (xor l1_s248 l1_s2737)))+  (let ((l1_s2739 (ite l1_s2707 l1_s2738 l1_s2737)))+  (let ((l1_s2740 (xor l1_s4 l1_s235)))+  (let ((l1_s2741 (ite l1_s2259 l1_s2740 l1_s235)))+  (let ((l1_s2742 (xor l1_s486 l1_s2741)))+  (let ((l1_s2743 (ite l1_s2291 l1_s2742 l1_s2741)))+  (let ((l1_s2744 (xor l1_s456 l1_s2743)))+  (let ((l1_s2745 (ite l1_s2323 l1_s2744 l1_s2743)))+  (let ((l1_s2746 (xor l1_s428 l1_s2745)))+  (let ((l1_s2747 (ite l1_s2355 l1_s2746 l1_s2745)))+  (let ((l1_s2748 (xor l1_s402 l1_s2747)))+  (let ((l1_s2749 (ite l1_s2387 l1_s2748 l1_s2747)))+  (let ((l1_s2750 (xor l1_s378 l1_s2749)))+  (let ((l1_s2751 (ite l1_s2419 l1_s2750 l1_s2749)))+  (let ((l1_s2752 (xor l1_s356 l1_s2751)))+  (let ((l1_s2753 (ite l1_s2451 l1_s2752 l1_s2751)))+  (let ((l1_s2754 (xor l1_s336 l1_s2753)))+  (let ((l1_s2755 (ite l1_s2483 l1_s2754 l1_s2753)))+  (let ((l1_s2756 (xor l1_s318 l1_s2755)))+  (let ((l1_s2757 (ite l1_s2515 l1_s2756 l1_s2755)))+  (let ((l1_s2758 (xor l1_s302 l1_s2757)))+  (let ((l1_s2759 (ite l1_s2547 l1_s2758 l1_s2757)))+  (let ((l1_s2760 (xor l1_s288 l1_s2759)))+  (let ((l1_s2761 (ite l1_s2579 l1_s2760 l1_s2759)))+  (let ((l1_s2762 (xor l1_s276 l1_s2761)))+  (let ((l1_s2763 (ite l1_s2611 l1_s2762 l1_s2761)))+  (let ((l1_s2764 (xor l1_s266 l1_s2763)))+  (let ((l1_s2765 (ite l1_s2643 l1_s2764 l1_s2763)))+  (let ((l1_s2766 (xor l1_s258 l1_s2765)))+  (let ((l1_s2767 (ite l1_s2675 l1_s2766 l1_s2765)))+  (let ((l1_s2768 (xor l1_s252 l1_s2767)))+  (let ((l1_s2769 (ite l1_s2707 l1_s2768 l1_s2767)))+  (let ((l1_s2770 (xor l1_s248 l1_s2769)))+  (let ((l1_s2771 (ite l1_s2739 l1_s2770 l1_s2769)))+  (let ((l1_s2772 (xor l1_s4 l1_s240)))+  (let ((l1_s2773 (ite l1_s2291 l1_s2772 l1_s240)))+  (let ((l1_s2774 (xor l1_s486 l1_s2773)))+  (let ((l1_s2775 (ite l1_s2323 l1_s2774 l1_s2773)))+  (let ((l1_s2776 (xor l1_s456 l1_s2775)))+  (let ((l1_s2777 (ite l1_s2355 l1_s2776 l1_s2775)))+  (let ((l1_s2778 (xor l1_s428 l1_s2777)))+  (let ((l1_s2779 (ite l1_s2387 l1_s2778 l1_s2777)))+  (let ((l1_s2780 (xor l1_s402 l1_s2779)))+  (let ((l1_s2781 (ite l1_s2419 l1_s2780 l1_s2779)))+  (let ((l1_s2782 (xor l1_s378 l1_s2781)))+  (let ((l1_s2783 (ite l1_s2451 l1_s2782 l1_s2781)))+  (let ((l1_s2784 (xor l1_s356 l1_s2783)))+  (let ((l1_s2785 (ite l1_s2483 l1_s2784 l1_s2783)))+  (let ((l1_s2786 (xor l1_s336 l1_s2785)))+  (let ((l1_s2787 (ite l1_s2515 l1_s2786 l1_s2785)))+  (let ((l1_s2788 (xor l1_s318 l1_s2787)))+  (let ((l1_s2789 (ite l1_s2547 l1_s2788 l1_s2787)))+  (let ((l1_s2790 (xor l1_s302 l1_s2789)))+  (let ((l1_s2791 (ite l1_s2579 l1_s2790 l1_s2789)))+  (let ((l1_s2792 (xor l1_s288 l1_s2791)))+  (let ((l1_s2793 (ite l1_s2611 l1_s2792 l1_s2791)))+  (let ((l1_s2794 (xor l1_s276 l1_s2793)))+  (let ((l1_s2795 (ite l1_s2643 l1_s2794 l1_s2793)))+  (let ((l1_s2796 (xor l1_s266 l1_s2795)))+  (let ((l1_s2797 (ite l1_s2675 l1_s2796 l1_s2795)))+  (let ((l1_s2798 (xor l1_s258 l1_s2797)))+  (let ((l1_s2799 (ite l1_s2707 l1_s2798 l1_s2797)))+  (let ((l1_s2800 (xor l1_s252 l1_s2799)))+  (let ((l1_s2801 (ite l1_s2739 l1_s2800 l1_s2799)))+  (let ((l1_s2802 (xor l1_s248 l1_s2801)))+  (let ((l1_s2803 (ite l1_s2771 l1_s2802 l1_s2801)))+  (let ((l1_s2804 (xor l1_s4 l1_s245)))+  (let ((l1_s2805 (ite l1_s2323 l1_s2804 l1_s245)))+  (let ((l1_s2806 (xor l1_s486 l1_s2805)))+  (let ((l1_s2807 (ite l1_s2355 l1_s2806 l1_s2805)))+  (let ((l1_s2808 (xor l1_s456 l1_s2807)))+  (let ((l1_s2809 (ite l1_s2387 l1_s2808 l1_s2807)))+  (let ((l1_s2810 (xor l1_s428 l1_s2809)))+  (let ((l1_s2811 (ite l1_s2419 l1_s2810 l1_s2809)))+  (let ((l1_s2812 (xor l1_s402 l1_s2811)))+  (let ((l1_s2813 (ite l1_s2451 l1_s2812 l1_s2811)))+  (let ((l1_s2814 (xor l1_s378 l1_s2813)))+  (let ((l1_s2815 (ite l1_s2483 l1_s2814 l1_s2813)))+  (let ((l1_s2816 (xor l1_s356 l1_s2815)))+  (let ((l1_s2817 (ite l1_s2515 l1_s2816 l1_s2815)))+  (let ((l1_s2818 (xor l1_s336 l1_s2817)))+  (let ((l1_s2819 (ite l1_s2547 l1_s2818 l1_s2817)))+  (let ((l1_s2820 (xor l1_s318 l1_s2819)))+  (let ((l1_s2821 (ite l1_s2579 l1_s2820 l1_s2819)))+  (let ((l1_s2822 (xor l1_s302 l1_s2821)))+  (let ((l1_s2823 (ite l1_s2611 l1_s2822 l1_s2821)))+  (let ((l1_s2824 (xor l1_s288 l1_s2823)))+  (let ((l1_s2825 (ite l1_s2643 l1_s2824 l1_s2823)))+  (let ((l1_s2826 (xor l1_s276 l1_s2825)))+  (let ((l1_s2827 (ite l1_s2675 l1_s2826 l1_s2825)))+  (let ((l1_s2828 (xor l1_s266 l1_s2827)))+  (let ((l1_s2829 (ite l1_s2707 l1_s2828 l1_s2827)))+  (let ((l1_s2830 (xor l1_s258 l1_s2829)))+  (let ((l1_s2831 (ite l1_s2739 l1_s2830 l1_s2829)))+  (let ((l1_s2832 (xor l1_s252 l1_s2831)))+  (let ((l1_s2833 (ite l1_s2771 l1_s2832 l1_s2831)))+  (let ((l1_s2834 (xor l1_s248 l1_s2833)))+  (let ((l1_s2835 (ite l1_s2803 l1_s2834 l1_s2833)))+  (let ((l1_s2836 (and l1_s4 l1_s2355)))+  (let ((l1_s2837 (xor l1_s486 l1_s2836)))+  (let ((l1_s2838 (ite l1_s2387 l1_s2837 l1_s2836)))+  (let ((l1_s2839 (xor l1_s456 l1_s2838)))+  (let ((l1_s2840 (ite l1_s2419 l1_s2839 l1_s2838)))+  (let ((l1_s2841 (xor l1_s428 l1_s2840)))+  (let ((l1_s2842 (ite l1_s2451 l1_s2841 l1_s2840)))+  (let ((l1_s2843 (xor l1_s402 l1_s2842)))+  (let ((l1_s2844 (ite l1_s2483 l1_s2843 l1_s2842)))+  (let ((l1_s2845 (xor l1_s378 l1_s2844)))+  (let ((l1_s2846 (ite l1_s2515 l1_s2845 l1_s2844)))+  (let ((l1_s2847 (xor l1_s356 l1_s2846)))+  (let ((l1_s2848 (ite l1_s2547 l1_s2847 l1_s2846)))+  (let ((l1_s2849 (xor l1_s336 l1_s2848)))+  (let ((l1_s2850 (ite l1_s2579 l1_s2849 l1_s2848)))+  (let ((l1_s2851 (xor l1_s318 l1_s2850)))+  (let ((l1_s2852 (ite l1_s2611 l1_s2851 l1_s2850)))+  (let ((l1_s2853 (xor l1_s302 l1_s2852)))+  (let ((l1_s2854 (ite l1_s2643 l1_s2853 l1_s2852)))+  (let ((l1_s2855 (xor l1_s288 l1_s2854)))+  (let ((l1_s2856 (ite l1_s2675 l1_s2855 l1_s2854)))+  (let ((l1_s2857 (xor l1_s276 l1_s2856)))+  (let ((l1_s2858 (ite l1_s2707 l1_s2857 l1_s2856)))+  (let ((l1_s2859 (xor l1_s266 l1_s2858)))+  (let ((l1_s2860 (ite l1_s2739 l1_s2859 l1_s2858)))+  (let ((l1_s2861 (xor l1_s258 l1_s2860)))+  (let ((l1_s2862 (ite l1_s2771 l1_s2861 l1_s2860)))+  (let ((l1_s2863 (xor l1_s252 l1_s2862)))+  (let ((l1_s2864 (ite l1_s2803 l1_s2863 l1_s2862)))+  (let ((l1_s2865 (xor l1_s248 l1_s2864)))+  (let ((l1_s2866 (ite l1_s2835 l1_s2865 l1_s2864)))+  (let ((l1_s2867 (xor l1_s1571 l1_s2866)))+  (let ((l1_s2868 (and l1_s4 l1_s1092)))+  (let ((l1_s2869 (xor l1_s486 l1_s2868)))+  (let ((l1_s2870 (ite l1_s1124 l1_s2869 l1_s2868)))+  (let ((l1_s2871 (xor l1_s456 l1_s2870)))+  (let ((l1_s2872 (ite l1_s1156 l1_s2871 l1_s2870)))+  (let ((l1_s2873 (xor l1_s428 l1_s2872)))+  (let ((l1_s2874 (ite l1_s1188 l1_s2873 l1_s2872)))+  (let ((l1_s2875 (xor l1_s402 l1_s2874)))+  (let ((l1_s2876 (ite l1_s1220 l1_s2875 l1_s2874)))+  (let ((l1_s2877 (xor l1_s378 l1_s2876)))+  (let ((l1_s2878 (ite l1_s1252 l1_s2877 l1_s2876)))+  (let ((l1_s2879 (xor l1_s356 l1_s2878)))+  (let ((l1_s2880 (ite l1_s1284 l1_s2879 l1_s2878)))+  (let ((l1_s2881 (xor l1_s336 l1_s2880)))+  (let ((l1_s2882 (ite l1_s1316 l1_s2881 l1_s2880)))+  (let ((l1_s2883 (xor l1_s318 l1_s2882)))+  (let ((l1_s2884 (ite l1_s1348 l1_s2883 l1_s2882)))+  (let ((l1_s2885 (xor l1_s302 l1_s2884)))+  (let ((l1_s2886 (ite l1_s1380 l1_s2885 l1_s2884)))+  (let ((l1_s2887 (xor l1_s288 l1_s2886)))+  (let ((l1_s2888 (ite l1_s1412 l1_s2887 l1_s2886)))+  (let ((l1_s2889 (xor l1_s276 l1_s2888)))+  (let ((l1_s2890 (ite l1_s1444 l1_s2889 l1_s2888)))+  (let ((l1_s2891 (xor l1_s266 l1_s2890)))+  (let ((l1_s2892 (ite l1_s1476 l1_s2891 l1_s2890)))+  (let ((l1_s2893 (xor l1_s258 l1_s2892)))+  (let ((l1_s2894 (ite l1_s1508 l1_s2893 l1_s2892)))+  (let ((l1_s2895 (xor l1_s252 l1_s2894)))+  (let ((l1_s2896 (ite l1_s1540 l1_s2895 l1_s2894)))+  (let ((l1_s2897 (and l1_s4 l1_s2387)))+  (let ((l1_s2898 (xor l1_s486 l1_s2897)))+  (let ((l1_s2899 (ite l1_s2419 l1_s2898 l1_s2897)))+  (let ((l1_s2900 (xor l1_s456 l1_s2899)))+  (let ((l1_s2901 (ite l1_s2451 l1_s2900 l1_s2899)))+  (let ((l1_s2902 (xor l1_s428 l1_s2901)))+  (let ((l1_s2903 (ite l1_s2483 l1_s2902 l1_s2901)))+  (let ((l1_s2904 (xor l1_s402 l1_s2903)))+  (let ((l1_s2905 (ite l1_s2515 l1_s2904 l1_s2903)))+  (let ((l1_s2906 (xor l1_s378 l1_s2905)))+  (let ((l1_s2907 (ite l1_s2547 l1_s2906 l1_s2905)))+  (let ((l1_s2908 (xor l1_s356 l1_s2907)))+  (let ((l1_s2909 (ite l1_s2579 l1_s2908 l1_s2907)))+  (let ((l1_s2910 (xor l1_s336 l1_s2909)))+  (let ((l1_s2911 (ite l1_s2611 l1_s2910 l1_s2909)))+  (let ((l1_s2912 (xor l1_s318 l1_s2911)))+  (let ((l1_s2913 (ite l1_s2643 l1_s2912 l1_s2911)))+  (let ((l1_s2914 (xor l1_s302 l1_s2913)))+  (let ((l1_s2915 (ite l1_s2675 l1_s2914 l1_s2913)))+  (let ((l1_s2916 (xor l1_s288 l1_s2915)))+  (let ((l1_s2917 (ite l1_s2707 l1_s2916 l1_s2915)))+  (let ((l1_s2918 (xor l1_s276 l1_s2917)))+  (let ((l1_s2919 (ite l1_s2739 l1_s2918 l1_s2917)))+  (let ((l1_s2920 (xor l1_s266 l1_s2919)))+  (let ((l1_s2921 (ite l1_s2771 l1_s2920 l1_s2919)))+  (let ((l1_s2922 (xor l1_s258 l1_s2921)))+  (let ((l1_s2923 (ite l1_s2803 l1_s2922 l1_s2921)))+  (let ((l1_s2924 (xor l1_s252 l1_s2923)))+  (let ((l1_s2925 (ite l1_s2835 l1_s2924 l1_s2923)))+  (let ((l1_s2926 (xor l1_s2896 l1_s2925)))+  (let ((l1_s2927 (and l1_s4 l1_s1124)))+  (let ((l1_s2928 (xor l1_s486 l1_s2927)))+  (let ((l1_s2929 (ite l1_s1156 l1_s2928 l1_s2927)))+  (let ((l1_s2930 (xor l1_s456 l1_s2929)))+  (let ((l1_s2931 (ite l1_s1188 l1_s2930 l1_s2929)))+  (let ((l1_s2932 (xor l1_s428 l1_s2931)))+  (let ((l1_s2933 (ite l1_s1220 l1_s2932 l1_s2931)))+  (let ((l1_s2934 (xor l1_s402 l1_s2933)))+  (let ((l1_s2935 (ite l1_s1252 l1_s2934 l1_s2933)))+  (let ((l1_s2936 (xor l1_s378 l1_s2935)))+  (let ((l1_s2937 (ite l1_s1284 l1_s2936 l1_s2935)))+  (let ((l1_s2938 (xor l1_s356 l1_s2937)))+  (let ((l1_s2939 (ite l1_s1316 l1_s2938 l1_s2937)))+  (let ((l1_s2940 (xor l1_s336 l1_s2939)))+  (let ((l1_s2941 (ite l1_s1348 l1_s2940 l1_s2939)))+  (let ((l1_s2942 (xor l1_s318 l1_s2941)))+  (let ((l1_s2943 (ite l1_s1380 l1_s2942 l1_s2941)))+  (let ((l1_s2944 (xor l1_s302 l1_s2943)))+  (let ((l1_s2945 (ite l1_s1412 l1_s2944 l1_s2943)))+  (let ((l1_s2946 (xor l1_s288 l1_s2945)))+  (let ((l1_s2947 (ite l1_s1444 l1_s2946 l1_s2945)))+  (let ((l1_s2948 (xor l1_s276 l1_s2947)))+  (let ((l1_s2949 (ite l1_s1476 l1_s2948 l1_s2947)))+  (let ((l1_s2950 (xor l1_s266 l1_s2949)))+  (let ((l1_s2951 (ite l1_s1508 l1_s2950 l1_s2949)))+  (let ((l1_s2952 (xor l1_s258 l1_s2951)))+  (let ((l1_s2953 (ite l1_s1540 l1_s2952 l1_s2951)))+  (let ((l1_s2954 (and l1_s4 l1_s2419)))+  (let ((l1_s2955 (xor l1_s486 l1_s2954)))+  (let ((l1_s2956 (ite l1_s2451 l1_s2955 l1_s2954)))+  (let ((l1_s2957 (xor l1_s456 l1_s2956)))+  (let ((l1_s2958 (ite l1_s2483 l1_s2957 l1_s2956)))+  (let ((l1_s2959 (xor l1_s428 l1_s2958)))+  (let ((l1_s2960 (ite l1_s2515 l1_s2959 l1_s2958)))+  (let ((l1_s2961 (xor l1_s402 l1_s2960)))+  (let ((l1_s2962 (ite l1_s2547 l1_s2961 l1_s2960)))+  (let ((l1_s2963 (xor l1_s378 l1_s2962)))+  (let ((l1_s2964 (ite l1_s2579 l1_s2963 l1_s2962)))+  (let ((l1_s2965 (xor l1_s356 l1_s2964)))+  (let ((l1_s2966 (ite l1_s2611 l1_s2965 l1_s2964)))+  (let ((l1_s2967 (xor l1_s336 l1_s2966)))+  (let ((l1_s2968 (ite l1_s2643 l1_s2967 l1_s2966)))+  (let ((l1_s2969 (xor l1_s318 l1_s2968)))+  (let ((l1_s2970 (ite l1_s2675 l1_s2969 l1_s2968)))+  (let ((l1_s2971 (xor l1_s302 l1_s2970)))+  (let ((l1_s2972 (ite l1_s2707 l1_s2971 l1_s2970)))+  (let ((l1_s2973 (xor l1_s288 l1_s2972)))+  (let ((l1_s2974 (ite l1_s2739 l1_s2973 l1_s2972)))+  (let ((l1_s2975 (xor l1_s276 l1_s2974)))+  (let ((l1_s2976 (ite l1_s2771 l1_s2975 l1_s2974)))+  (let ((l1_s2977 (xor l1_s266 l1_s2976)))+  (let ((l1_s2978 (ite l1_s2803 l1_s2977 l1_s2976)))+  (let ((l1_s2979 (xor l1_s258 l1_s2978)))+  (let ((l1_s2980 (ite l1_s2835 l1_s2979 l1_s2978)))+  (let ((l1_s2981 (xor l1_s2953 l1_s2980)))+  (let ((l1_s2982 (and l1_s4 l1_s1156)))+  (let ((l1_s2983 (xor l1_s486 l1_s2982)))+  (let ((l1_s2984 (ite l1_s1188 l1_s2983 l1_s2982)))+  (let ((l1_s2985 (xor l1_s456 l1_s2984)))+  (let ((l1_s2986 (ite l1_s1220 l1_s2985 l1_s2984)))+  (let ((l1_s2987 (xor l1_s428 l1_s2986)))+  (let ((l1_s2988 (ite l1_s1252 l1_s2987 l1_s2986)))+  (let ((l1_s2989 (xor l1_s402 l1_s2988)))+  (let ((l1_s2990 (ite l1_s1284 l1_s2989 l1_s2988)))+  (let ((l1_s2991 (xor l1_s378 l1_s2990)))+  (let ((l1_s2992 (ite l1_s1316 l1_s2991 l1_s2990)))+  (let ((l1_s2993 (xor l1_s356 l1_s2992)))+  (let ((l1_s2994 (ite l1_s1348 l1_s2993 l1_s2992)))+  (let ((l1_s2995 (xor l1_s336 l1_s2994)))+  (let ((l1_s2996 (ite l1_s1380 l1_s2995 l1_s2994)))+  (let ((l1_s2997 (xor l1_s318 l1_s2996)))+  (let ((l1_s2998 (ite l1_s1412 l1_s2997 l1_s2996)))+  (let ((l1_s2999 (xor l1_s302 l1_s2998)))+  (let ((l1_s3000 (ite l1_s1444 l1_s2999 l1_s2998)))+  (let ((l1_s3001 (xor l1_s288 l1_s3000)))+  (let ((l1_s3002 (ite l1_s1476 l1_s3001 l1_s3000)))+  (let ((l1_s3003 (xor l1_s276 l1_s3002)))+  (let ((l1_s3004 (ite l1_s1508 l1_s3003 l1_s3002)))+  (let ((l1_s3005 (xor l1_s266 l1_s3004)))+  (let ((l1_s3006 (ite l1_s1540 l1_s3005 l1_s3004)))+  (let ((l1_s3007 (and l1_s4 l1_s2451)))+  (let ((l1_s3008 (xor l1_s486 l1_s3007)))+  (let ((l1_s3009 (ite l1_s2483 l1_s3008 l1_s3007)))+  (let ((l1_s3010 (xor l1_s456 l1_s3009)))+  (let ((l1_s3011 (ite l1_s2515 l1_s3010 l1_s3009)))+  (let ((l1_s3012 (xor l1_s428 l1_s3011)))+  (let ((l1_s3013 (ite l1_s2547 l1_s3012 l1_s3011)))+  (let ((l1_s3014 (xor l1_s402 l1_s3013)))+  (let ((l1_s3015 (ite l1_s2579 l1_s3014 l1_s3013)))+  (let ((l1_s3016 (xor l1_s378 l1_s3015)))+  (let ((l1_s3017 (ite l1_s2611 l1_s3016 l1_s3015)))+  (let ((l1_s3018 (xor l1_s356 l1_s3017)))+  (let ((l1_s3019 (ite l1_s2643 l1_s3018 l1_s3017)))+  (let ((l1_s3020 (xor l1_s336 l1_s3019)))+  (let ((l1_s3021 (ite l1_s2675 l1_s3020 l1_s3019)))+  (let ((l1_s3022 (xor l1_s318 l1_s3021)))+  (let ((l1_s3023 (ite l1_s2707 l1_s3022 l1_s3021)))+  (let ((l1_s3024 (xor l1_s302 l1_s3023)))+  (let ((l1_s3025 (ite l1_s2739 l1_s3024 l1_s3023)))+  (let ((l1_s3026 (xor l1_s288 l1_s3025)))+  (let ((l1_s3027 (ite l1_s2771 l1_s3026 l1_s3025)))+  (let ((l1_s3028 (xor l1_s276 l1_s3027)))+  (let ((l1_s3029 (ite l1_s2803 l1_s3028 l1_s3027)))+  (let ((l1_s3030 (xor l1_s266 l1_s3029)))+  (let ((l1_s3031 (ite l1_s2835 l1_s3030 l1_s3029)))+  (let ((l1_s3032 (xor l1_s3006 l1_s3031)))+  (let ((l1_s3033 (and l1_s4 l1_s1188)))+  (let ((l1_s3034 (xor l1_s486 l1_s3033)))+  (let ((l1_s3035 (ite l1_s1220 l1_s3034 l1_s3033)))+  (let ((l1_s3036 (xor l1_s456 l1_s3035)))+  (let ((l1_s3037 (ite l1_s1252 l1_s3036 l1_s3035)))+  (let ((l1_s3038 (xor l1_s428 l1_s3037)))+  (let ((l1_s3039 (ite l1_s1284 l1_s3038 l1_s3037)))+  (let ((l1_s3040 (xor l1_s402 l1_s3039)))+  (let ((l1_s3041 (ite l1_s1316 l1_s3040 l1_s3039)))+  (let ((l1_s3042 (xor l1_s378 l1_s3041)))+  (let ((l1_s3043 (ite l1_s1348 l1_s3042 l1_s3041)))+  (let ((l1_s3044 (xor l1_s356 l1_s3043)))+  (let ((l1_s3045 (ite l1_s1380 l1_s3044 l1_s3043)))+  (let ((l1_s3046 (xor l1_s336 l1_s3045)))+  (let ((l1_s3047 (ite l1_s1412 l1_s3046 l1_s3045)))+  (let ((l1_s3048 (xor l1_s318 l1_s3047)))+  (let ((l1_s3049 (ite l1_s1444 l1_s3048 l1_s3047)))+  (let ((l1_s3050 (xor l1_s302 l1_s3049)))+  (let ((l1_s3051 (ite l1_s1476 l1_s3050 l1_s3049)))+  (let ((l1_s3052 (xor l1_s288 l1_s3051)))+  (let ((l1_s3053 (ite l1_s1508 l1_s3052 l1_s3051)))+  (let ((l1_s3054 (xor l1_s276 l1_s3053)))+  (let ((l1_s3055 (ite l1_s1540 l1_s3054 l1_s3053)))+  (let ((l1_s3056 (and l1_s4 l1_s2483)))+  (let ((l1_s3057 (xor l1_s486 l1_s3056)))+  (let ((l1_s3058 (ite l1_s2515 l1_s3057 l1_s3056)))+  (let ((l1_s3059 (xor l1_s456 l1_s3058)))+  (let ((l1_s3060 (ite l1_s2547 l1_s3059 l1_s3058)))+  (let ((l1_s3061 (xor l1_s428 l1_s3060)))+  (let ((l1_s3062 (ite l1_s2579 l1_s3061 l1_s3060)))+  (let ((l1_s3063 (xor l1_s402 l1_s3062)))+  (let ((l1_s3064 (ite l1_s2611 l1_s3063 l1_s3062)))+  (let ((l1_s3065 (xor l1_s378 l1_s3064)))+  (let ((l1_s3066 (ite l1_s2643 l1_s3065 l1_s3064)))+  (let ((l1_s3067 (xor l1_s356 l1_s3066)))+  (let ((l1_s3068 (ite l1_s2675 l1_s3067 l1_s3066)))+  (let ((l1_s3069 (xor l1_s336 l1_s3068)))+  (let ((l1_s3070 (ite l1_s2707 l1_s3069 l1_s3068)))+  (let ((l1_s3071 (xor l1_s318 l1_s3070)))+  (let ((l1_s3072 (ite l1_s2739 l1_s3071 l1_s3070)))+  (let ((l1_s3073 (xor l1_s302 l1_s3072)))+  (let ((l1_s3074 (ite l1_s2771 l1_s3073 l1_s3072)))+  (let ((l1_s3075 (xor l1_s288 l1_s3074)))+  (let ((l1_s3076 (ite l1_s2803 l1_s3075 l1_s3074)))+  (let ((l1_s3077 (xor l1_s276 l1_s3076)))+  (let ((l1_s3078 (ite l1_s2835 l1_s3077 l1_s3076)))+  (let ((l1_s3079 (xor l1_s3055 l1_s3078)))+  (let ((l1_s3080 (and l1_s4 l1_s1220)))+  (let ((l1_s3081 (xor l1_s486 l1_s3080)))+  (let ((l1_s3082 (ite l1_s1252 l1_s3081 l1_s3080)))+  (let ((l1_s3083 (xor l1_s456 l1_s3082)))+  (let ((l1_s3084 (ite l1_s1284 l1_s3083 l1_s3082)))+  (let ((l1_s3085 (xor l1_s428 l1_s3084)))+  (let ((l1_s3086 (ite l1_s1316 l1_s3085 l1_s3084)))+  (let ((l1_s3087 (xor l1_s402 l1_s3086)))+  (let ((l1_s3088 (ite l1_s1348 l1_s3087 l1_s3086)))+  (let ((l1_s3089 (xor l1_s378 l1_s3088)))+  (let ((l1_s3090 (ite l1_s1380 l1_s3089 l1_s3088)))+  (let ((l1_s3091 (xor l1_s356 l1_s3090)))+  (let ((l1_s3092 (ite l1_s1412 l1_s3091 l1_s3090)))+  (let ((l1_s3093 (xor l1_s336 l1_s3092)))+  (let ((l1_s3094 (ite l1_s1444 l1_s3093 l1_s3092)))+  (let ((l1_s3095 (xor l1_s318 l1_s3094)))+  (let ((l1_s3096 (ite l1_s1476 l1_s3095 l1_s3094)))+  (let ((l1_s3097 (xor l1_s302 l1_s3096)))+  (let ((l1_s3098 (ite l1_s1508 l1_s3097 l1_s3096)))+  (let ((l1_s3099 (xor l1_s288 l1_s3098)))+  (let ((l1_s3100 (ite l1_s1540 l1_s3099 l1_s3098)))+  (let ((l1_s3101 (and l1_s4 l1_s2515)))+  (let ((l1_s3102 (xor l1_s486 l1_s3101)))+  (let ((l1_s3103 (ite l1_s2547 l1_s3102 l1_s3101)))+  (let ((l1_s3104 (xor l1_s456 l1_s3103)))+  (let ((l1_s3105 (ite l1_s2579 l1_s3104 l1_s3103)))+  (let ((l1_s3106 (xor l1_s428 l1_s3105)))+  (let ((l1_s3107 (ite l1_s2611 l1_s3106 l1_s3105)))+  (let ((l1_s3108 (xor l1_s402 l1_s3107)))+  (let ((l1_s3109 (ite l1_s2643 l1_s3108 l1_s3107)))+  (let ((l1_s3110 (xor l1_s378 l1_s3109)))+  (let ((l1_s3111 (ite l1_s2675 l1_s3110 l1_s3109)))+  (let ((l1_s3112 (xor l1_s356 l1_s3111)))+  (let ((l1_s3113 (ite l1_s2707 l1_s3112 l1_s3111)))+  (let ((l1_s3114 (xor l1_s336 l1_s3113)))+  (let ((l1_s3115 (ite l1_s2739 l1_s3114 l1_s3113)))+  (let ((l1_s3116 (xor l1_s318 l1_s3115)))+  (let ((l1_s3117 (ite l1_s2771 l1_s3116 l1_s3115)))+  (let ((l1_s3118 (xor l1_s302 l1_s3117)))+  (let ((l1_s3119 (ite l1_s2803 l1_s3118 l1_s3117)))+  (let ((l1_s3120 (xor l1_s288 l1_s3119)))+  (let ((l1_s3121 (ite l1_s2835 l1_s3120 l1_s3119)))+  (let ((l1_s3122 (xor l1_s3100 l1_s3121)))+  (let ((l1_s3123 (and l1_s4 l1_s1252)))+  (let ((l1_s3124 (xor l1_s486 l1_s3123)))+  (let ((l1_s3125 (ite l1_s1284 l1_s3124 l1_s3123)))+  (let ((l1_s3126 (xor l1_s456 l1_s3125)))+  (let ((l1_s3127 (ite l1_s1316 l1_s3126 l1_s3125)))+  (let ((l1_s3128 (xor l1_s428 l1_s3127)))+  (let ((l1_s3129 (ite l1_s1348 l1_s3128 l1_s3127)))+  (let ((l1_s3130 (xor l1_s402 l1_s3129)))+  (let ((l1_s3131 (ite l1_s1380 l1_s3130 l1_s3129)))+  (let ((l1_s3132 (xor l1_s378 l1_s3131)))+  (let ((l1_s3133 (ite l1_s1412 l1_s3132 l1_s3131)))+  (let ((l1_s3134 (xor l1_s356 l1_s3133)))+  (let ((l1_s3135 (ite l1_s1444 l1_s3134 l1_s3133)))+  (let ((l1_s3136 (xor l1_s336 l1_s3135)))+  (let ((l1_s3137 (ite l1_s1476 l1_s3136 l1_s3135)))+  (let ((l1_s3138 (xor l1_s318 l1_s3137)))+  (let ((l1_s3139 (ite l1_s1508 l1_s3138 l1_s3137)))+  (let ((l1_s3140 (xor l1_s302 l1_s3139)))+  (let ((l1_s3141 (ite l1_s1540 l1_s3140 l1_s3139)))+  (let ((l1_s3142 (and l1_s4 l1_s2547)))+  (let ((l1_s3143 (xor l1_s486 l1_s3142)))+  (let ((l1_s3144 (ite l1_s2579 l1_s3143 l1_s3142)))+  (let ((l1_s3145 (xor l1_s456 l1_s3144)))+  (let ((l1_s3146 (ite l1_s2611 l1_s3145 l1_s3144)))+  (let ((l1_s3147 (xor l1_s428 l1_s3146)))+  (let ((l1_s3148 (ite l1_s2643 l1_s3147 l1_s3146)))+  (let ((l1_s3149 (xor l1_s402 l1_s3148)))+  (let ((l1_s3150 (ite l1_s2675 l1_s3149 l1_s3148)))+  (let ((l1_s3151 (xor l1_s378 l1_s3150)))+  (let ((l1_s3152 (ite l1_s2707 l1_s3151 l1_s3150)))+  (let ((l1_s3153 (xor l1_s356 l1_s3152)))+  (let ((l1_s3154 (ite l1_s2739 l1_s3153 l1_s3152)))+  (let ((l1_s3155 (xor l1_s336 l1_s3154)))+  (let ((l1_s3156 (ite l1_s2771 l1_s3155 l1_s3154)))+  (let ((l1_s3157 (xor l1_s318 l1_s3156)))+  (let ((l1_s3158 (ite l1_s2803 l1_s3157 l1_s3156)))+  (let ((l1_s3159 (xor l1_s302 l1_s3158)))+  (let ((l1_s3160 (ite l1_s2835 l1_s3159 l1_s3158)))+  (let ((l1_s3161 (xor l1_s3141 l1_s3160)))+  (let ((l1_s3162 (and l1_s4 l1_s1284)))+  (let ((l1_s3163 (xor l1_s486 l1_s3162)))+  (let ((l1_s3164 (ite l1_s1316 l1_s3163 l1_s3162)))+  (let ((l1_s3165 (xor l1_s456 l1_s3164)))+  (let ((l1_s3166 (ite l1_s1348 l1_s3165 l1_s3164)))+  (let ((l1_s3167 (xor l1_s428 l1_s3166)))+  (let ((l1_s3168 (ite l1_s1380 l1_s3167 l1_s3166)))+  (let ((l1_s3169 (xor l1_s402 l1_s3168)))+  (let ((l1_s3170 (ite l1_s1412 l1_s3169 l1_s3168)))+  (let ((l1_s3171 (xor l1_s378 l1_s3170)))+  (let ((l1_s3172 (ite l1_s1444 l1_s3171 l1_s3170)))+  (let ((l1_s3173 (xor l1_s356 l1_s3172)))+  (let ((l1_s3174 (ite l1_s1476 l1_s3173 l1_s3172)))+  (let ((l1_s3175 (xor l1_s336 l1_s3174)))+  (let ((l1_s3176 (ite l1_s1508 l1_s3175 l1_s3174)))+  (let ((l1_s3177 (xor l1_s318 l1_s3176)))+  (let ((l1_s3178 (ite l1_s1540 l1_s3177 l1_s3176)))+  (let ((l1_s3179 (and l1_s4 l1_s2579)))+  (let ((l1_s3180 (xor l1_s486 l1_s3179)))+  (let ((l1_s3181 (ite l1_s2611 l1_s3180 l1_s3179)))+  (let ((l1_s3182 (xor l1_s456 l1_s3181)))+  (let ((l1_s3183 (ite l1_s2643 l1_s3182 l1_s3181)))+  (let ((l1_s3184 (xor l1_s428 l1_s3183)))+  (let ((l1_s3185 (ite l1_s2675 l1_s3184 l1_s3183)))+  (let ((l1_s3186 (xor l1_s402 l1_s3185)))+  (let ((l1_s3187 (ite l1_s2707 l1_s3186 l1_s3185)))+  (let ((l1_s3188 (xor l1_s378 l1_s3187)))+  (let ((l1_s3189 (ite l1_s2739 l1_s3188 l1_s3187)))+  (let ((l1_s3190 (xor l1_s356 l1_s3189)))+  (let ((l1_s3191 (ite l1_s2771 l1_s3190 l1_s3189)))+  (let ((l1_s3192 (xor l1_s336 l1_s3191)))+  (let ((l1_s3193 (ite l1_s2803 l1_s3192 l1_s3191)))+  (let ((l1_s3194 (xor l1_s318 l1_s3193)))+  (let ((l1_s3195 (ite l1_s2835 l1_s3194 l1_s3193)))+  (let ((l1_s3196 (xor l1_s3178 l1_s3195)))+  (let ((l1_s3197 (and l1_s4 l1_s1316)))+  (let ((l1_s3198 (xor l1_s486 l1_s3197)))+  (let ((l1_s3199 (ite l1_s1348 l1_s3198 l1_s3197)))+  (let ((l1_s3200 (xor l1_s456 l1_s3199)))+  (let ((l1_s3201 (ite l1_s1380 l1_s3200 l1_s3199)))+  (let ((l1_s3202 (xor l1_s428 l1_s3201)))+  (let ((l1_s3203 (ite l1_s1412 l1_s3202 l1_s3201)))+  (let ((l1_s3204 (xor l1_s402 l1_s3203)))+  (let ((l1_s3205 (ite l1_s1444 l1_s3204 l1_s3203)))+  (let ((l1_s3206 (xor l1_s378 l1_s3205)))+  (let ((l1_s3207 (ite l1_s1476 l1_s3206 l1_s3205)))+  (let ((l1_s3208 (xor l1_s356 l1_s3207)))+  (let ((l1_s3209 (ite l1_s1508 l1_s3208 l1_s3207)))+  (let ((l1_s3210 (xor l1_s336 l1_s3209)))+  (let ((l1_s3211 (ite l1_s1540 l1_s3210 l1_s3209)))+  (let ((l1_s3212 (and l1_s4 l1_s2611)))+  (let ((l1_s3213 (xor l1_s486 l1_s3212)))+  (let ((l1_s3214 (ite l1_s2643 l1_s3213 l1_s3212)))+  (let ((l1_s3215 (xor l1_s456 l1_s3214)))+  (let ((l1_s3216 (ite l1_s2675 l1_s3215 l1_s3214)))+  (let ((l1_s3217 (xor l1_s428 l1_s3216)))+  (let ((l1_s3218 (ite l1_s2707 l1_s3217 l1_s3216)))+  (let ((l1_s3219 (xor l1_s402 l1_s3218)))+  (let ((l1_s3220 (ite l1_s2739 l1_s3219 l1_s3218)))+  (let ((l1_s3221 (xor l1_s378 l1_s3220)))+  (let ((l1_s3222 (ite l1_s2771 l1_s3221 l1_s3220)))+  (let ((l1_s3223 (xor l1_s356 l1_s3222)))+  (let ((l1_s3224 (ite l1_s2803 l1_s3223 l1_s3222)))+  (let ((l1_s3225 (xor l1_s336 l1_s3224)))+  (let ((l1_s3226 (ite l1_s2835 l1_s3225 l1_s3224)))+  (let ((l1_s3227 (xor l1_s3211 l1_s3226)))+  (let ((l1_s3228 (and l1_s4 l1_s1348)))+  (let ((l1_s3229 (xor l1_s486 l1_s3228)))+  (let ((l1_s3230 (ite l1_s1380 l1_s3229 l1_s3228)))+  (let ((l1_s3231 (xor l1_s456 l1_s3230)))+  (let ((l1_s3232 (ite l1_s1412 l1_s3231 l1_s3230)))+  (let ((l1_s3233 (xor l1_s428 l1_s3232)))+  (let ((l1_s3234 (ite l1_s1444 l1_s3233 l1_s3232)))+  (let ((l1_s3235 (xor l1_s402 l1_s3234)))+  (let ((l1_s3236 (ite l1_s1476 l1_s3235 l1_s3234)))+  (let ((l1_s3237 (xor l1_s378 l1_s3236)))+  (let ((l1_s3238 (ite l1_s1508 l1_s3237 l1_s3236)))+  (let ((l1_s3239 (xor l1_s356 l1_s3238)))+  (let ((l1_s3240 (ite l1_s1540 l1_s3239 l1_s3238)))+  (let ((l1_s3241 (and l1_s4 l1_s2643)))+  (let ((l1_s3242 (xor l1_s486 l1_s3241)))+  (let ((l1_s3243 (ite l1_s2675 l1_s3242 l1_s3241)))+  (let ((l1_s3244 (xor l1_s456 l1_s3243)))+  (let ((l1_s3245 (ite l1_s2707 l1_s3244 l1_s3243)))+  (let ((l1_s3246 (xor l1_s428 l1_s3245)))+  (let ((l1_s3247 (ite l1_s2739 l1_s3246 l1_s3245)))+  (let ((l1_s3248 (xor l1_s402 l1_s3247)))+  (let ((l1_s3249 (ite l1_s2771 l1_s3248 l1_s3247)))+  (let ((l1_s3250 (xor l1_s378 l1_s3249)))+  (let ((l1_s3251 (ite l1_s2803 l1_s3250 l1_s3249)))+  (let ((l1_s3252 (xor l1_s356 l1_s3251)))+  (let ((l1_s3253 (ite l1_s2835 l1_s3252 l1_s3251)))+  (let ((l1_s3254 (xor l1_s3240 l1_s3253)))+  (let ((l1_s3255 (and l1_s4 l1_s1380)))+  (let ((l1_s3256 (xor l1_s486 l1_s3255)))+  (let ((l1_s3257 (ite l1_s1412 l1_s3256 l1_s3255)))+  (let ((l1_s3258 (xor l1_s456 l1_s3257)))+  (let ((l1_s3259 (ite l1_s1444 l1_s3258 l1_s3257)))+  (let ((l1_s3260 (xor l1_s428 l1_s3259)))+  (let ((l1_s3261 (ite l1_s1476 l1_s3260 l1_s3259)))+  (let ((l1_s3262 (xor l1_s402 l1_s3261)))+  (let ((l1_s3263 (ite l1_s1508 l1_s3262 l1_s3261)))+  (let ((l1_s3264 (xor l1_s378 l1_s3263)))+  (let ((l1_s3265 (ite l1_s1540 l1_s3264 l1_s3263)))+  (let ((l1_s3266 (and l1_s4 l1_s2675)))+  (let ((l1_s3267 (xor l1_s486 l1_s3266)))+  (let ((l1_s3268 (ite l1_s2707 l1_s3267 l1_s3266)))+  (let ((l1_s3269 (xor l1_s456 l1_s3268)))+  (let ((l1_s3270 (ite l1_s2739 l1_s3269 l1_s3268)))+  (let ((l1_s3271 (xor l1_s428 l1_s3270)))+  (let ((l1_s3272 (ite l1_s2771 l1_s3271 l1_s3270)))+  (let ((l1_s3273 (xor l1_s402 l1_s3272)))+  (let ((l1_s3274 (ite l1_s2803 l1_s3273 l1_s3272)))+  (let ((l1_s3275 (xor l1_s378 l1_s3274)))+  (let ((l1_s3276 (ite l1_s2835 l1_s3275 l1_s3274)))+  (let ((l1_s3277 (xor l1_s3265 l1_s3276)))+  (let ((l1_s3278 (and l1_s4 l1_s1412)))+  (let ((l1_s3279 (xor l1_s486 l1_s3278)))+  (let ((l1_s3280 (ite l1_s1444 l1_s3279 l1_s3278)))+  (let ((l1_s3281 (xor l1_s456 l1_s3280)))+  (let ((l1_s3282 (ite l1_s1476 l1_s3281 l1_s3280)))+  (let ((l1_s3283 (xor l1_s428 l1_s3282)))+  (let ((l1_s3284 (ite l1_s1508 l1_s3283 l1_s3282)))+  (let ((l1_s3285 (xor l1_s402 l1_s3284)))+  (let ((l1_s3286 (ite l1_s1540 l1_s3285 l1_s3284)))+  (let ((l1_s3287 (and l1_s4 l1_s2707)))+  (let ((l1_s3288 (xor l1_s486 l1_s3287)))+  (let ((l1_s3289 (ite l1_s2739 l1_s3288 l1_s3287)))+  (let ((l1_s3290 (xor l1_s456 l1_s3289)))+  (let ((l1_s3291 (ite l1_s2771 l1_s3290 l1_s3289)))+  (let ((l1_s3292 (xor l1_s428 l1_s3291)))+  (let ((l1_s3293 (ite l1_s2803 l1_s3292 l1_s3291)))+  (let ((l1_s3294 (xor l1_s402 l1_s3293)))+  (let ((l1_s3295 (ite l1_s2835 l1_s3294 l1_s3293)))+  (let ((l1_s3296 (xor l1_s3286 l1_s3295)))+  (let ((l1_s3297 (and l1_s4 l1_s1444)))+  (let ((l1_s3298 (xor l1_s486 l1_s3297)))+  (let ((l1_s3299 (ite l1_s1476 l1_s3298 l1_s3297)))+  (let ((l1_s3300 (xor l1_s456 l1_s3299)))+  (let ((l1_s3301 (ite l1_s1508 l1_s3300 l1_s3299)))+  (let ((l1_s3302 (xor l1_s428 l1_s3301)))+  (let ((l1_s3303 (ite l1_s1540 l1_s3302 l1_s3301)))+  (let ((l1_s3304 (and l1_s4 l1_s2739)))+  (let ((l1_s3305 (xor l1_s486 l1_s3304)))+  (let ((l1_s3306 (ite l1_s2771 l1_s3305 l1_s3304)))+  (let ((l1_s3307 (xor l1_s456 l1_s3306)))+  (let ((l1_s3308 (ite l1_s2803 l1_s3307 l1_s3306)))+  (let ((l1_s3309 (xor l1_s428 l1_s3308)))+  (let ((l1_s3310 (ite l1_s2835 l1_s3309 l1_s3308)))+  (let ((l1_s3311 (xor l1_s3303 l1_s3310)))+  (let ((l1_s3312 (and l1_s4 l1_s1476)))+  (let ((l1_s3313 (xor l1_s486 l1_s3312)))+  (let ((l1_s3314 (ite l1_s1508 l1_s3313 l1_s3312)))+  (let ((l1_s3315 (xor l1_s456 l1_s3314)))+  (let ((l1_s3316 (ite l1_s1540 l1_s3315 l1_s3314)))+  (let ((l1_s3317 (and l1_s4 l1_s2771)))+  (let ((l1_s3318 (xor l1_s486 l1_s3317)))+  (let ((l1_s3319 (ite l1_s2803 l1_s3318 l1_s3317)))+  (let ((l1_s3320 (xor l1_s456 l1_s3319)))+  (let ((l1_s3321 (ite l1_s2835 l1_s3320 l1_s3319)))+  (let ((l1_s3322 (xor l1_s3316 l1_s3321)))+  (let ((l1_s3323 (and l1_s4 l1_s1508)))+  (let ((l1_s3324 (xor l1_s486 l1_s3323)))+  (let ((l1_s3325 (ite l1_s1540 l1_s3324 l1_s3323)))+  (let ((l1_s3326 (and l1_s4 l1_s2803)))+  (let ((l1_s3327 (xor l1_s486 l1_s3326)))+  (let ((l1_s3328 (ite l1_s2835 l1_s3327 l1_s3326)))+  (let ((l1_s3329 (xor l1_s3325 l1_s3328)))+  (let ((l1_s3330 (and l1_s4 l1_s1540)))+  (let ((l1_s3331 (and l1_s4 l1_s2835)))+  (let ((l1_s3332 (xor l1_s3330 l1_s3331)))+  (let ((l1_s3334 (ite l1_s3332 l1_s11 l1_s3333)))+  (let ((l1_s3335 (bvadd l1_s11 l1_s3334)))+  (let ((l1_s3336 (ite l1_s3329 l1_s3335 l1_s3334)))+  (let ((l1_s3337 (bvadd l1_s11 l1_s3336)))+  (let ((l1_s3338 (ite l1_s3322 l1_s3337 l1_s3336)))+  (let ((l1_s3339 (bvadd l1_s11 l1_s3338)))+  (let ((l1_s3340 (ite l1_s3311 l1_s3339 l1_s3338)))+  (let ((l1_s3341 (bvadd l1_s11 l1_s3340)))+  (let ((l1_s3342 (ite l1_s3296 l1_s3341 l1_s3340)))+  (let ((l1_s3343 (bvadd l1_s11 l1_s3342)))+  (let ((l1_s3344 (ite l1_s3277 l1_s3343 l1_s3342)))+  (let ((l1_s3345 (bvadd l1_s11 l1_s3344)))+  (let ((l1_s3346 (ite l1_s3254 l1_s3345 l1_s3344)))+  (let ((l1_s3347 (bvadd l1_s11 l1_s3346)))+  (let ((l1_s3348 (ite l1_s3227 l1_s3347 l1_s3346)))+  (let ((l1_s3349 (bvadd l1_s11 l1_s3348)))+  (let ((l1_s3350 (ite l1_s3196 l1_s3349 l1_s3348)))+  (let ((l1_s3351 (bvadd l1_s11 l1_s3350)))+  (let ((l1_s3352 (ite l1_s3161 l1_s3351 l1_s3350)))+  (let ((l1_s3353 (bvadd l1_s11 l1_s3352)))+  (let ((l1_s3354 (ite l1_s3122 l1_s3353 l1_s3352)))+  (let ((l1_s3355 (bvadd l1_s11 l1_s3354)))+  (let ((l1_s3356 (ite l1_s3079 l1_s3355 l1_s3354)))+  (let ((l1_s3357 (bvadd l1_s11 l1_s3356)))+  (let ((l1_s3358 (ite l1_s3032 l1_s3357 l1_s3356)))+  (let ((l1_s3359 (bvadd l1_s11 l1_s3358)))+  (let ((l1_s3360 (ite l1_s2981 l1_s3359 l1_s3358)))+  (let ((l1_s3361 (bvadd l1_s11 l1_s3360)))+  (let ((l1_s3362 (ite l1_s2926 l1_s3361 l1_s3360)))+  (let ((l1_s3363 (bvadd l1_s11 l1_s3362)))+  (let ((l1_s3364 (ite l1_s2867 l1_s3363 l1_s3362)))+  (let ((l1_s3365 (bvadd l1_s11 l1_s3364)))+  (let ((l1_s3366 (ite l1_s246 l1_s3365 l1_s3364)))+  (let ((l1_s3367 (bvadd l1_s11 l1_s3366)))+  (let ((l1_s3368 (ite l1_s241 l1_s3367 l1_s3366)))+  (let ((l1_s3369 (bvadd l1_s11 l1_s3368)))+  (let ((l1_s3370 (ite l1_s236 l1_s3369 l1_s3368)))+  (let ((l1_s3371 (bvadd l1_s11 l1_s3370)))+  (let ((l1_s3372 (ite l1_s231 l1_s3371 l1_s3370)))+  (let ((l1_s3373 (bvadd l1_s11 l1_s3372)))+  (let ((l1_s3374 (ite l1_s226 l1_s3373 l1_s3372)))+  (let ((l1_s3375 (bvadd l1_s11 l1_s3374)))+  (let ((l1_s3376 (ite l1_s221 l1_s3375 l1_s3374)))+  (let ((l1_s3377 (bvadd l1_s11 l1_s3376)))+  (let ((l1_s3378 (ite l1_s216 l1_s3377 l1_s3376)))+  (let ((l1_s3379 (bvadd l1_s11 l1_s3378)))+  (let ((l1_s3380 (ite l1_s211 l1_s3379 l1_s3378)))+  (let ((l1_s3381 (bvadd l1_s11 l1_s3380)))+  (let ((l1_s3382 (ite l1_s206 l1_s3381 l1_s3380)))+  (let ((l1_s3383 (bvadd l1_s11 l1_s3382)))+  (let ((l1_s3384 (ite l1_s201 l1_s3383 l1_s3382)))+  (let ((l1_s3385 (bvadd l1_s11 l1_s3384)))+  (let ((l1_s3386 (ite l1_s196 l1_s3385 l1_s3384)))+  (let ((l1_s3387 (bvadd l1_s11 l1_s3386)))+  (let ((l1_s3388 (ite l1_s191 l1_s3387 l1_s3386)))+  (let ((l1_s3389 (bvadd l1_s11 l1_s3388)))+  (let ((l1_s3390 (ite l1_s186 l1_s3389 l1_s3388)))+  (let ((l1_s3391 (bvadd l1_s11 l1_s3390)))+  (let ((l1_s3392 (ite l1_s181 l1_s3391 l1_s3390)))+  (let ((l1_s3393 (bvadd l1_s11 l1_s3392)))+  (let ((l1_s3394 (ite l1_s176 l1_s3393 l1_s3392)))+  (let ((l1_s3395 (bvadd l1_s11 l1_s3394)))+  (let ((l1_s3396 (ite l1_s171 l1_s3395 l1_s3394)))+  (let ((l1_s3397 (bvadd l1_s11 l1_s3396)))+  (let ((l1_s3398 (ite l1_s166 l1_s3397 l1_s3396)))+  (let ((l1_s3399 (bvadd l1_s11 l1_s3398)))+  (let ((l1_s3400 (ite l1_s161 l1_s3399 l1_s3398)))+  (let ((l1_s3401 (bvadd l1_s11 l1_s3400)))+  (let ((l1_s3402 (ite l1_s156 l1_s3401 l1_s3400)))+  (let ((l1_s3403 (bvadd l1_s11 l1_s3402)))+  (let ((l1_s3404 (ite l1_s151 l1_s3403 l1_s3402)))+  (let ((l1_s3405 (bvadd l1_s11 l1_s3404)))+  (let ((l1_s3406 (ite l1_s146 l1_s3405 l1_s3404)))+  (let ((l1_s3407 (bvadd l1_s11 l1_s3406)))+  (let ((l1_s3408 (ite l1_s141 l1_s3407 l1_s3406)))+  (let ((l1_s3409 (bvadd l1_s11 l1_s3408)))+  (let ((l1_s3410 (ite l1_s136 l1_s3409 l1_s3408)))+  (let ((l1_s3411 (bvadd l1_s11 l1_s3410)))+  (let ((l1_s3412 (ite l1_s131 l1_s3411 l1_s3410)))+  (let ((l1_s3413 (bvadd l1_s11 l1_s3412)))+  (let ((l1_s3414 (ite l1_s126 l1_s3413 l1_s3412)))+  (let ((l1_s3415 (bvadd l1_s11 l1_s3414)))+  (let ((l1_s3416 (ite l1_s121 l1_s3415 l1_s3414)))+  (let ((l1_s3417 (bvadd l1_s11 l1_s3416)))+  (let ((l1_s3418 (ite l1_s116 l1_s3417 l1_s3416)))+  (let ((l1_s3419 (bvadd l1_s11 l1_s3418)))+  (let ((l1_s3420 (ite l1_s111 l1_s3419 l1_s3418)))+  (let ((l1_s3421 (bvadd l1_s11 l1_s3420)))+  (let ((l1_s3422 (ite l1_s106 l1_s3421 l1_s3420)))+  (let ((l1_s3423 (bvadd l1_s11 l1_s3422)))+  (let ((l1_s3424 (ite l1_s101 l1_s3423 l1_s3422)))+  (let ((l1_s3425 (bvadd l1_s11 l1_s3424)))+  (let ((l1_s3426 (ite l1_s96 l1_s3425 l1_s3424)))+  (let ((l1_s3427 (bvadd l1_s11 l1_s3426)))+  (let ((l1_s3428 (ite l1_s91 l1_s3427 l1_s3426)))+  (let ((l1_s3429 (bvadd l1_s11 l1_s3428)))+  (let ((l1_s3430 (ite l1_s86 l1_s3429 l1_s3428)))+  (let ((l1_s3431 (bvadd l1_s11 l1_s3430)))+  (let ((l1_s3432 (ite l1_s81 l1_s3431 l1_s3430)))+  (let ((l1_s3433 (bvadd l1_s11 l1_s3432)))+  (let ((l1_s3434 (ite l1_s76 l1_s3433 l1_s3432)))+  (let ((l1_s3435 (bvadd l1_s11 l1_s3434)))+  (let ((l1_s3436 (ite l1_s71 l1_s3435 l1_s3434)))+  (let ((l1_s3437 (bvadd l1_s11 l1_s3436)))+  (let ((l1_s3438 (ite l1_s66 l1_s3437 l1_s3436)))+  (let ((l1_s3439 (bvadd l1_s11 l1_s3438)))+  (let ((l1_s3440 (ite l1_s61 l1_s3439 l1_s3438)))+  (let ((l1_s3441 (bvadd l1_s11 l1_s3440)))+  (let ((l1_s3442 (ite l1_s56 l1_s3441 l1_s3440)))+  (let ((l1_s3443 (bvadd l1_s11 l1_s3442)))+  (let ((l1_s3444 (ite l1_s51 l1_s3443 l1_s3442)))+  (let ((l1_s3445 (bvadd l1_s11 l1_s3444)))+  (let ((l1_s3446 (ite l1_s46 l1_s3445 l1_s3444)))+  (let ((l1_s3447 (bvadd l1_s11 l1_s3446)))+  (let ((l1_s3448 (ite l1_s41 l1_s3447 l1_s3446)))+  (let ((l1_s3449 (bvadd l1_s11 l1_s3448)))+  (let ((l1_s3450 (ite l1_s36 l1_s3449 l1_s3448)))+  (let ((l1_s3451 (bvadd l1_s11 l1_s3450)))+  (let ((l1_s3452 (ite l1_s31 l1_s3451 l1_s3450)))+  (let ((l1_s3453 (bvadd l1_s11 l1_s3452)))+  (let ((l1_s3454 (ite l1_s26 l1_s3453 l1_s3452)))+  (let ((l1_s3455 (bvadd l1_s11 l1_s3454)))+  (let ((l1_s3456 (ite l1_s21 l1_s3455 l1_s3454)))+  (let ((l1_s3457 (bvadd l1_s11 l1_s3456)))+  (let ((l1_s3458 (ite l1_s16 l1_s3457 l1_s3456)))+  (let ((l1_s3459 (bvadd l1_s11 l1_s3458)))+  (let ((l1_s3460 (ite l1_s10 l1_s3459 l1_s3458)))+  (let ((l1_s3462 (bvuge l1_s3460 l1_s3461)))+  (let ((l1_s3463 (=> l1_s5 l1_s3462)))+  (let ((l1_s3464 (and l1_s4 l1_s3463)))+  l1_s3464))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))+CONSTRAINTS+ASSERTIONS+OUTPUTS+  s1
SBVTestSuite/GoldFiles/dsat01.gold view
@@ -12,24 +12,22 @@ [ISSUE] ; --- literal constants --- [ISSUE] (define-fun s3 () Real (/ 2.0 1.0)) [ISSUE] (define-fun s5 () Real (/ 5.0 1.0))-[ISSUE] ; --- skolem constants ---+[ISSUE] ; --- top level inputs --- [ISSUE] (declare-fun s0 () Real) ; tracks user variable "a0" [ISSUE] (declare-fun s1 () Int) ; tracks user variable "i0" [ISSUE] (declare-fun s2 () Bool) ; tracks user variable "b0" [ISSUE] ; --- constant tables ----[ISSUE] ; --- skolemized tables ---+[ISSUE] ; --- non-constant tables --- [ISSUE] ; --- arrays --- [ISSUE] ; --- uninterpreted constants ----[ISSUE] ; --- user given axioms ----[ISSUE] ; --- preQuantifier assignments ---+[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] ; --- formula ----[ISSUE] ; --- postQuantifier assignments --- [ISSUE] ; --- delayedEqualities ----[ISSUE] ; -- finalAssert ---+[ISSUE] ; --- formula --- [ISSUE] (assert s4) [ISSUE] (assert s6) [FIRE] (declare-fun s7 () Real)
SBVTestSuite/GoldFiles/exceptionLocal1.gold view
@@ -9,19 +9,19 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (_ BitVec 1) #b0)-[GOOD] (define-fun s68 () (_ BitVec 32) #x00000001)-[GOOD] ; --- skolem constants ---+[GOOD] (define-fun s67 () (_ BitVec 32) #x00000001)+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () (_ BitVec 1) ((_ extract 0 0) s0)) [GOOD] (define-fun s3 () Bool (distinct s1 s2))-[GOOD] (define-fun s4 () Bool (not s3))-[GOOD] (define-fun s5 () (_ BitVec 32) (bvmul s0 s0))+[GOOD] (define-fun s4 () (_ BitVec 32) (bvmul s0 s0))+[GOOD] (define-fun s5 () (_ BitVec 32) (bvmul s4 s4)) [GOOD] (define-fun s6 () (_ BitVec 32) (bvmul s5 s5)) [GOOD] (define-fun s7 () (_ BitVec 32) (bvmul s6 s6)) [GOOD] (define-fun s8 () (_ BitVec 32) (bvmul s7 s7))@@ -50,14 +50,13 @@ [GOOD] (define-fun s31 () (_ BitVec 32) (bvmul s30 s30)) [GOOD] (define-fun s32 () (_ BitVec 32) (bvmul s31 s31)) [GOOD] (define-fun s33 () (_ BitVec 32) (bvmul s32 s32))-[GOOD] (define-fun s34 () (_ BitVec 32) (bvmul s33 s33))-[FAIL] (define-fun s35 () (_ BitVec 32) (bvmul s34 s34))+[FAIL] (define-fun s34 () (_ BitVec 32) (bvmul s33 s33)) CAUGHT SMT EXCEPTION *** Data.SBV: Unexpected non-success response from Yices: ***-***    Sent      : (define-fun s35 () (_ BitVec 32) (bvmul s34 s34))+***    Sent      : (define-fun s34 () (_ BitVec 32) (bvmul s33 s33)) ***    Expected  : success-***    Received  : (error "at line 41, column 35: in bvmul: maximal polynomial degree exceeded")+***    Received  : (error "at line 40, column 35: in bvmul: maximal polynomial degree exceeded") *** ***    Exit code : ExitSuccess ***    Executable: /usr/local/bin/yices-smt2
SBVTestSuite/GoldFiles/exceptionLocal2.gold view
@@ -11,7 +11,7 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () Real (/ 2.0 1.0))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [FAIL] (declare-fun s0 () Real) ; tracks user variable "x" CAUGHT SMT EXCEPTION *** Data.SBV: Unexpected non-success response from Z3:
SBVTestSuite/GoldFiles/foldlABC1.gold view
@@ -14,16 +14,16 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () Int 0)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s4 () Bool (> s0 s3)) [GOOD] (define-fun s5 () Bool (> s1 s3)) [GOOD] (define-fun s6 () Bool (> s2 s3))@@ -41,10 +41,8 @@ [GOOD] (define-fun s18 () Bool (= s15 s17)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s4) [GOOD] (assert s5) [GOOD] (assert s6)
SBVTestSuite/GoldFiles/foldlABC2.gold view
@@ -15,16 +15,16 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () Int 0) [GOOD] (define-fun s15 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s4 () Bool (> s0 s3)) [GOOD] (define-fun s5 () Bool (> s1 s3)) [GOOD] (define-fun s6 () Bool (> s2 s3))@@ -49,10 +49,8 @@ [GOOD] (define-fun s26 () Bool (= s23 s25)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s4) [GOOD] (assert s5) [GOOD] (assert s6)
SBVTestSuite/GoldFiles/foldlABC3.gold view
@@ -15,16 +15,16 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () Int 0) [GOOD] (define-fun s15 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s4 () Bool (> s0 s3)) [GOOD] (define-fun s5 () Bool (> s1 s3)) [GOOD] (define-fun s6 () Bool (> s2 s3))@@ -56,10 +56,8 @@ [GOOD] (define-fun s33 () Bool (= s30 s32)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s4) [GOOD] (assert s5) [GOOD] (assert s6)
SBVTestSuite/GoldFiles/foldrAB1.gold view
@@ -14,15 +14,15 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 0)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (> s0 s2)) [GOOD] (define-fun s4 () Bool (> s1 s2)) [GOOD] (define-fun s5 () (Seq Int) (seq.unit s0))@@ -36,10 +36,8 @@ [GOOD] (define-fun s13 () Bool (= s11 s12)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (assert s13)
SBVTestSuite/GoldFiles/foldrAB2.gold view
@@ -15,15 +15,15 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 0) [GOOD] (define-fun s11 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (> s0 s2)) [GOOD] (define-fun s4 () Bool (> s1 s2)) [GOOD] (define-fun s5 () (Seq Int) (seq.unit s0))@@ -44,10 +44,8 @@ [GOOD] (define-fun s21 () Bool (= s19 s20)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (assert s21)
SBVTestSuite/GoldFiles/foldrAB3.gold view
@@ -15,15 +15,15 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 0) [GOOD] (define-fun s11 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (> s0 s2)) [GOOD] (define-fun s4 () Bool (> s1 s2)) [GOOD] (define-fun s5 () (Seq Int) (seq.unit s0))@@ -51,10 +51,8 @@ [GOOD] (define-fun s28 () Bool (= s26 s27)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (assert s28)
SBVTestSuite/GoldFiles/freshVars.gold view
@@ -13,21 +13,19 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () Int 0)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (declare-fun s3 () Bool) [GOOD] (declare-fun s4 () (_ BitVec 8))
SBVTestSuite/GoldFiles/genBenchMark1.gold view
@@ -7,21 +7,19 @@ ; --- sums --- ; --- literal constants --- (define-fun s1 () (_ BitVec 8) #x01)-; --- skolem constants ---+; --- top level inputs --- (declare-fun s0 () (_ BitVec 8)) ; --- constant tables ----; --- skolemized tables ---+; --- non-constant tables --- ; --- arrays --- ; --- uninterpreted constants ----; --- user given axioms ----; --- preQuantifier assignments ---+; --- user defined functions ---+; --- assignments --- (define-fun s2 () (_ BitVec 8) (bvadd s0 s1)) (define-fun s3 () Bool (= s0 s2)) ; --- arrayDelayeds --- ; --- arraySetups ----; --- formula ----; --- postQuantifier assignments --- ; --- delayedEqualities ----; -- finalAssert ---+; --- formula --- (assert (not s3)) (check-sat)
SBVTestSuite/GoldFiles/genBenchMark2.gold view
@@ -7,21 +7,19 @@ ; --- sums --- ; --- literal constants --- (define-fun s1 () (_ BitVec 8) #x01)-; --- skolem constants ---+; --- top level inputs --- (declare-fun s0 () (_ BitVec 8)) ; --- constant tables ----; --- skolemized tables ---+; --- non-constant tables --- ; --- arrays --- ; --- uninterpreted constants ----; --- user given axioms ----; --- preQuantifier assignments ---+; --- user defined functions ---+; --- assignments --- (define-fun s2 () (_ BitVec 8) (bvadd s0 s1)) (define-fun s3 () Bool (= s0 s2)) ; --- arrayDelayeds --- ; --- arraySetups ----; --- formula ----; --- postQuantifier assignments --- ; --- delayedEqualities ----; -- finalAssert ---+; --- formula --- (assert s3) (check-sat)
− SBVTestSuite/GoldFiles/iteTest1.gold
@@ -1,12 +0,0 @@-INPUTS-  s0 :: SWord8, aliasing "x"-CONSTANTS-TABLES-ARRAYS-UNINTERPRETED CONSTANTS-USER GIVEN CODE SEGMENTS-AXIOMS-DEFINE-CONSTRAINTS-ASSERTIONS-OUTPUTS
− SBVTestSuite/GoldFiles/iteTest2.gold
@@ -1,12 +0,0 @@-INPUTS-  s0 :: SWord8, aliasing "x"-CONSTANTS-TABLES-ARRAYS-UNINTERPRETED CONSTANTS-USER GIVEN CODE SEGMENTS-AXIOMS-DEFINE-CONSTRAINTS-ASSERTIONS-OUTPUTS
− SBVTestSuite/GoldFiles/iteTest3.gold
@@ -1,12 +0,0 @@-INPUTS-  s0 :: SWord8, aliasing "x"-CONSTANTS-TABLES-ARRAYS-UNINTERPRETED CONSTANTS-USER GIVEN CODE SEGMENTS-AXIOMS-DEFINE-CONSTRAINTS-ASSERTIONS-OUTPUTS
+ SBVTestSuite/GoldFiles/lambda01.gold view
@@ -0,0 +1,1 @@+2
+ SBVTestSuite/GoldFiles/lambda02.gold view
@@ -0,0 +1,4 @@+(lambda ((l1_s0 Int))+  (let ((l1_s1 1))+  (let ((l1_s2 (+ l1_s0 l1_s1)))+  l1_s2)))
+ SBVTestSuite/GoldFiles/lambda03.gold view
@@ -0,0 +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))))
+ SBVTestSuite/GoldFiles/lambda04.gold view
@@ -0,0 +1,49 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit false) (seq.unit false) (seq.unit false))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit false) (seq.unit false) (seq.unit false))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =             [1,2,3] :: [Integer]+  s1 = [False,False,False] :: [Bool]
+ SBVTestSuite/GoldFiles/lambda05.gold view
@@ -0,0 +1,55 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[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))+[GOOD] (define-fun s6 () Bool (= s1 s5))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s6)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Integer]+  s1 = [4,5,6,7,8] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda06.gold view
@@ -0,0 +1,75 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 10)+               (seq.unit 2046)+               (seq.unit 88572)+               (seq.unit 1398100)+               (seq.unit 12207030))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 10)+               (seq.unit 2046)+               (seq.unit 88572)+               (seq.unit 1398100)+               (seq.unit 12207030))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =                      [1,2,3,4,5] :: [Integer]+  s1 = [10,2046,88572,1398100,12207030] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda07.gold view
@@ -0,0 +1,89 @@+** 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 s2 () (Seq (Seq Int)) (seq.++ (seq.unit (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))) (seq.unit (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8) (seq.unit 9) (seq.unit 10))) (seq.unit (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8) (seq.unit 9) (seq.unit 10) (seq.unit 11) (seq.unit 12) (seq.unit 13) (seq.unit 14) (seq.unit 15) (seq.unit 16) (seq.unit 17) (seq.unit 18) (seq.unit 19) (seq.unit 20)))))+[GOOD] (define-fun s4 () Int 0)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq (Seq Int)))+[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))+         (+ l2_s0 l2_s1)) l1_s1 l1_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)+[GOOD] (assert s7)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 280))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit (seq.++ (seq.unit 1)+                                 (seq.unit 2)+                                 (seq.unit 3)+                                 (seq.unit 4)+                                 (seq.unit 5)))+               (seq.unit (seq.++ (seq.unit 1)+                                 (seq.unit 2)+                                 (seq.unit 3)+                                 (seq.unit 4)+                                 (seq.unit 5)+                                 (seq.unit 6)+                                 (seq.unit 7)+                                 (seq.unit 8)+                                 (seq.unit 9)+                                 (seq.unit 10)))+               (seq.unit (seq.++ (seq.unit 1)+                                 (seq.unit 2)+                                 (seq.unit 3)+                                 (seq.unit 4)+                                 (seq.unit 5)+                                 (seq.unit 6)+                                 (seq.unit 7)+                                 (seq.unit 8)+                                 (seq.unit 9)+                                 (seq.unit 10)+                                 (seq.unit 11)+                                 (seq.unit 12)+                                 (seq.unit 13)+                                 (seq.unit 14)+                                 (seq.unit 15)+                                 (seq.unit 16)+                                 (seq.unit 17)+                                 (seq.unit 18)+                                 (seq.unit 19)+                                 (seq.unit 20))))))+[SEND] (get-value (s1))+[RECV] ((s1 280))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [[1,2,3,4,5],[1,2,3,4,5,6,7,8,9,10],[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]] :: [[Integer]]+  s1 =                                                                                       280 :: Integer
+ SBVTestSuite/GoldFiles/lambda08.gold view
@@ -0,0 +1,63 @@+** 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 lists, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () (Seq (_ FloatingPoint  8 24)) (seq.++ (seq.unit ((_ to_fp 8 24) roundNearestTiesToEven (/ 1.0 1.0))) (seq.unit ((_ to_fp 8 24) roundNearestTiesToEven (/ 2.0 1.0))) (seq.unit ((_ to_fp 8 24) roundNearestTiesToEven (/ 3.0 1.0))) (seq.unit ((_ to_fp 8 24) roundNearestTiesToEven (/ 4.0 1.0))) (seq.unit ((_ to_fp 8 24) roundNearestTiesToEven (/ 5.0 1.0)))))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq (_ FloatingPoint  8 24)))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit (fp #b0 #x80 #b00000000000000000000000))+               (seq.unit (fp #b0 #x80 #b10000000000000000000000))+               (seq.unit (fp #b0 #x81 #b00000000000000000000000))+               (seq.unit (fp #b0 #x81 #b01000000000000000000000))+               (seq.unit (fp #b0 #x81 #b10000000000000000000000)))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit (fp #b0 #x7f #b00000000000000000000000))+               (seq.unit (fp #b0 #x80 #b00000000000000000000000))+               (seq.unit (fp #b0 #x80 #b10000000000000000000000))+               (seq.unit (fp #b0 #x81 #b00000000000000000000000))+               (seq.unit (fp #b0 #x81 #b01000000000000000000000)))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit (fp #b0 #x80 #b00000000000000000000000))+               (seq.unit (fp #b0 #x80 #b10000000000000000000000))+               (seq.unit (fp #b0 #x81 #b00000000000000000000000))+               (seq.unit (fp #b0 #x81 #b01000000000000000000000))+               (seq.unit (fp #b0 #x81 #b10000000000000000000000)))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1.0,2.0,3.0,4.0,5.0] :: [Float]+  s1 = [2.0,3.0,4.0,5.0,6.0] :: [Float]
+ SBVTestSuite/GoldFiles/lambda09.gold view
@@ -0,0 +1,63 @@+** 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 lists, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () (Seq (_ BitVec 8)) (seq.++ (seq.unit #x01) (seq.unit #x02) (seq.unit #x03) (seq.unit #x04) (seq.unit #x05)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq (_ BitVec 8)))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit #x02)+               (seq.unit #x03)+               (seq.unit #x04)+               (seq.unit #x05)+               (seq.unit #x06))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit #x01)+               (seq.unit #x02)+               (seq.unit #x03)+               (seq.unit #x04)+               (seq.unit #x05))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit #x02)+               (seq.unit #x03)+               (seq.unit #x04)+               (seq.unit #x05)+               (seq.unit #x06))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Int8]+  s1 = [2,3,4,5,6] :: [Int8]
+ SBVTestSuite/GoldFiles/lambda10.gold view
@@ -0,0 +1,51 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Integer]+  s1 = [2,3,4,5,6] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda11.gold view
@@ -0,0 +1,63 @@+** 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 lists, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () (Seq (_ BitVec 8)) (seq.++ (seq.unit #x01) (seq.unit #x02) (seq.unit #x03) (seq.unit #x04) (seq.unit #x05)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq (_ BitVec 8)))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit #x02)+               (seq.unit #x03)+               (seq.unit #x04)+               (seq.unit #x05)+               (seq.unit #x06))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit #x01)+               (seq.unit #x02)+               (seq.unit #x03)+               (seq.unit #x04)+               (seq.unit #x05))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit #x02)+               (seq.unit #x03)+               (seq.unit #x04)+               (seq.unit #x05)+               (seq.unit #x06))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Word8]+  s1 = [2,3,4,5,6] :: [Word8]
+ SBVTestSuite/GoldFiles/lambda12.gold view
@@ -0,0 +1,49 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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 ---+[GOOD] (define-fun s3 () Bool (= s0 s2))+[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)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit (seq.unit 1)) (seq.unit (seq.unit 2)) (seq.unit (seq.unit 3)))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit (seq.unit 1)) (seq.unit (seq.unit 2)) (seq.unit (seq.unit 3)))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =       [1,2,3] :: [Integer]+  s1 = [[1],[2],[3]] :: [[Integer]]
+ SBVTestSuite/GoldFiles/lambda13.gold view
@@ -0,0 +1,79 @@+** 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 s2 () (Seq (SBVTuple2 Int Int)) (seq.++ (seq.unit (mkSBVTuple2 1 4)) (seq.unit (mkSBVTuple2 1 5)) (seq.unit (mkSBVTuple2 1 6)) (seq.unit (mkSBVTuple2 2 4)) (seq.unit (mkSBVTuple2 2 5)) (seq.unit (mkSBVTuple2 2 6)) (seq.unit (mkSBVTuple2 3 4)) (seq.unit (mkSBVTuple2 3 5)) (seq.unit (mkSBVTuple2 3 6))))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq (SBVTuple2 Int Int)))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit (mkSBVTuple2 1 4))+               (seq.unit (mkSBVTuple2 1 5))+               (seq.unit (mkSBVTuple2 1 6))+               (seq.unit (mkSBVTuple2 2 4))+               (seq.unit (mkSBVTuple2 2 5))+               (seq.unit (mkSBVTuple2 2 6))+               (seq.unit (mkSBVTuple2 3 4))+               (seq.unit (mkSBVTuple2 3 5))+               (seq.unit (mkSBVTuple2 3 6)))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [(1,4),(1,5),(1,6),(2,4),(2,5),(2,6),(3,4),(3,5),(3,6)] :: [(Integer, Integer)]+  s1 =                                     [5,6,7,6,7,8,7,8,9] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda14.gold view
@@ -0,0 +1,50 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] (define-fun s4 () Int 10)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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.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)+[GOOD] (assert s6)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 11) (seq.unit 13) (seq.unit 15) (seq.unit 17) (seq.unit 19))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 11) (seq.unit 13) (seq.unit 15) (seq.unit 17) (seq.unit 19))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =      [1,2,3,4,5] :: [Integer]+  s1 = [11,13,15,17,19] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda15.gold view
@@ -0,0 +1,50 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] (define-fun s4 () Int 0)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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 () 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)+[GOOD] (assert s6)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 15))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 15))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Integer]+  s1 =          15 :: Integer
+ SBVTestSuite/GoldFiles/lambda16.gold view
@@ -0,0 +1,50 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] (define-fun s4 () Int 1)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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 () 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)+[GOOD] (assert s6)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 120))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 120))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Integer]+  s1 =         120 :: Integer
+ SBVTestSuite/GoldFiles/lambda17.gold view
@@ -0,0 +1,52 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] (define-fun s4 () (Seq Int) (as seq.empty (Seq Int)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s6 () Bool (= s1 s5))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s6)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 5) (seq.unit 4) (seq.unit 3) (seq.unit 2) (seq.unit 1))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 5) (seq.unit 4) (seq.unit 3) (seq.unit 2) (seq.unit 1))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Integer]+  s1 = [5,4,3,2,1] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda18.gold view
@@ -0,0 +1,53 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] (define-fun s4 () Int 10)+[GOOD] (define-fun s5 () Int 0)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s7 () Bool (= s1 s6))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s7)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 75))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 75))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Integer]+  s1 =          75 :: Integer
+ SBVTestSuite/GoldFiles/lambda19.gold view
@@ -0,0 +1,56 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] (define-fun s4 () Int 0)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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)+                       (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)))))+[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 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)+[GOOD] (assert s7)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 15))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 15))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Integer]+  s1 =          15 :: Integer
+ SBVTestSuite/GoldFiles/lambda20.gold view
@@ -0,0 +1,56 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] (define-fun s4 () Int 1)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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)+                       (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)))))+[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 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)+[GOOD] (assert s7)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 120))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 120))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Integer]+  s1 =         120 :: Integer
+ SBVTestSuite/GoldFiles/lambda21.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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))+[GOOD] (define-fun s4 () (Seq Int) (as seq.empty (Seq Int)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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)+                       (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)))))+[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 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))+[GOOD] (define-fun s7 () Bool (= s1 s6))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s7)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 5) (seq.unit 4) (seq.unit 3) (seq.unit 2) (seq.unit 1))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 5) (seq.unit 4) (seq.unit 3) (seq.unit 2) (seq.unit 1))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5] :: [Integer]+  s1 = [5,4,3,2,1] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda22.gold view
@@ -0,0 +1,110 @@+** 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 s3 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8) (seq.unit 9) (seq.unit 10)))+[GOOD] (define-fun s5 () (Seq Int) (seq.++ (seq.unit 11) (seq.unit 12) (seq.unit 13) (seq.unit 14) (seq.unit 15) (seq.unit 16) (seq.unit 17) (seq.unit 18) (seq.unit 19) (seq.unit 20)))+[GOOD] (define-fun s7 () Int 0)+[GOOD] (define-fun s10 () (Seq Int) (as seq.empty (Seq Int)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[GOOD] (declare-fun s1 () (Seq Int))+[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 ---+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] (define-fun s6 () Bool (= s1 s5))+[GOOD] (define-fun s8 () Int (seq.len s1))+[GOOD] (define-fun s9 () Bool (<= s8 s7))+[GOOD] (define-fun s11 () Int (seq.len s0))+[GOOD] (define-fun s12 () Bool (>= s8 s11))+[GOOD] (define-fun s13 () (Seq Int) (seq.extract s0 s7 s8))+[GOOD] (define-fun s14 () (Seq Int) (ite s12 s0 s13))+[GOOD] (define-fun s15 () (Seq Int) (ite s9 s10 s14))+[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))+[GOOD] (define-fun s18 () Bool (= s2 s17))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[GOOD] (assert s6)+[GOOD] (assert s18)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s2))+[RECV] ((s2 (seq.++ (seq.unit (mkSBVTuple2 1 11))+               (seq.unit (mkSBVTuple2 2 12))+               (seq.unit (mkSBVTuple2 3 13))+               (seq.unit (mkSBVTuple2 4 14))+               (seq.unit (mkSBVTuple2 5 15))+               (seq.unit (mkSBVTuple2 6 16))+               (seq.unit (mkSBVTuple2 7 17))+               (seq.unit (mkSBVTuple2 8 18))+               (seq.unit (mkSBVTuple2 9 19))+               (seq.unit (mkSBVTuple2 10 20)))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9)+               (seq.unit 10))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 11)+               (seq.unit 12)+               (seq.unit 13)+               (seq.unit 14)+               (seq.unit 15)+               (seq.unit 16)+               (seq.unit 17)+               (seq.unit 18)+               (seq.unit 19)+               (seq.unit 20))))+[SEND] (get-value (s2))+[RECV] ((s2 (seq.++ (seq.unit (mkSBVTuple2 1 11))+               (seq.unit (mkSBVTuple2 2 12))+               (seq.unit (mkSBVTuple2 3 13))+               (seq.unit (mkSBVTuple2 4 14))+               (seq.unit (mkSBVTuple2 5 15))+               (seq.unit (mkSBVTuple2 6 16))+               (seq.unit (mkSBVTuple2 7 17))+               (seq.unit (mkSBVTuple2 8 18))+               (seq.unit (mkSBVTuple2 9 19))+               (seq.unit (mkSBVTuple2 10 20)))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =                                                   [1,2,3,4,5,6,7,8,9,10] :: [Integer]+  s1 =                                          [11,12,13,14,15,16,17,18,19,20] :: [Integer]+  s2 = [(1,11),(2,12),(3,13),(4,14),(5,15),(6,16),(7,17),(8,18),(9,19),(10,20)] :: [(Integer, Integer)]
+ SBVTestSuite/GoldFiles/lambda23.gold view
@@ -0,0 +1,105 @@+** 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 s3 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8) (seq.unit 9) (seq.unit 10)))+[GOOD] (define-fun s5 () (Seq Int) (seq.++ (seq.unit 10) (seq.unit 9) (seq.unit 8) (seq.unit 7) (seq.unit 6) (seq.unit 5) (seq.unit 4) (seq.unit 3) (seq.unit 2) (seq.unit 1)))+[GOOD] (define-fun s7 () Int 0)+[GOOD] (define-fun s10 () (Seq Int) (as seq.empty (Seq Int)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[GOOD] (declare-fun s1 () (Seq Int))+[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)+                       (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)))))+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] (define-fun s6 () Bool (= s1 s5))+[GOOD] (define-fun s8 () Int (seq.len s1))+[GOOD] (define-fun s9 () Bool (<= s8 s7))+[GOOD] (define-fun s11 () Int (seq.len s0))+[GOOD] (define-fun s12 () Bool (>= s8 s11))+[GOOD] (define-fun s13 () (Seq Int) (seq.extract s0 s7 s8))+[GOOD] (define-fun s14 () (Seq Int) (ite s12 s0 s13))+[GOOD] (define-fun s15 () (Seq Int) (ite s9 s10 s14))+[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))+[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))+[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)+[GOOD] (assert s6)+[GOOD] (assert s21)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s2))+[RECV] ((s2 110))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9)+               (seq.unit 10))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 10)+               (seq.unit 9)+               (seq.unit 8)+               (seq.unit 7)+               (seq.unit 6)+               (seq.unit 5)+               (seq.unit 4)+               (seq.unit 3)+               (seq.unit 2)+               (seq.unit 1))))+[SEND] (get-value (s2))+[RECV] ((s2 110))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5,6,7,8,9,10] :: [Integer]+  s1 = [10,9,8,7,6,5,4,3,2,1] :: [Integer]+  s2 =                    110 :: Integer
+ SBVTestSuite/GoldFiles/lambda24.gold view
@@ -0,0 +1,110 @@+** 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 s3 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8) (seq.unit 9) (seq.unit 10)))+[GOOD] (define-fun s5 () (Seq Int) (seq.++ (seq.unit 11) (seq.unit 12) (seq.unit 13) (seq.unit 14) (seq.unit 15) (seq.unit 16) (seq.unit 17) (seq.unit 18) (seq.unit 19) (seq.unit 20)))+[GOOD] (define-fun s7 () Int 0)+[GOOD] (define-fun s10 () (Seq Int) (as seq.empty (Seq Int)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[GOOD] (declare-fun s1 () (Seq Int))+[GOOD] (declare-fun s2 () (Seq Int))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] (define-fun s6 () Bool (= s1 s5))+[GOOD] (define-fun s8 () Int (seq.len s1))+[GOOD] (define-fun s9 () Bool (<= s8 s7))+[GOOD] (define-fun s11 () Int (seq.len s0))+[GOOD] (define-fun s12 () Bool (>= s8 s11))+[GOOD] (define-fun s13 () (Seq Int) (seq.extract s0 s7 s8))+[GOOD] (define-fun s14 () (Seq Int) (ite s12 s0 s13))+[GOOD] (define-fun s15 () (Seq Int) (ite s9 s10 s14))+[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 () Bool (= s2 s17))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s4)+[GOOD] (assert s6)+[GOOD] (assert s18)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s2))+[RECV] ((s2 (seq.++ (seq.unit 12)+               (seq.unit 14)+               (seq.unit 16)+               (seq.unit 18)+               (seq.unit 20)+               (seq.unit 22)+               (seq.unit 24)+               (seq.unit 26)+               (seq.unit 28)+               (seq.unit 30))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9)+               (seq.unit 10))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 11)+               (seq.unit 12)+               (seq.unit 13)+               (seq.unit 14)+               (seq.unit 15)+               (seq.unit 16)+               (seq.unit 17)+               (seq.unit 18)+               (seq.unit 19)+               (seq.unit 20))))+[SEND] (get-value (s2))+[RECV] ((s2 (seq.++ (seq.unit 12)+               (seq.unit 14)+               (seq.unit 16)+               (seq.unit 18)+               (seq.unit 20)+               (seq.unit 22)+               (seq.unit 24)+               (seq.unit 26)+               (seq.unit 28)+               (seq.unit 30))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =          [1,2,3,4,5,6,7,8,9,10] :: [Integer]+  s1 = [11,12,13,14,15,16,17,18,19,20] :: [Integer]+  s2 = [12,14,16,18,20,22,24,26,28,30] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda25.gold view
@@ -0,0 +1,100 @@+** 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 s3 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8) (seq.unit 9) (seq.unit 10)))+[GOOD] (define-fun s5 () (Seq Int) (seq.++ (seq.unit 10) (seq.unit 9) (seq.unit 8) (seq.unit 7) (seq.unit 6) (seq.unit 5) (seq.unit 4) (seq.unit 3) (seq.unit 2) (seq.unit 1)))+[GOOD] (define-fun s7 () Int 0)+[GOOD] (define-fun s10 () (Seq Int) (as seq.empty (Seq Int)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[GOOD] (declare-fun s1 () (Seq Int))+[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)+                       (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)))))+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[GOOD] (define-fun s4 () Bool (= s0 s3))+[GOOD] (define-fun s6 () Bool (= s1 s5))+[GOOD] (define-fun s8 () Int (seq.len s1))+[GOOD] (define-fun s9 () Bool (<= s8 s7))+[GOOD] (define-fun s11 () Int (seq.len s0))+[GOOD] (define-fun s12 () Bool (>= s8 s11))+[GOOD] (define-fun s13 () (Seq Int) (seq.extract s0 s7 s8))+[GOOD] (define-fun s14 () (Seq Int) (ite s12 s0 s13))+[GOOD] (define-fun s15 () (Seq Int) (ite s9 s10 s14))+[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))+[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)+[GOOD] (assert s6)+[GOOD] (assert s20)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s2))+[RECV] ((s2 110))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9)+               (seq.unit 10))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 10)+               (seq.unit 9)+               (seq.unit 8)+               (seq.unit 7)+               (seq.unit 6)+               (seq.unit 5)+               (seq.unit 4)+               (seq.unit 3)+               (seq.unit 2)+               (seq.unit 1))))+[SEND] (get-value (s2))+[RECV] ((s2 110))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5,6,7,8,9,10] :: [Integer]+  s1 = [10,9,8,7,6,5,4,3,2,1] :: [Integer]+  s2 =                    110 :: Integer
+ SBVTestSuite/GoldFiles/lambda26.gold view
@@ -0,0 +1,152 @@+** 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 s2 () (Seq (Seq Int)) (seq.++ (seq.unit (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5))) (seq.unit (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8) (seq.unit 9) (seq.unit 10))) (seq.unit (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8) (seq.unit 9) (seq.unit 10) (seq.unit 11) (seq.unit 12) (seq.unit 13) (seq.unit 14) (seq.unit 15) (seq.unit 16) (seq.unit 17) (seq.unit 18) (seq.unit 19) (seq.unit 20)))))+[GOOD] (define-fun s4 () (Seq Int) (as seq.empty (Seq Int)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq (Seq Int)))+[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 (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)+[GOOD] (assert s6)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9)+               (seq.unit 10)+               (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9)+               (seq.unit 10)+               (seq.unit 11)+               (seq.unit 12)+               (seq.unit 13)+               (seq.unit 14)+               (seq.unit 15)+               (seq.unit 16)+               (seq.unit 17)+               (seq.unit 18)+               (seq.unit 19)+               (seq.unit 20))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit (seq.++ (seq.unit 1)+                                 (seq.unit 2)+                                 (seq.unit 3)+                                 (seq.unit 4)+                                 (seq.unit 5)))+               (seq.unit (seq.++ (seq.unit 1)+                                 (seq.unit 2)+                                 (seq.unit 3)+                                 (seq.unit 4)+                                 (seq.unit 5)+                                 (seq.unit 6)+                                 (seq.unit 7)+                                 (seq.unit 8)+                                 (seq.unit 9)+                                 (seq.unit 10)))+               (seq.unit (seq.++ (seq.unit 1)+                                 (seq.unit 2)+                                 (seq.unit 3)+                                 (seq.unit 4)+                                 (seq.unit 5)+                                 (seq.unit 6)+                                 (seq.unit 7)+                                 (seq.unit 8)+                                 (seq.unit 9)+                                 (seq.unit 10)+                                 (seq.unit 11)+                                 (seq.unit 12)+                                 (seq.unit 13)+                                 (seq.unit 14)+                                 (seq.unit 15)+                                 (seq.unit 16)+                                 (seq.unit 17)+                                 (seq.unit 18)+                                 (seq.unit 19)+                                 (seq.unit 20))))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9)+               (seq.unit 10)+               (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9)+               (seq.unit 10)+               (seq.unit 11)+               (seq.unit 12)+               (seq.unit 13)+               (seq.unit 14)+               (seq.unit 15)+               (seq.unit 16)+               (seq.unit 17)+               (seq.unit 18)+               (seq.unit 19)+               (seq.unit 20))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [[1,2,3,4,5],[1,2,3,4,5,6,7,8,9,10],[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]] :: [[Integer]]+  s1 =       [1,2,3,4,5,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda27.gold view
@@ -0,0 +1,69 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 2) (seq.unit 4) (seq.unit 6) (seq.unit 8) (seq.unit 10)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 true))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 2) (seq.unit 4) (seq.unit 6) (seq.unit 8) (seq.unit 10))))+[SEND] (get-value (s1))+[RECV] ((s1 true))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [2,4,6,8,10] :: [Integer]+  s1 =         True :: Bool
+ SBVTestSuite/GoldFiles/lambda28.gold view
@@ -0,0 +1,74 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 2) (seq.unit 4) (seq.unit 6) (seq.unit 1) (seq.unit 8) (seq.unit 10)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 false))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 2)+               (seq.unit 4)+               (seq.unit 6)+               (seq.unit 1)+               (seq.unit 8)+               (seq.unit 10))))+[SEND] (get-value (s1))+[RECV] ((s1 false))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [2,4,6,1,8,10] :: [Integer]+  s1 =          False :: Bool
+ SBVTestSuite/GoldFiles/lambda29.gold view
@@ -0,0 +1,69 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 2) (seq.unit 4) (seq.unit 6) (seq.unit 8) (seq.unit 10)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 false))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 2) (seq.unit 4) (seq.unit 6) (seq.unit 8) (seq.unit 10))))+[SEND] (get-value (s1))+[RECV] ((s1 false))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [2,4,6,8,10] :: [Integer]+  s1 =        False :: Bool
+ SBVTestSuite/GoldFiles/lambda30.gold view
@@ -0,0 +1,74 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 2) (seq.unit 4) (seq.unit 6) (seq.unit 1) (seq.unit 8) (seq.unit 10)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s5 () Bool (= s1 s4))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 true))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 2)+               (seq.unit 4)+               (seq.unit 6)+               (seq.unit 1)+               (seq.unit 8)+               (seq.unit 10))))+[SEND] (get-value (s1))+[RECV] ((s1 true))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [2,4,6,1,8,10] :: [Integer]+  s1 =           True :: Bool
+ SBVTestSuite/GoldFiles/lambda31.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] ; --- literal constants ---+[GOOD] (define-fun s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8) (seq.unit 9) (seq.unit 10)))+[GOOD] (define-fun s4 () (Seq Int) (as seq.empty (Seq Int)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s6 () Bool (= s1 s5))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s6)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 2) (seq.unit 4) (seq.unit 6) (seq.unit 8) (seq.unit 10))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9)+               (seq.unit 10))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 2) (seq.unit 4) (seq.unit 6) (seq.unit 8) (seq.unit 10))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5,6,7,8,9,10] :: [Integer]+  s1 =           [2,4,6,8,10] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda32.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] ; --- literal constants ---+[GOOD] (define-fun s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6) (seq.unit 7) (seq.unit 8) (seq.unit 9) (seq.unit 10)))+[GOOD] (define-fun s4 () (Seq Int) (as seq.empty (Seq Int)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[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))+[GOOD] (define-fun s6 () Bool (= s1 s5))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s3)+[GOOD] (assert s6)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 1) (seq.unit 3) (seq.unit 5) (seq.unit 7) (seq.unit 9))))+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1)+               (seq.unit 2)+               (seq.unit 3)+               (seq.unit 4)+               (seq.unit 5)+               (seq.unit 6)+               (seq.unit 7)+               (seq.unit 8)+               (seq.unit 9)+               (seq.unit 10))))+[SEND] (get-value (s1))+[RECV] ((s1 (seq.++ (seq.unit 1) (seq.unit 3) (seq.unit 5) (seq.unit 7) (seq.unit 9))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3,4,5,6,7,8,9,10] :: [Integer]+  s1 =            [1,3,5,7,9] :: [Integer]
+ SBVTestSuite/GoldFiles/lambda33.gold view
@@ -0,0 +1,1 @@+#x00
+ SBVTestSuite/GoldFiles/lambda34.gold view
@@ -0,0 +1,4 @@+(lambda ((l1_s0 (_ BitVec 8)))+  (let ((l1_s1 #x01))+  (let ((l1_s2 (bvadd l1_s0 l1_s1)))+  l1_s2)))
+ SBVTestSuite/GoldFiles/lambda35.gold view
@@ -0,0 +1,2 @@+(lambda ((l1_s0 (_ BitVec 8)) (l1_s1 (_ BitVec 8)))+  (bvadd l1_s0 l1_s1))
+ SBVTestSuite/GoldFiles/lambda36.gold view
@@ -0,0 +1,3 @@+; user defined axiom: +(assert (forall ((l1_s0 Bool))+    true))
+ SBVTestSuite/GoldFiles/lambda37.gold view
@@ -0,0 +1,3 @@+; user defined axiom: +(assert (forall ((l1_s0 Bool))+    (not l1_s0)))
+ SBVTestSuite/GoldFiles/lambda38.gold view
@@ -0,0 +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)))))
+ SBVTestSuite/GoldFiles/lambda40.gold view
@@ -0,0 +1,3 @@+; -- user given definition: lambda40+(define-fun lambda40 () Int+  0)
+ SBVTestSuite/GoldFiles/lambda41.gold view
@@ -0,0 +1,5 @@+; -- user given definition: lambda41+(define-fun lambda41 ((l1_s0 Int)) Int+  (let ((l1_s1 1))+  (let ((l1_s2 (+ l1_s0 l1_s1)))+  l1_s2)))
+ SBVTestSuite/GoldFiles/lambda42.gold view
@@ -0,0 +1,3 @@+; -- user given definition: lambda42+(define-fun lambda42 ((l1_s0 Int) (l1_s1 Int)) Int+  (+ l1_s0 l1_s1))
+ SBVTestSuite/GoldFiles/lambda43.gold view
@@ -0,0 +1,3 @@+; -- user given definition: lambda43+(define-fun lambda43 () (_ BitVec 32)+  #x00000000)
+ SBVTestSuite/GoldFiles/lambda44.gold view
@@ -0,0 +1,5 @@+; -- user given definition: lambda44+(define-fun lambda44 ((l1_s0 (_ BitVec 32))) (_ BitVec 32)+  (let ((l1_s1 #x00000001))+  (let ((l1_s2 (bvadd l1_s0 l1_s1)))+  l1_s2)))
+ SBVTestSuite/GoldFiles/lambda45.gold view
@@ -0,0 +1,3 @@+; -- user given definition: lambda45+(define-fun lambda45 ((l1_s0 (_ BitVec 32)) (l1_s1 (_ BitVec 32))) (_ BitVec 32)+  (bvadd l1_s0 l1_s1))
+ SBVTestSuite/GoldFiles/lambda46.gold view
@@ -0,0 +1,49 @@+** 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 ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () Int 5)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given definition: add1+[GOOD] (define-fun add1 ((l1_s0 Int)) Int+         (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)+[GOOD] (declare-fun s4 () Int)+[GOOD] (define-fun s5 () Int (add1 s4))+[GOOD] (define-fun s6 () Bool (= s2 s5))+[GOOD] (assert s6)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 4))+[SEND] (get-value (s4))+[RECV] ((s4 4))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = 4 :: Integer+  s4 = 4 :: Integer
+ SBVTestSuite/GoldFiles/lambda47.gold view
@@ -0,0 +1,66 @@+** 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 ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () Int 5)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] (declare-fun s1 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given definition: sumToN [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))))))))+[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)+[GOOD] (declare-fun s7 () Int)+[GOOD] (declare-fun s8 () Int)+[GOOD] (define-fun s9 () Bool (= s2 s7))+[GOOD] (define-fun s10 () Int (sumToN s7))+[GOOD] (define-fun s11 () Bool (= s8 s10))+[GOOD] (define-fun s12 () Bool (and s9 s11))+[GOOD] (assert s12)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 5))+[SEND] (get-value (s1))+[RECV] ((s1 15))+[SEND] (get-value (s7))+[RECV] ((s7 5))+[SEND] (get-value (s8))+[RECV] ((s8 15))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =  5 :: Integer+  s1 = 15 :: Integer+  s7 =  5 :: Integer+  s8 = 15 :: Integer
+ SBVTestSuite/GoldFiles/lambda47_c.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-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () Int 15)+[GOOD] ; --- top level inputs ---+[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)+[GOOD] (declare-fun s3 () Int)+[GOOD] (define-fun s4 () Bool (= s1 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 15))+[SEND] (get-value (s3))+[RECV] ((s3 15))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = 15 :: Integer+  s3 = 15 :: Integer
+ SBVTestSuite/GoldFiles/lambda48.gold view
@@ -0,0 +1,71 @@+** 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 s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3)))+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () (Seq Int))+[GOOD] (declare-fun s1 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given definition: list_length [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))))))))))+[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)+[GOOD] (declare-fun s7 () (Seq Int))+[GOOD] (declare-fun s8 () Int)+[GOOD] (define-fun s9 () Bool (= s2 s7))+[GOOD] (define-fun s10 () Int (list_length s7))+[GOOD] (define-fun s11 () Bool (= s8 s10))+[GOOD] (define-fun s12 () Bool (and s9 s11))+[GOOD] (assert s12)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3))))+[SEND] (get-value (s1))+[RECV] ((s1 3))+[SEND] (get-value (s7))+[RECV] ((s7 (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3))))+[SEND] (get-value (s8))+[RECV] ((s8 3))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = [1,2,3] :: [Integer]+  s1 =       3 :: Integer+  s7 = [1,2,3] :: [Integer]+  s8 =       3 :: Integer
+ SBVTestSuite/GoldFiles/lambda48_c.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-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s1 () Int 3)+[GOOD] ; --- top level inputs ---+[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)+[GOOD] (declare-fun s3 () Int)+[GOOD] (define-fun s4 () Bool (= s1 s3))+[GOOD] (assert s4)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 3))+[SEND] (get-value (s3))+[RECV] ((s3 3))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = 3 :: Integer+  s3 = 3 :: Integer
+ SBVTestSuite/GoldFiles/lambda49.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] (declare-datatypes ((SBVTuple2 2)) ((par (T1 T2)+                                           ((mkSBVTuple2 (proj_1_SBVTuple2 T1)+                                                         (proj_2_SBVTuple2 T2))))))+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () Int 20)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] (declare-fun s1 () Bool)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given definition: isEvenOdd [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)))))))))))))))+[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)+[GOOD] (declare-fun s8 () Int)+[GOOD] (declare-fun s9 () Bool)+[GOOD] (define-fun s10 () Bool (= s2 s8))+[GOOD] (define-fun s11 () (SBVTuple2 Bool Bool) (isEvenOdd s8))+[GOOD] (define-fun s12 () Bool (proj_1_SBVTuple2 s11))+[GOOD] (define-fun s13 () Bool (= s9 s12))+[GOOD] (define-fun s14 () Bool (and s10 s13))+[GOOD] (assert s14)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 20))+[SEND] (get-value (s1))+[RECV] ((s1 true))+[SEND] (get-value (s8))+[RECV] ((s8 20))+[SEND] (get-value (s9))+[RECV] ((s9 true))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =   20 :: Integer+  s1 = True :: Bool+  s8 =   20 :: Integer+  s9 = True :: Bool
+ SBVTestSuite/GoldFiles/lambda49_c.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-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 () 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)+[GOOD] (declare-fun s1 () Bool)+[GOOD] (assert s1)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 true))+[SEND] (get-value (s1))+[RECV] ((s1 true))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = True :: Bool+  s1 = True :: Bool
+ SBVTestSuite/GoldFiles/lambda50.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] (declare-datatypes ((SBVTuple2 2)) ((par (T1 T2)+                                           ((mkSBVTuple2 (proj_1_SBVTuple2 T1)+                                                         (proj_2_SBVTuple2 T2))))))+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () Int 21)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] (declare-fun s1 () Bool)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given definition: isEvenOdd [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)))))))))))))))+[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)+[GOOD] (declare-fun s8 () Int)+[GOOD] (declare-fun s9 () Bool)+[GOOD] (define-fun s10 () Bool (= s2 s8))+[GOOD] (define-fun s11 () (SBVTuple2 Bool Bool) (isEvenOdd s8))+[GOOD] (define-fun s12 () Bool (proj_1_SBVTuple2 s11))+[GOOD] (define-fun s13 () Bool (= s9 s12))+[GOOD] (define-fun s14 () Bool (and s10 s13))+[GOOD] (assert s14)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 21))+[SEND] (get-value (s1))+[RECV] ((s1 false))+[SEND] (get-value (s8))+[RECV] ((s8 21))+[SEND] (get-value (s9))+[RECV] ((s9 false))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =    21 :: Integer+  s1 = False :: Bool+  s8 =    21 :: Integer+  s9 = False :: Bool
+ SBVTestSuite/GoldFiles/lambda50_c.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-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 () 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] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s1)+[GOOD] (declare-fun s2 () Bool)+[GOOD] (define-fun s3 () Bool (= false s2))+[GOOD] (assert s3)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 false))+[SEND] (get-value (s2))+[RECV] ((s2 false))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = False :: Bool+  s2 = False :: Bool
+ SBVTestSuite/GoldFiles/lambda51.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] (declare-datatypes ((SBVTuple2 2)) ((par (T1 T2)+                                           ((mkSBVTuple2 (proj_1_SBVTuple2 T1)+                                                         (proj_2_SBVTuple2 T2))))))+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () Int 20)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] (declare-fun s1 () Bool)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given definition: isEvenOdd [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)))))))))))))))+[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)+[GOOD] (declare-fun s8 () Int)+[GOOD] (declare-fun s9 () Bool)+[GOOD] (define-fun s10 () Bool (= s2 s8))+[GOOD] (define-fun s11 () (SBVTuple2 Bool Bool) (isEvenOdd s8))+[GOOD] (define-fun s12 () Bool (proj_2_SBVTuple2 s11))+[GOOD] (define-fun s13 () Bool (= s9 s12))+[GOOD] (define-fun s14 () Bool (and s10 s13))+[GOOD] (assert s14)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 20))+[SEND] (get-value (s1))+[RECV] ((s1 false))+[SEND] (get-value (s8))+[RECV] ((s8 20))+[SEND] (get-value (s9))+[RECV] ((s9 false))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =    20 :: Integer+  s1 = False :: Bool+  s8 =    20 :: Integer+  s9 = False :: Bool
+ SBVTestSuite/GoldFiles/lambda51_c.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-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 () 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] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s1)+[GOOD] (declare-fun s2 () Bool)+[GOOD] (define-fun s3 () Bool (= false s2))+[GOOD] (assert s3)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 false))+[SEND] (get-value (s2))+[RECV] ((s2 false))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = False :: Bool+  s2 = False :: Bool
+ SBVTestSuite/GoldFiles/lambda52.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] (declare-datatypes ((SBVTuple2 2)) ((par (T1 T2)+                                           ((mkSBVTuple2 (proj_1_SBVTuple2 T1)+                                                         (proj_2_SBVTuple2 T2))))))+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () Int 21)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s0 () Int)+[GOOD] (declare-fun s1 () Bool)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given definition: isEvenOdd [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)))))))))))))))+[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)+[GOOD] (declare-fun s8 () Int)+[GOOD] (declare-fun s9 () Bool)+[GOOD] (define-fun s10 () Bool (= s2 s8))+[GOOD] (define-fun s11 () (SBVTuple2 Bool Bool) (isEvenOdd s8))+[GOOD] (define-fun s12 () Bool (proj_2_SBVTuple2 s11))+[GOOD] (define-fun s13 () Bool (= s9 s12))+[GOOD] (define-fun s14 () Bool (and s10 s13))+[GOOD] (assert s14)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 21))+[SEND] (get-value (s1))+[RECV] ((s1 true))+[SEND] (get-value (s8))+[RECV] ((s8 21))+[SEND] (get-value (s9))+[RECV] ((s9 true))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 =   21 :: Integer+  s1 = True :: Bool+  s8 =   21 :: Integer+  s9 = True :: Bool
+ SBVTestSuite/GoldFiles/lambda52_c.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-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 () 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)+[GOOD] (declare-fun s1 () Bool)+[GOOD] (assert s1)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 true))+[SEND] (get-value (s1))+[RECV] ((s1 true))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = True :: Bool+  s1 = True :: Bool
+ SBVTestSuite/GoldFiles/lambda53.gold view
@@ -0,0 +1,46 @@+** 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 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 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given definition: foo+[GOOD] (define-fun foo ((l1_s0 Int)) Int+         (+ s0 l1_s0))+[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)+[GOOD] (declare-fun s3 () Int)+[GOOD] (define-fun s4 () Int (foo s3))+[GOOD] (define-fun s5 () Bool (= s3 s4))+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 0))+[SEND] (get-value (s3))+[RECV] ((s3 0))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = 0 :: Integer+  s3 = 0 :: Integer
+ SBVTestSuite/GoldFiles/lambda54.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-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 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given definition: bar+[GOOD] (define-fun bar ((l1_s0 Int)) Int+         (let ((l1_s1 1))+         (let ((l1_s2 (+ l1_s0 l1_s1)))+         l1_s2)))+[GOOD] ; -- user given definition: foo [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))))+[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)+[GOOD] (declare-fun s5 () Int)+[GOOD] (define-fun s6 () Int (bar s5))+[GOOD] (define-fun s7 () Int (foo s5))+[GOOD] (define-fun s8 () Int (+ s6 s7))+[GOOD] (define-fun s9 () Bool (= s5 s8))+[GOOD] (assert s9)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 (- 3)))+[SEND] (get-value (s5))+[RECV] ((s5 (- 3)))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = -3 :: Integer+  s5 = -3 :: Integer
+ SBVTestSuite/GoldFiles/lambda55.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-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 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given definition: bar+[GOOD] (define-fun bar ((l2_s0 Int)) Int+         (let ((l2_s1 1))+         (let ((l2_s2 (+ l2_s0 l2_s1)))+         l2_s2)))+[GOOD] ; -- user given definition: foo [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))))+[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)+[GOOD] (declare-fun s5 () Int)+[GOOD] (define-fun s6 () Int (foo s5))+[GOOD] (define-fun s7 () Int (bar s5))+[GOOD] (define-fun s8 () Int (+ s6 s7))+[GOOD] (define-fun s9 () Bool (= s5 s8))+[GOOD] (assert s9)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 (- 3)))+[SEND] (get-value (s5))+[RECV] ((s5 (- 3)))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = -3 :: Integer+  s5 = -3 :: Integer
+ SBVTestSuite/GoldFiles/lambda56.gold view
@@ -0,0 +1,56 @@+** 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 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 () Int)+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given mutually-recursive definitions: bar, foo+[GOOD] (define-funs-rec+         ((bar ((l2_s0 Int)) Int)+          (foo ((l1_s0 Int)) Int))+         (; Definition of: bar. [Refers to: foo]+          (let ((l2_s2 1))+          (let ((l2_s1 (foo l2_s0)))+          (let ((l2_s3 (+ l2_s1 l2_s2)))+          l2_s3)))+          ; Definition of: foo. [Refers to: bar]+          (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)+[GOOD] (declare-fun s5 () Int)+[GOOD] (define-fun s6 () Int (foo s5))+[GOOD] (define-fun s7 () Int (bar s5))+[GOOD] (define-fun s8 () Int (+ s6 s7))+[GOOD] (define-fun s9 () Bool (= s5 s8))+[GOOD] (assert s9)+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+All good, expecting: Unsat
+ SBVTestSuite/GoldFiles/lambda57.gold view
@@ -0,0 +1,101 @@+** 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 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))+[GOOD] ; --- constant tables ---+[GOOD] ; --- non-constant tables ---+[GOOD] ; --- arrays ---+[GOOD] ; --- uninterpreted constants ---+[GOOD] ; --- user defined functions ---+[GOOD] ; -- user given mutually-recursive definitions: f1, f2, f3, f4+[GOOD] (define-funs-rec+         ((f1 ((l1_s0 (_ BitVec 8))) (_ BitVec 8))+          (f2 ((l2_s0 (_ BitVec 8))) (_ BitVec 8))+          (f3 ((l3_s0 (_ BitVec 8))) (_ BitVec 8))+          (f4 ((l4_s0 (_ BitVec 8))) (_ BitVec 8)))+         (; Definition of: f1. [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)))))))))))+          ; Definition of: f2. [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)))))))))))+          ; Definition of: f3. [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)))))))))))+          ; Definition of: f4. [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)))))))))))))+[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)+[GOOD] (declare-fun s3 () (_ BitVec 8))+[GOOD] (define-fun s4 () (_ BitVec 8) (f1 s3))+[GOOD] (define-fun s5 () Bool (= s3 s4))+[GOOD] (assert s5)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 #x00))+[SEND] (get-value (s3))+[RECV] ((s3 #x00))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+  s0 = 0 :: Word8+  s3 = 0 :: Word8
+ SBVTestSuite/GoldFiles/lambda58.gold view
@@ -0,0 +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)))))
+ SBVTestSuite/GoldFiles/lambda59.gold view
@@ -0,0 +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))))))
+ SBVTestSuite/GoldFiles/lambda60.gold view
@@ -0,0 +1,35 @@+** 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 ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+[There are no variables bound by the model.]
+ SBVTestSuite/GoldFiles/lambda61.gold view
@@ -0,0 +1,33 @@+** 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 ALL) ; external query, using all logics.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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)+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+All good, expecting: Unsat
+ SBVTestSuite/GoldFiles/lambda62.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-logic ALL) ; has user-defined sorts, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] (declare-sort P 0)  ; N.B. Uninterpreted sort.+[GOOD] (declare-fun P_witness () P)+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert (not s0))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+Q.E.D.
+ SBVTestSuite/GoldFiles/lambda63.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-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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))+[SEND] (check-sat)+[RECV] sat+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[SEND] (get-value (R))+[RECV] ((R ((as const Array) false)))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+Falsifiable. Counter-example:+  R :: Integer -> Integer -> Bool+  R _ _ = False
+ SBVTestSuite/GoldFiles/lambda64.gold view
@@ -0,0 +1,43 @@+** 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] ; has special relations, no logic set.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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)))))+[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)+[GOOD] (assert (not s3))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+Q.E.D.
+ SBVTestSuite/GoldFiles/lambda65.gold view
@@ -0,0 +1,45 @@+** 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] ; has special relations, no logic set.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; -- user given definition: leq+[GOOD] (define-fun leq ((l2_s0 Int) (l2_s1 Int)) Bool+         (<= 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)))))+[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)+[GOOD] (assert (not s3))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+Q.E.D.
+ SBVTestSuite/GoldFiles/lambda66.gold view
@@ -0,0 +1,48 @@+** 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] ; has special relations, no logic set.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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)+[GOOD] (declare-fun tcU (Int Int) Bool)+[GOOD] (assert (forall ((x Int) (y Int)) (= (tcU x y) ((_ transitive-closure __internal_sbv__TransitiveClosure_tcU_) x y))))+[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)))))+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[GOOD] (assert (not s1))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+Q.E.D.
+ SBVTestSuite/GoldFiles/lambda67.gold view
@@ -0,0 +1,48 @@+** 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] ; has special relations, no logic set.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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)+[GOOD] (declare-fun tcU ((_ BitVec 8) (_ BitVec 8)) Bool)+[GOOD] (assert (forall ((x (_ BitVec 8)) (y (_ BitVec 8))) (= (tcU x y) ((_ transitive-closure __internal_sbv__TransitiveClosure_tcU_) x y))))+[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)))))+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[GOOD] (assert (not s1))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+Q.E.D.
+ SBVTestSuite/GoldFiles/lambda68.gold view
@@ -0,0 +1,47 @@+** 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 ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[SEND] (get-value (F))+[RECV] ((F (lambda ((x!1 Int)) (+ 3 (* 2 x!1)))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+Satisfiable. Model:+  F :: Integer -> Integer+  F x = 3 + (2 * x)
+ SBVTestSuite/GoldFiles/lambda69.gold view
@@ -0,0 +1,48 @@+** 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 ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[SEND] (get-value (F))+[RECV] ((F (lambda ((x!1 Int) (x!2 Int)) (+ 3 (* 2 x!1) (* (- 1) x!2)))))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+Satisfiable. Model:+  F :: Integer -> Integer -> Integer+  F x y = 3 + (2 * x) + (-y)
+ SBVTestSuite/GoldFiles/lambda70.gold view
@@ -0,0 +1,65 @@+** 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 ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+[GOOD] (set-option :pp.max_depth      4294967295)+[GOOD] (set-option :pp.min_alias_size 4294967295)+[GOOD] (set-option :model.inline_def  true      )+[SEND] (get-value (x_eu1))+[RECV] ((x_eu1 ((as const Array) 0)))+[SEND] (get-value (x_eu2))+[RECV] ((x_eu2 ((as const Array) 1)))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT:+Satisfiable. Model:+  x_eu1 :: Integer -> Integer+  x_eu1 _ = 0++  x_eu2 :: Integer -> Integer+  x_eu2 _ = 1
SBVTestSuite/GoldFiles/legato.gold view
@@ -1,11 +1,11 @@ INPUTS-  s0 :: SWord8, existential, aliasing "x"-  s1 :: SWord8, existential, aliasing "y"-  s2 :: SWord8, existential, aliasing "lo"-  s3 :: SWord8, existential, aliasing "regX"-  s4 :: SWord8, existential, aliasing "regA"-  s5 :: SBool, existential, aliasing "flagC"-  s6 :: SBool, existential, aliasing "flagZ"+  s0 :: SWord8, aliasing "x"+  s1 :: SWord8, aliasing "y"+  s2 :: SWord8, aliasing "lo"+  s3 :: SWord8, aliasing "regX"+  s4 :: SWord8, aliasing "regA"+  s5 :: SBool, aliasing "flagC"+  s6 :: SBool, aliasing "flagZ" CONSTANTS   s7 = 256 :: Word16   s8 = 0 :: Word8@@ -16,7 +16,7 @@ ARRAYS UNINTERPRETED CONSTANTS USER GIVEN CODE SEGMENTS-AXIOMS+AXIOMS-DEFINITIONS DEFINE   s9 :: SWord 1 = choose [0:0] s0   s11 :: SBool = s9 /= s10
SBVTestSuite/GoldFiles/mapNoFailure.gold view
@@ -17,16 +17,16 @@ [GOOD] (define-fun s7 () Int 0) [GOOD] (define-fun s20 () Int 1) [GOOD] (define-fun s59 () Int 10)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Int (+ s0 s1)) [GOOD] (define-fun s4 () Int (+ s2 s3)) [GOOD] (define-fun s6 () Bool (= s4 s5))@@ -149,10 +149,8 @@ [GOOD] (define-fun s126 () Bool (and s124 s125)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s6) [GOOD] (assert s12) [GOOD] (assert s126)
SBVTestSuite/GoldFiles/mapWithFailure.gold view
@@ -18,15 +18,15 @@ [GOOD] (define-fun s6 () Int 1) [GOOD] (define-fun s91 () Int 2) [GOOD] (define-fun s93 () Int 11)-[GOOD] (define-fun s97 () Int 10)-[GOOD] ; --- skolem constants ---+[GOOD] (define-fun s96 () Int 10)+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "ints" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (seq.len s0)) [GOOD] (define-fun s3 () Bool (= s1 s2)) [GOOD] (define-fun s5 () Int (seq.nth s0 s2))@@ -116,74 +116,71 @@ [GOOD] (define-fun s90 () (Seq Int) (ite s3 s4 s89)) [GOOD] (define-fun s92 () Int (seq.nth s90 s91)) [GOOD] (define-fun s94 () Bool (> s92 s93))-[GOOD] (define-fun s95 () Bool (not s94))-[GOOD] (define-fun s96 () Bool (< s69 s2))-[GOOD] (define-fun s98 () Bool (> s69 s97))-[GOOD] (define-fun s99 () Bool (or s96 s98))-[GOOD] (define-fun s100 () Bool (not s68))-[GOOD] (define-fun s101 () Bool (and s99 s100))-[GOOD] (define-fun s102 () Bool (< s62 s2))-[GOOD] (define-fun s103 () Bool (> s62 s97))-[GOOD] (define-fun s104 () Bool (or s102 s103))-[GOOD] (define-fun s105 () Bool (or s101 s104))-[GOOD] (define-fun s106 () Bool (not s61))-[GOOD] (define-fun s107 () Bool (and s105 s106))-[GOOD] (define-fun s108 () Bool (< s55 s2))-[GOOD] (define-fun s109 () Bool (> s55 s97))-[GOOD] (define-fun s110 () Bool (or s108 s109))-[GOOD] (define-fun s111 () Bool (or s107 s110))-[GOOD] (define-fun s112 () Bool (not s54))-[GOOD] (define-fun s113 () Bool (and s111 s112))-[GOOD] (define-fun s114 () Bool (< s48 s2))-[GOOD] (define-fun s115 () Bool (> s48 s97))-[GOOD] (define-fun s116 () Bool (or s114 s115))-[GOOD] (define-fun s117 () Bool (or s113 s116))-[GOOD] (define-fun s118 () Bool (not s47))-[GOOD] (define-fun s119 () Bool (and s117 s118))-[GOOD] (define-fun s120 () Bool (< s41 s2))-[GOOD] (define-fun s121 () Bool (> s41 s97))-[GOOD] (define-fun s122 () Bool (or s120 s121))-[GOOD] (define-fun s123 () Bool (or s119 s122))-[GOOD] (define-fun s124 () Bool (not s40))-[GOOD] (define-fun s125 () Bool (and s123 s124))-[GOOD] (define-fun s126 () Bool (< s34 s2))-[GOOD] (define-fun s127 () Bool (> s34 s97))-[GOOD] (define-fun s128 () Bool (or s126 s127))-[GOOD] (define-fun s129 () Bool (or s125 s128))-[GOOD] (define-fun s130 () Bool (not s33))-[GOOD] (define-fun s131 () Bool (and s129 s130))-[GOOD] (define-fun s132 () Bool (< s27 s2))-[GOOD] (define-fun s133 () Bool (> s27 s97))-[GOOD] (define-fun s134 () Bool (or s132 s133))-[GOOD] (define-fun s135 () Bool (or s131 s134))-[GOOD] (define-fun s136 () Bool (not s26))-[GOOD] (define-fun s137 () Bool (and s135 s136))-[GOOD] (define-fun s138 () Bool (< s20 s2))-[GOOD] (define-fun s139 () Bool (> s20 s97))-[GOOD] (define-fun s140 () Bool (or s138 s139))-[GOOD] (define-fun s141 () Bool (or s137 s140))-[GOOD] (define-fun s142 () Bool (not s19))-[GOOD] (define-fun s143 () Bool (and s141 s142))-[GOOD] (define-fun s144 () Bool (< s13 s2))-[GOOD] (define-fun s145 () Bool (> s13 s97))-[GOOD] (define-fun s146 () Bool (or s144 s145))-[GOOD] (define-fun s147 () Bool (or s143 s146))-[GOOD] (define-fun s148 () Bool (not s12))-[GOOD] (define-fun s149 () Bool (and s147 s148))-[GOOD] (define-fun s150 () Bool (< s5 s2))-[GOOD] (define-fun s151 () Bool (> s5 s97))-[GOOD] (define-fun s152 () Bool (or s150 s151))-[GOOD] (define-fun s153 () Bool (or s149 s152))-[GOOD] (define-fun s154 () Bool (not s3))-[GOOD] (define-fun s155 () Bool (and s153 s154))-[GOOD] (define-fun s156 () Bool (or s95 s155))+[GOOD] (define-fun s95 () Bool (< s69 s2))+[GOOD] (define-fun s97 () Bool (> s69 s96))+[GOOD] (define-fun s98 () Bool (or s95 s97))+[GOOD] (define-fun s99 () Bool (not s68))+[GOOD] (define-fun s100 () Bool (and s98 s99))+[GOOD] (define-fun s101 () Bool (< s62 s2))+[GOOD] (define-fun s102 () Bool (> s62 s96))+[GOOD] (define-fun s103 () Bool (or s101 s102))+[GOOD] (define-fun s104 () Bool (or s100 s103))+[GOOD] (define-fun s105 () Bool (not s61))+[GOOD] (define-fun s106 () Bool (and s104 s105))+[GOOD] (define-fun s107 () Bool (< s55 s2))+[GOOD] (define-fun s108 () Bool (> s55 s96))+[GOOD] (define-fun s109 () Bool (or s107 s108))+[GOOD] (define-fun s110 () Bool (or s106 s109))+[GOOD] (define-fun s111 () Bool (not s54))+[GOOD] (define-fun s112 () Bool (and s110 s111))+[GOOD] (define-fun s113 () Bool (< s48 s2))+[GOOD] (define-fun s114 () Bool (> s48 s96))+[GOOD] (define-fun s115 () Bool (or s113 s114))+[GOOD] (define-fun s116 () Bool (or s112 s115))+[GOOD] (define-fun s117 () Bool (not s47))+[GOOD] (define-fun s118 () Bool (and s116 s117))+[GOOD] (define-fun s119 () Bool (< s41 s2))+[GOOD] (define-fun s120 () Bool (> s41 s96))+[GOOD] (define-fun s121 () Bool (or s119 s120))+[GOOD] (define-fun s122 () Bool (or s118 s121))+[GOOD] (define-fun s123 () Bool (not s40))+[GOOD] (define-fun s124 () Bool (and s122 s123))+[GOOD] (define-fun s125 () Bool (< s34 s2))+[GOOD] (define-fun s126 () Bool (> s34 s96))+[GOOD] (define-fun s127 () Bool (or s125 s126))+[GOOD] (define-fun s128 () Bool (or s124 s127))+[GOOD] (define-fun s129 () Bool (not s33))+[GOOD] (define-fun s130 () Bool (and s128 s129))+[GOOD] (define-fun s131 () Bool (< s27 s2))+[GOOD] (define-fun s132 () Bool (> s27 s96))+[GOOD] (define-fun s133 () Bool (or s131 s132))+[GOOD] (define-fun s134 () Bool (or s130 s133))+[GOOD] (define-fun s135 () Bool (not s26))+[GOOD] (define-fun s136 () Bool (and s134 s135))+[GOOD] (define-fun s137 () Bool (< s20 s2))+[GOOD] (define-fun s138 () Bool (> s20 s96))+[GOOD] (define-fun s139 () Bool (or s137 s138))+[GOOD] (define-fun s140 () Bool (or s136 s139))+[GOOD] (define-fun s141 () Bool (not s19))+[GOOD] (define-fun s142 () Bool (and s140 s141))+[GOOD] (define-fun s143 () Bool (< s13 s2))+[GOOD] (define-fun s144 () Bool (> s13 s96))+[GOOD] (define-fun s145 () Bool (or s143 s144))+[GOOD] (define-fun s146 () Bool (or s142 s145))+[GOOD] (define-fun s147 () Bool (not s12))+[GOOD] (define-fun s148 () Bool (and s146 s147))+[GOOD] (define-fun s149 () Bool (< s5 s2))+[GOOD] (define-fun s150 () Bool (> s5 s96))+[GOOD] (define-fun s151 () Bool (or s149 s150))+[GOOD] (define-fun s152 () Bool (or s148 s151))+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s156)+[GOOD] ; --- formula ---+[GOOD] (assert s155) [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/maxlWithFailure.gold view
@@ -16,14 +16,14 @@ [GOOD] (define-fun s2 () Int 0) [GOOD] (define-fun s4 () Int 1) [GOOD] (define-fun s81 () Int 10)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "ints" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (seq.len s0)) [GOOD] (define-fun s3 () Bool (= s1 s2)) [GOOD] (define-fun s5 () Int (- s1 s4))@@ -103,65 +103,62 @@ [GOOD] (define-fun s79 () Int (ite s8 s11 s78)) [GOOD] (define-fun s80 () Int (ite s3 s2 s79)) [GOOD] (define-fun s82 () Bool (> s80 s81))-[GOOD] (define-fun s83 () Bool (not s82))-[GOOD] (define-fun s84 () Bool (< s9 s2))-[GOOD] (define-fun s85 () Bool (> s9 s81))-[GOOD] (define-fun s86 () Bool (or s84 s85))-[GOOD] (define-fun s87 () Bool (< s16 s2))-[GOOD] (define-fun s88 () Bool (> s16 s81))-[GOOD] (define-fun s89 () Bool (or s87 s88))-[GOOD] (define-fun s90 () Bool (or s86 s89))-[GOOD] (define-fun s91 () Bool (< s23 s2))-[GOOD] (define-fun s92 () Bool (> s23 s81))-[GOOD] (define-fun s93 () Bool (or s91 s92))-[GOOD] (define-fun s94 () Bool (or s90 s93))-[GOOD] (define-fun s95 () Bool (< s30 s2))-[GOOD] (define-fun s96 () Bool (> s30 s81))-[GOOD] (define-fun s97 () Bool (or s95 s96))-[GOOD] (define-fun s98 () Bool (or s94 s97))-[GOOD] (define-fun s99 () Bool (< s37 s2))-[GOOD] (define-fun s100 () Bool (> s37 s81))-[GOOD] (define-fun s101 () Bool (or s99 s100))-[GOOD] (define-fun s102 () Bool (or s98 s101))-[GOOD] (define-fun s103 () Bool (< s44 s2))-[GOOD] (define-fun s104 () Bool (> s44 s81))-[GOOD] (define-fun s105 () Bool (or s103 s104))-[GOOD] (define-fun s106 () Bool (or s102 s105))-[GOOD] (define-fun s107 () Bool (< s51 s2))-[GOOD] (define-fun s108 () Bool (> s51 s81))-[GOOD] (define-fun s109 () Bool (or s107 s108))-[GOOD] (define-fun s110 () Bool (or s106 s109))-[GOOD] (define-fun s111 () Bool (< s58 s2))-[GOOD] (define-fun s112 () Bool (> s58 s81))-[GOOD] (define-fun s113 () Bool (or s111 s112))-[GOOD] (define-fun s114 () Bool (or s110 s113))-[GOOD] (define-fun s115 () Bool (< s65 s2))-[GOOD] (define-fun s116 () Bool (> s65 s81))-[GOOD] (define-fun s117 () Bool (or s115 s116))-[GOOD] (define-fun s118 () Bool (or s114 s117))-[GOOD] (define-fun s119 () Bool (< s68 s2))-[GOOD] (define-fun s120 () Bool (> s68 s81))-[GOOD] (define-fun s121 () Bool (or s119 s120))-[GOOD] (define-fun s122 () Bool (or s118 s121))-[GOOD] (define-fun s123 () Bool (ite s64 s118 s122))-[GOOD] (define-fun s124 () Bool (ite s57 s114 s123))-[GOOD] (define-fun s125 () Bool (ite s50 s110 s124))-[GOOD] (define-fun s126 () Bool (ite s43 s106 s125))-[GOOD] (define-fun s127 () Bool (ite s36 s102 s126))-[GOOD] (define-fun s128 () Bool (ite s29 s98 s127))-[GOOD] (define-fun s129 () Bool (ite s22 s94 s128))-[GOOD] (define-fun s130 () Bool (ite s15 s90 s129))-[GOOD] (define-fun s131 () Bool (ite s8 s86 s130))-[GOOD] (define-fun s132 () Bool (not s3))-[GOOD] (define-fun s133 () Bool (and s131 s132))-[GOOD] (define-fun s134 () Bool (or s83 s133))+[GOOD] (define-fun s83 () Bool (< s9 s2))+[GOOD] (define-fun s84 () Bool (> s9 s81))+[GOOD] (define-fun s85 () Bool (or s83 s84))+[GOOD] (define-fun s86 () Bool (< s16 s2))+[GOOD] (define-fun s87 () Bool (> s16 s81))+[GOOD] (define-fun s88 () Bool (or s86 s87))+[GOOD] (define-fun s89 () Bool (or s85 s88))+[GOOD] (define-fun s90 () Bool (< s23 s2))+[GOOD] (define-fun s91 () Bool (> s23 s81))+[GOOD] (define-fun s92 () Bool (or s90 s91))+[GOOD] (define-fun s93 () Bool (or s89 s92))+[GOOD] (define-fun s94 () Bool (< s30 s2))+[GOOD] (define-fun s95 () Bool (> s30 s81))+[GOOD] (define-fun s96 () Bool (or s94 s95))+[GOOD] (define-fun s97 () Bool (or s93 s96))+[GOOD] (define-fun s98 () Bool (< s37 s2))+[GOOD] (define-fun s99 () Bool (> s37 s81))+[GOOD] (define-fun s100 () Bool (or s98 s99))+[GOOD] (define-fun s101 () Bool (or s97 s100))+[GOOD] (define-fun s102 () Bool (< s44 s2))+[GOOD] (define-fun s103 () Bool (> s44 s81))+[GOOD] (define-fun s104 () Bool (or s102 s103))+[GOOD] (define-fun s105 () Bool (or s101 s104))+[GOOD] (define-fun s106 () Bool (< s51 s2))+[GOOD] (define-fun s107 () Bool (> s51 s81))+[GOOD] (define-fun s108 () Bool (or s106 s107))+[GOOD] (define-fun s109 () Bool (or s105 s108))+[GOOD] (define-fun s110 () Bool (< s58 s2))+[GOOD] (define-fun s111 () Bool (> s58 s81))+[GOOD] (define-fun s112 () Bool (or s110 s111))+[GOOD] (define-fun s113 () Bool (or s109 s112))+[GOOD] (define-fun s114 () Bool (< s65 s2))+[GOOD] (define-fun s115 () Bool (> s65 s81))+[GOOD] (define-fun s116 () Bool (or s114 s115))+[GOOD] (define-fun s117 () Bool (or s113 s116))+[GOOD] (define-fun s118 () Bool (< s68 s2))+[GOOD] (define-fun s119 () Bool (> s68 s81))+[GOOD] (define-fun s120 () Bool (or s118 s119))+[GOOD] (define-fun s121 () Bool (or s117 s120))+[GOOD] (define-fun s122 () Bool (ite s64 s117 s121))+[GOOD] (define-fun s123 () Bool (ite s57 s113 s122))+[GOOD] (define-fun s124 () Bool (ite s50 s109 s123))+[GOOD] (define-fun s125 () Bool (ite s43 s105 s124))+[GOOD] (define-fun s126 () Bool (ite s36 s101 s125))+[GOOD] (define-fun s127 () Bool (ite s29 s97 s126))+[GOOD] (define-fun s128 () Bool (ite s22 s93 s127))+[GOOD] (define-fun s129 () Bool (ite s15 s89 s128))+[GOOD] (define-fun s130 () Bool (ite s8 s85 s129))+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s134)+[GOOD] ; --- formula ---+[GOOD] (assert s133) [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/maxrWithFailure.gold view
@@ -16,14 +16,14 @@ [GOOD] (define-fun s2 () Int 0) [GOOD] (define-fun s5 () Int 1) [GOOD] (define-fun s81 () Int 10)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "ints" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (seq.len s0)) [GOOD] (define-fun s3 () Bool (= s1 s2)) [GOOD] (define-fun s4 () Int (seq.nth s0 s2))@@ -103,74 +103,71 @@ [GOOD] (define-fun s79 () Int (ite s78 s77 s4)) [GOOD] (define-fun s80 () Int (ite s3 s2 s79)) [GOOD] (define-fun s82 () Bool (> s80 s81))-[GOOD] (define-fun s83 () Bool (not s82))-[GOOD] (define-fun s84 () Bool (< s50 s2))-[GOOD] (define-fun s85 () Bool (> s50 s81))-[GOOD] (define-fun s86 () Bool (or s84 s85))-[GOOD] (define-fun s87 () Bool (not s49))-[GOOD] (define-fun s88 () Bool (and s86 s87))-[GOOD] (define-fun s89 () Bool (< s45 s2))-[GOOD] (define-fun s90 () Bool (> s45 s81))-[GOOD] (define-fun s91 () Bool (or s89 s90))-[GOOD] (define-fun s92 () Bool (or s88 s91))-[GOOD] (define-fun s93 () Bool (not s44))-[GOOD] (define-fun s94 () Bool (and s92 s93))-[GOOD] (define-fun s95 () Bool (< s40 s2))-[GOOD] (define-fun s96 () Bool (> s40 s81))-[GOOD] (define-fun s97 () Bool (or s95 s96))-[GOOD] (define-fun s98 () Bool (or s94 s97))-[GOOD] (define-fun s99 () Bool (not s39))-[GOOD] (define-fun s100 () Bool (and s98 s99))-[GOOD] (define-fun s101 () Bool (< s35 s2))-[GOOD] (define-fun s102 () Bool (> s35 s81))-[GOOD] (define-fun s103 () Bool (or s101 s102))-[GOOD] (define-fun s104 () Bool (or s100 s103))-[GOOD] (define-fun s105 () Bool (not s34))-[GOOD] (define-fun s106 () Bool (and s104 s105))-[GOOD] (define-fun s107 () Bool (< s30 s2))-[GOOD] (define-fun s108 () Bool (> s30 s81))-[GOOD] (define-fun s109 () Bool (or s107 s108))-[GOOD] (define-fun s110 () Bool (or s106 s109))-[GOOD] (define-fun s111 () Bool (not s29))-[GOOD] (define-fun s112 () Bool (and s110 s111))-[GOOD] (define-fun s113 () Bool (< s25 s2))-[GOOD] (define-fun s114 () Bool (> s25 s81))-[GOOD] (define-fun s115 () Bool (or s113 s114))-[GOOD] (define-fun s116 () Bool (or s112 s115))-[GOOD] (define-fun s117 () Bool (not s24))-[GOOD] (define-fun s118 () Bool (and s116 s117))-[GOOD] (define-fun s119 () Bool (< s20 s2))-[GOOD] (define-fun s120 () Bool (> s20 s81))-[GOOD] (define-fun s121 () Bool (or s119 s120))-[GOOD] (define-fun s122 () Bool (or s118 s121))-[GOOD] (define-fun s123 () Bool (not s19))-[GOOD] (define-fun s124 () Bool (and s122 s123))-[GOOD] (define-fun s125 () Bool (< s15 s2))-[GOOD] (define-fun s126 () Bool (> s15 s81))-[GOOD] (define-fun s127 () Bool (or s125 s126))-[GOOD] (define-fun s128 () Bool (or s124 s127))-[GOOD] (define-fun s129 () Bool (not s14))-[GOOD] (define-fun s130 () Bool (and s128 s129))-[GOOD] (define-fun s131 () Bool (< s10 s2))-[GOOD] (define-fun s132 () Bool (> s10 s81))-[GOOD] (define-fun s133 () Bool (or s131 s132))-[GOOD] (define-fun s134 () Bool (or s130 s133))-[GOOD] (define-fun s135 () Bool (not s9))-[GOOD] (define-fun s136 () Bool (and s134 s135))-[GOOD] (define-fun s137 () Bool (< s4 s2))-[GOOD] (define-fun s138 () Bool (> s4 s81))-[GOOD] (define-fun s139 () Bool (or s137 s138))-[GOOD] (define-fun s140 () Bool (or s136 s139))-[GOOD] (define-fun s141 () Bool (not s3))-[GOOD] (define-fun s142 () Bool (and s140 s141))-[GOOD] (define-fun s143 () Bool (or s83 s142))+[GOOD] (define-fun s83 () Bool (< s50 s2))+[GOOD] (define-fun s84 () Bool (> s50 s81))+[GOOD] (define-fun s85 () Bool (or s83 s84))+[GOOD] (define-fun s86 () Bool (not s49))+[GOOD] (define-fun s87 () Bool (and s85 s86))+[GOOD] (define-fun s88 () Bool (< s45 s2))+[GOOD] (define-fun s89 () Bool (> s45 s81))+[GOOD] (define-fun s90 () Bool (or s88 s89))+[GOOD] (define-fun s91 () Bool (or s87 s90))+[GOOD] (define-fun s92 () Bool (not s44))+[GOOD] (define-fun s93 () Bool (and s91 s92))+[GOOD] (define-fun s94 () Bool (< s40 s2))+[GOOD] (define-fun s95 () Bool (> s40 s81))+[GOOD] (define-fun s96 () Bool (or s94 s95))+[GOOD] (define-fun s97 () Bool (or s93 s96))+[GOOD] (define-fun s98 () Bool (not s39))+[GOOD] (define-fun s99 () Bool (and s97 s98))+[GOOD] (define-fun s100 () Bool (< s35 s2))+[GOOD] (define-fun s101 () Bool (> s35 s81))+[GOOD] (define-fun s102 () Bool (or s100 s101))+[GOOD] (define-fun s103 () Bool (or s99 s102))+[GOOD] (define-fun s104 () Bool (not s34))+[GOOD] (define-fun s105 () Bool (and s103 s104))+[GOOD] (define-fun s106 () Bool (< s30 s2))+[GOOD] (define-fun s107 () Bool (> s30 s81))+[GOOD] (define-fun s108 () Bool (or s106 s107))+[GOOD] (define-fun s109 () Bool (or s105 s108))+[GOOD] (define-fun s110 () Bool (not s29))+[GOOD] (define-fun s111 () Bool (and s109 s110))+[GOOD] (define-fun s112 () Bool (< s25 s2))+[GOOD] (define-fun s113 () Bool (> s25 s81))+[GOOD] (define-fun s114 () Bool (or s112 s113))+[GOOD] (define-fun s115 () Bool (or s111 s114))+[GOOD] (define-fun s116 () Bool (not s24))+[GOOD] (define-fun s117 () Bool (and s115 s116))+[GOOD] (define-fun s118 () Bool (< s20 s2))+[GOOD] (define-fun s119 () Bool (> s20 s81))+[GOOD] (define-fun s120 () Bool (or s118 s119))+[GOOD] (define-fun s121 () Bool (or s117 s120))+[GOOD] (define-fun s122 () Bool (not s19))+[GOOD] (define-fun s123 () Bool (and s121 s122))+[GOOD] (define-fun s124 () Bool (< s15 s2))+[GOOD] (define-fun s125 () Bool (> s15 s81))+[GOOD] (define-fun s126 () Bool (or s124 s125))+[GOOD] (define-fun s127 () Bool (or s123 s126))+[GOOD] (define-fun s128 () Bool (not s14))+[GOOD] (define-fun s129 () Bool (and s127 s128))+[GOOD] (define-fun s130 () Bool (< s10 s2))+[GOOD] (define-fun s131 () Bool (> s10 s81))+[GOOD] (define-fun s132 () Bool (or s130 s131))+[GOOD] (define-fun s133 () Bool (or s129 s132))+[GOOD] (define-fun s134 () Bool (not s9))+[GOOD] (define-fun s135 () Bool (and s133 s134))+[GOOD] (define-fun s136 () Bool (< s4 s2))+[GOOD] (define-fun s137 () Bool (> s4 s81))+[GOOD] (define-fun s138 () Bool (or s136 s137))+[GOOD] (define-fun s139 () Bool (or s135 s138))+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s143)+[GOOD] ; --- formula ---+[GOOD] (assert s142) [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/noOpt1.gold view
@@ -10,20 +10,18 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula ---   
SBVTestSuite/GoldFiles/noOpt2.gold view
@@ -10,22 +10,20 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) [GOOD] ; --- optimization tracker variables --- [GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks mx [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula ---   
SBVTestSuite/GoldFiles/nonlinear_cvc4.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc4 --lang smt --incremental --interactive --no-interactive-prompt --model-witness-value [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -10,31 +10,30 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Real (/ 2.0 1.0))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Real) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (_ real_algebraic_number <1*x^2 + (-2), (-3/2, -5/4)>)))-*** Solver   : CVC5+[RECV] ((s0 (witness ((BOUND_VARIABLE_840 Real)) (or (= BOUND_VARIABLE_840 (/ (- 2965827) 2097152)) (and (>= BOUND_VARIABLE_840 (/ (- 1482917) 1048576)) (>= (* (- 1.0) BOUND_VARIABLE_840) (/ 741455 524288)))))))+*** Solver   : CVC4 *** Exit code: ExitSuccess+*** Std-out  :   FINAL: Satisfiable. Model:-  s0 = ((-3) % 2, (-5) % 4) :: Real+  s0 = -1.414216518402099609375... :: Real DONE!
+ SBVTestSuite/GoldFiles/nonlinear_cvc5.gold view
@@ -0,0 +1,38 @@+** Calling: cvc5 --lang smt --incremental --nl-cov+[GOOD] ; Automatically generated by SBV. Do not edit.+[GOOD] (set-option :print-success true)+[GOOD] (set-option :global-declarations true)+[GOOD] (set-option :diagnostic-output-channel "stdout")+[GOOD] (set-option :produce-models true)+[GOOD] (set-logic ALL) ; has algebraic reals, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () Real (/ 2.0 1.0))+[GOOD] ; --- top level inputs ---+[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)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 (_ real_algebraic_number <1*x^2 + (-2), (-3/2, -5/4)>)))+*** Solver   : CVC5+*** Exit code: ExitSuccess++FINAL:+Satisfiable. Model:+  s0 = ((-3) % 2, (-5) % 4) :: Real+DONE!
SBVTestSuite/GoldFiles/nonlinear_z3.gold view
@@ -11,22 +11,20 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Real (/ 2.0 1.0))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Real) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/optQuant1.gold view
@@ -1,5 +1,5 @@-*** Data.SBV: Problem needs optimization of metric in the scope of universally quantified variable(s):-***-***          goal [Depends on: x]-***-*** Optimization is only meaningful with existentially quantified metrics.+Optimal model:+  a    = 0 :: Integer+  b1   = 1 :: Integer+  b2   = 1 :: Integer+  goal = 0 :: Integer
SBVTestSuite/GoldFiles/optQuant5.gold view
@@ -1,5 +1,4 @@-*** Data.SBV: Problem needs optimization of metric in the scope of universally quantified variable(s):-***-***          goal [Depends on: x, y]-***-*** Optimization is only meaningful with existentially quantified metrics.+Optimal model:+  a    = 0 :: Integer+  b    = 0 :: Integer+  goal = 0 :: Integer
SBVTestSuite/GoldFiles/pbAtLeast.gold view
@@ -13,7 +13,7 @@ [GOOD] (define-fun s11 () (_ BitVec 32) #x00000001) [GOOD] (define-fun s12 () (_ BitVec 32) #x00000000) [GOOD] (define-fun s32 () (_ BitVec 32) #x00000005)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Bool) ; tracks user variable "b0" [GOOD] (declare-fun s1 () Bool) ; tracks user variable "b1" [GOOD] (declare-fun s2 () Bool) ; tracks user variable "b2"@@ -25,11 +25,11 @@ [GOOD] (declare-fun s8 () Bool) ; tracks user variable "b8" [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s10 () Bool ((_ at-least 5) s0 s1 s2 s3 s4 s5 s6 s7 s8 s9)) [GOOD] (define-fun s13 () (_ BitVec 32) (ite s0 s11 s12)) [GOOD] (define-fun s14 () (_ BitVec 32) (ite s1 s11 s12))@@ -55,10 +55,8 @@ [GOOD] (define-fun s35 () Bool (not s34)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s35) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/pbAtMost.gold view
@@ -13,7 +13,7 @@ [GOOD] (define-fun s11 () (_ BitVec 32) #x00000001) [GOOD] (define-fun s12 () (_ BitVec 32) #x00000000) [GOOD] (define-fun s32 () (_ BitVec 32) #x00000008)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Bool) ; tracks user variable "b0" [GOOD] (declare-fun s1 () Bool) ; tracks user variable "b1" [GOOD] (declare-fun s2 () Bool) ; tracks user variable "b2"@@ -25,11 +25,11 @@ [GOOD] (declare-fun s8 () Bool) ; tracks user variable "b8" [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s10 () Bool ((_ at-most 8) s0 s1 s2 s3 s4 s5 s6 s7 s8 s9)) [GOOD] (define-fun s13 () (_ BitVec 32) (ite s0 s11 s12)) [GOOD] (define-fun s14 () (_ BitVec 32) (ite s1 s11 s12))@@ -55,10 +55,8 @@ [GOOD] (define-fun s35 () Bool (not s34)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s35) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/pbEq.gold view
@@ -21,7 +21,7 @@ [GOOD] (define-fun s32 () Int 8) [GOOD] (define-fun s35 () Int 9) [GOOD] (define-fun s38 () Int 10)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Bool) ; tracks user variable "b0" [GOOD] (declare-fun s1 () Bool) ; tracks user variable "b1" [GOOD] (declare-fun s2 () Bool) ; tracks user variable "b2"@@ -33,11 +33,11 @@ [GOOD] (declare-fun s8 () Bool) ; tracks user variable "b8" [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s10 () Bool ((_ pbeq 7 1 2 3 4 5 6 7 8 9 10) s0 s1 s2 s3 s4 s5 s6 s7 s8 s9)) [GOOD] (define-fun s13 () Int (ite s0 s11 s12)) [GOOD] (define-fun s15 () Int (ite s1 s14 s12))@@ -63,10 +63,8 @@ [GOOD] (define-fun s43 () Bool (not s42)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s43) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/pbEq2.gold view
@@ -10,7 +10,7 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Bool) ; tracks user variable "b0" [GOOD] (declare-fun s1 () Bool) ; tracks user variable "b1" [GOOD] (declare-fun s2 () Bool) ; tracks user variable "b2"@@ -22,11 +22,11 @@ [GOOD] (declare-fun s8 () Bool) ; tracks user variable "b8" [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s10 () Bool ((_ pbeq 3 1 1) s1 s2)) [GOOD] (define-fun s11 () Bool ((_ pbeq 1 1 1) s1 s2)) [GOOD] (define-fun s12 () Bool (ite s0 s10 s11))@@ -34,29 +34,26 @@ [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 (not s16))-[GOOD] (define-fun s18 () Bool (= false s0))-[GOOD] (define-fun s19 () Bool (= false s2))-[GOOD] (define-fun s20 () Bool (= false s4))-[GOOD] (define-fun s21 () Bool (and s3 s20))-[GOOD] (define-fun s22 () Bool (and s19 s21))-[GOOD] (define-fun s23 () Bool (and s1 s22))-[GOOD] (define-fun s24 () Bool (and s18 s23))-[GOOD] (define-fun s25 () Bool (= false s3))-[GOOD] (define-fun s26 () Bool (and s4 s25))-[GOOD] (define-fun s27 () Bool (and s19 s26))-[GOOD] (define-fun s28 () Bool (and s1 s27))-[GOOD] (define-fun s29 () Bool (and s18 s28))-[GOOD] (define-fun s30 () Bool (or s24 s29))-[GOOD] (define-fun s31 () Bool (or s17 s30))-[GOOD] (define-fun s32 () Bool (not s31))+[GOOD] (define-fun s17 () Bool (= false s0))+[GOOD] (define-fun s18 () Bool (= false s2))+[GOOD] (define-fun s19 () Bool (= false 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 s25 () Bool (and s4 s24))+[GOOD] (define-fun s26 () Bool (and s18 s25))+[GOOD] (define-fun s27 () Bool (and s1 s26))+[GOOD] (define-fun s28 () Bool (and s17 s27))+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s32)+[GOOD] ; --- formula ---+[GOOD] (assert s31) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/pbExactly.gold view
@@ -13,7 +13,7 @@ [GOOD] (define-fun s11 () (_ BitVec 32) #x00000001) [GOOD] (define-fun s12 () (_ BitVec 32) #x00000000) [GOOD] (define-fun s32 () (_ BitVec 32) #x00000005)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Bool) ; tracks user variable "b0" [GOOD] (declare-fun s1 () Bool) ; tracks user variable "b1" [GOOD] (declare-fun s2 () Bool) ; tracks user variable "b2"@@ -25,11 +25,11 @@ [GOOD] (declare-fun s8 () Bool) ; tracks user variable "b8" [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s10 () Bool ((_ pbeq 5 1 1 1 1 1 1 1 1 1 1) s0 s1 s2 s3 s4 s5 s6 s7 s8 s9)) [GOOD] (define-fun s13 () (_ BitVec 32) (ite s0 s11 s12)) [GOOD] (define-fun s14 () (_ BitVec 32) (ite s1 s11 s12))@@ -55,10 +55,8 @@ [GOOD] (define-fun s35 () Bool (not s34)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s35) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/pbGe.gold view
@@ -21,7 +21,7 @@ [GOOD] (define-fun s32 () Int 8) [GOOD] (define-fun s35 () Int 9) [GOOD] (define-fun s38 () Int 10)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Bool) ; tracks user variable "b0" [GOOD] (declare-fun s1 () Bool) ; tracks user variable "b1" [GOOD] (declare-fun s2 () Bool) ; tracks user variable "b2"@@ -33,11 +33,11 @@ [GOOD] (declare-fun s8 () Bool) ; tracks user variable "b8" [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s10 () Bool ((_ pbge 7 1 2 3 4 5 6 7 8 9 10) s0 s1 s2 s3 s4 s5 s6 s7 s8 s9)) [GOOD] (define-fun s13 () Int (ite s0 s11 s12)) [GOOD] (define-fun s15 () Int (ite s1 s14 s12))@@ -63,10 +63,8 @@ [GOOD] (define-fun s43 () Bool (not s42)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s43) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/pbLe.gold view
@@ -21,7 +21,7 @@ [GOOD] (define-fun s32 () Int 8) [GOOD] (define-fun s35 () Int 9) [GOOD] (define-fun s38 () Int 10)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Bool) ; tracks user variable "b0" [GOOD] (declare-fun s1 () Bool) ; tracks user variable "b1" [GOOD] (declare-fun s2 () Bool) ; tracks user variable "b2"@@ -33,11 +33,11 @@ [GOOD] (declare-fun s8 () Bool) ; tracks user variable "b8" [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s10 () Bool ((_ pble 7 1 2 3 4 5 6 7 8 9 10) s0 s1 s2 s3 s4 s5 s6 s7 s8 s9)) [GOOD] (define-fun s13 () Int (ite s0 s11 s12)) [GOOD] (define-fun s15 () Int (ite s1 s14 s12))@@ -63,10 +63,8 @@ [GOOD] (define-fun s43 () Bool (not s42)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s43) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/pbMutexed.gold view
@@ -12,7 +12,7 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s11 () (_ BitVec 32) #x00000001) [GOOD] (define-fun s12 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Bool) ; tracks user variable "b0" [GOOD] (declare-fun s1 () Bool) ; tracks user variable "b1" [GOOD] (declare-fun s2 () Bool) ; tracks user variable "b2"@@ -24,11 +24,11 @@ [GOOD] (declare-fun s8 () Bool) ; tracks user variable "b8" [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s10 () Bool ((_ at-most 1) s0 s1 s2 s3 s4 s5 s6 s7 s8 s9)) [GOOD] (define-fun s13 () (_ BitVec 32) (ite s0 s11 s12)) [GOOD] (define-fun s14 () (_ BitVec 32) (ite s1 s11 s12))@@ -54,10 +54,8 @@ [GOOD] (define-fun s34 () Bool (not s33)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s34) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/pbStronglyMutexed.gold view
@@ -12,7 +12,7 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s11 () (_ BitVec 32) #x00000001) [GOOD] (define-fun s12 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Bool) ; tracks user variable "b0" [GOOD] (declare-fun s1 () Bool) ; tracks user variable "b1" [GOOD] (declare-fun s2 () Bool) ; tracks user variable "b2"@@ -24,11 +24,11 @@ [GOOD] (declare-fun s8 () Bool) ; tracks user variable "b8" [GOOD] (declare-fun s9 () Bool) ; tracks user variable "b9" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s10 () Bool ((_ pbeq 1 1 1 1 1 1 1 1 1 1 1) s0 s1 s2 s3 s4 s5 s6 s7 s8 s9)) [GOOD] (define-fun s13 () (_ BitVec 32) (ite s0 s11 s12)) [GOOD] (define-fun s14 () (_ BitVec 32) (ite s1 s11 s12))@@ -54,10 +54,8 @@ [GOOD] (define-fun s34 () Bool (not s33)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s34) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/qEnum1.gold view
@@ -14,25 +14,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () BinOp) ; tracks user variable "p" [GOOD] (declare-fun s1 () BinOp) ; tracks user variable "m" [GOOD] (declare-fun s2 () BinOp) ; tracks user variable "t" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (assert s5)
SBVTestSuite/GoldFiles/qUninterp1.gold view
@@ -14,20 +14,18 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () L) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))
+ SBVTestSuite/GoldFiles/quantifiedB_0.gold view
@@ -0,0 +1,48 @@+** 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 BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Unsatisfiable
+ SBVTestSuite/GoldFiles/quantifiedB_1.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-logic BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Satisfiable
+ SBVTestSuite/GoldFiles/quantifiedB_2.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-logic BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s1)+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Unsatisfiable
+ SBVTestSuite/GoldFiles/quantifiedB_3.gold view
@@ -0,0 +1,40 @@+** 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 BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s1)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (s0))+[RECV] ((s0 #x00))+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Satisfiable. Model:+  s0 = 0 :: Word8
+ SBVTestSuite/GoldFiles/quantifiedB_4.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-logic BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Satisfiable
+ SBVTestSuite/GoldFiles/quantifiedB_5.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-logic BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Unsatisfiable
+ SBVTestSuite/GoldFiles/quantifiedB_6.gold view
@@ -0,0 +1,32 @@+** 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 BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Satisfiable
+ SBVTestSuite/GoldFiles/quantifiedB_7.gold view
@@ -0,0 +1,33 @@+** 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 BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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))+         (or l1_s0 l2_s0))))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Satisfiable
+ SBVTestSuite/GoldFiles/quantifiedB_8.gold view
@@ -0,0 +1,33 @@+** 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 BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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))+         (or l1_s0 l2_s0))))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Satisfiable
+ SBVTestSuite/GoldFiles/quantifiedB_9.gold view
@@ -0,0 +1,33 @@+** 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 BV)+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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))+         (or l1_s0 l2_s0))))+[GOOD] ; --- arrayDelayeds ---+[GOOD] ; --- arraySetups ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Satisfiable
+ SBVTestSuite/GoldFiles/quantifiedB_A.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-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Unsatisfiable
+ SBVTestSuite/GoldFiles/quantifiedB_B.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-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+*** Solver   : Z3+*** Exit code: ExitSuccess++RESULT: Satisfiable
− SBVTestSuite/GoldFiles/quantified_prove_existsexists_contradiction_c.gold
@@ -1,35 +0,0 @@-** 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 BV)-[GOOD] ; --- uninterpreted sorts ----[GOOD] ; --- tuples ----[GOOD] ; --- sums ----[GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 s1)))-                   (let ((s3 (distinct s0 s1)))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   false)))))-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_existsexists_contradiction_p.gold view
@@ -10,27 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 s1)))-                   (let ((s3 (distinct s0 s1)))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   (not s4))))))+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed. *** Solver   : Z3 *** Exit code: ExitSuccess
− SBVTestSuite/GoldFiles/quantified_prove_existsexists_satisfiable_c.gold
@@ -1,35 +0,0 @@-** 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 BV)-[GOOD] ; --- uninterpreted sorts ----[GOOD] ; --- tuples ----[GOOD] ; --- sums ----[GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd s1 s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   false))))-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_existsexists_satisfiable_p.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd s1 s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   (not s4)))))+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
− SBVTestSuite/GoldFiles/quantified_prove_existsexists_thm_c.gold
@@ -1,35 +0,0 @@-** 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 BV)-[GOOD] ; --- uninterpreted sorts ----[GOOD] ; --- tuples ----[GOOD] ; --- sums ----[GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub s1 s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= s1 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   false)))))-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_existsexists_thm_p.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub s1 s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= s1 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   (not s4))))))+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
− SBVTestSuite/GoldFiles/quantified_prove_existsforall_contradiction_c.gold
@@ -1,35 +0,0 @@-** 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 BV)-[GOOD] ; --- uninterpreted sorts ----[GOOD] ; --- tuples ----[GOOD] ; --- sums ----[GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"-[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 (s1 s0))))-                   (let ((s3 (distinct s0 (s1 s0))))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   false)))))-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_existsforall_contradiction_p.gold view
@@ -10,27 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 (s1 s0))))-                   (let ((s3 (distinct s0 (s1 s0))))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   (not s4))))))+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed. *** Solver   : Z3 *** Exit code: ExitSuccess
− SBVTestSuite/GoldFiles/quantified_prove_existsforall_satisfiable_c.gold
@@ -1,35 +0,0 @@-** 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 BV)-[GOOD] ; --- uninterpreted sorts ----[GOOD] ; --- tuples ----[GOOD] ; --- sums ----[GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"-[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd (s1 s0) s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   false))))-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_existsforall_satisfiable_p.gold view
@@ -10,27 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd (s1 s0) s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   (not s4)))))+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed. *** Solver   : Z3 *** Exit code: ExitSuccess
− SBVTestSuite/GoldFiles/quantified_prove_existsforall_thm_c.gold
@@ -1,35 +0,0 @@-** 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 BV)-[GOOD] ; --- uninterpreted sorts ----[GOOD] ; --- tuples ----[GOOD] ; --- sums ----[GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"-[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub (s1 s0) s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= (s1 s0) s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   false)))))-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_existsforall_thm_p.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub (s1 s0) s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= (s1 s0) s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   (not s4))))))+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
− SBVTestSuite/GoldFiles/quantified_prove_forallexists_contradiction_c.gold
@@ -1,35 +0,0 @@-** 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 BV)-[GOOD] ; --- uninterpreted sorts ----[GOOD] ; --- tuples ----[GOOD] ; --- sums ----[GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 s1)))-                   (let ((s3 (distinct s0 s1)))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   false)))))-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_forallexists_contradiction_p.gold view
@@ -10,29 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 s1)))-                   (let ((s3 (distinct s0 s1)))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   (not s4))))))+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed.-[SEND] (get-value (s0))-[RECV] ((s0 #x00)) *** Solver   : Z3 *** Exit code: ExitSuccess
− SBVTestSuite/GoldFiles/quantified_prove_forallexists_satisfiable_c.gold
@@ -1,35 +0,0 @@-** 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 BV)-[GOOD] ; --- uninterpreted sorts ----[GOOD] ; --- tuples ----[GOOD] ; --- sums ----[GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd s1 s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   false))))-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_forallexists_satisfiable_p.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd s1 s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   (not s4)))))+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
− SBVTestSuite/GoldFiles/quantified_prove_forallexists_thm_c.gold
@@ -1,35 +0,0 @@-** 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 BV)-[GOOD] ; --- uninterpreted sorts ----[GOOD] ; --- tuples ----[GOOD] ; --- sums ----[GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub s1 s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= s1 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   false)))))-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_forallexists_thm_p.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub s1 s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= s1 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   (not s4))))))+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
− SBVTestSuite/GoldFiles/quantified_prove_forallforall_contradiction_c.gold
@@ -1,36 +0,0 @@-** 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] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"-[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] (define-fun s3 () Bool (distinct s0 s1))-[GOOD] (define-fun s4 () Bool (and s2 s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments ----[GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s4)-[GOOD] (assert false)-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_forallforall_contradiction_p.gold view
@@ -5,35 +5,29 @@ [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] (set-logic BV) [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] (define-fun s3 () Bool (distinct s0 s1))-[GOOD] (define-fun s4 () Bool (and s2 s3))+[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 ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert (not s4))+[GOOD] ; --- formula ---+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] sat-[SEND] (get-value (s0))-[RECV] ((s0 #x00))-[SEND] (get-value (s1))-[RECV] ((s1 #x00)) *** Solver   : Z3 *** Exit code: ExitSuccess
− SBVTestSuite/GoldFiles/quantified_prove_forallforall_satisfiable_c.gold
@@ -1,36 +0,0 @@-** 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] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"-[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s3 () (_ BitVec 8) (bvadd s1 s2))-[GOOD] (define-fun s4 () Bool (= s0 s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments ----[GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s4)-[GOOD] (assert false)-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_forallforall_satisfiable_p.gold view
@@ -5,35 +5,29 @@ [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] (set-logic BV) [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s3 () (_ BitVec 8) (bvadd s1 s2))-[GOOD] (define-fun s4 () Bool (= s0 s3))+[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 ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert (not s4))+[GOOD] ; --- formula ---+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] sat-[SEND] (get-value (s0))-[RECV] ((s0 #xff))-[SEND] (get-value (s1))-[RECV] ((s1 #xff)) *** Solver   : Z3 *** Exit code: ExitSuccess
− SBVTestSuite/GoldFiles/quantified_prove_forallforall_thm_c.gold
@@ -1,36 +0,0 @@-** 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] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"-[GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ----[GOOD] ; --- arrays ----[GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s2 () (_ BitVec 8) (bvsub s1 s0))-[GOOD] (define-fun s3 () (_ BitVec 8) (bvadd s0 s2))-[GOOD] (define-fun s4 () Bool (= s1 s3))-[GOOD] ; --- arrayDelayeds ----[GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments ----[GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s4)-[GOOD] (assert false)-[SEND] (check-sat)-[RECV] unsat-*** Solver   : Z3-*** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_prove_forallforall_thm_p.gold view
@@ -5,30 +5,28 @@ [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] (set-logic BV) [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s2 () (_ BitVec 8) (bvsub s1 s0))-[GOOD] (define-fun s3 () (_ BitVec 8) (bvadd s0 s2))-[GOOD] (define-fun s4 () Bool (= s1 s3))+[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 ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert (not s4))+[GOOD] ; --- formula ---+[GOOD] (assert (not s0)) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_existsexists_contradiction_c.gold view
@@ -5,30 +5,28 @@ [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] (set-logic BV) [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] (define-fun s3 () Bool (distinct s0 s1))-[GOOD] (define-fun s4 () Bool (and s2 s3))+[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 ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s4)+[GOOD] ; --- formula ---+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_existsexists_contradiction_p.gold view
@@ -5,30 +5,28 @@ [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] (set-logic BV) [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s2 () Bool (= s0 s1))-[GOOD] (define-fun s3 () Bool (distinct s0 s1))-[GOOD] (define-fun s4 () Bool (and s2 s3))+[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 ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s4)+[GOOD] ; --- formula ---+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_existsexists_satisfiable_c.gold view
@@ -5,35 +5,29 @@ [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] (set-logic BV) [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s3 () (_ BitVec 8) (bvadd s1 s2))-[GOOD] (define-fun s4 () Bool (= s0 s3))+[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 ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s4)+[GOOD] ; --- formula ---+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-[SEND] (get-value (s0))-[RECV] ((s0 #x01))-[SEND] (get-value (s1))-[RECV] ((s1 #x00)) *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_existsexists_satisfiable_p.gold view
@@ -5,35 +5,29 @@ [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] (set-logic BV) [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s3 () (_ BitVec 8) (bvadd s1 s2))-[GOOD] (define-fun s4 () Bool (= s0 s3))+[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 ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s4)+[GOOD] ; --- formula ---+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-[SEND] (get-value (s0))-[RECV] ((s0 #x01))-[SEND] (get-value (s1))-[RECV] ((s1 #x00)) *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_existsexists_thm_c.gold view
@@ -5,35 +5,29 @@ [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] (set-logic BV) [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s2 () (_ BitVec 8) (bvsub s1 s0))-[GOOD] (define-fun s3 () (_ BitVec 8) (bvadd s0 s2))-[GOOD] (define-fun s4 () Bool (= s1 s3))+[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 ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s4)+[GOOD] ; --- formula ---+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-[SEND] (get-value (s0))-[RECV] ((s0 #x00))-[SEND] (get-value (s1))-[RECV] ((s1 #x00)) *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_existsexists_thm_p.gold view
@@ -5,35 +5,29 @@ [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] (set-logic BV) [GOOD] ; --- uninterpreted sorts --- [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"-[GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ----[GOOD] (define-fun s2 () (_ BitVec 8) (bvsub s1 s0))-[GOOD] (define-fun s3 () (_ BitVec 8) (bvadd s0 s2))-[GOOD] (define-fun s4 () Bool (= s1 s3))+[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 ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s4)+[GOOD] ; --- formula ---+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-[SEND] (get-value (s0))-[RECV] ((s0 #x00))-[SEND] (get-value (s1))-[RECV] ((s1 #x00)) *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_existsforall_contradiction_c.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 s1)))-                   (let ((s3 (distinct s0 s1)))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_existsforall_contradiction_p.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 s1)))-                   (let ((s3 (distinct s0 s1)))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_existsforall_satisfiable_c.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd s1 s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_existsforall_satisfiable_p.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd s1 s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_existsforall_thm_c.gold view
@@ -10,29 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub s1 s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= s1 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed.-[SEND] (get-value (s0))-[RECV] ((s0 #x00)) *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_existsforall_thm_p.gold view
@@ -10,29 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub s1 s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= s1 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed.-[SEND] (get-value (s0))-[RECV] ((s0 #x00)) *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_forallexists_contradiction_c.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 (s1 s0))))-                   (let ((s3 (distinct s0 (s1 s0))))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_forallexists_contradiction_p.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 (s1 s0))))-                   (let ((s3 (distinct s0 (s1 s0))))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_forallexists_satisfiable_c.gold view
@@ -10,27 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd (s1 s0) s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed. *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_forallexists_satisfiable_p.gold view
@@ -10,27 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd (s1 s0) s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed. *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_forallexists_thm_c.gold view
@@ -10,27 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub (s1 s0) s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= (s1 s0) s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed. *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_forallexists_thm_p.gold view
@@ -10,27 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ----[GOOD] (declare-fun s1 ((_ BitVec 8)) (_ BitVec 8)) ; tracks user variable "y"+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub (s1 s0) s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= (s1 s0) s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed. *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_forallforall_contradiction_c.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 s1)))-                   (let ((s3 (distinct s0 s1)))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_forallforall_contradiction_p.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (= s0 s1)))-                   (let ((s3 (distinct s0 s1)))-                   (let ((s4 (and s2 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_forallforall_satisfiable_c.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd s1 s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_forallforall_satisfiable_p.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s2 () (_ BitVec 8) #x01)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s3 (bvadd s1 s2)))-                   (let ((s4 (= s0 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
SBVTestSuite/GoldFiles/quantified_sat_forallforall_thm_c.gold view
@@ -10,27 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub s1 s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= s1 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed. *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/quantified_sat_forallforall_thm_p.gold view
@@ -10,27 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s0 (_ BitVec 8))-                        (s1 (_ BitVec 8)))-       ; --- postQuantifier assignments ----                   (let ((s2 (bvsub s1 s0)))-                   (let ((s3 (bvadd s0 s2)))-                   (let ((s4 (= s1 s3)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s4)))))+[GOOD] (assert s0) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed. *** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/query1.gold view
@@ -20,7 +20,7 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s6 () Int 0)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () (_ FloatingPoint  8 24)) ; tracks user variable "c"@@ -28,19 +28,17 @@ [GOOD] (declare-fun s4 () Real) ; tracks user variable "e" [GOOD] (declare-fun s5 () (_ BitVec 8)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (! s7 :named |a > 0|)) [GOOD] (assert s8) [GOOD] (define-fun s9 () Int 2)@@ -79,7 +77,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.12.0")+[RECV] (:version "4.12.2") [SEND] (get-info :status) [RECV] (:status sat) [GOOD] (define-fun s16 () Int 4)@@ -110,7 +108,7 @@ [SEND] (get-info :reason-unknown) [RECV] (:reason-unknown "unknown") [SEND] (get-info :version)-[RECV] (:version "4.12.0")+[RECV] (:version "4.12.2") [SEND] (get-info :memory) [RECV] unsupported [SEND] (get-info :time)
SBVTestSuite/GoldFiles/queryArrays1.gold view
@@ -10,25 +10,23 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem 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] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] (declare-fun array_0 () (Array (_ BitVec 8) (_ BitVec 8))) [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[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))
SBVTestSuite/GoldFiles/queryArrays2.gold view
@@ -10,20 +10,18 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "i" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (define-fun s1 () (_ BitVec 8) #x00) [GOOD] (define-fun s2 () (_ BitVec 8) #x01) [GOOD] (define-fun s3 () (_ BitVec 8) #x02)
SBVTestSuite/GoldFiles/queryArrays3.gold view
@@ -10,20 +10,18 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "i" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (define-fun s1 () (_ BitVec 8) #x00) [GOOD] (declare-fun table0 ((_ BitVec 8)) (_ BitVec 8)) [GOOD] (define-fun s2 () (_ BitVec 8) (table0 s0))
SBVTestSuite/GoldFiles/queryArrays4.gold view
@@ -10,21 +10,19 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "i" [GOOD] (declare-fun s1 () (_ BitVec 8)) ; tracks user variable "j" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (define-fun s2 () (_ BitVec 8) #x00) [GOOD] (define-fun s3 () (_ BitVec 8) #x01) [GOOD] (define-fun s4 () (_ BitVec 8) #x02)
SBVTestSuite/GoldFiles/queryArrays5.gold view
@@ -10,23 +10,21 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem 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] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] (declare-fun array_0 () (Array (_ BitVec 8) (_ BitVec 8))) [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups --- [GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed-[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[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)))
SBVTestSuite/GoldFiles/queryArrays6.gold view
@@ -10,21 +10,19 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] (declare-fun array_0 () (Array Int Int)) [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups --- [GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed-[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (push 1) [GOOD] (define-fun s0 () Int 1) [GOOD] (define-fun s2 () Int 5)
SBVTestSuite/GoldFiles/queryArrays7.gold view
@@ -10,21 +10,19 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] (declare-fun array_0 () (Array Int Int)) [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups --- [GOOD] (define-fun array_0_initializer () Bool true) ; no initialization needed-[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (define-fun s0 () Int 0) [GOOD] (define-fun s1 () Int 1) [GOOD] (define-fun s3 () Int 2)
SBVTestSuite/GoldFiles/queryArrays8.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[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)
SBVTestSuite/GoldFiles/queryTables.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (declare-fun s0 () (_ BitVec 16)) [GOOD] (define-fun s1 () (_ BitVec 16) #x0000) [GOOD] (define-fun s3 () (_ BitVec 16) #x0001)
SBVTestSuite/GoldFiles/query_Chars1.gold view
@@ -12,24 +12,22 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 65) [GOOD] (define-fun s4 () Int 66)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] (assert (= 1 (str.len s0))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s5) [SEND] (check-sat)
SBVTestSuite/GoldFiles/query_Interpolant1.gold view
@@ -10,17 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] (declare-fun s3 () Int) ; tracks user variable "d" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s4 () Bool (= s0 s1)) [GOOD] (define-fun s5 () Bool (= s0 s2)) [GOOD] (define-fun s6 () Bool (and s4 s5))@@ -30,10 +30,8 @@ [GOOD] (define-fun s10 () Bool (and s7 s9)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (! s6 :interpolation-group |c1|)) [GOOD] (assert (! s10 :interpolation-group |c2|)) [SEND] (check-sat)
SBVTestSuite/GoldFiles/query_Interpolant2.gold view
@@ -10,19 +10,19 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] (declare-fun s3 () Int) ; tracks user variable "d" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun f (Int) Int) [GOOD] (declare-fun g (Int) Int)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s4 () Int (f s0)) [GOOD] (define-fun s5 () Bool (= s2 s4)) [GOOD] (define-fun s6 () Int (f s1))@@ -35,10 +35,8 @@ [GOOD] (define-fun s13 () Bool (and s9 s12)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (! s8 :interpolation-group |c1|)) [GOOD] (assert (! s13 :interpolation-group |c2|)) [SEND] (check-sat)
SBVTestSuite/GoldFiles/query_Interpolant3.gold view
@@ -10,23 +10,21 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] (declare-fun s3 () Int) ; tracks user variable "d" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (define-fun s4 () Bool (= s0 s1)) [GOOD] (define-fun s5 () Bool (= s0 s2)) [GOOD] (define-fun s6 () Bool (and s4 s5))
SBVTestSuite/GoldFiles/query_Interpolant4.gold view
@@ -10,23 +10,21 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] (declare-fun s3 () Int) ; tracks user variable "d" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (declare-fun f (Int) Int) [GOOD] (define-fun s4 () Int (f s0)) [GOOD] (define-fun s5 () Bool (= s2 s4))
SBVTestSuite/GoldFiles/query_ListOfMaybe.gold view
@@ -19,15 +19,15 @@ [GOOD] (define-fun s2 () Int 2) [GOOD] (define-fun s4 () Int 0) [GOOD] (define-fun s8 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq (SBVMaybe String))) ; tracks user variable "lst" [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] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (seq.len s0)) [GOOD] (define-fun s3 () Bool (= s1 s2)) [GOOD] (define-fun s5 () (SBVMaybe String) (seq.nth s0 s4))@@ -40,10 +40,8 @@ [GOOD] (define-fun s13 () Bool (ite s12 true false)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s7) [GOOD] (assert s13)
SBVTestSuite/GoldFiles/query_ListOfSum.gold view
@@ -19,15 +19,15 @@ [GOOD] (define-fun s2 () Int 2) [GOOD] (define-fun s4 () Int 0) [GOOD] (define-fun s8 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq (SBVEither Int String))) ; tracks user variable "lst" [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] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (seq.len s0)) [GOOD] (define-fun s3 () Bool (= s1 s2)) [GOOD] (define-fun s5 () (SBVEither Int String) (seq.nth s0 s4))@@ -40,10 +40,8 @@ [GOOD] (define-fun s13 () Bool (ite s12 false true)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s7) [GOOD] (assert s13)
SBVTestSuite/GoldFiles/query_Lists1.gold view
@@ -14,21 +14,19 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4) (seq.unit 5)))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/query_Maybe.gold view
@@ -17,24 +17,22 @@                                             (just_SBVMaybe (get_just_SBVMaybe T)))))) [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVMaybe Int)) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (get_just_SBVMaybe s0)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/query_Strings1.gold view
@@ -10,21 +10,19 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s1) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/query_SumMaybeBoth.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295) [GOOD] (set-option :model.inline_def  true      )
SBVTestSuite/GoldFiles/query_Sums.gold view
@@ -17,25 +17,23 @@                                             (right_SBVEither (get_right_SBVEither T2)))))) [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVEither Int String)) ; tracks user variable "a" [GOOD] (assert (=> ((_ is (right_SBVEither (String) (SBVEither Int String))) s0) (= 1 (str.len (get_right_SBVEither s0))))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (get_left_SBVEither s0)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/query_Tuples1.gold view
@@ -17,23 +17,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVTuple2 Int String)) ; tracks user variable "a" [GOOD] (assert (= 1 (str.len (proj_2_SBVTuple2 s0)))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/query_Tuples2.gold view
@@ -18,24 +18,22 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () String (_ char #x63))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVTuple2 Int (SBVTuple2 String SBVTuple0))) ; tracks user variable "a" [GOOD] (assert (= 1 (str.len (proj_1_SBVTuple2 (proj_2_SBVTuple2 s0))))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s4) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/query_abc.gold view
@@ -11,23 +11,21 @@ [ISSUE] ; --- sums --- [ISSUE] ; --- literal constants --- [ISSUE] (define-fun s2 () (_ BitVec 32) #x00000000)-[ISSUE] ; --- skolem constants ---+[ISSUE] ; --- top level inputs --- [ISSUE] (declare-fun s0 () (_ BitVec 32)) ; tracks user variable "a" [ISSUE] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [ISSUE] ; --- constant tables ----[ISSUE] ; --- skolemized tables ---+[ISSUE] ; --- non-constant tables --- [ISSUE] ; --- arrays --- [ISSUE] ; --- uninterpreted constants ----[ISSUE] ; --- user given axioms ----[ISSUE] ; --- preQuantifier assignments ---+[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] ; --- formula ----[ISSUE] ; --- postQuantifier assignments --- [ISSUE] ; --- delayedEqualities ----[ISSUE] ; -- finalAssert ---+[ISSUE] ; --- formula --- [ISSUE] (assert s3) [ISSUE] (assert s4) [FIRE] (define-fun s5 () (_ BitVec 32) #x00000002)
SBVTestSuite/GoldFiles/query_bitwuzla.gold view
@@ -9,23 +9,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (define-fun s5 () (_ BitVec 32) #x00000002)
SBVTestSuite/GoldFiles/query_boolector.gold view
@@ -9,23 +9,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (define-fun s5 () (_ BitVec 32) #x00000002)
SBVTestSuite/GoldFiles/query_cvc4.gold view
@@ -10,23 +10,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (! s3 :named |a > 0|)) [GOOD] (assert s4) [GOOD] (define-fun s5 () (_ BitVec 32) #x00000002)
SBVTestSuite/GoldFiles/query_cvc5.gold view
@@ -1,4 +1,4 @@-** Calling: cvc5 --lang smt --incremental --no-interactive --nl-cov+** Calling: cvc5 --lang smt --incremental --nl-cov [GOOD] ; Automatically generated by SBV. Do not edit. [GOOD] (set-option :print-success true) [GOOD] (set-option :global-declarations true)@@ -10,23 +10,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (! s3 :named |a > 0|)) [GOOD] (assert s4) [GOOD] (define-fun s5 () (_ BitVec 32) #x00000002)
SBVTestSuite/GoldFiles/query_mathsat.gold view
@@ -10,23 +10,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (! s3 :named |a > 0|)) [GOOD] (assert s4) [GOOD] (define-fun s5 () (_ BitVec 32) #x00000002)
SBVTestSuite/GoldFiles/query_sumMergeEither1.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295) [GOOD] (set-option :model.inline_def  true      )
SBVTestSuite/GoldFiles/query_sumMergeEither2.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295) [GOOD] (set-option :model.inline_def  true      )
SBVTestSuite/GoldFiles/query_sumMergeMaybe1.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295) [GOOD] (set-option :model.inline_def  true      )
SBVTestSuite/GoldFiles/query_sumMergeMaybe2.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295) [GOOD] (set-option :model.inline_def  true      )
SBVTestSuite/GoldFiles/query_uiSat_test1.gold view
@@ -10,23 +10,21 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q1 (Bool) Bool)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (q1 false)) [GOOD] (define-fun s1 () Bool (= false s0)) [GOOD] (define-fun s2 () Bool (q1 true)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s1) [GOOD] (assert s2) [SEND] (check-sat)@@ -37,6 +35,6 @@ [SEND] (get-value (q1)) [RECV] ((q1 (lambda ((x!1 Bool)) x!1))) -MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [], modelUIFuns = [("q1",(SBool -> SBool,([([True :: Bool],True :: Bool)],False :: Bool)))]}+MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [], modelUIFuns = [("q1",(SBool -> SBool,Right ([([True :: Bool],True :: Bool)],False :: Bool)))]} DONE.*** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/query_uiSat_test2.gold view
@@ -10,24 +10,22 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q2 (Bool Bool) Bool)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (q2 false true)) [GOOD] (define-fun s1 () Bool (= false s0)) [GOOD] (define-fun s2 () Bool (q2 true true)) [GOOD] (define-fun s3 () Bool (q2 true false)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s1) [GOOD] (assert s2) [GOOD] (assert s3)@@ -39,6 +37,6 @@ [SEND] (get-value (q2)) [RECV] ((q2 (store (store ((as const Array) false) true true true) true false true))) -MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [], modelUIFuns = [("q2",(SBool -> SBool -> SBool,([([True :: Bool,False :: Bool],True :: Bool),([True :: Bool,True :: Bool],True :: Bool)],False :: Bool)))]}+MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [], modelUIFuns = [("q2",(SBool -> SBool -> SBool,Right ([([True :: Bool,False :: Bool],True :: Bool),([True :: Bool,True :: Bool],True :: Bool)],False :: Bool)))]} DONE.*** Solver   : Z3 *** Exit code: ExitSuccess
SBVTestSuite/GoldFiles/query_uisatex1.gold view
@@ -45,10 +45,10 @@ [GOOD] (define-fun s64 () (Seq Int) (seq.unit 5)) [GOOD] (define-fun s65 () (Seq (_ FloatingPoint  8 24)) (seq.++ (seq.unit ((_ to_fp 8 24) roundNearestTiesToEven (/ 8598323.0 1048576.0))) (seq.unit (_ +zero 8 24)))) [GOOD] (define-fun s67 () Int 210)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q1 (Int) Int)@@ -56,8 +56,8 @@ [GOOD] (declare-fun q3 ((_ FloatingPoint  8 24) Bool Int) (_ FloatingPoint  8 24)) [GOOD] (declare-fun q4 (String String) (_ FloatingPoint  8 24)) [GOOD] (declare-fun q5 ((Seq Int) (Seq (_ FloatingPoint  8 24))) Int)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Int (q1 s1)) [GOOD] (define-fun s4 () Bool (= s2 s3)) [GOOD] (define-fun s6 () Int (q1 s5))@@ -96,10 +96,8 @@ [GOOD] (define-fun s68 () Bool (= s66 s67)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s4) [GOOD] (assert s8) [GOOD] (assert s12)
SBVTestSuite/GoldFiles/query_uisatex2.gold view
@@ -45,10 +45,10 @@ [GOOD] (define-fun s64 () (Seq Int) (seq.unit 5)) [GOOD] (define-fun s65 () (Seq (_ FloatingPoint  8 24)) (seq.++ (seq.unit ((_ to_fp 8 24) roundNearestTiesToEven (/ 8598323.0 1048576.0))) (seq.unit (_ +zero 8 24)))) [GOOD] (define-fun s67 () Int 210)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q1 (Int) Int)@@ -57,8 +57,8 @@ [GOOD] (declare-fun q4 (String String) (_ FloatingPoint  8 24)) [GOOD] (declare-fun q5 ((Seq Int) (Seq (_ FloatingPoint  8 24))) Int) [GOOD] (declare-fun q6 (Int) Bool)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Int (q1 s1)) [GOOD] (define-fun s4 () Bool (= s2 s3)) [GOOD] (define-fun s6 () Int (q1 s5))@@ -96,14 +96,10 @@ [GOOD] (define-fun s66 () Int (q5 s64 s65)) [GOOD] (define-fun s68 () Bool (= s66 s67)) [GOOD] (define-fun s69 () Bool (q6 s17))-[GOOD] (define-fun s70 () Bool (not s69))-[GOOD] (define-fun s71 () Bool (or s69 s70)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s4) [GOOD] (assert s8) [GOOD] (assert s12)@@ -120,7 +116,6 @@ [GOOD] (assert s58) [GOOD] (assert s63) [GOOD] (assert s68)-[GOOD] (assert s71) [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))@@ -161,5 +156,5 @@ *** Exit code: ExitSuccess   FINAL:-(([(0,1),(-3,9),(3,75)],12),([((False,12),3),((False,7),6)],5),([((9.6,False,8),Infinity),((9.6,True,121),-0.0)],8.6),([(('r',"foo"),3.5),(('c',"tey"),92.0)],78.0),([(([5],[8.2,0.0]),210),(([9,5],[8.2,9.0]),21)],7),([],False))+(Right ([(0,1),(-3,9),(3,75)],12),Right ([((False,12),3),((False,7),6)],5),Right ([((9.6,False,8),Infinity),((9.6,True,121),-0.0)],8.6),Right ([(('r',"foo"),3.5),(('c',"tey"),92.0)],78.0),Right ([(([5],[8.2,0.0]),210),(([9,5],[8.2,9.0]),21)],7),Right ([],False)) DONE!
+ SBVTestSuite/GoldFiles/query_uisatex3.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-logic ALL) ; has unbounded values, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[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 ---+[GOOD] ; --- delayedEqualities ---+[GOOD] ; --- formula ---+[GOOD] (assert s0)+[SEND] (check-sat)+[RECV] sat+[SEND] (get-value (y))+[RECV] ((y (lambda ((x!1 Int)) (* 3 x!1))))+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:+"y x = 3 * x"+DONE!
SBVTestSuite/GoldFiles/query_yices.gold view
@@ -9,23 +9,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (! s3 :named |a > 0|)) [GOOD] (assert s4) [GOOD] (define-fun s5 () (_ BitVec 32) #x00000002)
SBVTestSuite/GoldFiles/query_z3.gold view
@@ -11,23 +11,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (_ BitVec 32) #x00000000)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ BitVec 32)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (_ BitVec 32)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert (! s3 :named |a > 0|)) [GOOD] (assert s4) [GOOD] (define-fun s5 () (_ BitVec 32) #x00000002)
SBVTestSuite/GoldFiles/reverse.gold view
@@ -16,17 +16,17 @@ [GOOD] (define-fun s12 () Int 0) [GOOD] (define-fun s14 () (Seq Int) (as seq.empty (Seq Int))) [GOOD] (define-fun s15 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] (declare-fun s3 () Int) ; tracks user variable "d" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s4 () (Seq Int) (seq.unit s0)) [GOOD] (define-fun s5 () (Seq Int) (seq.unit s1)) [GOOD] (define-fun s6 () (Seq Int) (seq.unit s2))@@ -117,10 +117,8 @@ [GOOD] (define-fun s94 () Bool (= s90 s93)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s94) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/reverseAlt10.gold view
@@ -16,14 +16,14 @@ [GOOD] (define-fun s2 () Int 0) [GOOD] (define-fun s4 () (Seq Int) (as seq.empty (Seq Int))) [GOOD] (define-fun s5 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "xs" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (seq.len s0)) [GOOD] (define-fun s3 () Bool (= s1 s2)) [GOOD] (define-fun s6 () Int (- s1 s5))@@ -123,10 +123,8 @@ [GOOD] (define-fun s100 () Bool (distinct s80 s99)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s100) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/safe1.gold view
@@ -12,23 +12,21 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () Int 12) [GOOD] (define-fun s3 () Int 2)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (push 1) [GOOD] (assert s5) [SEND] (check-sat)
SBVTestSuite/GoldFiles/safe2.gold view
@@ -12,22 +12,20 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () Int 12) [GOOD] (define-fun s2 () Int 2)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (push 1) [GOOD] (assert s4) [SEND] (check-sat)
SBVTestSuite/GoldFiles/seqConcat.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/seqConcatBad.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert false) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/seqExamples1.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/seqExamples2.gold view
@@ -15,23 +15,21 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () (Seq Int) (seq.unit 2)) [GOOD] (define-fun s3 () (Seq Int) (seq.unit 1))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/seqExamples3.gold view
@@ -16,16 +16,16 @@ [GOOD] (define-fun s4 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3) (seq.unit 4))) [GOOD] (define-fun s7 () (Seq Int) (seq.++ (seq.unit 3) (seq.unit 4) (seq.unit 5) (seq.unit 6))) [GOOD] (define-fun s9 () (Seq Int) (as seq.empty (Seq Int)))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Seq Int)) ; tracks user variable "b" [GOOD] (declare-fun s2 () (Seq Int)) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (Seq Int) (seq.++ s0 s1)) [GOOD] (define-fun s5 () Bool (= s3 s4)) [GOOD] (define-fun s6 () (Seq Int) (seq.++ s1 s2))@@ -34,10 +34,8 @@ [GOOD] (define-fun s11 () Bool (not s10)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [GOOD] (assert s8) [GOOD] (assert s11)
SBVTestSuite/GoldFiles/seqExamples4.gold view
@@ -16,15 +16,15 @@ [GOOD] (define-fun s2 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3))) [GOOD] (define-fun s4 () (Seq Int) (seq.++ (seq.unit 3) (seq.unit 4) (seq.unit 5))) [GOOD] (define-fun s8 () Int 2)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Seq Int)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () (Seq Int) (seq.++ s2 s0)) [GOOD] (define-fun s5 () (Seq Int) (seq.++ s1 s4)) [GOOD] (define-fun s6 () Bool (= s3 s5))@@ -32,10 +32,8 @@ [GOOD] (define-fun s9 () Bool (<= s7 s8)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s6) [GOOD] (assert s9) [SEND] (check-sat)
SBVTestSuite/GoldFiles/seqExamples5.gold view
@@ -16,16 +16,16 @@ [GOOD] (define-fun s3 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2))) [GOOD] (define-fun s6 () (Seq Int) (seq.++ (seq.unit 2) (seq.unit 1))) [GOOD] (define-fun s12 () (Seq Int) (seq.unit 1))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Seq Int)) ; tracks user variable "b" [GOOD] (declare-fun s2 () (Seq Int)) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s4 () (Seq Int) (seq.++ s3 s1)) [GOOD] (define-fun s5 () (Seq Int) (seq.++ s0 s4)) [GOOD] (define-fun s7 () (Seq Int) (seq.++ s6 s2))@@ -39,10 +39,8 @@ [GOOD] (define-fun s16 () Bool (not s15)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s9) [GOOD] (assert s11) [GOOD] (assert s16)
SBVTestSuite/GoldFiles/seqExamples6.gold view
@@ -13,26 +13,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Seq Int)) ; tracks user variable "b" [GOOD] (declare-fun s2 () (Seq Int)) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (seq.contains s0 s1)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (assert s6)
SBVTestSuite/GoldFiles/seqExamples7.gold view
@@ -13,16 +13,16 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Seq Int)) ; tracks user variable "b" [GOOD] (declare-fun s2 () (Seq Int)) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (seq.contains s0 s1)) [GOOD] (define-fun s4 () Bool (seq.contains s0 s2)) [GOOD] (define-fun s5 () Bool (seq.contains s1 s2))@@ -31,10 +31,8 @@ [GOOD] (define-fun s8 () Bool (not s7)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (assert s6)
SBVTestSuite/GoldFiles/seqExamples8.gold view
@@ -13,16 +13,16 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq Int)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Seq Int)) ; tracks user variable "b" [GOOD] (declare-fun s2 () (Seq Int)) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (seq.prefixof s1 s0)) [GOOD] (define-fun s4 () Bool (seq.suffixof s2 s0)) [GOOD] (define-fun s5 () Int (seq.len s0))@@ -35,10 +35,8 @@ [GOOD] (define-fun s12 () Bool (not s11)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (assert s9)
SBVTestSuite/GoldFiles/seqIndexOf.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/seqIndexOfBad.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert false) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/set_compl1.gold view
@@ -14,21 +14,19 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () (Array Int Bool) (store (store (store (store ((as const (Array Int Bool)) false) 4 true) 3 true) 2 true) 1 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/set_delete1.gold view
@@ -15,23 +15,21 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 2) [GOOD] (define-fun s4 () (Array Int Bool) (store (store (store (store ((as const (Array Int Bool)) false) 4 true) 3 true) 2 true) 1 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s5) [SEND] (check-sat)
SBVTestSuite/GoldFiles/set_diff1.gold view
@@ -14,23 +14,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (Array Int Bool) (store ((as const (Array Int Bool)) false) 0 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [SEND] (check-sat)
SBVTestSuite/GoldFiles/set_disj1.gold view
@@ -14,23 +14,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (Array Int Bool) (store ((as const (Array Int Bool)) false) 0 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [SEND] (check-sat)
SBVTestSuite/GoldFiles/set_empty1.gold view
@@ -14,21 +14,19 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () (Array Int Bool) (store (store (store (store ((as const (Array Int Bool)) false) 4 true) 3 true) 2 true) 1 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/set_full1.gold view
@@ -14,21 +14,19 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () (Array Int Bool) (store (store (store (store ((as const (Array Int Bool)) false) 4 true) 3 true) 2 true) 1 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/set_insert1.gold view
@@ -15,23 +15,21 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 2) [GOOD] (define-fun s4 () (Array Int Bool) (store (store (store (store ((as const (Array Int Bool)) false) 4 true) 3 true) 2 true) 1 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s5) [SEND] (check-sat)
SBVTestSuite/GoldFiles/set_intersect1.gold view
@@ -14,23 +14,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (Array Int Bool) (store ((as const (Array Int Bool)) false) 0 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [SEND] (check-sat)
SBVTestSuite/GoldFiles/set_member1.gold view
@@ -15,23 +15,21 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 2) [GOOD] (define-fun s4 () (Array Int Bool) (store (store (store (store ((as const (Array Int Bool)) false) 4 true) 3 true) 2 true) 1 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s5) [SEND] (check-sat)
SBVTestSuite/GoldFiles/set_notMember1.gold view
@@ -15,23 +15,21 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 2) [GOOD] (define-fun s4 () (Array Int Bool) (store (store (store (store ((as const (Array Int Bool)) false) 4 true) 3 true) 2 true) 1 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s5) [SEND] (check-sat)
SBVTestSuite/GoldFiles/set_psubset1.gold view
@@ -14,23 +14,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (Array Int Bool) (store ((as const (Array Int Bool)) false) 0 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [SEND] (check-sat)
SBVTestSuite/GoldFiles/set_subset1.gold view
@@ -14,23 +14,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (Array Int Bool) (store ((as const (Array Int Bool)) false) 0 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [SEND] (check-sat)
SBVTestSuite/GoldFiles/set_tupleSet.gold view
@@ -17,21 +17,19 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () (SBVTuple2 (Array Bool Bool) (Array Bool Bool)) (mkSBVTuple2 ((as const (Array Bool Bool)) false) ((as const (Array Bool Bool)) false)))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVTuple2 (Array Bool Bool) (Array Bool Bool))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/set_uninterp1.gold view
@@ -17,20 +17,18 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array E Bool)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- *** Checking Satisfiability, all solutions.. Fast allSat, Looking for solution 1 [SEND] (check-sat)@@ -66,9 +64,9 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (store (store ((as const (Array E Bool)) false) B true) C true)))+[RECV] ((s0 (store ((as const (Array E Bool)) true) A false))) [GOOD] (push 1)-[GOOD] (define-fun s10 () (Array E Bool) (store (store ((as const (Array E Bool)) false) C true) B true))+[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)@@ -76,9 +74,9 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (store (store ((as const (Array E Bool)) false) C true) A true)))+[RECV] ((s0 (store ((as const (Array E Bool)) false) C true))) [GOOD] (push 1)-[GOOD] (define-fun s13 () (Array E Bool) (store (store ((as const (Array E Bool)) false) C true) A true))+[GOOD] (define-fun s13 () (Array E Bool) (store ((as const (Array E Bool)) false) C true)) [GOOD] (define-fun s14 () Bool (= s0 s13)) [GOOD] (define-fun s15 () Bool (not s14)) [GOOD] (assert s15)@@ -86,9 +84,9 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (store ((as const (Array E Bool)) false) C true)))+[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)) false) C true))+[GOOD] (define-fun s16 () (Array E Bool) (store (store ((as const (Array E Bool)) false) B true) A true)) [GOOD] (define-fun s17 () Bool (= s0 s16)) [GOOD] (define-fun s18 () Bool (not s17)) [GOOD] (assert s18)@@ -96,9 +94,9 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (store (store ((as const (Array E Bool)) false) B true) A true)))+[RECV] ((s0 (store (store ((as const (Array E Bool)) false) C true) A true))) [GOOD] (push 1)-[GOOD] (define-fun s19 () (Array E Bool) (store (store ((as const (Array E Bool)) false) B true) A true))+[GOOD] (define-fun s19 () (Array E Bool) (store (store ((as const (Array E Bool)) false) C true) A true)) [GOOD] (define-fun s20 () Bool (= s0 s19)) [GOOD] (define-fun s21 () Bool (not s20)) [GOOD] (assert s21)@@ -106,9 +104,9 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (store (store (store ((as const (Array E Bool)) false) B true) C true) A true)))+[RECV] ((s0 ((as const (Array E Bool)) true))) [GOOD] (push 1)-[GOOD] (define-fun s22 () (Array E Bool) (store (store (store ((as const (Array E Bool)) false) C true) B true) A true))+[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)@@ -128,15 +126,15 @@  FINAL: Solution #1:-  s0 = {A,B,C} :: {E}+  s0 = U :: {E} Solution #2:-  s0 = {A,B} :: {E}+  s0 = {A,C} :: {E} Solution #3:-  s0 = {C} :: {E}+  s0 = {A,B} :: {E} Solution #4:-  s0 = {A,C} :: {E}+  s0 = {C} :: {E} Solution #5:-  s0 = {B,C} :: {E}+  s0 = U - {A} :: {E} Solution #6:   s0 = {B} :: {E} Solution #7:
SBVTestSuite/GoldFiles/set_uninterp2.gold view
@@ -17,22 +17,20 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array E Bool)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array E Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (distinct s0 s1)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/set_union1.gold view
@@ -14,23 +14,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (Array Int Bool) (store ((as const (Array Int Bool)) false) 0 true))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Array Int Bool)) ; tracks user variable "a" [GOOD] (declare-fun s1 () (Array Int Bool)) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [SEND] (check-sat)
SBVTestSuite/GoldFiles/sort.gold view
@@ -13,167 +13,159 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] (define-fun s13 () Int 0)-[GOOD] (define-fun s15 () (Seq Int) (as seq.empty (Seq Int)))-[GOOD] (define-fun s16 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] (define-fun s12 () Int 0)+[GOOD] (define-fun s14 () (Seq Int) (as seq.empty (Seq Int)))+[GOOD] (define-fun s15 () Int 1)+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "a" [GOOD] (declare-fun s1 () Int) ; tracks user variable "b" [GOOD] (declare-fun s2 () Int) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (<= s0 s1)) [GOOD] (define-fun s4 () Bool (<= s1 s2)) [GOOD] (define-fun s5 () Bool (and s3 s4))-[GOOD] (define-fun s6 () Bool (not s5))-[GOOD] (define-fun s7 () (Seq Int) (seq.unit s0))-[GOOD] (define-fun s8 () (Seq Int) (seq.unit s1))-[GOOD] (define-fun s9 () (Seq Int) (seq.unit s2))-[GOOD] (define-fun s10 () (Seq Int) (seq.++ s8 s9))-[GOOD] (define-fun s11 () (Seq Int) (seq.++ s7 s10))-[GOOD] (define-fun s12 () Int (seq.len s11))-[GOOD] (define-fun s14 () Bool (= s12 s13))-[GOOD] (define-fun s17 () Int (- s12 s16))-[GOOD] (define-fun s18 () (Seq Int) (seq.extract s11 s16 s17))-[GOOD] (define-fun s19 () Int (seq.len s18))-[GOOD] (define-fun s20 () Bool (= s13 s19))-[GOOD] (define-fun s21 () Int (- s19 s16))-[GOOD] (define-fun s22 () (Seq Int) (seq.extract s18 s16 s21))-[GOOD] (define-fun s23 () Int (seq.len s22))-[GOOD] (define-fun s24 () Bool (= s13 s23))-[GOOD] (define-fun s25 () Int (seq.nth s22 s13))-[GOOD] (define-fun s26 () (Seq Int) (seq.unit s25))-[GOOD] (define-fun s27 () (Seq Int) (ite s24 s15 s26))-[GOOD] (define-fun s28 () Int (seq.len s27))-[GOOD] (define-fun s29 () Bool (= s13 s28))-[GOOD] (define-fun s30 () Int (seq.nth s18 s13))-[GOOD] (define-fun s31 () (Seq Int) (seq.unit s30))-[GOOD] (define-fun s32 () Int (seq.nth s27 s13))-[GOOD] (define-fun s33 () Bool (< s30 s32))-[GOOD] (define-fun s34 () (Seq Int) (seq.unit s32))-[GOOD] (define-fun s35 () Int (- s28 s16))-[GOOD] (define-fun s36 () (Seq Int) (seq.extract s27 s16 s35))-[GOOD] (define-fun s37 () (Seq Int) (seq.++ s34 s36))-[GOOD] (define-fun s38 () (Seq Int) (seq.++ s31 s37))-[GOOD] (define-fun s39 () Int (seq.len s36))-[GOOD] (define-fun s40 () Bool (= s13 s39))-[GOOD] (define-fun s41 () Int (seq.nth s36 s13))-[GOOD] (define-fun s42 () Bool (< s30 s41))-[GOOD] (define-fun s43 () (Seq Int) (seq.unit s41))-[GOOD] (define-fun s44 () Int (- s39 s16))-[GOOD] (define-fun s45 () (Seq Int) (seq.extract s36 s16 s44))-[GOOD] (define-fun s46 () (Seq Int) (seq.++ s43 s45))-[GOOD] (define-fun s47 () (Seq Int) (seq.++ s31 s46))-[GOOD] (define-fun s48 () Int (seq.len s45))-[GOOD] (define-fun s49 () Bool (= s13 s48))-[GOOD] (define-fun s50 () Int (seq.nth s45 s13))-[GOOD] (define-fun s51 () Bool (< s30 s50))-[GOOD] (define-fun s52 () (Seq Int) (seq.unit s50))-[GOOD] (define-fun s53 () Int (- s48 s16))-[GOOD] (define-fun s54 () (Seq Int) (seq.extract s45 s16 s53))-[GOOD] (define-fun s55 () (Seq Int) (seq.++ s52 s54))-[GOOD] (define-fun s56 () (Seq Int) (seq.++ s31 s55))-[GOOD] (define-fun s57 () (Seq Int) (seq.++ s52 s31))-[GOOD] (define-fun s58 () (Seq Int) (ite s51 s56 s57))-[GOOD] (define-fun s59 () (Seq Int) (ite s49 s31 s58))-[GOOD] (define-fun s60 () (Seq Int) (seq.++ s43 s59))-[GOOD] (define-fun s61 () (Seq Int) (ite s42 s47 s60))-[GOOD] (define-fun s62 () (Seq Int) (ite s40 s31 s61))-[GOOD] (define-fun s63 () (Seq Int) (seq.++ s34 s62))-[GOOD] (define-fun s64 () (Seq Int) (ite s33 s38 s63))-[GOOD] (define-fun s65 () (Seq Int) (ite s29 s31 s64))-[GOOD] (define-fun s66 () (Seq Int) (ite s20 s15 s65))-[GOOD] (define-fun s67 () Int (seq.len s66))-[GOOD] (define-fun s68 () Bool (= s13 s67))-[GOOD] (define-fun s69 () Int (seq.nth s11 s13))-[GOOD] (define-fun s70 () (Seq Int) (seq.unit s69))-[GOOD] (define-fun s71 () Int (seq.nth s66 s13))-[GOOD] (define-fun s72 () Bool (< s69 s71))-[GOOD] (define-fun s73 () (Seq Int) (seq.unit s71))-[GOOD] (define-fun s74 () Int (- s67 s16))-[GOOD] (define-fun s75 () (Seq Int) (seq.extract s66 s16 s74))-[GOOD] (define-fun s76 () (Seq Int) (seq.++ s73 s75))-[GOOD] (define-fun s77 () (Seq Int) (seq.++ s70 s76))-[GOOD] (define-fun s78 () Int (seq.len s75))-[GOOD] (define-fun s79 () Bool (= s13 s78))-[GOOD] (define-fun s80 () Int (seq.nth s75 s13))-[GOOD] (define-fun s81 () Bool (< s69 s80))-[GOOD] (define-fun s82 () (Seq Int) (seq.unit s80))-[GOOD] (define-fun s83 () Int (- s78 s16))-[GOOD] (define-fun s84 () (Seq Int) (seq.extract s75 s16 s83))-[GOOD] (define-fun s85 () (Seq Int) (seq.++ s82 s84))-[GOOD] (define-fun s86 () (Seq Int) (seq.++ s70 s85))-[GOOD] (define-fun s87 () Int (seq.len s84))-[GOOD] (define-fun s88 () Bool (= s13 s87))-[GOOD] (define-fun s89 () Int (seq.nth s84 s13))-[GOOD] (define-fun s90 () Bool (< s69 s89))-[GOOD] (define-fun s91 () (Seq Int) (seq.unit s89))-[GOOD] (define-fun s92 () Int (- s87 s16))-[GOOD] (define-fun s93 () (Seq Int) (seq.extract s84 s16 s92))-[GOOD] (define-fun s94 () (Seq Int) (seq.++ s91 s93))-[GOOD] (define-fun s95 () (Seq Int) (seq.++ s70 s94))-[GOOD] (define-fun s96 () (Seq Int) (seq.++ s91 s70))-[GOOD] (define-fun s97 () (Seq Int) (ite s90 s95 s96))-[GOOD] (define-fun s98 () (Seq Int) (ite s88 s70 s97))-[GOOD] (define-fun s99 () (Seq Int) (seq.++ s82 s98))-[GOOD] (define-fun s100 () (Seq Int) (ite s81 s86 s99))-[GOOD] (define-fun s101 () (Seq Int) (ite s79 s70 s100))-[GOOD] (define-fun s102 () (Seq Int) (seq.++ s73 s101))-[GOOD] (define-fun s103 () (Seq Int) (ite s72 s77 s102))-[GOOD] (define-fun s104 () (Seq Int) (ite s68 s70 s103))-[GOOD] (define-fun s105 () (Seq Int) (ite s14 s15 s104))-[GOOD] (define-fun s106 () Bool (= s11 s105))-[GOOD] (define-fun s107 () Bool (or s6 s106))-[GOOD] (define-fun s108 () Bool (<= s0 s2))-[GOOD] (define-fun s109 () Bool (<= s2 s1))-[GOOD] (define-fun s110 () Bool (and s108 s109))-[GOOD] (define-fun s111 () Bool (not s110))-[GOOD] (define-fun s112 () (Seq Int) (seq.++ s9 s8))-[GOOD] (define-fun s113 () (Seq Int) (seq.++ s7 s112))-[GOOD] (define-fun s114 () Bool (= s105 s113))-[GOOD] (define-fun s115 () Bool (or s111 s114))-[GOOD] (define-fun s116 () Bool (<= s1 s0))-[GOOD] (define-fun s117 () Bool (and s108 s116))-[GOOD] (define-fun s118 () Bool (not s117))-[GOOD] (define-fun s119 () (Seq Int) (seq.++ s7 s9))-[GOOD] (define-fun s120 () (Seq Int) (seq.++ s8 s119))-[GOOD] (define-fun s121 () Bool (= s105 s120))-[GOOD] (define-fun s122 () Bool (or s118 s121))-[GOOD] (define-fun s123 () Bool (<= s2 s0))-[GOOD] (define-fun s124 () Bool (and s4 s123))-[GOOD] (define-fun s125 () Bool (not s124))-[GOOD] (define-fun s126 () (Seq Int) (seq.++ s9 s7))-[GOOD] (define-fun s127 () (Seq Int) (seq.++ s8 s126))-[GOOD] (define-fun s128 () Bool (= s105 s127))-[GOOD] (define-fun s129 () Bool (or s125 s128))-[GOOD] (define-fun s130 () Bool (and s3 s123))-[GOOD] (define-fun s131 () Bool (not s130))-[GOOD] (define-fun s132 () (Seq Int) (seq.++ s7 s8))-[GOOD] (define-fun s133 () (Seq Int) (seq.++ s9 s132))-[GOOD] (define-fun s134 () Bool (= s105 s133))-[GOOD] (define-fun s135 () Bool (or s131 s134))-[GOOD] (define-fun s136 () Bool (and s109 s116))-[GOOD] (define-fun s137 () Bool (not s136))-[GOOD] (define-fun s138 () (Seq Int) (seq.++ s8 s7))-[GOOD] (define-fun s139 () (Seq Int) (seq.++ s9 s138))-[GOOD] (define-fun s140 () Bool (= s105 s139))-[GOOD] (define-fun s141 () Bool (or s137 s140))+[GOOD] (define-fun s6 () (Seq Int) (seq.unit s0))+[GOOD] (define-fun s7 () (Seq Int) (seq.unit s1))+[GOOD] (define-fun s8 () (Seq Int) (seq.unit s2))+[GOOD] (define-fun s9 () (Seq Int) (seq.++ s7 s8))+[GOOD] (define-fun s10 () (Seq Int) (seq.++ s6 s9))+[GOOD] (define-fun s11 () Int (seq.len s10))+[GOOD] (define-fun s13 () Bool (= s11 s12))+[GOOD] (define-fun s16 () Int (- s11 s15))+[GOOD] (define-fun s17 () (Seq Int) (seq.extract s10 s15 s16))+[GOOD] (define-fun s18 () Int (seq.len s17))+[GOOD] (define-fun s19 () Bool (= s12 s18))+[GOOD] (define-fun s20 () Int (- s18 s15))+[GOOD] (define-fun s21 () (Seq Int) (seq.extract s17 s15 s20))+[GOOD] (define-fun s22 () Int (seq.len s21))+[GOOD] (define-fun s23 () Bool (= s12 s22))+[GOOD] (define-fun s24 () Int (seq.nth s21 s12))+[GOOD] (define-fun s25 () (Seq Int) (seq.unit s24))+[GOOD] (define-fun s26 () (Seq Int) (ite s23 s14 s25))+[GOOD] (define-fun s27 () Int (seq.len s26))+[GOOD] (define-fun s28 () Bool (= s12 s27))+[GOOD] (define-fun s29 () Int (seq.nth s17 s12))+[GOOD] (define-fun s30 () (Seq Int) (seq.unit s29))+[GOOD] (define-fun s31 () Int (seq.nth s26 s12))+[GOOD] (define-fun s32 () Bool (< s29 s31))+[GOOD] (define-fun s33 () (Seq Int) (seq.unit s31))+[GOOD] (define-fun s34 () Int (- s27 s15))+[GOOD] (define-fun s35 () (Seq Int) (seq.extract s26 s15 s34))+[GOOD] (define-fun s36 () (Seq Int) (seq.++ s33 s35))+[GOOD] (define-fun s37 () (Seq Int) (seq.++ s30 s36))+[GOOD] (define-fun s38 () Int (seq.len s35))+[GOOD] (define-fun s39 () Bool (= s12 s38))+[GOOD] (define-fun s40 () Int (seq.nth s35 s12))+[GOOD] (define-fun s41 () Bool (< s29 s40))+[GOOD] (define-fun s42 () (Seq Int) (seq.unit s40))+[GOOD] (define-fun s43 () Int (- s38 s15))+[GOOD] (define-fun s44 () (Seq Int) (seq.extract s35 s15 s43))+[GOOD] (define-fun s45 () (Seq Int) (seq.++ s42 s44))+[GOOD] (define-fun s46 () (Seq Int) (seq.++ s30 s45))+[GOOD] (define-fun s47 () Int (seq.len s44))+[GOOD] (define-fun s48 () Bool (= s12 s47))+[GOOD] (define-fun s49 () Int (seq.nth s44 s12))+[GOOD] (define-fun s50 () Bool (< s29 s49))+[GOOD] (define-fun s51 () (Seq Int) (seq.unit s49))+[GOOD] (define-fun s52 () Int (- s47 s15))+[GOOD] (define-fun s53 () (Seq Int) (seq.extract s44 s15 s52))+[GOOD] (define-fun s54 () (Seq Int) (seq.++ s51 s53))+[GOOD] (define-fun s55 () (Seq Int) (seq.++ s30 s54))+[GOOD] (define-fun s56 () (Seq Int) (seq.++ s51 s30))+[GOOD] (define-fun s57 () (Seq Int) (ite s50 s55 s56))+[GOOD] (define-fun s58 () (Seq Int) (ite s48 s30 s57))+[GOOD] (define-fun s59 () (Seq Int) (seq.++ s42 s58))+[GOOD] (define-fun s60 () (Seq Int) (ite s41 s46 s59))+[GOOD] (define-fun s61 () (Seq Int) (ite s39 s30 s60))+[GOOD] (define-fun s62 () (Seq Int) (seq.++ s33 s61))+[GOOD] (define-fun s63 () (Seq Int) (ite s32 s37 s62))+[GOOD] (define-fun s64 () (Seq Int) (ite s28 s30 s63))+[GOOD] (define-fun s65 () (Seq Int) (ite s19 s14 s64))+[GOOD] (define-fun s66 () Int (seq.len s65))+[GOOD] (define-fun s67 () Bool (= s12 s66))+[GOOD] (define-fun s68 () Int (seq.nth s10 s12))+[GOOD] (define-fun s69 () (Seq Int) (seq.unit s68))+[GOOD] (define-fun s70 () Int (seq.nth s65 s12))+[GOOD] (define-fun s71 () Bool (< s68 s70))+[GOOD] (define-fun s72 () (Seq Int) (seq.unit s70))+[GOOD] (define-fun s73 () Int (- s66 s15))+[GOOD] (define-fun s74 () (Seq Int) (seq.extract s65 s15 s73))+[GOOD] (define-fun s75 () (Seq Int) (seq.++ s72 s74))+[GOOD] (define-fun s76 () (Seq Int) (seq.++ s69 s75))+[GOOD] (define-fun s77 () Int (seq.len s74))+[GOOD] (define-fun s78 () Bool (= s12 s77))+[GOOD] (define-fun s79 () Int (seq.nth s74 s12))+[GOOD] (define-fun s80 () Bool (< s68 s79))+[GOOD] (define-fun s81 () (Seq Int) (seq.unit s79))+[GOOD] (define-fun s82 () Int (- s77 s15))+[GOOD] (define-fun s83 () (Seq Int) (seq.extract s74 s15 s82))+[GOOD] (define-fun s84 () (Seq Int) (seq.++ s81 s83))+[GOOD] (define-fun s85 () (Seq Int) (seq.++ s69 s84))+[GOOD] (define-fun s86 () Int (seq.len s83))+[GOOD] (define-fun s87 () Bool (= s12 s86))+[GOOD] (define-fun s88 () Int (seq.nth s83 s12))+[GOOD] (define-fun s89 () Bool (< s68 s88))+[GOOD] (define-fun s90 () (Seq Int) (seq.unit s88))+[GOOD] (define-fun s91 () Int (- s86 s15))+[GOOD] (define-fun s92 () (Seq Int) (seq.extract s83 s15 s91))+[GOOD] (define-fun s93 () (Seq Int) (seq.++ s90 s92))+[GOOD] (define-fun s94 () (Seq Int) (seq.++ s69 s93))+[GOOD] (define-fun s95 () (Seq Int) (seq.++ s90 s69))+[GOOD] (define-fun s96 () (Seq Int) (ite s89 s94 s95))+[GOOD] (define-fun s97 () (Seq Int) (ite s87 s69 s96))+[GOOD] (define-fun s98 () (Seq Int) (seq.++ s81 s97))+[GOOD] (define-fun s99 () (Seq Int) (ite s80 s85 s98))+[GOOD] (define-fun s100 () (Seq Int) (ite s78 s69 s99))+[GOOD] (define-fun s101 () (Seq Int) (seq.++ s72 s100))+[GOOD] (define-fun s102 () (Seq Int) (ite s71 s76 s101))+[GOOD] (define-fun s103 () (Seq Int) (ite s67 s69 s102))+[GOOD] (define-fun s104 () (Seq Int) (ite s13 s14 s103))+[GOOD] (define-fun s105 () Bool (= s10 s104))+[GOOD] (define-fun s106 () Bool (=> s5 s105))+[GOOD] (define-fun s107 () Bool (<= s0 s2))+[GOOD] (define-fun s108 () Bool (<= s2 s1))+[GOOD] (define-fun s109 () Bool (and s107 s108))+[GOOD] (define-fun s110 () (Seq Int) (seq.++ s8 s7))+[GOOD] (define-fun s111 () (Seq Int) (seq.++ s6 s110))+[GOOD] (define-fun s112 () Bool (= s104 s111))+[GOOD] (define-fun s113 () Bool (=> s109 s112))+[GOOD] (define-fun s114 () Bool (<= s1 s0))+[GOOD] (define-fun s115 () Bool (and s107 s114))+[GOOD] (define-fun s116 () (Seq Int) (seq.++ s6 s8))+[GOOD] (define-fun s117 () (Seq Int) (seq.++ s7 s116))+[GOOD] (define-fun s118 () Bool (= s104 s117))+[GOOD] (define-fun s119 () Bool (=> s115 s118))+[GOOD] (define-fun s120 () Bool (<= s2 s0))+[GOOD] (define-fun s121 () Bool (and s4 s120))+[GOOD] (define-fun s122 () (Seq Int) (seq.++ s8 s6))+[GOOD] (define-fun s123 () (Seq Int) (seq.++ s7 s122))+[GOOD] (define-fun s124 () Bool (= s104 s123))+[GOOD] (define-fun s125 () Bool (=> s121 s124))+[GOOD] (define-fun s126 () Bool (and s3 s120))+[GOOD] (define-fun s127 () (Seq Int) (seq.++ s6 s7))+[GOOD] (define-fun s128 () (Seq Int) (seq.++ s8 s127))+[GOOD] (define-fun s129 () Bool (= s104 s128))+[GOOD] (define-fun s130 () Bool (=> s126 s129))+[GOOD] (define-fun s131 () Bool (and s108 s114))+[GOOD] (define-fun s132 () (Seq Int) (seq.++ s7 s6))+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert s107)-[GOOD] (assert s115)-[GOOD] (assert s122)-[GOOD] (assert s129)+[GOOD] ; --- formula ---+[GOOD] (assert s106)+[GOOD] (assert s113)+[GOOD] (assert s119)+[GOOD] (assert s125)+[GOOD] (assert s130) [GOOD] (assert s135)-[GOOD] (assert s141) [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/strConcat.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/strConcatBad.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert false) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/strExamples1.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/strExamples10.gold view
@@ -11,23 +11,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () Int 6)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s1) [GOOD] (assert s4) [SEND] (check-sat)
SBVTestSuite/GoldFiles/strExamples11.gold view
@@ -12,24 +12,22 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () Int 11) [GOOD] (define-fun s4 () String "11")-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "i" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (assert s6) [SEND] (check-sat)
SBVTestSuite/GoldFiles/strExamples12.gold view
@@ -12,24 +12,22 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () Int (- 2)) [GOOD] (define-fun s4 () String "")-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "i" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (assert s6) [SEND] (check-sat)
SBVTestSuite/GoldFiles/strExamples13.gold view
@@ -12,24 +12,22 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () String "13") [GOOD] (define-fun s4 () Int 13)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "s" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (= s0 s1)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (assert s6) [SEND] (check-sat)
SBVTestSuite/GoldFiles/strExamples2.gold view
@@ -12,23 +12,21 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () String "b") [GOOD] (define-fun s3 () String "a")-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/strExamples3.gold view
@@ -13,16 +13,16 @@ [GOOD] (define-fun s4 () String "abcd") [GOOD] (define-fun s7 () String "cdef") [GOOD] (define-fun s9 () String "")-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] (declare-fun s1 () String) ; tracks user variable "b" [GOOD] (declare-fun s2 () String) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () String (str.++ s0 s1)) [GOOD] (define-fun s5 () Bool (= s3 s4)) [GOOD] (define-fun s6 () String (str.++ s1 s2))@@ -31,10 +31,8 @@ [GOOD] (define-fun s11 () Bool (not s10)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [GOOD] (assert s8) [GOOD] (assert s11)
SBVTestSuite/GoldFiles/strExamples4.gold view
@@ -13,15 +13,15 @@ [GOOD] (define-fun s2 () String "abc") [GOOD] (define-fun s4 () String "cef") [GOOD] (define-fun s8 () Int 2)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] (declare-fun s1 () String) ; tracks user variable "b" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () String (str.++ s2 s0)) [GOOD] (define-fun s5 () String (str.++ s1 s4)) [GOOD] (define-fun s6 () Bool (= s3 s5))@@ -29,10 +29,8 @@ [GOOD] (define-fun s9 () Bool (<= s7 s8)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s6) [GOOD] (assert s9) [SEND] (check-sat)
SBVTestSuite/GoldFiles/strExamples5.gold view
@@ -13,16 +13,16 @@ [GOOD] (define-fun s3 () String "ab") [GOOD] (define-fun s6 () String "ba") [GOOD] (define-fun s12 () String "a")-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] (declare-fun s1 () String) ; tracks user variable "b" [GOOD] (declare-fun s2 () String) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s4 () String (str.++ s3 s1)) [GOOD] (define-fun s5 () String (str.++ s0 s4)) [GOOD] (define-fun s7 () String (str.++ s6 s2))@@ -36,10 +36,8 @@ [GOOD] (define-fun s16 () Bool (not s15)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s9) [GOOD] (assert s11) [GOOD] (assert s16)
SBVTestSuite/GoldFiles/strExamples6.gold view
@@ -10,26 +10,24 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] (declare-fun s1 () String) ; tracks user variable "b" [GOOD] (declare-fun s2 () String) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (str.contains s0 s1)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (assert s6)
SBVTestSuite/GoldFiles/strExamples7.gold view
@@ -10,16 +10,16 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] (declare-fun s1 () String) ; tracks user variable "b" [GOOD] (declare-fun s2 () String) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (str.contains s0 s1)) [GOOD] (define-fun s4 () Bool (str.contains s0 s2)) [GOOD] (define-fun s5 () Bool (str.contains s1 s2))@@ -28,10 +28,8 @@ [GOOD] (define-fun s8 () Bool (not s7)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (assert s6)
SBVTestSuite/GoldFiles/strExamples8.gold view
@@ -10,16 +10,16 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] (declare-fun s1 () String) ; tracks user variable "b" [GOOD] (declare-fun s2 () String) ; tracks user variable "c" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s3 () Bool (str.prefixof s1 s0)) [GOOD] (define-fun s4 () Bool (str.suffixof s2 s0)) [GOOD] (define-fun s5 () Int (str.len s0))@@ -32,10 +32,8 @@ [GOOD] (define-fun s12 () Bool (not s11)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s4) [GOOD] (assert s9)
SBVTestSuite/GoldFiles/strExamples9.gold view
@@ -11,23 +11,21 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () Int 6)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () String) ; tracks user variable "a" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s1) [GOOD] (assert s4) [SEND] (check-sat)
SBVTestSuite/GoldFiles/strIndexOf.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [SEND] (check-sat) [RECV] sat *** Solver   : Z3
SBVTestSuite/GoldFiles/strIndexOfBad.gold view
@@ -10,19 +10,17 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert false) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/sumBimapPlus.gold view
@@ -17,14 +17,14 @@                                             (right_SBVEither (get_right_SBVEither T2)))))) [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 1)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVEither Int Int)) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (get_left_SBVEither s0)) [GOOD] (define-fun s3 () Int (+ s1 s2)) [GOOD] (define-fun s4 () (SBVEither Int Int) ((as left_SBVEither (SBVEither Int Int)) s3))@@ -42,10 +42,8 @@ [GOOD] (define-fun s16 () Bool (= s13 s15)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s16) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/sumEitherSat.gold view
@@ -17,14 +17,14 @@                                             (right_SBVEither (get_right_SBVEither T2)))))) [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () Int 0)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVEither Int Bool)) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Int (get_left_SBVEither s0)) [GOOD] (define-fun s3 () Bool (> s1 s2)) [GOOD] (define-fun s4 () Bool (get_right_SBVEither s0))@@ -33,10 +33,8 @@ [GOOD] (define-fun s7 () Bool (ite s6 s3 s5)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s7) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/sumLiftEither.gold view
@@ -16,16 +16,16 @@                                            ((left_SBVEither  (get_left_SBVEither  T1))                                             (right_SBVEither (get_right_SBVEither T2)))))) [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "i" [GOOD] (declare-fun s1 () String) ; tracks user variable "c" [GOOD] (assert (= 1 (str.len s1))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () (SBVEither Int String) ((as left_SBVEither (SBVEither Int String)) s0)) [GOOD] (define-fun s3 () Bool ((_ is (left_SBVEither (Int) (SBVEither Int String))) s2)) [GOOD] (define-fun s4 () Bool (ite s3 true false))@@ -34,10 +34,8 @@ [GOOD] (define-fun s7 () Bool (ite s6 false true)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s4) [GOOD] (assert s7) [SEND] (check-sat)
SBVTestSuite/GoldFiles/sumLiftMaybe.gold view
@@ -17,22 +17,20 @@                                             (just_SBVMaybe (get_just_SBVMaybe T)))))) [GOOD] ; --- literal constants --- [GOOD] (define-fun s2 () (SBVMaybe Int) (as nothing_SBVMaybe (SBVMaybe Int)))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "i" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/sumMaybe.gold view
@@ -19,14 +19,14 @@ [GOOD] (define-fun s3 () (SBVMaybe Int) (as nothing_SBVMaybe (SBVMaybe Int))) [GOOD] (define-fun s5 () Int 1) [GOOD] (define-fun s15 () Int 0)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVMaybe Int)) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () Bool ((_ is (nothing_SBVMaybe () (SBVMaybe Int))) s0)) [GOOD] (define-fun s2 () Bool (ite s1 true false)) [GOOD] (define-fun s4 () Int (get_just_SBVMaybe s0))@@ -46,10 +46,8 @@ [GOOD] (define-fun s20 () Bool (= s16 s19)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s11) [GOOD] (assert s14) [GOOD] (assert s20)
SBVTestSuite/GoldFiles/sumMaybeBoth.gold view
@@ -19,25 +19,23 @@                                            ((nothing_SBVMaybe)                                             (just_SBVMaybe (get_just_SBVMaybe T)))))) [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVEither Int Int)) [GOOD] (declare-fun s1 () (SBVMaybe Int)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool ((_ is (left_SBVEither (Int) (SBVEither Int Int))) s0)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [GOOD] (assert s5) [SEND] (check-sat)
SBVTestSuite/GoldFiles/sumMergeEither1.gold view
@@ -16,25 +16,23 @@                                            ((left_SBVEither  (get_left_SBVEither  T1))                                             (right_SBVEither (get_right_SBVEither T2)))))) [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVEither Int Bool)) [GOOD] (declare-fun s1 () (SBVEither Int Bool)) [GOOD] (declare-fun s2 () Bool) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/sumMergeEither2.gold view
@@ -16,25 +16,23 @@                                            ((left_SBVEither  (get_left_SBVEither  T1))                                             (right_SBVEither (get_right_SBVEither T2)))))) [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVEither Int Bool)) [GOOD] (declare-fun s1 () (SBVEither Int Bool)) [GOOD] (declare-fun s2 () Bool) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/sumMergeMaybe1.gold view
@@ -16,25 +16,23 @@                                            ((nothing_SBVMaybe)                                             (just_SBVMaybe (get_just_SBVMaybe T)))))) [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVMaybe Int)) [GOOD] (declare-fun s1 () (SBVMaybe Int)) [GOOD] (declare-fun s2 () Bool) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/sumMergeMaybe2.gold view
@@ -16,25 +16,23 @@                                            ((nothing_SBVMaybe)                                             (just_SBVMaybe (get_just_SBVMaybe T)))))) [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVMaybe Int)) [GOOD] (declare-fun s1 () (SBVMaybe Int)) [GOOD] (declare-fun s2 () Bool) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/tuple_enum.gold view
@@ -27,15 +27,15 @@ [GOOD] (define-fun s16 () E C) [GOOD] (define-fun s20 () Int 6) [GOOD] (define-fun s22 () Int 4)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq (SBVTuple2 E (Seq Bool)))) ; tracks user variable "v1" [GOOD] (declare-fun s1 () Bool) ; tracks user variable "q" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (not s1)) [GOOD] (define-fun s4 () (SBVTuple2 E (Seq Bool)) (seq.nth s0 s3)) [GOOD] (define-fun s5 () (Seq Bool) (proj_2_SBVTuple2 s4))@@ -53,10 +53,8 @@ [GOOD] (define-fun s23 () Bool (seq.nth s18 s22)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (assert s9) [GOOD] (assert s12)
SBVTestSuite/GoldFiles/tuple_list.gold view
@@ -23,14 +23,14 @@ [GOOD] (define-fun s14 () Int 4) [GOOD] (define-fun s17 () Int 5) [GOOD] (define-fun s23 () (Seq (SBVTuple2 Int (Seq (SBVTuple2 Int String)))) (seq.++ (seq.unit (mkSBVTuple2 2 (as seq.empty (Seq (SBVTuple2 Int String))))) (seq.unit (mkSBVTuple2 1 (seq.++ (seq.unit (mkSBVTuple2 3 "foo")) (seq.unit (mkSBVTuple2 0 "bar")) (seq.unit (mkSBVTuple2 (- 1) "baz")) (seq.unit (mkSBVTuple2 (- 2) "quux")) (seq.unit (mkSBVTuple2 (- 3) "enough"))))) (seq.unit (mkSBVTuple2 (- 4) (as seq.empty (Seq (SBVTuple2 Int String))))) (seq.unit (mkSBVTuple2 (- 5) (as seq.empty (Seq (SBVTuple2 Int String)))))))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (Seq (SBVTuple2 Int (Seq (SBVTuple2 Int String))))) ; tracks user variable "lst" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () (SBVTuple2 Int (Seq (SBVTuple2 Int String))) (seq.nth s0 s1)) [GOOD] (define-fun s3 () Int (proj_1_SBVTuple2 s2)) [GOOD] (define-fun s5 () Bool (= s3 s4))@@ -50,10 +50,8 @@ [GOOD] (define-fun s24 () Bool (= s0 s23)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s5) [GOOD] (assert s12) [GOOD] (assert s15)
SBVTestSuite/GoldFiles/tuple_nested.gold view
@@ -20,15 +20,15 @@ [GOOD] (define-fun s7 () String "foo") [GOOD] (define-fun s10 () String (_ char #x63)) [GOOD] (define-fun s13 () (_ BitVec 8) #x00)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVTuple2 (SBVTuple2 Int (SBVTuple2 String String)) (_ BitVec 8))) ; tracks user variable "abcd" [GOOD] (assert (= 1 (str.len (proj_2_SBVTuple2 (proj_2_SBVTuple2 (proj_1_SBVTuple2 s0)))))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s1 () (SBVTuple2 Int (SBVTuple2 String String)) (proj_1_SBVTuple2 s0)) [GOOD] (define-fun s2 () Int (proj_1_SBVTuple2 s1)) [GOOD] (define-fun s4 () Bool (= s2 s3))@@ -41,10 +41,8 @@ [GOOD] (define-fun s14 () Bool (= s12 s13)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s4) [GOOD] (assert s8) [GOOD] (assert s11)
SBVTestSuite/GoldFiles/tuple_swap.gold view
@@ -21,15 +21,15 @@ [GOOD] (define-fun s10 () Int 2) [GOOD] (define-fun s13 () Int 3) [GOOD] (define-fun s16 () Int 4)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVTuple3 Int Int Int)) ; tracks user variable "abx" [GOOD] (declare-fun s1 () (SBVTuple3 Int Int Int)) ; tracks user variable "bay" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Int (proj_1_SBVTuple3 s0)) [GOOD] (define-fun s3 () Int (proj_2_SBVTuple3 s1)) [GOOD] (define-fun s4 () Bool (= s2 s3))@@ -44,10 +44,8 @@ [GOOD] (define-fun s17 () Bool (= s15 s16)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s4) [GOOD] (assert s7) [GOOD] (assert s9)
SBVTestSuite/GoldFiles/tuple_twoTwo.gold view
@@ -18,26 +18,24 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () Int 1) [GOOD] (define-fun s6 () String (_ char #x63))-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVTuple2 Int String)) ; tracks user variable "ab" [GOOD] (declare-fun s1 () (SBVTuple2 String (_ BitVec 8))) ; tracks user variable "cd" [GOOD] (assert (= 1 (str.len (proj_1_SBVTuple2 s1)))) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Int (proj_1_SBVTuple2 s0)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s4) [GOOD] (assert s7) [SEND] (check-sat)
SBVTestSuite/GoldFiles/tuple_unequal.gold view
@@ -16,15 +16,15 @@                                                          (proj_2_SBVTuple2 T2)))))) [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (SBVTuple2 Int Int)) [GOOD] (declare-fun s1 () (SBVTuple2 Int Int)) [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Int (proj_1_SBVTuple2 s0)) [GOOD] (define-fun s3 () Int (proj_1_SBVTuple2 s1)) [GOOD] (define-fun s4 () Bool (< s2 s3))@@ -40,10 +40,8 @@ [GOOD] (define-fun s14 () Bool (or s11 s13)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s10) [GOOD] (assert s14) [SEND] (check-sat)
SBVTestSuite/GoldFiles/uiSat_test1.gold view
@@ -10,21 +10,19 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q1 (Bool) Bool)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (q1 false)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- *** Checking Satisfiability, all solutions.. [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295)
SBVTestSuite/GoldFiles/uiSat_test2.gold view
@@ -10,21 +10,19 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q2 (Bool Bool) Bool)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (q2 false false)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- *** Checking Satisfiability, all solutions.. [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295)@@ -169,10 +167,11 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) false false true)))+[RECV] ((q2 (store (store ((as const Array) true) false true false) true false false))) [GOOD] (define-fun q2_model10 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 false)) true-          false)+          (ite (and (= x!0 true) (= x!1 false)) false+          (ite (and (= x!0 false) (= x!1 true)) false+          true))        ) [GOOD] (define-fun q2_model10_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -184,11 +183,10 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) false) false false true) true true true)))+[RECV] ((q2 (store ((as const Array) false) false false true))) [GOOD] (define-fun q2_model11 ((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))+          false)        ) [GOOD] (define-fun q2_model11_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -200,11 +198,10 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) false) false false true) true false true)))+[RECV] ((q2 (store ((as const Array) true) false true false))) [GOOD] (define-fun q2_model12 ((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 false) (= x!1 true)) false+          true)        ) [GOOD] (define-fun q2_model12_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -216,10 +213,11 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) false true false)))+[RECV] ((q2 (store (store ((as const Array) true) false true false) true true false))) [GOOD] (define-fun q2_model13 ((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-          true)+          true))        ) [GOOD] (define-fun q2_model13_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -294,22 +292,22 @@   q2 _    _    = True  Solution #4:   q2 :: Bool -> Bool -> Bool+  q2 True  True = False   q2 False True = False   q2 _     _    = True  Solution #5:   q2 :: Bool -> Bool -> Bool-  q2 True  False = True -  q2 False False = True -  q2 _     _     = False+  q2 False True = False+  q2 _     _    = True  Solution #6:   q2 :: Bool -> Bool -> Bool-  q2 True  True  = True    q2 False False = True    q2 _     _     = False Solution #7:   q2 :: Bool -> Bool -> Bool-  q2 False False = True -  q2 _     _     = False+  q2 True  False = False+  q2 False True  = False+  q2 _     _     = True  Solution #8:   q2 :: Bool -> Bool -> Bool   q2 True False = True 
SBVTestSuite/GoldFiles/uiSat_test3.gold view
@@ -10,23 +10,21 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun q1 (Bool) Bool) [GOOD] (declare-fun q2 (Bool Bool) Bool)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s0 () Bool (q1 false)) [GOOD] (define-fun s1 () Bool (q2 false false)) [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- *** Checking Satisfiability, all solutions.. [GOOD] (set-option :pp.max_depth      4294967295) [GOOD] (set-option :pp.min_alias_size 4294967295)@@ -506,7 +504,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 (store ((as const Array) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) true) false true false) true true false)))+[RECV] ((q2 (store ((as const Array) false) false false true))) [GOOD] (define-fun q1_model18 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) false           true)@@ -516,9 +514,8 @@                   (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 true)) false-          (ite (and (= x!0 false) (= 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))@@ -533,20 +530,21 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) true) true false)))+[RECV] ((q1 (store ((as const Array) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) false false true)))+[RECV] ((q2 (store (store ((as const Array) false) false false true) true false true))) [GOOD] (define-fun q1_model19 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model19_reject () Bool           (exists ((x!0 Bool))                   (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 false)) true           (ite (and (= x!0 false) (= x!1 false)) true-          false)+          false))        ) [GOOD] (define-fun q2_model19_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -561,11 +559,11 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) true)))+[RECV] ((q1 ((as const Array) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) true) false true false) true true false)))+[RECV] ((q2 (store ((as const Array) true) true true false))) [GOOD] (define-fun q1_model20 ((x!0 Bool)) Bool-          true+          false        ) [GOOD] (define-fun q1_model20_reject () Bool           (exists ((x!0 Bool))@@ -573,8 +571,7 @@                             (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 false) (= x!1 true)) false-          true))+          true)        ) [GOOD] (define-fun q2_model20_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -589,19 +586,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) true)))+[RECV] ((q1 (store ((as const Array) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) false false true)))+[RECV] ((q2 (store ((as const Array) true) true true false))) [GOOD] (define-fun q1_model21 ((x!0 Bool)) Bool-          true+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model21_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model21 x!0)))) [GOOD] (define-fun q2_model21 ((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_model21_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -616,11 +614,11 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 (store ((as const Array) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) true) true true false) true false false)))+[RECV] ((q2 ((as const Array) true))) [GOOD] (define-fun q1_model22 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true+          (ite (and (= x!0 false)) true           false)        ) [GOOD] (define-fun q1_model22_reject () Bool@@ -628,9 +626,7 @@                   (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))@@ -645,20 +641,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) true) true true false) true false false)))+[RECV] ((q2 ((as const Array) true))) [GOOD] (define-fun q1_model23 ((x!0 Bool)) Bool-          false+          (ite (and (= x!0 true)) true+          false)        ) [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 true) (= x!1 false)) false-          (ite (and (= x!0 true) (= x!1 true)) false-          true))+          true        ) [GOOD] (define-fun q2_model23_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -673,21 +668,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) true) true false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) false) false false true) false true true)))+[RECV] ((q2 (store ((as const Array) 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 false) (= x!1 true)) 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))@@ -704,7 +698,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) false false false)))+[RECV] ((q2 (store (store ((as const Array) true) true true false) true false false))) [GOOD] (define-fun q1_model25 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) true           false)@@ -714,8 +708,9 @@                   (distinct (q1         x!0)                             (q1_model25 x!0)))) [GOOD] (define-fun q2_model25 ((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)) 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))@@ -732,7 +727,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) false true true)))+[RECV] ((q2 (store ((as const Array) true) false false false))) [GOOD] (define-fun q1_model26 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) true           false)@@ -742,8 +737,8 @@                   (distinct (q1         x!0)                             (q1_model26 x!0)))) [GOOD] (define-fun q2_model26 ((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_model26_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -760,7 +755,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 ((as const Array) false)))+[RECV] ((q2 (store (store ((as const Array) true) false false false) true false false))) [GOOD] (define-fun q1_model27 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) true           false)@@ -770,7 +765,9 @@                   (distinct (q1         x!0)                             (q1_model27 x!0)))) [GOOD] (define-fun q2_model27 ((x!0 Bool) (x!1 Bool)) Bool-          false+          (ite (and (= x!0 true) (= x!1 false)) false+          (ite (and (= x!0 false) (= x!1 false)) false+          true))        ) [GOOD] (define-fun q2_model27_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -787,7 +784,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) true false true)))+[RECV] ((q2 ((as const Array) false))) [GOOD] (define-fun q1_model28 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) true           false)@@ -797,8 +794,7 @@                   (distinct (q1         x!0)                             (q1_model28 x!0)))) [GOOD] (define-fun q2_model28 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) true-          false)+          false        ) [GOOD] (define-fun q2_model28_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -815,7 +811,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) false) true false true) true true true)))+[RECV] ((q2 (store ((as const Array) false) true false true))) [GOOD] (define-fun q1_model29 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) true           false)@@ -825,9 +821,8 @@                   (distinct (q1         x!0)                             (q1_model29 x!0)))) [GOOD] (define-fun q2_model29 ((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_model29_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -842,18 +837,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) false true true)))+[RECV] ((q2 (store ((as const Array) false) true 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 true)) true+          (ite (and (= x!0 true) (= x!1 true)) true           false)        ) [GOOD] (define-fun q2_model30_reject () Bool@@ -871,7 +867,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const Array) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) false false false)))+[RECV] ((q2 (store ((as const Array) false) false true true))) [GOOD] (define-fun q1_model31 ((x!0 Bool)) Bool           false        )@@ -880,8 +876,8 @@                   (distinct (q1         x!0)                             (q1_model31 x!0)))) [GOOD] (define-fun q2_model31 ((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_model31_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -923,21 +919,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 ((as const Array) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) true) false false false) true true false)))+[RECV] ((q2 (store ((as const Array) true) false false false))) [GOOD] (define-fun q1_model33 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true-          false)+          false        ) [GOOD] (define-fun q1_model33_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model33 x!0)))) [GOOD] (define-fun q2_model33 ((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))+          true)        ) [GOOD] (define-fun q2_model33_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -952,20 +946,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) true) false false false) true false false)))+[RECV] ((q2 (store ((as const Array) false) false true true))) [GOOD] (define-fun q1_model34 ((x!0 Bool)) Bool-          false+          (ite (and (= x!0 true)) true+          false)        ) [GOOD] (define-fun q1_model34_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model34 x!0)))) [GOOD] (define-fun q2_model34 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) false-          (ite (and (= x!0 false) (= x!1 false)) false-          true))+          (ite (and (= x!0 false) (= x!1 true)) true+          false)        ) [GOOD] (define-fun q2_model34_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -980,18 +974,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) false)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) false) true false true) true true true)))+[RECV] ((q2 (store (store ((as const Array) false) true false true) false true true))) [GOOD] (define-fun q1_model35 ((x!0 Bool)) Bool-          false+          (ite (and (= x!0 true)) true+          false)        ) [GOOD] (define-fun q1_model35_reject () Bool           (exists ((x!0 Bool))                   (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 false) (= x!1 true)) true           (ite (and (= x!0 true) (= x!1 false)) true           false))        )@@ -1008,19 +1003,18 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) false) false true)))+[RECV] ((q1 ((as const Array) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) true false true)))+[RECV] ((q2 (store ((as const Array) false) true true true))) [GOOD] (define-fun q1_model36 ((x!0 Bool)) Bool-          (ite (and (= x!0 false)) true-          false)+          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 false)) true+          (ite (and (= x!0 true) (= x!1 true)) true           false)        ) [GOOD] (define-fun q2_model36_reject () Bool@@ -1036,19 +1030,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) true)))+[RECV] ((q1 ((as const Array) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) true false true)))+[RECV] ((q2 (store (store ((as const Array) true) false false false) true false false))) [GOOD] (define-fun q1_model37 ((x!0 Bool)) Bool-          true+          false        ) [GOOD] (define-fun q1_model37_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model37 x!0)))) [GOOD] (define-fun q2_model37 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 false)) 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_model37_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1063,11 +1058,12 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) true)))+[RECV] ((q1 (lambda ((x!1 Bool)) x!1))) [SEND] (get-value (q2)) [RECV] ((q2 (store (store ((as const Array) false) true false true) true true true))) [GOOD] (define-fun q1_model38 ((x!0 Bool)) Bool-          true+          (ite (and (= x!0 true)) true+          false)        ) [GOOD] (define-fun q1_model38_reject () Bool           (exists ((x!0 Bool))@@ -1091,20 +1087,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) true)))+[RECV] ((q1 ((as const Array) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) true) false false false) true true false)))+[RECV] ((q2 (store (store ((as const Array) false) true false true) true true true))) [GOOD] (define-fun q1_model39 ((x!0 Bool)) Bool-          true+          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 true) (= x!1 true)) false-          (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_model39_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1119,21 +1115,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) true) true false)))+[RECV] ((q1 (store ((as const Array) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) true) false false false) true true false)))+[RECV] ((q2 (store ((as const Array) false) true false true))) [GOOD] (define-fun q1_model40 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          (ite (and (= x!0 false)) 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 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_model40_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1148,20 +1143,21 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) false)))+[RECV] ((q1 (store ((as const Array) false) false true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) true) false false false) true true false)))+[RECV] ((q2 (store (store ((as const Array) false) true false true) true true true))) [GOOD] (define-fun q1_model41 ((x!0 Bool)) Bool-          false+          (ite (and (= x!0 false)) true+          false)        ) [GOOD] (define-fun q1_model41_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model41 x!0)))) [GOOD] (define-fun q2_model41 ((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 true)) true+          (ite (and (= x!0 true) (= x!1 false)) true+          false))        ) [GOOD] (define-fun q2_model41_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1176,19 +1172,18 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) true) true false)))+[RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) false true true)))+[RECV] ((q2 (store ((as const Array) false) true false true))) [GOOD] (define-fun q1_model42 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          true        ) [GOOD] (define-fun q1_model42_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model42 x!0)))) [GOOD] (define-fun q2_model42 ((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)        ) [GOOD] (define-fun q2_model42_reject () Bool@@ -1204,12 +1199,11 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) true) true false)))+[RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) false) false true true) true true true)))+[RECV] ((q2 (store (store ((as const Array) false) true false true) true true true))) [GOOD] (define-fun q1_model43 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          true        ) [GOOD] (define-fun q1_model43_reject () Bool           (exists ((x!0 Bool))@@ -1217,7 +1211,7 @@                             (q1_model43 x!0)))) [GOOD] (define-fun q2_model43 ((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+          (ite (and (= x!0 true) (= x!1 false)) true           false))        ) [GOOD] (define-fun q2_model43_reject () Bool@@ -1233,20 +1227,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) false) false true true) true true true)))+[RECV] ((q2 (store (store ((as const Array) false) true false true) false true true))) [GOOD] (define-fun q1_model44 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true-          false)+          true        ) [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 true)) true           (ite (and (= x!0 false) (= x!1 true)) true+          (ite (and (= x!0 true) (= x!1 false)) true           false))        ) [GOOD] (define-fun q2_model44_reject () Bool@@ -1264,7 +1257,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) false true true)))+[RECV] ((q2 (store ((as const Array) true) false false false))) [GOOD] (define-fun q1_model45 ((x!0 Bool)) Bool           true        )@@ -1273,8 +1266,8 @@                   (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 true)) true-          false)+          (ite (and (= x!0 false) (= x!1 false)) false+          true)        ) [GOOD] (define-fun q2_model45_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1291,7 +1284,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) false false false)))+[RECV] ((q2 (store (store ((as const Array) false) true false true) false false true))) [GOOD] (define-fun q1_model46 ((x!0 Bool)) Bool           true        )@@ -1300,8 +1293,9 @@                   (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 false) (= x!1 false)) 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))@@ -1316,21 +1310,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) true) true false)))+[RECV] ((q1 ((as const Array) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) false) true true true) true false true)))+[RECV] ((q2 (store (store ((as const Array) true) false false false) true true false))) [GOOD] (define-fun q1_model47 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          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 false)) true-          (ite (and (= x!0 true) (= x!1 true)) true-          false))+          (ite (and (= x!0 true) (= x!1 true)) false+          (ite (and (= x!0 false) (= x!1 false)) false+          true))        ) [GOOD] (define-fun q2_model47_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1347,7 +1340,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 (store ((as const Array) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) false false false)))+[RECV] ((q2 ((as const Array) false))) [GOOD] (define-fun q1_model48 ((x!0 Bool)) Bool           (ite (and (= x!0 true)) false           true)@@ -1357,8 +1350,7 @@                   (distinct (q1         x!0)                             (q1_model48 x!0)))) [GOOD] (define-fun q2_model48 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 false) (= x!1 false)) false-          true)+          false        ) [GOOD] (define-fun q2_model48_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1373,18 +1365,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) false)))+[RECV] ((q1 (store ((as const Array) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) true true true)))+[RECV] ((q2 (store ((as const Array) false) false true true))) [GOOD] (define-fun q1_model49 ((x!0 Bool)) Bool-          false+          (ite (and (= x!0 true)) false+          true)        ) [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-          (ite (and (= x!0 true) (= x!1 true)) true+          (ite (and (= x!0 false) (= x!1 true)) true           false)        ) [GOOD] (define-fun q2_model49_reject () Bool@@ -1400,12 +1393,12 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 (store ((as const Array) true) true false))) [SEND] (get-value (q2)) [RECV] ((q2 (store ((as const Array) false) true true true))) [GOOD] (define-fun q1_model50 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true-          false)+          (ite (and (= x!0 true)) false+          true)        ) [GOOD] (define-fun q1_model50_reject () Bool           (exists ((x!0 Bool))@@ -1428,20 +1421,21 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) false) false true)))+[RECV] ((q1 (store ((as const Array) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) true true true)))+[RECV] ((q2 (store (store ((as const Array) false) true true true) false true true))) [GOOD] (define-fun q1_model51 ((x!0 Bool)) Bool-          (ite (and (= x!0 false)) true-          false)+          (ite (and (= x!0 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 false) (= x!1 true)) true           (ite (and (= x!0 true) (= x!1 true)) true-          false)+          false))        ) [GOOD] (define-fun q2_model51_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1456,19 +1450,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) true) true false)))+[RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 ((as const Array) false)))+[RECV] ((q2 (store (store ((as const Array) false) true true true) false true true))) [GOOD] (define-fun q1_model52 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          true        ) [GOOD] (define-fun q1_model52_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model52 x!0)))) [GOOD] (define-fun q2_model52 ((x!0 Bool) (x!1 Bool)) Bool-          false+          (ite (and (= x!0 false) (= x!1 true)) true+          (ite (and (= x!0 true) (= x!1 true)) true+          false))        ) [GOOD] (define-fun q2_model52_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1483,19 +1478,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) false)))+[RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) true true false)))+[RECV] ((q2 (store ((as const Array) false) false true 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)) false-          true)+          (ite (and (= x!0 false) (= x!1 true)) true+          false)        ) [GOOD] (define-fun q2_model53_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1510,20 +1505,21 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) true)))+[RECV] ((q1 (store ((as const Array) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) false) false true true) true true true)))+[RECV] ((q2 (store (store ((as const Array) true) false false false) true true false))) [GOOD] (define-fun q1_model54 ((x!0 Bool)) Bool-          true+          (ite (and (= x!0 true)) false+          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 true)) true-          (ite (and (= x!0 false) (= x!1 true)) true-          false))+          (ite (and (= x!0 true) (= x!1 true)) false+          (ite (and (= x!0 false) (= x!1 false)) false+          true))        ) [GOOD] (define-fun q2_model54_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1538,20 +1534,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) true true false)))+[RECV] ((q2 (store ((as const Array) false) true true true))) [GOOD] (define-fun q1_model55 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true-          false)+          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)) false-          true)+          (ite (and (= x!0 true) (= x!1 true)) true+          false)        ) [GOOD] (define-fun q2_model55_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1566,19 +1561,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (lambda ((x!1 Bool)) x!1)))+[RECV] ((q1 (store ((as const Array) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 ((as const Array) true)))+[RECV] ((q2 (store ((as const Array) true) false false false))) [GOOD] (define-fun q1_model56 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) true-          false)+          (ite (and (= x!0 true)) false+          true)        ) [GOOD] (define-fun q1_model56_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model56 x!0)))) [GOOD] (define-fun q2_model56 ((x!0 Bool) (x!1 Bool)) Bool-          true+          (ite (and (= x!0 false) (= x!1 false)) false+          true)        ) [GOOD] (define-fun q2_model56_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1595,7 +1591,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) false) true true true)))+[RECV] ((q2 (store ((as const Array) true) true true false))) [GOOD] (define-fun q1_model57 ((x!0 Bool)) Bool           true        )@@ -1604,8 +1600,8 @@                   (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 true)) true-          false)+          (ite (and (= x!0 true) (= x!1 true)) false+          true)        ) [GOOD] (define-fun q2_model57_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1620,20 +1616,18 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) true) true false)))+[RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) true false false)))+[RECV] ((q2 ((as const Array) 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-          (ite (and (= x!0 true) (= x!1 false)) false-          true)+          true        ) [GOOD] (define-fun q2_model58_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1648,19 +1642,19 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) true) true false)))+[RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 ((as const Array) true)))+[RECV] ((q2 (store ((as const Array) true) true false false))) [GOOD] (define-fun q1_model59 ((x!0 Bool)) Bool-          (ite (and (= x!0 true)) false-          true)+          true        ) [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-          true+          (ite (and (= x!0 true) (= x!1 false)) false+          true)        ) [GOOD] (define-fun q2_model59_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1675,18 +1669,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) true)))+[RECV] ((q1 (store ((as const Array) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 ((as const Array) true)))+[RECV] ((q2 (store ((as const Array) true) true false false))) [GOOD] (define-fun q1_model60 ((x!0 Bool)) Bool-          true+          (ite (and (= x!0 true)) false+          true)        ) [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-          true+          (ite (and (= x!0 true) (= x!1 false)) false+          true)        ) [GOOD] (define-fun q2_model60_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1701,19 +1697,20 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 ((as const Array) true)))+[RECV] ((q1 ((as const Array) false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) true true false)))+[RECV] ((q2 (store (store ((as const Array) false) false true true) false false true))) [GOOD] (define-fun q1_model61 ((x!0 Bool)) Bool-          true+          false        ) [GOOD] (define-fun q1_model61_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model61 x!0)))) [GOOD] (define-fun q2_model61 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) false-          true)+          (ite (and (= x!0 false) (= x!1 false)) true+          (ite (and (= x!0 false) (= x!1 true)) true+          false))        ) [GOOD] (define-fun q2_model61_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1728,20 +1725,21 @@ [SEND] (check-sat) [RECV] sat [SEND] (get-value (q1))-[RECV] ((q1 (store ((as const Array) false) false true)))+[RECV] ((q1 (store ((as const Array) true) true false))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) true true false)))+[RECV] ((q2 (store (store ((as const Array) false) false true true) false false true))) [GOOD] (define-fun q1_model62 ((x!0 Bool)) Bool-          (ite (and (= x!0 false)) true-          false)+          (ite (and (= x!0 true)) false+          true)        ) [GOOD] (define-fun q1_model62_reject () Bool           (exists ((x!0 Bool))                   (distinct (q1         x!0)                             (q1_model62 x!0)))) [GOOD] (define-fun q2_model62 ((x!0 Bool) (x!1 Bool)) Bool-          (ite (and (= x!0 true) (= x!1 true)) false-          true)+          (ite (and (= x!0 false) (= x!1 false)) true+          (ite (and (= x!0 false) (= x!1 true)) true+          false))        ) [GOOD] (define-fun q2_model62_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1758,7 +1756,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store ((as const Array) true) true false false)))+[RECV] ((q2 (store (store ((as const Array) true) true false false) true true false))) [GOOD] (define-fun q1_model63 ((x!0 Bool)) Bool           true        )@@ -1767,8 +1765,9 @@                   (distinct (q1         x!0)                             (q1_model63 x!0)))) [GOOD] (define-fun q2_model63 ((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)+          true))        ) [GOOD] (define-fun q2_model63_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1785,7 +1784,7 @@ [SEND] (get-value (q1)) [RECV] ((q1 ((as const Array) true))) [SEND] (get-value (q2))-[RECV] ((q2 (store (store ((as const Array) false) false true true) false false true)))+[RECV] ((q2 (store ((as const Array) false) false false true))) [GOOD] (define-fun q1_model64 ((x!0 Bool)) Bool           true        )@@ -1795,8 +1794,7 @@                             (q1_model64 x!0)))) [GOOD] (define-fun q2_model64 ((x!0 Bool) (x!1 Bool)) Bool           (ite (and (= x!0 false) (= x!1 false)) true-          (ite (and (= x!0 false) (= x!1 true)) true-          false))+          false)        ) [GOOD] (define-fun q2_model64_reject () Bool           (exists ((x!0 Bool) (x!1 Bool))@@ -1819,203 +1817,206 @@    q2 :: Bool -> Bool -> Bool   q2 False False = True -  q2 False True  = True    q2 _     _     = False Solution #2:   q1 :: Bool -> Bool   q1 _ = True    q2 :: Bool -> Bool -> Bool+  q2 True True  = False   q2 True False = False   q2 _    _     = True  Solution #3:   q1 :: Bool -> Bool-  q1 False = True -  q1 _     = False+  q1 True = False+  q1 _    = True     q2 :: Bool -> Bool -> Bool-  q2 True True = False-  q2 _    _    = True +  q2 False False = True +  q2 False True  = True +  q2 _     _     = False Solution #4:   q1 :: Bool -> Bool-  q1 _ = True+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 True True = False-  q2 _    _    = True +  q2 False False = True +  q2 False True  = True +  q2 _     _     = False Solution #5:   q1 :: Bool -> Bool-  q1 _ = True+  q1 True = False+  q1 _    = True     q2 :: Bool -> Bool -> Bool-  q2 _ _ = True+  q2 True False = False+  q2 _    _     = True  Solution #6:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True +  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 _ _ = True+  q2 True False = False+  q2 _    _     = True  Solution #7:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True +  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True False = False-  q2 _    _     = True +  q2 _ _ = True Solution #8:   q1 :: Bool -> Bool   q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True True = True -  q2 _    _    = False+  q2 True True = False+  q2 _    _    = True  Solution #9:   q1 :: Bool -> Bool-  q1 True = True -  q1 _    = False+  q1 True = False+  q1 _    = True     q2 :: Bool -> Bool -> Bool-  q2 _ _ = True+  q2 False False = False+  q2 _     _     = True  Solution #10:   q1 :: Bool -> Bool-  q1 True = True -  q1 _    = False+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True True = False-  q2 _    _    = True +  q2 True True = True +  q2 _    _    = False Solution #11:   q1 :: Bool -> Bool-  q1 _ = True+  q1 True = False+  q1 _    = True     q2 :: Bool -> Bool -> Bool-  q2 True  True = True -  q2 False True = True -  q2 _     _    = False+  q2 True  True  = False+  q2 False False = False+  q2 _     _     = True  Solution #12:   q1 :: Bool -> Bool-  q1 _ = False+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True True = False-  q2 _    _    = True +  q2 False True = True +  q2 _     _    = False Solution #13:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True +  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 _ _ = False+  q2 False True = True +  q2 True  True = True +  q2 _     _    = False Solution #14:   q1 :: Bool -> Bool-  q1 False = True -  q1 _     = False+  q1 True = False+  q1 _    = True     q2 :: Bool -> Bool -> Bool-  q2 True True = True -  q2 _    _    = False+  q2 False True = True +  q2 True  True = True +  q2 _     _    = False Solution #15:   q1 :: Bool -> Bool-  q1 True = True -  q1 _    = False+  q1 True = False+  q1 _    = True     q2 :: Bool -> Bool -> Bool   q2 True True = True    q2 _    _    = False Solution #16:   q1 :: Bool -> Bool-  q1 _ = False+  q1 True = False+  q1 _    = True     q2 :: Bool -> Bool -> Bool-  q2 True True = True -  q2 _    _    = False+  q2 False True = True +  q2 _     _    = False Solution #17:   q1 :: Bool -> Bool   q1 True = False   q1 _    = True     q2 :: Bool -> Bool -> Bool-  q2 False False = False-  q2 _     _     = True +  q2 _ _ = False Solution #18:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True +  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 True False = True -  q2 True True  = True -  q2 _    _     = False+  q2 True  True  = False+  q2 False False = False+  q2 _     _     = True  Solution #19:   q1 :: Bool -> Bool   q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 False False = False-  q2 _     _     = True +  q2 False False = True +  q2 True  False = True +  q2 _     _     = False Solution #20:   q1 :: Bool -> Bool   q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 False True = True -  q2 _     _    = False+  q2 False False = False+  q2 _     _     = True  Solution #21:   q1 :: Bool -> Bool-  q1 True = True -  q1 _    = False+  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True  True = True -  q2 False True = True -  q2 _     _    = False+  q2 False True  = True +  q2 True  False = True +  q2 _     _     = False Solution #22:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True +  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 True  True = True -  q2 False True = True -  q2 _     _    = False+  q2 True True  = True +  q2 True False = True +  q2 _    _     = False Solution #23:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True +  q1 _ = True    q2 :: Bool -> Bool -> Bool-  q2 False True = True -  q2 _     _    = False+  q2 True False = True +  q2 _    _     = False Solution #24:   q1 :: Bool -> Bool-  q1 _ = False+  q1 False = True +  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 True  True  = False-  q2 False False = False-  q2 _     _     = True +  q2 True True  = True +  q2 True False = True +  q2 _    _     = False Solution #25:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True +  q1 False = True +  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 True  True  = False-  q2 False False = False-  q2 _     _     = True +  q2 True False = True +  q2 _    _     = False Solution #26:   q1 :: Bool -> Bool-  q1 _ = True+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 True  True  = False-  q2 False False = False-  q2 _     _     = True +  q2 True True  = True +  q2 True False = True +  q2 _    _     = False Solution #27:   q1 :: Bool -> Bool-  q1 _ = True+  q1 True = True +  q1 _    = False    q2 :: Bool -> Bool -> Bool   q2 True True  = True @@ -2023,42 +2024,41 @@   q2 _    _     = False Solution #28:   q1 :: Bool -> Bool-  q1 _ = True+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 True False = True -  q2 _    _     = False+  q2 True  False = False+  q2 False False = False+  q2 _     _     = True  Solution #29:   q1 :: Bool -> Bool-  q1 False = True -  q1 _     = False+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 True False = True -  q2 _    _     = False+  q2 True True = True +  q2 _    _    = False Solution #30:   q1 :: Bool -> Bool-  q1 _ = False+  q1 True = True +  q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 True True  = True -  q2 True False = True -  q2 _    _     = False+  q2 False True  = True +  q2 True  False = True +  q2 _     _     = False Solution #31:   q1 :: Bool -> Bool-  q1 _ = False+  q1 True = True +  q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 True  False = False-  q2 False False = False-  q2 _     _     = True +  q2 False True = True +  q2 _     _    = False Solution #32:   q1 :: Bool -> Bool-  q1 True = True -  q1 _    = False+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 True  True  = False   q2 False False = False   q2 _     _     = True  Solution #33:@@ -2073,22 +2073,22 @@   q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 False False = False-  q2 _     _     = True +  q2 False True = True +  q2 _     _    = False Solution #35:   q1 :: Bool -> Bool-  q1 _ = False+  q1 True = True +  q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 False True = True -  q2 _     _    = False+  q2 True True = True +  q2 _    _    = False Solution #36:   q1 :: Bool -> Bool   q1 True = True    q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 True True  = True    q2 True False = True    q2 _    _     = False Solution #37:@@ -2097,78 +2097,77 @@   q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 True False = True -  q2 _    _     = False+  q2 _ _ = False Solution #38:   q1 :: Bool -> Bool   q1 True = True    q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 _ _ = False+  q2 True  False = False+  q2 False False = False+  q2 _     _     = True  Solution #39:   q1 :: Bool -> Bool   q1 True = True    q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 False True = True -  q2 _     _    = False+  q2 False False = False+  q2 _     _     = True  Solution #40:   q1 :: Bool -> Bool   q1 True = True    q1 _    = False    q2 :: Bool -> Bool -> Bool-  q2 False False = False-  q2 _     _     = True +  q2 True False = 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 False True  = True -  q2 False False = True -  q2 _     _     = False+  q2 True True = False+  q2 _    _    = True  Solution #42:   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 #43:   q1 :: Bool -> Bool-  q1 True = True -  q1 _    = False+  q1 False = 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+  q1 False = True +  q1 _     = False    q2 :: Bool -> Bool -> Bool-  q2 False False = True -  q2 _     _     = False+  q2 True True = False+  q2 _    _    = True  Solution #45:   q1 :: Bool -> Bool-  q1 _ = True+  q1 _ = False    q2 :: Bool -> Bool -> Bool-  q2 True  True = False-  q2 False True = False-  q2 _     _    = True +  q2 True True = False+  q2 _    _    = True  Solution #46:   q1 :: Bool -> Bool-  q1 True = False-  q1 _    = True +  q1 False = True +  q1 _     = False    q2 :: Bool -> Bool -> Bool+  q2 True  False = True    q2 False False = True    q2 _     _     = False Solution #47:@@ -2177,9 +2176,8 @@   q1 _    = True     q2 :: Bool -> Bool -> Bool-  q2 True  True = False-  q2 False True = False-  q2 _     _    = True +  q2 False False = True +  q2 _     _     = False Solution #48:   q1 :: Bool -> Bool   q1 _ = False
+ SBVTestSuite/GoldFiles/unint-axioms-empty.gold view
@@ -0,0 +1,50 @@+** 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 ALL) ; has user-defined sorts, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] (declare-sort Thing 0)  ; N.B. Uninterpreted sort.+[GOOD] (declare-fun Thing_witness () Thing)+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] (define-fun s2 () Thing Thing_witness)+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s4 () Thing)+[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)+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments ---+[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))))+[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)+[GOOD] (assert s1)+[GOOD] (assert (not s8))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:True+DONE!
SBVTestSuite/GoldFiles/unint-axioms-query.gold view
@@ -12,22 +12,20 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () B) ; tracks user variable "p" [GOOD] (declare-fun s1 () B) ; tracks user variable "q" [GOOD] (declare-fun s2 () B) ; tracks user variable "r" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (declare-fun AND (B B) B) [GOOD] (declare-fun NOT (B) B) [GOOD] (declare-fun OR (B B) B)@@ -42,16 +40,30 @@ [GOOD] (define-fun s11 () B (OR s8 s10)) [GOOD] (define-fun s12 () Bool (distinct s5 s11)) [GOOD] (assert s12)-[GOOD] ; -- user given axiom: OR distributes over AND-[GOOD] (assert (forall ((p B) (q B) (r B))-          (= (AND (OR p q) (OR p r))-             (OR p (AND q r)))))-[GOOD] ; -- user given axiom: de Morgan-[GOOD] (assert (forall ((p B) (q B))-          (= (NOT (OR p q))-             (AND (NOT p) (NOT q)))))-[GOOD] ; -- user given axiom: double negation-[GOOD] (assert (forall ((p B)) (= (NOT (NOT p)) p)))+[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))))))))+[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))))))))+[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)))))+[GOOD] (assert s15) [SEND] (check-sat) [RECV] unsat *** Solver   : Z3
+ SBVTestSuite/GoldFiles/unint-axioms.gold view
@@ -0,0 +1,52 @@+** 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 ALL) ; has user-defined sorts, using catch-all.+[GOOD] ; --- uninterpreted sorts ---+[GOOD] (declare-sort Bitstring 0)  ; N.B. Uninterpreted sort.+[GOOD] (declare-fun Bitstring_witness () Bitstring)+[GOOD] ; --- tuples ---+[GOOD] ; --- sums ---+[GOOD] ; --- literal constants ---+[GOOD] ; --- top level inputs ---+[GOOD] (declare-fun s1 () Bitstring) ; tracks user variable "p"+[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))))))))+[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)+[GOOD] (assert s3)+[GOOD] (assert s4)+[GOOD] (assert (not s6))+[SEND] (check-sat)+[RECV] unsat+*** Solver   : Z3+*** Exit code: ExitSuccess++ FINAL:True+DONE!
SBVTestSuite/GoldFiles/uninterpreted-3.gold view
@@ -10,24 +10,22 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun p () Bool) [GOOD] (declare-fun q () Bool)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/uninterpreted-3a.gold view
@@ -10,24 +10,22 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun p () Bool) [GOOD] (declare-fun q () Bool)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) *** Checking Satisfiability, all solutions.. Fast allSat, Looking for solution 1
SBVTestSuite/GoldFiles/uninterpreted-4.gold view
@@ -12,24 +12,22 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun c () Q) [GOOD] (declare-fun d () Q)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/uninterpreted-4a.gold view
@@ -12,24 +12,22 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants --- [GOOD] (declare-fun c () Q) [GOOD] (declare-fun d () Q)-[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) *** Checking Satisfiability, all solutions.. *** SBV.allSat: Uninterpreted function: c :: Q
SBVTestSuite/GoldFiles/validate_0.gold view
@@ -11,21 +11,19 @@ [ISSUE] ; --- sums --- [ISSUE] ; --- literal constants --- [ISSUE] (define-fun s1 () (_ BitVec 8) #x0a)-[ISSUE] ; --- skolem constants ---+[ISSUE] ; --- top level inputs --- [ISSUE] (declare-fun s0 () (_ BitVec 8)) ; tracks user variable "x" [ISSUE] ; --- constant tables ----[ISSUE] ; --- skolemized tables ---+[ISSUE] ; --- non-constant tables --- [ISSUE] ; --- arrays --- [ISSUE] ; --- uninterpreted constants ----[ISSUE] ; --- user given axioms ----[ISSUE] ; --- preQuantifier assignments ---+[ISSUE] ; --- user defined functions ---+[ISSUE] ; --- assignments --- [ISSUE] (define-fun s2 () Bool (bvult s0 s1)) [ISSUE] ; --- arrayDelayeds --- [ISSUE] ; --- arraySetups ----[ISSUE] ; --- formula ----[ISSUE] ; --- postQuantifier assignments --- [ISSUE] ; --- delayedEqualities ----[ISSUE] ; -- finalAssert ---+[ISSUE] ; --- formula --- [ISSUE] (assert s2) [SEND] (check-sat) [RECV] sat
SBVTestSuite/GoldFiles/validate_1.gold view
@@ -11,31 +11,29 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () RoundingMode roundTowardZero)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ FloatingPoint  8 24)) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (_ +zero 8 24)))+[RECV] ((s0 (fp #b1 #xfe #b11111111111111111111111))) *** Solver   : Z3 *** Exit code: ExitSuccess [VALIDATE] Validating the model. Assignment:-[VALIDATE]       x = 0.0 :: Float+[VALIDATE]       x = -3.4028235e38 :: Float [VALIDATE] There are no constraints to check. [VALIDATE] Validating outputs. @@ -44,7 +42,7 @@ ***  *** Assignment: *** -***       x = 0.0 :: Float+***       x = -3.4028235e38 :: Float ***  *** Not all floating point operations are supported concretely. *** @@ -54,4 +52,4 @@ *** Alleged model: *** *** Satisfiable. Model:-***   x = 0.0 :: Float+***   x = -3.4028235e38 :: Float
SBVTestSuite/GoldFiles/validate_2.gold view
@@ -11,31 +11,29 @@ [GOOD] ; --- sums --- [GOOD] ; --- literal constants --- [GOOD] (define-fun s1 () RoundingMode roundNearestTiesToEven)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ FloatingPoint  8 24)) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s3) [SEND] (check-sat) [RECV] sat [SEND] (get-value (s0))-[RECV] ((s0 (fp #b1 #x00 #b00000000000010001000111)))+[RECV] ((s0 (_ -zero 8 24))) *** Solver   : Z3 *** Exit code: ExitSuccess [VALIDATE] Validating the model. Assignment:-[VALIDATE]       x = -1.534e-42 :: Float+[VALIDATE]       x = -0.0 :: Float [VALIDATE] There are no constraints to check. [VALIDATE] Validating outputs. @@ -44,7 +42,7 @@ ***  *** Assignment: *** -***       x = -1.534e-42 :: Float+***       x = -0.0 :: Float ***  *** Floating point FMA operation is not supported concretely. *** @@ -54,4 +52,4 @@ *** Alleged model: *** *** Satisfiable. Model:-***   x = -1.534e-42 :: Float+***   x = -0.0 :: Float
SBVTestSuite/GoldFiles/validate_3.gold view
@@ -10,20 +10,19 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula ---+[GOOD] (assert false) [GOOD] (assert false) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/validate_4.gold view
@@ -10,21 +10,18 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] ; --- arrayDelayeds --- [GOOD] ; --- arraySetups ----[GOOD] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ----[GOOD] (assert false)+[GOOD] ; --- formula --- [GOOD] (assert false) [SEND] (check-sat) [RECV] unsat
SBVTestSuite/GoldFiles/validate_5.gold view
@@ -12,25 +12,23 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () Int 12) [GOOD] (define-fun s5 () Int 3)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "x" [GOOD] (declare-fun s1 () Int) ; tracks user variable "y" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (> s0 s1)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (assert s4) [GOOD] (assert s7)
SBVTestSuite/GoldFiles/validate_6.gold view
@@ -12,25 +12,23 @@ [GOOD] ; --- literal constants --- [GOOD] (define-fun s3 () Int 12) [GOOD] (define-fun s5 () Int 3)-[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () Int) ; tracks user variable "x" [GOOD] (declare-fun s1 () Int) ; tracks user variable "y" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[GOOD] ; --- user defined functions ---+[GOOD] ; --- assignments --- [GOOD] (define-fun s2 () Bool (> s0 s1)) [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] ; --- formula ----[GOOD] ; --- postQuantifier assignments --- [GOOD] ; --- delayedEqualities ----[GOOD] ; -- finalAssert ---+[GOOD] ; --- formula --- [GOOD] (assert s2) [GOOD] (assert s4) [GOOD] (assert (not s7))
SBVTestSuite/GoldFiles/validate_7.gold view
@@ -10,46 +10,51 @@ [GOOD] ; --- tuples --- [GOOD] ; --- sums --- [GOOD] ; --- literal constants ----[GOOD] ; --- skolem constants ---+[GOOD] ; --- top level inputs --- [GOOD] (declare-fun s0 () (_ FloatingPoint  8 24)) ; tracks user variable "x" [GOOD] ; --- constant tables ----[GOOD] ; --- skolemized tables ---+[GOOD] ; --- non-constant tables --- [GOOD] ; --- arrays --- [GOOD] ; --- uninterpreted constants ----[GOOD] ; --- user given axioms ----[GOOD] ; --- preQuantifier assignments ---+[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 ---+[GOOD] ; --- delayedEqualities --- [GOOD] ; --- formula ----[GOOD] (assert (forall ((s1 (_ FloatingPoint  8 24)))-       ; --- postQuantifier assignments ----                   (let ((s2 (fp.isNaN s1)))-                   (let ((s3 (fp.isInfinite s1)))-                   (let ((s4 (or s2 s3)))-                   (let ((s5 (not s4)))-                   (let ((s6 (not s5)))-                   (let ((s7 (fp.leq s0 s1)))-                   (let ((s8 (or s6 s7)))-       ; --- delayedEqualities ----       ; -- finalAssert ----                   s8)))))))))+[GOOD] (assert s1) [SEND] (check-sat) [RECV] sat-*** In a quantified context, obvservables will not be printed. [SEND] (get-value (s0)) [RECV] ((s0 (_ -oo 8 24))) *** Solver   : Z3 *** Exit code: ExitSuccess [VALIDATE] Validating the model. Assignment:-[VALIDATE]       x =                -Infinity :: Float-[VALIDATE]       y = <universally quantified> :: Float-[VALIDATE] NB. The following variable(s) are universally quantified: y-[VALIDATE]     We will assume that they are essentially zero for the purposes of validation.-[VALIDATE]     Note that this is a gross simplification of the model validation with universals!+[VALIDATE]       x = -Infinity :: Float [VALIDATE] There are no constraints to check. [VALIDATE] Validating outputs.-[VALIDATE] All outputs are satisfied. Validation complete.  FINAL OUTPUT:-Satisfiable. Model:-  x = -Infinity :: Float+*** Data.SBV: Cannot validate the model, since s1 is not concretely computable.+*** +*** Assignment:+*** +***       x = -Infinity :: Float+*** +*** The value depends on a quantified variable.+*** +*** SBV's model validator is incomplete, and cannot handle this particular case.+*** Please report this as a feature request or possibly a bug!+***+*** Alleged model:+***+*** Satisfiable. Model:+***   x = -Infinity :: Float
SBVTestSuite/SBVDocTest.hs view
@@ -13,8 +13,11 @@  module Main (main) where -import System.Process+import System.Environment(getArgs) import System.Exit(exitWith) +import System.Process+ main :: IO ()-main = exitWith =<< rawSystem "cabal-docspec" ["--timeout", "120"]+main = do args <- getArgs+          exitWith =<< rawSystem "cabal-docspec" args
SBVTestSuite/SBVHLint.hs view
@@ -13,8 +13,8 @@  module Main (main) where -import Language.Haskell.HLint (hlint)-import System.Exit (exitFailure, exitSuccess)+import System.Exit (exitWith)+import System.Process  arguments :: [String] arguments =@@ -26,7 +26,4 @@     ]  main :: IO ()-main = do hints <- hlint arguments-          if null hints-             then exitSuccess-             else exitFailure+main = exitWith =<< rawSystem "hlint" arguments
SBVTestSuite/SBVTest.hs view
@@ -31,10 +31,12 @@ import qualified TestSuite.Basics.BoundedList import qualified TestSuite.Basics.DynSign import qualified TestSuite.Basics.Exceptions+import qualified TestSuite.Basics.EqSym import qualified TestSuite.Basics.GenBenchmark import qualified TestSuite.Basics.Higher import qualified TestSuite.Basics.Index import qualified TestSuite.Basics.IteTest+import qualified TestSuite.Basics.Lambda import qualified TestSuite.Basics.List import qualified TestSuite.Basics.ModelValidate import qualified TestSuite.Basics.Nonlinear@@ -55,6 +57,7 @@ import qualified TestSuite.BitPrecise.Legato import qualified TestSuite.BitPrecise.MergeSort import qualified TestSuite.BitPrecise.PrefixSum+import qualified TestSuite.CantTypeCheck.Misc import qualified TestSuite.Char.Char import qualified TestSuite.CodeGeneration.AddSub import qualified TestSuite.CodeGeneration.CgTests@@ -139,12 +142,14 @@                       , TestSuite.Basics.BasicTests.tests                       , TestSuite.Basics.BoundedList.tests                       , TestSuite.Basics.DynSign.tests+                      , TestSuite.Basics.EqSym.tests                       , TestSuite.Basics.Exceptions.testsLocal                       , TestSuite.Basics.Exceptions.testsRemote                       , TestSuite.Basics.GenBenchmark.tests                       , TestSuite.Basics.Higher.tests                       , TestSuite.Basics.Index.tests                       , TestSuite.Basics.IteTest.tests+                      , TestSuite.Basics.Lambda.tests                       , TestSuite.Basics.List.tests                       , TestSuite.Basics.ModelValidate.tests                       , TestSuite.Basics.ModelValidate.testsABC@@ -166,6 +171,7 @@                       , TestSuite.BitPrecise.Legato.tests                       , TestSuite.BitPrecise.MergeSort.tests                       , TestSuite.BitPrecise.PrefixSum.tests+                      , TestSuite.CantTypeCheck.Misc.tests                       , TestSuite.Char.Char.tests                       , TestSuite.CodeGeneration.AddSub.tests                       , TestSuite.CodeGeneration.CgTests.tests
SBVTestSuite/TestSuite/Arrays/Memory.hs view
@@ -50,13 +50,13 @@  -- | Extensionality extensionality :: Memory -> Memory -> Predicate-extensionality m1 m2 = do i <- sbvExists_-                          return $ (readArray m1 i ./= readArray m2 i) .|| m1 .== m2+extensionality m1 m2 = pure $ quantifiedBool $ \(Exists i) ->+                          (readArray m1 i ./= readArray m2 i) .|| m1 .== m2  -- | Extensionality, second variant. Expressible for both kinds of arrays. extensionality2 :: Memory -> Memory -> Address -> Predicate-extensionality2 m1 m2 i = do j <- sbvExists_-                             return $ (readArray m1 j ./= readArray m2 j) .|| readArray m1 i .== readArray m2 i+extensionality2 m1 m2 i = pure $ quantifiedBool $ \(Exists j) ->+                             (readArray m1 j ./= readArray m2 j) .|| readArray m1 i .== readArray m2 i  -- | Merge, using memory equality to check result mergeEq :: SBool -> Memory -> Memory -> SBool
SBVTestSuite/TestSuite/Basics/AllSat.hs view
@@ -9,10 +9,11 @@ -- Test suite for basic allsat calls ----------------------------------------------------------------------------- -{-# LANGUAGE DeriveAnyClass     #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE TemplateHaskell    #-}+{-# LANGUAGE DeriveAnyClass      #-}+{-# LANGUAGE DeriveDataTypeable  #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE StandaloneDeriving  #-}+{-# LANGUAGE TemplateHaskell     #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -23,6 +24,8 @@ import Control.Monad(void) import Data.List (sortOn) +import qualified Control.Exception as C+ data Q mkUninterpretedSort ''Q @@ -34,8 +37,10 @@     , goldenVsStringShow "allSat3" $            allSat $ \x -> x .== (0::SFloat)     , goldenVsStringShow "allSat4" $            allSat $ \x -> x .<  (0::SWord8)     , goldenVsStringShow "allSat5" $ fmap srt $ allSat $ \x y -> x .< y .&& y .< (4::SWord8)-    , goldenVsStringShow "allSat6" $            allSat $ sbvExists "x" >>= \x -> sbvExists "y" >>= \y -> sbvForall "z" >>= \z -> return (x .< (y::SWord8) .&& y .< 3 .&& z .== (z::SWord8))-    , goldenCapturedIO   "allSat7" $ \rf -> void (allSatWith z3{verbose=True, redirectVerbose=Just rf} t3)+    , goldenVsStringShow "allSat6" $            allSat t3+    , goldenCapturedIO   "allSat7" $ \rf -> void (allSatWith z3{verbose=True, redirectVerbose=Just rf} t4)+    , goldenCapturedIO   "allSat8" $ \rf -> void (allSatWith z3{verbose=True, redirectVerbose=Just rf} t5)+                                            `C.catch` (\(e :: C.SomeException) -> appendFile rf ("\nEXCEPTION CAUGHT:\n" ++ show e ++ "\n"))     ]  srt :: AllSatResult -> AllSatResult@@ -52,8 +57,13 @@                  z <- free "z"                  return $ x .== (y :: SQ) .&& z .== (z :: SQ) -t3 :: Goal-t3 = do x <- sInteger "x"+t3 :: ConstraintSet+t3 = do x <- free "x"+        y <- free "y"+        constrain $ \(Forall z) -> x .< (y::SWord8) .&& y .< 3 .&& z .== (z::SWord8)++t4 :: ConstraintSet+t4 = do x <- sInteger "x"         y <- sInteger "y"         z <- sInteger "z" @@ -64,3 +74,6 @@         constrain $ z `inRange` range          constrain $ distinct [x, y, z]++t5 :: ConstraintSet+t5 = constrain $ \(Forall x) -> uninterpret "f" x .== x+(1::SInteger)
SBVTestSuite/TestSuite/Basics/ArithNoSolver.hs view
@@ -583,10 +583,12 @@                         ++ [("head",          show l,                   check1 SL.head          head          l      ) | l <- sl, not (null l)                                         ]                         ++ [("tail",          show l,                   check1 SL.tail          tail          l      ) | l <- sl, not (null l)                                         ]                         ++ [("singleton",     show i,                   check1 SL.singleton     (: [])        i      ) | i <- iUBs                                                     ]-                        ++ [("implode",       show l,                   checkI SL.implode       id            l      ) | l <- sl                                                       ])+                        ++ [("implode",       show l,                   checkI SL.implode       id            l      ) | l <- sl                                                       ]+                        ++ [("concat",        show l,                   check1 SL.concat        concat        l      ) | l <- sll                                                      ]+                       )         ++ map mkTest2 (   [("listToListAt",  show l, show i,           check2 SL.listToListAt  listToListAt  l i    ) | l <- sl, i  <- range l                                        ]                         ++ [("elemAt",        show l, show i,           check2 SL.elemAt        elemAt        l i    ) | l <- sl, i  <- range l                                        ]-                        ++ [("concat",        show l, show l1,          check2 SL.concat        (++)          l l1   ) | l <- sl, l1 <- sl                                             ]+                        ++ [("append",        show l, show l1,          check2 (SL.++)          (++)          l l1   ) | l <- sl, l1 <- sl                                             ]                         ++ [("isInfixOf",     show l, show l1,          check2 SL.isInfixOf     isInfixOf     l l1   ) | l <- sl, l1 <- sl                                             ]                         ++ [("isSuffixOf",    show l, show l1,          check2 SL.isSuffixOf    isSuffixOf    l l1   ) | l <- sl, l1 <- sl                                             ]                         ++ [("isPrefixOf",    show l, show l1,          check2 SL.isPrefixOf    isPrefixOf    l l1   ) | l <- sl, l1 <- sl                                             ]@@ -755,6 +757,10 @@ -- Lists are the worst in coverage! sl :: [[Integer]] sl = [[], [0], [-1, 1], [-10, 0, 10], [3, 4, 5, 4, 5, 3]]++-- Like wise, list of lists+sll :: [[[Integer]]]+sll = [[x, x, x] | x <- [[], [0], [-1, 1], [-10, 0, 10], [3, 4, 5, 4, 5, 3]]]  -- Lists are the worst in coverage! ssl :: [SList Integer]
SBVTestSuite/TestSuite/Basics/ArithSolver.hs view
@@ -402,7 +402,6 @@         fpProver :: SMTConfig         fpProver = z3 -- mathSAT -        fpThm :: Provable a => a -> IO Bool         fpThm = isTheoremWith fpProver          mkThmP op x r = fpThm $ do a <- free "x"@@ -523,7 +522,6 @@         fpProver :: SMTConfig         fpProver = z3 -- mathSAT -        fpThm :: Provable a => a -> IO Bool         fpThm = isTheoremWith fpProver          mkThmP op x r = fpThm $ do a <- free "x"@@ -703,24 +701,28 @@                                                        return $ literal (cop arg1 arg2 arg3) .== sop a b c  genLists :: [TestTree]-genLists = map mkTest1 (   [("length",        show l,                   mkThm1 SL.length        llen          l      ) | l <- sl                                                       ]-                        ++ [("null",          show l,                   mkThm1 SL.null          null          l      ) | l <- sl                                                       ]-                        ++ [("head",          show l,                   mkThm1 SL.head          head          l      ) | l <- sl, not (null l)                                         ]-                        ++ [("tail",          show l,                   mkThm1 SL.tail          tail          l      ) | l <- sl, not (null l)                                         ]-                        ++ [("singleton",     show i,                   mkThm1 SL.singleton     (: [])        i      ) | i <- iUBs                                                     ]-                        ++ [("implode",       show l,                   mkThmI SL.implode       id            l      ) | l <- sl                                                       ])-        ++ map mkTest2 (   [("listToListAt",  show l, show i,           mkThm2 SL.listToListAt  listToListAt  l i    ) | l <- sl, i  <- range l                                        ]-                        ++ [("elemAt",        show l, show i,           mkThm2 SL.elemAt        elemAt        l i    ) | l <- sl, i  <- range l                                        ]-                        ++ [("concat",        show l, show l1,          mkThm2 SL.concat        (++)          l l1   ) | l <- sl, l1 <- sl                                             ]-                        ++ [("isInfixOf",     show l, show l1,          mkThm2 SL.isInfixOf     isInfixOf     l l1   ) | l <- sl, l1 <- sl                                             ]-                        ++ [("isSuffixOf",    show l, show l1,          mkThm2 SL.isSuffixOf    isSuffixOf    l l1   ) | l <- sl, l1 <- sl                                             ]-                        ++ [("isPrefixOf",    show l, show l1,          mkThm2 SL.isPrefixOf    isPrefixOf    l l1   ) | l <- sl, l1 <- sl                                             ]-                        ++ [("take",          show l, show i,           mkThm2 SL.take          genericTake   i l    ) | l <- sl, i <- iUBs                                            ]-                        ++ [("drop",          show l, show i,           mkThm2 SL.drop          genericDrop   i l    ) | l <- sl, i <- iUBs                                            ]-                        ++ [("indexOf",       show l, show l1,          mkThm2 SL.indexOf       indexOf       l l1   ) | l <- sl, l1 <- sl                                             ])-        ++ map mkTest3 (   [("subList",       show l, show  i, show j,  mkThm3 SL.subList       subList       l i  j ) | l <- sl, i  <- range l, j <- range l, i + j <= genericLength l]-                        ++ [("replace",       show l, show l1, show l2, mkThm3 SL.replace       replace       l l1 l2) | l <- sl, l1 <- sl, l2 <- sl                                   ]-                        ++ [("offsetIndexOf", show l, show l1, show i,  mkThm3 SL.offsetIndexOf offsetIndexOf l l1 i ) | l <- sl, l1 <- sl, i <- range l                               ])+genLists = map mkTest1 (   [("length",        show l,                   mkThm1 SL.length        llen          l      ) | l <- sl                                                        ]+                        ++ [("null",          show l,                   mkThm1 SL.null          null          l      ) | l <- sl                                                        ]+                        ++ [("head",          show l,                   mkThm1 SL.head          head          l      ) | l <- sl, not (null l)                                          ]+                        ++ [("tail",          show l,                   mkThm1 SL.tail          tail          l      ) | l <- sl, not (null l)                                          ]+                        ++ [("singleton",     show i,                   mkThm1 SL.singleton     (: [])        i      ) | i <- iUBs                                                      ]+                        ++ [("implode",       show l,                   mkThmI SL.implode       id            l      ) | l <- sl                                                        ]+                        ++ [("concat",        show l,                   mkThm1 SL.concat        concat        l      ) | l <- sll                                                       ]+                       )+        ++ map mkTest2 (   [("listToListAt",  show l, show i,           mkThm2 SL.listToListAt  listToListAt  l i    ) | l <- sl,  i  <- range l                                        ]+                        ++ [("elemAt",        show l, show i,           mkThm2 SL.elemAt        elemAt        l i    ) | l <- sl,  i  <- range l                                        ]+                        ++ [("append",        show l, show l1,          mkThm2 (SL.++)          (++)          l l1   ) | l <- sl,  l1 <- sl                                             ]+                        ++ [("isInfixOf",     show l, show l1,          mkThm2 SL.isInfixOf     isInfixOf     l l1   ) | l <- sl,  l1 <- sl                                             ]+                        ++ [("isSuffixOf",    show l, show l1,          mkThm2 SL.isSuffixOf    isSuffixOf    l l1   ) | l <- sl,  l1 <- sl                                             ]+                        ++ [("isPrefixOf",    show l, show l1,          mkThm2 SL.isPrefixOf    isPrefixOf    l l1   ) | l <- sl,  l1 <- sl                                             ]+                        ++ [("take",          show l, show i,           mkThm2 SL.take          genericTake   i l    ) | l <- sl,  i <- iUBs                                            ]+                        ++ [("drop",          show l, show i,           mkThm2 SL.drop          genericDrop   i l    ) | l <- sl,  i <- iUBs                                            ]+                        ++ [("indexOf",       show l, show l1,          mkThm2 SL.indexOf       indexOf       l l1   ) | l <- sl,  l1 <- sl                                             ]+                       )+        ++ map mkTest3 (   [("subList",       show l, show  i, show j,  mkThm3 SL.subList       subList       l i  j ) | l <- sl,  i  <- range l, j <- range l, i + j <= genericLength l]+                        ++ [("replace",       show l, show l1, show l2, mkThm3 SL.replace       replace       l l1 l2) | l <- sl,  l1 <- sl, l2 <- sl                                   ]+                        ++ [("offsetIndexOf", show l, show l1, show i,  mkThm3 SL.offsetIndexOf offsetIndexOf l l1 i ) | l <- sl,  l1 <- sl, i <- range l                               ]+                       )   where llen :: [Integer] -> Integer         llen = fromIntegral . length @@ -852,6 +854,10 @@ -- Lists are the worst in coverage! sl :: [[Integer]] sl = [[], [0], [-1, 1], [-10, 0, 10], [3, 4, 5, 4, 5, 3]]++-- List of lists are similarly inadequate+sll :: [[[Integer]]]+sll = [[x, x, x] | x <- [[], [0], [-1, 1], [-10, 0, 10], [3, 4, 5, 4, 5, 3]]]  -- Ditto for maybe, either and tuple sm :: [Maybe Integer]
SBVTestSuite/TestSuite/Basics/BasicTests.hs view
@@ -16,7 +16,7 @@  module TestSuite.Basics.BasicTests(tests) where -import Data.SBV.Internals hiding (sbvForall, output)+import Data.SBV.Internals hiding (free, output) import Utils.SBVTestFramework  -- Test suite@@ -60,20 +60,20 @@ test1, test2, test3, test4, test5 :: (forall a. Num a => (a -> a -> a)) -> IO Result test1 f = runSAT $ do let x = literal (3 :: Word8)                           y = literal (2 :: Word8)-                      output $ f x y+                      pure $ f x y test2 f = runSAT $ do let x = literal (3 :: Word8)-                      y :: SWord8 <- sbvForall "y"-                      output $ f x y-test3 f = runSAT $ do x :: SWord8 <- sbvForall "x"-                      y :: SWord8 <- sbvForall "y"-                      output $ f x y-test4 f = runSAT $ do x :: SWord8 <- sbvForall "x"-                      output $ f x x-test5 f = runSAT $ do x :: SWord8 <- sbvForall "x"+                      y :: SWord8 <- free "y"+                      pure $ f x y+test3 f = runSAT $ do x :: SWord8 <- free "x"+                      y :: SWord8 <- free "y"+                      pure $ f x y+test4 f = runSAT $ do x :: SWord8 <- free "x"+                      pure $ f x x+test5 f = runSAT $ do x :: SWord8 <- free "x"                       let r = f x x-                      q :: SWord8 <- sbvForall "q"+                      q :: SWord8 <- free "q"                       _ <- output q-                      output r+                      pure r  f1, f2, f3, f4, f5 :: Num a => a -> a -> a f1 x y = (x+y)*(x-y)
SBVTestSuite/TestSuite/Basics/BoundedList.hs view
@@ -25,7 +25,8 @@ import qualified Data.SBV.List as L import qualified Data.SBV.Tools.BoundedList as BL -import Control.Monad.State+import Control.Monad (unless)+import Control.Monad.State (MonadState(..), State, modify, runState)  -- | Flag to mark a failed computation newtype Failure = Failure SBool
+ SBVTestSuite/TestSuite/Basics/EqSym.hs view
@@ -0,0 +1,45 @@+-----------------------------------------------------------------------------+-- |+-- Module    : TestSuite.Basics.BasicTests+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Test suite for Examples.Basics.EqSym+-----------------------------------------------------------------------------++{-# LANGUAGE DeriveAnyClass #-}+{-# LANGUAGE DeriveGeneric  #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module TestSuite.Basics.EqSym(tests) where++import Utils.SBVTestFramework++import Control.Monad (void)+import GHC.Generics++-- Test suite+tests :: TestTree+tests = testGroup "Basics.EqSym"+   [ goldenCapturedIO "check1" $ \rf -> void (isTheoremWith z3{verbose=True, redirectVerbose=Just rf} check1)+   , goldenCapturedIO "check2" $ \rf -> void (isTheoremWith z3{verbose=True, redirectVerbose=Just rf} check2)+   ]++data F = A SWord8 SWord16+       | B SBool+       deriving (Generic, EqSymbolic)++newF :: Symbolic F+newF = A <$> free_ <*> free_++check1 :: Predicate+check1 = do x <- newF+            y <- newF+            pure $ x .== y++check2 :: Predicate+check2 = do x <- newF+            pure $ x ./= x
SBVTestSuite/TestSuite/Basics/GenBenchmark.hs view
@@ -19,8 +19,9 @@ tests :: TestTree tests =   testGroup "Basics.genBenchmark"-    [ goldenString "genBenchMark1" $ gen False (\x -> x .== (x+1::SWord8))-    , goldenString "genBenchMark2" $ gen True  (\x -> x .== (x+1::SWord8))+    [ goldenString "genBenchMark1" $ gen generateSMTBenchmarkProof (\x -> x .== (x+1::SWord8))+    , goldenString "genBenchMark2" $ gen generateSMTBenchmarkSat   (\x -> x .== (x+1::SWord8))     ]-    where gen b f = -- the first line is time-stamp, get rid of it so test is repeatable-                    unlines . tail . lines <$> generateSMTBenchmark b f+    where gen generator f =+                -- the first line is time-stamp, get rid of it so test is repeatable+                unlines . tail . lines <$> generator f
SBVTestSuite/TestSuite/Basics/Index.hs view
@@ -31,10 +31,10 @@ -- prove that the "select" primitive is working correctly test1 :: Int -> IO Bool test1 n = isTheorem $ do-            elts <- mkForallVars n-            err  <- sbvForall_-            ind  <- sbvForall_-            ind2 <- sbvForall_+            elts <- mkFreeVars n+            err  <- free_+            ind  <- free_+            ind2 <- free_             let r1 = (select :: [SWord8] -> SWord8 -> SInt8 -> SWord8) elts err ind                 r2 = (select :: [SWord8] -> SWord8 -> SWord8 -> SWord8) elts err ind2                 r3 = slowSearch elts err ind@@ -46,14 +46,14 @@  test2 :: Int -> IO Bool test2 n = isTheorem $ do-            elts1 <- mkForallVars n-            elts2 <- mkForallVars n+            elts1 <- mkFreeVars n+            elts2 <- mkFreeVars n             let elts = zip elts1 elts2-            err1  <- sbvForall_-            err2  <- sbvForall_+            err1  <- free_+            err2  <- free_             let err = (err1, err2)-            ind  <- sbvForall_-            ind2 <- sbvForall_+            ind  <- free_+            ind2 <- free_             let r1 = (select :: [(SWord8, SWord8)] -> (SWord8, SWord8) -> SInt8 -> (SWord8, SWord8)) elts err ind                 r2 = (select :: [(SWord8, SWord8)] -> (SWord8, SWord8) -> SWord8 -> (SWord8, SWord8)) elts err ind2                 r3 = slowSearch elts err ind@@ -65,11 +65,11 @@  test3 :: Int -> IO Bool test3 n = isTheorem $ do-            eltsI <- mkForallVars n+            eltsI <- mkFreeVars n             let elts = map Left eltsI-            errI  <- sbvForall_+            errI  <- free_             let err = Left errI-            ind  <- sbvForall_+            ind  <- free_             let r1 = (select :: [Either SWord8 SWord8] -> Either SWord8 SWord8 -> SInt8 -> Either SWord8 SWord8) elts err ind                 r2 = slowSearch elts err ind             return $ r1 .== r2
SBVTestSuite/TestSuite/Basics/IteTest.hs view
@@ -13,8 +13,6 @@  module TestSuite.Basics.IteTest(tests)  where -import Data.SBV.Internals (Result)- import Utils.SBVTestFramework  chk1 :: (SBool -> SBool -> SBool -> SBool) -> SWord8 -> SBool@@ -30,12 +28,10 @@ tests :: TestTree tests =   testGroup "Basics.Ite"-    [ goldenVsStringShow "iteTest1" (rs (chk1 ite))-    , goldenVsStringShow "iteTest2" (rs (chk2 ite))-    , goldenVsStringShow "iteTest3" (rs (chk3 ite))+    [ testCase "iteTest1" (chk1 ite 0 `showsAs` "True")+    , testCase "iteTest2" (chk2 ite 0 `showsAs` "True")+    , testCase "iteTest3" (chk3 ite 0 `showsAs` "True")     , testCase "iteTest4" (assertIsThm (chk1 iteLazy))     , testCase "iteTest5" (assertIsThm (chk2 iteLazy))     , testCase "iteTest6" (assertIsThm (chk3 iteLazy))     ]- where rs :: (SWord8 -> SBool) -> IO Result-       rs f = runSAT $ universal ["x"] f
+ SBVTestSuite/TestSuite/Basics/Lambda.hs view
@@ -0,0 +1,346 @@+-----------------------------------------------------------------------------+-- |+-- Module    : TestSuite.Basics.Lambda+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Test lambda generation+-----------------------------------------------------------------------------++{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE DeriveAnyClass      #-}+{-# LANGUAGE DeriveDataTypeable  #-}+{-# LANGUAGE FlexibleContexts    #-}+{-# LANGUAGE OverloadedLists     #-}+{-# LANGUAGE RankNTypes          #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE StandaloneDeriving  #-}+{-# LANGUAGE TemplateHaskell     #-}+{-# LANGUAGE TypeApplications    #-}++{-# OPTIONS_GHC -Wall -Werror #-}++module TestSuite.Basics.Lambda(tests)  where++import Prelude hiding((++), map, foldl, foldr, sum, length, zip, zipWith, all, any, concat, filter)+import qualified Prelude as P++import Control.Monad (unless)+import qualified Control.Exception as C++import Data.SBV.Control+import Data.SBV.Internals hiding(free_)++import Documentation.SBV.Examples.Misc.Definitions++import Data.SBV.List+import Data.SBV.Tuple++import Data.Proxy++import Utils.SBVTestFramework++data P+mkUninterpretedSort ''P++drinker :: Predicate+drinker = pure $ quantifiedBool $ \(Exists x) (Forall y) -> d x .=> d y+  where d :: SP -> SBool+        d = uninterpret "D"++-- Test suite+tests :: TestTree+tests =+  testGroup "Basics.Lambda" $ [+        goldenCapturedIO "lambda01" $ record $ \st -> lambdaStr st (kindOf (Proxy @SInteger)) (2             :: SInteger)+      , goldenCapturedIO "lambda02" $ record $ \st -> lambdaStr st (kindOf (Proxy @SInteger)) (\x   -> x+1   :: SInteger)+      , goldenCapturedIO "lambda03" $ record $ \st -> lambdaStr st (kindOf (Proxy @SInteger)) (\x y -> x+y*2 :: SInteger)++      , goldenCapturedIO "lambda04" $ eval1 [1 .. 3 :: Integer] (map (const sFalse),  P.map (const False))+      , goldenCapturedIO "lambda05" $ eval1 [1 .. 5 :: Integer] (map (+1) . map (+2), P.map (+1) . P.map (+2))+      , goldenCapturedIO "lambda06" $ eval1 [1 .. 5 :: Integer]+                                            ( map   (\x -> P.sum [x .^ literal i | i <- [1..10 :: Integer]])+                                            , P.map (\x -> P.sum [x  ^ i         | i <- [1..10 :: Integer]])+                                            )++      , goldenCapturedIO "lambda07" $ eval1 ([[1..5], [1..10], [1..20]] :: [[Integer]])+                                            ( let sum = foldl (+) 0 in   sum .   map   sum+                                            ,                          P.sum . P.map P.sum+                                            )++      , goldenCapturedIO "lambda08" $ eval1 [1 .. 5 :: Float]   (map (+1), P.map (+1))+      , goldenCapturedIO "lambda09" $ eval1 [1 .. 5 :: Int8]    (map (+1), P.map (+1))+      , goldenCapturedIO "lambda10" $ eval1 [1 .. 5 :: Integer] (map (+1), P.map (+1))+      , goldenCapturedIO "lambda11" $ eval1 [1 .. 5 :: Word8]   (map (+1), P.map (+1))++      , goldenCapturedIO "lambda12" $ eval1 [1 .. 3 :: Integer] (map singleton, P.map (: []))++      , goldenCapturedIO "lambda13" $ eval1 [(x, y) | x <- [1..3], y <- [4..6 :: Integer]]+                                            (map (\t -> t^._1 + t^._2), P.map (uncurry (+)))++      , goldenCapturedIO "lambda14" $ eval1 [1 .. 5 :: Integer] (mapi (+) 10, P.zipWith (+) [10..])++      , goldenCapturedIO "lambda15" $ eval1 [1 .. 5 :: Integer] (foldl (+) 0, P.sum)+      , goldenCapturedIO "lambda16" $ eval1 [1 .. 5 :: Integer] (foldl (*) 1, P.product)+      , goldenCapturedIO "lambda17" $ eval1 [1 .. 5 :: Integer]+                                           (   foldl (\soFar elt -> singleton elt ++ soFar) []+                                           , P.foldl (\soFar elt ->           elt :  soFar) []+                                           )++      , goldenCapturedIO "lambda18" $ eval1 [1 .. 5 :: Integer]+                                            (   foldli (\i b a    -> i+b+a) 10 0+                                            , P.foldl  (\b (i, a) -> i+b+a)  0 . P.zip [10..]+                                            )++      , goldenCapturedIO "lambda19" $ eval1 [1 .. 5 :: Integer] (foldr (+) 0, P.foldr (+) 0)+      , goldenCapturedIO "lambda20" $ eval1 [1 .. 5 :: Integer] (foldr (*) 1, P.foldr (*) 1)+      , goldenCapturedIO "lambda21" $ eval1 [1 .. 5 :: Integer]+                                           (   foldr (\elt soFar -> soFar   ++ singleton elt) []+                                           , P.foldr (\elt soFar -> soFar P.++ [elt])         []+                                           )++      , goldenCapturedIO "lambda22" $ eval2 [1 .. 10 :: Integer] [11..20 :: Integer] (zip, P.zip)+      , goldenCapturedIO "lambda23" $ eval2 [1 .. 10 :: Integer] [10, 9 .. 1 :: Integer]+                                            ( \a b ->   foldr (+) 0 (  map (\t -> t^._1+t^._2::SInteger) (  zip a b))+                                            , \a b -> P.foldr (+) 0 (P.map (\t -> fst t+snd t::Integer ) (P.zip a b))+                                            )+      , goldenCapturedIO "lambda24" $ eval2 [1 .. 10 :: Integer] [11..20 :: Integer] (zipWith (+), P.zipWith (+))+      , goldenCapturedIO "lambda25" $ eval2 [1 .. 10 :: Integer] [10, 9 .. 1 :: Integer]+                                            ( \a b ->   foldr (+) 0 (  zipWith (+) a b)+                                            , \a b -> P.foldr (+) 0 (P.zipWith (+) a b)+                                            )++      , goldenCapturedIO "lambda26" $ eval1 ([[1..5], [1..10], [1..20]] :: [[Integer]]) (concat, P.concat)++      , goldenCapturedIO "lambda27" $ eval1 [2, 4, 6,    8, 10 :: Integer] (all (\x -> x `sMod` 2 .== 0), P.all (\x -> x `mod` 2 == 0))+      , goldenCapturedIO "lambda28" $ eval1 [2, 4, 6, 1, 8, 10 :: Integer] (all (\x -> x `sMod` 2 .== 0), P.all (\x -> x `mod` 2 == 0))++      , goldenCapturedIO "lambda29" $ eval1 [2, 4, 6,    8, 10 :: Integer] (any (\x -> x `sMod` 2 ./= 0), P.any (\x -> x `mod` 2 /= 0))+      , goldenCapturedIO "lambda30" $ eval1 [2, 4, 6, 1, 8, 10 :: Integer] (any (\x -> x `sMod` 2 .== 0), P.any (\x -> x `mod` 2 == 0))++      , goldenCapturedIO "lambda31" $ eval1 [1 .. 10 :: Integer] (filter (\x -> x `sMod` 2 .== 0), P.filter (\x -> x `mod` 2 == 0))+      , goldenCapturedIO "lambda32" $ eval1 [1 .. 10 :: Integer] (filter (\x -> x `sMod` 2 ./= 0), P.filter (\x -> x `mod` 2 /= 0))++      , goldenCapturedIO "lambda33" $ record $ \st -> lambdaStr st (kindOf (Proxy @SInt8)) (0           :: SInt8)+      , goldenCapturedIO "lambda34" $ record $ \st -> lambdaStr st (kindOf (Proxy @SInt8)) (\x   -> x+1 :: SInt8)+      , goldenCapturedIO "lambda35" $ record $ \st -> lambdaStr st (kindOf (Proxy @SInt8)) (\x y -> x+y :: SInt8)++      , goldenCapturedIO "lambda36" $ record $ \st -> constraintStr st $ \(Forall (_ :: SBool))  -> sTrue+      , goldenCapturedIO "lambda37" $ record $ \st -> constraintStr st $ \(Forall b)             -> sNot b+      , goldenCapturedIO "lambda38" $ record $ \st -> constraintStr st $ \(Forall x) (Forall y) -> x .== (0 :: SInteger) .|| y++      , goldenCapturedIO "lambda40" $ record $ \st -> namedLambdaStr st "lambda40" (kindOf (Proxy @SInteger)) (0           :: SInteger)+      , goldenCapturedIO "lambda41" $ record $ \st -> namedLambdaStr st "lambda41" (kindOf (Proxy @SInteger)) (\x   -> x+1 :: SInteger)+      , goldenCapturedIO "lambda42" $ record $ \st -> namedLambdaStr st "lambda42" (kindOf (Proxy @SInteger)) (\x y -> x+y :: SInteger)++      , goldenCapturedIO "lambda43" $ record $ \st -> namedLambdaStr st "lambda43" (kindOf (Proxy @SWord32)) (0           :: SWord32)+      , goldenCapturedIO "lambda44" $ record $ \st -> namedLambdaStr st "lambda44" (kindOf (Proxy @SWord32)) (\x   -> x+1 :: SWord32)+      , goldenCapturedIO "lambda45" $ record $ \st -> namedLambdaStr st "lambda45" (kindOf (Proxy @SWord32)) (\x y -> x+y :: SWord32)++      , goldenCapturedIO "lambda46" $ runSat ((.== 5) . add1)++      , goldenCapturedIO "lambda47"   $ runSat2 (\a r -> a .== 5 .&& sumToN a .== r)+      , goldenCapturedIO "lambda47_c" $ runSat  (sumToN 5 .==)++      , goldenCapturedIO "lambda48"   $ runSat2 (\a r -> a .== [1,2,3::Integer] .&& len a .== r)+      , goldenCapturedIO "lambda48_c" $ runSat  (len [1,2,3::Integer] .==)++      , goldenCapturedIO "lambda49"   $ runSat2 (\a r -> a .== 20 .&& isEven a .== r)+      , goldenCapturedIO "lambda49_c" $ runSat  (isEven 20 .==)++      , goldenCapturedIO "lambda50"   $ runSat2 (\a r -> a .== 21 .&& isEven a .== r)+      , goldenCapturedIO "lambda50_c" $ runSat  (isEven 21 .==)++      , goldenCapturedIO "lambda51"   $ runSat2 (\a r -> a .== 20 .&& isOdd  a .== r)+      , goldenCapturedIO "lambda51_c" $ runSat  (isOdd  20 .==)++      , goldenCapturedIO "lambda52"   $ runSat2 (\a r -> a .== 21 .&& isOdd  a .== r)+      , goldenCapturedIO "lambda52_c" $ runSat  (isOdd  21 .==)++      , goldenCapturedIO "lambda53" $ runSat $ \x -> x .== smtFunction "foo" (+(x::SInteger)) x++      -- Make sure we can handle dependency orders+      , goldenCapturedIO "lambda54" $ runSat   $ \x -> let foo = smtFunction "foo" (\a -> bar a + 1)+                                                           bar = smtFunction "bar" (+1)+                                                       in bar x + foo x .== (x :: SInteger)+      , goldenCapturedIO "lambda55" $ runSat   $ \x -> let foo = smtFunction "foo" (\a -> bar a + 1)+                                                           bar = smtFunction "bar" (+1)+                                                       in foo x + bar x .== (x :: SInteger)+      , goldenCapturedIO "lambda56" $ runUnsat $ \x -> let foo = smtFunction "foo" (\a -> bar a + 1)+                                                           bar = smtFunction "bar" (\a -> foo a + 1)+                                                       in foo x + bar x .== (x :: SInteger)+      , goldenCapturedIO "lambda57" $ runSat   $ \x -> let f1 = smtFunction "f1" (\a -> ite (a .== 0) 0 (1 + (f1 (a-1) + f2 (a-2))))+                                                           f2 = smtFunction "f2" (\a -> ite (a .== 0) 0 (1 + (f2 (a-1) + f3 (a-2))))+                                                           f3 = smtFunction "f3" (\a -> ite (a .== 0) 0 (1 + (f3 (a-1) + f4 (a-2))))+                                                           f4 = smtFunction "f4" (\a -> ite (a .== 0) 0 (1 + (f4 (a-1) + f1 (a-2))))+                                                       in f1 x .== (x :: SWord8)++      -- Quantified axioms+      , goldenCapturedIO "lambda58" $ record $ \st -> constraintStr st $ \(Forall b) (Exists c) -> sNot b .|| c+      , goldenCapturedIO "lambda59" $ record $ \st -> constraintStr st $ \(Forall x) (Exists y) -> x .== (0 :: SInteger) .|| y++      , goldenCapturedIO "lambda60" $ runAxSat   $ constrain $ \(Forall x) (Exists y) (Exists z) -> y .> (x+z :: SInteger)+      , goldenCapturedIO "lambda61" $ runAxUnsat $ constrain $ \(Forall x) (Exists y) -> y .> (x :: SWord8)++      -- Quantified booleans+      , goldenCapturedIO "lambda62" $ \rf -> do m <- proveWith z3{verbose=True, redirectVerbose=Just rf} drinker+                                                appendFile rf ("\nRESULT:\n" P.++ show m P.++ "\n")+                                                `C.catch` (\(e :: C.SomeException) -> appendFile rf ("\nEXCEPTION CAUGHT:\n" P.++ show e P.++ "\n"))++      -- Special relations (kind of lambda related)+      , goldenCapturedIO "lambda63" $ runP $         quantifiedBool (\(Forall x) -> rel (x, x))+      , goldenCapturedIO "lambda64" $ runP $ po  .=> quantifiedBool (\(Forall x) -> rel (x, x))+      , goldenCapturedIO "lambda65" $ runP $ poI .=> quantifiedBool (\(Forall x) -> leq (x, x))+      , goldenCapturedIO "lambda66" $ runP $ let u   = uninterpret "U" :: Relation Integer+                                                 tcU = mkTransitiveClosure "tcU" u+                                             in quantifiedBool (\(Forall x) (Forall y) (Forall z)+                                                                     -> (u (x, y) .&& u (y, z)) .=> tcU (x, z))++      , goldenCapturedIO "lambda67" $ runP $ let u   = uninterpret "U" :: Relation Word8+                                                 tcU = mkTransitiveClosure "tcU" u+                                             in quantifiedBool (\(Forall x) (Forall y) (Forall z)+                                                                     -> (u (x, y) .&& u (y, z)) .=> tcU (x, z))++      -- Not really lambda related, but kind of fits in here+      , goldenCapturedIO "lambda68" $ runS $ \(Forall x) -> uninterpret "F" x .== 2*x+(3::SInteger)+      , goldenCapturedIO "lambda69" $ runS $ \(Forall x) (Forall y) -> uninterpret "F" x y .== 2*x+(3-y::SInteger)++      -- Most skolems are tested inline, here's a fancy one!+      , goldenCapturedIO "lambda70" $+                let phi :: ExistsUnique "x" Integer -> SBool+                    phi (ExistsUnique  x) = x .== 0 .|| x .== 1++                    nPhi :: Forall "x" Integer -> Exists "x_eu1" Integer -> Exists "x_eu2" Integer -> SBool+                    nPhi = qNot phi++                    snPhi :: Forall "x" Integer -> SBool+                    snPhi = skolemize nPhi+                in runS snPhi+      ]+   P.++ qc1 "lambdaQC1" P.sum (foldr (+) (0::SInteger))+   P.++ qc2 "lambdaQC2" (+)  (smtFunction "sadd" ((+) :: SInteger -> SInteger -> SInteger))+   P.++ qc1 "lambdaQC3" (\n -> let pn = abs n in (pn * (pn+1)) `sDiv` 2)+                        (let ssum = smtFunction "ssum" $ \(n :: SInteger) -> let pn = abs n in ite (pn .== 0) 0 (pn + ssum (pn - 1)) in ssum)+  where rel, leq :: Relation Integer+        rel = uninterpret "R"+        leq = uncurry $ smtFunction "leq" (.<=)+        po  = isPartialOrder "poR" rel+        poI = isPartialOrder "poI" leq++        record :: (State -> IO String) -> FilePath -> IO ()+        record gen rf = do st <- mkNewState defaultSMTCfg (LambdaGen 0)+                           appendFile rf . (P.++ "\n") =<< gen st++        runP b rf = runGen proveWith b rf+        runS b rf = runGen satWith   b rf+        runGen a b rf = do m <- a z3{verbose=True, redirectVerbose=Just rf} b+                           appendFile rf ("\nRESULT:\n" P.++ show m P.++ "\n")++        runSat   f = runSatExpecting f Sat+        runUnsat f = runSatExpecting f Unsat++        runAxSat   f = runSatAxExpecting f Sat+        runAxUnsat f = runSatAxExpecting f Unsat++        runSatAxExpecting f what rf = do m <- runSMTWith z3{verbose=True, redirectVerbose=Just rf} run+                                         appendFile rf ("\nRESULT:\n" P.++ m P.++ "\n")+                                         `C.catch` (\(e :: C.SomeException) -> appendFile rf ("\nEXCEPTION CAUGHT:\n" P.++ show e P.++ "\n"))+           where run = do _ <- f+                          query $ do cs <- checkSat+                                     if cs /= what+                                        then error $ "Unexpected output: " P.++ show cs+                                        else if cs == Sat+                                                then showModel z3 <$> getModel+                                                else pure $ "All good, expecting: " P.++ show cs++        runSatExpecting f what rf = do m <- runSMTWith z3{verbose=True, redirectVerbose=Just rf} run+                                       appendFile rf ("\nRESULT:\n" P.++ m P.++ "\n")+                                       `C.catch` (\(e :: C.SomeException) -> appendFile rf ("\nEXCEPTION CAUGHT:\n" P.++ show e P.++ "\n"))+           where run = do arg <- free_+                          constrain $ f arg+                          query $ do arg2 <- freshVar_+                                     constrain $ f arg2+                                     cs <- checkSat+                                     if cs /= what+                                        then error $ "Unexpected output: " P.++ show cs+                                        else if cs == Sat+                                                then showModel z3 <$> getModel+                                                else pure $ "All good, expecting: " P.++ show cs++        runSat2 f rf = do m <- runSMTWith z3{verbose=True, redirectVerbose=Just rf} run+                          appendFile rf ("\nRESULT:\n" P.++ showModel z3 m P.++ "\n")+           where run = do arg1 <- free_+                          arg2 <- free_+                          constrain $ f arg1 arg2+                          query $ do arg3 <- freshVar_+                                     arg4 <- freshVar_+                                     constrain $ f arg3 arg4+                                     cs <- checkSat+                                     case cs of+                                       Sat -> getModel+                                       _   -> error $ "Unexpected output: " P.++ show cs++eval1 :: (SymVal a, SymVal b, Show a, Show b, Eq b) => a -> (SBV a -> SBV b, a -> b) -> FilePath -> IO ()+eval1 cArg (sFun, cFun) rf = do m <- runSMTWith z3{verbose=True, redirectVerbose=Just rf} run+                                appendFile rf ("\nRESULT:\n" P.++ showModel z3 m P.++ "\n")++ where run = do arg <- free_+                res <- free_+                constrain $ arg .== literal cArg+                constrain $ res .== sFun arg++                let concResult = cFun cArg++                query $ do+                  cs <- checkSat+                  case cs of+                    Sat -> do resV <- getValue res+                              unless (resV == concResult) $+                                  error $ unlines [ "Bad output:"+                                                  , "  arg      = " P.++ show cArg+                                                  , "  concrete = " P.++ show concResult+                                                  , "  symbolic = " P.++ show resV+                                                  ]+                              getModel+                    _ -> error $ "Unexpected output: " P.++ show cs++eval2 :: (SymVal a, SymVal b, SymVal c, Eq c, Show a, Show b, Show c) => a -> b -> (SBV a -> SBV b -> SBV c, a -> b -> c) -> FilePath -> IO ()+eval2 cArg1 cArg2 (sFun, cFun) rf = do m <- runSMTWith z3{verbose=True, redirectVerbose=Just rf} run+                                       appendFile rf ("\nRESULT:\n" P.++ showModel z3 m P.++ "\n")++ where run = do arg1 <- free_+                arg2 <- free_+                res <- free_+                constrain $ arg1 .== literal cArg1+                constrain $ arg2 .== literal cArg2+                constrain $ res  .== sFun arg1 arg2++                let concResult = cFun cArg1 cArg2++                query $ do+                  cs <- checkSat+                  case cs of+                    Sat -> do resV <- getValue res+                              unless (resV == concResult) $+                                  error $ unlines [ "Bad output:"+                                                  , "  arg1     = " P.++ show cArg1+                                                  , "  arg2     = " P.++ show cArg2+                                                  , "  concrete = " P.++ show concResult+                                                  , "  symbolic = " P.++ show resV+                                                  ]+                              getModel+                    _ -> error $ "Unexpected output: " P.++ show cs+++{-# ANN module ("HLint: ignore Use map once"   :: String) #-}+{-# ANN module ("HLint: ignore Use sum"        :: String) #-}+{-# ANN module ("HLint: ignore Fuse foldr/map" :: String) #-}+{-# ANN module ("HLint: ignore Use zipWith"    :: String) #-}+{-# ANN module ("HLint: ignore Use uncurry"    :: String) #-}+{-# ANN module ("HLint: ignore Use even"       :: String) #-}+{-# ANN module ("HLint: ignore Use odd"        :: String) #-}+{-# ANN module ("HLint: ignore Use product"    :: String) #-}+{-# ANN module ("HLint: ignore Avoid lambda"   :: String) #-}+{-# ANN module ("HLint: ignore Eta reduce"     :: String) #-}
SBVTestSuite/TestSuite/Basics/ModelValidate.hs view
@@ -25,7 +25,7 @@ testsABC = testGroup "Basics.ModelValidate.ABC" [              goldenCapturedIO "validate_0" testABC            ]-    where testABC goldFile = do r <- satWith abc{verbose=True, redirectVerbose = Just goldFile, validateModel = True} $ existential ["x"] $ \x -> x .< (10::SWord8)+    where testABC goldFile = do r <- satWith abc{verbose=True, redirectVerbose = Just goldFile, validateModel = True} (free "x" >>= \x -> pure $ x .< (10::SWord8))                                 appendFile goldFile ("\nFINAL OUTPUT:\n" ++ show r ++ "\n")  tests :: TestTree@@ -46,18 +46,22 @@                                `C.catch` (\(e::C.SomeException) -> appendFile goldFile ("\nEXCEPTION RAISED:\n" ++ pick (show e) ++ "\n"))               where pick s = unlines [l | l <- lines s, "***" `isPrefixOf` l] -          t1 = existential ["x"] $ \x -> fpAdd sRTZ x x   .== (x::SFloat)-          t2 = existential ["x"] $ \x -> fpFMA sRNE x x x .== (x::SFloat)+          t1, t2 :: Predicate+          t1 = free "x" >>= \x -> pure $ fpAdd sRTZ x x   .== (x::SFloat)+          t2 = free "x" >>= \x -> pure $ fpFMA sRNE x x x .== (x::SFloat) +          t3 :: Predicate           t3 = do x <- sInteger "x"-                  constrain $ x .> x+                  constrain $ x .> x   -- Constraining with False! i.e., any theorem will follow, and will be trivially unsat+                  pure sFalse +          t4 :: Predicate           t4 = do x <- sInteger "x"                   y <- sInteger "y"                   constrain $ x .> y                   constrain $ x .> 12                   return $ x .== y+3 -          t5 = do x <- sbvExists "x"-                  y <- sbvForall "y"-                  return $ fpIsPoint y .=> x .<= (y::SFloat)+          t5 :: Predicate+          t5 = do x <- free "x"+                  pure $ quantifiedBool $ \(Forall y) -> fpIsPoint y .=> x .<= (y::SFloat)
SBVTestSuite/TestSuite/Basics/Nonlinear.hs view
@@ -19,7 +19,8 @@ tests :: TestTree tests = testGroup "Basics.Nonlinear" [           goldenCapturedIO "nonlinear_z3"   $ check z3-        , goldenCapturedIO "nonlinear_cvc4" $ check cvc5+        , goldenCapturedIO "nonlinear_cvc4" $ check cvc4+        , goldenCapturedIO "nonlinear_cvc5" $ check cvc5         ]     where check s gf = do r <- satWith s{verbose = True, redirectVerbose = Just gf} f                           appendFile gf ("\nFINAL:\n" ++ show r ++ "\nDONE!\n")
SBVTestSuite/TestSuite/Basics/ProofTests.hs view
@@ -18,20 +18,20 @@ tests :: TestTree tests =   testGroup "Basics.Proof"-    [ testCase "proofs-1" (assertIsThm f1eqf2)+    [ testCase "proofs-1" (assertIsThm   f1eqf2)     , testCase "proofs-2" (assertIsntThm f1eqf3)-    , testCase "proofs-3" (assertIsThm f3eqf4)-    , testCase "proofs-4" (assertIsThm f1Single)-    , testCase "proofs-5" (assertIsSat (f1 `xyEq` f2))-    , testCase "proofs-6" (assertIsSat (f1 `xyEq` f3))-    , testCase "proofs-7" (assertIsntSat (sbvExists "x" >>= \x -> return (x .== x + (1 :: SWord16))))-    , testCase "proofs-8" (assertIsSat (sbvExists "x" >>= \x -> return (x :: SBool)))-    , testCase "proofs-9" (assertIsSat (sbvExists "x" >>= \x -> return x :: Predicate))+    , testCase "proofs-3" (assertIsThm   f3eqf4)+    , testCase "proofs-4" (assertIsThm   f1Single)+    , testCase "proofs-5" (assertIsSat   (f1 `xyEq` f2))+    , testCase "proofs-6" (assertIsSat   (f1 `xyEq` f3))+    , testCase "proofs-7" (assertIsntSat (free "x" >>= \x -> return (x .== x + (1 :: SWord16))))+    , testCase "proofs-8" (assertIsSat   (free "x" >>= \x -> return (x :: SBool)))+    , testCase "proofs-9" (assertIsSat   (free "x" >>= \x -> return x :: Predicate))     ]  xyEq :: (EqSymbolic a, SymVal a1) => (SBV a1 -> SBV Word8 -> a) -> (SBV a1 -> SWord8 -> a) -> Symbolic SBool-func1 `xyEq` func2 = do x <- sbvExists_-                        y <- sbvExists_+func1 `xyEq` func2 = do x <- free_+                        y <- free_                         return $ func1 x y .== func2 x (y :: SWord8)  f1, f2, f3, f4 :: Num a => a -> a -> a@@ -41,13 +41,13 @@ f4 x y = x*x + 2*x*y + y*y  f1eqf2 :: Predicate-f1eqf2 = universal_ $ \x y -> f1 x y .== f2 x (y :: SWord8)+f1eqf2 = pure $ quantifiedBool $ \(Forall x) (Forall y) -> f1 x y .== f2 x (y :: SWord8)  f1eqf3 :: Predicate-f1eqf3 = universal ["x", "y"] $ \x y -> f1 x y .== f3 x (y :: SWord8)+f1eqf3 = pure $ quantifiedBool $ \(Forall x) (Forall y) -> f1 x y .== f3 x (y :: SWord8)  f3eqf4 :: Predicate-f3eqf4 = universal_ $ \x y -> f3 x y .== f4 x (y :: SWord8)+f3eqf4 = pure $ quantifiedBool $ \(Forall x) (Forall y) -> f3 x y .== f4 x (y :: SWord8)  f1Single :: Predicate-f1Single = universal_ $ \x -> f1 x x .== (0 :: SWord16)+f1Single = pure $ quantifiedBool $ \(Forall x) -> f1 x x .== (0 :: SWord16)
SBVTestSuite/TestSuite/Basics/Quantifiers.hs view
@@ -9,7 +9,10 @@ -- Various combinations of quantifiers ----------------------------------------------------------------------------- -{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE FlexibleContexts    #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeApplications    #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -19,34 +22,65 @@  import Utils.SBVTestFramework +data Q = E  -- exists+       | A  -- all++instance Show Q where+   show E = "exists"+   show A = "forall"+ tests :: TestTree-tests = testGroup "Basics.Quantifiers" $ concatMap mkGoal goals ++ concatMap mkPred preds+tests = testGroup "Basics.Quantifiers" $ concatMap mkGoal goals ++ concatMap mkPred preds ++ others    where mkGoal (g, nm) = [ goldenCapturedIO ("quantified_sat"   ++ "_" ++ nm) $ \rf -> void $ satWith   z3{verbose=True, redirectVerbose=Just rf} g-                          , goldenCapturedIO ("quantified_prove" ++ "_" ++ nm) $ \rf -> void $ proveWith z3{verbose=True, redirectVerbose=Just rf} g                           ]          mkPred (p, nm) = [ goldenCapturedIO ("quantified_sat"   ++ "_" ++ nm) $ \rf -> void $ satWith   z3{verbose=True, redirectVerbose=Just rf} p                           , goldenCapturedIO ("quantified_prove" ++ "_" ++ nm) $ \rf -> void $ proveWith z3{verbose=True, redirectVerbose=Just rf} p                           ] -         qs   = [(sbvExists, "exists"), (sbvForall, "forall")]+         others = [ goldenCapturedIO "quantifiedB_0" $ check $ \(ExistsN @4 xs)   -> sAll (.< (20 :: SWord8)) xs .&& sum (1 : xs) .== (0::SWord8)+                  , goldenCapturedIO "quantifiedB_1" $ check $ \(ExistsN @4 xs)   -> sum xs .== (0::SWord8)+                  , goldenCapturedIO "quantifiedB_2" $ check $ \k (ForallN @4 xs) -> sum xs .== (k::SWord8)+                  , goldenCapturedIO "quantifiedB_3" $ check $ \k (ExistsN @4 xs) -> sum xs .== (k::SWord8)+                  , goldenCapturedIO "quantifiedB_4" $ check $ \(ExistsN @4 xs) (Exists k) -> sum xs .== (k::SWord8)+                  , goldenCapturedIO "quantifiedB_5" $ check $ \(ExistsN @4 xs) (Forall k) -> sum xs .== (k::SWord8)+                  , goldenCapturedIO "quantifiedB_6" $ check $ quantifiedBool (quantifiedBool (\(Exists (x::SBool)) -> x) )+                  , goldenCapturedIO "quantifiedB_7" $ check $ \(Exists (x :: SBool)) -> quantifiedBool (quantifiedBool (\(Exists (y::SBool)) -> x .|| y) )+                  , goldenCapturedIO "quantifiedB_8" $ check $ \(Exists (x :: SBool)) -> quantifiedBool (\(Exists (y::SBool)) -> x .|| y)+                  , goldenCapturedIO "quantifiedB_9" $ check $ quantifiedBool $ \(Exists (x :: SBool)) -> quantifiedBool (\(Exists (y::SBool)) -> x .|| y)+                  , goldenCapturedIO "quantifiedB_A" $ check $ \(Exists a) (Forall b) (Exists c) (Forall d) ->  a + b + c + d .== (0::SInteger)+                  , goldenCapturedIO "quantifiedB_B" $ check $ \(Forall a) (Exists b) (Forall c) (Exists d) ->  a + b + c + d .== (0::SInteger)+                  ]+           where check p rf = do res <- satWith z3{verbose=True, redirectVerbose=Just rf} p+                                 appendFile rf $ "\nRESULT: "  ++ show res ++ "\n" +         qs   = [E, A]+          acts = [ (\x y -> x + (y - x) .== y  , "thm")                 , (\x y -> x .== y .&& x ./= y, "contradiction")                 , (\x y -> x .== y + 1        , "satisfiable")                 ] -         goals = [(t1 q1 q2 a, nq1 ++ nq2 ++ "_" ++ an ++ "_c") | (q1, nq1) <- qs-                                                                , (q2, nq2) <- qs-                                                                , (a,  an)  <- acts ]+         goals = [(t1 q1 q2 a, show q1 ++ show q2 ++ "_" ++ an ++ "_c") | q1      <- qs+                                                                        , q2      <- qs+                                                                        , (a, an) <- acts+                                                                        ] -         preds = [(t2 q1 q2 a, nq1 ++ nq2 ++ "_" ++ an ++ "_p") | (q1, nq1) <- qs-                                                                , (q2, nq2) <- qs-                                                                , (a,  an)  <- acts ]+         preds = [(t2 q1 q2 a, show q1 ++ show q2 ++ "_" ++ an ++ "_p") | q1       <- qs+                                                                        , q2       <- qs+                                                                        , (a, an)  <- acts+                                                                        ] -         t1 :: (String -> Symbolic SWord8) -> (String -> Symbolic SWord8) -> (SWord8 -> SWord8 -> SBool) -> Goal-         t1 q1 q2 act = q1 "x" >>= \x -> q2 "y" >>= \y -> constrain $ act x y+         t1 :: Q -> Q -> (SWord8 -> SWord8 -> SBool) -> ConstraintSet+         t1 E E act = constrain $ \(Exists x) (Exists y) -> act x y+         t1 E A act = constrain $ \(Exists x) (Forall y) -> act x y+         t1 A E act = constrain $ \(Forall x) (Exists y) -> act x y+         t1 A A act = constrain $ \(Forall x) (Forall y) -> act x y -         t2 :: (String -> Symbolic SWord8) -> (String -> Symbolic SWord8) -> (SWord8 -> SWord8 -> SBool) -> Predicate-         t2 q1 q2 act = q1 "x" >>= \x -> q2 "y" >>= \y -> return    $ act x y+         t2 :: Q -> Q -> (SWord8 -> SWord8 -> SBool) -> Predicate+         t2 E E act = pure $ quantifiedBool $ \(Exists x) (Exists y) -> act x y+         t2 E A act = pure $ quantifiedBool $ \(Exists x) (Forall y) -> act x y+         t2 A E act = pure $ quantifiedBool $ \(Forall x) (Exists y) -> act x y+         t2 A A act = pure $ quantifiedBool $ \(Forall x) (Forall y) -> act x y -{-# ANN module ("HLint: ignore Reduce duplication" :: String) #-}+{-# ANN module ("HLint: ignore Reduce duplication"     :: String) #-}+{-# ANN module ("HLint: ignore Unused LANGUAGE pragma" :: String) #-}
SBVTestSuite/TestSuite/Basics/Set.hs view
@@ -165,7 +165,7 @@ setOfTuples :: SMTConfig -> IO SatResult setOfTuples cfg = satWith cfg $ do     let x = tuple (empty :: SSet Bool, empty :: SSet Bool)-    y <- sbvExists_+    y <- free_     return $ x ./= y  {-# ANN module ("HLint: ignore Reduce duplication" :: String) #-}
SBVTestSuite/TestSuite/Basics/UISat.hs view
@@ -33,7 +33,7 @@             , isNonModelVar       = (`elem` ["nx", "ny", "nz"])             } -checkWith :: FilePath -> Goal -> IO ()+checkWith :: FilePath -> ConstraintSet -> IO () checkWith rf prop = do r <- allSatWith (cfg rf) prop                        appendFile rf $ "\nRESULT: " ++ show r @@ -43,15 +43,15 @@ q2 :: SBool -> SBool -> SBool q2 = uninterpret "q2" -test1 :: Goal+test1 :: ConstraintSet test1 = do setLogic Logic_ALL            registerUISMTFunction q1 -test2 :: Goal+test2 :: ConstraintSet test2 = do setLogic Logic_ALL            registerUISMTFunction q2 -test3 :: Goal+test3 :: ConstraintSet test3 = do setLogic Logic_ALL            registerUISMTFunction q1            registerUISMTFunction q2
SBVTestSuite/TestSuite/BitPrecise/Legato.hs view
@@ -32,7 +32,7 @@                        regA  <- free "regA"                        flagC <- free "flagC"                        flagZ <- free "flagZ"-                       output $ legatoIsCorrect (x, y, lo, regX, regA, flagC, flagZ)+                       pure $ legatoIsCorrect (x, y, lo, regX, regA, flagC, flagZ)         thd (_, _, r) = r 
SBVTestSuite/TestSuite/CRC/CCITT.hs view
@@ -27,7 +27,7 @@   [ goldenVsStringShow "ccitt" crcPgm   , testCase "ccit_good" (assertIsThm crcGood)   ]-  where crcPgm = runSAT $ universal_ crcGood >>= output+  where crcPgm = runSAT $ crcGood <$> free_ <*> free_  extendData :: SWord 48 -> SWord 64 extendData msg = fromBitsBE $ blastBE msg ++ replicate 16 sFalse
SBVTestSuite/TestSuite/CRC/GenPoly.hs view
@@ -30,10 +30,7 @@     ]  crcGoodE :: Symbolic SBool-crcGoodE = do-  x <- sbvExists_-  y <- sbvExists_-  return (crcGood 3 0 x y)+crcGoodE = pure $ quantifiedBool $ \(Exists x) (Exists y) -> crcGood 3 0 x y  extendData :: SWord 48 -> SWord 64 extendData msg = msg # 0
+ SBVTestSuite/TestSuite/CantTypeCheck/Misc.hs view
@@ -0,0 +1,54 @@+-----------------------------------------------------------------------------+-- |+-- Module    : TestSuite.CantTypeCheck.Misc+-- Copyright : (c) Levent Erkok+-- License   : BSD3+-- Maintainer: erkokl@gmail.com+-- Stability : experimental+--+-- Test suite for things that should not type-check+-----------------------------------------------------------------------------++{-# LANGUAGE DataKinds         #-}+{-# LANGUAGE FlexibleInstances #-}++-- Defer type-errors is essential here!+{-# OPTIONS_GHC -Wall -Werror -Wno-orphans -Wno-deferred-type-errors -fdefer-type-errors #-}++module TestSuite.CantTypeCheck.Misc(tests) where++import Control.DeepSeq (NFData(..))+import Utils.SBVTestFramework++-- Only used safely!+import System.IO.Unsafe(unsafePerformIO)+instance NFData (IO Bool) where+  rnf iob = rnf (unsafePerformIO iob) `seq` ()++tests :: TestTree+tests = testGroup "CantTypeCheck.Misc" [+           testCase "noTypeCheckBad01"  $ shouldNotTypeCheck $ isTheorem t1+         , testCase "noTypeCheckBad02"  $ shouldNotTypeCheck $ isTheorem t2+         , testCase "noTypeCheckBad03"  $ shouldNotTypeCheck   runSko+         , testCase "noTypeCheckGood01" $                      assertIsSat t1+         , testCase "noTypeCheckGood02" $                      assertIsSat t2++         -- Just so we got something other than our stuff..+         , testCase "noTypeCheck05"     $ shouldNotTypeCheck (1 :: String)+         ]+  where t1 :: SInteger -> ConstraintSet+        t1 x = do { constrain ( x .> (5::SInteger)) }++        t2 :: ConstraintSet+        t2 = pure ()++        -- shouldn't be able to skolemize like this+        sko :: Forall "y" Integer -> SInteger+        sko = skolemize fml+          where fml :: Exists "x" Integer -> Forall "y" Integer -> SInteger+                fml (Exists x) (Forall y) = x + y++        -- We have to reduce the above to a IO Bool so the rnf instance does the right thing!+        -- Oh the horrors of "deferring type errors"+        runSko :: IO Bool+        runSko = isSatisfiable $ sko (Forall (literal 3))
SBVTestSuite/TestSuite/Existentials/CRCPolynomial.hs view
@@ -21,11 +21,9 @@ tests :: TestTree tests = testGroup "Existentials.CRCPolynomial" [     goldenVsStringShow "crcPolyExist" (runSAT pgm)-  , testCase "crcPolyGood" (assertIsSat pgm)+  , testCase           "crcPolyGood"  (assertIsSat pgm)  ]  pgm :: Predicate-pgm = do p <- sbvExists "poly"-         s <- sbvForall "sent"-         r <- sbvForall "received"-         return $ sTestBit p 0 .&& crcGood 4 p s r+pgm = do poly <- free "poly"+         pure $ quantifiedBool $ \(Forall sent) (Forall received) -> sTestBit poly 0 .&& crcGood 4 poly sent received
SBVTestSuite/TestSuite/Optimization/AssertWithPenalty.hs view
@@ -23,7 +23,7 @@     , goldenVsStringShow "assertWithPenalty2" (optimize Lexicographic assertWithPenalty2)     ] -assertWithPenalty1 :: Goal+assertWithPenalty1 :: ConstraintSet assertWithPenalty1 = do                  x <- sInteger "x"                  y <- sInteger "y"@@ -40,7 +40,7 @@                  assertWithPenalty "as3" (sNot a1) (Penalty 10 Nothing)                  assertWithPenalty "as4" (sNot a2) (Penalty  3 Nothing) -assertWithPenalty2 :: Goal+assertWithPenalty2 :: ConstraintSet assertWithPenalty2 = do                  a1 <- sBool "a1"                  a2 <- sBool "a2"
SBVTestSuite/TestSuite/Optimization/Basics.hs view
@@ -42,7 +42,7 @@                    ]        ] -optBasics1 :: Goal+optBasics1 :: ConstraintSet optBasics1 = do x <- sInteger "x"                 y <- sInteger "y" @@ -51,7 +51,7 @@                  maximize "x_plus_y" $ x+y -optBasics2 :: Goal+optBasics2 :: ConstraintSet optBasics2 = do x <- sInteger "x"                 y <- sInteger "y" 
SBVTestSuite/TestSuite/Optimization/Combined.hs view
@@ -26,7 +26,7 @@     , goldenVsStringShow "pareto3"   (optimize (Pareto Nothing)   pareto3)     ] -combined1 :: Goal+combined1 :: ConstraintSet combined1 = do x <- sInteger "x"                y <- sInteger "y"                z <- sInteger "z"@@ -39,7 +39,7 @@                maximize "max_x" x                maximize "max_y" y -combined2 :: Goal+combined2 :: ConstraintSet combined2 = do a <- sBool "a"                b <- sBool "b"                c <- sBool "c"@@ -51,7 +51,7 @@                constrain $ a .== c                constrain $ sNot (a .&& b) -pareto1 :: Goal+pareto1 :: ConstraintSet pareto1 = do x <- sInteger "x"              y <- sInteger "y" @@ -64,7 +64,7 @@              maximize "max_x_plus_y"   $ x + y              minimize "min_y"            y -pareto2 :: Goal+pareto2 :: ConstraintSet pareto2 = do x <- sInteger "x"              y <- sInteger "y" @@ -75,7 +75,7 @@              maximize "max_y"            y              minimize "max_x_plus_y"   $ x + y -pareto3 :: Goal+pareto3 :: ConstraintSet pareto3 = do x <- sInteger "x"               constrain $ 1 .>= x
SBVTestSuite/TestSuite/Optimization/ExtensionField.hs view
@@ -24,7 +24,7 @@     , goldenVsStringShow "optExtField3" (optimize Lexicographic optExtField3)     ] -optExtField1 :: Goal+optExtField1 :: ConstraintSet optExtField1 = do x <- sInteger "x"                   y <- sInteger "y" @@ -33,7 +33,7 @@                    maximize "x_plus_y" $ x+y -optExtField2 :: Goal+optExtField2 :: ConstraintSet optExtField2 = do x <- sInteger "x"                   y <- sInteger "y" @@ -43,7 +43,7 @@                    minimize "x_plus_y" $ x+y -optExtField3 :: Goal+optExtField3 :: ConstraintSet optExtField3 = do x <- sReal "x"                   y <- sReal "y" 
SBVTestSuite/TestSuite/Optimization/Floats.hs view
@@ -33,21 +33,21 @@     , goldenVsStringShow "optFloat4"  $ optimizeWith z3{crackNum=True} Lexicographic r     ] -floatMinMax :: (SFloat -> Symbolic ()) -> Bool -> Goal+floatMinMax :: (SFloat -> Symbolic ()) -> Bool -> ConstraintSet floatMinMax opt reqPoint = do x <- sFloat "x"                                when reqPoint $ constrain $ fpIsPoint x                                opt x -doubleMinMax :: (SDouble -> Symbolic ()) -> Bool -> Goal+doubleMinMax :: (SDouble -> Symbolic ()) -> Bool -> ConstraintSet doubleMinMax opt reqPoint = do x <- sDouble "x"                                 when reqPoint $ constrain $ fpIsPoint x                                 opt x -q :: Goal+q :: ConstraintSet q = do x <- sFloat "x"        y <- sFloat "y" @@ -59,7 +59,7 @@         maximize "metric-max-x+y" $ observe "max-x+y" (x+y) -r :: Goal+r :: ConstraintSet r = do x <- sFloat "x"        y <- sFloat "y" 
SBVTestSuite/TestSuite/Optimization/Quantified.hs view
@@ -25,7 +25,7 @@ tests :: TestTree tests =   testGroup "Optimization.Reals"-    [ goldenString       "optQuant1" $ optE q1+    [ goldenVsStringShow "optQuant1" $ opt  q1     , goldenVsStringShow "optQuant2" $ opt  q2     , goldenVsStringShow "optQuant3" $ opt  q3     , goldenVsStringShow "optQuant4" $ opt  q4@@ -35,50 +35,44 @@           optE q = (show <$> optimize Lexicographic q) `C.catch` (\(e::C.SomeException) -> return (pick (show e)))           pick s = unlines [l | l <- lines s, "***" `isPrefixOf` l] -q1 :: Goal+q1 :: ConstraintSet q1 = do a <- sInteger "a"         [b1, b2] <- sIntegers ["b1", "b2"]-        x <- sbvForall "x" :: Symbolic SInteger-        constrain $ 2 * (a * x + b1) .== 2-        constrain $ 4 * (a * x + b2) .== 4+        constrain $ \(Forall x) ->     2 * (a * x + b1) .== 2+                                   .&& 4 * (a * x + b2) .== 4         constrain $ a .>= 0-        minimize "goal" $ 2*x+        minimize "goal" $ 2*a -q2 :: Goal+q2 :: ConstraintSet q2 = do a <- sInteger "a"         [b1, b2] <- sIntegers ["b1", "b2"]-        x <- sbvForall "x" :: Symbolic SInteger-        constrain $ 2 * (a * x + b1) .== 2-        constrain $ 4 * (a * x + b2) .== 4-        constrain $ a .>= 0+        constrain $ \(Forall x) ->     2 * (a * x + b1) .== 2+                                   .&& 4 * (a * x + b2) .== 4+                                   .&& a .>= 0         minimize "goal" a -q3 :: Goal+q3 :: ConstraintSet q3 = do a <- sInteger "a"         [b1, b2] <- sIntegers ["b1", "b2"]         minimize "goal" a-        x <- sbvForall "x" :: Symbolic SInteger-        constrain $ 2 * (a * x + b1) .== 2-        constrain $ 4 * (a * x + b2) .== 4+        constrain $ \(Forall x) ->     2 * (a * x + b1) .== 2+                                   .&& 4 * (a * x + b2) .== 4         constrain $ a .>= 0 -q4 :: Goal+q4 :: ConstraintSet q4 = do a <- sInteger "a"         [b1, b2] <- sIntegers ["b1", "b2"]         minimize "goal" $ 2*a-        x <- sbvForall "x" :: Symbolic SInteger-        constrain $ 2 * (a * x + b1) .== 2-        constrain $ 4 * (a * x + b2) .== 4+        constrain $ \(Forall x) ->     2 * (a * x + b1) .== 2+                                   .&& 4 * (a * x + b2) .== 4         constrain $ a .>= 0 -q5 :: Goal+q5 :: ConstraintSet q5 = do a <- sInteger "a"-        x <- sbvForall "x" :: Symbolic SInteger-        y <- sbvForall "y" :: Symbolic SInteger-        b <- sInteger "b"+        constrain $ \(Exists y) -> a .>= (y :: SInteger)         constrain $ a .>= 0+        b <- sInteger "b"         constrain $ b .>= 0-        constrain $ x+y .>= 0         minimize "goal" $ a+b  {-# ANN module ("HLint: ignore Reduce duplication" :: String) #-}
SBVTestSuite/TestSuite/Optimization/Reals.hs view
@@ -22,7 +22,7 @@     [ goldenVsStringShow "optReal1" (optimize Lexicographic p)     ] -p :: Goal+p :: ConstraintSet p = do x <- sReal "x"        y <- sReal "y"        z <- sReal "z"
SBVTestSuite/TestSuite/Optimization/Tuples.hs view
@@ -25,7 +25,7 @@     [ goldenVsStringShow "optTuple1" $ optimize Lexicographic t1     ] -t1 :: Goal+t1 :: ConstraintSet t1 = do p :: STuple Integer Integer <- sTuple "p"          constrain $ (p^._1) `inRange` (0, 100)
SBVTestSuite/TestSuite/Puzzles/Coins.hs view
@@ -25,4 +25,4 @@  where coinsPgm = runSAT $ do cs <- mapM mkCoin [1..6]                               mapM_ constrain [c s | s <- combinations cs, length s >= 2, c <- [c1, c2, c3, c4, c5, c6]]                               constrain $ sAnd $ zipWith (.>=) cs (tail cs)-                              output $ sum cs .== 115+                              pure $ sum cs .== 115
SBVTestSuite/TestSuite/Puzzles/Counts.hs view
@@ -22,5 +22,4 @@ tests = testGroup "Puzzles.Counts" [   goldenVsStringShow "counts" countPgm  ]- where countPgm = runSAT $ universal_ puzzle' >>= output-       puzzle' d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 = puzzle [d0, d1, d2, d3, d4, d5, d6, d7, d8, d9]+ where countPgm = runSAT $ puzzle <$> mkFreeVars 10
SBVTestSuite/TestSuite/Puzzles/MagicSquare.hs view
@@ -26,4 +26,4 @@   mkMagic :: Int -> Symbolic SBool-mkMagic n = (isMagic . chunk n) `fmap` mkExistVars (n*n)+mkMagic n = (isMagic . chunk n) `fmap` mkFreeVars (n*n)
SBVTestSuite/TestSuite/Puzzles/NQueens.hs view
@@ -32,4 +32,4 @@    ]  mkQueens :: Int -> Symbolic SBool-mkQueens n = isValid n `fmap` mkExistVars n+mkQueens n = isValid n `fmap` mkFreeVars n
SBVTestSuite/TestSuite/Puzzles/Sudoku.hs view
@@ -15,16 +15,16 @@  import Documentation.SBV.Examples.Puzzles.Sudoku +import Data.Maybe (fromMaybe) import Utils.SBVTestFramework  tests :: TestTree tests =   testGroup "Puzzles.Sudoku"     [ testCase ("sudoku " ++ show n) (assert (checkPuzzle s))-       | (n, s) <--           zip-             [(0::Int)..]-             [puzzle0, puzzle1, puzzle2, puzzle3, puzzle4, puzzle5, puzzle6] ]+       | (n, s) <- zip [(0::Int)..] [puzzle1, puzzle2, puzzle3, puzzle4, puzzle5, puzzle6] ]  checkPuzzle :: Puzzle -> IO Bool-checkPuzzle (i, f) = isSatisfiable $ (valid . f) `fmap` mkExistVars i+checkPuzzle p = do final <- fillBoard p+                   let vld = valid (map (map literal) final)+                   pure $ fromMaybe False (unliteral vld)
SBVTestSuite/TestSuite/Puzzles/Temperature.hs view
@@ -24,7 +24,7 @@   testGroup "Puzzles.Temperature"     [ goldenVsStringShow "temperature" result     ]-    where result = (sort . concatMap M.toList . getModelDictionaries) `fmap` allSat (revOf `fmap` sbvExists_)+    where result = (sort . concatMap M.toList . getModelDictionaries) `fmap` allSat (revOf `fmap` free_)  type Temp = SInteger 
SBVTestSuite/TestSuite/Puzzles/U2Bridge.hs view
@@ -30,7 +30,7 @@     , testCase "U2Bridge_cnt6" (assert $ (0 ==) `fmap` count 6)     , goldenVsStringShow "U2Bridge" (slv 5)     ]- where act     = do b <- sbvExists_; p1 <- sbvExists_; p2 <- sbvExists_; return (b, p1, p2)+ where act     = do b <- free_; p1 <- free_; p2 <- free_; return (b, p1, p2)        count n = numberOfModels $ isValid `fmap` mapM (const act) [1..(n::Int)]        slv n   = rearrange `fmap` allSat (isValid `fmap` mapM (const act) [1..(n::Int)]) 
SBVTestSuite/TestSuite/Queries/UISatEx.hs view
@@ -9,8 +9,11 @@ -- Testing uninterpreted function extraction ----------------------------------------------------------------------------- -{-# LANGUAGE OverloadedLists   #-}-{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE OverloadedLists     #-}+{-# LANGUAGE OverloadedStrings   #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeApplications    #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -26,6 +29,7 @@   testGroup "Queries.UISatEx"     [ goldenCapturedIO "query_uisatex1" testQuery1     , goldenCapturedIO "query_uisatex2" testQuery2+    , goldenCapturedIO "query_uisatex3" testQuery3     ]  testQuery1 :: FilePath -> IO ()@@ -64,7 +68,7 @@ q5 :: SList Integer -> SList Float -> SInteger q5 = uninterpret "q5" -core :: Goal+core :: ConstraintSet core = do x <- sInteger_           constrain $ q1 2    .== 12           constrain $ q1 3    .== 75@@ -87,3 +91,20 @@           constrain $ q5 [1,2,3] [8.2, 3] .== 7           constrain $ q5 [9,5]   [8.2, 9] .== 21           constrain $ q5 [5]     [8.2, 0] .== 210++testQuery3 :: FilePath -> IO ()+testQuery3 rf = do r <- runSMTWith defaultSMTCfg{verbose=True, redirectVerbose=Just rf} t+                   appendFile rf ("\n FINAL:\n" ++ show r ++ "\nDONE!\n")++  where t = do constrain $ skolemize $ \(Forall @"x" x) (Exists @"y" y) -> y .== 3*(x::SInteger)+               query $ do cs <- checkSat+                          case cs of+                            Sat -> do yv <- getFunction (uninterpret "y" :: SInteger -> SInteger)+                                      case yv of+                                        Left x -> pure x+                                        _      -> error $ "Expected fundef, got: " ++ show yv+                            _   -> error $ "Expected sat, got: " ++ show cs++-- HLint complains about TypeApplications pragma, but if I remove it GHC complains+-- I'm not sure who is right here; so ignore.+{-# ANN module ("HLint: ignore Unused LANGUAGE pragma" :: String) #-}
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 -> output (thm x y (a :: SArray     Word32 Word32))+    [ 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))     ]
SBVTestSuite/TestSuite/Uninterpreted/Axioms.hs view
@@ -33,8 +33,8 @@ tests :: TestTree tests =   testGroup "Uninterpreted.Axioms"-    [ testCase         "unint-axioms"       (assertIsThm p0)-    , testCase         "unint-axioms-empty" (assertIsThm p1)+    [ goldenCapturedIO "unint-axioms"       $ \rf -> isTheoremWith z3{verbose=True, redirectVerbose=Just rf} p0 >>= \r -> appendFile rf ("\n FINAL:" ++ show r ++ "\nDONE!\n")+    , goldenCapturedIO "unint-axioms-empty" $ \rf -> isTheoremWith z3{verbose=True, redirectVerbose=Just rf} p1 >>= \r -> appendFile rf ("\n FINAL:" ++ show r ++ "\nDONE!\n")     , goldenCapturedIO "unint-axioms-query" testQuery     ] @@ -44,29 +44,15 @@ e :: SBitstring -> SBitstring -> SBitstring e = uninterpret "e" -axE :: [String]-axE = [ "(assert (forall ((p Bitstring) (k Bitstring))"-      , "         (=> (and (a k) (a p)) (a (e k p)))))"-      ]- p0 :: Symbolic SBool p0 = do+    constrain $ \(Forall p) (Forall k) -> a k .&& a p .=> a (e k p)     p <- free "p" :: Symbolic SBitstring     k <- free "k" :: Symbolic SBitstring-    addAxiom "axE" axE     constrain $ a p     constrain $ a k     return $ a (e k p) -axThings :: [String]-axThings = [ -- thingCompare is reflexive-             "(assert (forall ((k1 Thing))"-           , "  (thingCompare k1 k1)))"-           -- thingMerge produces a new, distinct thing-           , "(assert (forall ((k1 Thing) (k2 Thing))"-           , "  (distinct k1 (thingMerge k1 k2))))"-           ]- thingCompare :: SThing -> SThing -> SBV Bool thingCompare = uninterpret "thingCompare" @@ -74,31 +60,26 @@ thingMerge = uninterpret "thingMerge"  p1 :: Symbolic SBool-p1 = do addAxiom "things" axThings+p1 = do constrain $ \(Forall x) -> thingCompare x x+        constrain $ \(Forall k1) (Forall k2) -> k1 ./= thingMerge k1 k2         registerUISMTFunction thingMerge-        k1 <- sbvForall_-        k2 <- sbvForall_+        k1 <- free_+        k2 <- free_         return $ k1 .== k2 .=> thingCompare k1 k2  testQuery :: FilePath -> IO () testQuery rf = do r <- runSMTWith defaultSMTCfg{verbose=True, redirectVerbose=Just rf} t                   appendFile rf ("\n FINAL:" ++ show r ++ "\nDONE!\n")- where t = do p <- free "p"-              q <- free "q"-              r <- free "r"+ where t = do vp <- free "p"+              vq <- free "q"+              vr <- free "r"               query $ do let oR, aND :: SB  -> SB -> SB                              oR  = uninterpret "OR"                              aND = uninterpret "AND"                              nOT :: SB -> SB                              nOT = uninterpret "NOT"-                         constrain $ nOT (p `oR` (q `aND` r)) ./= (nOT p `aND` nOT q) `oR` (nOT p `aND` nOT r)-                         addAxiom "OR distributes over AND" [ "(assert (forall ((p B) (q B) (r B))"-                                                            , "   (= (AND (OR p q) (OR p r))"-                                                            , "      (OR p (AND q r)))))"-                                                            ]-                         addAxiom "de Morgan"               [ "(assert (forall ((p B) (q B))"-                                                            , "   (= (NOT (OR p q))"-                                                            , "      (AND (NOT p) (NOT q)))))"-                                                            ]-                         addAxiom "double negation"         ["(assert (forall ((p B)) (= (NOT (NOT p)) p)))"]+                         constrain  $ nOT (vp `oR` (vq `aND` vr)) ./= (nOT vp `aND` nOT vq) `oR` (nOT vp `aND` nOT vr)+                         constrain $ \(Forall p) (Forall q) (Forall r) -> (p `oR` q) `aND` (p `oR` r) .== p `oR` (q `aND` r)+                         constrain $ \(Forall p) (Forall q)            -> nOT (p `oR` q) .== nOT p `aND` nOT q+                         constrain $ \(Forall p)                       -> nOT (nOT p) .== p                          checkSat
SBVTestSuite/Utils/SBVTestFramework.hs view
@@ -12,6 +12,8 @@ {-# LANGUAGE FlexibleContexts    #-} {-# LANGUAGE RankNTypes          #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeFamilies        #-}+{-# LANGUAGE TypeOperators       #-}  {-# OPTIONS_GHC -Wall -Werror #-} @@ -23,6 +25,7 @@         , goldenVsStringShow         , goldenCapturedIO         , qc1, qc2+        , shouldNotTypeCheck         -- module exports to simplify life         , module Test.Tasty         , module Test.Tasty.HUnit@@ -31,6 +34,8 @@  import qualified Control.Exception as C +import Control.DeepSeq     (force, NFData)+import Control.Exception   (evaluate, try, throwIO, TypeError(..)) import Control.Monad.Trans (liftIO)  import qualified Data.ByteString.Lazy.Char8 as LBC@@ -38,7 +43,7 @@ import System.Directory   (removeFile)  import Test.Tasty            (testGroup, TestTree, TestName)-import Test.Tasty.HUnit      ((@?), Assertion, testCase, AssertionPredicable)+import Test.Tasty.HUnit      ((@?), Assertion, testCase, AssertionPredicable, assertFailure)  import Test.Tasty.Golden     (goldenVsString, goldenVsFileDiff) @@ -50,12 +55,12 @@ import Data.SBV import Data.SBV.Control -import Data.Maybe (fromMaybe)- import System.FilePath ((</>), (<.>))+import Data.List       (isInfixOf, isSuffixOf) -import Data.SBV.Internals (runSymbolic, Result, SBVRunMode(..), IStage(..), SBV(..), SVal(..), showModel, SMTModel(..), QueryContext(..)) +import Data.SBV.Internals (runSymbolic, Result, SBVRunMode(..), IStage(..), SBV(..), SVal(..), showModel, SMTModel(..), QueryContext(..), Outputtable)+ -- | Generic assertion. This is less safe than usual, but will do. assert :: AssertionPredicable t => t -> Assertion assert t = t @? "assertion-failure"@@ -85,7 +90,7 @@ -- call this function if you provided a max-model count -- that was hit, or the search was stopped because the -- solver said 'Unknown' at some point.-numberOfModels :: Provable a => a -> IO Int+numberOfModels :: Satisfiable a => a -> IO Int numberOfModels p = do AllSatResult { allSatMaxModelCountReached  = maxHit                                    , allSatSolverReturnedUnknown = unk                                    , allSatSolverReturnedDSat    = ds@@ -99,8 +104,8 @@                         _              -> return l  -- | Symbolically run a SAT instance using the default config-runSAT :: Symbolic a -> IO Result-runSAT cmp = snd <$> runSymbolic (SMTMode QueryInternal ISetup True defaultSMTCfg) cmp+runSAT :: Outputtable a => Symbolic a -> IO Result+runSAT cmp = snd <$> runSymbolic defaultSMTCfg (SMTMode QueryInternal ISetup True defaultSMTCfg) (cmp >>= output >> pure ())  -- | Turn provable to an assertion, theorem case assertIsThm :: Provable a => a -> Assertion@@ -111,29 +116,20 @@ assertIsntThm t = assert (fmap not (isTheorem t))  -- | Turn provable to an assertion, satisfiability case-assertIsSat :: Provable a => a -> Assertion+assertIsSat :: Satisfiable a => a -> Assertion assertIsSat p = assert (isSatisfiable p)  -- | Turn provable to a negative assertion, satisfiability case-assertIsntSat :: Provable a => a -> Assertion+assertIsntSat :: Satisfiable a => a -> Assertion assertIsntSat p = assert (fmap not (isSatisfiable p))  -- | Quick-check a unary function, creating one version for constant folding, and another for solver qc1 :: (Eq a, SymVal a, SymVal b, Show a, QC.Arbitrary a, Eq b) => String -> (a -> b) -> (SBV a -> SBV b) -> [TestTree] qc1 nm opC opS = [cf, sm]-   where cf = QC.testProperty (nm ++ ".constantFold") $ do-                        i <- free "i"--                        let grab n = fromMaybe (error $ "qc1." ++ nm ++ ": Cannot extract value for: " ++ n) . unliteral--                            v = grab "i" i--                            expected = literal $ opC v-                            result   = opS i--                        case (unliteral expected, unliteral result) of-                           (Just _, Just _) -> return $ expected .== result-                           _                -> return sFalse+   where cf = QC.testProperty (nm ++ ".constantFold") $ \i ->+                         case unliteral (opS (literal i)) of+                             Just r -> opC i == r+                             _      -> False           sm = QC.testProperty (nm ++ ".symbolic") $ QC.monadicIO $ do                         ((i, expected), result) <- QC.run $ runSMT $ do v   <- liftIO $ QC.generate QC.arbitrary@@ -174,21 +170,10 @@ -- | Quick-check a binary function, creating one version for constant folding, and another for solver qc2 :: (Eq a, Eq b, SymVal a, SymVal b, SymVal c, Show a, Show b, QC.Arbitrary a, QC.Arbitrary b, Eq c) => String -> (a -> b -> c) -> (SBV a -> SBV b -> SBV c) -> [TestTree] qc2 nm opC opS = [cf, sm]-   where cf = QC.testProperty (nm ++ ".constantFold") $ do-                        i1 <- free "i1"-                        i2 <- free "i2"--                        let grab n = fromMaybe (error $ "qc2." ++ nm ++ ": Cannot extract value for: " ++ n) . unliteral--                            v1 = grab "i1" i1-                            v2 = grab "i2" i2--                            expected = literal $ opC v1 v2-                            result   = opS i1 i2--                        case (unliteral expected, unliteral result) of-                           (Just _, Just _) -> return $ expected .== result-                           _                -> return sFalse+   where cf = QC.testProperty (nm ++ ".constantFold") $ \i j ->+                         case unliteral (opS (literal i) (literal j)) of+                             Just r -> opC i j == r+                             _      -> False           sm = QC.testProperty (nm ++ ".symbolic") $ QC.monadicIO $ do                         ((i1, i2, expected), result) <- QC.run $ runSMT $ do v1  <- liftIO $ QC.generate QC.arbitrary@@ -228,5 +213,24 @@                         case result of                            Right a -> QC.assert $ expected == a                            _       -> QC.assert False+++-- Adapted from https://github.com/CRogers/should-not-typecheck/blob/2929b8303634fcfe200e8e37b744171aed3a757b/src/Test/ShouldNotTypecheck.hs#L1+shouldNotTypeCheck :: NFData a => (() ~ () => a) -> Assertion+shouldNotTypeCheck a = do+  result <- try (evaluate $ force a)+  case result of+    Right _ -> assertFailure "Expected to not compile but it did compile."++    Left e@(TypeError msg)+      | "(deferred type error)" `isSuffixOf` msg+      -> case () of+           () |     "No instance for" `isInfixOf` msg+                 && "NFData"          `isInfixOf` msg+              -> assertFailure $ "Make sure the expression has an NFData instance! Full error:\n" ++ msg+              | True+              -> pure ()+      | True+      -> throwIO e  {-# ANN module ("HLint: ignore Reduce duplication" :: String) #-}
sbv.cabal view
@@ -1,7 +1,7 @@ Cabal-Version: 2.2  Name        : sbv-Version     : 9.2+Version     : 10.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@@ -129,7 +129,9 @@                   , Documentation.SBV.Examples.Lists.CountOutAndTransfer                   , Documentation.SBV.Examples.Misc.Definitions                   , Documentation.SBV.Examples.Misc.Enumerate+                  , Documentation.SBV.Examples.Misc.FirstOrderLogic                   , Documentation.SBV.Examples.Misc.Floating+                  , Documentation.SBV.Examples.Misc.LambdaArray                   , Documentation.SBV.Examples.Misc.ModelExtract                   , Documentation.SBV.Examples.Misc.NestedArray                   , Documentation.SBV.Examples.Misc.Auxiliary@@ -167,13 +169,17 @@                   , Documentation.SBV.Examples.Puzzles.Garden                   , Documentation.SBV.Examples.Puzzles.HexPuzzle                   , Documentation.SBV.Examples.Puzzles.Jugs+                  , Documentation.SBV.Examples.Puzzles.KnightsAndKnaves                   , Documentation.SBV.Examples.Puzzles.LadyAndTigers                   , Documentation.SBV.Examples.Puzzles.MagicSquare                   , Documentation.SBV.Examples.Puzzles.Murder                   , Documentation.SBV.Examples.Puzzles.NQueens+                  , Documentation.SBV.Examples.Puzzles.Orangutans+                  , Documentation.SBV.Examples.Puzzles.Rabbits                   , Documentation.SBV.Examples.Puzzles.SendMoreMoney                   , Documentation.SBV.Examples.Puzzles.Sudoku                   , Documentation.SBV.Examples.Puzzles.U2Bridge+                  , Documentation.SBV.Examples.Queries.Abducts                   , Documentation.SBV.Examples.Queries.AllSat                   , Documentation.SBV.Examples.Queries.UnsatCore                   , Documentation.SBV.Examples.Queries.FourFours@@ -210,6 +216,7 @@                   , Data.SBV.Control.Utils                   , Data.SBV.Compilers.C                   , Data.SBV.Compilers.CodeGen+                  , Data.SBV.Lambda                   , Data.SBV.SMT.SMT                   , Data.SBV.SMT.SMTLib                   , Data.SBV.SMT.SMTLib2@@ -239,20 +246,20 @@   type             : exitcode-stdio-1.0   ghc-options      : -with-rtsopts=-K64m   other-extensions : DataKinds-                    DeriveAnyClass-                    DeriveDataTypeable-                    FlexibleContexts-                    GeneralizedNewtypeDeriving-                    OverloadedLists-                    OverloadedStrings-                    Rank2Types-                    RankNTypes-                    ScopedTypeVariables-                    StandaloneDeriving-                    TemplateHaskell-                    TupleSections-                    TypeApplications-  build-depends   : filepath, sbv, directory, random, mtl, containers+                     DeriveAnyClass+                     DeriveDataTypeable+                     FlexibleContexts+                     GeneralizedNewtypeDeriving+                     OverloadedLists+                     OverloadedStrings+                     Rank2Types+                     RankNTypes+                     ScopedTypeVariables+                     StandaloneDeriving+                     TemplateHaskell+                     TupleSections+                     TypeApplications+  build-depends   : filepath, sbv, directory, random, mtl, containers, deepseq                   , bytestring, tasty, tasty-golden, tasty-hunit, tasty-quickcheck, QuickCheck   hs-source-dirs  : SBVTestSuite   main-is         : SBVTest.hs@@ -270,11 +277,13 @@                   , TestSuite.Basics.BasicTests                   , TestSuite.Basics.BoundedList                   , TestSuite.Basics.DynSign+                  , TestSuite.Basics.EqSym                   , TestSuite.Basics.Exceptions                   , TestSuite.Basics.GenBenchmark                   , TestSuite.Basics.Higher                   , TestSuite.Basics.Index                   , TestSuite.Basics.IteTest+                  , TestSuite.Basics.Lambda                   , TestSuite.Basics.List                   , TestSuite.Basics.ModelValidate                   , TestSuite.Basics.Nonlinear@@ -363,6 +372,7 @@                   , TestSuite.Uninterpreted.Function                   , TestSuite.Uninterpreted.Sort                   , TestSuite.Uninterpreted.Uninterpreted+                  , TestSuite.CantTypeCheck.Misc  Test-Suite SBVConnections     import          : common-settings@@ -376,7 +386,7 @@     import          : common-settings     default-language: Haskell2010     build-depends   : base, sbv, process, QuickCheck, filepath, mtl, bytestring, directory-                    , tasty, tasty-quickcheck, tasty-golden, tasty-hunit+                    , tasty, tasty-quickcheck, tasty-golden, tasty-hunit, deepseq     other-extensions: DataKinds                       DeriveAnyClass                       DeriveDataTypeable@@ -400,8 +410,8 @@     import          : common-settings     default-language: Haskell2010 -    build-depends   : base, directory, filepath-                    , hlint, bytestring, tasty, tasty-golden, tasty-hunit, tasty-quickcheck, mtl, QuickCheck, sbv+    build-depends   : base, directory, filepath, process, deepseq+                    , bytestring, tasty, tasty-golden, tasty-hunit, tasty-quickcheck, mtl, QuickCheck, sbv     other-extensions: DataKinds                       DeriveAnyClass                       DeriveDataTypeable