what4-domains-0.1: Abstract domains for What4 term simplification
Copyright(c) Galois Inc 2020
LicenseBSD3
Maintainerhuffman@galois.com
Safe HaskellNone
LanguageHaskell2010

What4.Domains.BV.Bitwise

Description

Provides a bitwise implementation of bitvector abstract domains.

Synopsis

Documentation

data Domain (w :: Nat) Source #

A bitwise interval domain, defined via a bitwise upper and lower bound. The ordering used here to construct the interval is the pointwise ordering on bits. In particular x [= y iff x .|. y == y, and a value x is in the set defined by the pair (lo,hi) just when lo [= x && x [= hi.

Constructors

BVBitInterval !Integer !Integer !Integer

BVDBitInterval mask lo hi. mask caches the value of 2^w - 1

Instances

Instances details
Show (Domain w) Source # 
Instance details

Defined in What4.Domains.BV.Bitwise

Methods

showsPrec :: Int -> Domain w -> ShowS #

show :: Domain w -> String #

showList :: [Domain w] -> ShowS #

Eq (Domain w) Source # 
Instance details

Defined in What4.Domains.BV.Bitwise

Methods

(==) :: Domain w -> Domain w -> Bool #

(/=) :: Domain w -> Domain w -> Bool #

Ord (Domain w) Source # 
Instance details

Defined in What4.Domains.BV.Bitwise

Methods

compare :: Domain w -> Domain w -> Ordering #

(<) :: Domain w -> Domain w -> Bool #

(<=) :: Domain w -> Domain w -> Bool #

(>) :: Domain w -> Domain w -> Bool #

(>=) :: Domain w -> Domain w -> Bool #

max :: Domain w -> Domain w -> Domain w #

min :: Domain w -> Domain w -> Domain w #

proper :: forall (w :: Nat). NatRepr w -> Domain w -> Bool Source #

O(w). Test if the domain satisfies its invariants.

bvdMask :: forall (w :: Nat). Domain w -> Integer Source #

O(1). Return the bitvector mask value from this domain.

member :: forall (w :: Nat). Domain w -> Integer -> Bool Source #

O(w). Test if the given integer value is a member of the abstract domain.

pmember :: forall (n :: Nat). NatRepr n -> Domain n -> Integer -> Bool Source #

Check that a domain is proper, and that the given value is a member

size :: forall (w :: Nat). Domain w -> Integer Source #

O(w). Compute how many concrete elements are in the abstract domain.

asSingleton :: forall (w :: Nat). Domain w -> Maybe Integer Source #

O(w). Test if this domain contains a single value, and return it if so.

nonempty :: forall (w :: Nat). Domain w -> Bool Source #

O(w). Returns true iff there is at least one element in this bitwise domain.

eq :: forall (w :: Nat). Domain w -> Domain w -> Maybe Bool Source #

O(w). Decide equality of two domains: 'Just True' if both are the same singleton, 'Just False' if they're disjoint, Nothing otherwise.

slt :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> Domain w -> Maybe Bool Source #

O(w). Check if all elements in one domain are signed-less-than all elements in the other.

ult :: forall (w :: Nat). Domain w -> Domain w -> Maybe Bool Source #

O(w). Check if all elements in one domain are unsigned-less-than all elements in the other.

domainsOverlap :: forall (w :: Nat). Domain w -> Domain w -> Bool Source #

O(w). Returns true iff the domains have some value in common.

bitbounds :: forall (w :: Nat). Domain w -> (Integer, Integer) Source #

O(1). Bitwise lower and upper bounds.

ubounds :: forall (w :: Nat). Domain w -> (Integer, Integer) Source #

O(1). Unsigned bounds for the domain. The low bit-pattern bound is also the unsigned minimum, and the high bit-pattern bound is also the unsigned maximum: setting unknown bits to 0 minimizes, setting them to 1 maximizes.

sbounds :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> (Integer, Integer) Source #

O(w). Signed bounds for the domain.

Lattice operations

top :: forall (w :: Nat). NatRepr w -> Domain w Source #

O(1). Top element of the lattice: represents all bitvectors of width w.

any :: forall (w :: Nat). NatRepr w -> Domain w Source #

Deprecated: Use top instead

O(w). Bitwise domain containing every bitvector value.

bottom :: forall (w :: Nat). NatRepr w -> Domain w Source #

O(1). Bottom element of the lattice: represents the empty set of bitvectors. This is an improper domain whose membership predicate is unsatisfiable.

isBottom :: forall (w :: Nat). Domain w -> Bool Source #

O(1).

join :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w). Lattice join: pointwise least upper bound on the bit-level bitle ordering.

union :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

Deprecated: Use join instead

meet :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w). Lattice meet: pointwise greatest lower bound on the bit-level bitle ordering. If both inputs are proper (or bottom), so is the result.

intersection :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

Deprecated: Use meet instead

leq :: forall (w :: Nat). Domain w -> Domain w -> Bool Source #

O(w). Lattice ordering: leq a b returns True if every concrete value represented by a is also represented by b.

Operations

singleton :: forall (w :: Nat). NatRepr w -> Integer -> Domain w Source #

O(w). Return a domain containing just the given value.

range :: forall (w :: Nat). NatRepr w -> Integer -> Integer -> Domain w Source #

O(w). Construct a domain from bitwise lower and upper bounds.

interval :: forall (w :: Nat). Integer -> Integer -> Integer -> Domain w Source #

O(1). Unsafe constructor for internal use.

concat :: forall (u :: Nat) (v :: Nat). NatRepr u -> Domain u -> NatRepr v -> Domain v -> Domain (u + v) Source #

O(u + v). concat a y returns a domain where each element in a has been concatenated with an element in y. The most-significant bits are a, and the least significant bits are y.

select :: forall (n :: Natural) (i :: Natural) (w :: Natural). (1 <= n, (i + n) <= w) => NatRepr i -> NatRepr n -> Domain w -> Domain n Source #

O(w). select i n a selects n bits starting from index i from a.

zext :: forall (w :: Natural) (u :: Natural). (1 <= w, (w + 1) <= u) => Domain w -> NatRepr u -> Domain u Source #

O(w). Zero-extend a domain to a larger width.

sext :: forall (w :: Natural) (u :: Natural). (1 <= w, (w + 1) <= u) => NatRepr w -> Domain w -> NatRepr u -> Domain u Source #

O(w). Sign-extend a domain to a larger width.

testBit :: forall (w :: Nat). Domain w -> Natural -> Maybe Bool Source #

O(w). Test bit i of every value in the domain: 'Just True' if it is set in every member, 'Just False' if clear in every member, Nothing if it varies.

shifts and rotates

shl :: forall (w :: Nat). NatRepr w -> Domain w -> Integer -> Domain w Source #

O(w). Shift left by a known amount.

lshr :: forall (w :: Nat). NatRepr w -> Domain w -> Integer -> Domain w Source #

O(w). Logical (zero-fill) shift right by a known amount.

ashr :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> Integer -> Domain w Source #

O(w). Arithmetic (sign-extending) shift right by a known amount.

rol :: forall (w :: Nat). NatRepr w -> Domain w -> Integer -> Domain w Source #

O(w). Rotate left by a known amount.

ror :: forall (w :: Nat). NatRepr w -> Domain w -> Integer -> Domain w Source #

O(w). Rotate right by a known amount.

shlAbstract :: forall (w :: Nat). NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w²). Shift left by an amount drawn from the domain b. See foldShifts for the algorithm.

