Class BasicMaestroExpansionPlugin

    • Constructor Detail

      • BasicMaestroExpansionPlugin

        public BasicMaestroExpansionPlugin()
    • Method Detail

      • expandWithRuntimeAddition

        public <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
        Function to use for building using the raw interface This is search order 2
        Specified by:
        expandWithRuntimeAddition in interface IMaestroExpansionPlugin
        Type Parameters:
        R - the runtime type
        Parameters:
        declaredFunction - the function within the plugin that is selected to be expanded
        formalArguments - the formal arguments 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 map entry containing the list of raw entries and a runtime contribution or IMaestroExpansionPlugin.EmptyRuntimeConfig
        Throws:
        ExpandException - if expansion fails
      • expand

        public 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
        Fallback function for raw expansion
        Specified by:
        expand in interface IMaestroExpansionPlugin
        Parameters:
        declaredFunction - the function within the plugin that is selected to be expanded
        formalArguments - the formal arguments 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 raw statements
        Throws:
        ExpandException - if expansion fails
      • expandWithRuntimeAddition

        public <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
        Function to use for building using the builder interface.
        This is search order 1
        Specified by:
        expandWithRuntimeAddition in interface IMaestroExpansionPlugin
        Type Parameters:
        R - the runtime type
        Parameters:
        declaredFunction - the function within the plugin that is selected to be expanded
        builder - the builder object to use for building the output
        formalArguments - the formal arguments 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:
        either a runtime contribution or IMaestroExpansionPlugin.EmptyRuntimeConfig
        Throws:
        ExpandException - if expansion fails