dlinear  0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
FormulaVisitor.h
1
12#pragma once
13
14#include <string>
15
16#include "dlinear/symbolic/GenericFormulaVisitor.h"
17#include "dlinear/symbolic/symbolic.h"
18#include "dlinear/util/Config.h"
19#include "dlinear/util/Stats.h"
20
21namespace dlinear {
22
28template <class... Args>
29class FormulaVisitor : public GenericFormulaVisitor<Formula, Args...> {
30 protected:
36 explicit FormulaVisitor(const Config &config, const std::string &class_name = "FormulaVisitor")
37 : GenericFormulaVisitor<Formula, Args...>{config, class_name} {}
38
39 [[nodiscard]] Formula VisitFalse(const Formula &f, Args...) const override { return f; }
40 [[nodiscard]] Formula VisitTrue(const Formula &f, Args...) const override { return f; }
41 [[nodiscard]] Formula VisitVariable(const Formula &f, Args...) const override { return f; }
42 [[nodiscard]] Formula VisitEqualTo(const Formula &f, Args...) const override { return f; }
43 [[nodiscard]] Formula VisitNotEqualTo(const Formula &f, Args...) const override { return f; }
44 [[nodiscard]] Formula VisitGreaterThan(const Formula &f, Args...) const override { return f; }
45 [[nodiscard]] Formula VisitGreaterThanOrEqualTo(const Formula &f, Args...) const override { return f; }
46 [[nodiscard]] Formula VisitLessThan(const Formula &f, Args...) const override { return f; }
47 [[nodiscard]] Formula VisitLessThanOrEqualTo(const Formula &f, Args...) const override { return f; }
48 [[nodiscard]] Formula VisitConjunction(const Formula &f, Args...) const override { return f; }
49 [[nodiscard]] Formula VisitDisjunction(const Formula &f, Args...) const override { return f; }
50 [[nodiscard]] Formula VisitNegation(const Formula &f, Args...) const override { return f; }
51 [[nodiscard]] Formula VisitForall(const Formula &f, Args...) const override { return f; }
52};
53
54} // namespace dlinear
Simple dataclass used to store the configuration of the program.
Definition Config.h:38
This base class provides all the methods expected to visit the underlying formula and return a modifi...
FormulaVisitor(const Config &config, const std::string &class_name="FormulaVisitor")
Construct a new FormulaVisitor object with the given config.
Generic formula visitor implementing the visitor pattern.
Represents a symbolic form of a first-order logic formula.
Global namespace for the dlinear library.