Interface IMaestroExpansionPlugin

    • Method Detail

      • expand

        java.util.List<org.intocps.maestro.ast.node.PStm> expand​(org.intocps.maestro.ast.AFunctionDeclaration declaredFunction,
                                                                 java.util.List<org.intocps.maestro.ast.node.PExp> formalArguments,
                                                                 IPluginConfiguration config,
                                                                 org.intocps.maestro.framework.core.ISimulationEnvironment env,
                                                                 org.intocps.maestro.core.messages.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> java.util.Map.Entry<java.util.List<org.intocps.maestro.ast.node.PStm>,​IMaestroExpansionPlugin.RuntimeConfigAddition<R>> expandWithRuntimeAddition​(org.intocps.maestro.ast.AFunctionDeclaration declaredFunction,
                                                                                                                                                                    java.util.List<org.intocps.maestro.ast.node.PExp> formalArguments,
                                                                                                                                                                    IPluginConfiguration config,
                                                                                                                                                                    org.intocps.maestro.framework.core.ISimulationEnvironment env,
                                                                                                                                                                    org.intocps.maestro.core.messages.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​(org.intocps.maestro.ast.AFunctionDeclaration declaredFunction,
                                                                                       org.intocps.maestro.framework.fmi2.api.Fmi2Builder<org.intocps.maestro.ast.node.PStm,​org.intocps.maestro.ast.node.ASimulationSpecificationCompilationUnit,​org.intocps.maestro.ast.node.PExp,​?> builder,
                                                                                       java.util.List<org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Variable<org.intocps.maestro.ast.node.PStm,​?>> formalArguments,
                                                                                       IPluginConfiguration config,
                                                                                       org.intocps.maestro.framework.core.ISimulationEnvironment env,
                                                                                       org.intocps.maestro.core.messages.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
      • requireConfig

        boolean requireConfig()
      • parseConfig

        IPluginConfiguration parseConfig​(java.io.InputStream is)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getDeclaredImportUnit

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