package mopsa
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=9f673f79708b44a7effb3b6bb3618d2c
sha512=cb91cb428e43a22f1abbcb8219710d0c10a5b3756d0da392d4084b3b3a6157350776c596983e63def344f617d39964e91f244f60c07958695ee5c8c809a9f0f4
doc/congUtils/CongUtils/IntCong/index.html
Module CongUtils.IntCongSource
IntCong - Integer congruences.
We rely on Zarith for arithmetic operations.
Types
offset
The type of possibly empty congruence sets.
module I = ItvUtils.IntItvmodule B = ItvUtils.IntBoundArithmetic utilities
Greatest common divisor of |a| and |b|. 0 is neutral.
Returns the gcd, lcm and cofactors u, v such that ua+vb=gcd. Undefined if a or b is 0.
Wheter b is a multiple of a. Always true if b = 0.
As Z.erem, but rem_zero a 0 = a.
Constructors
Congruence overapproximating an 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 congruences.
Whether the congruence is included in the range lo,up.
Printing
Set operations
Abstract intersection.
Abstract intersection with lo,up.
Positive and negative part.
Intersects with
.
Keeps only non-zero elements.
Forward operations
Division (with truncation).
Remainder. Uses the C semantics for remainder (%).
Conversion from integer to boolean in 0,1: maps 0 to 0 (false) and non-zero to 1 (true). 0;1 is over-approximated as ℤ.
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. 0;1 is over-approximated as ℤ.
C comparison tests. Returns an interval included in 0,1 (a boolean)
C comparison tests. Returns a boolean if the test may succeed
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.
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.
Backward join: both arguments and intersected with the result.