|Re: [mdt-ocl.dev] Overload resolution and dynamic dispatch patch|
Hi Axel I think you're confusing two different issues. a) impact for unloaded Resources b) impact through polymorphic calls a) unloaded ResourcesIn your earlier example with resource Y (unloaded) so that propagation of 42 through resource X failed to impact:
Using my dependency analysis perspective, if the Y resource is not loaded, I don't analyze it, I don't detect any dependencies, so I don't install any listeners/notifiers to cause the Y resource elements to react to changes. So I agree that it doesn't work. It's nothing to do with EMF-based; it's just common sense.
Consider a doctor's patient list and the impact of a policy change to invite all patients over 50 rather than over 60 to have a free flu vaccination for the winter. The derived property of the number of required injections can only be determined by examining each patients records. If a patient's record is not loaded into the system/looked at by a human, the accurate answer cannot be determined. It seems unreasonable to expect to have impact or dependencies for unloaded resources.
b) polymorphic callsIt seems that your traceback does not use the source object and so needs to consider all possible operations. This seems inefficient and may lead to fat notifications that can be filtered. The dependency perspective knows the source object and so need only consider the relevant operation.
Regards Ed On 07/05/2012 10:55, Axel Uhl wrote:
We may consider adjusting the impact analyzer by granting it access to the dynamic dispatch cache. It may, however, lead to a situation where an operation hasn't been evaluated in a given environment yet, hence no cache entry is present for the operation, and hence the look up would provide the IA with too few operation bodies to analyze.I claim that generally, without having evaluated all expressions on all objects, ensuring that all relevant operation bodies have been evaluated at least once, no EMF-based approach can determine a change impact because expressions affected by the change may simply not be known by the environment.A cleaner, probably not entirely satisfying approach may involve equipping the IA with a set of EPackage objects which define the "universe" of metamodels to be considered by the IA. The IA could then, at some start-up cost, determine the operation bodies to be considered.Opinions? -- Axel
Back to the top