#include "src/logic/BinaryStateFormula.h" namespace storm { namespace logic { BinaryStateFormula::BinaryStateFormula(std::shared_ptr const& leftSubformula, std::shared_ptr const& rightSubformula) : leftSubformula(leftSubformula), rightSubformula(rightSubformula) { // Intentionally left empty. } bool BinaryStateFormula::isBinaryStateFormula() const { return true; } bool BinaryStateFormula::isPctlStateFormula() const { return this->getLeftSubformula().isPctlStateFormula() && this->getRightSubformula().isPctlStateFormula(); } bool BinaryStateFormula::isLtlFormula() const { return this->getLeftSubformula().isLtlFormula() && this->getRightSubformula().isLtlFormula(); } bool BinaryStateFormula::containsProbabilityOperator() const { return this->getLeftSubformula().containsProbabilityOperator() || this->getRightSubformula().containsProbabilityOperator(); } bool BinaryStateFormula::containsNestedProbabilityOperators() const { return this->getLeftSubformula().containsNestedProbabilityOperators() || this->getRightSubformula().containsNestedProbabilityOperators(); } bool BinaryStateFormula::containsRewardOperator() const { return this->getLeftSubformula().containsRewardOperator() || this->getRightSubformula().containsRewardOperator(); } bool BinaryStateFormula::containsNestedRewardOperators() const { return this->containsNestedRewardOperators() || this->getRightSubformula().containsNestedRewardOperators(); } Formula const& BinaryStateFormula::getLeftSubformula() const { return *leftSubformula; } Formula const& BinaryStateFormula::getRightSubformula() const { return *rightSubformula; } void BinaryStateFormula::gatherAtomicExpressionFormulas(std::vector>& atomicExpressionFormulas) const { this->getLeftSubformula().gatherAtomicExpressionFormulas(atomicExpressionFormulas); this->getRightSubformula().gatherAtomicExpressionFormulas(atomicExpressionFormulas); } void BinaryStateFormula::gatherAtomicLabelFormulas(std::vector>& atomicLabelFormulas) const { this->getLeftSubformula().gatherAtomicLabelFormulas(atomicLabelFormulas); this->getRightSubformula().gatherAtomicLabelFormulas(atomicLabelFormulas); } } }