Consider the following program:
val x = 7 + 4 val y = x*(x-1) val z = ~x*(y-2)
a) Which identifiers, constants, operators and keywords occur?

b) Which value is bound to the corresponding identifier?

Figure 3: Version of Exercise 1.1 in [42]
systems serve to complete or complement more traditional forms of learning in environments which are more appropriated to particular individual conditions, according to [36].

Precisely, this last work provides us with a rich contextual point of reference where, as a general motivation, we are interested in creating content for a CS1-like course and specifically developing exercises to support feedback and assessment insight an e-Learning environment. Consequently, a key issue is that instructional material usually needs to be complemented and implemented in such a way that guidance, coaching and feedback, normally provided by the instructor in person, now need to be part of the learning interaction strategy and the content available in the learning environment. Let us consider this a little bit more in detail with attention to exercises.

## Elements Of Exercise Model 4.2.1

Source content to be adapted as e-Learning material is usually taken from some proven and standard course material like the main book, labs projects and similar sources like exercise banks. Such a task can involve a lot of detailed and careful work. For example, the methodology of the source material might need to be adapted, as already mentioned, it also requires a formalization of the domain model using some formal language and similar t asks.

In particular, with respect to exercises, we may need to design and implement a dialogbased orchestration using GUI-gestures and corresponding events and associated feedback, hints responses, etc. Such kind of elements need to be assembled in an adequate way. This is naturally an extremely simplified view, we refer to http://www.examat.org and to [17]
for appreciating specific details and available tools that aid the design process by hand.

Object representation in ActiveMathrelies on OMDoc which is specifically designed for the mathematical domain ([29]). Currently there is a version for representing programs in the same direction: [28]. We will be referring to the issue as a requirement, later on.

An exercise is essentially modeled by means of a finite state automaton (FSA), according to [17].  States in FSA represent interaction stages during exercise playing and edges refer to event-based transitions associated with possible user answers to GUI-elements, those offered by the corresponding state. An example of such an event occurs when the user selects an option from list representing a multiple choice question (MCQ), which is an interaction element that is available in the design tool.

As a simple illustration, let us consider the code snippet shown in Figure 3. It is taken 7