From d9db7d57b309345fdff40c0031be003fef061834 Mon Sep 17 00:00:00 2001 From: Stefan Pranger Date: Wed, 17 Feb 2021 20:18:42 +0100 Subject: [PATCH] parsing ShieldExpression into shared_ptr --- src/storm-parsers/parser/FormulaParserGrammar.cpp | 6 +++--- src/storm-parsers/parser/FormulaParserGrammar.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/storm-parsers/parser/FormulaParserGrammar.cpp b/src/storm-parsers/parser/FormulaParserGrammar.cpp index 9182a498c..236b6b555 100644 --- a/src/storm-parsers/parser/FormulaParserGrammar.cpp +++ b/src/storm-parsers/parser/FormulaParserGrammar.cpp @@ -512,11 +512,11 @@ namespace storm { return std::make_pair(comparisonType, value); } - storm::logic::ShieldExpression FormulaParserGrammar::createShieldExpression(storm::logic::ShieldingType type, std::pair comparisonStruct) { - return storm::logic::ShieldExpression(type, comparisonStruct.first, comparisonStruct.second); + std::shared_ptr FormulaParserGrammar::createShieldExpression(storm::logic::ShieldingType type, std::pair comparisonStruct) { + return std::shared_ptr(new storm::logic::ShieldExpression(type, comparisonStruct.first, comparisonStruct.second)); } - storm::jani::Property FormulaParserGrammar::createShieldingProperty(boost::optional const& propertyName, std::shared_ptr const& formula, storm::logic::ShieldExpression shieldExpression) { + storm::jani::Property FormulaParserGrammar::createShieldingProperty(boost::optional const& propertyName, std::shared_ptr const& formula, std::shared_ptr const& shieldExpression) { ++propertyCount; if (propertyName) { return storm::jani::Property(propertyName.get(), formula, this->getUndefinedConstants(formula), shieldExpression); diff --git a/src/storm-parsers/parser/FormulaParserGrammar.h b/src/storm-parsers/parser/FormulaParserGrammar.h index 00ce6a7f5..58efc50d1 100644 --- a/src/storm-parsers/parser/FormulaParserGrammar.h +++ b/src/storm-parsers/parser/FormulaParserGrammar.h @@ -205,7 +205,7 @@ namespace storm { qi::rule(), Skipper> quantileFormula; qi::rule(), Skipper> gameFormula; - qi::rule shieldExpression; + qi::rule(), Skipper> shieldExpression; qi::rule shieldingType; qi::rule multiplicativeFactor; qi::rule, qi::locals, Skipper> shieldComparison; @@ -217,7 +217,7 @@ namespace storm { std::shared_ptr createGameFormula(storm::logic::PlayerCoalition const& coalition, std::shared_ptr const& subformula) const; std::pair createShieldComparisonStruct(storm::logic::ShieldComparison comparisonType, double value); - storm::logic::ShieldExpression createShieldExpression(storm::logic::ShieldingType type, std::pair comparisonStruct); + std::shared_ptr createShieldExpression(storm::logic::ShieldingType type, std::pair comparisonStruct); bool areConstantDefinitionsAllowed() const; void addConstant(std::string const& name, ConstantDataType type, boost::optional const& expression); @@ -254,7 +254,7 @@ namespace storm { std::set getUndefinedConstants(std::shared_ptr const& formula) const; storm::jani::Property createProperty(boost::optional const& propertyName, storm::modelchecker::FilterType const& filterType, std::shared_ptr const& formula, std::shared_ptr const& states); storm::jani::Property createPropertyWithDefaultFilterTypeAndStates(boost::optional const& propertyName, std::shared_ptr const& formula); - storm::jani::Property createShieldingProperty(boost::optional const& propertyName, std::shared_ptr const& formula, storm::logic::ShieldExpression); + storm::jani::Property createShieldingProperty(boost::optional const& propertyName, std::shared_ptr const& formula, std::shared_ptr const& shieldingExpression); // An error handler function. phoenix::function handler;