Roger Federer reaches semifinals at ATP finals