Browse Source

Added methods to check whether child nodes are set (necessary, as sub

classes have no direct access to the pointer)
main
Lanchid 12 years ago
parent
commit
0e0b5ff688
  1. 16
      src/formula/abstract/And.h
  2. 8
      src/formula/abstract/BoundedEventually.h
  3. 15
      src/formula/abstract/BoundedNaryUntil.h
  4. 16
      src/formula/abstract/BoundedUntil.h
  5. 8
      src/formula/abstract/Eventually.h
  6. 8
      src/formula/abstract/Globally.h
  7. 8
      src/formula/abstract/Next.h
  8. 8
      src/formula/abstract/Not.h
  9. 16
      src/formula/abstract/Or.h
  10. 8
      src/formula/abstract/PathBoundOperator.h
  11. 8
      src/formula/abstract/PathNoBoundOperator.h
  12. 2
      src/formula/abstract/ProbabilisticBoundOperator.h
  13. 2
      src/formula/abstract/ProbabilisticNoBoundOperator.h
  14. 8
      src/formula/abstract/StateBoundOperator.h
  15. 8
      src/formula/abstract/StateNoBoundOperator.h
  16. 16
      src/formula/abstract/Until.h

16
src/formula/abstract/And.h

@ -104,6 +104,22 @@ public:
return *right;
}
/*!
*
* @return True if the left child is set, i.e. it does not point to nullptr; false otherwise
*/
bool leftIsSet() const {
return left != nullptr;
}
/*!
*
* @return True if the right child is set, i.e. it does not point to nullptr; false otherwise
*/
bool rightIsSet() const {
return right != nullptr;
}
/*!
* @returns a string representation of the formula
*/

8
src/formula/abstract/BoundedEventually.h

@ -85,6 +85,14 @@ public:
this->child = child;
}
/*!
*
* @return True if the child is set, i.e. it does not point to nullptr; false otherwise
*/
bool childIsSet() const {
return child != nullptr;
}
/*!
* @returns the maximally allowed number of steps for the bounded until operator
*/

15
src/formula/abstract/BoundedNaryUntil.h

@ -90,6 +90,21 @@ public:
right = newRight;
}
/*!
*
* @return True if the left child is set, i.e. it does not point to nullptr; false otherwise
*/
bool leftIsSet() const {
return left != nullptr;
}
/*!
*
* @return True if the right child is set, i.e. it does not point to nullptr; false otherwise
*/
bool rightIsSet() const {
return right != nullptr;
}
/*!
* Sets the right child node.

16
src/formula/abstract/BoundedUntil.h

@ -107,6 +107,22 @@ public:
return *right;
}
/*!
*
* @return True if the left child is set, i.e. it does not point to nullptr; false otherwise
*/
bool leftIsSet() const {
return left != nullptr;
}
/*!
*
* @return True if the right child is set, i.e. it does not point to nullptr; false otherwise
*/
bool rightIsSet() const {
return right != nullptr;
}
/*!
* @returns the maximally allowed number of steps for the bounded until operator
*/

8
src/formula/abstract/Eventually.h

@ -79,6 +79,14 @@ public:
this->child = child;
}
/*!
*
* @return True if the child node is set, i.e. it does not point to nullptr; false otherwise
*/
bool childIsSet() const {
return child != nullptr;
}
/*!
* @returns a string representation of the formula
*/

8
src/formula/abstract/Globally.h

@ -80,6 +80,14 @@ public:
this->child = child;
}
/*!
*
* @return True if the child node is set, i.e. it does not point to nullptr; false otherwise
*/
bool childIsSet() const {
return child != nullptr;
}
/*!
* @returns a string representation of the formula
*/

8
src/formula/abstract/Next.h

@ -79,6 +79,14 @@ public:
this->child = child;
}
/*!
*
* @return True if the child node is set, i.e. it does not point to nullptr; false otherwise
*/
bool childIsSet() const {
return child != nullptr;
}
/*!
* @returns a string representation of the formula
*/

8
src/formula/abstract/Not.h

@ -76,6 +76,14 @@ public:
this->child = child;
}
/*!
*
* @return True if the child node is set, i.e. it does not point to nullptr; false otherwise
*/
bool childIsSet() const {
return child != nullptr;
}
/*!
* @returns a string representation of the formula
*/

16
src/formula/abstract/Or.h

@ -102,6 +102,22 @@ public:
return *right;
}
/*!
*
* @return True if the left child is set, i.e. it does not point to nullptr; false otherwise
*/
bool leftIsSet() const {
return left != nullptr;
}
/*!
*
* @return True if the right child is set, i.e. it does not point to nullptr; false otherwise
*/
bool rightIsSet() const {
return right != nullptr;
}
/*!
* @returns a string representation of the formula
*/

8
src/formula/abstract/PathBoundOperator.h

@ -103,6 +103,14 @@ public:
this->pathFormula = pathFormula;
}
/*!
*
* @return True if the path formula is set, i.e. it does not point to nullptr; false otherwise
*/
bool pathFormulaIsSet() const {
return pathFormula != nullptr;
}
/*!
* @returns the comparison relation
*/

8
src/formula/abstract/PathNoBoundOperator.h

@ -106,6 +106,14 @@ public:
this->pathFormula = pathFormula;
}
/*!
*
* @return True if the path formula is set, i.e. it does not point to nullptr; false otherwise
*/
bool pathFormulaIsSet() const {
return pathFormula != nullptr;
}
/*!
* @returns a string representation of the formula
*/

2
src/formula/abstract/ProbabilisticBoundOperator.h

@ -39,7 +39,7 @@ namespace abstract {
* @see AbstractFormula
*/
template<class T, class FormulaType>
class ProbabilisticBoundOperator : public PathBoundOperator<T> {
class ProbabilisticBoundOperator : public PathBoundOperator<T, FormulaType> {
public:
/*!

2
src/formula/abstract/ProbabilisticNoBoundOperator.h

@ -2,7 +2,7 @@
* ProbabilisticNoBoundOperator.h
*
* Created on: 12.12.2012
* Author: thomas
* Author: Thomas Heinemann
*/
#ifndef STORM_FORMULA_ABSTRACT_PROBABILISTICNOBOUNDOPERATOR_H_

8
src/formula/abstract/StateBoundOperator.h

@ -85,6 +85,14 @@ public:
this->stateFormula = stateFormula;
}
/*!
*
* @return True if the state formula is set, i.e. it does not point to nullptr; false otherwise
*/
bool stateFormulaIsSet() const {
return stateFormula != nullptr;
}
/*!
* @returns the comparison relation
*/

8
src/formula/abstract/StateNoBoundOperator.h

@ -82,6 +82,14 @@ public:
this->stateFormula = stateFormula;
}
/*!
*
* @return True if the state formula is set, i.e. it does not point to nullptr; false otherwise
*/
bool stateFormulaIsSet() const {
return stateFormula != nullptr;
}
/*!
* Calls the model checker to check this formula.
* Needed to infer the correct type of formula class.

16
src/formula/abstract/Until.h

@ -102,6 +102,22 @@ public:
return *right;
}
/*!
*
* @return True if the left child is set, i.e. it does not point to nullptr; false otherwise
*/
bool leftIsSet() const {
return left != nullptr;
}
/*!
*
* @return True if the right child is set, i.e. it does not point to nullptr; false otherwise
*/
bool rightIsSet() const {
return right != nullptr;
}
/*!
* @returns a string representation of the formula
*/

Loading…
Cancel
Save