SemOpt  0.2alpha5-SCC
OrClause Class Reference

Class encompassing a list of SAT variables (type Variable) linked by or operators. More...

Public Member Functions

 OrClause ()
 Simple constructor.
 OrClause (int,...)
 Constructor that can receive as input a list of variables.
void appendVariable (Variable)
 Method for adding a variable at the end of the clause.
void addHeadVariable (Variable)
 Method for adding a variable at the beginning of the clause.
void toSS (stringstream *) const
 Method for returning a string representation of the Or clause in a stringstream object.
void clone (OrClause *)
 Method for cloning this OrClause into a new OrClause that is passed as input output parameter.

Detailed Description

Class encompassing a list of SAT variables (type Variable) linked by or operators.

For example, the or clause "var1 OR var2 OR var3 OR not var 4 OR var 5" can be defined as OrClause(5, var1, var2, var3, not var4, var5)

Author
Federico Cerutti f.cer.nosp@m.utti.nosp@m.@abdn.nosp@m..ac..nosp@m.uk

Definition at line 11 of file OrClause.h.

Constructor & Destructor Documentation

OrClause::OrClause ( )

Simple constructor.

No parameters required, it initializes the data structure but it adds no variables to the clause

Definition at line 18 of file OrClause.cpp.

Referenced by clone().

OrClause::OrClause ( int  count,
  ... 
)

Constructor that can receive as input a list of variables.

Parameters
[in]countThe number of variables that follows
[in]....The list of variables that follows, instances of type Variable

For instance, OrClause(3, var1, var2, var3)

Definition at line 29 of file OrClause.cpp.

Member Function Documentation

void OrClause::addHeadVariable ( Variable  x)

Method for adding a variable at the beginning of the clause.

Parameters
[in]xThe variable to add (of type Variable)
Return values
void

Definition at line 56 of file OrClause.cpp.

void OrClause::appendVariable ( Variable  x)

Method for adding a variable at the end of the clause.

Parameters
[in]xThe variable to add
Return values
void

Definition at line 46 of file OrClause.cpp.

void OrClause::clone ( OrClause newclause)

Method for cloning this OrClause into a new OrClause that is passed as input output parameter.

Parameters
[in,out]newclausePointer to another OrClause object, which is newly initialised, and then which will become a clone (not a pointer) of this object
Return values
void

Definition at line 87 of file OrClause.cpp.

References OrClause().

void OrClause::toSS ( stringstream *  ss) const

Method for returning a string representation of the Or clause in a stringstream object.

Parameters
[in,out]ssA pointer to an already initialised stringstream object which will contain the string representation of this object
Return values
void

Definition at line 68 of file OrClause.cpp.


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