|
@ -32,20 +32,11 @@ namespace storm { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
FormulaParser::FormulaParser(storm::prism::Program const& program) : manager(program.getManager().getSharedPointer()), grammar(new FormulaParserGrammar(program.getManager().getSharedPointer())) { |
|
|
FormulaParser::FormulaParser(storm::prism::Program const& program) : manager(program.getManager().getSharedPointer()), grammar(new FormulaParserGrammar(program.getManager().getSharedPointer())) { |
|
|
this->addFormulasAsIdentifiers(program); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
FormulaParser::FormulaParser(storm::prism::Program& program) : manager(program.getManager().getSharedPointer()), grammar(new FormulaParserGrammar(program.getManager().getSharedPointer())) { |
|
|
FormulaParser::FormulaParser(storm::prism::Program& program) : manager(program.getManager().getSharedPointer()), grammar(new FormulaParserGrammar(program.getManager().getSharedPointer())) { |
|
|
this->addFormulasAsIdentifiers(program); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void FormulaParser::addFormulasAsIdentifiers(storm::prism::Program const& program) { |
|
|
|
|
|
// Make the formulas of the program available to the parser.
|
|
|
|
|
|
for (auto const& formula : program.getFormulas()) { |
|
|
|
|
|
this->addIdentifierExpression(formula.getName(), formula.getExpression()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FormulaParser::FormulaParser(FormulaParser const& other) : FormulaParser(other.manager) { |
|
|
FormulaParser::FormulaParser(FormulaParser const& other) : FormulaParser(other.manager) { |
|
|
other.identifiers_.for_each([=] (std::string const& name, storm::expressions::Expression const& expression) { this->addIdentifierExpression(name, expression); }); |
|
|
other.identifiers_.for_each([=] (std::string const& name, storm::expressions::Expression const& expression) { this->addIdentifierExpression(name, expression); }); |
|
|
} |
|
|
} |
|
|