Interface IrVisitor

  • All Superinterfaces:
    ru.ispras.fortress.util.TreeVisitor
    All Known Implementing Classes:
    IrVisitorDefault

    public interface IrVisitor
    extends ru.ispras.fortress.util.TreeVisitor
    The IrVisitor interface is to be implemented by all visitor objects applied to the IR of an ISA specification.
    • Method Detail

      • setStatus

        void setStatus​(ru.ispras.fortress.util.TreeVisitor.Status status)
      • onResourcesBegin

        void onResourcesBegin()
        Notifies that traversing the resource section has been started. The section includes constants, types and memory storages.
      • onResourcesEnd

        void onResourcesEnd()
        Notifies that traversing the resource section has been finished.
      • onLetConstant

        void onLetConstant​(LetConstant let)
        Notifies that a let construct describing a constant value has been visited.
        Parameters:
        let - Object describing the constant.
      • onLetLabel

        void onLetLabel​(LetLabel let)
        Notifies that a let construct associates a symbolic name with a memory location (in other words, establishes a label).
        Parameters:
        let - Object describing the label associated with a memory location.
      • onType

        void onType​(java.lang.String name,
                    Type type)
        Notifies that a type has been visited.
        Parameters:
        name - Type name.
        type - Type description.
      • onMemory

        void onMemory​(java.lang.String name,
                      MemoryResource memory)
        Notifies that a memory storage has been visited.
        Parameters:
        name - Memory storage name.
        memory - Memory storage description.
      • onPrimitivesBegin

        void onPrimitivesBegin()
        Notifies that visiting primitives (objects describing MODEs and OPs) has been started.
      • onPrimitivesEnd

        void onPrimitivesEnd()
        Notifies that visiting primitives (objects describing MODEs and OPs) has been finished.
      • onPrimitiveBegin

        void onPrimitiveBegin​(Primitive item)
        Notifies that visiting a primitive (object describing a MODE or OP) has been started.
        Parameters:
        item - Primitive object describing a MODE or OP.
      • onPrimitiveEnd

        void onPrimitiveEnd​(Primitive item)
        Notifies that visiting a primitive has been finished.
        Parameters:
        item - Primitive object.
      • onAlternativeBegin

        void onAlternativeBegin​(PrimitiveOr orRule,
                                Primitive item)
        Notifies that visiting an item of an OR-rule has been started.
        Parameters:
        orRule - OR-rule description.
        item - Item being visited.
      • onAlternativeEnd

        void onAlternativeEnd​(PrimitiveOr orRule,
                              Primitive item)
        Notifies that visiting an item of an OR-rule has been finished.
        Parameters:
        orRule - OR-rule description.
        item - Item being visited.
      • onArgumentBegin

        void onArgumentBegin​(PrimitiveAnd andRule,
                             java.lang.String argName,
                             Primitive argType)
        Notifies that visiting an AND-rule argument has been started.
        Parameters:
        andRule - AND-rule description.
        argName - Argument name.
        argType - Argument type description.
      • onArgumentEnd

        void onArgumentEnd​(PrimitiveAnd andRule,
                           java.lang.String argName,
                           Primitive argType)
        Notifies that visiting an AND-rule argument has been finished.
        Parameters:
        andRule - AND-rule description.
        argName - Argument name.
        argType - Argument type description.
      • onAttributeBegin

        void onAttributeBegin​(PrimitiveAnd andRule,
                              Attribute attr)
        Notifies that visiting an attribute of an AND-rule has been started.
        Parameters:
        andRule - AND-rule description.
        attr - Attribute description.
      • onAttributeEnd

        void onAttributeEnd​(PrimitiveAnd andRule,
                            Attribute attr)
        Notifies that visiting an attribute of an AND-rule has been finished.
        Parameters:
        andRule - AND-rule description.
        attr - Attribute description.
      • onStatementBegin

        void onStatementBegin​(PrimitiveAnd andRule,
                              Attribute attr,
                              Statement stmt)
        Notifies that visiting a statement (in an attribute) has been started.
        Parameters:
        andRule - AND-rule that contains the statement.
        attr - Attribute that contains the statement.
        stmt - Statement description.
      • onStatementEnd

        void onStatementEnd​(PrimitiveAnd andRule,
                            Attribute attr,
                            Statement stmt)
        Notifies that visiting a statement (in an attribute) has been finished.
        Parameters:
        andRule - AND-rule that contains the statement.
        attr - Attribute that contains the statement.
        stmt - Statement description.
      • onShortcutBegin

        void onShortcutBegin​(PrimitiveAnd andRule,
                             Shortcut shortcut)
        Notifies that visiting a shortcut has been started.
        Parameters:
        andRule - AND-rule the shortcut refers to.
        shortcut - Shortcut description.
      • onShortcutEnd

        void onShortcutEnd​(PrimitiveAnd andRule,
                           Shortcut shortcut)
        Notifies that visiting a shortcut has been finished.
        Parameters:
        andRule - AND-rule the shortcut refers to.
        shortcut - Shortcut description.
      • onConditionBlockBegin

        void onConditionBlockBegin​(ru.ispras.fortress.expression.Node condition)
      • onConditionBlockEnd

        void onConditionBlockEnd​(ru.ispras.fortress.expression.Node condition)