Module dev.civl.mc

Interface MemoryUnit


public interface MemoryUnit
A memory unit represents an object or a part of an object that can be accessed through an expression, e.g., a[9].x, b[8], c, etc. A memory unit has three components: dyscope ID, variable ID and reference.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The ID of the dynamic scope of the memory unit.
    void
     
    dev.civl.sarl.IF.expr.ReferenceExpression
    The reference of the memory unit.
    setReference(dev.civl.sarl.IF.expr.ReferenceExpression ref)
    updates the reference of this memory unit
    int
    The ID of the variable of the memory unit.
  • Method Details

    • dyscopeID

      int dyscopeID()
      The ID of the dynamic scope of the memory unit.
      Returns:
    • varID

      int varID()
      The ID of the variable of the memory unit.
      Returns:
    • reference

      dev.civl.sarl.IF.expr.ReferenceExpression reference()
      The reference of the memory unit.
      Returns:
    • setReference

      MemoryUnit setReference(dev.civl.sarl.IF.expr.ReferenceExpression ref)
      updates the reference of this memory unit
      Parameters:
      ref -
      Returns:
      a new memory unit with the new reference
    • print

      void print(PrintStream out)
      Parameters:
      out -