Lattice Land Core Library
|
#include <nbitset.hpp>
Public Types | |
using | memory_type = Mem |
using | bitset_type = battery::bitset<N, Mem, T> |
using | this_type = NBitset<N, Mem, T> |
template<class M > | |
using | this_type2 = NBitset<N, M, T> |
using | local_type = this_type2<battery::local_memory> |
using | LB = local::ZLB |
using | UB = local::ZUB |
using | value_type = typename LB::value_type |
Public Member Functions | |
CUDA constexpr | NBitset () |
CUDA constexpr | NBitset (const this_type &other) |
constexpr | NBitset (this_type &&)=default |
CUDA constexpr | NBitset (value_type x) |
CUDA constexpr | NBitset (value_type lb, value_type ub) |
template<class M > | |
CUDA constexpr | NBitset (const this_type2< M > &other) |
template<class M > | |
CUDA constexpr | NBitset (this_type2< M > &&other) |
template<class M > | |
CUDA constexpr | NBitset (const battery::bitset< N, M, T > &bits) |
template<class M > | |
CUDA constexpr this_type & | operator= (const this_type2< M > &other) |
CUDA constexpr this_type & | operator= (const this_type &other) |
CUDA constexpr local::B | is_top () const |
CUDA constexpr local::B | is_bot () const |
CUDA constexpr const bitset_type & | value () const |
CUDA constexpr LB | lb () const |
CUDA constexpr UB | ub () const |
CUDA constexpr local_type | complement () const |
CUDA constexpr void | join_top () |
template<class A > | |
CUDA constexpr bool | join_lb (const A &lb) |
template<class A > | |
CUDA constexpr bool | join_ub (const A &ub) |
template<class M > | |
CUDA constexpr bool | join (const this_type2< M > &other) |
CUDA constexpr void | meet_bot () |
template<class A > | |
CUDA constexpr bool | meet_lb (const A &lb) |
template<class A > | |
CUDA constexpr bool | meet_ub (const A &ub) |
template<class M > | |
CUDA constexpr bool | meet (const this_type2< M > &other) |
template<class M > | |
CUDA constexpr bool | extract (this_type2< M > &ua) const |
template<class Env , class Allocator = typename Env::allocator_type> | |
CUDA TFormula< Allocator > | deinterpret (AVar x, const Env &env, const Allocator &allocator=Allocator()) const |
template<class F > | |
CUDA NI F | deinterpret () const |
CUDA NI void | print () const |
CUDA constexpr void | neg (const local_type &x) |
CUDA constexpr void | abs (const local_type &x) |
CUDA constexpr void | project (Sig fun, const local_type &x) |
CUDA constexpr void | additive_inverse (const local_type &x) |
CUDA constexpr void | project (Sig fun, const local_type &x, const local_type &y) |
CUDA constexpr local_type | width () const |
CUDA constexpr local_type | median () const |
Static Public Member Functions | |
CUDA static constexpr this_type | from_set (const battery::vector< int > &values) |
CUDA static constexpr local_type | eq_zero () |
CUDA static constexpr local_type | eq_one () |
CUDA static constexpr local_type | bot () |
CUDA static constexpr local_type | top () |
template<bool diagnose = false, class F , class Env , class M > | |
CUDA static NI bool | interpret_tell (const F &f, const Env &env, this_type2< M > &tell, IDiagnostics &diagnostics) |
template<bool diagnose = false, class F , class Env , class M > | |
CUDA static NI bool | interpret_ask (const F &f, const Env &env, this_type2< M > &k, IDiagnostics &diagnostics) |
template<IKind kind, bool diagnose = false, class F , class Env , class M > | |
CUDA static NI bool | interpret (const F &f, const Env &env, this_type2< M > &k, IDiagnostics &diagnostics) |
CUDA NI static constexpr bool | is_trivial_fun (Sig sig) |
Static Public Attributes | |
static constexpr const bool | is_abstract_universe = true |
static constexpr const bool | sequential = Mem::sequential |
static constexpr const bool | is_totally_ordered = false |
static constexpr const bool | preserve_bot = true |
static constexpr const bool | preserve_top = true |
static constexpr const bool | preserve_join = true |
static constexpr const bool | preserve_meet = true |
static constexpr const bool | injective_concretization = true |
static constexpr const bool | preserve_concrete_covers = false |
static constexpr const bool | complemented = true |
static constexpr const bool | is_arithmetic = true |
static constexpr const char * | name = "NBitset" |
Friends | |
template<size_t N2, class Mem2 , class T2 > | |
class | NBitset |
This class represents a set of integer values with a fixed-size bitset. In order to have well-defined arithmetic operations preserving bottom and top elements, the first and last bits (written L and R below) of the bitset are reserved. The meaning of L is to include all negative integers and the meaning of R is to include all integers greater than the size of the bitset. Given a bitset \( Lb_0b_1...b_nR \) of size n + 3, the concretization function is given as follows: \( \gamma(Lb_0b_1...b_nR) = \{ i \in \mathbb{Z} \mid 0 \leq i \leq n \land b_i = 1 \} \cup \{ i \in \mathbb{Z} \;|\; i < 0 \land L = 1 \} \cup \{ i \in \mathbb{Z} \;|\; i > n \land R = 1 \} \)
using lala::NBitset< N, Mem, T >::memory_type = Mem |
using lala::NBitset< N, Mem, T >::bitset_type = battery::bitset<N, Mem, T> |
using lala::NBitset< N, Mem, T >::this_type = NBitset<N, Mem, T> |
using lala::NBitset< N, Mem, T >::this_type2 = NBitset<N, M, T> |
using lala::NBitset< N, Mem, T >::local_type = this_type2<battery::local_memory> |
using lala::NBitset< N, Mem, T >::LB = local::ZLB |
using lala::NBitset< N, Mem, T >::UB = local::ZUB |
using lala::NBitset< N, Mem, T >::value_type = typename LB::value_type |
|
inlineconstexpr |
Initialize to top (all bits at 1
).
|
inlineconstexpr |
|
constexprdefault |
|
inlineconstexpr |
Given a value \( x \in U \) where \( U \) is the universe of discourse, we initialize a singleton bitset \( 0_0..1_{x+1}...0_n \).
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
The assignment operator can only be used in a sequential context. It is monotone but not extensive.
|
inlineconstexpr |
|
inlinestaticconstexpr |
Pre-interpreted formula x == 0
.
|
inlinestaticconstexpr |
Pre-interpreted formula x == 1
.
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlinestatic |
Support the following language where all constants k
are integer or Boolean values:
var x:Z
var x:B
x <op> k
where k
is an integer constant and <op>
in {==, !=, <, <=, >, >=}.x in S
where S
is a set of integers. It can be over-approximated if the element k
falls out of the bitset.
|
inlinestatic |
Support the same language than the "tell language" without existential.
|
inlinestatic |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
|
inline |
Deinterpret the current value to a logical constant. The lower bound is deinterpreted, and it is up to the user to check that interval is a singleton.
|
inline |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
friend |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |