Additional hints

Moderator: Automated Software Engineering

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

Additional hints

Beitrag von ericbodden » 13. Dez 2011 15:05

A couple of additional pointers for the current exercises:

You can use the class de.bodden.mopbox.util.Powerset to compute the power set of a set. This may be handy at line 12 of the algorithm.

Having said that, you may not actually want to take the description of the algorithm too literal with respect to the definition of "l". In the algorithm (and the paper in general), variable bindings are just modeled as sets of objects. This, however, is not quite correct, as variable bindings are really mappings from variables (such as C and I) to concrete objects (collections or iterators in our setting). The information which object belongs to which variable is important to make the test cases pass. In MOPBox, variable bindings are passed to processEvent as an IVariableBinding object that contains all the information necessary.

Therefore, it may make sense to have TrackedObjs not map to sets of objects but instead just to IVariableBindings. In line 17, the algorithm suggests to check whether l \subseteq m.l, you can use the check l.isCompatibleWith(m.l) to obtain an equivalent check on variable bindings. Likewise, you can obtain all (proper) "sub-bindings" of a binding by calling l.strictlyLessInformativeBindingsOrdered().

I hope this helps you out a bit...
-- Eric

Zurück zu „Automated Software Engineering“