3 #ifndef LALA_CORE_PRE_B_HPP
4 #define LALA_CORE_PRE_B_HPP
6 #include "../logic/logic.hpp"
40 constexpr
static const char*
name =
"B";
48 template<
bool diagnose,
class F,
bool dualize=false>
51 if(f.b() == dualize) {
52 if constexpr(dualize) {
53 INTERPRETATION_WARNING(
"Overapproximating the constant `false` by the top element (which concretization gives {true, false}) in the `PreBD` domain.");
56 INTERPRETATION_WARNING(
"Overapproximating the constant `true` by the top element (which concretization gives {true, false}) in the `PreB` domain.");
69 template<
bool diagnose,
class F,
bool dualize=false>
72 if(f.b() == dualize) {
77 if constexpr(dualize) {
93 template<
bool diagnose,
class F,
bool dualize = false>
96 const auto& cty = battery::get<1>(f.exists());
98 k = dualize ?
top() :
bot();
102 const auto& vname = battery::get<0>(f.exists());
172 static_assert(sig ==
NOT,
"Unsupported unary function.");
175 default: assert(0);
return x;
182 "Unsupported binary function.");
184 case AND:
return x && y;
185 case OR:
return x || y;
186 case IMPLY:
return !x || y;
188 case EQ:
return x == y;
190 case NEQ:
return x != y;
191 default: assert(0);
return x;
Definition: diagnostics.hpp:19
#define INTERPRETATION_WARNING(MSG)
Definition: diagnostics.hpp:150
#define RETURN_INTERPRETATION_ERROR(MSG)
Definition: diagnostics.hpp:155
::lala::B<::battery::local_memory > B
Definition: b.hpp:12
Definition: abstract_deps.hpp:14
Sig
Definition: ast.hpp:94
@ XOR
Logical connector.
Definition: ast.hpp:114
@ NEQ
Equality relations.
Definition: ast.hpp:112
@ LEQ
Unary arithmetic function symbols.
Definition: ast.hpp:113
@ NOT
Unary arithmetic function symbols.
Definition: ast.hpp:114
@ IMPLY
Unary arithmetic function symbols.
Definition: ast.hpp:114
@ OR
Unary arithmetic function symbols.
Definition: ast.hpp:114
@ EQ
Unary arithmetic function symbols.
Definition: ast.hpp:112
@ LT
Unary arithmetic function symbols.
Definition: ast.hpp:113
@ AND
Unary arithmetic function symbols.
Definition: ast.hpp:114
@ EQUIV
Unary arithmetic function symbols.
Definition: ast.hpp:114
CUDA static constexpr NI bool is_supported_fun(Sig sig)
Definition: pre_b.hpp:154
constexpr static CUDA value_type one()
Definition: pre_b.hpp:43
constexpr static const bool is_totally_ordered
Definition: pre_b.hpp:33
constexpr static const char * name
Definition: pre_b.hpp:40
constexpr static const bool injective_concretization
Definition: pre_b.hpp:38
static constexpr CUDA bool strict_order(value_type x, value_type y)
Definition: pre_b.hpp:142
bool value_type
Definition: pre_b.hpp:28
constexpr static const bool preserve_bot
Definition: pre_b.hpp:34
static constexpr CUDA value_type top()
Definition: pre_b.hpp:128
constexpr static const bool preserve_join
Definition: pre_b.hpp:36
static constexpr CUDA value_type prev(value_type x)
Definition: pre_b.hpp:152
constexpr static const bool preserve_concrete_covers
Definition: pre_b.hpp:39
CUDA static constexpr NI value_type fun(value_type x, value_type y)
Definition: pre_b.hpp:180
constexpr static const bool preserve_meet
Definition: pre_b.hpp:37
static CUDA bool interpret_ask(const F &f, value_type &ask, IDiagnostics &diagnostics)
Definition: pre_b.hpp:70
constexpr static const bool preserve_top
Definition: pre_b.hpp:35
constexpr static const bool is_arithmetic
Definition: pre_b.hpp:41
static constexpr CUDA value_type meet(value_type x, value_type y)
Definition: pre_b.hpp:134
CUDA static NI bool interpret_type(const F &f, value_type &k, IDiagnostics &diagnostics)
Definition: pre_b.hpp:94
static CUDA bool interpret_tell(const F &f, value_type &tell, IDiagnostics &diagnostics)
Definition: pre_b.hpp:49
static constexpr CUDA Sig sig_order()
Definition: pre_b.hpp:119
PreBD dual_type
Definition: pre_b.hpp:27
static constexpr CUDA value_type join(value_type x, value_type y)
Definition: pre_b.hpp:131
constexpr static const bool is_natural
Definition: pre_b.hpp:30
static constexpr CUDA Sig sig_strict_order()
Definition: pre_b.hpp:122
static constexpr CUDA value_type fun(value_type x)
Definition: pre_b.hpp:171
static constexpr CUDA value_type bot()
Definition: pre_b.hpp:125
static constexpr CUDA bool order(value_type x, value_type y)
Definition: pre_b.hpp:138
static constexpr CUDA value_type next(value_type x)
Definition: pre_b.hpp:147
constexpr static CUDA value_type zero()
Definition: pre_b.hpp:42