Expression to define a mapping from an argument (index) to elements.
More...
#include <std_expr.h>
+ Inheritance diagram for array_comprehension_exprt:
+ Collaboration diagram for array_comprehension_exprt:
construct the binding expression
substitute free occurrences of the variables in
where() by the given values
substitute free occurrences of the variables in
where() by a set of different symbols
- Public Member Functions inherited from
exprt
Return the type of the expression.
Return true if there is at least one operand.
Add the source location from location, if it is non-nil.
Add the source location from location, if it is non-nil.
Add the source location from other, if it has any.
Add the source location from other, if it has any.
Copy the given argument to the end of exprt's operands.
Add the given argument to the end of exprt's operands.
Add the given argument to the end of exprt's operands.
Add the given arguments to the end of exprt's operands.
Add the given arguments to the end of exprt's operands.
Return whether the expression is a constant.
Return whether the expression is a constant representing true.
Return whether the expression is a constant representing false.
Return whether the expression is a constant representing 0.
Return whether the expression is a constant representing 1.
Return whether the expression represents a Boolean.
Get a
source_locationt from the expression or from its operands (non-recursively).
These are pre-order traversal visitors, i.e., the visitor is executed on a node before its children have been visited.
These are post-order traversal visitors, i.e., the visitor is executed on a node after its children have been visited.
- Public Member Functions inherited from
irept
defines ordering on the internal representation
defines ordering on the internal representation
defines ordering on the internal representation comments are ignored
Additional Inherited Members
- Public Types inherited from
exprt
- Public Types inherited from
irept
Used to refer to this class from derived classes.
- Static Public Member Functions inherited from
binary_exprt
- Static Public Member Functions inherited from
exprt
Check that the expression is well-formed (shallow checks only, i.e., subexpressions and its type are not checked).
Check that the expression is well-formed, assuming that its subexpressions and type have all ready been checked for well-formedness.
Check that the expression is well-formed (full check, including checks of all subexpressions and the type)
- Static Public Member Functions inherited from
irept
count the number of named_sub elements that are not comments
- Protected Member Functions inherited from
exprt
Does the same as remove_ref, but using an explicit stack instead of recursion.
Detailed Description
Expression to define a mapping from an argument (index) to elements.
This enables constructing an array via an anonymous function. Not all kinds of array comprehension can be expressed, only those of the form [f(x) | x in {0, 1, ... array_size-1}]. The LHS and RHS are the argument (x) and body (f(x)) of the anonymous function, respectively. The range is given by the type of the expression, which has to be an array_typet (which includes a value for array_size).
Definition at line 3466 of file std_expr.h.
Constructor & Destructor Documentation
◆ array_comprehension_exprt()
array_comprehension_exprt::array_comprehension_exprt
(
symbol_exprt
arg,
)
inlineexplicit
Member Function Documentation
◆ arg() [1/2]
◆ arg() [2/2]
◆ body() [1/2]
exprt & array_comprehension_exprt::body
(
)
inline
◆ body() [2/2]
const exprt & array_comprehension_exprt::body
(
)
const
inline
◆ type() [1/2]
◆ type() [2/2]
The documentation for this class was generated from the following file: