let compare (n1, kf1) (n2, kf2) =
    let n = PdgTypes.Node.compare n1 n2 in
    if n = 0 then Kernel_function.compare kf1 kf2 else n