Receding horizon control via Bolza-type optimization