32std::string
getStateName(std::pair<storm::expressions::SimpleValuation, ValueType>
const& stateValue,
33 std::set<storm::expressions::Variable>
const& locationVariables, std::set<storm::expressions::Variable>
const& predicateVariables,
35 std::stringstream stateName;
37 if (!locationVariables.empty()) {
41 for (
auto const& variable : locationVariables) {
42 stateName << stateValue.first.getIntegerValue(variable);
45 if (!locationVariables.empty() && !predicateVariables.empty()) {
49 for (
auto const& variable : predicateVariables) {
50 if (stateValue.first.getBooleanValue(variable)) {
57 if (stateValue.first.getBooleanValue(bottomVariable)) {
60 return stateName.str();
80 filteredTransitions *= filteredReachableStates.template toAdd<ValueType>();
83 std::unordered_set<std::string> initialStates;
85 for (
auto stateValue : initialStatesAsAdd) {
91 std::unordered_set<std::string> highlightStates;
93 for (
auto stateValue : highlightStatesAdd) {
98 out <<
"digraph game {\n";
102 for (
auto stateValue : statesAsAdd) {
107 out <<
" [ label=\"";
109 out <<
"*\", margin=0, width=0, height=0, shape=\"none\"";
111 out << stateName <<
"\", margin=0, width=0, height=0, shape=\"oval\"";
113 bool isInitial = initialStates.find(stateName) != initialStates.end();
114 bool isHighlight = highlightStates.find(stateName) != highlightStates.end();
115 if (isInitial && isHighlight) {
116 out <<
", style=\"filled\", fillcolor=\"yellow\"";
117 }
else if (isInitial) {
118 out <<
", style=\"filled\", fillcolor=\"blue\"";
119 }
else if (isHighlight) {
120 out <<
", style=\"filled\", fillcolor=\"red\"";
129 .template toAdd<ValueType>();
130 for (
auto stateValue : player2States) {
135 out << stateName <<
"_" << index;
136 out <<
" [ shape=\"square\", width=0, height=0, margin=0, label=\"" << index <<
"\" ];\n";
137 out <<
"\tpl1_" << stateName <<
" -> " <<
"pl2_" << stateName <<
"_" << index <<
" [ label=\"" << index <<
"\" ];\n";
142 for (
auto stateValue : playerPStates) {
144 std::stringstream stateNameStream;
148 stateNameStream <<
"_" << index;
149 std::string stateName = stateNameStream.str();
151 out << stateName <<
"_" << index;
152 out <<
" [ shape=\"point\", label=\"\" ];\n";
153 out <<
"\tpl2_" << stateName <<
" -> " <<
"plp_" << stateName <<
"_" << index <<
" [ label=\"" << index <<
"\" ];\n";
156 for (
auto stateValue : filteredTransitions) {
159 std::string successorStateName =
164 out <<
"\tplp_" << sourceStateName <<
"_" << pl1Index <<
"_" << pl2Index <<
" -> pl1_" << successorStateName <<
" [ label=\"" << stateValue.second