Class MmuTreeWalkerBase.CommonBuilder

  • Enclosing class:
    MmuTreeWalkerBase

    protected final class MmuTreeWalkerBase.CommonBuilder
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAttribute​(org.antlr.runtime.tree.CommonTree attrId, java.util.List<Stmt> stmts)  
      void addVariable​(org.antlr.runtime.tree.CommonTree varId, org.antlr.runtime.tree.CommonTree typeId)  
      void addVariable​(org.antlr.runtime.tree.CommonTree varId, ru.ispras.fortress.expression.Node sizeExpr)  
      Memory buildMemory()  
      Segment buildSegment​(ru.ispras.fortress.expression.Node rangeStartExpr, ru.ispras.fortress.expression.Node rangeEndExpr)
      Creates a segment IR object and adds it to the MMU IR.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addVariable

        public void addVariable​(org.antlr.runtime.tree.CommonTree varId,
                                ru.ispras.fortress.expression.Node sizeExpr)
                         throws SemanticException
        Throws:
        SemanticException
      • addVariable

        public void addVariable​(org.antlr.runtime.tree.CommonTree varId,
                                org.antlr.runtime.tree.CommonTree typeId)
                         throws SemanticException
        Throws:
        SemanticException
      • buildSegment

        public Segment buildSegment​(ru.ispras.fortress.expression.Node rangeStartExpr,
                                    ru.ispras.fortress.expression.Node rangeEndExpr)
                             throws SemanticException
        Creates a segment IR object and adds it to the MMU IR.
        Parameters:
        rangeStartExpr - Range start expression.
        rangeEndExpr - Range and expression.
        Returns:
        New Segment IR object.
        Throws:
        SemanticException - (1) if the specified address type is not defined; (2) if the range expressions equal to null, (3) if the range expressions cannot be reduced to constant integer values; (4) if the range start value is greater than the range end value.