29std::string
getStateName(std::pair<storm::expressions::SimpleValuation, ValueType>
const& stateValue,
30 std::set<storm::expressions::Variable>
const& locationVariables, std::set<storm::expressions::Variable>
const& predicateVariables,
32 std::stringstream stateName;
34 if (!locationVariables.empty()) {
38 for (
auto const& variable : locationVariables) {
39 stateName << stateValue.first.getIntegerValue(variable);
42 if (!locationVariables.empty() && !predicateVariables.empty()) {
46 for (
auto const& variable : predicateVariables) {
47 if (stateValue.first.getBooleanValue(variable)) {
54 if (stateValue.first.getBooleanValue(bottomVariable)) {
57 return stateName.str();
77 filteredTransitions *= filteredReachableStates.template toAdd<ValueType>();
80 std::unordered_set<std::string> initialStates;
82 for (
auto stateValue : initialStatesAsAdd) {
88 std::unordered_set<std::string> highlightStates;
90 for (
auto stateValue : highlightStatesAdd) {
95 out <<
"digraph game {\n";
99 for (
auto stateValue : statesAsAdd) {
104 out <<
" [ label=\"";
106 out <<
"*\", margin=0, width=0, height=0, shape=\"none\"";
108 out << stateName <<
"\", margin=0, width=0, height=0, shape=\"oval\"";
110 bool isInitial = initialStates.find(stateName) != initialStates.end();
111 bool isHighlight = highlightStates.find(stateName) != highlightStates.end();
112 if (isInitial && isHighlight) {
113 out <<
", style=\"filled\", fillcolor=\"yellow\"";
114 }
else if (isInitial) {
115 out <<
", style=\"filled\", fillcolor=\"blue\"";
116 }
else if (isHighlight) {
117 out <<
", style=\"filled\", fillcolor=\"red\"";
126 .template toAdd<ValueType>();
127 for (
auto stateValue : player2States) {
132 out << stateName <<
"_" << index;
133 out <<
" [ shape=\"square\", width=0, height=0, margin=0, label=\"" << index <<
"\" ];\n";
134 out <<
"\tpl1_" << stateName <<
" -> " <<
"pl2_" << stateName <<
"_" << index <<
" [ label=\"" << index <<
"\" ];\n";
139 for (
auto stateValue : playerPStates) {
141 std::stringstream stateNameStream;
145 stateNameStream <<
"_" << index;
146 std::string stateName = stateNameStream.str();
148 out << stateName <<
"_" << index;
149 out <<
" [ shape=\"point\", label=\"\" ];\n";
150 out <<
"\tpl2_" << stateName <<
" -> " <<
"plp_" << stateName <<
"_" << index <<
" [ label=\"" << index <<
"\" ];\n";
153 for (
auto stateValue : filteredTransitions) {
156 std::string successorStateName =
161 out <<
"\tplp_" << sourceStateName <<
"_" << pl1Index <<
"_" << pl2Index <<
" -> pl1_" << successorStateName <<
" [ label=\"" << stateValue.second