eclipse / epsilon

Epsilon is a family of Java-based scripting languages for automating common model-based software engineering tasks, such as code generation, model-to-model transformation and model validation, that work out of the box with EMF (including Xtext and Sirius), UML (including Cameo/MagicDraw), Simulink, XML and other types of models.
https://eclipse.org/epsilon
Eclipse Public License 2.0
55 stars 11 forks source link

ECL: use a Guava Network for MatchTrace #46

Closed agarciadom closed 12 months ago

agarciadom commented 12 months ago

This pull request replaces the recent optimisation of the MatchTrace in ECL with a Guava Network (a directed multigraph, configured to allows parallel edges between the same pair of nodes and self-loops).

In this graph, a match from a to b is represented as an edge from a to b, and is associated with its Match object.

This pull request shortens MatchTrace by about 174 lines, and in my opinion leaves it in a more readable state. There are some caveats, though:

The good news is that this seems to have pretty much kept (or perhaps slightly improved) the performance of the IncrFWD scenario in the reference implementation of the TTC 2023 Containers to MiniYAML case, compared to the one from the Map-based structure:

------------------
Incr. FWD:
------------------
n_containers,n_volumes,n_images,Epsilon
50,3,4,4.977
agarciadom commented 12 months ago

Note: this passes all tests from Eclipse (including plug-in tests). There is an ongoing Jenkins CI build for this: https://ci.eclipse.org/epsilon/job/interim-kubernetes/job/guava-matchtrace/1/

agarciadom commented 12 months ago

All tests passed on Jenkins.