ex4: "matchCompleted" - why complete bindings?

Moderator: Automated Software Engineering

tgp
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 268
Registriert: 15. Nov 2006 21:41

ex4: "matchCompleted" - why complete bindings?

Beitrag von tgp » 13. Dez 2011 04:12

I do not understand the implementation of the matchCompleted(IVariableBinding<K,V>) method in competition.monitortemplates.FailSafeIterMonitorTemplate and competition.monitortemplates.HasNextMonitorTemplate. Why do we need to have "complete" bindings with all the variables of the template?

Currently, my SymbolBasedIndexing fails at that point (the RuntimeException is thrown), because if i find a match, i pass the matchCompleted method the binding of the processEvent method, which obviously does not always contain all variables. How should we add the right "missing" ones? Or is this a bug in the mathCompleted method?

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

Re: ex4: "matchCompleted" - why complete bindings?

Beitrag von ericbodden » 13. Dez 2011 09:25

Hello.

If you only pass in the binding provided by the current event then this is not an optimal solution. Imagine for example the FailSafeIter property: in this case, the user could then never find out which collection was actually updated when an error situation arises.

The solution is shown on the lecture slides on symbol-based indexing: on those slides you will see that in addition to the current state number a monitor also contains references to the objects it holds on to. That way, when a monitor reaches a final/error state, the information about the other bindings can be accessed from that monitor.

Hope that helps.
-- Eric

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

Re: ex4: "matchCompleted" - why complete bindings?

Beitrag von ericbodden » 13. Dez 2011 15:17

Please also see my other post on object sets vs. variable bindings...
-- Eric

tgp
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 268
Registriert: 15. Nov 2006 21:41

Re: ex4: "matchCompleted" - why complete bindings?

Beitrag von tgp » 13. Dez 2011 17:37

Thx, this and the other post helped alot.

Antworten

Zurück zu „Automated Software Engineering“