24#include "dlinear/symbolic/symbolic_environment.h"
25#include "dlinear/symbolic/symbolic_expression.h"
26#include "dlinear/symbolic/symbolic_expression_cell.h"
27#include "dlinear/symbolic/symbolic_expression_visitor.h"
28#include "dlinear/symbolic/symbolic_formula.h"
29#include "dlinear/symbolic/symbolic_formula_visitor.h"
30#include "dlinear/symbolic/symbolic_variables.h"
34#include "dlinear/symbolic/hash.h"
35#include "dlinear/symbolic/literal.h"
39using drake::symbolic::Environment;
40using drake::symbolic::Expression;
41using drake::symbolic::ExpressionAddFactory;
42using drake::symbolic::ExpressionKind;
43using drake::symbolic::Formula;
44using drake::symbolic::FormulaKind;
45using drake::symbolic::Variables;
46using drake::symbolic::VisitExpression;
47using drake::symbolic::VisitFormula;
59Formula
imply(
const Formula &f1,
const Formula &f2);
61Formula
imply(
const Variable &v,
const Formula &f);
63Formula
imply(
const Formula &f,
const Variable &v);
65Formula
imply(
const Variable &v1,
const Variable &v2);
68Formula
iff(
const Formula &f1,
const Formula &f2);
70Formula
iff(
const Variable &v,
const Formula &f);
72Formula
iff(
const Formula &f,
const Variable &v);
74Formula
iff(
const Variable &v1,
const Variable &v2);
83std::set<Formula>
map(
const std::set<Formula> &formulas,
const std::function<Formula(
const Formula &)> &func);
114bool is_cnf(
const Formula &f);
124bool HaveIntersection(
const Variables &variables1,
const Variables &variables2);
140Formula
DeltaWeaken(
const Formula &f,
double delta);
187std::vector<Variable>
CreateVector(
const std::string &prefix,
int size,
209std::ostream &operator<<(std::ostream &os,
const FormulaKind &kind);
211std::ostream &operator<<(std::ostream &os,
const ExpressionKind &kind);
215#ifdef DLINEAR_INCLUDE_FMT
217#include "dlinear/util/logging.h"
223OSTREAM_FORMATTER(dlinear::FormulaKind)
224OSTREAM_FORMATTER(dlinear::ExpressionKind)
Represents a symbolic form of an expression.
Type
Supported types of symbolic variables.
@ CONTINUOUS
A CONTINUOUS variable takes a mpq_class value.
Represents a set of variables.
Global namespace for the dlinear library.
Formula make_conjunction(const std::vector< Formula > &formulas)
Make conjunction of formulas.
Formula DeltaWeaken(const Formula &f, const double delta)
Weaken the input formula $p f by delta.
std::set< Formula > map(const std::set< Formula > &formulas, const std::function< Formula(const Formula &)> &func)
Given formulas = {f₁, ..., fₙ} and a func : Formula → Formula, map(formulas, func) returns a set {fun...
std::set< Formula > get_clauses(const Formula &f)
Returns the set of clauses in f.
bool is_cnf(const Formula &f)
Check if f is in CNF form.
RelationalOperator
Relational operators are used in formulas.
bool IsDifferentiable(const Formula &f)
Check if the formula f is symbolic-differentiable.
LpColBound operator!(LpColBound bound)
Invert the bound with delta == 0.
Formula iff(const Formula &f1, const Formula &f2)
Return a formula f1 ⇔ f2.
Formula imply(const Formula &f1, const Formula &f2)
Return a formula f1 ⇒ f2.
Formula DeltaStrengthen(const Formula &f, const double delta)
Strengthen the input formula $p f by delta.
Formula make_disjunction(const std::vector< Formula > &formulas)
Make disjunction of formulas.
LpColBound operator-(LpColBound bound)
Invert the bound with delta > 0.
std::vector< Variable > CreateVector(const std::string &prefix, const int size, const Variable::Type type)
Creates a vector of variables of type whose size is size.
bool is_clause(const Formula &f)
Check if f is a clause.
bool HaveIntersection(const Variables &variables1, const Variables &variables2)
Check if the intersection of variables1 and variables2 is non-empty.
bool is_atomic(const Formula &f)
Check if f is atomic.