diff --git a/src/formula/AP.h b/src/formula/AP.h index 8bda0df06..8c9f7ad16 100644 --- a/src/formula/AP.h +++ b/src/formula/AP.h @@ -59,7 +59,7 @@ public: /*! * @returns the name of the atomic proposition */ - std::string getAP() { + const std::string& getAP() { return ap; } diff --git a/src/formula/And.h b/src/formula/And.h index 16f0b6d8e..12d8d38da 100644 --- a/src/formula/And.h +++ b/src/formula/And.h @@ -91,15 +91,15 @@ public: /*! * @returns a pointer to the left child node */ - PCTLStateFormula* getLeft() { - return left; + PCTLStateFormula& getLeft() { + return *left; } /*! * @returns a pointer to the right child node */ - PCTLStateFormula* getRight() { - return right; + PCTLStateFormula& getRight() { + return *right; } /*! diff --git a/src/formula/BoundedUntil.h b/src/formula/BoundedUntil.h index c0061691c..9d7cf65f3 100644 --- a/src/formula/BoundedUntil.h +++ b/src/formula/BoundedUntil.h @@ -97,15 +97,15 @@ public: /*! * @returns a pointer to the left child node */ - PCTLStateFormula* getLeft() { - return left; + PCTLStateFormula& getLeft() { + return *left; } /*! * @returns a pointer to the right child node */ - PCTLStateFormula* getRight() { - return right; + PCTLStateFormula& getRight() { + return *right; } /*! diff --git a/src/formula/Next.h b/src/formula/Next.h index 4ec120b80..98f5d9533 100644 --- a/src/formula/Next.h +++ b/src/formula/Next.h @@ -65,8 +65,8 @@ public: /*! * @returns the child node */ - PCTLStateFormula* getChild() { - return child; + PCTLStateFormula& getChild() { + return *child; } /*! diff --git a/src/formula/Not.h b/src/formula/Not.h index dfcb7c100..09782530a 100644 --- a/src/formula/Not.h +++ b/src/formula/Not.h @@ -60,8 +60,8 @@ public: /*! * @returns The child node */ - PCTLStateFormula* getChild() { - return child; + PCTLStateFormula& getChild() { + return *child; } /*! diff --git a/src/formula/Or.h b/src/formula/Or.h index 51a2f88fd..a5072b02a 100644 --- a/src/formula/Or.h +++ b/src/formula/Or.h @@ -90,15 +90,15 @@ public: /*! * @returns a pointer to the left child node */ - PCTLStateFormula* getLeft() { - return left; + PCTLStateFormula& getLeft() { + return *left; } /*! * @returns a pointer to the right child node */ - PCTLStateFormula* getRight() { - return right; + PCTLStateFormula& getRight() { + return *right; } /*! diff --git a/src/formula/ProbabilisticOperator.h b/src/formula/ProbabilisticOperator.h index b0585fd58..622c2effc 100644 --- a/src/formula/ProbabilisticOperator.h +++ b/src/formula/ProbabilisticOperator.h @@ -73,21 +73,21 @@ public: /*! * @returns the child node (representation of a PCTL path formula) */ - PCTLPathFormula* getPathFormula () { - return pathFormula; + PCTLPathFormula& getPathFormula () { + return *pathFormula; } /*! * @returns the lower bound for the probability */ - T getLowerBound() { + const T& getLowerBound() { return lower; } /*! * @returns the upper bound for the probability */ - T getUpperBound() { + const T& getUpperBound() { return upper; } diff --git a/src/formula/Until.h b/src/formula/Until.h index df80ee0e0..be02eb5d9 100644 --- a/src/formula/Until.h +++ b/src/formula/Until.h @@ -90,15 +90,15 @@ public: /*! * @returns a pointer to the left child node */ - PCTLStateFormula* getLeft() { - return left; + PCTLStateFormula& getLeft() { + return *left; } /*! * @returns a pointer to the right child node */ - PCTLStateFormula* getRight() { - return right; + PCTLStateFormula& getRight() { + return *right; } /*!