Class LocalSearchRuntimeBasedStrategy
java.lang.Object
tools.refinery.interpreter.localsearch.planner.LocalSearchRuntimeBasedStrategy
This class contains the logic for local search plan calculation based on costs of the operations.
Its name refers to the fact that the strategy tries to use as much information as available about
the model on which the matching is initiated. When no runtime info is available, it falls back to
the information available from the metamodel durint operation cost calculation.
The implementation is based on the paper "Gergely Varró, Frederik Deckwerth, Martin Wieber, and Andy Schürr:
An algorithm for generating model-sensitive search plans for pattern matching on EMF models"
(DOI: 10.1007/s10270-013-0372-2)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SubPlan
convertPlan
(Set<PVariable> initialBoundVariables, PlanState searchPlan) Converts a plan to the standard formatprotected PlanState
plan
(PBody pBody, Set<PVariable> initialBoundVariables, IQueryBackendContext context, ResultProviderRequestor resultProviderRequestor, LocalSearchHints configuration) The implementation of a local search-based algorithm to create a search plan for a flattened (and normalized) PBody
-
Constructor Details
-
LocalSearchRuntimeBasedStrategy
public LocalSearchRuntimeBasedStrategy()
-
-
Method Details
-
convertPlan
Converts a plan to the standard format -
plan
protected PlanState plan(PBody pBody, Set<PVariable> initialBoundVariables, IQueryBackendContext context, ResultProviderRequestor resultProviderRequestor, LocalSearchHints configuration) The implementation of a local search-based algorithm to create a search plan for a flattened (and normalized) PBody- Parameters:
pBody
- for which the plan is to be createdinitialBoundVariables
- variables that are known to have already assigned valuescontext
- the backend contextresultProviderRequestor
- requestor for accessing result providers of called patternsconfiguration
- the planner configuration- Returns:
- the complete search plan for the given
PBody
- Since:
- 2.1
-