aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()