Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
FormulaParser.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace storm {
7namespace prism {
8class Program;
9}
10
11namespace logic {
12class Formula;
13}
14
15namespace parser {
16
17// Forward-declare grammar.
19
21 public:
23 explicit FormulaParser(std::shared_ptr<storm::expressions::ExpressionManager const> const& manager);
24 explicit FormulaParser(std::shared_ptr<storm::expressions::ExpressionManager> const& manager);
25 explicit FormulaParser(storm::prism::Program const& program);
26 explicit FormulaParser(storm::prism::Program& program);
27
28 FormulaParser(FormulaParser const& other);
30
37 std::shared_ptr<storm::logic::Formula const> parseSingleFormulaFromString(std::string const& formulaString) const;
38
45 std::vector<storm::jani::Property> parseFromString(std::string const& propertyString) const;
46
53 std::vector<storm::jani::Property> parseFromFile(std::string const& filename) const;
54
62 void addIdentifierExpression(std::string const& identifier, storm::expressions::Expression const& expression);
63
64 private:
65 // The manager used to parse expressions.
66 std::shared_ptr<storm::expressions::ExpressionManager const> manager;
67
68 // The grammar used to parse the input.
69 std::shared_ptr<FormulaParserGrammar> grammar;
70};
71
72} // namespace parser
73} // namespace storm
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.
Contains all file parsers and helper classes.