language-boogie-0.2: Interpreter and language infrastructure for Boogie.

Safe HaskellSafe-Inferred

Language.Boogie.Intervals

Description

Lattice of integer intervals

Synopsis

Documentation

class Eq a => Lattice a whereSource

Lattice type class

Methods

topSource

Arguments

:: a

Top

botSource

Arguments

:: a

Bottom

(<:)Source

Arguments

:: a 
-> a 
-> Bool

Partial order

joinSource

Arguments

:: a 
-> a 
-> a

Least upper bound

meetSource

Arguments

:: a 
-> a 
-> a

Greatest lower bound

Instances

data Extended Source

Integers extended with infinity

Constructors

NegInf 
Finite Integer 
Inf 

extDiv :: (Ratio Integer -> Integer) -> Extended -> Extended -> Maybe ExtendedSource

extDiv r a b : result of dividing a by b, rounded with r in the finite case; dividing infinty by infinity yields Nothing.

data Interval Source

Integer intervals

Constructors

Interval 

Fields

lower :: Extended
 
upper :: Extended
 

isBottom :: Interval -> BoolSource

Is interval empty?

isBounded :: Interval -> BoolSource

Are both bounds of the interval finite?

positives :: IntervalSource

All positive integers

negatives :: IntervalSource

All negative integers

nonNegatives :: IntervalSource

All positive integers and 0

nonPositives :: IntervalSource

All netaive integers and 0

mapBounds :: (Extended -> Extended -> t) -> Interval -> Interval -> [t]Source

Apply function to all pairs of bounds coming from two different intervals

(//) :: Interval -> Interval -> IntervalSource

Division on integer intervals