Browse Source

some fixes to handle large parameters

tempestpy_adaptions
dehnert 7 years ago
parent
commit
a072ef5310
  1. 2
      src/storm/adapters/Z3ExpressionAdapter.cpp
  2. 2
      src/storm/utility/cli.cpp

2
src/storm/adapters/Z3ExpressionAdapter.cpp

@ -237,7 +237,7 @@ namespace storm {
} }
boost::any Z3ExpressionAdapter::visit(storm::expressions::IntegerLiteralExpression const& expression, boost::any const&) { boost::any Z3ExpressionAdapter::visit(storm::expressions::IntegerLiteralExpression const& expression, boost::any const&) {
return context.int_val(static_cast<int>(expression.getValue()));
return context.int_val(expression.getValue());
} }
boost::any Z3ExpressionAdapter::visit(storm::expressions::UnaryBooleanFunctionExpression const& expression, boost::any const& data) { boost::any Z3ExpressionAdapter::visit(storm::expressions::UnaryBooleanFunctionExpression const& expression, boost::any const& data) {

2
src/storm/utility/cli.cpp

@ -55,7 +55,7 @@ namespace storm {
throw storm::exceptions::WrongFormatException() << "Illegal value for boolean constant: " << value << "."; throw storm::exceptions::WrongFormatException() << "Illegal value for boolean constant: " << value << ".";
} }
} else if (variable.hasIntegerType()) { } else if (variable.hasIntegerType()) {
int_fast64_t integerValue = std::stoi(value);
int_fast64_t integerValue = std::stoll(value);
constantDefinitions[variable] = manager.integer(integerValue); constantDefinitions[variable] = manager.integer(integerValue);
} else if (variable.hasRationalType()) { } else if (variable.hasRationalType()) {
try { try {

Loading…
Cancel
Save