Skip to content

Commit

Permalink
Minor code cleanup for strat code.
Browse files Browse the repository at this point in the history
  • Loading branch information
neilconway committed Jan 16, 2014
1 parent 92771a2 commit f835046
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/bud/bud_meta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ def meta_rewrite

stratified_rules = []
if @bud_instance.toplevel == @bud_instance
stratum_map = stratify_preds
stratum_map, nodes = stratify_preds
top_stratum = stratum_map.values.max
top_stratum ||= -1

analyze_dependencies(nodes)

# stratum_map = {fully qualified pred => stratum}. Copy stratum_map data
# into t_stratum format.
raise unless @bud_instance.t_stratum.to_a.empty?
Expand Down Expand Up @@ -227,8 +229,7 @@ def stratify_preds
n.stratum = remap[n.stratum]
stratum_map[n.name] = n.stratum
end
analyze_dependencies(nodes)
return stratum_map
return stratum_map, nodes
end

def calc_stratum(node, neg, temporal, path)
Expand Down

0 comments on commit f835046

Please sign in to comment.