- All Superinterfaces:
Expression,Sourceable
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.mc.model.IF.expression.Expression
Expression.ExpressionKind -
Method Summary
Modifier and TypeMethodDescriptionintReturns the dimension of the domain expression.domain()Returns the domain expression.The counter variable for iterating a literal domain step by step.variableAt(int index) Returns the iteration variable of the given index.Methods inherited from interface dev.civl.mc.model.IF.expression.Expression
calculateConstantValue, calculateDerefs, constantValue, containsHere, expressionKind, expressionScope, freeVariables, getExpressionType, hasConstantValue, hasDerefs, isErrorFree, isPurelyLocal, lowestScope, purelyLocalAnalysis, purelyLocalAnalysisOfVariables, replaceWith, replaceWith, setErrorFree, variableAddressedOf, variableAddressedOfMethods inherited from interface dev.civl.mc.model.IF.Sourceable
getSource, setCIVLSource
-
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
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.
-