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:151
#define RETURN_INTERPRETATION_ERROR(MSG)
Definition diagnostics.hpp:156
Definition abstract_deps.hpp:14
@ 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
static constexpr const bool is_totally_ordered
Definition pre_b.hpp:33
CUDA static NI constexpr value_type fun(value_type x, value_type y)
Definition pre_b.hpp:180
static CUDA constexpr value_type bot()
Definition pre_b.hpp:125
static CUDA constexpr value_type next(value_type x)
Definition pre_b.hpp:147
static CUDA constexpr value_type join(value_type x, value_type y)
Definition pre_b.hpp:131
static constexpr const bool injective_concretization
Definition pre_b.hpp:38
static constexpr const bool preserve_join
Definition pre_b.hpp:36
static CUDA constexpr value_type fun(value_type x)
Definition pre_b.hpp:171
static constexpr const bool preserve_bot
Definition pre_b.hpp:34
bool value_type
Definition pre_b.hpp:28
static CUDA constexpr bool strict_order(value_type x, value_type y)
Definition pre_b.hpp:142
static CUDA constexpr value_type prev(value_type x)
Definition pre_b.hpp:152
static CUDA constexpr Sig sig_strict_order()
Definition pre_b.hpp:122
static CUDA constexpr value_type meet(value_type x, value_type y)
Definition pre_b.hpp:134
static CUDA bool interpret_ask(const F &f, value_type &ask, IDiagnostics &diagnostics)
Definition pre_b.hpp:70
CUDA static constexpr value_type zero()
Definition pre_b.hpp:42
CUDA static NI constexpr bool is_supported_fun(Sig sig)
Definition pre_b.hpp:154
CUDA static constexpr value_type one()
Definition pre_b.hpp:43
CUDA static NI bool interpret_type(const F &f, value_type &k, IDiagnostics &diagnostics)
Definition pre_b.hpp:94
static constexpr const bool is_natural
Definition pre_b.hpp:30
static constexpr const bool is_arithmetic
Definition pre_b.hpp:41
static constexpr const bool preserve_concrete_covers
Definition pre_b.hpp:39
static CUDA bool interpret_tell(const F &f, value_type &tell, IDiagnostics &diagnostics)
Definition pre_b.hpp:49
static CUDA constexpr value_type top()
Definition pre_b.hpp:128
PreBD dual_type
Definition pre_b.hpp:27
static constexpr const bool preserve_meet
Definition pre_b.hpp:37
static CUDA constexpr bool order(value_type x, value_type y)
Definition pre_b.hpp:138
static constexpr const bool preserve_top
Definition pre_b.hpp:35
static CUDA constexpr Sig sig_order()
Definition pre_b.hpp:119
static constexpr const char * name
Definition pre_b.hpp:40