Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DirectEncodingParser.h
Go to the documentation of this file.
1#ifndef STORM_PARSER_DIRECTENCODINGPARSER_H_
2#define STORM_PARSER_DIRECTENCODINGPARSER_H_
3
7
8namespace storm {
9namespace parser {
10
11template<typename T>
12class ValueParser;
13
20template<typename ValueType, typename RewardModelType = models::sparse::StandardRewardModel<ValueType>>
22 public:
30 static std::shared_ptr<storm::models::sparse::Model<ValueType, RewardModelType>> parseModel(
31 std::string const& fil, DirectEncodingParserOptions const& options = DirectEncodingParserOptions());
32
33 private:
46 static std::shared_ptr<storm::storage::sparse::ModelComponents<ValueType, RewardModelType>> parseStates(
47 std::istream& file, storm::models::ModelType type, size_t stateSize, size_t nrChoices, std::unordered_map<std::string, ValueType> const& placeholders,
48 ValueParser<ValueType> const& valueParser, std::vector<std::string> const& rewardModelNames, DirectEncodingParserOptions const& options);
49
57 static ValueType parseValue(std::string const& valueStr, std::unordered_map<std::string, ValueType> const& placeholders,
58 ValueParser<ValueType> const& valueParser);
59};
60
61} // namespace parser
62} // namespace storm
63
64#endif /* STORM_PARSER_DIRECTENCODINGPARSER_H_ */
Parser for models in the DRN format with explicit encoding.
static std::shared_ptr< storm::models::sparse::Model< ValueType, RewardModelType > > parseModel(std::string const &fil, DirectEncodingParserOptions const &options=DirectEncodingParserOptions())
Load a model in DRN format from a file and create the model.
Parser for values according to their ValueType.
Definition ValueParser.h:23
LabParser.cpp.
Definition cli.cpp:18