Class LocalSearchRuntimeBasedStrategy
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.localsearch.planner.LocalSearchRuntimeBasedStrategy
-
public class LocalSearchRuntimeBasedStrategy extends java.lang.Object
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)- No Reference:
- This class is not intended to be referenced by clients.
-
-
Constructor Summary
Constructors Constructor Description LocalSearchRuntimeBasedStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SubPlan
convertPlan(java.util.Set<PVariable> initialBoundVariables, PlanState searchPlan)
Converts a plan to the standard formatprotected PlanState
plan(PBody pBody, java.util.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
-
-
-
Method Detail
-
convertPlan
protected SubPlan convertPlan(java.util.Set<PVariable> initialBoundVariables, PlanState searchPlan)
Converts a plan to the standard format
-
plan
protected PlanState plan(PBody pBody, java.util.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
-
-