From 994250a6973077c216ae2bea75d894fd2a13ef88 Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 9 Jan 2015 15:05:09 +0100 Subject: [PATCH] Fixed missing ifdefs. Former-commit-id: 1e95658a8fdf06bc00a3ebe1ff0b909ae8718f39 --- src/adapters/ExplicitModelAdapter.h | 18 +++++++++--------- src/adapters/MathsatExpressionAdapter.cpp | 2 ++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/adapters/ExplicitModelAdapter.h b/src/adapters/ExplicitModelAdapter.h index b0bb7d864..6fb53a765 100644 --- a/src/adapters/ExplicitModelAdapter.h +++ b/src/adapters/ExplicitModelAdapter.h @@ -233,8 +233,8 @@ namespace storm { * @param action The action label to select. * @return A list of lists of active commands or nothing. */ - static boost::optional>> getActiveCommandsByAction(storm::prism::Program const& program, StateType const* state, std::string const& action) { - boost::optional>> result((std::vector>())); + static boost::optional>>> getActiveCommandsByAction(storm::prism::Program const& program, StateType const* state, std::string const& action) { + boost::optional>>> result((std::vector>>())); // Iterate over all modules. for (uint_fast64_t i = 0; i < program.getNumberOfModules(); ++i) { @@ -250,10 +250,10 @@ namespace storm { // If the module contains the action, but there is no command in the module that is labeled with // this action, we don't have any feasible command combinations. if (commandIndices.empty()) { - return boost::optional>>(); + return boost::optional>>>(); } - std::list commands; + std::list> commands; // Look up commands by their indices and add them if the guard evaluates to true in the given state. for (uint_fast64_t commandIndex : commandIndices) { @@ -266,7 +266,7 @@ namespace storm { // If there was no enabled command although the module has some command with the required action label, // we must not return anything. if (commands.size() == 0) { - return boost::optional>>(); + return boost::optional>>>(); } result.get().push_back(std::move(commands)); @@ -333,12 +333,12 @@ namespace storm { for (std::string const& action : program.getActions()) { StateType const* currentState = stateInformation.reachableStates[stateIndex]; - boost::optional>> optionalActiveCommandLists = getActiveCommandsByAction(program, currentState, action); + boost::optional>>> optionalActiveCommandLists = getActiveCommandsByAction(program, currentState, action); // Only process this action label, if there is at least one feasible solution. if (optionalActiveCommandLists) { - std::vector> const& activeCommandList = optionalActiveCommandLists.get(); - std::vector::const_iterator> iteratorList(activeCommandList.size()); + std::vector>> const& activeCommandList = optionalActiveCommandLists.get(); + std::vector>::const_iterator> iteratorList(activeCommandList.size()); // Initialize the list of iterators. for (size_t i = 0; i < activeCommandList.size(); ++i) { @@ -408,7 +408,7 @@ namespace storm { // Add the labels of all commands to this choice. for (uint_fast64_t i = 0; i < iteratorList.size(); ++i) { - choice.addChoiceLabel(iteratorList[i]->getGlobalIndex()); + choice.addChoiceLabel(iteratorList[i]->get().getGlobalIndex()); } double probabilitySum = 0; diff --git a/src/adapters/MathsatExpressionAdapter.cpp b/src/adapters/MathsatExpressionAdapter.cpp index 32ff09e55..85326ff55 100644 --- a/src/adapters/MathsatExpressionAdapter.cpp +++ b/src/adapters/MathsatExpressionAdapter.cpp @@ -1,5 +1,7 @@ #include "src/adapters/MathsatExpressionAdapter.h" +#ifdef STORM_HAVE_MSAT bool operator==(msat_decl decl1, msat_decl decl2) { return decl1.repr == decl2.repr; } +#endif