let get_last_state pdg =
  try State.get_last_state (PI.get_states pdg)
  with Not_found -> raise Db.Pdg.NotFound