Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
FormulaParser.h
Go to the documentation of this file.
1#ifndef STORM_PARSER_FORMULAPARSER_H_
2#define STORM_PARSER_FORMULAPARSER_H_
3
6
7namespace storm {
8namespace prism {
9class Program;
10}
11
12namespace logic {
13class Formula;
14}
15
16namespace parser {
17
18// Forward-declare grammar.
19class FormulaParserGrammar;
20
22 public:
24 explicit FormulaParser(std::shared_ptr<storm::expressions::ExpressionManager const> const& manager);
25 explicit FormulaParser(std::shared_ptr<storm::expressions::ExpressionManager> const& manager);
26 explicit FormulaParser(storm::prism::Program const& program);
27 explicit FormulaParser(storm::prism::Program& program);
28
29 FormulaParser(FormulaParser const& other);
31
38 std::shared_ptr<storm::logic::Formula const> parseSingleFormulaFromString(std::string const& formulaString) const;
39
46 std::vector<storm::jani::Property> parseFromString(std::string const& propertyString) const;
47
54 std::vector<storm::jani::Property> parseFromFile(std::string const& filename) const;
55
63 void addIdentifierExpression(std::string const& identifier, storm::expressions::Expression const& expression);
64
65 private:
66 void addFormulasAsIdentifiers(storm::prism::Program const& program);
67
68 // The manager used to parse expressions.
69 std::shared_ptr<storm::expressions::ExpressionManager const> manager;
70
71 // The grammar used to parse the input.
72 std::shared_ptr<FormulaParserGrammar> grammar;
73};
74
75} // namespace parser
76} // namespace storm
77
78#endif /* STORM_PARSER_FORMULAPARSER_H_ */
std::vector< storm::jani::Property > parseFromString(std::string const &propertyString) const
Parses the property given by the provided string.
void addIdentifierExpression(std::string const &identifier, storm::expressions::Expression const &expression)
Adds an identifier and the expression it is supposed to be replaced with.
FormulaParser & operator=(FormulaParser const &other)
std::vector< storm::jani::Property > parseFromFile(std::string const &filename) const
Parses the properties in the given file.
std::shared_ptr< storm::logic::Formula const > parseSingleFormulaFromString(std::string const &formulaString) const
Parses the formula given by the provided string.
LabParser.cpp.
Definition cli.cpp:18