dlinear
0.0.1
Delta-complete SMT solver for linear programming
|
Predicate abstraction is a method to convert a first-order logic formula into a Boolean formula. More...
#include <PredicateAbstractor.h>
Public Member Functions | |
PredicateAbstractor (const Config &config) | |
Construct a new PredicateAbstractor object with the given config . | |
Formula | Process (const Formula &f) |
Convert a first-order logic formula f into a Boolean formula by predicate abstraction. | |
Formula | Process (const std::vector< Formula > &formulas) |
Convert a vector first-order logic formula formulas into a Boolean formula by creating a single conjunction through predicate abstraction. | |
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 PredicateAbstractor. | |
Public Member Functions inherited from dlinear::GenericFormulaVisitor< Formula, Args... > | |
const IterationStats & | stats () const |
Get read-only access to the statistics of the FormulaVisitor. | |
const Config & | config () const |
Get read-only access to the configuration of the FormulaVisitor. | |
Private Member Functions | |
Formula | VisitFormula (const Formula &f) const override |
Visit an atomic formula. | |
Private Attributes | |
std::unordered_map< Variable, Formula > | var_to_formula_map_ |
Map from Boolean variable to previously converted formula. | |
std::unordered_map< Formula, Variable > | formula_to_var_map_ |
Map from previously converted formula to Boolean variable. | |
LinearFormulaFlattener | flattener_ |
Linear formula flattener. | |
Additional Inherited Members | |
Protected Member Functions inherited from dlinear::FormulaVisitor<> | |
FormulaVisitor (const Config &config, const std::string &class_name="FormulaVisitor") | |
Construct a new FormulaVisitor object with the given config . | |
Protected Member Functions inherited from dlinear::GenericFormulaVisitor< Formula, Args... > | |
GenericFormulaVisitor (const Config &config, const std::string &class_name="GenericFormulaVisitor") | |
Construct a new FormulaVisitor object with the given config . | |
Protected Attributes inherited from dlinear::GenericFormulaVisitor< Formula, Args... > | |
const Config & | config_ |
Configuration. | |
IterationStats | stats_ |
Statistics. | |
Predicate abstraction is a method to convert a first-order logic formula into a Boolean formula.
The boolean formula will be a boolean variable or a conjunction of boolean variables. The object keeps a bijective map between newly introduced the boolean variables and the first-order logic formulae.
Definition at line 27 of file PredicateAbstractor.h.
|
inlineexplicit |
Construct a new PredicateAbstractor object with the given config
.
config | configuration |
Definition at line 33 of file PredicateAbstractor.h.
Convert a first-order logic formula f
into a Boolean formula by predicate abstraction.
For example, a formula \( (x > 0) \land (y < 0) \) will be converted into \( b_1 \land b_2 \) while \( b_1 \) corresponds with \( x > 0 \) and \( b_2 \) corresponds with \( y < 0 \). The class provides operator[b]
which looks up the corresponding formula for a Boolean variable \( b \).
f | formula to be converted |
Definition at line 18 of file PredicateAbstractor.cpp.
Convert a vector first-order logic formula formulas
into a Boolean formula by creating a single conjunction through predicate abstraction.
For example, a formula \( (x > 0) \land (y < 0) \) will be converted into \( b_1 \land b_2 \) while \( b_1 \) corresponds with \( x > 0 \) and \( b_2 \) corresponds with \( y < 0 \). The class provides operator[b]
which looks up the corresponding formula for a Boolean variable \( b \).
f | formula to be converted |
Definition at line 25 of file PredicateAbstractor.cpp.
|
inlinenodiscard |
Get read-only access to the map of previously converted formulae to variable of the PredicateAbstractor.
Definition at line 61 of file PredicateAbstractor.h.
|
nodiscardoverrideprivate |
Visit an atomic formula.
It flattens the formula and creates a new Boolean variable if the formula is not present in the map. Otherwise, it returns the corresponding Boolean variable.
f | atomic formula to visit |
Definition at line 30 of file PredicateAbstractor.cpp.