Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Trace] Investigate possibility to trace runtime data not contained in a model #155

Open
dvojtise opened this issue Mar 13, 2020 · 1 comment

Comments

@dvojtise
Copy link
Contributor

dvojtise commented Mar 13, 2020

Motivation:

Currently, we have IMutableFieldExtractor that allows finding the runtime data.

this interface is used in two places:

  • by the Variable view of the debugger (showing all RTD when paused)
  • by the trace manager in order to store the RTD in trace step and use it in the omniscient debugger (backward navigation) and in the timelines.

The default implementation (DefaultDynamicPartAccessor) reads RTD from the EMF model (based on the @aspect annotation). This implementation works correctly both in the variable view and the trace manager

A second implementation (IntrospectiveMutableFieldExtractor) is able to read RTD directly from java (K3 aspects). (Ie. not requiring Melange to have an EMF implementation of the data).
This works correctly for the Variable view but doesn't work for the trace manager (ie. timeline)

Desired behavior:
Be able to have a better interface to read/write mutable fields so they can be used in all GEMOC use cases.

Preliminary analysis
apparently, the generic trace addon is able to monitor only emf model changes via the addState(List modelChanges)
https://github.com/eclipse/gemoc-studio-modeldebugging/blob/9e3cf1afaade4b4f70e000156e98d335af3538b4/trace/generator/plugins/org.eclipse.gemoc.trace.gemoc/src/org/eclipse/gemoc/trace/gemoc/traceaddon/GenericTraceConstructor.java#L352

which is populated by registering a listener of EMF notification events.

Using notification of model change is nice because this allows incremental work and avoid to analyse the RTD in order to decide if the state has changed or not and to consider only a subset of the RTD. However, in the case of non EMF RTD, there is no such notification and detailed analysis of the change.

Possible solution ?
Maybe find a way to ask the IDynamicPartAccessor for its changes in addition to those provided by EMF notification (and the BatchModelChangeListener)?

dvojtise added a commit that referenced this issue Mar 13, 2020
contributes to
#155 by
adding a CompositeDynamicPartAccessor that allows to combine several
IDynamicPartAccessor/IMutableFieldExtractor so they can provide an
unified vision of the RTD to both the Variable view (ie.debugger) and
the timeline (ie. generic trace manager)

Signed-off-by: Didier Vojtisek <[email protected]>
dvojtise added a commit to eclipse-gemoc/gemoc-studio-execution-java that referenced this issue Mar 13, 2020
contributes to
eclipse-gemoc/gemoc-studio-modeldebugging#155 by
adding a CompositeDynamicPartAccessor that allows to combine several
IDynamicPartAccessor/IMutableFieldExtractor so they can provide an
unified vision of the RTD to both the Variable view (ie.debugger) and
the timeline (ie. generic trace manager)

Signed-off-by: Didier Vojtisek <[email protected]>
@dvojtise
Copy link
Contributor Author

dvojtise commented Mar 13, 2020

the branches https://github.com/eclipse/gemoc-studio-modeldebugging/tree/trace_dynamic_accessor_4_k3 and https://github.com/eclipse/gemoc-studio-execution-java/tree/trace_dynamic_accessor_4_k3 highlight the issue: it proposes the start of the unification of
IDynamicPartAccessor extends IMutableFieldExtractor by adding a CompositeDynamicPartAccessor

however, the final goal of offering the trace directly for K3 aspect (not using melange) is not reached due to the discussion above (ie. model change notification)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant