diff --git a/src/logic/Formula.cpp b/src/logic/Formula.cpp index 4037cb723..e621c1c78 100644 --- a/src/logic/Formula.cpp +++ b/src/logic/Formula.cpp @@ -1,4 +1,5 @@ #include "src/logic/Formulas.h" +#include namespace storm { namespace logic { @@ -404,6 +405,12 @@ namespace storm { return; } + std::string Formula::toString() const { + std::stringstream str2; + writeToStream(str2); + return str2.str(); + } + std::ostream& operator<<(std::ostream& out, Formula const& formula) { return formula.writeToStream(out); } diff --git a/src/logic/Formula.h b/src/logic/Formula.h index 3c3c3b5aa..4d831e456 100644 --- a/src/logic/Formula.h +++ b/src/logic/Formula.h @@ -174,6 +174,7 @@ namespace storm { std::shared_ptr asSharedPointer(); std::shared_ptr asSharedPointer() const; + std::string toString() const; virtual std::ostream& writeToStream(std::ostream& out) const = 0; virtual void gatherAtomicExpressionFormulas(std::vector>& atomicExpressionFormulas) const;