sbv-7.12: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.

Copyright(c) Levent Erkok
LicenseBSD3
Maintainererkokl@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.SBV.List.Bounded

Contents

Description

A collection of bounded list utilities, useful when working with symbolic lists. These functions all take a concrete bound, and operate on the prefix of a symbolic list that is at most that long. Due to limitations on writing recursive functions over lists (the classic symbolic termination problem), we cannot write arbitrary recursive programs on symbolic lists. But most of the time all we need is a bounded prefix of this list, at which point these functions come in handy.

Synopsis

General folds

bfoldr :: (SymWord a, SymWord b) => Int -> (SBV a -> SBV b -> SBV b) -> SBV b -> SList a -> SBV b Source #

Bounded fold from the right.

bfoldl :: (SymWord a, SymWord b) => Int -> (SBV b -> SBV a -> SBV b) -> SBV b -> SList a -> SBV b Source #

Bounded fold from the left.

Map, filter, zipWith, elem

bmap :: (SymWord a, SymWord b) => Int -> (SBV a -> SBV b) -> SList a -> SList b Source #

Bounded map.

bfilter :: SymWord a => Int -> (SBV a -> SBool) -> SList a -> SList a Source #

Bounded filter.

bzipWith :: (SymWord a, SymWord b, SymWord c) => Int -> (SBV a -> SBV b -> SBV c) -> SList a -> SList b -> SList c Source #

Bounded zipWith

belem :: SymWord a => Int -> SBV a -> SList a -> SBool Source #

Bounded element check

Aggregates

bsum :: (SymWord a, Num a) => Int -> SList a -> SBV a Source #

Bounded sum.

bprod :: (SymWord a, Num a) => Int -> SList a -> SBV a Source #

Bounded product.

band :: Int -> SList Bool -> SBool Source #

Bounded logical and

bor :: Int -> SList Bool -> SBool Source #

Bounded logical or

bany :: SymWord a => Int -> (SBV a -> SBool) -> SList a -> SBool Source #

Bounded any

ball :: SymWord a => Int -> (SBV a -> SBool) -> SList a -> SBool Source #

Bounded all

bmaximum :: (SymWord a, Num a) => Int -> SList a -> SBV a Source #

Bounded maximum. Undefined if list is empty.

bminimum :: (SymWord a, Num a) => Int -> SList a -> SBV a Source #

Bounded minimum. Undefined if list is empty.