3#ifndef LALA_PC_FORMULA_HPP
4#define LALA_PC_FORMULA_HPP
6#include "lala/universes/arith_bound.hpp"
11template <
class AD,
class Allocator>
14template <
class AD,
class Allocator>
18 using U =
typename A::local_universe;
25 template <
class A2,
class Alloc>
40 : tellv(std::move(tellv)), not_tellv(std::move(not_tellv)), askv(std::move(askv)), not_askv(std::move(not_askv)) {}
45 template <
class A2,
class Alloc2>
47 : tellv(other.tellv, alloc), not_tellv(other.not_tellv, alloc)
48 , askv(other.askv, alloc), not_askv(other.not_askv, alloc) {}
51 CUDA local::B
ask(
const A& a)
const {
55 CUDA local::B
nask(
const A& a)
const {
56 return a.ask(not_askv);
60 return a.deduce(tellv);
64 return a.deduce(not_tellv);
67 CUDA NI
void print(
const A& a)
const {
68 printf(
"<abstract element (%d)>", a.aty());
71 template <
class Env,
class Allocator2 =
typename Env::allocator_type>
72 CUDA NI TFormula<Allocator2>
deinterpret(
const A& a,
const Env& env, AType, Allocator2 allocator = Allocator2())
const {
73 return a.deinterpret(tellv, env, allocator);
76 CUDA
size_t length()
const {
return 1; }
80template<
class AD,
bool neg>
84 using U =
typename A::local_universe;
86 template <
class A2,
bool neg2>
96 template <
class A2,
class Alloc>
100 template<
bool negate>
101 CUDA local::B ask_impl(
const A& a)
const {
103 a.project(avar, tmp);
104 if constexpr(negate) {
105 return tmp <= U::eq_zero();
108 return !(tmp >= U::eq_zero());
112 template <
bool negate>
113 CUDA
bool deduce_impl(
A& a)
const {
114 if constexpr(negate) {
115 return a.embed(avar, U::eq_zero());
118 return a.embed(avar, U::eq_one());
126 CUDA local::B
ask(
const A& a)
const {
127 return ask_impl<neg>(a);
133 CUDA local::B
nask(
const A& a)
const {
134 return ask_impl<!neg>(a);
141 return deduce_impl<neg>(a);
148 return deduce_impl<!neg>(a);
152 if constexpr(neg) { printf(
"not "); }
153 printf(
"(%d,%d)", avar.aty(), avar.vid());
156 template <
class Env,
class Allocator =
typename Env::allocator_type>
157 CUDA NI TFormula<Allocator>
deinterpret(
const A&,
const Env& env, AType apc, Allocator allocator = Allocator())
const {
158 using F = TFormula<Allocator>;
159 auto f = F::make_lvar(avar.aty(), LVar<Allocator>(env.name_of(avar), allocator));
161 f = F::make_unary(NOT, f, apc);
173 using U =
typename A::local_universe;
181 template <
class A2,
class Alloc>
184 CUDA local::B
ask(
const A& a)
const {
return a.is_bot(); }
185 CUDA local::B
nask(
const A&)
const {
return true; }
196 CUDA NI
void print(
const A& a)
const { printf(
"false"); }
198 template <
class Env,
class Allocator =
typename Env::allocator_type>
199 CUDA NI TFormula<Allocator>
deinterpret(
const A&,
const Env&, AType, Allocator allocator = Allocator())
const {
200 return TFormula<Allocator>::make_false();
210 using U =
typename A::local_universe;
218 template <
class A2,
class Alloc>
221 CUDA local::B
ask(
const A&)
const {
return true; }
222 CUDA local::B
nask(
const A& a)
const {
return a.is_bot(); }
231 CUDA
void print(
const A& a)
const { printf(
"true"); }
233 template <
class Env,
class Allocator =
typename Env::allocator_type>
234 CUDA TFormula<Allocator>
deinterpret(
const A&,
const Env&, AType, Allocator allocator = Allocator())
const {
235 return TFormula<Allocator>::make_true();
241template<
class AD,
class Allocator>
245 using U =
typename A::local_universe;
249 using sub_ptr = battery::unique_ptr<sub_type, allocator_type>;
251 template <
class A2,
class Alloc2>
262 template <
class A2,
class Alloc2>
264 : f(battery::allocate_unique<
sub_type>(alloc, *other.f, alloc))
265 , g(battery::allocate_unique<
sub_type>(alloc, *other.g, alloc))
268 CUDA local::B
ask(
const A& a)
const {
269 return f->ask(a) && g->ask(a);
272 CUDA local::B
nask(
const A& a)
const {
273 return f->nask(a) || g->nask(a);
277 bool has_changed = f->deduce(a);
278 has_changed |= g->deduce(a);
283 if(f->ask(a)) {
return g->contradeduce(a); }
284 else if(g->ask(a)) {
return f->contradeduce(a); }
294 template <
class Env,
class Allocator2 =
typename Env::allocator_type>
295 CUDA NI TFormula<Allocator2>
deinterpret(
const A& a,
const Env& env, AType apc, Allocator2 allocator = Allocator2())
const {
296 auto left = f->deinterpret(a, env, apc, allocator);
297 auto right = g->deinterpret(a, env, apc, allocator);
298 if(left.is_true()) {
return right; }
299 else if(right.is_true()) {
return left; }
300 else if(left.is_false()) {
return left; }
301 else if(right.is_false()) {
return right; }
303 return TFormula<Allocator2>::make_binary(left, AND, right, apc, allocator);
307 CUDA
size_t length()
const {
return 1 + f->length() + g->length(); }
310template<
class AD,
class Allocator>
314 using U =
typename A::local_universe;
318 using sub_ptr = battery::unique_ptr<sub_type, allocator_type>;
320 template <
class A2,
class Alloc2>
330 std::move(other.f), std::move(other.g)) {}
332 template <
class A2,
class Alloc2>
334 : f(battery::allocate_unique<
sub_type>(alloc, *other.f, alloc))
335 , g(battery::allocate_unique<
sub_type>(alloc, *other.g, alloc))
338 CUDA local::B
ask(
const A& a)
const {
339 return f->ask(a) || g->ask(a);
342 CUDA local::B
nask(
const A& a)
const {
343 return f->nask(a) && g->nask(a);
347 if(f->nask(a)) {
return g->deduce(a); }
348 else if(g->nask(a)) {
return f->deduce(a); }
353 bool has_changed = f->contradeduce(a);
354 has_changed |= g->contradeduce(a);
364 template <
class Env,
class Allocator2 =
typename Env::allocator_type>
365 CUDA NI TFormula<Allocator2>
deinterpret(
const A& a,
const Env& env, AType apc, Allocator2 allocator = Allocator2())
const {
366 auto left = f->deinterpret(a, env, apc, allocator);
367 auto right = g->deinterpret(a, env, apc, allocator);
368 if(left.is_true()) {
return left; }
369 else if(right.is_true()) {
return right; }
370 else if(left.is_false()) {
return right; }
371 else if(right.is_false()) {
return left; }
373 return TFormula<Allocator2>::make_binary(left, OR, right, apc, allocator);
377 CUDA
size_t length()
const {
return 1 + f->length() + g->length(); }
380template<
class AD,
class Allocator>
384 using U =
typename A::local_universe;
388 using sub_ptr = battery::unique_ptr<sub_type, allocator_type>;
390 template <
class A2,
class Alloc2>
400 std::move(other.f), std::move(other.g)) {}
402 template <
class A2,
class Alloc2>
404 : f(battery::allocate_unique<
sub_type>(alloc, *other.f, alloc))
405 , g(battery::allocate_unique<
sub_type>(alloc, *other.g, alloc))
408 CUDA local::B
ask(
const A& a)
const {
410 (f->ask(a) && g->ask(a)) ||
411 (f->nask(a) && g->nask(a));
415 CUDA local::B
nask(
const A& a)
const {
417 (f->ask(a) && g->nask(a)) ||
418 (f->nask(a) && g->ask(a));
422 if(f->ask(a)) {
return g->deduce(a); }
423 else if(f->nask(a)) {
return g->contradeduce(a); }
424 else if(g->ask(a)) {
return f->deduce(a); }
425 else if(g->nask(a)) {
return f->contradeduce(a); }
431 if(f->ask(a)) {
return g->contradeduce(a); }
432 else if(f->nask(a)) {
return g->deduce(a); }
433 else if(g->ask(a)) {
return f->contradeduce(a); }
434 else if(g->nask(a)) {
return f->deduce(a); }
444 template <
class Env,
class Allocator2 =
typename Env::allocator_type>
445 CUDA NI TFormula<Allocator2>
deinterpret(
const A& a,
const Env& env, AType apc, Allocator2 allocator = Allocator2())
const {
446 return TFormula<Allocator2>::make_binary(
447 f->deinterpret(a, env, apc, allocator), EQUIV, g->deinterpret(a, env, apc, allocator), apc, allocator);
450 CUDA
size_t length()
const {
return 1 + f->length() + g->length(); }
453template<
class AD,
class Allocator>
457 using U =
typename A::local_universe;
461 using sub_ptr = battery::unique_ptr<sub_type, allocator_type>;
463 template <
class A2,
class Alloc2>
473 std::move(other.f), std::move(other.g)) {}
475 template <
class A2,
class Alloc2>
477 : f(battery::allocate_unique<
sub_type>(alloc, *other.f, alloc))
478 , g(battery::allocate_unique<
sub_type>(alloc, *other.g, alloc))
482 CUDA local::B
ask(
const A& a)
const {
483 return f->nask(a) || g->ask(a);
487 CUDA local::B
nask(
const A& a)
const {
488 return f->ask(a) && g->nask(a);
492 if(f->ask(a)) {
return g->deduce(a); }
493 else if(g->nask(a)) {
return f->contradeduce(a); }
498 if(f->ask(a)) {
return g->contradeduce(a); }
499 else if(g->nask(a)) {
return f->deduce(a); }
509 template <
class Env,
class Allocator2 =
typename Env::allocator_type>
510 CUDA NI TFormula<Allocator2>
deinterpret(
const A& a,
const Env& env, AType apc, Allocator2 allocator = Allocator2())
const {
511 return TFormula<Allocator2>::make_binary(
512 f->deinterpret(a, env, apc, allocator), IMPLY, g->deinterpret(a, env, apc, allocator), apc, allocator);
515 CUDA
size_t length()
const {
return 1 + f->length() + g->length(); }
518template<
class AD,
class Allocator>
522 using U =
typename A::local_universe;
526 using sub_ptr = battery::unique_ptr<sub_type, allocator_type>;
528 template <
class A2,
class Alloc2>
538 std::move(other.f), std::move(other.g)) {}
540 template <
class A2,
class Alloc2>
542 : f(battery::allocate_unique<
sub_type>(alloc, *other.f, alloc))
543 , g(battery::allocate_unique<
sub_type>(alloc, *other.g, alloc))
546 CUDA local::B
ask(
const A& a)
const {
548 (f->ask(a) && g->nask(a)) ||
549 (f->nask(a) && g->ask(a));
552 CUDA local::B
nask(
const A& a)
const {
554 (f->ask(a) && g->ask(a)) ||
555 (f->ask(a) && g->nask(a));
559 if(f->ask(a)) {
return g->contradeduce(a); }
560 else if(f->nask(a)) {
return g->deduce(a); }
561 else if(g->ask(a)) {
return f->contradeduce(a); }
562 else if(g->nask(a)) {
return f->deduce(a); }
567 if(f->ask(a)) {
return g->deduce(a); }
568 else if(f->nask(a)) {
return g->contradeduce(a); }
569 else if(g->ask(a)) {
return f->deduce(a); }
570 else if(g->nask(a)) {
return f->contradeduce(a); }
580 template <
class Env,
class Allocator2 =
typename Env::allocator_type>
581 CUDA NI TFormula<Allocator2>
deinterpret(
const A& a,
const Env& env, AType apc, Allocator2 allocator = Allocator2())
const {
582 return TFormula<Allocator2>::make_binary(
583 f->deinterpret(a, env, apc, allocator), XOR, g->deinterpret(a, env, apc, allocator), apc, allocator);
586 CUDA
size_t length()
const {
return 1 + f->length() + g->length(); }
589template<
class AD,
class Allocator,
bool neg = false>
593 using U =
typename A::local_universe;
598 template <
class A2,
class Alloc2,
bool neg2>
602 using LB =
typename U::LB::local_type;
603 using UB =
typename U::UB::local_type;
612 template <
class A2,
class Alloc2>
614 left(other.left, alloc),
615 right(other.right, alloc)
619 template <
bool negate>
620 CUDA local::B ask_impl(
const A& a)
const {
625 if constexpr(negate) {
626 return fmeet(l, r).is_bot();
629 return l == r && dual<UB>(l.lb()) == l.ub();
633 template <
bool negate>
634 CUDA
bool deduce_impl(
A& a)
const {
637 bool has_changed =
false;
638 if constexpr(negate) {
641 if(dual<UB>(l.lb()) == l.ub()) {
642 if constexpr(U::complemented) {
643 return right.
embed(a, l.complement());
645 else if (U::preserve_concrete_covers && U::is_arithmetic) {
649 lb.meet_lb(LB::prev(l.lb()));
650 ub.meet_ub(UB::prev(l.ub()));
651 return right.
embed(a, fjoin(lb, ub));
657 if(dual<UB>(r.lb()) == r.ub()) {
658 if constexpr(U::complemented) {
659 return left.
embed(a, r.complement());
661 else if (U::preserve_concrete_covers && U::is_arithmetic) {
665 lb.meet_lb(LB::prev(r.lb()));
666 ub.meet_ub(UB::prev(r.ub()));
667 return left.
embed(a, fjoin(lb, ub));
675 has_changed = right.
embed(a, l);
679 has_changed |= left.
embed(a, r);
686 CUDA local::B
ask(
const A& a)
const {
687 return ask_impl<neg>(a);
690 CUDA local::B
nask(
const A& a)
const {
691 return ask_impl<!neg>(a);
695 return deduce_impl<neg>(a);
699 return deduce_impl<!neg>(a);
713 template <
class Env,
class Allocator2 =
typename Env::allocator_type>
714 CUDA NI TFormula<Allocator2>
deinterpret(
const A& a,
const Env& env, AType apc, Allocator2 allocator = Allocator2())
const {
715 auto lf = left.
deinterpret(a, env, apc, allocator);
716 auto rf = right.
deinterpret(a, env, apc, allocator);
717 return TFormula<Allocator2>::make_binary(std::move(lf), neg ? NEQ : EQ, std::move(rf), apc, allocator);
723template<
class AD,
class Allocator>
727template<
class AD,
class Allocator,
bool neg>
731 using U =
typename A::local_universe;
736 template <
class A2,
class Alloc2,
bool neg2>
740 using LB =
typename U::LB::local_type;
741 using UB =
typename U::UB::local_type;
750 template <
class A2,
class Alloc2>
752 left(other.left, alloc),
753 right(other.right, alloc)
757 template <
bool negate>
758 CUDA local::B ask_impl(
const A& a)
const {
763 if constexpr(negate) {
764 return dual<UB>(l.lb()) > r.ub();
767 return l.ub() <= dual<UB>(r.lb());
771 template <
bool negate>
772 CUDA
bool deduce_impl(
A& a)
const {
775 bool has_changed =
false;
777 if constexpr(negate) {
780 if constexpr(U::preserve_concrete_covers && U::is_arithmetic) {
781 r.meet_lb(LB::prev(r.lb()));
783 has_changed = left.
embed(a,
U(r.lb(), UB::top()));
787 if constexpr(U::preserve_concrete_covers && U::is_arithmetic) {
788 l.meet_ub(UB::prev(l.ub()));
790 has_changed |= right.
embed(a,
U(LB::top(), l.ub()));
797 has_changed |= left.
embed(a,
U(LB::top(), r.ub()));
801 has_changed = right.
embed(a,
U(l.lb(), UB::top()));
808 CUDA local::B
ask(
const A& a)
const {
809 return ask_impl<neg>(a);
812 CUDA local::B
nask(
const A& a)
const {
813 return ask_impl<!neg>(a);
817 return deduce_impl<neg>(a);
821 return deduce_impl<!neg>(a);
835 template <
class Env,
class Allocator2 =
typename Env::allocator_type>
836 CUDA NI TFormula<Allocator2>
deinterpret(
const A& a,
const Env& env, AType apc, Allocator2 allocator = Allocator2())
const {
837 auto lf = left.
deinterpret(a, env, apc, allocator);
838 auto rf = right.
deinterpret(a, env, apc, allocator);
839 return TFormula<Allocator2>::make_binary(std::move(lf), neg ? GT : LEQ, std::move(rf), apc, allocator);
845template<
class AD,
class Allocator>
848template<
class AD,
class Allocator>
861template <
class AD,
class Allocator>
867 using U =
typename A::local_universe;
869 using this_ptr = battery::unique_ptr<this_type, allocator_type>;
899 template <
class A2,
class Alloc2>
903 using VFormula = battery::variant<
922 template <
size_t I,
class FormulaType,
class A2,
class Alloc2>
924 return VFormula::template create<I>(FormulaType(battery::get<I>(other.formula), allocator));
927 template <
class A2,
class Alloc2>
929 switch(other.formula.index()) {
930 case IPVarLit:
return create_one<IPVarLit, PVarLit>(other, allocator);
931 case INVarLit:
return create_one<INVarLit, NVarLit>(other, allocator);
932 case ITrue:
return create_one<ITrue, True<A>>(other, allocator);
933 case IFalse:
return create_one<IFalse, False<A>>(other, allocator);
934 case ILeq:
return create_one<ILeq, Leq>(other, allocator);
935 case IGt:
return create_one<IGt, Gt>(other, allocator);
936 case IEq:
return create_one<IEq, Eq>(other, allocator);
937 case INeq:
return create_one<INeq, Neq>(other, allocator);
938 case IConj:
return create_one<IConj, Conj>(other, allocator);
939 case IDisj:
return create_one<IDisj, Disj>(other, allocator);
940 case IBicond:
return create_one<IBicond, Bicond>(other, allocator);
941 case IImply:
return create_one<IImply, Imply>(other, allocator);
942 case IXor:
return create_one<IXor, Xor>(other, allocator);
943 case IAE:
return create_one<IAE, AE>(other, allocator);
945 printf(
"BUG: formula not handled.\n");
947 return VFormula::template create<IFalse>(
False<A>());
951 CUDA
Formula(VFormula&& formula): formula(std::move(formula)) {}
954 CUDA NI
auto forward(F&& f)
const {
955 switch(formula.index()) {
956 case IPVarLit:
return f(battery::get<IPVarLit>(formula));
957 case INVarLit:
return f(battery::get<INVarLit>(formula));
958 case ITrue:
return f(battery::get<ITrue>(formula));
959 case IFalse:
return f(battery::get<IFalse>(formula));
960 case ILeq:
return f(battery::get<ILeq>(formula));
961 case IGt:
return f(battery::get<IGt>(formula));
962 case IEq:
return f(battery::get<IEq>(formula));
963 case INeq:
return f(battery::get<INeq>(formula));
964 case IConj:
return f(battery::get<IConj>(formula));
965 case IDisj:
return f(battery::get<IDisj>(formula));
966 case IBicond:
return f(battery::get<IBicond>(formula));
967 case IImply:
return f(battery::get<IImply>(formula));
968 case IXor:
return f(battery::get<IXor>(formula));
969 case IAE:
return f(battery::get<IAE>(formula));
971 printf(
"BUG: formula not handled.\n");
973 return f(False<A>());
978 CUDA NI
auto forward(F&& f) {
979 switch(formula.index()) {
980 case IPVarLit:
return f(battery::get<IPVarLit>(formula));
981 case INVarLit:
return f(battery::get<INVarLit>(formula));
982 case ITrue:
return f(battery::get<ITrue>(formula));
983 case IFalse:
return f(battery::get<IFalse>(formula));
984 case ILeq:
return f(battery::get<ILeq>(formula));
985 case IGt:
return f(battery::get<IGt>(formula));
986 case IEq:
return f(battery::get<IEq>(formula));
987 case INeq:
return f(battery::get<INeq>(formula));
988 case IConj:
return f(battery::get<IConj>(formula));
989 case IDisj:
return f(battery::get<IDisj>(formula));
990 case IBicond:
return f(battery::get<IBicond>(formula));
991 case IImply:
return f(battery::get<IImply>(formula));
992 case IXor:
return f(battery::get<IXor>(formula));
993 case IAE:
return f(battery::get<IAE>(formula));
995 printf(
"BUG: formula not handled.\n");
1007 template <
class A2,
class Alloc2>
1009 : formula(create(other, allocator))
1013 return formula.index() ==
kind;
1017 return formula.index();
1020 template <
size_t I,
class SubFormula>
1022 return Formula(VFormula::template create<I>(std::move(sub_formula)));
1046 return make<IGt>(
Gt(std::move(left), std::move(right)));
1050 return make<IEq>(
Eq(std::move(left), std::move(right)));
1084 return make<IAE>(
AE(std::move(tellv), std::move(not_tellv), std::move(askv), std::move(not_askv)));
1089 if(u <= U::eq_one()) {
return deduce(a); }
1096 if(a.is_bot()) { r.meet_bot(); }
1097 if(
ask(a)) { r.meet(U::eq_one()); }
1098 if(
nask(a)) { r.meet(U::eq_zero()); }
1099 r.meet(fjoin(U::eq_zero(), U::eq_one()));
1103 forward([&](
const auto& t) { t.print(a); });
1106 template <
class Env,
class Allocator2 =
typename Env::allocator_type>
1107 CUDA TFormula<Allocator2>
deinterpret(
const A& a,
const Env& env, AType apc, Allocator2 allocator = Allocator2())
const {
1108 return forward([&](
const auto& t) {
return t.deinterpret(a, env, apc, allocator); });
1113 CUDA local::B
ask(
const A& a)
const {
1114 return forward([&](
const auto& t) {
return t.ask(a); });
1119 return forward([&](
const auto& t) {
return t.nask(a); });
1124 return forward([&](
const auto& t) {
return t.deduce(a); });
1129 return forward([&](
const auto& t) {
return t.contradeduce(a); });
1133 return forward([](
const auto& t) {
return t.length(); });
Definition formula.hpp:15
CUDA NI TFormula< Allocator2 > deinterpret(const A &a, const Env &env, AType, Allocator2 allocator=Allocator2()) const
Definition formula.hpp:72
CUDA AbstractElement()
Definition formula.hpp:35
typename A::local_universe U
Definition formula.hpp:18
CUDA local::B nask(const A &a) const
Definition formula.hpp:55
CUDA bool deduce(A &a) const
Definition formula.hpp:59
CUDA NI void print(const A &a) const
Definition formula.hpp:67
Allocator allocator_type
Definition formula.hpp:19
AbstractElement(this_type &&other)=default
AD A
Definition formula.hpp:17
CUDA AbstractElement(const AbstractElement< A2, Alloc2 > &other, const allocator_type &alloc)
Definition formula.hpp:46
typename A::template tell_type< allocator_type > tell_type
Definition formula.hpp:21
CUDA bool contradeduce(A &a) const
Definition formula.hpp:63
typename A::template ask_type< allocator_type > ask_type
Definition formula.hpp:22
this_type & operator=(this_type &&other)=default
CUDA local::B ask(const A &a) const
Definition formula.hpp:51
CUDA AbstractElement(tell_type &&tellv, tell_type &¬_tellv, ask_type &&askv, ask_type &¬_askv)
Definition formula.hpp:37
CUDA size_t length() const
Definition formula.hpp:76
Definition formula.hpp:381
Allocator allocator_type
Definition formula.hpp:385
CUDA local::B ask(const A &a) const
Definition formula.hpp:408
CUDA Biconditional(const Biconditional< A2, Alloc2 > &other, const allocator_type &alloc)
Definition formula.hpp:403
CUDA NI void print(const A &a) const
Definition formula.hpp:438
AD A
Definition formula.hpp:383
CUDA size_t length() const
Definition formula.hpp:450
typename A::local_universe U
Definition formula.hpp:384
battery::unique_ptr< sub_type, allocator_type > sub_ptr
Definition formula.hpp:388
CUDA Biconditional(sub_ptr &&f, sub_ptr &&g)
Definition formula.hpp:398
CUDA Biconditional(this_type &&other)
Definition formula.hpp:399
CUDA bool contradeduce(A &a) const
Definition formula.hpp:430
CUDA local::B nask(const A &a) const
Definition formula.hpp:415
CUDA bool deduce(A &a) const
Definition formula.hpp:421
CUDA NI TFormula< Allocator2 > deinterpret(const A &a, const Env &env, AType apc, Allocator2 allocator=Allocator2()) const
Definition formula.hpp:445
Definition formula.hpp:242
battery::unique_ptr< sub_type, allocator_type > sub_ptr
Definition formula.hpp:249
CUDA Conjunction(const Conjunction< A2, Alloc2 > &other, const allocator_type &alloc)
Definition formula.hpp:263
CUDA bool contradeduce(A &a) const
Definition formula.hpp:282
typename A::local_universe U
Definition formula.hpp:245
Allocator allocator_type
Definition formula.hpp:246
CUDA local::B ask(const A &a) const
Definition formula.hpp:268
CUDA size_t length() const
Definition formula.hpp:307
CUDA NI TFormula< Allocator2 > deinterpret(const A &a, const Env &env, AType apc, Allocator2 allocator=Allocator2()) const
Definition formula.hpp:295
CUDA Conjunction(this_type &&other)
Definition formula.hpp:260
CUDA Conjunction(sub_ptr &&f, sub_ptr &&g)
Definition formula.hpp:259
CUDA NI void print(const A &a) const
Definition formula.hpp:288
CUDA local::B nask(const A &a) const
Definition formula.hpp:272
CUDA bool deduce(A &a) const
Definition formula.hpp:276
AD A
Definition formula.hpp:244
Definition formula.hpp:311
CUDA bool contradeduce(A &a) const
Definition formula.hpp:352
CUDA Disjunction(const Disjunction< A2, Alloc2 > &other, const allocator_type &alloc)
Definition formula.hpp:333
typename A::local_universe U
Definition formula.hpp:314
CUDA NI TFormula< Allocator2 > deinterpret(const A &a, const Env &env, AType apc, Allocator2 allocator=Allocator2()) const
Definition formula.hpp:365
CUDA Disjunction(sub_ptr &&f, sub_ptr &&g)
Definition formula.hpp:328
CUDA bool deduce(A &a) const
Definition formula.hpp:346
CUDA Disjunction(this_type &&other)
Definition formula.hpp:329
CUDA local::B ask(const A &a) const
Definition formula.hpp:338
CUDA NI void print(const A &a) const
Definition formula.hpp:358
battery::unique_ptr< sub_type, allocator_type > sub_ptr
Definition formula.hpp:318
CUDA size_t length() const
Definition formula.hpp:377
Allocator allocator_type
Definition formula.hpp:315
AD A
Definition formula.hpp:313
CUDA local::B nask(const A &a) const
Definition formula.hpp:342
Definition formula.hpp:590
CUDA bool deduce(A &a) const
Definition formula.hpp:694
CUDA Equality(this_type &&other)
Definition formula.hpp:610
CUDA size_t length() const
Definition formula.hpp:720
CUDA NI void print(const A &a) const
Definition formula.hpp:702
CUDA NI TFormula< Allocator2 > deinterpret(const A &a, const Env &env, AType apc, Allocator2 allocator=Allocator2()) const
Definition formula.hpp:714
CUDA Equality(sub_type &&left, sub_type &&right)
Definition formula.hpp:609
CUDA local::B nask(const A &a) const
Definition formula.hpp:690
CUDA Equality(const Equality< A2, Alloc2, neg > &other, const allocator_type &alloc)
Definition formula.hpp:613
CUDA local::B ask(const A &a) const
Definition formula.hpp:686
AD A
Definition formula.hpp:592
CUDA bool contradeduce(A &a) const
Definition formula.hpp:698
Allocator allocator_type
Definition formula.hpp:594
typename A::local_universe U
Definition formula.hpp:593
Definition formula.hpp:519
CUDA ExclusiveDisjunction(this_type &&other)
Definition formula.hpp:537
CUDA ExclusiveDisjunction(sub_ptr &&f, sub_ptr &&g)
Definition formula.hpp:536
CUDA local::B nask(const A &a) const
Definition formula.hpp:552
CUDA ExclusiveDisjunction(const ExclusiveDisjunction< A2, Alloc2 > &other, const allocator_type &alloc)
Definition formula.hpp:541
CUDA bool deduce(A &a) const
Definition formula.hpp:558
typename A::local_universe U
Definition formula.hpp:522
CUDA local::B ask(const A &a) const
Definition formula.hpp:546
CUDA NI TFormula< Allocator2 > deinterpret(const A &a, const Env &env, AType apc, Allocator2 allocator=Allocator2()) const
Definition formula.hpp:581
CUDA NI void print(const A &a) const
Definition formula.hpp:574
battery::unique_ptr< sub_type, allocator_type > sub_ptr
Definition formula.hpp:526
CUDA bool contradeduce(A &a) const
Definition formula.hpp:566
Allocator allocator_type
Definition formula.hpp:523
AD A
Definition formula.hpp:521
CUDA size_t length() const
Definition formula.hpp:586
Definition formula.hpp:170
AD A
Definition formula.hpp:172
CUDA bool deduce(A &a) const
Definition formula.hpp:187
CUDA local::B ask(const A &a) const
Definition formula.hpp:184
CUDA NI void print(const A &a) const
Definition formula.hpp:196
CUDA NI TFormula< Allocator > deinterpret(const A &, const Env &, AType, Allocator allocator=Allocator()) const
Definition formula.hpp:199
CUDA False(const False< A2 > &, const Alloc &)
Definition formula.hpp:182
CUDA bool contradeduce(A &) const
Definition formula.hpp:195
typename A::local_universe U
Definition formula.hpp:173
CUDA size_t length() const
Definition formula.hpp:203
CUDA local::B nask(const A &) const
Definition formula.hpp:185
Definition formula.hpp:454
CUDA bool deduce(A &a) const
Definition formula.hpp:491
CUDA Implication(const Implication< A2, Alloc2 > &other, const allocator_type &alloc)
Definition formula.hpp:476
CUDA bool contradeduce(A &a) const
Definition formula.hpp:497
CUDA Implication(sub_ptr &&f, sub_ptr &&g)
Definition formula.hpp:471
CUDA Implication(this_type &&other)
Definition formula.hpp:472
Allocator allocator_type
Definition formula.hpp:458
CUDA NI void print(const A &a) const
Definition formula.hpp:503
CUDA size_t length() const
Definition formula.hpp:515
CUDA NI TFormula< Allocator2 > deinterpret(const A &a, const Env &env, AType apc, Allocator2 allocator=Allocator2()) const
Definition formula.hpp:510
typename A::local_universe U
Definition formula.hpp:457
CUDA local::B nask(const A &a) const
Definition formula.hpp:487
CUDA local::B ask(const A &a) const
Definition formula.hpp:482
battery::unique_ptr< sub_type, allocator_type > sub_ptr
Definition formula.hpp:461
AD A
Definition formula.hpp:456
Definition formula.hpp:728
typename A::local_universe U
Definition formula.hpp:731
CUDA bool deduce(A &a) const
Definition formula.hpp:816
CUDA Inequality(const Inequality< A2, Alloc2, neg > &other, const allocator_type &alloc)
Definition formula.hpp:751
CUDA bool contradeduce(A &a) const
Definition formula.hpp:820
CUDA Inequality(sub_type &&left, sub_type &&right)
Definition formula.hpp:747
CUDA local::B nask(const A &a) const
Definition formula.hpp:812
CUDA NI void print(const A &a) const
Definition formula.hpp:824
Allocator allocator_type
Definition formula.hpp:732
CUDA Inequality(this_type &&other)
Definition formula.hpp:748
AD A
Definition formula.hpp:730
CUDA NI TFormula< Allocator2 > deinterpret(const A &a, const Env &env, AType apc, Allocator2 allocator=Allocator2()) const
Definition formula.hpp:836
CUDA local::B ask(const A &a) const
Definition formula.hpp:808
CUDA size_t length() const
Definition formula.hpp:842
CUDA TFormula< Allocator2 > deinterpret(const A &a, const Env &env, AType apc, Allocator2 allocator=Allocator2()) const
Definition terms.hpp:724
CUDA void print(const A &a) const
Definition terms.hpp:719
CUDA bool embed(A &a, const U &u) const
Definition terms.hpp:711
CUDA void project(const A &a, U &r) const
Definition terms.hpp:715
CUDA bool is(size_t kind) const
Definition terms.hpp:638
CUDA size_t length() const
Definition terms.hpp:728
static constexpr size_t IConstant
Definition terms.hpp:526
Definition formula.hpp:207
CUDA True(const True< A2 > &, const Alloc &)
Definition formula.hpp:219
CUDA size_t length() const
Definition formula.hpp:238
CUDA void print(const A &a) const
Definition formula.hpp:231
CUDA local::B ask(const A &) const
Definition formula.hpp:221
CUDA local::B nask(const A &a) const
Definition formula.hpp:222
AD A
Definition formula.hpp:209
CUDA bool deduce(A &) const
Definition formula.hpp:223
CUDA bool contradeduce(A &a) const
Definition formula.hpp:224
CUDA TFormula< Allocator > deinterpret(const A &, const Env &, AType, Allocator allocator=Allocator()) const
Definition formula.hpp:234
typename A::local_universe U
Definition formula.hpp:210
Definition formula.hpp:81
AD A
Definition formula.hpp:83
CUDA VariableLiteral(AVar avar)
Definition formula.hpp:94
CUDA bool contradeduce(A &a) const
Definition formula.hpp:147
CUDA NI void print(const A &a) const
Definition formula.hpp:151
typename A::local_universe U
Definition formula.hpp:84
CUDA VariableLiteral(const VariableLiteral< A2, neg > &other, const Alloc &)
Definition formula.hpp:97
CUDA local::B ask(const A &a) const
Definition formula.hpp:126
CUDA size_t length() const
Definition formula.hpp:166
VariableLiteral()=default
CUDA NI TFormula< Allocator > deinterpret(const A &, const Env &env, AType apc, Allocator allocator=Allocator()) const
Definition formula.hpp:157
CUDA bool deduce(A &a) const
Definition formula.hpp:140
CUDA local::B nask(const A &a) const
Definition formula.hpp:133