\#genBody(init, test, limit, assign, step) =>
for(int i=$init;i $test $limit;i $assign $step)
System.out .print(i+" ");
\#end Thus, case c), for instance, can be generated as follows, where a distraction rule (buggy_limit)
is used.

\#caseC(init, test, limit, assign, step) =>
c) {genBody(init, test, buggy_limit(limit), assign, step)}
\#end Such kind of rules are evaluated at the MDR level, using generators targeting RCode. We intend more than textual generation occurs at the MDR level, but we just wanted to present a simple impression of the concept.

To complete the example, it would remain the matter of plan representation and manipulation. Because our main concern is actually complexity, we will develop the ideas in an independent section, for more clarity.

## 7.2 On Plans And Complexity

We briefly return to example 7 to motivate our analysis. With respect to the intended plan in that exercise let us suppose a simple one is expected by the author. Namely, the student will check each MCQ case, sequentially, until he/she finds the correct one. In each step the student runs the body loop and check it against the number in the proposed sequence. In our conceptual model, it would mean that the student will be first processing at the DR conceptual level and then going to the Eval level to evaluate statements at the operational and returning again to the DR level.

![0_image_0.png](0_image_0.png)

We could certainly try to formalize such a kind of plan in a particular formal language.

However, we realize that would require an independent part of the project we are trying to define; we are not in the position of going to that level of detail, yet. Nevertheless, we think it is possible.

However, we actually want to accomplish that task in a way that allows us to translate plan statements into a simpler logic language, for reasoning about complexity and eventual exercise discrepancies.  Mapping the complexity of a question of an exercise to the complexity of the corresponding plan is consistent with our assumption that the complexity of an exercise is the one is expressed in its plan by its author. The idea is depicted in Figure 8