From a57c749f72a4aecd61d5ed6b44b38534b0f4df98 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Thu, 15 Dec 2016 11:26:23 +0100 Subject: [PATCH] topo sort for dependencies (stupid way..) --- src/storm-dft/storage/dft/DFTBuilder.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/storm-dft/storage/dft/DFTBuilder.cpp b/src/storm-dft/storage/dft/DFTBuilder.cpp index 0bff9bd2b..70df810cf 100644 --- a/src/storm-dft/storage/dft/DFTBuilder.cpp +++ b/src/storm-dft/storage/dft/DFTBuilder.cpp @@ -205,12 +205,20 @@ namespace storm { topoVisit(c, visited, L); } } + // TODO restrictions and dependencies have no parents, so this can be done more efficiently. if(n->isRestriction()) { visited[n] = topoSortColour::GREY; for (DFTElementPointer const& c : std::static_pointer_cast>(n)->children()) { topoVisit(c, visited, L); } } + if(n->isDependency()) { + visited[n] = topoSortColour::GREY; + for (DFTElementPointer const& c : std::static_pointer_cast>(n)->dependentEvents()) { + topoVisit(c, visited, L); + } + topoVisit(std::static_pointer_cast>(n)->triggerEvent(), visited, L); + } visited[n] = topoSortColour::BLACK; L.push_back(n); }