Revision 54d032f5 src/scheduling.ml
src/scheduling.ml  

116  116 
!sorted 
117  117 
end 
118  118  
119 
(* Filters out normalization variables and renames instance variables to keep things readable, 

120 
in a case of a dependency error *) 

121 
let filter_original n vl = 

122 
List.fold_right (fun v res > 

123 
if ExprDep.is_instance_var v then Format.sprintf "node %s" (ExprDep.undo_instance_var v) :: res else 

124 
let vdecl = get_node_var v n in 

125 
if vdecl.var_orig then v :: res else res) vl [] 

126  
119  127 
let schedule_node n = 
128 
let node_vars = get_node_vars n in 

120  129 
try 
121  130 
let eq_equiv = ExprDep.node_eq_equiv n in 
122  131 
let eq_equiv v1 v2 = 
...  ...  
143  152 
let sort = topological_sort eq_equiv g in 
144  153 
let unused = Liveness.compute_unused_variables n gg in 
145  154 
let fanin = Liveness.compute_fanin n gg in 
146  
147 
let disjoint = Disjunction.clock_disjoint_map (get_node_vars n) in


155 


156 
let disjoint = Disjunction.clock_disjoint_map node_vars in


148  157 

149  158 
Log.report ~level:2 
150  159 
(fun fmt > 
...  ...  
164  173 
); 
165  174 

166  175 
n', { schedule = sort; unused_vars = unused; fanin_table = fanin; reuse_table = reuse } 
167 
with (Causality.Cycle v) as exc > 

168 
pp_error Format.err_formatter v; 

176 
with (Causality.Cycle vl) as exc > 

177 
let vl = filter_original n vl in 

178 
pp_error Format.err_formatter vl; 

169  179 
raise exc 
170  180  
171  181 
let schedule_prog prog = 
Also available in: Unified diff