More precisely, O(n · w) where w is the bitvector width and n = min(bh − bl + 1, w + 1) is the number of candidate shift amounts considered, with bl and bh the unsigned bounds of b.

lshrAbstract :: forall (w :: Nat). NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w²). Logical (zero-fill) shift right by an amount drawn from the domain b. See foldShifts for the algorithm.

More precisely, O(n · w) where w is the bitvector width and n = min(bh − bl + 1, w + 1) is the number of candidate shift amounts considered, with bl and bh the unsigned bounds of b.

ashrAbstract :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w²). Arithmetic (sign-extending) shift right by an amount drawn from the domain b. See foldShifts for the algorithm.

More precisely, O(n · w) where w is the bitvector width and n = min(bh − bl + 1, w + 1) is the number of candidate shift amounts considered, with bl and bh the unsigned bounds of b.

rolAbstract :: forall (w :: Nat). NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w²). Rotate left by an amount drawn from the domain b. See foldRotates for the algorithm.

More precisely, O(r · w) where w is the bitvector width and r is the number of distinct residues mod w that are reachable from b (at most w).

rorAbstract :: forall (w :: Nat). NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w²). Rotate right by an amount drawn from the domain b. Mirrors rolAbstract.

More precisely, O(r · w) where w is the bitvector width and r is the number of distinct residues mod w that are reachable from b (at most w).

