Note: the following functions always return graphs but this is meaningless
for imperative implementations (the graph is modified in-place).
This is just to provide a common interface.
module type S =
module type INT =
with type G.V.label = int