From aafdbf7671f083797dc69db922945d006ee03cc4 Mon Sep 17 00:00:00 2001 From: gereon Date: Sat, 11 May 2013 17:30:20 +0200 Subject: [PATCH] Fixed errors due to merging. --- src/adapters/ExplicitModelAdapter.cpp | 13 +++++++------ src/adapters/ExplicitModelAdapter.h | 2 +- src/adapters/SymbolicModelAdapter.h | 4 ++-- src/parser/PrismParser.cpp | 4 ++-- src/parser/PrismParser/PrismGrammar.cpp | 3 --- src/storm.cpp | 2 +- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/adapters/ExplicitModelAdapter.cpp b/src/adapters/ExplicitModelAdapter.cpp index 57da1399d..298400acb 100644 --- a/src/adapters/ExplicitModelAdapter.cpp +++ b/src/adapters/ExplicitModelAdapter.cpp @@ -38,7 +38,7 @@ ExplicitModelAdapter::~ExplicitModelAdapter() { this->clearInternalState(); } - std::shared_ptr ExplicitModelAdapter::getModel(std::string const & rewardModelName) { + std::shared_ptr> ExplicitModelAdapter::getModel(std::string const & rewardModelName) { this->buildTransitionMap(); @@ -61,24 +61,25 @@ ExplicitModelAdapter::~ExplicitModelAdapter() { case storm::ir::Program::DTMC: { std::shared_ptr> matrix = this->buildDeterministicMatrix(); - return std::shared_ptr(new storm::models::Dtmc(matrix, stateLabeling, stateRewards, this->transitionRewards)); + return std::shared_ptr>(new storm::models::Dtmc(matrix, stateLabeling, stateRewards, this->transitionRewards)); break; } case storm::ir::Program::CTMC: { std::shared_ptr> matrix = this->buildDeterministicMatrix(); - return std::shared_ptr(new storm::models::Ctmc(matrix, stateLabeling, stateRewards, this->transitionRewards)); + return std::shared_ptr>(new storm::models::Ctmc(matrix, stateLabeling, stateRewards, this->transitionRewards)); break; } case storm::ir::Program::MDP: { std::shared_ptr> matrix = this->buildNondeterministicMatrix(); - return std::shared_ptr(new storm::models::Mdp(matrix, stateLabeling, stateRewards, this->transitionRewards)); + std::shared_ptr> choiceIndices; + return std::shared_ptr>(new storm::models::Mdp(matrix, stateLabeling, choiceIndices, stateRewards, this->transitionRewards)); break; } case storm::ir::Program::CTMDP: // Todo - //return std::shared_ptr(new storm::models::Ctmdp(matrix, stateLabeling, stateRewards, transitionRewardMatrix)); + //return std::shared_ptr>(new storm::models::Ctmdp(matrix, stateLabeling, stateRewards, transitionRewardMatrix)); break; default: LOG4CPLUS_ERROR(logger, "Error while creating model from probabilistic program: We can't handle this model type."); @@ -86,7 +87,7 @@ ExplicitModelAdapter::~ExplicitModelAdapter() { break; } - return std::shared_ptr(nullptr); + return std::shared_ptr>(nullptr); } void ExplicitModelAdapter::setValue(StateType* const state, uint_fast64_t const index, bool const value) { diff --git a/src/adapters/ExplicitModelAdapter.h b/src/adapters/ExplicitModelAdapter.h index 63cd91646..1fe2e29a4 100644 --- a/src/adapters/ExplicitModelAdapter.h +++ b/src/adapters/ExplicitModelAdapter.h @@ -56,7 +56,7 @@ public: ExplicitModelAdapter(storm::ir::Program program); ~ExplicitModelAdapter(); - std::shared_ptr getModel(std::string const & rewardModelName = ""); + std::shared_ptr> getModel(std::string const & rewardModelName = ""); private: diff --git a/src/adapters/SymbolicModelAdapter.h b/src/adapters/SymbolicModelAdapter.h index f42d8f873..06b7dd37f 100644 --- a/src/adapters/SymbolicModelAdapter.h +++ b/src/adapters/SymbolicModelAdapter.h @@ -8,7 +8,7 @@ #ifndef STORM_ADAPTERS_SYMBOLICMODELADAPTER_H_ #define STORM_ADAPTERS_SYMBOLICMODELADAPTER_H_ -#include "src/exceptions/WrongFileFormatException.h" +#include "src/exceptions/WrongFormatException.h" #include "src/utility/CuddUtility.h" #include "SymbolicExpressionAdapter.h" @@ -255,7 +255,7 @@ private: storm::ir::IntegerVariable const& integerVariable = module.getIntegerVariable(j); uint_fast64_t integerRange = integerVariable.getUpperBound()->getValueAsInt(nullptr) - integerVariable.getLowerBound()->getValueAsInt(nullptr); if (integerRange <= 0) { - throw storm::exceptions::WrongFileFormatException() << "Range of variable " + throw storm::exceptions::WrongFormatException() << "Range of variable " << integerVariable.getName() << " is empty or negativ."; } uint_fast64_t numberOfDecisionDiagramVariables = static_cast(std::ceil(std::log2(integerRange))); diff --git a/src/parser/PrismParser.cpp b/src/parser/PrismParser.cpp index 648962689..8057eda18 100644 --- a/src/parser/PrismParser.cpp +++ b/src/parser/PrismParser.cpp @@ -12,7 +12,7 @@ #include "src/parser/PrismParser/PrismGrammar.h" // If the parser fails due to ill-formed data, this exception is thrown. -#include "src/exceptions/WrongFileFormatException.h" +#include "src/exceptions/WrongFormatException.h" // Needed for file IO. #include @@ -117,7 +117,7 @@ storm::ir::Program PrismParser::parse(std::istream& inputStream, std::string con grammar.resetGrammars(); // Now propagate exception. - throw storm::exceptions::WrongFileFormatException() << msg.str(); + throw storm::exceptions::WrongFormatException() << msg.str(); } return result; diff --git a/src/parser/PrismParser/PrismGrammar.cpp b/src/parser/PrismParser/PrismGrammar.cpp index 1fb3ff00e..86f1319b9 100644 --- a/src/parser/PrismParser/PrismGrammar.cpp +++ b/src/parser/PrismParser/PrismGrammar.cpp @@ -18,9 +18,6 @@ #include "src/parser/PrismParser/IdentifierGrammars.h" #include "src/parser/PrismParser/VariableState.h" -// If the parser fails due to ill-formed data, this exception is thrown. -#include "src/exceptions/WrongFileFormatException.h" - // Needed for file IO. #include #include diff --git a/src/storm.cpp b/src/storm.cpp index d60700018..548399d38 100644 --- a/src/storm.cpp +++ b/src/storm.cpp @@ -27,7 +27,7 @@ #include "src/modelchecker/GmmxxMdpPrctlModelChecker.h" #include "src/parser/AutoParser.h" #include "src/parser/PrctlParser.h" -#include "src/solver/GraphAnalyzer.h" +//#include "src/solver/GraphAnalyzer.h" #include "src/utility/Settings.h" #include "src/utility/ErrorHandling.h" #include "src/formula/Prctl.h"