shlAbstractSpec :: forall (w :: Nat). NatRepr w -> Domain w -> Domain w -> Domain w Source #

Declarative reference variant of shlAbstract: for every member y of the shift-amount domain, compute the per-shift result and union them all. Strictly slower; used to validate shlAbstract.

lshrAbstractSpec :: forall (w :: Nat). NatRepr w -> Domain w -> Domain w -> Domain w Source #

ashrAbstractSpec :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> Domain w -> Domain w Source #

rolAbstractSpec :: forall (w :: Nat). NatRepr w -> Domain w -> Domain w -> Domain w Source #

rorAbstractSpec :: forall (w :: Nat). NatRepr w -> Domain w -> Domain w -> Domain w Source #

arithmetic

add :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w). Add two bitwise domains.

sub :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w). Subtract: sub a b = add a (negate b).

negate :: forall (w :: Nat). Domain w -> Domain w Source #

O(w). Two's complement negation: negate a = not a + 1.

scale :: forall (w :: Nat). Integer -> Domain w -> Domain w Source #

O(w²). Multiply by a constant. Uses mulPrecise since the shift-and-add algorithm gives bit-level precision when one operand is concrete.

mul :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w). Multiply two bitwise domains via interval and trailing-zero analysis. Captures known leading bits (both 0s and 1s) derived from [aMin*bMin, aMax*bMax], plus known trailing zeros from the operands.

See mul for the algorithm. mulPrecise is strictly more precise; this is the cheaper alternative when middle-bit precision doesn't matter.

mulPrecise :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w²). Multiply two bitwise domains, combining the shift-and-add tristate-number algorithm (BPF tnum_mul) with the interval and trailing-zero analysis of mul. Strictly at least as precise as mul.

udiv :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w). Unsigned division via interval analysis on the quotient bounds. Assumes the divisor is nonzero.

Captures known leading bits (both 0s and 1s) derived from [aMin `quot` bMax, aMax `quot` bMin]. When the divisor is a known power of two, the result is exact (bit-level structure of the dividend is preserved, e.g. udiv (any w) (singleton w (2^k)) has its top k bits known zero). udivPrecise is strictly more precise; this is the cheaper alternative when middle-bit precision doesn't matter.

urem :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w). Unsigned remainder via leading-zero analysis. Assumes the divisor is nonzero.

The result is bounded above by min(aMax, bMax - 1); bits above that are known zero. (The remainder's lower bound is trivially 0, so the same interval-agreement analysis used in udiv would not yield additional leading bits here.) When the divisor is a known power of two, urem a (singleton w (2^k)) is exactly the low k bits of a.

sdiv :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w). Signed division (rounds toward zero). Assumes the divisor is nonzero.

Implemented by splitting each operand on its sign bit into a non-negative "zero circle" and a negative "one circle", applying udiv to the absolute values, fixing up the sign, and joining the resulting subcases.

srem :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w). Signed remainder (sign of dividend). Assumes the divisor is nonzero.

Implemented like sdiv, except the result takes the sign of the dividend rather than the XOR of the input signs. Additionally, leading bits of the result are refined using magnitude bounds: if the dividend is non-negative, the result has leading zeros from both the dividend and divisor magnitude; if negative and nonzero, it has leading ones similarly.

udivPrecise :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w²). Unsigned division combining abstract schoolbook long division with the interval analysis of udiv. Assumes the divisor is nonzero. Strictly at least as precise as udiv.

The result is the intersection of udiv (interval analysis on the quotient bounds, plus an exact path for power-of-two divisors) and the schoolbook result (which captures middle-bit structure that interval analysis can't see, but joins through any undetermined comparison and so loses on power-of-two divisors).

uremPrecise :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w²). Unsigned remainder combining schoolbook long division with the leading-zero analysis of urem. Assumes the divisor is nonzero. Strictly at least as precise as urem.

arithmetic (SMT-LIB div-by-zero semantics)

udivSmtlib :: forall (w :: Natural). 1 <= w => Domain w -> Domain w -> Domain w Source #

