Package org.eclipse.viatra.query.runtime.localsearch.planner

## 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 format
    `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

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

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

- - ### Constructor Detail

    - #### LocalSearchRuntimeBasedStrategy

          public LocalSearchRuntimeBasedStrategy()

  - ### 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 created
        `initialBoundVariables` - variables that are known to have already assigned values
        `context` - the backend context
        `resultProviderRequestor` - requestor for accessing result providers of called patterns
        `configuration` - the planner configuration
      Returns:
        the complete search plan for the given `PBody`
      Since:
        2.1