carl
24.04
Computer ARithmetic Library
|
Represent an SMT formula, which can be an atom for some background theory or a boolean combination of (sub)formulas. More...
#include <Formula.h>
Public Types | |
using | const_iterator = typename Formulas< Pol >::const_iterator |
A constant iterator to a sub-formula of a formula. More... | |
using | const_reverse_iterator = typename Formulas< Pol >::const_reverse_iterator |
A constant reverse iterator to a sub-formula of a formula. More... | |
using | PolynomialType = Pol |
A typedef for the template argument. More... | |
Public Member Functions | |
Formula (FormulaType _type=FALSE) | |
Formula (Variable::Arg _booleanVar) | |
Formula (const Pol &_pol, Relation _rel) | |
Formula (const Constraint< Pol > &_constraint) | |
Formula (const VariableComparison< Pol > &_variableComparison) | |
Formula (const VariableAssignment< Pol > &_variableAssignment) | |
Formula (const BVConstraint &_constraint) | |
Formula (FormulaType _type, Formula &&_subformula) | |
Formula (FormulaType _type, const Formula &_subformula) | |
Formula (FormulaType _type, const Formula &_subformulaA, const Formula &_subformulaB) | |
Formula (FormulaType _type, const Formula &_subformulaA, const Formula &_subformulaB, const Formula &_subformulaC) | |
Formula (FormulaType _type, const FormulasMulti< Pol > &_subformulas) | |
Formula (FormulaType _type, const Formulas< Pol > &_subasts) | |
Formula (FormulaType _type, Formulas< Pol > &&_subasts) | |
Formula (FormulaType _type, const std::initializer_list< Formula< Pol >> &_subasts) | |
Formula (FormulaType _type, const FormulaSet< Pol > &_subasts) | |
Formula (FormulaType _type, FormulaSet< Pol > &&_subasts) | |
Formula (FormulaType _type, std::vector< Variable > &&_vars, const Formula &_term) | |
Formula (FormulaType _type, const std::vector< Variable > &_vars, const Formula &_term) | |
Formula (const UTerm &_lhs, const UTerm &_rhs, bool _negated) | |
Formula (UEquality &&_eq) | |
Formula (const UEquality &_eq) | |
Formula (const Formula &_formula) | |
Formula (Formula &&_formula) noexcept | |
~Formula () | |
Formula & | operator= (const Formula &_formula) |
Formula & | operator= (Formula &&_formula) |
double | activity () const |
void | set_activity (double _activity) const |
Sets the activity to the given value. More... | |
FormulaType | type () const |
std::size_t | hash () const |
std::size_t | id () const |
bool | is_true () const |
bool | is_false () const |
const Condition & | properties () const |
const Variables & | variables () const |
Formula | negated () const |
Formula | base_formula () const |
const Formula & | remove_negations () const |
const Formula & | subformula () const |
const Formula & | premise () const |
const Formula & | conclusion () const |
const Formula & | condition () const |
const Formula & | first_case () const |
const Formula & | second_case () const |
const std::vector< carl::Variable > & | quantified_variables () const |
const Formula & | quantified_formula () const |
const Formulas< Pol > & | subformulas () const |
const Constraint< Pol > & | constraint () const |
const VariableComparison< Pol > & | variable_comparison () const |
const VariableAssignment< Pol > & | variable_assignment () const |
const BVConstraint & | bv_constraint () const |
carl::Variable::Arg | boolean () const |
const UEquality & | u_equality () const |
size_t | size () const |
bool | empty () const |
const_iterator | begin () const |
const_iterator | end () const |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
const Formula & | back () const |
bool | property_holds (const Condition &_property) const |
Checks if the given property holds for this formula. More... | |
bool | is_atom () const |
bool | is_literal () const |
bool | is_boolean_combination () const |
bool | is_bound () const |
bool | is_nary () const |
bool | is_constraint_conjunction () const |
bool | is_real_constraint_conjunction () const |
bool | is_integer_constraint_conjunction () const |
bool | is_only_propositional () const |
Logic | logic () const |
bool | contains (const Formula &_formula) const |
bool | operator== (const Formula &_formula) const |
bool | operator!= (const Formula &_formula) const |
bool | operator< (const Formula &_formula) const |
bool | operator> (const Formula &_formula) const |
bool | operator<= (const Formula &_formula) const |
bool | operator>= (const Formula &_formula) const |
Formula | operator! () const |
Static Public Member Functions | |
static void | init (FormulaContent< Pol > &_content) |
Gets the propositions of this formula. More... | |
Private Member Functions | |
Formula (const FormulaContent< Pol > *_content) | |
Static Private Member Functions | |
static void | addConstraintProperties (const Constraint< Pol > &_constraint, Condition &_properties) |
Adds the propositions of the given constraint to the propositions of this formula. More... | |
Private Attributes | |
const FormulaContent< Pol > * | mpContent |
The content of this formula. More... | |
Friends | |
class | FormulaPool< Pol > |
class | FormulaContent< Pol > |
template<typename P > | |
std::ostream & | operator<< (std::ostream &os, const Formula< P > &f) |
The output operator of a formula. More... | |
Represent an SMT formula, which can be an atom for some background theory or a boolean combination of (sub)formulas.
using carl::Formula< Pol >::const_iterator = typename Formulas<Pol>::const_iterator |
using carl::Formula< Pol >::const_reverse_iterator = typename Formulas<Pol>::const_reverse_iterator |
using carl::Formula< Pol >::PolynomialType = Pol |
|
inlineexplicitprivate |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
staticprivate |
Adds the propositions of the given constraint to the propositions of this formula.
_constraint | The constraint to add propositions for. |
_properties |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
_formula | The pointer to the formula for which to check whether it points to a sub-formula of this formula. |
Definition at line 690 of file Formula.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Gets the propositions of this formula.
It updates and stores the propositions if they are not up to date, hence this method is quite efficient.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Checks if the given property holds for this formula.
(Very cheap operation which only relies on bit checks)
_property | The property to check this formula for. |
Definition at line 533 of file Formula.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
|
friend |
|
private |