The logic of planning and the aim of the law