Browse Source

Merge branch 'master' into refactor_pla

main
TimQu 9 years ago
parent
commit
511fe90c5b
  1. 5
      src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp
  2. 2
      src/storm/builder/jit/ModelComponentsBuilder.cpp
  3. 2
      src/storm/modelchecker/multiobjective/pcaa/SparseMaPcaaWeightVectorChecker.h
  4. 2
      src/storm/modelchecker/multiobjective/pcaa/SparseMdpPcaaWeightVectorChecker.h
  5. 1
      src/storm/modelchecker/multiobjective/pcaa/SparsePcaaAchievabilityQuery.h
  6. 2
      src/storm/modelchecker/multiobjective/pcaa/SparsePcaaParetoQuery.h
  7. 1
      src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuantitativeQuery.h
  8. 2
      src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.h
  9. 2
      src/storm/modelchecker/multiobjective/pcaa/SparsePcaaWeightVectorChecker.h
  10. 2
      src/storm/parser/JaniParser.cpp

5
src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp

@ -1532,11 +1532,16 @@ namespace storm {
} }
} }
std::set<std::string> expressionLabelStrings;
for (auto const& expression : this->options.getExpressionLabels()) { for (auto const& expression : this->options.getExpressionLabels()) {
cpptempl::data_map label; cpptempl::data_map label;
std::string expressionLabelString = expression.toString();
if(expressionLabelStrings.count(expressionLabelString) == 0) {
label["name"] = expression.toString(); label["name"] = expression.toString();
label["predicate"] = expressionTranslator.translate(shiftVariablesWrtLowerBound(expression), storm::expressions::ToCppTranslationOptions(variablePrefixes, variableToName, storm::expressions::ToCppTranslationMode::CastDouble)); label["predicate"] = expressionTranslator.translate(shiftVariablesWrtLowerBound(expression), storm::expressions::ToCppTranslationOptions(variablePrefixes, variableToName, storm::expressions::ToCppTranslationMode::CastDouble));
labels.push_back(label); labels.push_back(label);
expressionLabelStrings.insert(expressionLabelString);
}
} }
modelData["labels"] = cpptempl::make_data(labels); modelData["labels"] = cpptempl::make_data(labels);

2
src/storm/builder/jit/ModelComponentsBuilder.cpp

