let rec new_source_edge edges source graph = match edges with (c,t,p)::tail -> new_source_edge tail source (DG.addedge ({c with sourceid = source},t.id,p) graph) | _ -> graph