souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Member Functions | Protected Attributes
souffle::ast::BooleanConstraint Class Reference

Boolean constraint class. More...

#include <BooleanConstraint.h>

Inheritance diagram for souffle::ast::BooleanConstraint:
Inheritance graph
Collaboration diagram for souffle::ast::BooleanConstraint:
Collaboration graph

Public Member Functions

 BooleanConstraint (bool truthValue, SrcLocation loc={})
 
BooleanConstraintclone () const override
 
bool isTrue () const
 Check whether constraint holds. More...
 
void set (bool value)
 Set truth value. More...
 
- Public Member Functions inherited from souffle::ast::analysis::Constraint< Var >
virtual bool update (Assignment< Var > &ass) const =0
 Requests the given assignment to be updated according to this constraint. More...
 
virtual ~Constraint ()=default
 A virtual destructor. More...
 

Protected Member Functions

bool equal (const Node &node) const override
 
void print (std::ostream &os) const override
 Adds print support for constraints (debugging) More...
 

Protected Attributes

bool truthValue
 Truth value of Boolean constraint. More...
 

Detailed Description

Boolean constraint class.

Example: true

Boolean constraint representing either the 'true' or the 'false' value

Definition at line 45 of file BooleanConstraint.h.

Constructor & Destructor Documentation

◆ BooleanConstraint()

souffle::ast::BooleanConstraint::BooleanConstraint ( bool  truthValue,
SrcLocation  loc = {} 
)
inline

Definition at line 47 of file BooleanConstraint.h.

50  {

Member Function Documentation

◆ clone()

BooleanConstraint* souffle::ast::BooleanConstraint::clone ( ) const
inlineoverride

Definition at line 60 of file BooleanConstraint.h.

60  : "false");
61  }
62 

◆ equal()

bool souffle::ast::BooleanConstraint::equal ( const Node node) const
inlineoverrideprotected

Definition at line 69 of file BooleanConstraint.h.

◆ isTrue()

bool souffle::ast::BooleanConstraint::isTrue ( ) const
inline

Check whether constraint holds.

Definition at line 51 of file BooleanConstraint.h.

54  {

◆ print()

void souffle::ast::BooleanConstraint::print ( std::ostream &  out) const
inlineoverrideprotectedvirtual

Adds print support for constraints (debugging)

Implements souffle::ast::analysis::Constraint< Var >.

Definition at line 65 of file BooleanConstraint.h.

◆ set()

void souffle::ast::BooleanConstraint::set ( bool  value)
inline

Set truth value.

Definition at line 56 of file BooleanConstraint.h.

58  :
59  void print(std::ostream& os) const override {

Field Documentation

◆ truthValue

bool souffle::ast::BooleanConstraint::truthValue
protected

Truth value of Boolean constraint.

Definition at line 76 of file BooleanConstraint.h.


The documentation for this class was generated from the following file:
souffle::ast::BooleanConstraint::print
void print(std::ostream &os) const override
Adds print support for constraints (debugging)
Definition: BooleanConstraint.h:65