Module dev.civl.mc

Interface DomainGuardExpression

All Superinterfaces:
Expression, Sourceable

public interface DomainGuardExpression extends Expression
This is the guard expression of CIVL for loops ($for). It has the form of (i, j, k, ... : dom), where i, j, k ... are iteration variables and dom is the domain expression. The number of iteration variables should be equal to the dimension of the domain. A domain guard expression is evaluated to be true if and only if there exists a subsequent element of (i, j, k, ...) in the domain.
  • Method Details

    • domain

      Expression domain()
      Returns the domain expression.
      Returns:
      The domain expression.
    • dimension

      int dimension()
      Returns the dimension of the domain expression.
      Returns:
      The dimension of the domain expression.
    • variableAt

      Variable variableAt(int index)
      Returns the iteration variable of the given index.
      Parameters:
      index - The index of the iteration variable to be returned.
      Returns:
      The iteration variable of the given index.
    • getLiteralDomCounter

      Variable getLiteralDomCounter()
      The counter variable for iterating a literal domain step by step.
      Returns:
      the variable expression of the counter.