package mopsa
Install
Dune Dependency
Authors
Maintainers
Sources
md5=fdee20e988343751de440b4f6b67c0f4
sha512=f5cbf1328785d3f5ce40155dada2d95e5de5cce4f084ea30cfb04d1ab10cc9403a26cfb3fa55d0f9da72244482130fdb89c286a9aed0d640bba46b7c00e09500
doc/itvUtils/ItvUtils/IntItv/index.html
Module ItvUtils.IntItv
Source
IntItv - Intervals for arbitrary precision integers.
We rely on Zarith for arithmetic operations, and IntBounds to represent unbounded intervals.
Types
The type of possibly empty intervals.
Constructors
Constructs a possibly empty interval.
Constructs a possibly empty interval.
Predicates
A total ordering (lexical ordering) returning -1, 0, or 1. Can be used as compare for sets, maps, etc.
Total ordering on possibly empty intervals.
Printing
Enumeration
List of elements, in increasing order. Raises an invalid argument if it is unbounded.
Set operations
Join of possibly empty intervals.
Join of a list of (non-empty) intervals.
Intersection of non-emtpty intervals (possibly empty)
Intersection of possibly empty intervals.
Meet of a list of (non-empty) intervals.
Positive and negative part.
Intersects with
.
Keeps only non-zero elements.
Forward operations
Given one or two interval argument(s), return the interval result.
Division (with truncation). Returns a list of 0, 1, or 2 intervals to remain precise.
Euclidian division (towards -oo). Returns a list of 0, 1, or 2 intervals to remain precise.
Division (with truncation). Returns a single (possibly empty) overapproximating interval.
Division (euclidian, towards -oo) Returns a single (possibly empty) overapproximating interval.
Remainder. Uses the C semantics for remainder (%).
Euclidian remainder. rounding towards -oo
Put back the interval inside lo,up
by modular arithmetics. Useful to model the effect of arithmetic or conversion overflow.
Conversion from integer to boolean in 0,1
: maps 0 to 0 (false) and non-zero to 1 (true).
Logical negation. Logical operation use the C semantics: they accept 0 and non-0 respectively as false and true, but they always return 0 and 1 respectively for false and true.
Bit operations
Bitshift left: multiplication by a power of 2.
Bitshift right: division by a power of 2 rounding towards -∞.
Unsigned bitshift right: division by a power of 2 with truncation.
Internal functions
Interval functions, based on the previous ones
Filters
Given two interval aruments, return the arguments assuming that the predicate holds.
Backward operations
Given one or two interval argument(s) and a result interval, return the argument(s) assuming the result in the operation is in the given result.
Fallback for backward unary operators
Fallback for backward binary operators
Backward join: both arguments are intersected with the result.