38std::string
getStateName(std::pair<storm::expressions::SimpleValuation, ValueType>
const& stateValue,
39 std::set<storm::expressions::Variable>
const& locationVariables, std::set<storm::expressions::Variable>
const& predicateVariables,
41 std::stringstream stateName;
43 if (!locationVariables.empty()) {
47 for (
auto const& variable : locationVariables) {
48 stateName << stateValue.first.getIntegerValue(variable);
51 if (!locationVariables.empty() && !predicateVariables.empty()) {
55 for (
auto const& variable : predicateVariables) {
56 if (stateValue.first.getBooleanValue(variable)) {
63 if (stateValue.first.getBooleanValue(bottomVariable)) {
66 return stateName.str();
86 filteredTransitions *= filteredReachableStates.template toAdd<ValueType>();
89 std::unordered_set<std::string> initialStates;
91 for (
auto stateValue : initialStatesAsAdd) {
97 std::unordered_set<std::string> highlightStates;
99 for (
auto stateValue : highlightStatesAdd) {
104 out <<
"digraph game {\n";
108 for (
auto stateValue : statesAsAdd) {
113 out <<
" [ label=\"";
115 out <<
"*\", margin=0, width=0, height=0, shape=\"none\"";
117 out << stateName <<
"\", margin=0, width=0, height=0, shape=\"oval\"";
119 bool isInitial = initialStates.find(stateName) != initialStates.end();
120 bool isHighlight = highlightStates.find(stateName) != highlightStates.end();
121 if (isInitial && isHighlight) {
122 out <<
", style=\"filled\", fillcolor=\"yellow\"";
123 }
else if (isInitial) {
124 out <<
", style=\"filled\", fillcolor=\"blue\"";
125 }
else if (isHighlight) {
126 out <<
", style=\"filled\", fillcolor=\"red\"";
135 .template toAdd<ValueType>();
136 for (
auto stateValue : player2States) {
141 out << stateName <<
"_" << index;
142 out <<
" [ shape=\"square\", width=0, height=0, margin=0, label=\"" << index <<
"\" ];\n";
143 out <<
"\tpl1_" << stateName <<
" -> " <<
"pl2_" << stateName <<
"_" << index <<
" [ label=\"" << index <<
"\" ];\n";
148 for (
auto stateValue : playerPStates) {
150 std::stringstream stateNameStream;
154 stateNameStream <<
"_" << index;
155 std::string stateName = stateNameStream.str();
157 out << stateName <<
"_" << index;
158 out <<
" [ shape=\"point\", label=\"\" ];\n";
159 out <<
"\tpl2_" << stateName <<
" -> " <<
"plp_" << stateName <<
"_" << index <<
" [ label=\"" << index <<
"\" ];\n";
162 for (
auto stateValue : filteredTransitions) {
165 std::string successorStateName =
170 out <<
"\tplp_" << sourceStateName <<
"_" << pl1Index <<
"_" << pl2Index <<
" -> pl1_" << successorStateName <<
" [ label=\"" << stateValue.second