Class LocalSearchRuntimeBasedStrategy

java.lang.Object
tools.refinery.interpreter.localsearch.planner.LocalSearchRuntimeBasedStrategy

public class LocalSearchRuntimeBasedStrategy extends 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)
  • Constructor Details

    • LocalSearchRuntimeBasedStrategy

      public LocalSearchRuntimeBasedStrategy()
  • Method Details

    • convertPlan

      protected SubPlan convertPlan(Set<PVariable> initialBoundVariables, PlanState searchPlan)
      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 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