A codet representing the declaration of a local variable.
More...
#include <std_code.h>
+ Inheritance diagram for code_frontend_declt:
+ Collaboration diagram for code_frontend_declt:
Returns the initial value to which the declared variable is initialized, or empty in the case where no initialisation is included.
Sets the value to which this declaration initializes the declared variable.
- Public Member Functions inherited from
codet
In the case of a codet type that represents multiple statements, return the first of them.
In the case of a codet type that represents multiple statements, return the first of them.
In the case of a codet type that represents multiple statements, return the last of them.
In the case of a codet type that represents multiple statements, return the last of them.
- 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
Static Public Member Functions
- 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
Additional Inherited Members
- Public Types inherited from
exprt
- Public Types inherited from
irept
Used to refer to this class from derived classes.
- Protected Member Functions inherited from
exprt
Does the same as remove_ref, but using an explicit stack instead of recursion.
Detailed Description
A codet representing the declaration of a local variable.
For example, if a variable (symbol) x is represented as a symbol_exprt sym, then the declaration of this variable can be represented as code_frontend_declt(sym) .
Definition at line 346 of file std_code.h.
Constructor & Destructor Documentation
◆ code_frontend_declt()
code_frontend_declt::code_frontend_declt
(
symbol_exprt
symbol )
inlineexplicit
Member Function Documentation
◆ check()
◆ get_identifier()
◆ initial_value()
std::optional<
exprt > code_frontend_declt::initial_value
(
)
const
inline
Returns the initial value to which the declared variable is initialized, or empty in the case where no initialisation is included.
- Note
- : Initial values may be present in the front end but they must be separated into a separate assignment when used in a
goto_instructiont.
Definition at line 373 of file std_code.h.
◆ set_initial_value()
void code_frontend_declt::set_initial_value
(
std::optional<
exprt >
initial_value )
inline
Sets the value to which this declaration initializes the declared variable.
Empty optional maybe passed to remove existing initialisation.
- Note
- : Initial values may be present in the front end but they must be separated into a separate assignment when used in a
goto_instructiont.
Definition at line 384 of file std_code.h.
◆ symbol() [1/2]
◆ symbol() [2/2]
The documentation for this class was generated from the following file: