Module dev.civl.abc

Interface ArrayLambdaNode

All Superinterfaces:
ASTNode, ExpressionNode, ForLoopInitializerNode, InitializerNode, SizeableNode

public interface ArrayLambdaNode extends ExpressionNode
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
 
  • Method Details

    • type

      TypeNode type()
      the type of this array lambda
      Returns:
    • 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+j This 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.