generate the task and partition from the formula