Browse Source

Removed debug output, fixed DoubleExpressionGrammar

tempestpy_adaptions
gereon 12 years ago
parent
commit
ac313cb997
  1. 11
      src/adapters/ExplicitModelAdapter.cpp
  2. 1
      src/ir/expressions/BinaryNumericalFunctionExpression.h
  3. 4
      src/parser/PrismParser/ConstDoubleExpressionGrammar.cpp

11
src/adapters/ExplicitModelAdapter.cpp

@ -59,11 +59,6 @@ ExplicitModelAdapter::~ExplicitModelAdapter() {
case storm::ir::Program::DTMC:
{
std::shared_ptr<storm::storage::SparseMatrix<double>> matrix = this->buildDeterministicMatrix();
std::cerr << "Row 2: ";
for (const double* val = matrix->beginConstIterator(2); val != matrix->endConstIterator(2); val++) {
std::cerr << *val << ", ";
}
std::cerr << std::endl;
return std::shared_ptr<storm::models::AbstractModel>(new storm::models::Dtmc<double>(matrix, stateLabeling, stateRewards, this->transitionRewards));
break;
}
@ -456,12 +451,6 @@ ExplicitModelAdapter::~ExplicitModelAdapter() {
}
}
}
if (state < 5) {
std::cerr << "From " << state << std::endl;
for (auto it: map) {
std::cerr << "\t" << it.first << ": " << it.second << std::endl;
}
}
// Scale probabilities by number of choices.
double factor = 1.0 / transitionMap[state].size();
for (auto it : map) {

1
src/ir/expressions/BinaryNumericalFunctionExpression.h

@ -83,7 +83,6 @@ public:
case DIVIDE: result += " / "; break;
}
result += this->getRight()->toString();
return result;
}

4
src/parser/PrismParser/ConstDoubleExpressionGrammar.cpp

@ -30,11 +30,11 @@ ConstDoubleExpressionGrammar::ConstDoubleExpressionGrammar(std::shared_ptr<Varia
constantDoubleExpression.name("constant double expression");
constantDoublePlusExpression %= constantDoubleMultExpression[qi::_val = qi::_1] >> *((qi::lit("+")[qi::_a = true] | qi::lit("-")[qi::_a = false]) >> constantDoubleMultExpression)
[phoenix::bind(&ConstDoubleExpressionGrammar::createPlus, this, qi::_val, qi::_a, qi::_1)];
[qi::_val = phoenix::bind(&ConstDoubleExpressionGrammar::createPlus, this, qi::_val, qi::_a, qi::_1)];
constantDoublePlusExpression.name("constant double expression");
constantDoubleMultExpression %= constantAtomicDoubleExpression[qi::_val = qi::_1] >> *((qi::lit("*")[qi::_a = true] | qi::lit("/")[qi::_a = false]) >> constantAtomicDoubleExpression)
[phoenix::bind(&ConstDoubleExpressionGrammar::createMult, this, qi::_val, qi::_a, qi::_1)];
[qi::_val = phoenix::bind(&ConstDoubleExpressionGrammar::createMult, this, qi::_val, qi::_a, qi::_1)];
constantDoubleMultExpression.name("constant double expression");
constantAtomicDoubleExpression %= (qi::lit("(") >> constantDoubleExpression >> qi::lit(")") | doubleConstantExpression);

Loading…
Cancel
Save