Module dev.civl.mc

Interface DynamicTypeOfExpression

All Superinterfaces:
Expression, Sourceable

public interface DynamicTypeOfExpression extends Expression
A "DynamicTypeOf" expression. Such an expression has the form DynamicTypeOf(t), where t is a (static) CIVL type. The type of this expression is
invalid reference
CIVLDynamicType
. When evaluated, it returns the dynamic type determined by the current state and the given static type. (This assumes extent expressions are stored in array types.) For example, if t is the static type struct foo { double a[n]; } from the source code above, then DynamicTypeOf(t), evaluated in the state that arises at that point in the source code, will yield the symbolic type which is a record type with one field which is an array of doubles of length 2. Now you can store that dynamic type in a variable if you want to save it.
  • Method Details

    • getType

      CIVLType getType()
      Returns:
      The type argument