Browse Source
			
			
			fixed if statement to program graph, added dot output for program graphs, added variable bounds, added settings to work with that, and usability of program graphs improved
			
				
		fixed if statement to program graph, added dot output for program graphs, added variable bounds, added settings to work with that, and usability of program graphs improved
	
		
	
			
				Former-commit-id:main710f40b60c[formerly6bffd842ab] Former-commit-id:dfd9187bef
				 16 changed files with 337 additions and 103 deletions
			
			
		- 
					65src/builder/JaniProgramGraphBuilder.cpp
- 
					77src/builder/JaniProgramGraphBuilder.h
- 
					13src/builder/ProgramGraphBuilder.cpp
- 
					18src/builder/ProgramGraphBuilder.h
- 
					23src/settings/modules/PGCLSettings.cpp
- 
					27src/settings/modules/PGCLSettings.h
- 
					30src/storage/IntegerInterval.h
- 
					13src/storage/pgcl/CompoundStatement.h
- 
					6src/storage/ppg/ProgramAction.cpp
- 
					15src/storage/ppg/ProgramAction.h
- 
					8src/storage/ppg/ProgramEdge.cpp
- 
					6src/storage/ppg/ProgramEdge.h
- 
					8src/storage/ppg/ProgramEdgeGroup.h
- 
					46src/storage/ppg/ProgramGraph.cpp
- 
					34src/storage/ppg/ProgramGraph.h
- 
					51src/storm-pgcl.cpp
| @ -1,2 +1,48 @@ | |||
| 
 | |||
| #include "ProgramGraph.h"
 | |||
| 
 | |||
| 
 | |||
| namespace storm { | |||
|     namespace ppg { | |||
|         void ProgramGraph::printDot(std::ostream& os) const { | |||
|             os << "digraph ppg {" << std::endl; | |||
|              | |||
|             for (auto const& loc : locations) { | |||
|                 os << "\tl" << loc.first << "[label=" << loc.first << "];"<< std::endl; | |||
|             } | |||
|             os << std::endl; | |||
|             for (auto const& loc : locations) { | |||
|                 if (loc.second.nrOutgoingEdgeGroups() > 1) { | |||
|                     for (auto const& edgegroup : loc.second) { | |||
|                         os << "\teg" << edgegroup->getId() << "[shape=circle];"<< std::endl; | |||
|                     } | |||
|                 } | |||
|             } | |||
|             os << std::endl; | |||
|             for (auto const& loc : locations) { | |||
|                 for (auto const& edgegroup : loc.second) { | |||
|                      | |||
|                     if (loc.second.nrOutgoingEdgeGroups() > 1) { | |||
|                         os << "\tl" << loc.first << " -> eg" << edgegroup->getId() << ";" << std::endl; | |||
|                         for (auto const& edge : *edgegroup) { | |||
|                             os << "\teg" << edgegroup->getId() << " -> l" << edge->getTargetId(); | |||
|                             if (!edge->hasNoAction()) { | |||
|                                 os << " [label=\"" << edge->getActionId()  << "\"]"; | |||
|                             } | |||
|                             os << ";" << std::endl; | |||
|                         } | |||
|                     } else { | |||
|                         for (auto const& edge : *edgegroup) { | |||
|                             os << "\tl" << loc.first << " -> l" << edge->getTargetId(); | |||
|                             if (!edge->hasNoAction()) { | |||
|                                 os << " [label=\"" << edge->getActionId()  << "\"]"; | |||
|                             } | |||
|                             os << ";" << std::endl; | |||
|                         } | |||
|                     } | |||
|                 } | |||
|             } | |||
|             os << "}" << std::endl; | |||
|         } | |||
|     } | |||
| } | |||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue