Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "VIATRA2/Components"

(New page: TODO model space, interpreter, etc. == Pattern matcher == === Role === The pattern matcher is the component responsible for finding the occurrences of the defined VTCL patterns. The patt...)
 
(No difference)

Revision as of 10:53, 10 June 2008

TODO model space, interpreter, etc.

Pattern matcher

Role

The pattern matcher is the component responsible for finding the occurrences of the defined VTCL patterns. The pattern matcher is invoked whenever the interpreter executes a forall or choose construct having a with find somepattern(...) or with apply somegtrule(...) clause. The first invokation of a certain pattern might last longer due to pattern analysis, search plan generation, and other preparatory tasks.

Alternatives

VIATRA2 R3 ships with two alternative pattern matcher engine.

The local-search based default pattern matcher searches the model space each time a pattern query is requested. Pattern matching may consume a significant amount of time on each query, but no other maintenance costs arise.

The incremental pattern matcher has a radically different approach: the occurrence set of patterns is constructed on their first usage, preserved in-memory and maintained from that time on. After each model manipulation step, the necessary local changes to these stored occurrence sets are calculated and the updates are performed. The great advantage of the incremental pattern matcher is that pattern queries can be fulfilled virtually instantly, as the result set is already available. The disadvantages are that model manipulation costs are somewhat increased due to the maintenance of occurrence sets, and the stored results sets may consume a significant amount of memory. It is recommended to use the incremental pattern matcher engine with a high amount of memory allotted to the Java VM.

Our measurements and experiments show that choosing the incremental pattern matcher may improve performance by several orders of magnitude in some cases. If large models are used with frequent pattern matching queries and relatively minor model changes, consider using the incremental pattern matcher.

Selecting the pattern matcher engine

TODO

Back to the top