- All Superinterfaces:
ASTNode,ExpressionNode,ForLoopInitializerNode,InitializerNode,SizeableNode
A CIVL-C array lambda expression, including three components, bound variable
declaration list, (optional) restriction and expression. It has the following
syntax:
lambda: (type) $lambda ( variable-decl-list | restrict? ) body-expression ; variable-decl-list: variable-decl-sub-list (; variable-decl-sub-list)* ; variable-decl-sub-list: type ID (, ID)* (: domain)?e.g.,
(double[n]) $lambda (int x) x*1.5
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.ASTNode
ASTNode.NodeKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.expression.ExpressionNode
ExpressionNode.ExpressionKind -
Method Summary
Modifier and TypeMethodDescriptionthe bound variable declaration list, which is a sequence node of pairs of variable declaration list and an optional expression that has domain type.The body expression.Boolean-valued expression assumed to hold when evaluating expression.type()the type of this array lambdaMethods inherited from interface dev.civl.abc.ast.node.IF.ASTNode
addAllTransformAnnotations, addTransformAnnotation, child, childIndex, children, diff, equiv, getAttribute, getOwner, getScope, getSource, id, keepOnly, nextDFS, nodeKind, numChildren, parent, prettyPrint, prettyRepresentation, prettyRepresentation, print, remove, removeChild, removeTransformAnnotation, setAttribute, setChild, setId, setOwner, setScope, toString, transformAnnotationsMethods inherited from interface dev.civl.abc.ast.node.IF.expression.ExpressionNode
addConversion, copy, expressionKind, getConversion, getConvertedType, getInitialType, getNumConversions, isConstantExpression, isLvalue, removeConversions, setInitialTypeMethods inherited from interface dev.civl.abc.ast.node.IF.declaration.InitializerNode
isSideEffectFreeMethods inherited from interface dev.civl.abc.ast.node.IF.expression.SizeableNode
getType
-
Method Details
-
type
TypeNode type()the type of this array lambda- Returns:
-
boundVariableList
SequenceNode<PairNode<SequenceNode<VariableDeclarationNode>,ExpressionNode>> boundVariableList()the bound variable declaration list, which is a sequence node of pairs of variable declaration list and an optional expression that has domain type. The dimension of the domain expression, if present, should agree with the number of variable declarations in the same pair. e.g.,$lambda(int i,j: dom1;) i+jThis will have the bound variable list as:{{{int i, int j}, dom1}}.- Returns:
- the bound variable declaration list
-
restriction
ExpressionNode restriction()Boolean-valued expression assumed to hold when evaluating expression. -
expression
ExpressionNode expression()The body expression.- Returns:
- The body expression.
-