Single_value_abstraction.Known_bits
Abstracts a number by bitwise information: each bit is marked by a bitvalue
which is either One
, Zero
or Unknown
include Sig.SingleValueAbstraction
include Sig.Doc
Type of abstract numbers, this represents a non-empty set of Z.t
val contains : t -> Z.t -> bool
contains zs z
is true
if and only if the concretization of zs
contains z
. This essentially defines the concretization t -> Z.t set
through its indicative function
val top : t
The top element, representing any number
val one : t
The best abstraction for the singleton {1}
val zero : t
The best abstraction for the singleton {0}
val non_zero : t
The best abstraction for Z \ {0}
subseteq l r
is true if and only if any number abstracted by l
is also abstracted by r
, e.g. if forall x, contains l x
implies contains r x
val is_singleton : t -> Z.t option
is_singleton zs
is Some z
if zs
represents the singleton {z}
of_ternary t
turns t
seen as {0}, {1}, or {0,1} into its best abstraction
to_ternary t
is used to convert to a boolean value for test. Any non-zero value is Ternary.t.True
, and zero
is Ternary.t.False
. A value containing both zero and non-zero values is Ternary.t.TrueFalse
module Forwards : sig ... end
Forward transfer functions for all expression constructs. Used to calculate the abstraction of an expression based on abstractions of its components
module Backwards : sig ... end
Backward transfer functions for all expression constructs. Used to refine abstractions of a constructs arguments given a precise abstraction of its results.