Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
UnfoldDependencyGraph.h
Go to the documentation of this file.
1#pragma once
2
3#include <set>
4#include <string>
5#include <vector>
7
8// UnfoldDependencyGraph stores how variables depend on each other. For example, if an edge contains the assignment x=y+z, then x depends on y and z.
9// Unfolding x is only possible if y and z are already unfolded. This graph models these dependencies. It also supports cyclical dependencies (which have
10// to be unfolded together).
11// The graph is usually construction once in the beginning of the elimination process and then updated whenever a variable is unfolded.
12
13namespace storm {
14namespace jani {
15namespace elimination_actions {
17 public:
19 public:
21 std::string janiVariableName;
23 std::string automatonName;
26
28 int domainSize);
29 };
30
32 public:
33 std::vector<VariableInfo> variables;
34 uint32_t domainSize;
38 std::set<uint32_t> dependencies;
39
41 void addVariable(VariableInfo variable);
42 std::string getVariablesAsString();
43 };
44
45 std::vector<VariableGroup> variableGroups;
46
47 explicit UnfoldDependencyGraph(Model &model);
48
49 void markUnfolded(uint32_t groupIndex);
50 uint32_t findGroupIndex(std::string variableName);
51
52 std::vector<uint32_t> getOrderedDependencies(uint32_t groupIndex, bool includeSelf = false);
53 uint32_t getTotalBlowup(std::vector<uint32_t> groups);
54 bool areDependenciesUnfoldable(uint32_t groupIndex);
55
56 std::set<uint32_t> getGroupsWithNoDependencies();
57 void printGroups();
58 std::string toString();
59
60 private:
61 void buildGroups(Model &model);
62};
63} // namespace elimination_actions
64} // namespace jani
65} // namespace storm
uint32_t getTotalBlowup(std::vector< uint32_t > groups)
std::vector< uint32_t > getOrderedDependencies(uint32_t groupIndex, bool includeSelf=false)
LabParser.cpp.
Definition cli.cpp:18