what4-1.6.3: Solver-agnostic symbolic values support for issuing queries

Copyright | (c) Galois Inc 2015-2020
License | BSD3
Maintainer | Joe Hendrix <jhendrix@galois.com>
Safe Haskell | Safe-Inferred
Language | Haskell2010

What4.Utils.LeqMap

Description

This module defines a strict map.

It is similiar to Data.Map.Strict, but provides some additional operations including splitEntry, splitLeq, fromDistinctDescList.

Synopsis

- data LeqMap k p
- toList :: LeqMap k p -> [(k, p)]
- findMin :: LeqMap k p -> (k, p)
- findMax :: LeqMap k p -> (k, p)
- null :: LeqMap k p -> Bool
- empty :: LeqMap k p
- mapKeysMonotonic :: (k1 -> k2) -> LeqMap k1 p -> LeqMap k2 p
- union :: Ord k => LeqMap k p -> LeqMap k p -> LeqMap k p
- fromDistinctAscList :: [(k, p)] -> LeqMap k p
- fromDistinctDescList :: [(k, p)] -> LeqMap k p
- toDescList :: LeqMap k p -> [(k, p)]
- deleteFindMin :: LeqMap k p -> ((k, p), LeqMap k p)
- deleteFindMax :: LeqMap k p -> ((k, p), LeqMap k p)
- minViewWithKey :: LeqMap k p -> Maybe ((k, p), LeqMap k p)
- filterGt :: Ord k => k -> LeqMap k p -> LeqMap k p
- filterLt :: Ord k => k -> LeqMap k p -> LeqMap k p
- insert :: Ord k => k -> p -> LeqMap k p -> LeqMap k p
- lookupLE :: Ord k => k -> LeqMap k p -> Maybe (k, p)
- lookupLT :: Ord k => k -> LeqMap k p -> Maybe (k, p)
- lookupGE :: Ord k => k -> LeqMap k p -> Maybe (k, p)
- lookupGT :: Ord k => k -> LeqMap k p -> Maybe (k, p)
- keys :: LeqMap k p -> [k]
- mergeWithKey :: (a -> b -> IO c) -> (a -> IO c) -> (b -> IO c) -> LeqMap Integer a -> LeqMap Integer b -> IO (LeqMap Integer c)
- singleton :: k -> p -> LeqMap k p
- foldlWithKey' :: (a -> k -> b -> a) -> a -> LeqMap k b -> a
- size :: LeqMap k p -> Int
- splitEntry :: LeqMap k p -> Maybe (LeqMap k p, (k, p), LeqMap k p)
- splitLeq :: Ord k => k -> LeqMap k p -> (LeqMap k p, LeqMap k p)

# Documentation

data LeqMap k p Source #

#### Instances

Instances details

Functor (LeqMap k) Source # |
Instance details Defined in What4.Utils.LeqMap Methods fmap :: (a -> b) -> LeqMap k a -> LeqMap k b Source # (<$) :: a -> LeqMap k b -> LeqMap k a Source #
Foldable (LeqMap k) Source # |

Instance details

Defined in What4.Utils.LeqMap

Methods

fold :: Monoid m => LeqMap k m -> m Source #

foldMap :: Monoid m => (a -> m) -> LeqMap k a -> m Source #

foldMap' :: Monoid m => (a -> m) -> LeqMap k a -> m Source #

foldr :: (a -> b -> b) -> b -> LeqMap k a -> b Source #

foldr' :: (a -> b -> b) -> b -> LeqMap k a -> b Source #

foldl :: (b -> a -> b) -> b -> LeqMap k a -> b Source #

foldl' :: (b -> a -> b) -> b -> LeqMap k a -> b Source #

foldr1 :: (a -> a -> a) -> LeqMap k a -> a Source #

foldl1 :: (a -> a -> a) -> LeqMap k a -> a Source #

toList :: LeqMap k a -> [a] Source #

null :: LeqMap k a -> Bool Source #

length :: LeqMap k a -> Int Source #

elem :: Eq a => a -> LeqMap k a -> Bool Source #

maximum :: Ord a => LeqMap k a -> a Source #

minimum :: Ord a => LeqMap k a -> a Source #

sum :: Num a => LeqMap k a -> a Source #

product :: Num a => LeqMap k a -> a Source #

Traversable (LeqMap k) Source # |
Instance details Defined in What4.Utils.LeqMap Methods traverse :: Applicative f => (a -> f b) -> LeqMap k a -> f (LeqMap k b) Source # sequenceA :: Applicative f => LeqMap k (f a) -> f (LeqMap k a) Source # mapM :: Monad m => (a -> m b) -> LeqMap k a -> m (LeqMap k b) Source # sequence :: Monad m => LeqMap k (m a) -> m (LeqMap k a) Source #
(Ord k, Eq p) => Eq (LeqMap k p) Source # |
Instance details Defined in What4.Utils.LeqMap Methods (==) :: LeqMap k p -> LeqMap k p -> Bool Source # (/=) :: LeqMap k p -> LeqMap k p -> Bool Source #

toList :: LeqMap k p -> [(k, p)] Source #

findMin :: LeqMap k p -> (k, p) Source #

findMax :: LeqMap k p -> (k, p) Source #

null :: LeqMap k p -> Bool Source #

empty :: LeqMap k p Source #

Return the empty map

mapKeysMonotonic :: (k1 -> k2) -> LeqMap k1 p -> LeqMap k2 p Source #

union :: Ord k => LeqMap k p -> LeqMap k p -> LeqMap k p Source #

fromDistinctAscList :: [(k, p)] -> LeqMap k p Source #

fromDistinctDescList :: [(k, p)] -> LeqMap k p Source #

Create a map from a list of keys in descending order.

toDescList :: LeqMap k p -> [(k, p)] Source #

deleteFindMin :: LeqMap k p -> ((k, p), LeqMap k p) Source #

deleteFindMax :: LeqMap k p -> ((k, p), LeqMap k p) Source #

minViewWithKey :: LeqMap k p -> Maybe ((k, p), LeqMap k p) Source #

filterGt :: Ord k => k -> LeqMap k p -> LeqMap k p Source #

filterLt :: Ord k => k -> LeqMap k p -> LeqMap k p Source #

insert :: Ord k => k -> p -> LeqMap k p -> LeqMap k p Source #

lookupLE :: Ord k => k -> LeqMap k p -> Maybe (k, p) Source #

Find largest element that is less than or equal to key (if any).

lookupLT :: Ord k => k -> LeqMap k p -> Maybe (k, p) Source #

Find less than element that is less than key (if any).

lookupGE :: Ord k => k -> LeqMap k p -> Maybe (k, p) Source #

Find largest element that is at least key (if any).

lookupGT :: Ord k => k -> LeqMap k p -> Maybe (k, p) Source #

Find less than element that is less than key (if any).

keys :: LeqMap k p -> [k] Source #

mergeWithKey :: (a -> b -> IO c) -> (a -> IO c) -> (b -> IO c) -> LeqMap Integer a -> LeqMap Integer b -> IO (LeqMap Integer c) Source #

singleton :: k -> p -> LeqMap k p Source #

foldlWithKey' :: (a -> k -> b -> a) -> a -> LeqMap k b -> a Source #

size :: LeqMap k p -> Int Source #

splitEntry :: LeqMap k p -> Maybe (LeqMap k p, (k, p), LeqMap k p) Source #

splitLeq :: Ord k => k -> LeqMap k p -> (LeqMap k p, LeqMap k p) Source #