O(w). Like udiv, but using the SMT-LIB FixedSizeBitVectors theory's div-by-zero semantics: bvudiv s 0 is the all-ones bitvector. See Note [SMT-LIB division] in What4.Interface for the design rationale.

uremSmtlib :: forall (w :: Natural). 1 <= w => Domain w -> Domain w -> Domain w Source #

O(w). Like urem, but using the SMT-LIB FixedSizeBitVectors theory's div-by-zero semantics: bvurem s 0 is the dividend itself (s). See Note [SMT-LIB division] in What4.Interface for the design rationale.

sdivSmtlib :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w). Like sdiv, but using the SMT-LIB QF_BV logic's div-by-zero convention: bvsdiv s 0 is all-ones when s is non-negative and 1 when s is negative. See Note [SMT-LIB division] in What4.Interface for the design rationale.

sremSmtlib :: forall (w :: Natural). 1 <= w => NatRepr w -> Domain w -> Domain w -> Domain w Source #

O(w). Like srem, but using the SMT-LIB QF_BV logic's div-by-zero convention: bvsrem s 0 is the dividend itself (s). See Note [SMT-LIB division] in What4.Interface for the design rationale.

bitwise logical

and :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w). Bitwise AND of two domains.

or :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w). Bitwise OR of two domains.

xor :: forall (w :: Nat). Domain w -> Domain w -> Domain w Source #

O(w). Bitwise XOR of two domains.

not :: forall (w :: Nat). Domain w -> Domain w Source #

O(w). Bitwise complement.

Correctness properties

genDomain :: forall (w :: Nat). NatRepr w -> Gen (Domain w) Source #

Random generator for domain values. We always generate nonempty domain values.

genElement :: forall (w :: Nat). Domain w -> Gen Integer Source #

genPair :: forall (w :: Nat). NatRepr w -> Gen (Domain w, Integer) Source #

Generate a random nonempty domain and an element contained in that domain.

correct_any :: forall (n :: Natural). 1 <= n => NatRepr n -> Integer -> Property Source #

correct_singleton :: forall (n :: Natural). 1 <= n => NatRepr n -> Integer -> Integer -> Property Source #

correct_overlap :: forall (n :: Nat). Domain n -> Domain n -> Integer -> Property Source #

correct_overlap_inv :: forall (n :: Nat). Domain n -> Domain n -> Property Source #

If domainsOverlap returns True, then a shared witness exists at the bitwise OR of the two low masks.

correct_asSingleton :: forall (n :: Natural). 1 <= n => NatRepr n -> Domain n -> Property Source #

correct_union :: forall (n :: Natural). 1 <= n => NatRepr n -> Domain n -> Domain n -> Integer -> Property Source #

correct_intersection :: forall (n :: Natural). 1 <= n => Domain n -> Domain n -> Integer -> Property Source #

correct_join :: forall (n :: Natural). 1 <= n => NatRepr n -> Domain n -> Domain n -> Integer -> Property Source #

correct_meet :: forall (n :: Natural). 1 <= n => Domain n -> Domain n -> Integer -> Property Source #

precise_meet :: forall (n :: Natural). 1 <= n => Domain n -> Domain n -> Integer -> Property Source #

Precision of meet: if x is a member of meet a b, then x is a member of both a and b.

correct_leq :: forall (n :: Nat). Domain n -> Domain n -> Integer -> Property Source #

Lattice laws

join_commutative :: forall (n :: Nat). Domain n -> Domain n -> Integer -> Property Source #

join_idempotent :: forall (n :: Nat). Domain n -> Integer -> Property Source #

meet_commutative :: forall (n :: Nat). Domain n -> Domain n -> Integer -> Property Source #

meet_idempotent :: forall (n :: Nat). Domain n -> Integer -> Property Source #

join_top :: forall (n :: Nat). NatRepr n -> Domain n -> Integer -> Property Source #

join_bottom :: forall (n :: Nat). NatRepr n -> Domain n -> Integer -> Property Source #

meet_top :: forall (n :: Nat). NatRepr n -> Domain n -> Integer -> Property Source #

meet_bottom :: forall (n :: Nat). NatRepr n -> Domain n -> Integer -> Property Source #

leq_reflexive :: forall (n :: Nat). Domain n -> Property Source #

