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 TypeMethodDescriptionintThe ID of the dynamic scope of the memory unit.voidprint(PrintStream out) dev.civl.sarl.IF.expr.ReferenceExpressionThe reference of the memory unit.setReference(dev.civl.sarl.IF.expr.ReferenceExpression ref) updates the reference of this memory unitintvarID()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
updates the reference of this memory unit- Parameters:
ref-- Returns:
- a new memory unit with the new reference
-
print
- Parameters:
out-
-