let pp_ref  r fmt p opt_arity=
      match opt_arity with 
        | None ->
            Format.fprintf fmt "%s :%a of %d" r pp_root p.p_root 
              (List.length p.p_off)
        | Some ari -> 
            Format.fprintf fmt "%s :(%a,%d) of %d" 
              r pp_root p.p_root ari (List.length p.p_off)