aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2017-06-03 08:35:30 +0000
committerSander Vrijders <sander.vrijders@intec.ugent.be>2017-06-03 08:35:30 +0000
commit187b547f840144e469064ee5b3eca76af9bce58b (patch)
treeb203225b3cb2a09e05267d3626012eafc9c0dc28
parent430f1a369f9dbc1328abb3ea750cfcc0c4db0c3e (diff)
parente12ba0e3d6491a693ce63fe07f26b8d17ad5da5c (diff)
downloadrumba-187b547f840144e469064ee5b3eca76af9bce58b.tar.gz
rumba-187b547f840144e469064ee5b3eca76af9bce58b.zip
Merge branch 'onlyshims' into 'master'
rumba: take into account DIFs that don't use nor are used by other DIFs Closes #11 See merge request !52
-rw-r--r--rumba/model.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/rumba/model.py b/rumba/model.py
index ccd60df..eee8fac 100644
--- a/rumba/model.py
+++ b/rumba/model.py
@@ -328,6 +328,10 @@ class Experiment:
difsdeps_inc = dict()
for node in self.nodes:
+ for dif in node.difs:
+ if dif not in difsdeps_adj:
+ difsdeps_adj[dif] = set()
+
for upper in node.dif_registrations:
for lower in node.dif_registrations[upper]:
if upper not in difsdeps_inc:
@@ -349,6 +353,14 @@ class Experiment:
difsdeps_inc_cnt[dif] = len(difsdeps_inc[dif])
del difsdeps_inc
+ # Init difsdeps_inc_cnt for those DIFs that do not
+ # act as lower IPCPs nor upper IPCPs for registration
+ # operations
+ for node in self.nodes:
+ for dif in node.difs:
+ if dif not in difsdeps_inc_cnt:
+ difsdeps_inc_cnt[dif] = 0
+
# Run Kahn's algorithm to compute topological
# ordering on the DIFs graph.
frontier = set()