Clarification on current exercise sheet

Moderator: Automated Software Engineering

Beiträge: 243
Registriert: 5. Apr 2010 19:06

Clarification on current exercise sheet

Beitrag von ericbodden »

Dear all,

Andreas Sewe told me that there may have arisen some confusion about what is and is not required to pass the current exercise sheet. You don not have to use weak references if you don't want to. Weak references are powerful if one knows how to use them, but they are also quite tricky to use right. Point of today's lecture was to show you both of these sides.

What I do require is a correctly working implementation of symbol-based indexing. One way to check whether your implementation is correct is to instantiate two indexing strategies at the same time, e.g. the StrategyB from MOPBox and your own one, and then dispatch all events to both strategies. Assuming that StrategyB is correct, your implementation will be correct if it triggers the error handler on exactly the same events.

If you do voluntarily opt to use weak references, e.g. to try to win the contest, feel free to do so. In this case, you may find that you need additional information about the variables used in the error handler. Of course, this is hard to decide, unless one analyzes the code inside this handler. (This is actually really what the tracematch-implementation does.) Such an analysis however, would go much beyond the scope of this exercise. Instead, for the purpose of this exercise, please do a safe over-approximation, assuming that all the possible variables are accessed in the handler. (Which, in the two test cases provided, is indeed the case.)

An alternative would be to extend MOPBox in such a way that a monitor template tells the strategy which variables should be accessible in the body, but you are not required to implement such an extension.

If there are any more questions, doubts or problems, please let me know.
-- Eric

Zurück zu „Automated Software Engineering“