@ -129,7 +129,7 @@ namespace storm {
return new storm::models::sparse::Dtmc<ValueType, storm::models::sparse::StandardRewardModel<ValueType>>(std::move(transitionMatrix), std::move(stateLabeling), std::move(rewardModels)); return new storm::models::sparse::Dtmc<ValueType, storm::models::sparse::StandardRewardModel<ValueType>>(std::move(transitionMatrix), std::move(stateLabeling), std::move(rewardModels));
} else if (modelType == storm::jani::ModelType::CTMC) { } else if (modelType == storm::jani::ModelType::CTMC) {
return new storm::models::sparse::Ctmc<ValueType, storm::models::sparse::StandardRewardModel<ValueType>>(std::move(transitionMatrix), std::move(stateLabeling), std::move(rewardModels)); return new storm::models::sparse::Ctmc<ValueType, storm::models::sparse::StandardRewardModel<ValueType>>(std::move(transitionMatrix), std::move(stateLabeling), std::move(rewardModels));
} else if (modelType == storm::jani::ModelType::MDP) {
} else if (modelType == storm::jani::ModelType::MDP || modelType == storm::jani::ModelType::LTS) {
return new storm::models::sparse::Mdp<ValueType, storm::models::sparse::StandardRewardModel<ValueType>>(std::move(transitionMatrix), std::move(stateLabeling), std::move(rewardModels)); return new storm::models::sparse::Mdp<ValueType, storm::models::sparse::StandardRewardModel<ValueType>>(std::move(transitionMatrix), std::move(stateLabeling), std::move(rewardModels));
} else if (modelType == storm::jani::ModelType::MA) { } else if (modelType == storm::jani::ModelType::MA) {
std::vector<ValueType> exitRates(transitionMatrix.getRowGroupCount(), storm::utility::zero<ValueType>()); std::vector<ValueType> exitRates(transitionMatrix.getRowGroupCount(), storm::utility::zero<ValueType>());

2
src/storm/modelchecker/multiobjective/pcaa/SparseMaPcaaWeightVectorChecker.h

@ -31,6 +31,8 @@ namespace storm {
storm::storage::BitVector const& ecActions, storm::storage::BitVector const& ecActions,
storm::storage::BitVector const& possiblyRecurrentStates); storm::storage::BitVector const& possiblyRecurrentStates);
virtual ~SparseMaPcaaWeightVectorChecker() = default;
private: private:
/* /*

2
src/storm/modelchecker/multiobjective/pcaa/SparseMdpPcaaWeightVectorChecker.h

@ -26,6 +26,8 @@ namespace storm {
storm::storage::BitVector const& ecActions, storm::storage::BitVector const& ecActions,
storm::storage::BitVector const& possiblyRecurrentStates); storm::storage::BitVector const& possiblyRecurrentStates);
virtual ~SparseMdpPcaaWeightVectorChecker() = default;
private: private:
/*! /*!

1
src/storm/modelchecker/multiobjective/pcaa/SparsePcaaAchievabilityQuery.h

@ -25,6 +25,7 @@ namespace storm {
*/ */
SparsePcaaAchievabilityQuery(SparsePcaaPreprocessorReturnType<SparseModelType>& preprocessorResult); SparsePcaaAchievabilityQuery(SparsePcaaPreprocessorReturnType<SparseModelType>& preprocessorResult);
virtual ~SparsePcaaAchievabilityQuery() = default;
/* /*
* Invokes the computation and retrieves the result * Invokes the computation and retrieves the result

2
src/storm/modelchecker/multiobjective/pcaa/SparsePcaaParetoQuery.h

@ -25,6 +25,8 @@ namespace storm {
*/ */
SparsePcaaParetoQuery(SparsePcaaPreprocessorReturnType<SparseModelType>& preprocessorResult); SparsePcaaParetoQuery(SparsePcaaPreprocessorReturnType<SparseModelType>& preprocessorResult);
virtual ~SparsePcaaParetoQuery() = default;
/* /*
* Invokes the computation and retrieves the result * Invokes the computation and retrieves the result

1
src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuantitativeQuery.h

@ -25,6 +25,7 @@ namespace storm {
*/ */
SparsePcaaQuantitativeQuery(SparsePcaaPreprocessorReturnType<SparseModelType>& preprocessorResult); SparsePcaaQuantitativeQuery(SparsePcaaPreprocessorReturnType<SparseModelType>& preprocessorResult);
virtual ~SparsePcaaQuantitativeQuery() = default;
/* /*
* Invokes the computation and retrieves the result * Invokes the computation and retrieves the result

2
src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.h

@ -22,6 +22,8 @@ namespace storm {
typedef std::vector<GeometryValueType> Point; typedef std::vector<GeometryValueType> Point;
typedef std::vector<GeometryValueType> WeightVector; typedef std::vector<GeometryValueType> WeightVector;
virtual ~SparsePcaaQuery() = default;
/* /*
* Invokes the computation and retrieves the result * Invokes the computation and retrieves the result
*/ */

2
src/storm/modelchecker/multiobjective/pcaa/SparsePcaaWeightVectorChecker.h

@ -40,6 +40,8 @@ namespace storm {
storm::storage::BitVector const& ecActions, storm::storage::BitVector const& ecActions,
storm::storage::BitVector const& possiblyRecurrentStates); storm::storage::BitVector const& possiblyRecurrentStates);
virtual ~SparsePcaaWeightVectorChecker() = default;
/*! /*!
* - computes the maximal expected reward w.r.t. the weighted sum of the rewards of the individual objectives * - computes the maximal expected reward w.r.t. the weighted sum of the rewards of the individual objectives
* - extracts the scheduler that induces this maximum * - extracts the scheduler that induces this maximum

2
src/storm/parser/JaniParser.cpp

@ -370,7 +370,7 @@ namespace storm {
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Reward bounded properties are not supported by storm"); STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Reward bounded properties are not supported by storm");
} }
if (args[0]->isTrueFormula()) { if (args[0]->isTrueFormula()) {
return std::make_shared<storm::logic::EventuallyFormula const>(args[1], storm::logic::FormulaContext::Reward);
return std::make_shared<storm::logic::EventuallyFormula const>(args[1], formulaContext);
} else { } else {
return std::make_shared<storm::logic::UntilFormula const>(args[0], args[1]); return std::make_shared<storm::logic::UntilFormula const>(args[0], args[1]);
} }

Loading…
Cancel
Save