org.eclipse.ocl.examples.impactanalyzer.instanceScope
Interface Tracer

All Known Implementing Classes:
AbstractTracer, BooleanLiteralExpTracer, CollectionLiteralExpTracer, EnumLiteralExpTracer, IfExpTracer, IntegerLiteralExpTracer, InvalidlLiteralExpTracer, IterateExpTracer, IteratorExpTracer, LetExpTracer, NullLiteralExpTracer, OperationCallExpTracer, OppositePropertyCallExpTracer, PropertyCallExpTracer, RealLiteralExpTracer, StringLiteralExpTracer, TupleLiteralExpTracer, TypeExpTracer, VariableExpTracer

public interface Tracer

All implementations must offer a constructor that takes a CoreConnection and a OclExpression impl subclass of the type handled by them as argument. Furthermore, the implementing classes underly a naming convention. If they handle an OclExpression type by the MOF name of X then the tracer implementation class name must be XTracer.


Method Summary
 NavigationStep traceback(org.eclipse.emf.ecore.EClass context, PathCache pathCache, OperationBodyToCallMapper filterSynthesizer)
          Computes a navigation step that when executed, computes a set of elements containing at least all context elements such that when the overall expression of which the expression represented by this tracer is a part, is evaluated for such an element, the sub-expression represented by this tracer evaluates to the element passed to the navigation step's NavigationStep.navigate(Set, TracebackCache, Notification) operation in the set parameter.
 

Method Detail

traceback

NavigationStep traceback(org.eclipse.emf.ecore.EClass context,
                         PathCache pathCache,
                         OperationBodyToCallMapper filterSynthesizer)
Computes a navigation step that when executed, computes a set of elements containing at least all context elements such that when the overall expression of which the expression represented by this tracer is a part, is evaluated for such an element, the sub-expression represented by this tracer evaluates to the element passed to the navigation step's NavigationStep.navigate(Set, TracebackCache, Notification) operation in the set parameter. The result may also contain elements for which this does not hold. It hence represents a conservative estimate.

Parameters:
context - the context type that defines the type of any self occurrence outside of operation bodies
pathCache - a global cache that remembers the navigation steps already computed for some OCL expressions
filterSynthesizer - the filter synthesizer that analyzed an overall expression that contains the expression to be handled by this tracer
classScopeAnalyzer - retains the results of traversing the outermost expression's tree, a sub-expression of which this tracer will analyze in this method. The class scope analyzer in particular remembers the operation calls it found and thereby makes it possible to limit the analysis of operation bodies by the scope of those calls actually invoking the operation in the context of the outermost expression.