Interface IMaestroExpansionPlugin

    • Method Detail

      • 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,
                                                                                       Fmi2Builder<org.intocps.maestro.ast.node.PStm,​org.intocps.maestro.ast.node.ASimulationSpecificationCompilationUnit,​org.intocps.maestro.ast.node.PExp,​?> builder,
                                                                                       List<Fmi2Builder.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
      • requireConfig

        boolean requireConfig()
      • getDeclaredImportUnit

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