org.eclipse.incquery.runtime.localsearch.planner

## Class LocalSearchRuntimeBasedStrategy

- java.lang.Object
- - org.eclipse.incquery.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)
  Author:
    Marton Bur

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalSearchRuntimeBasedStrategy()`
    `LocalSearchRuntimeBasedStrategy(boolean allowInverseNavigation, boolean useIndex)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SubPlan` | `plan(PBody pBody, org.apache.log4j.Logger logger, java.util.Set<PVariable> initialBoundVariables, IQueryMetaContext metaContext, IQueryRuntimeContext runtimeContext, java.util.Map<java.lang.String,java.lang.Object> hints)` The implementation of a local search-based algorithm to create a search plan for a flattened (and normalized) PBody

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LocalSearchRuntimeBasedStrategy

          public LocalSearchRuntimeBasedStrategy()

    - #### LocalSearchRuntimeBasedStrategy

          public LocalSearchRuntimeBasedStrategy(boolean allowInverseNavigation,
                                                 boolean useIndex)

  - ### Method Detail

    - #### plan

          public SubPlan plan(PBody pBody,
                              org.apache.log4j.Logger logger,
                              java.util.Set<PVariable> initialBoundVariables,
                              IQueryMetaContext metaContext,
                              IQueryRuntimeContext runtimeContext,
                              java.util.Map<java.lang.String,java.lang.Object> hints)

      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 created
        `logger` - that logs the happenings
        `initialBoundVariables` - variables that are known to have already assigned values
        `metaContext` - the metamodel related information
        `runtimeContext` - the instance model related information
        `hints` - the optional hints for the plan creation
      Returns:
        the complete search plan for the given `PBody`