From d05b132dde8b412ce3a44dda8ec0f03fe8f734a3 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 29 Jul 2019 20:55:13 +0200 Subject: [PATCH 1/4] Better error output --- src/storm/storage/expressions/ToRationalFunctionVisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storm/storage/expressions/ToRationalFunctionVisitor.cpp b/src/storm/storage/expressions/ToRationalFunctionVisitor.cpp index 870014f60..38d5850c3 100644 --- a/src/storm/storage/expressions/ToRationalFunctionVisitor.cpp +++ b/src/storm/storage/expressions/ToRationalFunctionVisitor.cpp @@ -54,7 +54,7 @@ namespace storm { return firstOperandAsRationalFunction / secondOperandAsRationalFunction; break; case BinaryNumericalFunctionExpression::OperatorType::Power: - STORM_LOG_THROW(storm::utility::isInteger(secondOperandAsRationalFunction), storm::exceptions::InvalidArgumentException, "Exponent of power operator must be a positive integer."); + STORM_LOG_THROW(storm::utility::isInteger(secondOperandAsRationalFunction), storm::exceptions::InvalidArgumentException, "Exponent of power operator must be a positive integer but is " << secondOperandAsRationalFunction << "."); exponentAsInteger = storm::utility::convertNumber(secondOperandAsRationalFunction); return storm::utility::pow(firstOperandAsRationalFunction, exponentAsInteger); break; From 9e63a89db769a45b1aea165b010e848ed4d02179 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 29 Jul 2019 20:55:20 +0200 Subject: [PATCH 2/4] Fixed operator precedence for power and modulo operator thanks to help from Joachim Klein. --- src/storm-parsers/parser/ExpressionParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storm-parsers/parser/ExpressionParser.cpp b/src/storm-parsers/parser/ExpressionParser.cpp index 481274b13..d2b0a5318 100644 --- a/src/storm-parsers/parser/ExpressionParser.cpp +++ b/src/storm-parsers/parser/ExpressionParser.cpp @@ -91,9 +91,9 @@ namespace storm { unaryExpression.name("unary expression"); if (allowBacktracking) { - infixPowerModuloExpression = unaryExpression[qi::_val = qi::_1] >> -(infixPowerModuloOperator_ >> expression)[qi::_val = phoenix::bind(&ExpressionCreator::createPowerModuloExpression, phoenix::ref(*expressionCreator), qi::_val, qi::_1, qi::_2, qi::_pass)]; + infixPowerModuloExpression = unaryExpression[qi::_val = qi::_1] >> -(infixPowerModuloOperator_ >> unaryExpression)[qi::_val = phoenix::bind(&ExpressionCreator::createPowerModuloExpression, phoenix::ref(*expressionCreator), qi::_val, qi::_1, qi::_2, qi::_pass)]; } else { - infixPowerModuloExpression = unaryExpression[qi::_val = qi::_1] > -(infixPowerModuloOperator_ >> expression)[qi::_val = phoenix::bind(&ExpressionCreator::createPowerModuloExpression, phoenix::ref(*expressionCreator), qi::_val, qi::_1, qi::_2, qi::_pass)]; + infixPowerModuloExpression = unaryExpression[qi::_val = qi::_1] > -(infixPowerModuloOperator_ >> unaryExpression)[qi::_val = phoenix::bind(&ExpressionCreator::createPowerModuloExpression, phoenix::ref(*expressionCreator), qi::_val, qi::_1, qi::_2, qi::_pass)]; } infixPowerModuloExpression.name("(infix) power/modulo expression"); From 16aee7c386c6d69c90509d6ff47cca6ecf8f9d0f Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Tue, 30 Jul 2019 08:52:15 +0200 Subject: [PATCH 3/4] fixed a typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c8d4dbb38..7b7c33683 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Benchmarks Example input files for Storm can be obtained from https://github.com/moves-rwth/storm-examples. -Various Benchmarks together with example invocations of Storm can be found at the [Quantitative Verification Benchmark Suite (QVBS)](http://qcomp.org/benchmarks). +Various Benchmarks together with example invocations of Storm can be found at the [Quantitative Verification Benchmark Set (QVBS)](http://qcomp.org/benchmarks). Further examples and benchmarks can be found in the following repositories: From 48dbaa6fbd4a6327d93513d0ce013c1dd1d66d7c Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Tue, 30 Jul 2019 08:52:51 +0200 Subject: [PATCH 4/4] Fixed a test --- src/test/storm/transformer/EndComponentEliminatorTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/storm/transformer/EndComponentEliminatorTest.cpp b/src/test/storm/transformer/EndComponentEliminatorTest.cpp index 3dd19899f..7992a60fb 100644 --- a/src/test/storm/transformer/EndComponentEliminatorTest.cpp +++ b/src/test/storm/transformer/EndComponentEliminatorTest.cpp @@ -98,7 +98,7 @@ TEST(NeutralECRemover, SimpleModelTest) { ASSERT_LT(expectedNewState, std::numeric_limits::max()) << " Mapping does not match for oldState " << oldState; actualToExpectedStateMapping[actualNewState] = expectedNewState; } else { - ASSERT_LT(expectedNewState, actualNewState) << " Mapping does not match for oldState " << oldState; + ASSERT_EQ(expectedNewState, actualNewState) << " Mapping does not match for oldState " << oldState; } } std::vector actualToExpectedRowMapping;