Hoogle Search

Within LTS Haskell 24.67 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. allSatResults :: AllSatResult -> [SMTResult]

    sbv Data.SBV.Trans

    All satisfying models

  2. allSatSolverReturnedDSat :: AllSatResult -> Bool

    sbv Data.SBV.Trans

    Did the solver report delta-satisfiable at the end?

  3. allSatSolverReturnedUnknown :: AllSatResult -> Bool

    sbv Data.SBV.Trans

    Did the solver report unknown at the end?

  4. allSatTrackUFs :: SMTConfig -> Bool

    sbv Data.SBV.Trans

    In a allSat call, should we try to extract values of uninterpreted functions?

  5. allSatWith :: SatisfiableM m a => SMTConfig -> a -> m AllSatResult

    sbv Data.SBV.Trans

    Generalization of allSatWith

  6. allAny :: IO Proof

    sbv Documentation.SBV.Examples.KnuckleDragger.Lists

    not (all id xs) == any not xs
    
    A list of booleans is not all true, if any of them is false. We have:
    >>> allAny
    Inductive lemma: allAny
    Step: Base                            Q.E.D.
    Step: 1                               Q.E.D.
    Step: 2                               Q.E.D.
    Step: 3                               Q.E.D.
    Step: 4                               Q.E.D.
    Result:                               Q.E.D.
    [Proven] allAny
    

  7. allModels :: IO AllSatResult

    sbv Documentation.SBV.Examples.Misc.Auxiliary

    Generate all satisfying assignments for our problem. We have:

    >>> allModels
    Solution #1:
    x =  1 :: Integer
    y = -1 :: Integer
    Solution #2:
    x = 1 :: Integer
    y = 1 :: Integer
    Solution #3:
    x = 0 :: Integer
    y = 0 :: Integer
    Found 3 different solutions.
    
    Note that solutions 2 and 3 share the value x = 1, since there are multiple values of y that make this particular choice of x satisfy our constraint.

  8. allocate :: ConstraintSet

    sbv Documentation.SBV.Examples.Optimization.VM

    Computer allocation problem:

    • We have three virtual machines (VMs) which require 100, 50 and 15 GB hard disk respectively.
    • There are three servers with capabilities 100, 75 and 200 GB in that order.
    • Find out a way to place VMs into servers in order to
      • Minimize the number of servers used
      • Minimize the operation cost (the servers have fixed daily costs 10, 5 and 20 USD respectively.)
    We have:
    >>> optimize Lexicographic allocate
    Optimal model:
    x11         = False :: Bool
    x12         = False :: Bool
    x13         =  True :: Bool
    x21         = False :: Bool
    x22         = False :: Bool
    x23         =  True :: Bool
    x31         = False :: Bool
    x32         = False :: Bool
    x33         =  True :: Bool
    noOfServers =     1 :: Integer
    cost        =    20 :: Integer
    
    That is, we should put all the jobs on the third server, for a total cost of 20.

  9. allPuzzles :: IO ()

    sbv Documentation.SBV.Examples.Puzzles.Sudoku

    Solve them all, this takes a fraction of a second to run for each case

  10. allPossibleTrees :: [T () ()]

    sbv Documentation.SBV.Examples.Queries.FourFours

    Construct all possible tree shapes. The argument here follows the logic in http://www.gigamonkeys.com/trees/: We simply construct all possible shapes and extend with the operators. The number of such trees is:

    >>> length allPossibleTrees
    640
    
    Note that this is a lot smaller than what is generated by http://www.gigamonkeys.com/trees/. (There, the number of trees is 10240000: 16000 times more than what we have to consider!)

Page 119 of many | Previous | Next