Browse Source
initial support for transient boolean variables in formulas of JANI models (game-based engine)
tempestpy_adaptions
initial support for transient boolean variables in formulas of JANI models (game-based engine)
tempestpy_adaptions
dehnert
8 years ago
9 changed files with 243 additions and 265 deletions
-
4src/storm/abstraction/MenuGameRefiner.h
-
2src/storm/abstraction/jani/JaniMenuGameAbstractor.cpp
-
51src/storm/modelchecker/abstraction/GameBasedMdpModelChecker.cpp
-
30src/storm/storage/expressions/FullPredicateSplitter.cpp
-
2src/storm/storage/expressions/FullPredicateSplitter.h
-
225src/storm/storage/expressions/VariableSetAbstractor.cpp
-
180src/storm/storage/expressions/VariableSetPredicateSplitter.cpp
-
10src/storm/storage/expressions/VariableSetPredicateSplitter.h
-
4src/storm/storage/jani/Automaton.cpp
@ -1,225 +0,0 @@ |
|||
#include "storm/storage/expressions/VariableSetAbstractor.h"
|
|||
|
|||
#include "storm/storage/expressions/Expressions.h"
|
|||
|
|||
#include "storm/utility/macros.h"
|
|||
#include "storm/exceptions/InvalidArgumentException.h"
|
|||
|
|||
namespace storm { |
|||
namespace expressions { |
|||
|
|||
VariableSetAbstractor::VariableSetAbstractor(std::set<storm::expressions::Variable> const& variablesToAbstract) : variablesToAbstract(variablesToAbstract) { |
|||
// Intentionally left empty.
|
|||
} |
|||
|
|||
storm::expressions::Expression VariableSetAbstractor::abstract(storm::expressions::Expression const& expression) { |
|||
std::set<storm::expressions::Variable> containedVariables = expression.getVariables(); |
|||
bool onlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), containedVariables.begin(), containedVariables.end()); |
|||
|
|||
if (onlyAbstractedVariables) { |
|||
return storm::expressions::Expression(); |
|||
} |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(containedVariables.begin(), containedVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool hasAbstractedVariables = !tmp.empty(); |
|||
|
|||
if (hasAbstractedVariables) { |
|||
return boost::any_cast<storm::expressions::Expression>(expression.accept(*this, boost::none)); |
|||
} else { |
|||
return expression; |
|||
} |
|||
} |
|||
|
|||
boost::any VariableSetAbstractor::visit(IfThenElseExpression const& expression, boost::any const& data) { |
|||
std::set<storm::expressions::Variable> conditionVariables; |
|||
expression.getCondition()->gatherVariables(conditionVariables); |
|||
bool conditionOnlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), conditionVariables.begin(), conditionVariables.end()); |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(conditionVariables.begin(), conditionVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool conditionHasAbstractedVariables = !tmp.empty(); |
|||
|
|||
std::set<storm::expressions::Variable> thenVariables; |
|||
expression.getThenExpression()->gatherVariables(thenVariables); |
|||
bool thenOnlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), thenVariables.begin(), thenVariables.end()); |
|||
|
|||
tmp.clear(); |
|||
std::set_intersection(thenVariables.begin(), thenVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool thenHasAbstractedVariables = !tmp.empty(); |
|||
|
|||
std::set<storm::expressions::Variable> elseVariables; |
|||
expression.getElseExpression()->gatherVariables(elseVariables); |
|||
bool elseOnlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), elseVariables.begin(), elseVariables.end()); |
|||
|
|||
tmp.clear(); |
|||
std::set_intersection(elseVariables.begin(), elseVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool elseHasAbstractedVariables = !tmp.empty(); |
|||
|
|||
if (conditionHasAbstractedVariables || thenHasAbstractedVariables || elseHasAbstractedVariables) { |
|||
if (conditionOnlyAbstractedVariables && thenOnlyAbstractedVariables && elseOnlyAbstractedVariables) { |
|||
return boost::any(); |
|||
} else { |
|||
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Cannot abstract from variable set in expression as it mixes variables of different types."); |
|||
} |
|||
} else { |
|||
return expression.toExpression(); |
|||
} |
|||
} |
|||
|
|||
boost::any VariableSetAbstractor::visit(BinaryBooleanFunctionExpression const& expression, boost::any const& data) { |
|||
std::set<storm::expressions::Variable> leftContainedVariables; |
|||
expression.getFirstOperand()->gatherVariables(leftContainedVariables); |
|||
bool leftOnlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), leftContainedVariables.begin(), leftContainedVariables.end()); |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(leftContainedVariables.begin(), leftContainedVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool leftHasAbstractedVariables = !tmp.empty(); |
|||
|
|||
std::set<storm::expressions::Variable> rightContainedVariables; |
|||
expression.getSecondOperand()->gatherVariables(rightContainedVariables); |
|||
bool rightOnlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), rightContainedVariables.begin(), rightContainedVariables.end()); |
|||
|
|||
tmp.clear(); |
|||
std::set_intersection(rightContainedVariables.begin(), rightContainedVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool rightHasAbstractedVariables = !tmp.empty(); |
|||
|
|||
if (leftOnlyAbstractedVariables && rightOnlyAbstractedVariables) { |
|||
return boost::any(); |
|||
} else if (!leftHasAbstractedVariables && !rightHasAbstractedVariables) { |
|||
return expression; |
|||
} else { |
|||
if (leftHasAbstractedVariables && !rightHasAbstractedVariables) { |
|||
return expression.getFirstOperand()->toExpression(); |
|||
} else if (rightHasAbstractedVariables && !leftHasAbstractedVariables) { |
|||
return expression.getSecondOperand()->toExpression(); |
|||
} else { |
|||
storm::expressions::Expression leftResult = boost::any_cast<storm::expressions::Expression>(expression.getFirstOperand()->accept(*this, data)); |
|||
storm::expressions::Expression rightResult = boost::any_cast<storm::expressions::Expression>(expression.getFirstOperand()->accept(*this, data)); |
|||
|
|||
switch (expression.getOperatorType()) { |
|||
case storm::expressions::BinaryBooleanFunctionExpression::OperatorType::And: return leftResult && rightResult; |
|||
case storm::expressions::BinaryBooleanFunctionExpression::OperatorType::Or: return leftResult || rightResult; |
|||
case storm::expressions::BinaryBooleanFunctionExpression::OperatorType::Xor: return leftResult ^ rightResult; |
|||
case storm::expressions::BinaryBooleanFunctionExpression::OperatorType::Implies: return storm::expressions::implies(leftResult, rightResult); |
|||
case storm::expressions::BinaryBooleanFunctionExpression::OperatorType::Iff: return storm::expressions::iff(leftResult, rightResult); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
boost::any VariableSetAbstractor::visit(BinaryNumericalFunctionExpression const& expression, boost::any const& data) { |
|||
std::set<storm::expressions::Variable> leftContainedVariables; |
|||
expression.getFirstOperand()->gatherVariables(leftContainedVariables); |
|||
bool leftOnlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), leftContainedVariables.begin(), leftContainedVariables.end()); |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(leftContainedVariables.begin(), leftContainedVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool leftHasAbstractedVariables = !tmp.empty(); |
|||
|
|||
std::set<storm::expressions::Variable> rightContainedVariables; |
|||
expression.getSecondOperand()->gatherVariables(rightContainedVariables); |
|||
bool rightOnlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), rightContainedVariables.begin(), rightContainedVariables.end()); |
|||
|
|||
tmp.clear(); |
|||
std::set_intersection(rightContainedVariables.begin(), rightContainedVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool rightHasAbstractedVariables = !tmp.empty(); |
|||
|
|||
if (leftOnlyAbstractedVariables && rightOnlyAbstractedVariables) { |
|||
return boost::any(); |
|||
} else if (!leftHasAbstractedVariables && !rightHasAbstractedVariables) { |
|||
return expression; |
|||
} else { |
|||
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Cannot abstract from variable set in expression as it mixes variables of different types."); |
|||
} |
|||
} |
|||
|
|||
boost::any VariableSetAbstractor::visit(BinaryRelationExpression const& expression, boost::any const& data) { |
|||
std::set<storm::expressions::Variable> leftContainedVariables; |
|||
expression.getFirstOperand()->gatherVariables(leftContainedVariables); |
|||
bool leftOnlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), leftContainedVariables.begin(), leftContainedVariables.end()); |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(leftContainedVariables.begin(), leftContainedVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool leftHasAbstractedVariables = !tmp.empty(); |
|||
|
|||
std::set<storm::expressions::Variable> rightContainedVariables; |
|||
expression.getSecondOperand()->gatherVariables(rightContainedVariables); |
|||
bool rightOnlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), rightContainedVariables.begin(), rightContainedVariables.end()); |
|||
|
|||
tmp.clear(); |
|||
std::set_intersection(rightContainedVariables.begin(), rightContainedVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool rightHasAbstractedVariables = !tmp.empty(); |
|||
|
|||
if (leftOnlyAbstractedVariables && rightOnlyAbstractedVariables) { |
|||
return boost::any(); |
|||
} else if (!leftHasAbstractedVariables && !rightHasAbstractedVariables) { |
|||
return expression; |
|||
} else { |
|||
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Cannot abstract from variable set in expression as it mixes variables of different types."); |
|||
} |
|||
} |
|||
|
|||
boost::any VariableSetAbstractor::visit(VariableExpression const& expression, boost::any const& data) { |
|||
if (variablesToAbstract.find(expression.getVariable()) != variablesToAbstract.end()) { |
|||
return boost::any(); |
|||
} else { |
|||
return expression.toExpression(); |
|||
} |
|||
} |
|||
|
|||
boost::any VariableSetAbstractor::visit(UnaryBooleanFunctionExpression const& expression, boost::any const& data) { |
|||
std::set<storm::expressions::Variable> containedVariables; |
|||
expression.gatherVariables(containedVariables); |
|||
bool onlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), containedVariables.begin(), containedVariables.end()); |
|||
|
|||
if (onlyAbstractedVariables) { |
|||
return boost::any(); |
|||
} |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(containedVariables.begin(), containedVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool hasAbstractedVariables = !tmp.empty(); |
|||
if (hasAbstractedVariables) { |
|||
storm::expressions::Expression subexpression = boost::any_cast<storm::expressions::Expression>(expression.getOperand()->accept(*this, data)); |
|||
switch (expression.getOperatorType()) { |
|||
case storm::expressions::UnaryBooleanFunctionExpression::OperatorType::Not: return !subexpression; |
|||
} |
|||
} else { |
|||
return expression.toExpression(); |
|||
} |
|||
} |
|||
|
|||
boost::any VariableSetAbstractor::visit(UnaryNumericalFunctionExpression const& expression, boost::any const& data) { |
|||
std::set<storm::expressions::Variable> containedVariables; |
|||
expression.gatherVariables(containedVariables); |
|||
bool onlyAbstractedVariables = std::includes(variablesToAbstract.begin(), variablesToAbstract.end(), containedVariables.begin(), containedVariables.end()); |
|||
|
|||
if (onlyAbstractedVariables) { |
|||
return boost::any(); |
|||
} |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(containedVariables.begin(), containedVariables.end(), variablesToAbstract.begin(), variablesToAbstract.end(), std::inserter(tmp, tmp.begin())); |
|||
bool hasAbstractedVariables = !tmp.empty(); |
|||
if (hasAbstractedVariables) { |
|||
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Cannot abstract from variable set in expression as it mixes variables of different types."); |
|||
} else { |
|||
return expression.toExpression(); |
|||
} |
|||
} |
|||
|
|||
boost::any VariableSetAbstractor::visit(BooleanLiteralExpression const& expression, boost::any const& data) { |
|||
return expression.toExpression(); |
|||
} |
|||
|
|||
boost::any VariableSetAbstractor::visit(IntegerLiteralExpression const& expression, boost::any const& data) { |
|||
return expression.toExpression(); |
|||
} |
|||
|
|||
boost::any VariableSetAbstractor::visit(RationalLiteralExpression const& expression, boost::any const& data) { |
|||
return expression.toExpression(); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,180 @@ |
|||
#include "storm/storage/expressions/VariableSetPredicateSplitter.h"
|
|||
|
|||
#include "storm/storage/expressions/Expressions.h"
|
|||
|
|||
#include "storm/utility/macros.h"
|
|||
#include "storm/exceptions/InvalidArgumentException.h"
|
|||
|
|||
namespace storm { |
|||
namespace expressions { |
|||
|
|||
VariableSetPredicateSplitter::VariableSetPredicateSplitter(std::set<storm::expressions::Variable> const& irrelevantVariables) : irrelevantVariables(irrelevantVariables) { |
|||
// Intentionally left empty.
|
|||
} |
|||
|
|||
std::vector<storm::expressions::Expression> VariableSetPredicateSplitter::split(storm::expressions::Expression const& expression) { |
|||
STORM_LOG_THROW(expression.hasBooleanType(), storm::exceptions::InvalidArgumentException, "Expected predicate of boolean type."); |
|||
|
|||
// Gather all atoms.
|
|||
resultPredicates.clear(); |
|||
expression.accept(*this, boost::none); |
|||
|
|||
// Remove all boolean literals from the atoms.
|
|||
std::vector<storm::expressions::Expression> expressionsToKeep; |
|||
for (auto const& atom : resultPredicates) { |
|||
if (!atom.isTrue() && !atom.isFalse()) { |
|||
expressionsToKeep.push_back(atom); |
|||
} |
|||
} |
|||
resultPredicates = std::move(expressionsToKeep); |
|||
|
|||
return resultPredicates; |
|||
} |
|||
|
|||
boost::any VariableSetPredicateSplitter::visit(IfThenElseExpression const& expression, boost::any const& data) { |
|||
std::set<storm::expressions::Variable> conditionVariables; |
|||
expression.getCondition()->gatherVariables(conditionVariables); |
|||
bool conditionOnlyIrrelevantVariables = std::includes(irrelevantVariables.begin(), irrelevantVariables.end(), conditionVariables.begin(), conditionVariables.end()); |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(conditionVariables.begin(), conditionVariables.end(), irrelevantVariables.begin(), irrelevantVariables.end(), std::inserter(tmp, tmp.begin())); |
|||
bool conditionHasIrrelevantVariables = !tmp.empty(); |
|||
|
|||
std::set<storm::expressions::Variable> thenVariables; |
|||
expression.getThenExpression()->gatherVariables(thenVariables); |
|||
bool thenOnlyIrrelevantVariables = std::includes(irrelevantVariables.begin(), irrelevantVariables.end(), thenVariables.begin(), thenVariables.end()); |
|||
|
|||
tmp.clear(); |
|||
std::set_intersection(thenVariables.begin(), thenVariables.end(), irrelevantVariables.begin(), irrelevantVariables.end(), std::inserter(tmp, tmp.begin())); |
|||
bool thenHasIrrelevantVariables = !tmp.empty(); |
|||
|
|||
std::set<storm::expressions::Variable> elseVariables; |
|||
expression.getElseExpression()->gatherVariables(elseVariables); |
|||
bool elseOnlyIrrelevantVariables = std::includes(irrelevantVariables.begin(), irrelevantVariables.end(), elseVariables.begin(), elseVariables.end()); |
|||
|
|||
tmp.clear(); |
|||
std::set_intersection(elseVariables.begin(), elseVariables.end(), irrelevantVariables.begin(), irrelevantVariables.end(), std::inserter(tmp, tmp.begin())); |
|||
bool elseHasIrrelevantVariables = !tmp.empty(); |
|||
|
|||
if (conditionHasIrrelevantVariables || thenHasIrrelevantVariables || elseHasIrrelevantVariables) { |
|||
STORM_LOG_THROW(conditionOnlyIrrelevantVariables && thenOnlyIrrelevantVariables && elseOnlyIrrelevantVariables, storm::exceptions::InvalidArgumentException, "Cannot split expression based on variable set as variables of different type are related."); |
|||
} else { |
|||
resultPredicates.push_back(expression.toExpression()); |
|||
} |
|||
return boost::any(); |
|||
} |
|||
|
|||
boost::any VariableSetPredicateSplitter::visit(BinaryBooleanFunctionExpression const& expression, boost::any const& data) { |
|||
std::set<storm::expressions::Variable> leftContainedVariables; |
|||
expression.getFirstOperand()->gatherVariables(leftContainedVariables); |
|||
bool leftOnlyIrrelevantVariables = std::includes(irrelevantVariables.begin(), irrelevantVariables.end(), leftContainedVariables.begin(), leftContainedVariables.end()); |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(leftContainedVariables.begin(), leftContainedVariables.end(), irrelevantVariables.begin(), irrelevantVariables.end(), std::inserter(tmp, tmp.begin())); |
|||
bool leftHasIrrelevantVariables = !tmp.empty(); |
|||
|
|||
std::set<storm::expressions::Variable> rightContainedVariables; |
|||
expression.getSecondOperand()->gatherVariables(rightContainedVariables); |
|||
bool rightOnlyIrrelevantVariables = std::includes(irrelevantVariables.begin(), irrelevantVariables.end(), rightContainedVariables.begin(), rightContainedVariables.end()); |
|||
|
|||
tmp.clear(); |
|||
std::set_intersection(rightContainedVariables.begin(), rightContainedVariables.end(), irrelevantVariables.begin(), irrelevantVariables.end(), std::inserter(tmp, tmp.begin())); |
|||
bool rightHasIrrelevantVariables = !tmp.empty(); |
|||
|
|||
if (leftOnlyIrrelevantVariables && rightOnlyIrrelevantVariables) { |
|||
return boost::any(); |
|||
} |
|||
|
|||
if (!leftHasIrrelevantVariables && !rightHasIrrelevantVariables) { |
|||
resultPredicates.push_back(expression.toExpression()); |
|||
} |
|||
|
|||
if (!leftHasIrrelevantVariables) { |
|||
resultPredicates.push_back(expression.getFirstOperand()->toExpression()); |
|||
} else if (!leftOnlyIrrelevantVariables) { |
|||
return expression.getFirstOperand()->accept(*this, data); |
|||
} |
|||
|
|||
if (!rightHasIrrelevantVariables) { |
|||
resultPredicates.push_back(expression.getSecondOperand()->toExpression()); |
|||
} else if (!rightOnlyIrrelevantVariables) { |
|||
return expression.getSecondOperand()->accept(*this, data); |
|||
} |
|||
return boost::any(); |
|||
} |
|||
|
|||
boost::any VariableSetPredicateSplitter::visit(BinaryNumericalFunctionExpression const& expression, boost::any const& data) { |
|||
return boost::any(); |
|||
} |
|||
|
|||
boost::any VariableSetPredicateSplitter::visit(BinaryRelationExpression const& expression, boost::any const& data) { |
|||
std::set<storm::expressions::Variable> leftContainedVariables; |
|||
expression.getFirstOperand()->gatherVariables(leftContainedVariables); |
|||
bool leftOnlyIrrelevantVariables = std::includes(irrelevantVariables.begin(), irrelevantVariables.end(), leftContainedVariables.begin(), leftContainedVariables.end()); |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(leftContainedVariables.begin(), leftContainedVariables.end(), irrelevantVariables.begin(), irrelevantVariables.end(), std::inserter(tmp, tmp.begin())); |
|||
bool leftHasIrrelevantVariables = !tmp.empty(); |
|||
|
|||
std::set<storm::expressions::Variable> rightContainedVariables; |
|||
expression.getSecondOperand()->gatherVariables(rightContainedVariables); |
|||
bool rightOnlyIrrelevantVariables = std::includes(irrelevantVariables.begin(), irrelevantVariables.end(), rightContainedVariables.begin(), rightContainedVariables.end()); |
|||
|
|||
tmp.clear(); |
|||
std::set_intersection(rightContainedVariables.begin(), rightContainedVariables.end(), irrelevantVariables.begin(), irrelevantVariables.end(), std::inserter(tmp, tmp.begin())); |
|||
bool rightHasIrrelevantVariables = !tmp.empty(); |
|||
|
|||
if (!leftHasIrrelevantVariables && !rightHasIrrelevantVariables) { |
|||
resultPredicates.push_back(expression.toExpression()); |
|||
} else { |
|||
STORM_LOG_THROW(leftOnlyIrrelevantVariables && rightOnlyIrrelevantVariables, storm::exceptions::InvalidArgumentException, "Cannot abstract from variable set in expression as it mixes variables of different types."); |
|||
} |
|||
return boost::any(); |
|||
} |
|||
|
|||
boost::any VariableSetPredicateSplitter::visit(VariableExpression const& expression, boost::any const& data) { |
|||
if (expression.hasBooleanType() && irrelevantVariables.find(expression.getVariable()) == irrelevantVariables.end()) { |
|||
resultPredicates.push_back(expression.toExpression()); |
|||
} |
|||
return boost::any(); |
|||
} |
|||
|
|||
boost::any VariableSetPredicateSplitter::visit(UnaryBooleanFunctionExpression const& expression, boost::any const& data) { |
|||
std::set<storm::expressions::Variable> containedVariables; |
|||
expression.gatherVariables(containedVariables); |
|||
bool onlyIrrelevantVariables = std::includes(irrelevantVariables.begin(), irrelevantVariables.end(), containedVariables.begin(), containedVariables.end()); |
|||
|
|||
if (onlyIrrelevantVariables) { |
|||
return boost::any(); |
|||
} |
|||
|
|||
std::set<storm::expressions::Variable> tmp; |
|||
std::set_intersection(containedVariables.begin(), containedVariables.end(), irrelevantVariables.begin(), irrelevantVariables.end(), std::inserter(tmp, tmp.begin())); |
|||
bool hasIrrelevantVariables = !tmp.empty(); |
|||
|
|||
if (hasIrrelevantVariables) { |
|||
expression.getOperand()->accept(*this, data); |
|||
} else { |
|||
resultPredicates.push_back(expression.toExpression()); |
|||
} |
|||
return boost::any(); |
|||
} |
|||
|
|||
boost::any VariableSetPredicateSplitter::visit(UnaryNumericalFunctionExpression const& expression, boost::any const& data) { |
|||
return boost::any(); |
|||
} |
|||
|
|||
boost::any VariableSetPredicateSplitter::visit(BooleanLiteralExpression const& expression, boost::any const& data) { |
|||
return boost::any(); |
|||
} |
|||
|
|||
boost::any VariableSetPredicateSplitter::visit(IntegerLiteralExpression const& expression, boost::any const& data) { |
|||
return boost::any(); |
|||
} |
|||
|
|||
boost::any VariableSetPredicateSplitter::visit(RationalLiteralExpression const& expression, boost::any const& data) { |
|||
return boost::any(); |
|||
} |
|||
|
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue