- All Superinterfaces:
Expression,Sourceable
A CIVL-C quanti, bound variable declaration list, (optional) restriction and
expression. It has the following syntax:
array-lambda: $lambda ( variable-decl-list | restrict? ) expression ; variable-decl-list: variable-decl-sub-list (; variable-decl-sub-list)* ; variable-decl-sub-list: type ID (, ID)* (: domain)?e.g.,
(int[n]) $lambda (int i) i*4
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.mc.model.IF.expression.Expression
Expression.ExpressionKind -
Method Summary
Modifier and TypeMethodDescriptionTODO: shouldn't this be called the "bound variable"? It is the opposite of free.The expression e(x).Methods inherited from interface dev.civl.mc.model.IF.expression.Expression
calculateConstantValue, calculateDerefs, constantValue, containsHere, expressionKind, expressionScope, freeVariables, 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
-
freeVariable
Variable freeVariable()TODO: shouldn't this be called the "bound variable"? It is the opposite of free.- Returns:
- The free variable in this lambda expression
-
lambdaFunction
Expression lambdaFunction()The expression e(x). -
getExpressionType
CIVLFunctionType getExpressionType()- Specified by:
getExpressionTypein interfaceExpression- Returns:
- The type of this expression. For a primitive or variable, this is the type of the primitive or variable. For a cast expression it is the cast type. For operations it is the type of the operation result.
-