Planets around pulsars: formation and evolution