Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
PrismChoiceOrigins.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <string>
5
9
10namespace storm {
11namespace storage {
12namespace sparse {
13
18 public:
20
27 PrismChoiceOrigins(std::shared_ptr<storm::prism::Program const> const& prismProgram, std::vector<uint_fast64_t> const& indexToIdentifierMapping,
28 std::vector<CommandSet> const& identifierToCommandSetMapping);
29 PrismChoiceOrigins(std::shared_ptr<storm::prism::Program const> const& prismProgram, std::vector<uint_fast64_t>&& indexToIdentifierMapping,
30 std::vector<CommandSet>&& identifierToCommandSetMapping);
31
32 virtual ~PrismChoiceOrigins() = default;
33
34 virtual bool isPrismChoiceOrigins() const override;
35
36 /*
37 * Returns the number of identifier that are used by this object.
38 * This can be used to, e.g., loop over all identifiers.
39 */
40 virtual uint_fast64_t getNumberOfIdentifiers() const override;
41
42 /*
43 * Returns the prism program associated with this
44 */
45 storm::prism::Program const& getProgram() const;
46
47 /*
48 * Returns the set of prism commands that induced the choice with the given index.
49 * The command set is represented by a set of global command indices
50 */
51 CommandSet const& getCommandSet(uint_fast64_t choiceIndex) const;
52
53 std::size_t hash() const override;
54
55 protected:
56 /*
57 * Returns a copy of this object where the mapping of choice indices to origin identifiers is replaced by the given one.
58 */
59 virtual std::shared_ptr<ChoiceOrigins> cloneWithNewIndexToIdentifierMapping(std::vector<uint_fast64_t>&& indexToIdentifierMapping) const override;
60
61 /*
62 * Computes the identifier infos (i.e., human readable strings representing the choice origins).
63 */
64 virtual void computeIdentifierInfos() const override;
65
66 /*
67 * Computes the identifier infos as json (i.e., a machine readable representation of the choice origins).
68 */
69 virtual void computeIdentifierJson() const override;
70
71 std::shared_ptr<storm::prism::Program const> program;
72 std::vector<CommandSet> identifierToCommandSet;
73};
74} // namespace sparse
75} // namespace storage
76} // namespace storm
This class represents the origin of the choices of a model in terms of the input model specification ...
This class represents for each choice the set of prism commands that induced the choice.
virtual void computeIdentifierInfos() const override
virtual uint_fast64_t getNumberOfIdentifiers() const override
virtual void computeIdentifierJson() const override
CommandSet const & getCommandSet(uint_fast64_t choiceIndex) const
virtual bool isPrismChoiceOrigins() const override
storm::prism::Program const & getProgram() const
virtual std::shared_ptr< ChoiceOrigins > cloneWithNewIndexToIdentifierMapping(std::vector< uint_fast64_t > &&indexToIdentifierMapping) const override
std::shared_ptr< storm::prism::Program const > program
storm::storage::FlatSet< uint_fast64_t > CommandSet
boost::container::flat_set< Key, std::less< Key >, boost::container::new_allocator< Key > > FlatSet
Redefinition of flat_set was needed, because from Boost 1.70 on the default allocator is set to void.
Definition BoostTypes.h:13
LabParser.cpp.
Definition cli.cpp:18