Lattice land propagators completion library
|
#include <pc.hpp>
Classes | |
struct | interpreted_type |
struct | snapshot_type |
Public Types | |
using | sub_type = A |
using | universe_type = typename A::universe_type |
using | local_universe_type = typename universe_type::local_type |
using | allocator_type = Allocator |
using | sub_allocator_type = typename A::allocator_type |
using | this_type = PC<sub_type, allocator_type> |
using | sub_ptr = abstract_ptr<sub_type> |
template<class Alloc > | |
using | formula_seq = battery::vector<pc::Formula<A, Alloc>, Alloc> |
template<class Alloc > | |
using | term_seq = battery::vector<pc::Term<A, Alloc>, Alloc> |
template<class Alloc > | |
using | tell_type = interpreted_type<Alloc, typename sub_type::template tell_type<Alloc>> |
template<class Alloc > | |
using | ask_type = interpreted_type<Alloc, typename sub_type::template ask_type<Alloc>> |
Public Member Functions | |
CUDA | PC (AType atype, sub_ptr sub, const allocator_type &alloc=allocator_type{}) |
CUDA | PC (PC &&other) |
template<class A2 , class Alloc2 , class... Allocators> | |
CUDA | PC (const PC< A2, Alloc2 > &other, AbstractDeps< Allocators... > &deps) |
CUDA allocator_type | get_allocator () const |
CUDA AType | aty () const |
template<IKind kind, bool diagnose = false, class F , class Env , class I > | |
CUDA NI bool | interpret (const F &f, Env &env, I &intermediate, IDiagnostics &diagnostics) const |
template<bool diagnose = false, class F , class Env , class Alloc2 > | |
CUDA NI bool | interpret_tell (const F &f, Env &env, tell_type< Alloc2 > &tell, IDiagnostics &diagnostics) const |
template<bool diagnose = false, class F , class Env , class Alloc2 > | |
CUDA NI bool | interpret_ask (const F &f, const Env &env, ask_type< Alloc2 > &ask, IDiagnostics &diagnostics) const |
template<class Alloc2 > | |
CUDA local::B | deduce (const tell_type< Alloc2 > &t) |
CUDA bool | embed (AVar x, const universe_type &dom) |
template<class Alloc2 > | |
CUDA local::B | ask (const ask_type< Alloc2 > &t) const |
CUDA local::B | ask (size_t i) const |
CUDA size_t | num_deductions () const |
CUDA local::B | deduce (size_t i) |
CUDA local::B | is_bot () const |
CUDA local::B | is_top () const |
CUDA auto | operator[] (int x) const |
CUDA auto | project (AVar x) const |
template<class Univ > | |
CUDA void | project (AVar x, Univ &u) const |
CUDA size_t | vars () const |
template<class Alloc2 = allocator_type> | |
CUDA snapshot_type< Alloc2 > | snapshot (const Alloc2 &alloc=Alloc2()) const |
template<class Alloc2 > | |
CUDA void | restore (const snapshot_type< Alloc2 > &snap) |
template<class ExtractionStrategy = NonAtomicExtraction> | |
CUDA bool | is_extractable (const ExtractionStrategy &strategy=ExtractionStrategy()) const |
template<class B > | |
CUDA void | extract (B &ua) const |
template<class Env , class Allocator2 = typename Env::allocator_type> | |
CUDA NI TFormula< Allocator2 > | deinterpret (const Env &env, Allocator2 allocator=Allocator2()) const |
template<class I , class Env , class Allocator2 = typename Env::allocator_type> | |
CUDA NI TFormula< Allocator2 > | deinterpret (const I &intermediate, const Env &env, Allocator2 allocator=Allocator2()) const |
Static Public Member Functions | |
static CUDA this_type | bot (AType atype=UNTYPED, AType atype_sub=UNTYPED, const allocator_type &alloc=allocator_type(), const sub_allocator_type &sub_alloc=sub_allocator_type()) |
static CUDA this_type | top (AType atype=UNTYPED, AType atype_sub=UNTYPED, const allocator_type &alloc=allocator_type(), const sub_allocator_type &sub_alloc=sub_allocator_type()) |
template<class Env > | |
static CUDA this_type | bot (Env &env, const allocator_type &alloc=allocator_type(), const sub_allocator_type &sub_alloc=sub_allocator_type()) |
template<class Env > | |
static CUDA this_type | top (Env &env, const allocator_type &alloc=allocator_type(), const sub_allocator_type &sub_alloc=sub_allocator_type()) |
Static Public Attributes | |
static constexpr const bool | is_abstract_universe = false |
static constexpr const bool | sequential = sub_type::sequential |
static constexpr const bool | is_totally_ordered = false |
static constexpr const bool | preserve_bot = true |
static constexpr const bool | preserve_top = sub_type::preserve_top |
static constexpr const bool | preserve_join = sub_type::preserve_join |
static constexpr const bool | preserve_meet = sub_type::preserve_meet |
static constexpr const bool | injective_concretization = sub_type::injective_concretization |
static constexpr const bool | preserve_concrete_covers = sub_type::preserve_concrete_covers |
static constexpr const char * | name = "PC" |
Friends | |
template<class A2 , class Alloc2 > | |
class | PC |
PC is an abstract transformer built on top of an abstract domain A
. It is expected that A
has a projection function u = project(x)
. We also expect a tell(x, u, has_changed)
function to join the abstract universe u
in the domain of the variable x
. An example of abstract domain satisfying these requirements is VStore<Interval<ZInc>>
.
using lala::PC< A, Allocator >::sub_type = A |
using lala::PC< A, Allocator >::universe_type = typename A::universe_type |
using lala::PC< A, Allocator >::local_universe_type = typename universe_type::local_type |
using lala::PC< A, Allocator >::allocator_type = Allocator |
using lala::PC< A, Allocator >::sub_allocator_type = typename A::allocator_type |
using lala::PC< A, Allocator >::this_type = PC<sub_type, allocator_type> |
using lala::PC< A, Allocator >::sub_ptr = abstract_ptr<sub_type> |
using lala::PC< A, Allocator >::formula_seq = battery::vector<pc::Formula<A, Alloc>, Alloc> |
using lala::PC< A, Allocator >::term_seq = battery::vector<pc::Term<A, Alloc>, Alloc> |
using lala::PC< A, Allocator >::tell_type = interpreted_type<Alloc, typename sub_type::template tell_type<Alloc>> |
using lala::PC< A, Allocator >::ask_type = interpreted_type<Alloc, typename sub_type::template ask_type<Alloc>> |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
A special symbolic element representing top.
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
PC expects a non-conjunctive formula \( c \) which can either be interpreted in the sub-domain A
or in the current domain.
|
inline |
|
inline |
Note that we cannot add propagators in parallel (but modifying the underlying domain is ok). This is a current limitation that we should fix later on. Notes for later: To implement "telling of propagators", we would need to check if a propagator has already been added or not (for idempotency).
U
, meet them in place.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
true
if the underlying abstract element is bot, false
otherwise.
|
inline |
true
if the underlying abstract element is top and there is no deduction function, false
otherwise.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
An abstract element is extractable when it is not equal to bot, if all propagators are entailed and if the underlying abstract element is extractable.
|
inline |
Extract the current element into ua
.
is_extractable()
must be true
. For efficiency reason, if B
is a propagator completion, the propagators are not copied in ua
. (It is OK, since they are entailed, they don't bring information anymore.)
|
inline |
|
inline |
|
friend |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |