dReal4
FormulaCell Class Referenceabstract

Represents an abstract class which is the base of concrete symbolic-formula classes (i.e. More...

#include </home/soonhokong/work/dreal4/third_party/com_github_robotlocomotion_drake/dreal/symbolic/symbolic_formula_cell.h>

Inheritance diagram for FormulaCell:
FormulaFalse FormulaForall FormulaNot FormulaTrue FormulaVar NaryFormulaCell RelationalFormulaCell FormulaAnd FormulaOr FormulaEq FormulaGeq FormulaGt FormulaLeq FormulaLt FormulaNeq

Public Member Functions

 FormulaCell ()=delete
 Default constructor (DELETED). More...
 
FormulaCelloperator= (FormulaCell &&f)=delete
 Move-assign (DELETED). More...
 
 FormulaCell (const FormulaCell &f)=delete
 Copy-construct a formula from an lvalue. More...
 
 FormulaCell (FormulaCell &&f)=delete
 Move-construct a formula from an rvalue (DELETED). More...
 
FormulaCelloperator= (const FormulaCell &f)=delete
 Copy-assign (DELETED). More...
 
FormulaKind get_kind () const
 Returns kind of formula. More...
 
size_t get_hash () const
 Returns hash of formula. More...
 
const VariablesGetFreeVariables () const
 Returns set of free variables in formula. More...
 
virtual bool EqualTo (const FormulaCell &c) const =0
 Checks structural equality. More...
 
virtual bool Less (const FormulaCell &c) const =0
 Checks ordering. More...
 
virtual bool Evaluate (const Environment &env) const =0
 Evaluates under a given environment. More...
 
virtual Formula Substitute (const ExpressionSubstitution &expr_subst, const FormulaSubstitution &formula_subst)=0
 Returns a Formula obtained by replacing all occurrences of the variables in s in the current formula cell with the corresponding expressions in s.
 
virtual std::ostream & Display (std::ostream &os) const =0
 Outputs string representation of formula into output stream os. More...
 
unsigned use_count () const
 Returns the reference count of this cell. More...
 
bool include_ite () const
 Returns true if this symbolic formula includes an ITE (If-Then-Else) expression. More...
 

Protected Member Functions

 FormulaCell (FormulaKind k, size_t hash, bool include_ite, Variables variables)
 Construct FormulaCell of kind k with hash. More...
 
virtual ~FormulaCell ()=default
 Default destructor. More...
 
Formula GetFormula ()
 Returns a Formula pointing to this FormulaCell. More...
 

Detailed Description

Represents an abstract class which is the base of concrete symbolic-formula classes (i.e.

symbolic::FormulaAnd, symbolic::FormulaEq).

Note
It provides virtual function, FormulaCell::Display, because operator<< is not allowed to be a virtual function.

Constructor & Destructor Documentation

◆ FormulaCell() [1/4]

FormulaCell ( )
delete

Default constructor (DELETED).

◆ FormulaCell() [2/4]

FormulaCell ( const FormulaCell f)
delete

Copy-construct a formula from an lvalue.

(DELETED)

◆ FormulaCell() [3/4]

FormulaCell ( FormulaCell &&  f)
delete

Move-construct a formula from an rvalue (DELETED).

◆ FormulaCell() [4/4]

FormulaCell ( FormulaKind  k,
size_t  hash,
bool  include_ite,
Variables  variables 
)
protected

Construct FormulaCell of kind k with hash.

◆ ~FormulaCell()

virtual ~FormulaCell ( )
protectedvirtualdefault

Default destructor.

Member Function Documentation

◆ Display()

virtual std::ostream& Display ( std::ostream &  os) const
pure virtual

Outputs string representation of formula into output stream os.

Implemented in FormulaForall, FormulaNot, FormulaOr, FormulaAnd, FormulaLeq, FormulaLt, FormulaGeq, FormulaGt, FormulaNeq, FormulaEq, FormulaVar, FormulaFalse, and FormulaTrue.

◆ EqualTo()

virtual bool EqualTo ( const FormulaCell c) const
pure virtual

Checks structural equality.

Implemented in FormulaForall, FormulaNot, FormulaVar, FormulaFalse, FormulaTrue, NaryFormulaCell, and RelationalFormulaCell.

◆ Evaluate()

virtual bool Evaluate ( const Environment env) const
pure virtual

◆ get_hash()

size_t get_hash ( ) const
inline

Returns hash of formula.

◆ get_kind()

FormulaKind get_kind ( ) const
inline

Returns kind of formula.

◆ GetFormula()

Formula GetFormula ( )
protected

Returns a Formula pointing to this FormulaCell.

◆ GetFreeVariables()

const Variables & GetFreeVariables ( ) const

Returns set of free variables in formula.

◆ include_ite()

bool include_ite ( ) const

Returns true if this symbolic formula includes an ITE (If-Then-Else) expression.

◆ Less()

virtual bool Less ( const FormulaCell c) const
pure virtual

◆ operator=() [1/2]

FormulaCell& operator= ( FormulaCell &&  f)
delete

Move-assign (DELETED).

◆ operator=() [2/2]

FormulaCell& operator= ( const FormulaCell f)
delete

Copy-assign (DELETED).

◆ use_count()

unsigned use_count ( ) const
inline

Returns the reference count of this cell.


The documentation for this class was generated from the following files: