Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Program.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_PRISM_PROGRAM_H_
2#define STORM_STORAGE_PRISM_PROGRAM_H_
3
4#include <boost/optional.hpp>
5#include <map>
6#include <memory>
7#include <set>
8#include <vector>
9
24
25namespace storm {
26namespace jani {
27class Model;
28class Property;
29} // namespace jani
30
31namespace prism {
33 public:
37 enum class ModelType { UNDEFINED, DTMC, CTMC, MDP, CTMDP, MA, POMDP, PTA, SMG };
38
39 enum class ValidityCheckLevel : unsigned { VALIDINPUT = 0, READYFORPROCESSING = 1 };
40
63 Program(std::shared_ptr<storm::expressions::ExpressionManager> manager, ModelType modelType, std::vector<Constant> const& constants,
64 std::vector<BooleanVariable> const& globalBooleanVariables, std::vector<IntegerVariable> const& globalIntegerVariables,
65 std::vector<Formula> const& formulas, std::vector<Player> const& players, std::vector<Module> const& modules,
66 std::map<std::string, uint_fast64_t> const& actionToIndexMap, std::vector<RewardModel> const& rewardModels, std::vector<Label> const& labels,
67 std::vector<ObservationLabel> const& observationLabels, boost::optional<InitialConstruct> const& initialConstruct,
68 boost::optional<SystemCompositionConstruct> const& compositionConstruct, bool prismCompatibility, std::string const& filename = "",
69 uint_fast64_t lineNumber = 0, bool finalModel = true);
70
71 // Provide default implementations for constructors and assignments.
72 Program() = default;
73 Program(Program const& other) = default;
74 Program& operator=(Program const& other) = default;
75 Program(Program&& other) = default;
77
83 ModelType getModelType() const;
84
90 bool isDiscreteTimeModel() const;
91
95 bool isDeterministicModel() const;
96
100 bool isPartiallyObservable() const;
101
105 bool hasUnboundedVariables() const;
106
112 bool hasUndefinedConstants() const;
113
122
128 std::vector<std::reference_wrapper<Constant const>> getUndefinedConstants() const;
129
135 std::string getUndefinedConstantsAsString() const;
136
143 bool hasConstant(std::string const& constantName) const;
144
151 Constant const& getConstant(std::string const& constantName) const;
152
158 std::map<storm::expressions::Variable, storm::expressions::Expression> getConstantsSubstitution() const;
159
165 std::map<storm::expressions::Variable, storm::expressions::Expression> getFormulasSubstitution() const;
166
172 std::map<storm::expressions::Variable, storm::expressions::Expression> getConstantsFormulasSubstitution(bool getConstantsSubstitution = true,
173 bool getFormulasSubstitution = true) const;
174
178 std::map<storm::expressions::Variable, storm::expressions::Expression> getSubstitutionForRenamedModule(
179 Module const& renamedModule, std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
180
185 std::map<std::string, std::string> getFinalRenamingOfModule(Module const& renamedModule) const;
186
192 std::vector<Constant> const& getConstants() const;
193
199 std::size_t getNumberOfConstants() const;
200
205 std::vector<Constant> usedConstants() const;
206
210 size_t getNumberOfCommands() const;
211
218 bool globalBooleanVariableExists(std::string const& variableName) const;
219
226 bool globalIntegerVariableExists(std::string const& variableName) const;
227
233 std::vector<BooleanVariable> const& getGlobalBooleanVariables() const;
234
241 BooleanVariable const& getGlobalBooleanVariable(std::string const& variableName) const;
242
248 std::vector<IntegerVariable> const& getGlobalIntegerVariables() const;
249
256 IntegerVariable const& getGlobalIntegerVariable(std::string const& variableName) const;
257
264 std::set<storm::expressions::Variable> getAllExpressionVariables(bool includeConstants = true) const;
265
271 std::vector<storm::expressions::Expression> getAllRangeExpressions() const;
272
278 std::size_t getNumberOfGlobalBooleanVariables() const;
279
285 std::size_t getNumberOfGlobalIntegerVariables() const;
286
292 std::vector<Formula> const& getFormulas() const;
293
299 std::size_t getNumberOfFormulas() const;
300
306 std::size_t getNumberOfModules() const;
307
314 Module const& getModule(uint_fast64_t index) const;
315
321 bool hasModule(std::string const& moduleName) const;
322
329 Module const& getModule(std::string const& moduleName) const;
330
336 std::vector<Module> const& getModules() const;
337
343 std::vector<Player> const& getPlayers() const;
344
350 std::size_t getNumberOfPlayers() const;
351
357 storm::storage::PlayerIndex const& getIndexOfPlayer(std::string const& playerName) const;
358
362 std::map<std::string, storm::storage::PlayerIndex> const& getPlayerNameToIndexMapping() const;
363
368 std::vector<storm::storage::PlayerIndex> buildModuleIndexToPlayerIndexMap() const;
369
374 std::map<uint_fast64_t, storm::storage::PlayerIndex> buildActionIndexToPlayerIndexMap() const;
375
381 std::map<std::string, uint_fast64_t> const& getActionNameToIndexMapping() const;
382
388
392 bool hasInitialConstruct() const;
393
400
407 bool specifiesSystemComposition() const;
408
415
421 boost::optional<SystemCompositionConstruct> getOptionalSystemCompositionConstruct() const;
422
428 std::shared_ptr<Composition> getDefaultSystemComposition() const;
429
435 std::set<std::string> const& getActions() const;
436
442 std::set<uint_fast64_t> const& getSynchronizingActionIndices() const;
443
450 std::string const& getActionName(uint_fast64_t actionIndex) const;
451
458 uint_fast64_t getActionIndex(std::string const& actionName) const;
459
465 bool hasAction(std::string const& actionName) const;
466
472 bool hasAction(uint_fast64_t const& actionIndex) const;
473
481 std::set<uint_fast64_t> const& getModuleIndicesByAction(std::string const& action) const;
482
490 std::set<uint_fast64_t> const& getModuleIndicesByActionIndex(uint_fast64_t actionIndex) const;
491
498 uint_fast64_t getModuleIndexByVariable(std::string const& variableName) const;
499
511 std::pair<uint_fast64_t, uint_fast64_t> getModuleCommandIndexByGlobalCommandIndex(uint_fast64_t globalCommandIndex) const;
512
513 /*
514 * Get total number of unlabeled commands
515 */
517
523 bool hasRewardModel() const;
524
531 bool hasRewardModel(std::string const& name) const;
532
538 std::vector<RewardModel> const& getRewardModels() const;
539
545 std::size_t getNumberOfRewardModels() const;
546
553 RewardModel const& getRewardModel(std::string const& rewardModelName) const;
554
561 RewardModel const& getRewardModel(uint_fast64_t index) const;
562
569 bool hasLabel(std::string const& labelName) const;
570
576 std::vector<Label> const& getLabels() const;
577
584 std::vector<storm::expressions::Expression> getAllGuards(bool negated = false) const;
585
591 storm::expressions::Expression const& getLabelExpression(std::string const& label) const;
592
598 std::map<std::string, storm::expressions::Expression> getLabelToExpressionMapping() const;
599
605 std::size_t getNumberOfLabels() const;
606
613 void addLabel(std::string const& name, storm::expressions::Expression const& statePredicateExpression);
614
620 void removeLabel(std::string const& name);
621
628 void filterLabels(std::set<std::string> const& labelSet);
629
630 void removeRewardModels();
631
637 std::vector<ObservationLabel> const& getObservationLabels() const;
638
644 std::size_t getNumberOfObservationLabels() const;
645
652
661 Program defineUndefinedConstants(std::map<storm::expressions::Variable, storm::expressions::Expression> const& constantDefinitions) const;
662
670
678
683
691
698
708 bool observable = true) const;
709
715
721
728 Program flattenModules(std::shared_ptr<storm::utility::solver::SmtSolverFactory> const& smtSolverFactory =
729 std::shared_ptr<storm::utility::solver::SmtSolverFactory>(new storm::utility::solver::SmtSolverFactory())) const;
730
738 Program labelUnlabelledCommands(std::map<uint64_t, std::string> const& nameSuggestions = {}) const;
739
740 friend std::ostream& operator<<(std::ostream& stream, Program const& program);
741
748
749 std::unordered_map<uint_fast64_t, std::string> buildCommandIndexToActionNameMap() const;
750
751 std::unordered_map<uint_fast64_t, uint_fast64_t> buildCommandIndexToActionIndex() const;
752
753 std::unordered_map<uint_fast64_t, std::string> buildActionIndexToActionNameMap() const;
754
758 storm::jani::Model toJani(bool allVariablesGlobal = true, std::string suffix = "") const;
759
765 std::pair<storm::jani::Model, std::vector<storm::jani::Property>> toJani(std::vector<storm::jani::Property> const& properties,
766 bool allVariablesGlobal = true, std::string suffix = "") const;
767
773
774 private:
780 InitialConstruct const& getInitialConstruct() const;
781
787 boost::optional<InitialConstruct> const& getOptionalInitialConstruct() const;
788
799 Command synchronizeCommands(uint_fast64_t newCommandIndex, uint_fast64_t actionIndex, uint_fast64_t firstUpdateIndex, std::string const& actionName,
800 std::vector<std::reference_wrapper<Command const>> const& commands) const;
801
805 void createMissingInitialValues();
806
807 // The manager responsible for the variables/expressions of the program.
808 std::shared_ptr<storm::expressions::ExpressionManager> manager;
809
810 // Creates the internal mappings.
811 void createMappings();
812
813 uint64_t getHighestCommandIndex() const;
814
815 // The type of the model.
816 ModelType modelType;
817
818 // The constants of the program.
819 std::vector<Constant> constants;
820
821 // A mapping from constant names to their corresponding indices.
822 std::map<std::string, uint_fast64_t> constantToIndexMap;
823
824 // The global boolean variables.
825 std::vector<BooleanVariable> globalBooleanVariables;
826
827 // A mapping from global boolean variable names to their corresponding indices.
828 std::map<std::string, uint_fast64_t> globalBooleanVariableToIndexMap;
829
830 // The global integer variables.
831 std::vector<IntegerVariable> globalIntegerVariables;
832
833 // A mapping from global integer variable names to their corresponding indices.
834 std::map<std::string, uint_fast64_t> globalIntegerVariableToIndexMap;
835
836 // The formulas defined in the program.
837 std::vector<Formula> formulas;
838
839 // A mapping of formula names to their corresponding indices.
840 std::map<std::string, uint_fast64_t> formulaToIndexMap;
841
842 // The players associated with the program.
843 std::vector<Player> players;
844
845 // A mapping of player names to their indices.
846 std::map<std::string, storm::storage::PlayerIndex> playerToIndexMap;
847
848 // The modules associated with the program.
849 std::vector<Module> modules;
850
851 // A mapping of module names to their indices.
852 std::map<std::string, uint_fast64_t> moduleToIndexMap;
853
854 // The reward models associated with the program.
855 std::vector<RewardModel> rewardModels;
856
857 // A mapping of reward models to their indices.
858 std::map<std::string, uint_fast64_t> rewardModelToIndexMap;
859
860 // The initial construct of the program.
861 boost::optional<InitialConstruct> initialConstruct;
862
863 // If set, this specifies the way the modules are composed to obtain the full system.
864 boost::optional<SystemCompositionConstruct> systemCompositionConstruct;
865
866 // The labels that are defined for this model.
867 std::vector<Label> labels;
868
869 // A mapping from labels to their indices.
870 std::map<std::string, uint_fast64_t> labelToIndexMap;
871
872 // Observation labels
873 std::vector<ObservationLabel> observationLabels;
874
875 // A mapping from action names to their indices.
876 std::map<std::string, uint_fast64_t> actionToIndexMap;
877
878 // A mapping from action indices to their names.
879 std::map<uint_fast64_t, std::string> indexToActionMap;
880
881 // The set of actions present in this program.
882 std::set<std::string> actions;
883
884 // The set of synchronizing actions present in this program.
885 std::set<uint_fast64_t> synchronizingActionIndices;
886
887 // A map of actions to the set of modules containing commands labelled with this action.
888 std::map<uint_fast64_t, std::set<uint_fast64_t>> actionIndicesToModuleIndexMap;
889
890 // A mapping from variable names to the modules in which they were declared.
891 std::map<std::string, uint_fast64_t> variableToModuleIndexMap;
892
893 storage::BitVector possiblySynchronizingCommands;
894
895 bool prismCompatibility;
896};
897
898std::ostream& operator<<(std::ostream& out, Program::ModelType const& type);
899
900} // namespace prism
901} // namespace storm
902
903#endif /* STORM_STORAGE_PRISM_PROGRAM_H_ */
This class is responsible for managing a set of typed variables and all expressions using these varia...
Program replaceConstantByVariable(Constant const &c, expressions::Expression const &lowerBound, expressions::Expression const &upperBound, bool observable=true) const
Substitutes the given constant by a fresh global variable that is bound between lowerBound and upperB...
Definition Program.cpp:1205
std::set< uint_fast64_t > const & getSynchronizingActionIndices() const
Retrieves the set of synchronizing action indices present in the program.
Definition Program.cpp:738
Program & operator=(Program &&other)=default
void checkValidity(Program::ValidityCheckLevel lvl=Program::ValidityCheckLevel::READYFORPROCESSING) const
Checks the validity of the program.
Definition Program.cpp:1226
std::map< std::string, std::string > getFinalRenamingOfModule(Module const &renamedModule) const
Gets the renaming of a module after flattening all renamings.
Definition Program.cpp:450
ModelType getModelType() const
Retrieves the model type of the model.
Definition Program.cpp:247
Program defineUndefinedConstants(std::map< storm::expressions::Variable, storm::expressions::Expression > const &constantDefinitions) const
Defines the undefined constants according to the given map and returns the resulting program.
Definition Program.cpp:984
std::vector< storm::expressions::Expression > getAllRangeExpressions() const
Retrieves a list of expressions that characterize the legal ranges of all variables.
Definition Program.cpp:512
std::vector< RewardModel > const & getRewardModels() const
Retrieves the reward models of the program.
Definition Program.cpp:808
std::vector< Player > const & getPlayers() const
Retrieves the players of the program.
Definition Program.cpp:562
RewardModel const & getRewardModel(std::string const &rewardModelName) const
Retrieves the reward model with the given name.
Definition Program.cpp:816
std::vector< BooleanVariable > const & getGlobalBooleanVariables() const
Retrieves the global boolean variables of the program.
Definition Program.cpp:482
ModelType
An enum for the different model types.
Definition Program.h:37
std::set< std::string > const & getActions() const
Retrieves the set of actions present in the program.
Definition Program.cpp:734
std::set< uint_fast64_t > const & getModuleIndicesByAction(std::string const &action) const
Retrieves the indices of all modules within this program that contain commands that are labelled with...
Definition Program.cpp:762
std::vector< std::reference_wrapper< Constant const > > getUndefinedConstants() const
Retrieves the undefined constants in the program.
Definition Program.cpp:368
storm::storage::PlayerIndex const & getIndexOfPlayer(std::string const &playerName) const
Retrieves the index of the player in the program.
Definition Program.cpp:570
bool isPartiallyObservable() const
Retrieves whether the model has restricted observability.
Definition Program.cpp:259
std::pair< uint_fast64_t, uint_fast64_t > getModuleCommandIndexByGlobalCommandIndex(uint_fast64_t globalCommandIndex) const
Retrieves the index of the module and the (local) index of the command with the given global command ...
Definition Program.cpp:782
bool hasAction(std::string const &actionName) const
Retrieves whether the program has an action with the given name.
Definition Program.cpp:754
std::size_t getNumberOfLabels() const
Retrieves the number of labels in the program.
Definition Program.cpp:862
boost::optional< SystemCompositionConstruct > getOptionalSystemCompositionConstruct() const
Retrieves the system composition construct (if any) and none otherwise.
Definition Program.cpp:718
std::map< storm::expressions::Variable, storm::expressions::Expression > getConstantsSubstitution() const
Retrieves a mapping of all defined constants to their defining expressions.
Definition Program.cpp:406
std::string const & getActionName(uint_fast64_t actionIndex) const
Retrieves the action name of the given action index.
Definition Program.cpp:742
std::vector< Module > const & getModules() const
Retrieves all modules of the program.
Definition Program.cpp:629
bool isDiscreteTimeModel() const
Retrieves whether the model is a discrete-time model, i.e.
Definition Program.cpp:251
storm::expressions::Expression const & getLabelExpression(std::string const &label) const
Retrieves the expression associated with the given label, if it exists.
Definition Program.cpp:847
std::unordered_map< uint_fast64_t, std::string > buildCommandIndexToActionNameMap() const
Definition Program.cpp:2235
Program substituteNonStandardPredicates() const
Substitutes all nonstandard predicates in expressions of the program by their defining expressions.
Definition Program.cpp:1034
Program & operator=(Program const &other)=default
std::vector< ObservationLabel > const & getObservationLabels() const
Retrieves all observation labels that are defined by this program.
Definition Program.cpp:900
Module const & getModule(uint_fast64_t index) const
Retrieves the module with the given index.
Definition Program.cpp:615
uint_fast64_t getActionIndex(std::string const &actionName) const
Retrieves the index of the action with the given name.
Definition Program.cpp:748
IntegerVariable const & getGlobalIntegerVariable(std::string const &variableName) const
Retrieves a the global integer variable with the given name.
Definition Program.cpp:543
std::set< uint_fast64_t > const & getModuleIndicesByActionIndex(uint_fast64_t actionIndex) const
Retrieves the indices of all modules within this program that contain commands that are labelled with...
Definition Program.cpp:768
std::map< uint_fast64_t, storm::storage::PlayerIndex > buildActionIndexToPlayerIndexMap() const
Retrieves a vector whose i'th entry corresponds to the player controlling action with index i.
Definition Program.cpp:590
bool isDeterministicModel() const
Retrieves whether the model is one without nondeterministic choices, i.e.
Definition Program.cpp:255
std::map< storm::expressions::Variable, storm::expressions::Expression > getConstantsFormulasSubstitution(bool getConstantsSubstitution=true, bool getFormulasSubstitution=true) const
Retrieves a mapping of all defined constants and formula variables to their defining expressions.
Definition Program.cpp:414
std::vector< storm::expressions::Expression > getAllGuards(bool negated=false) const
Retrieves all guards appearing in the program.
Definition Program.cpp:837
void removeLabel(std::string const &name)
Removes the label with the given name from the program.
Definition Program.cpp:873
bool undefinedConstantsAreGraphPreserving() const
Checks that undefined constants (parameters) of the model preserve the graph of the underlying model.
Definition Program.cpp:294
std::size_t getNumberOfRewardModels() const
Retrieves the number of reward models in the program.
Definition Program.cpp:812
std::size_t getNumberOfPlayers() const
Retrieves the number of players in the program.
Definition Program.cpp:566
void updateInitialStatesExpression(expressions::Expression const &newExpression)
Sets a new initial states expression.
Definition Program.cpp:657
Constant const & getConstant(std::string const &constantName) const
Retrieves the constant with the given name if it exists.
Definition Program.cpp:397
std::map< std::string, uint_fast64_t > const & getActionNameToIndexMapping() const
Retrieves the mapping of action names to their indices.
Definition Program.cpp:633
size_t getNumberOfCommands() const
The total number of commands in the prism file.
Definition Program.cpp:263
Program labelUnlabelledCommands(std::map< uint64_t, std::string > const &nameSuggestions={}) const
Give commands that do not have an action name an action, which can be helpful for debugging and under...
Definition Program.cpp:1152
Program(Program const &other)=default
SystemCompositionConstruct const & getSystemCompositionConstruct() const
If the program specifies a system composition construct, this method retrieves it.
Definition Program.cpp:714
Program substituteConstants() const
Substitutes all constants appearing in the expressions of the program by their defining expressions.
Definition Program.cpp:1026
Program substituteFormulas() const
Substitutes all formulas appearing in the expressions of the program by their defining expressions.
Definition Program.cpp:1030
std::size_t getNumberOfObservationLabels() const
Retrieves the number of observation labels in the program.
Definition Program.cpp:904
std::map< std::string, storm::storage::PlayerIndex > const & getPlayerNameToIndexMapping() const
Definition Program.cpp:574
std::size_t getNumberOfConstants() const
Retrieves the number of all constants defined in the program.
Definition Program.cpp:478
std::set< storm::expressions::Variable > getAllExpressionVariables(bool includeConstants=true) const
Retrieves all expression variables used by this program.
Definition Program.cpp:490
Program(Program &&other)=default
bool globalIntegerVariableExists(std::string const &variableName) const
Retrieves whether a global Integer variable with the given name exists.
Definition Program.cpp:532
std::unordered_map< uint_fast64_t, std::string > buildActionIndexToActionNameMap() const
Definition Program.cpp:2245
BooleanVariable const & getGlobalBooleanVariable(std::string const &variableName) const
Retrieves a the global boolean variable with the given name.
Definition Program.cpp:536
void filterLabels(std::set< std::string > const &labelSet)
Removes all labels that are not contained in the given set from the program.
Definition Program.cpp:884
bool hasModule(std::string const &moduleName) const
Retrieves whether the program has a module with the given name.
Definition Program.cpp:619
Program substituteConstantsFormulas(bool substituteConstants=true, bool substituteFormulas=true) const
Substitutes all constants and/or formulas appearing in the expressions of the program by their defini...
Definition Program.cpp:1078
bool globalBooleanVariableExists(std::string const &variableName) const
Retrieves whether a global Boolean variable with the given name exists.
Definition Program.cpp:528
std::unordered_map< uint_fast64_t, uint_fast64_t > buildCommandIndexToActionIndex() const
Definition Program.cpp:2253
std::vector< Constant > const & getConstants() const
Retrieves all constants defined in the program.
Definition Program.cpp:402
std::map< storm::expressions::Variable, storm::expressions::Expression > getFormulasSubstitution() const
Retrieves a mapping of all formula variables to their defining expressions.
Definition Program.cpp:410
friend std::ostream & operator<<(std::ostream &stream, Program const &program)
Definition Program.cpp:2405
bool hasUnboundedVariables() const
Definition Program.cpp:271
storm::expressions::ExpressionManager & getManager() const
Retrieves the manager responsible for the expressions of this program.
Definition Program.cpp:2359
Program replaceVariableInitializationByInitExpression() const
Replace the initialization in variables by an init-expression.
Definition Program.cpp:1184
std::vector< Constant > usedConstants() const
Retrieves the constants that are actually used in the program.
Definition Program.cpp:2165
bool hasLabel(std::string const &labelName) const
Checks whether the program has a label with the given name.
Definition Program.cpp:828
std::vector< storm::storage::PlayerIndex > buildModuleIndexToPlayerIndexMap() const
Retrieves a vector whose i'th entry corresponds to the player controlling module i.
Definition Program.cpp:578
std::vector< IntegerVariable > const & getGlobalIntegerVariables() const
Retrieves the global integer variables of the program.
Definition Program.cpp:486
std::size_t getNumberOfGlobalIntegerVariables() const
Retrieves the number of global integer variables of the program.
Definition Program.cpp:554
std::string getUndefinedConstantsAsString() const
Retrieves the undefined constants in the program as a comma-separated string.
Definition Program.cpp:378
std::size_t getNumberOfFormulas() const
Retrieves the number of formulas in the program.
Definition Program.cpp:607
bool hasConstant(std::string const &constantName) const
Retrieves whether the given constant exists in the program.
Definition Program.cpp:393
storm::expressions::Expression getInitialStatesExpression() const
Retrieves an expression characterizing the initial states.
Definition Program.cpp:662
void addLabel(std::string const &name, storm::expressions::Expression const &statePredicateExpression)
Adds a label with the given name and defining expression to the program.
Definition Program.cpp:866
std::size_t getNumberOfModules() const
Retrieves the number of modules in the program.
Definition Program.cpp:611
bool hasInitialConstruct() const
Retrieves whether the program specifies an initial construct.
Definition Program.cpp:645
Program restrictCommands(storm::storage::FlatSet< uint_fast64_t > const &indexSet) const
Creates a new program that drops all commands whose indices are not in the given set.
Definition Program.cpp:912
Program flattenModules(std::shared_ptr< storm::utility::solver::SmtSolverFactory > const &smtSolverFactory=std::shared_ptr< storm::utility::solver::SmtSolverFactory >(new storm::utility::solver::SmtSolverFactory())) const
Creates an equivalent program that contains exactly one module.
Definition Program.cpp:1951
bool hasUndefinedConstants() const
Retrieves whether there are undefined constants of any type in the program.
Definition Program.cpp:285
bool specifiesSystemComposition() const
Retrieves whether the program specifies a system composition in terms of process algebra operations o...
Definition Program.cpp:710
std::shared_ptr< Composition > getDefaultSystemComposition() const
Retrieves the default system composition for this program.
Definition Program.cpp:722
std::vector< Label > const & getLabels() const
Retrieves all labels that are defined by the probabilitic program.
Definition Program.cpp:833
uint64_t getNumberOfUnlabeledCommands() const
Definition Program.cpp:637
storm::storage::BitVector const & getPossiblySynchronizingCommands() const
Compute the (labelled) commands in the program that may be synchronizing.
Definition Program.cpp:908
uint_fast64_t getModuleIndexByVariable(std::string const &variableName) const
Retrieves the index of the module in which the given variable name was declared.
Definition Program.cpp:775
bool hasRewardModel() const
Retrieves whether the program has reward models.
Definition Program.cpp:799
std::map< std::string, storm::expressions::Expression > getLabelToExpressionMapping() const
Retrieves a mapping from all labels in the program to their defining expressions.
Definition Program.cpp:854
Program simplify()
Entry point for static analysis for simplify.
Definition Program.cpp:1803
std::map< storm::expressions::Variable, storm::expressions::Expression > getSubstitutionForRenamedModule(Module const &renamedModule, std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Applies the renaming of a renamed module to the given substitution.
Definition Program.cpp:432
std::size_t getNumberOfGlobalBooleanVariables() const
Retrieves the number of global boolean variables of the program.
Definition Program.cpp:550
storm::jani::Model toJani(bool allVariablesGlobal=true, std::string suffix="") const
Converts the PRISM model into an equivalent JANI model.
Definition Program.cpp:2321
std::vector< Formula > const & getFormulas() const
Retrieves the formulas defined in the program.
Definition Program.cpp:558
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
std::ostream & operator<<(std::ostream &stream, Assignment const &assignment)
uint64_t PlayerIndex
Definition PlayerIndex.h:7
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