Browse Source

Implemented parsing for UnaryNumericalFunctionExpression

tempestpy_adaptions
Matthias Volk 8 years ago
parent
commit
e5404a27e9
  1. 9
      src/storm/storage/expressions/ToRationalFunctionVisitor.cpp

9
src/storm/storage/expressions/ToRationalFunctionVisitor.cpp

@ -94,9 +94,16 @@ namespace storm {
}
template<typename RationalFunctionType>
boost::any ToRationalFunctionVisitor<RationalFunctionType>::visit(UnaryNumericalFunctionExpression const&, boost::any const&) {
boost::any ToRationalFunctionVisitor<RationalFunctionType>::visit(UnaryNumericalFunctionExpression const& expression, boost::any const& data) {
RationalFunctionType operandAsRationalFunction = boost::any_cast<RationalFunctionType>(expression.getOperand()->accept(*this, data));
switch (expression.getOperatorType()) {
case UnaryNumericalFunctionExpression::OperatorType::Minus:
return -operandAsRationalFunction;
default:
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Expression cannot be translated into a rational function.");
}
return boost::any();
}
template<typename RationalFunctionType>
boost::any ToRationalFunctionVisitor<RationalFunctionType>::visit(BooleanLiteralExpression const&, boost::any const&) {

Loading…
Cancel
Save