47 [[nodiscard]]
virtual Result VisitFormula(
const Formula &f, Args... args)
const {
48 switch (f.get_kind()) {
49 case FormulaKind::False:
50 return VisitFalse(f, args...);
51 case FormulaKind::True:
52 return VisitTrue(f, args...);
53 case FormulaKind::Var:
54 return VisitVariable(f, args...);
56 return VisitEqualTo(f, args...);
57 case FormulaKind::Neq:
58 return VisitNotEqualTo(f, args...);
60 return VisitGreaterThan(f, args...);
61 case FormulaKind::Geq:
62 return VisitGreaterThanOrEqualTo(f, args...);
64 return VisitLessThan(f, args...);
65 case FormulaKind::Leq:
66 return VisitLessThanOrEqualTo(f, args...);
67 case FormulaKind::And:
68 return VisitConjunction(f, args...);
70 return VisitDisjunction(f, args...);
71 case FormulaKind::Not:
72 return VisitNegation(f, args...);
73 case FormulaKind::Forall:
74 return VisitForall(f, args...);
76 throw std::runtime_error(
"Unknown formula kind");
79 [[nodiscard]]
virtual Result VisitFalse(
const Formula &f, Args... args)
const = 0;
80 [[nodiscard]]
virtual Result VisitTrue(
const Formula &f, Args... args)
const = 0;
81 [[nodiscard]]
virtual Result VisitVariable(
const Formula &f, Args... args)
const = 0;
82 [[nodiscard]]
virtual Result VisitEqualTo(
const Formula &f, Args... args)
const = 0;
83 [[nodiscard]]
virtual Result VisitNotEqualTo(
const Formula &f, Args... args)
const = 0;
84 [[nodiscard]]
virtual Result VisitGreaterThan(
const Formula &f, Args... args)
const = 0;
85 [[nodiscard]]
virtual Result VisitGreaterThanOrEqualTo(
const Formula &f, Args... args)
const = 0;
86 [[nodiscard]]
virtual Result VisitLessThan(
const Formula &f, Args... args)
const = 0;
87 [[nodiscard]]
virtual Result VisitLessThanOrEqualTo(
const Formula &f, Args... args)
const = 0;
88 [[nodiscard]]
virtual Result VisitConjunction(
const Formula &f, Args... args)
const = 0;
89 [[nodiscard]]
virtual Result VisitDisjunction(
const Formula &f, Args... args)
const = 0;
90 [[nodiscard]]
virtual Result VisitNegation(
const Formula &f, Args... args)
const = 0;
91 [[nodiscard]]
virtual Result VisitForall(
const Formula &f, Args... args)
const = 0;