leq_transitive :: forall (n :: Nat). Domain n -> Domain n -> Domain n -> Property Source #

meet_lower_bound :: forall (n :: Nat). Domain n -> Domain n -> Property Source #

join_upper_bound :: forall (n :: Nat). Domain n -> Domain n -> Property Source #

join_monotone :: forall (n :: Nat). Domain n -> Domain n -> Domain n -> Property Source #

meet_monotone :: forall (n :: Nat). Domain n -> Domain n -> Domain n -> Property Source #

join_associative :: forall (n :: Nat). Domain n -> Domain n -> Domain n -> Integer -> Property Source #

meet_associative :: forall (n :: Nat). Domain n -> Domain n -> Domain n -> Integer -> Property Source #

join_absorb :: forall (n :: Nat). Domain n -> Domain n -> Integer -> Property Source #

meet_absorb :: forall (n :: Nat). Domain n -> Domain n -> Integer -> Property Source #

join_proper :: forall (n :: Natural). 1 <= n => NatRepr n -> Domain n -> Domain n -> Property Source #

meet_proper :: forall (n :: Natural). 1 <= n => NatRepr n -> Domain n -> Domain n -> Property Source #

correct_zero_ext :: forall (w :: Natural) (u :: Natural). (1 <= w, (w + 1) <= u) => NatRepr w -> Domain w -> NatRepr u -> Integer -> Property Source #

correct_sign_ext :: forall (w :: Natural) (u :: Natural). (1 <= w, (w + 1) <= u) => NatRepr w -> Domain w -> NatRepr u -> Integer -> Property Source #

correct_concat :: forall (m :: Nat) (n :: Nat). NatRepr m -> (Domain m, Integer) -> NatRepr n -> (Domain n, Integer) -> Property Source #

correct_shrink :: forall (i :: Nat) (n :: Nat). NatRepr i -> NatRepr n -> (Domain (i + n), Integer) -> Property Source #

correct_trunc :: forall (n :: Nat) (w :: Nat). n <= w => NatRepr n -> (Domain w, Integer) -> Property Source #

correct_select :: forall (n :: Natural) (i :: Natural) (w :: Natural). (1 <= n, (i + n) <= w) => NatRepr i -> NatRepr n -> (Domain w, Integer) -> Property Source #

correct_shl :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> Integer -> Property Source #

correct_lshr :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> Integer -> Property Source #

correct_ashr :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> Integer -> Property Source #

correct_rol :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> Integer -> Property Source #

correct_ror :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> Integer -> Property Source #

correct_shlAbstract :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_lshrAbstract :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_ashrAbstract :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_rolAbstract :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_rorAbstract :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_equiv_shlAbstract :: forall (n :: Natural). 1 <= n => NatRepr n -> Domain n -> Domain n -> Property Source #

The optimized shlAbstract produces the same domain as the declarative shlAbstractSpec. Together with correct_shlAbstract, this proves shlAbstract is point-wise optimal at this domain.

correct_equiv_lshrAbstract :: forall (n :: Natural). 1 <= n => NatRepr n -> Domain n -> Domain n -> Property Source #

correct_equiv_ashrAbstract :: forall (n :: Natural). 1 <= n => NatRepr n -> Domain n -> Domain n -> Property Source #

correct_equiv_rolAbstract :: forall (n :: Natural). 1 <= n => NatRepr n -> Domain n -> Domain n -> Property Source #

correct_equiv_rorAbstract :: forall (n :: Natural). 1 <= n => NatRepr n -> Domain n -> Domain n -> Property Source #

correct_eq :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_ult :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_slt :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_ubounds :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> Property Source #

correct_sbounds :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> Property Source #

correct_add :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_sub :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_neg :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> Property Source #

correct_scale :: forall (n :: Natural). 1 <= n => NatRepr n -> Integer -> (Domain n, Integer) -> Property Source #

correct_mul :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_mulPrecise :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_udiv :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_urem :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_sdiv :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_srem :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_udivPrecise :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_uremPrecise :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_udivSmtlib :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_uremSmtlib :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_sdivSmtlib :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_sremSmtlib :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_and :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_or :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_not :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> Property Source #

correct_xor :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> (Domain n, Integer) -> Property Source #

correct_testBit :: forall (n :: Natural). 1 <= n => NatRepr n -> (Domain n, Integer) -> Natural -> Property Source #