diff --git a/src/storage/pgcl/AbstractStatementVisitor.h b/src/storage/pgcl/AbstractStatementVisitor.h index 9a8cec6d1..75cb54186 100755 --- a/src/storage/pgcl/AbstractStatementVisitor.h +++ b/src/storage/pgcl/AbstractStatementVisitor.h @@ -1,9 +1,4 @@ -// -// Created by Lukas Westhofen on 22.04.15. -// - -#ifndef STORM_ABSTRACTSTATEVISITOR_H -#define STORM_ABSTRACTSTATEVISITOR_H +#pragma once namespace storm { namespace pgcl { @@ -20,14 +15,13 @@ namespace storm { public: // Those functions need to be implemented for every possible // statement instantiation. - virtual void visit(class AssignmentStatement&) = 0; - virtual void visit(class ObserveStatement&) = 0; - virtual void visit(class IfStatement&) = 0; - virtual void visit(class LoopStatement&) = 0; - virtual void visit(class NondeterministicBranch&) = 0; - virtual void visit(class ProbabilisticBranch&) = 0; + virtual void visit(class AssignmentStatement const&) = 0; + virtual void visit(class ObserveStatement const&) = 0; + virtual void visit(class IfStatement const&) = 0; + virtual void visit(class LoopStatement const&) = 0; + virtual void visit(class NondeterministicBranch const&) = 0; + virtual void visit(class ProbabilisticBranch const&) = 0; }; } } -#endif //STORM_ABSTRACTSTATEVISITOR_H diff --git a/src/storage/pgcl/AssignmentStatement.cpp b/src/storage/pgcl/AssignmentStatement.cpp index ba9702f8f..cbecc1cdb 100755 --- a/src/storage/pgcl/AssignmentStatement.cpp +++ b/src/storage/pgcl/AssignmentStatement.cpp @@ -13,25 +13,17 @@ namespace storm { variable(variable), expression(expression) { } - boost::variant const& AssignmentStatement::getExpression() { + boost::variant const& AssignmentStatement::getExpression() const { return this->expression; } - storm::expressions::Variable const& AssignmentStatement::getVariable() { + storm::expressions::Variable const& AssignmentStatement::getVariable() const { return this->variable; } void AssignmentStatement::accept(storm::pgcl::AbstractStatementVisitor& visitor) { visitor.visit(*this); } - - std::size_t AssignmentStatement::getNumberOfOutgoingTransitions() { - if(this->expression.which() == 1) { - return boost::get(this->expression).getEnd() - boost::get(this->expression).getBegin() + 1; - } else { - return 1; - } - } } } diff --git a/src/storage/pgcl/AssignmentStatement.h b/src/storage/pgcl/AssignmentStatement.h index a49b9033b..1ca52d51d 100755 --- a/src/storage/pgcl/AssignmentStatement.h +++ b/src/storage/pgcl/AssignmentStatement.h @@ -1,12 +1,4 @@ -/* - * File: AssignmentStatement.h - * Author: Lukas Westhofen - * - * Created on 11. April 2015, 17:42 - */ - -#ifndef ASSIGNMENTSTATEMENT_H -#define ASSIGNMENTSTATEMENT_H +#pragma once #include "src/storage/pgcl/SimpleStatement.h" #include "src/storage/pgcl/UniformExpression.h" @@ -34,18 +26,17 @@ namespace storm { AssignmentStatement(storm::expressions::Variable const& variable, boost::variant const& expression); AssignmentStatement(const AssignmentStatement& orig) = default; virtual ~AssignmentStatement() = default; - std::size_t getNumberOfOutgoingTransitions(); - void accept(class AbstractStatementVisitor&); + void accept(AbstractStatementVisitor&); /** * Returns the right hand expression of the assignemnt. * @return The expression of the assignment. */ - boost::variant const& getExpression(); + boost::variant const& getExpression() const; /** * Returns the left hand variable of the assignemnt. * @return The variable to which the expression is assigned. */ - storm::expressions::Variable const& getVariable(); + storm::expressions::Variable const& getVariable() const; private: /// Represents the variable of our assignment statement. storm::expressions::Variable variable; @@ -54,6 +45,3 @@ namespace storm { }; } } - -#endif /* ASSIGNMENTSTATEMENT_H */ - diff --git a/src/storage/pgcl/Block.cpp b/src/storage/pgcl/Block.cpp index f2bbab4d8..453fa7745 100644 --- a/src/storage/pgcl/Block.cpp +++ b/src/storage/pgcl/Block.cpp @@ -20,10 +20,18 @@ namespace storm { return this->sequenceOfStatements.begin(); } + const_iterator PgclBlock::begin() const { + return this->sequenceOfStatements.begin(); + } + iterator PgclBlock::end() { return this->sequenceOfStatements.end(); } + const_iterator PgclBlock::end() const { + return this->sequenceOfStatements.end(); + } + bool PgclBlock::empty() { return this->sequenceOfStatements.empty(); } @@ -52,7 +60,7 @@ namespace storm { this->sequenceOfStatements.clear(); } - std::shared_ptr PgclBlock::getExpressionManager() { + std::shared_ptr const& PgclBlock::getExpressionManager() const { return this->expressions; } diff --git a/src/storage/pgcl/Block.h b/src/storage/pgcl/Block.h index ab7638bfd..44f73c922 100644 --- a/src/storage/pgcl/Block.h +++ b/src/storage/pgcl/Block.h @@ -42,7 +42,9 @@ namespace storm { PgclBlock(const PgclBlock & orig) = default; PgclBlock & operator=(PgclBlock const& other) = default; iterator begin(); + const_iterator begin() const; iterator end(); + const_iterator end() const; element front(); element back(); unsigned long size(); @@ -62,7 +64,8 @@ namespace storm { * the program and all its subprograms. * @return The expression manager of the program. */ - std::shared_ptr getExpressionManager(); + std::shared_ptr const& getExpressionManager() const; + /** * Returns true if the program contains a loop statement. * @return True if the program has a loop. @@ -84,7 +87,7 @@ namespace storm { * @return True if the program has at least one parameter. */ bool hasParameters() const; - + protected: /** * We are basically wrapping a std::vector which represents the @@ -113,7 +116,6 @@ namespace storm { bool loop = false; bool nondet = false; bool observe = false; - bool top = false; }; } } diff --git a/src/storage/pgcl/BooleanExpression.cpp b/src/storage/pgcl/BooleanExpression.cpp index c60031ae9..a9c8bf0c8 100755 --- a/src/storage/pgcl/BooleanExpression.cpp +++ b/src/storage/pgcl/BooleanExpression.cpp @@ -14,7 +14,7 @@ namespace storm { booleanExpression(booleanExpression) { } - storm::expressions::Expression& BooleanExpression::getBooleanExpression() { + storm::expressions::Expression const& BooleanExpression::getBooleanExpression() const { return this->booleanExpression; } } diff --git a/src/storage/pgcl/BooleanExpression.h b/src/storage/pgcl/BooleanExpression.h index cb6241914..d5e210d62 100755 --- a/src/storage/pgcl/BooleanExpression.h +++ b/src/storage/pgcl/BooleanExpression.h @@ -31,7 +31,7 @@ namespace storm { * Returns the expression. * @return The expression of boolean type. */ - storm::expressions::Expression& getBooleanExpression(); + storm::expressions::Expression const& getBooleanExpression() const; private: storm::expressions::Expression booleanExpression; }; diff --git a/src/storage/pgcl/BranchStatement.cpp b/src/storage/pgcl/BranchStatement.cpp index a3bc318d9..77bbcc4d2 100755 --- a/src/storage/pgcl/BranchStatement.cpp +++ b/src/storage/pgcl/BranchStatement.cpp @@ -10,16 +10,13 @@ namespace storm { namespace pgcl { - std::shared_ptr BranchStatement::getLeftBranch() { + std::shared_ptr const& BranchStatement::getLeftBranch() const { return this->leftBranch; } - std::shared_ptr BranchStatement::getRightBranch() { + std::shared_ptr const& BranchStatement::getRightBranch() const { return this->rightBranch; } - std::size_t BranchStatement::getNumberOfOutgoingTransitions() { - return 2; - } } } \ No newline at end of file diff --git a/src/storage/pgcl/BranchStatement.h b/src/storage/pgcl/BranchStatement.h index ee0ef5286..eca886352 100755 --- a/src/storage/pgcl/BranchStatement.h +++ b/src/storage/pgcl/BranchStatement.h @@ -1,12 +1,4 @@ -/* - * File: BranchStatement.h - * Author: Lukas Westhofen - * - * Created on 11. April 2015, 17:42 - */ - -#ifndef BRANCHSTATEMENT_H -#define BRANCHSTATEMENT_H +#pragma once #include "src/storage/pgcl/PgclProgram.h" #include "src/storage/pgcl/CompoundStatement.h" @@ -25,22 +17,19 @@ namespace storm { BranchStatement(const BranchStatement& orig) = default; virtual ~BranchStatement() = default; virtual void accept(class AbstractStatementVisitor&) = 0; - std::size_t getNumberOfOutgoingTransitions(); /** * Returns the left branch of the statement. * @return The left branch PGCL program. */ - std::shared_ptr getLeftBranch(); + std::shared_ptr const& getLeftBranch() const; /** * Returns the right branch of the statement. * @return The right branch PGCL program. */ - std::shared_ptr getRightBranch(); + std::shared_ptr const& getRightBranch() const; protected: std::shared_ptr leftBranch; std::shared_ptr rightBranch; }; } } - -#endif /* BRANCHSTATEMENT_H */ \ No newline at end of file diff --git a/src/storage/pgcl/IfStatement.cpp b/src/storage/pgcl/IfStatement.cpp index 64dc88607..1a0203619 100755 --- a/src/storage/pgcl/IfStatement.cpp +++ b/src/storage/pgcl/IfStatement.cpp @@ -19,11 +19,11 @@ namespace storm { this->hasElseBody = true; } - std::shared_ptr IfStatement::getIfBody() { + std::shared_ptr const& IfStatement::getIfBody() const { return this->ifBody; } - std::shared_ptr IfStatement::getElseBody() { + std::shared_ptr const& IfStatement::getElseBody() const { if(this->elseBody) { return this->elseBody; } else { @@ -31,11 +31,11 @@ namespace storm { } } - bool IfStatement::hasElse() { + bool IfStatement::hasElse() const{ return this->hasElseBody; } - storm::pgcl::BooleanExpression& IfStatement::getCondition() { + storm::pgcl::BooleanExpression const& IfStatement::getCondition() const { return this->condition; } @@ -43,8 +43,5 @@ namespace storm { visitor.visit(*this); } - std::size_t IfStatement::getNumberOfOutgoingTransitions() { - return 1; - } } } \ No newline at end of file diff --git a/src/storage/pgcl/IfStatement.h b/src/storage/pgcl/IfStatement.h index 74bacac9b..92d420754 100755 --- a/src/storage/pgcl/IfStatement.h +++ b/src/storage/pgcl/IfStatement.h @@ -39,28 +39,27 @@ namespace storm { IfStatement(storm::pgcl::BooleanExpression const& condition, std::shared_ptr const& ifBody, std::shared_ptr const& elseBody); IfStatement(const IfStatement& orig) = default; virtual ~IfStatement() = default; - std::size_t getNumberOfOutgoingTransitions(); void accept(class AbstractStatementVisitor&); /** * Returns the if body of the if statement. * @return The if body. */ - std::shared_ptr getIfBody(); + std::shared_ptr const& getIfBody() const; /** * Returns the else body of the if statement, if present. Otherwise * it throws an excpetion. * @return The else body. */ - std::shared_ptr getElseBody(); + std::shared_ptr const& getElseBody() const; /** * Returns true iff the if statement has an else body. */ - bool hasElse(); + bool hasElse() const; /** * Returns the guard of the if statement. * @return The condition. */ - storm::pgcl::BooleanExpression& getCondition(); + storm::pgcl::BooleanExpression const& getCondition() const; private: /// The if body is again a PGCL program. std::shared_ptr ifBody; diff --git a/src/storage/pgcl/LoopStatement.cpp b/src/storage/pgcl/LoopStatement.cpp index cdeff443c..5639d7a8a 100755 --- a/src/storage/pgcl/LoopStatement.cpp +++ b/src/storage/pgcl/LoopStatement.cpp @@ -14,21 +14,17 @@ namespace storm { body(body), condition(condition) { } - std::shared_ptr LoopStatement::getBody() { + std::shared_ptr const& LoopStatement::getBody() const { return this->body; } - storm::pgcl::BooleanExpression& LoopStatement::getCondition() { + storm::pgcl::BooleanExpression const& LoopStatement::getCondition() const{ return this->condition; } void LoopStatement::accept(storm::pgcl::AbstractStatementVisitor& visitor) { visitor.visit(*this); } - - std::size_t LoopStatement::getNumberOfOutgoingTransitions() { - return 1; - } } } diff --git a/src/storage/pgcl/LoopStatement.h b/src/storage/pgcl/LoopStatement.h index 096a6e50a..173d724cc 100755 --- a/src/storage/pgcl/LoopStatement.h +++ b/src/storage/pgcl/LoopStatement.h @@ -30,18 +30,17 @@ namespace storm { LoopStatement(storm::pgcl::BooleanExpression const& condition, std::shared_ptr const& body); LoopStatement(const LoopStatement& orig) = default; virtual ~LoopStatement() = default; - std::size_t getNumberOfOutgoingTransitions(); void accept(class AbstractStatementVisitor&); /** * Returns the loop body program. * @return The loop body program. */ - std::shared_ptr getBody(); + std::shared_ptr const& getBody() const; /** * Returns the guard of the loop. * @return The boolean condition of the loop. */ - storm::pgcl::BooleanExpression& getCondition(); + storm::pgcl::BooleanExpression const& getCondition() const; private: /// Represents the loop body. std::shared_ptr body; diff --git a/src/storage/pgcl/NondeterministicBranch.cpp b/src/storage/pgcl/NondeterministicBranch.cpp index 25b8d741a..2c20d7b1f 100755 --- a/src/storage/pgcl/NondeterministicBranch.cpp +++ b/src/storage/pgcl/NondeterministicBranch.cpp @@ -19,7 +19,7 @@ namespace storm { visitor.visit(*this); } - bool NondeterministicBranch::isNondet() { + bool NondeterministicBranch::isNondet() const { return true; } } diff --git a/src/storage/pgcl/NondeterministicBranch.h b/src/storage/pgcl/NondeterministicBranch.h index 87ce9d1e7..b96892408 100755 --- a/src/storage/pgcl/NondeterministicBranch.h +++ b/src/storage/pgcl/NondeterministicBranch.h @@ -29,7 +29,7 @@ namespace storm { NondeterministicBranch(const NondeterministicBranch& orig) = default; virtual ~NondeterministicBranch() = default; void accept(class AbstractStatementVisitor&); - bool isNondet(); + bool isNondet() const; private: }; } diff --git a/src/storage/pgcl/ObserveStatement.cpp b/src/storage/pgcl/ObserveStatement.cpp index fcf4f2135..bc64f5a2c 100755 --- a/src/storage/pgcl/ObserveStatement.cpp +++ b/src/storage/pgcl/ObserveStatement.cpp @@ -17,13 +17,10 @@ namespace storm { visitor.visit(*this); } - storm::pgcl::BooleanExpression& ObserveStatement::getCondition() { + storm::pgcl::BooleanExpression const& ObserveStatement::getCondition() const { return this->condition; } - std::size_t ObserveStatement::getNumberOfOutgoingTransitions() { - return 1; - } } } diff --git a/src/storage/pgcl/ObserveStatement.h b/src/storage/pgcl/ObserveStatement.h index 96461aa6a..8cee0a9f0 100755 --- a/src/storage/pgcl/ObserveStatement.h +++ b/src/storage/pgcl/ObserveStatement.h @@ -28,13 +28,12 @@ namespace storm { */ ObserveStatement(storm::pgcl::BooleanExpression const& condition); ObserveStatement(const ObserveStatement& orig) = default; - std::size_t getNumberOfOutgoingTransitions(); virtual ~ObserveStatement() = default; /** * Returns the condition of the observe statement. * @return The boolean expression of the observe statement. */ - storm::pgcl::BooleanExpression& getCondition(); + storm::pgcl::BooleanExpression const& getCondition() const; void accept(class AbstractStatementVisitor&); private: /// Represents the assigned condition. diff --git a/src/storage/pgcl/PgclProgram.cpp b/src/storage/pgcl/PgclProgram.cpp index 4666a8ef8..93a599bf6 100755 --- a/src/storage/pgcl/PgclProgram.cpp +++ b/src/storage/pgcl/PgclProgram.cpp @@ -15,6 +15,15 @@ namespace storm { vector PgclProgram::getLocationToStatementVector() { return this->locationToStatement; } + + std::vector PgclProgram::getVariables() const { + std::vector vars; + for(auto const& v : *(this->getExpressionManager())) { + vars.push_back(v.first); + } + + return vars; + } std::ostream& operator<<(std::ostream& stream, PgclProgram& program) { storm::pgcl::StatementPrinterVisitor printer(stream); diff --git a/src/storage/pgcl/PgclProgram.h b/src/storage/pgcl/PgclProgram.h index 6b3635d22..8c6bffc57 100755 --- a/src/storage/pgcl/PgclProgram.h +++ b/src/storage/pgcl/PgclProgram.h @@ -37,7 +37,8 @@ namespace storm { * @param hasParam Whether the program is parameterized. */ PgclProgram(vector const& statements, vector const& locationToStatement, std::vector const& parameters, std::shared_ptr expressions, bool hasLoop, bool hasNondet, bool hasObserve); - PgclProgram(const PgclProgram & orig) = default; + + PgclProgram(const PgclProgram & orig) = default; /** * Returns a vector that has the statement with location number i at @@ -46,6 +47,8 @@ namespace storm { */ vector getLocationToStatementVector(); + std::vector getVariables() const; + private: /** * Contains the statement with location i at its i-th position. diff --git a/src/storage/pgcl/ProbabilisticBranch.cpp b/src/storage/pgcl/ProbabilisticBranch.cpp index 1c0e0e773..7c0ab72a1 100755 --- a/src/storage/pgcl/ProbabilisticBranch.cpp +++ b/src/storage/pgcl/ProbabilisticBranch.cpp @@ -16,7 +16,7 @@ namespace storm { leftBranch = left; } - storm::expressions::Expression& ProbabilisticBranch::getProbability() { + storm::expressions::Expression const& ProbabilisticBranch::getProbability() const { return this->probability; } diff --git a/src/storage/pgcl/ProbabilisticBranch.h b/src/storage/pgcl/ProbabilisticBranch.h index 29e058897..c3aa16e4a 100755 --- a/src/storage/pgcl/ProbabilisticBranch.h +++ b/src/storage/pgcl/ProbabilisticBranch.h @@ -38,7 +38,7 @@ namespace storm { * Returns the expression representing the probability. * @return The expression representing the probability. */ - storm::expressions::Expression& getProbability(); + storm::expressions::Expression const& getProbability() const; void accept(class AbstractStatementVisitor&); private: /// The expression represents the probability of the branch. diff --git a/src/storage/pgcl/Statement.cpp b/src/storage/pgcl/Statement.cpp index 8bbfcde4d..36d1ad5d6 100755 --- a/src/storage/pgcl/Statement.cpp +++ b/src/storage/pgcl/Statement.cpp @@ -11,11 +11,11 @@ namespace storm { this->lineNumber = lineNumber; } - std::size_t Statement::getLineNumber() { + std::size_t Statement::getLineNumber() const { return this->lineNumber; } - std::size_t Statement::getLocationNumber() { + std::size_t Statement::getLocationNumber() const { return this->locationNumber; } @@ -23,7 +23,7 @@ namespace storm { this->locationNumber = locationNumber; } - bool Statement::isLast() { + bool Statement::isLast() const { return this->last; } @@ -31,7 +31,7 @@ namespace storm { this->last = isLast; } - bool Statement::isNondet() { + bool Statement::isNondet() const { return false; } @@ -44,7 +44,7 @@ namespace storm { } - std::size_t Statement::getNumberOfOutgoingTransitions() { + std::size_t Statement::getNumberOfOutgoingTransitions() const { return 1; } } diff --git a/src/storage/pgcl/Statement.h b/src/storage/pgcl/Statement.h index 9690cfe0e..6a913a9bf 100755 --- a/src/storage/pgcl/Statement.h +++ b/src/storage/pgcl/Statement.h @@ -31,7 +31,7 @@ namespace storm { * was parsed from. * @return The line number of the statement. */ - std::size_t getLineNumber(); + std::size_t getLineNumber() const; /** * Sets the line number during the parsing process. * @param lineNumber The location number of the statement. @@ -41,7 +41,7 @@ namespace storm { * Returns the unique location number of the statement. * @return The line number of the statement. */ - std::size_t getLocationNumber(); + std::size_t getLocationNumber() const; /** * Sets the unique location number of the statement. * @param lineNumber The location number of the statement. @@ -52,7 +52,7 @@ namespace storm { * program. * @return true Whether the statement is the last statement. */ - bool isLast(); + bool isLast() const; /** * Sets the information whether the statement is the last of its * direct parent program. @@ -62,11 +62,11 @@ namespace storm { /** * Returns wether the statements represents nondeterminism. */ - virtual bool isNondet(); + virtual bool isNondet() const; /** * Returns the number of transitions this statement will produce. */ - virtual std::size_t getNumberOfOutgoingTransitions(); + virtual std::size_t getNumberOfOutgoingTransitions() const; virtual void accept(class AbstractStatementVisitor&) = 0; /** * Sets the parent program of the statement. diff --git a/src/storage/pgcl/StatementPrinterVisitor.cpp b/src/storage/pgcl/StatementPrinterVisitor.cpp index 849014578..97552c40f 100755 --- a/src/storage/pgcl/StatementPrinterVisitor.cpp +++ b/src/storage/pgcl/StatementPrinterVisitor.cpp @@ -16,7 +16,7 @@ namespace storm { StatementPrinterVisitor::StatementPrinterVisitor(std::ostream &stream) : stream(stream) { } - void StatementPrinterVisitor::visit(storm::pgcl::AssignmentStatement& statement) { + void StatementPrinterVisitor::visit(storm::pgcl::AssignmentStatement const& statement) { this->stream << statement.getLocationNumber() << ": "; if(statement.getExpression().which() == 0) { storm::expressions::Expression const& expression = boost::get(statement.getExpression()); @@ -27,12 +27,12 @@ namespace storm { } } - void StatementPrinterVisitor::visit(storm::pgcl::ObserveStatement& statement) { + void StatementPrinterVisitor::visit(storm::pgcl::ObserveStatement const& statement) { this->stream << statement.getLocationNumber() << ": "; this->stream << "observe(" << statement.getCondition().getBooleanExpression() << ");" << std::endl; } - void StatementPrinterVisitor::visit(storm::pgcl::IfStatement& statement) { + void StatementPrinterVisitor::visit(storm::pgcl::IfStatement const& statement) { this->stream << statement.getLocationNumber() << ": "; this->stream << "if(" << statement.getCondition().getBooleanExpression() << ") {" << std::endl; int i = 1; @@ -51,7 +51,7 @@ namespace storm { } } - void StatementPrinterVisitor::visit(storm::pgcl::LoopStatement& statement) { + void StatementPrinterVisitor::visit(storm::pgcl::LoopStatement const& statement) { this->stream << statement.getLocationNumber() << ": "; this->stream << "while(" << statement.getCondition().getBooleanExpression() << ") {" << std::endl; int i = 1; @@ -62,7 +62,7 @@ namespace storm { this->stream << "}" << std::endl; } - void StatementPrinterVisitor::visit(storm::pgcl::NondeterministicBranch& statement) { + void StatementPrinterVisitor::visit(storm::pgcl::NondeterministicBranch const& statement) { this->stream << statement.getLocationNumber() << ": "; this->stream << "{" << std::endl; int i = 1; @@ -78,7 +78,7 @@ namespace storm { this->stream << "}" << std::endl; } - void StatementPrinterVisitor::visit(storm::pgcl::ProbabilisticBranch& statement) { + void StatementPrinterVisitor::visit(storm::pgcl::ProbabilisticBranch const& statement) { this->stream << statement.getLocationNumber() << ": "; this->stream << "{" << std::endl; int i = 1; diff --git a/src/storage/pgcl/StatementPrinterVisitor.h b/src/storage/pgcl/StatementPrinterVisitor.h index 6e3ac9cc6..629336831 100755 --- a/src/storage/pgcl/StatementPrinterVisitor.h +++ b/src/storage/pgcl/StatementPrinterVisitor.h @@ -24,12 +24,12 @@ namespace storm { * @param stream The stream to print to. */ StatementPrinterVisitor(std::ostream& stream); - void visit(class AssignmentStatement&); - void visit(class ObserveStatement&); - void visit(class IfStatement&); - void visit(class LoopStatement&); - void visit(class NondeterministicBranch&); - void visit(class ProbabilisticBranch&); + void visit(AssignmentStatement const&); + void visit(ObserveStatement const&); + void visit(IfStatement const&); + void visit(LoopStatement const&); + void visit(NondeterministicBranch const&); + void visit(ProbabilisticBranch const&); private: std::ostream& stream; };