Interface IMaestroExpansionPlugin

All Superinterfaces:
IMaestroPlugin
All Known Implementing Classes:
BasicMaestroExpansionPlugin

public interface IMaestroExpansionPlugin extends IMaestroPlugin
  • Method Details

    • expand

      List<org.intocps.maestro.ast.node.PStm> expand(AFunctionDeclaration declaredFunction, List<org.intocps.maestro.ast.node.PExp> formalArguments, IPluginConfiguration config, ISimulationEnvironment env, IErrorReporter errorReporter) throws ExpandException
      Expansion method of this plugin. It should generate a list of statements based on the provided arguments and potentially also the config given.
      Parameters:
      declaredFunction - the function within the plugin that is selected to be expanded
      formalArguments - the formal arguements given to the expansion. these will match the function signatures formals
      config - the configuration of null is not required
      env - the runtime environment
      errorReporter - the error reported that must be used for reporting any errors or warnings
      Returns:
      a list of statements produced as the result of expansion
      Throws:
      ExpandException - if generation fails
    • expandWithRuntimeAddition

      <R> Map.Entry<List<org.intocps.maestro.ast.node.PStm>,IMaestroExpansionPlugin.RuntimeConfigAddition<R>> expandWithRuntimeAddition(AFunctionDeclaration declaredFunction, List<org.intocps.maestro.ast.node.PExp> formalArguments, IPluginConfiguration config, ISimulationEnvironment env, IErrorReporter errorReporter) throws ExpandException
      Expansion method of this plugin. It should generate a list of statements based on the provided arguments and potentially also the config given.
      Parameters:
      declaredFunction - the function within the plugin that is selected to be expanded
      formalArguments - the formal arguements given to the expansion. these will match the function signatures formals
      config - the configuration of null is not required
      env - the runtime environment
      errorReporter - the error reported that must be used for reporting any errors or warnings
      Returns:
      a list of statements produced as the result of expansion and the runtime addition
      Throws:
      ExpandException - if generation fails
    • expandWithRuntimeAddition

      <R> IMaestroExpansionPlugin.RuntimeConfigAddition<R> expandWithRuntimeAddition(AFunctionDeclaration declaredFunction, FmiBuilder<org.intocps.maestro.ast.node.PStm,org.intocps.maestro.ast.node.ASimulationSpecificationCompilationUnit,org.intocps.maestro.ast.node.PExp,?> builder, List<FmiBuilder.Variable<org.intocps.maestro.ast.node.PStm,?>> formalArguments, IPluginConfiguration config, ISimulationEnvironment env, IErrorReporter errorReporter) throws ExpandException
      Expansion method of this plugin. It should generate a list of statements based on the provided arguments and potentially also the config given.
      Parameters:
      declaredFunction - the function within the plugin that is selected to be expanded
      formalArguments - the formal arguements given to the expansion. these will match the function signatures formals
      config - the configuration of null is not required
      env - the runtime environment
      errorReporter - the error reported that must be used for reporting any errors or warnings
      Returns:
      a list of statements produced as the result of expansion and the runtime addition
      Throws:
      ExpandException - if generation fails
    • getConfigRequirement

      IMaestroExpansionPlugin.ConfigOption getConfigRequirement()
      Get the configuration requirement for this expansion plugin
      Returns:
      the requirement
    • requireConfig

      boolean requireConfig()
    • parseConfig

      Throws:
      IOException
    • getDeclaredImportUnit

      org.intocps.maestro.ast.node.AImportedModuleCompilationUnit getDeclaredImportUnit()
      The import unit that is needed when this plugin is used
      Returns:
      the unit