10#include <unordered_map>
13#include "dlinear/symbolic/FormulaVisitor.h"
14#include "dlinear/symbolic/LinearFormulaFlattener.h"
15#include "dlinear/symbolic/literal.h"
16#include "dlinear/symbolic/symbolic.h"
17#include "dlinear/util/Config.h"
57 [[nodiscard]]
Formula Process(
const std::vector<Formula> &formulas);
58 [[nodiscard]]
Formula operator()(
const std::vector<Formula> &formulas);
64 [[nodiscard]]
const Formula &operator[](
const Variable &var)
const {
return var_to_formula_map_.at(var); }
76 [[nodiscard]] Formula
VisitFormula(
const Formula &f)
const override;
77 [[nodiscard]] Formula VisitAtomic(
const Formula &f)
const;
78 [[nodiscard]] Formula VisitEqualTo(
const Formula &f)
const override;
79 [[nodiscard]] Formula VisitNotEqualTo(
const Formula &f)
const override;
80 [[nodiscard]] Formula VisitGreaterThan(
const Formula &f)
const override;
81 [[nodiscard]] Formula VisitGreaterThanOrEqualTo(
const Formula &f)
const override;
82 [[nodiscard]] Formula VisitLessThan(
const Formula &f)
const override;
83 [[nodiscard]] Formula VisitLessThanOrEqualTo(
const Formula &f)
const override;
84 [[nodiscard]] Formula VisitConjunction(
const Formula &f)
const override;
85 [[nodiscard]] Formula VisitDisjunction(
const Formula &f)
const override;
86 [[nodiscard]] Formula VisitNegation(
const Formula &f)
const override;
87 [[nodiscard]] Formula VisitForall(
const Formula &f)
const override;
89 mutable std::unordered_map<Variable, Formula>
91 mutable std::unordered_map<Formula, Variable>
Simple dataclass used to store the configuration of the program.
Predicate abstraction is a method to convert a first-order logic formula into a Boolean formula.
Formula Process(const Formula &f)
Convert a first-order logic formula f into a Boolean formula by predicate abstraction.
Formula VisitFormula(const Formula &f) const override
Visit an atomic formula.
std::unordered_map< Formula, Variable > formula_to_var_map_
Map from previously converted formula to Boolean variable.
const std::unordered_map< Variable, Formula > & var_to_formula_map() const
Get read-only access to the map of previously converted formulae to variable of the PredicateAbstract...
PredicateAbstractor(const Config &config)
Construct a new PredicateAbstractor object with the given config.
std::unordered_map< Variable, Formula > var_to_formula_map_
Map from Boolean variable to previously converted formula.
LinearFormulaFlattener flattener_
Linear formula flattener.
Represents a symbolic variable.
Global namespace for the dlinear library.