You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.0 KiB
30 lines
1.0 KiB
#include "src/logic/UnaryBooleanStateFormula.h"
|
|
|
|
namespace storm {
|
|
namespace logic {
|
|
UnaryBooleanStateFormula::UnaryBooleanStateFormula(OperatorType operatorType, std::shared_ptr<Formula const> const& subformula) : UnaryStateFormula(subformula), operatorType(operatorType) {
|
|
// Intentionally left empty.
|
|
}
|
|
|
|
bool UnaryBooleanStateFormula::isUnaryBooleanStateFormula() const {
|
|
return true;
|
|
}
|
|
|
|
UnaryBooleanStateFormula::OperatorType UnaryBooleanStateFormula::getOperator() const {
|
|
return operatorType;
|
|
}
|
|
|
|
bool UnaryBooleanStateFormula::isNot() const {
|
|
return this->getOperator() == OperatorType::Not;
|
|
}
|
|
|
|
std::ostream& UnaryBooleanStateFormula::writeToStream(std::ostream& out) const {
|
|
switch (operatorType) {
|
|
case OperatorType::Not: out << "!("; break;
|
|
}
|
|
this->getSubformula().writeToStream(out);
|
|
out << ")";
|
|
return out;
|
|
}
|
|
}
|
|
}
|