A constant literal expression.
More...
#include <std_expr.h>
+ Inheritance diagram for constant_exprt:
+ Collaboration diagram for constant_exprt:
Returns true if expr has a pointer type and a value NULL; it also returns true when expr has value zero and NULL_is_zero is true; returns false in all other cases.
Return whether the expression lhs is a constant of Boolean type that is representing the Boolean value rhs.
Return whether the expression lhs is not a constant of Boolean type or is not representing the Boolean value rhs.
Return whether the expression lhs is a constant of Boolean type that is representing the Boolean value rhs.
Return whether the expression lhs is not a constant of Boolean type or is not representing the Boolean value rhs.
Return whether the expression lhs is a constant representing the NULL pointer.
remove all operand methods
- 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
Protected Member Functions
- Protected Member Functions inherited from
exprt
Additional Inherited Members
- Public Types inherited from
exprt
- Public Types inherited from
irept
Used to refer to this class from derived classes.
Does the same as remove_ref, but using an explicit stack instead of recursion.
Detailed Description
A constant literal expression.
Definition at line 3006 of file std_expr.h.
Constructor & Destructor Documentation
◆ constant_exprt()
Member Function Documentation
◆ check()
◆ get_value()
◆ is_null_pointer()
bool constant_exprt::is_null_pointer
(
)
const
Returns true if expr has a pointer type and a value NULL; it also returns true when expr has value zero and NULL_is_zero is true; returns false in all other cases.
Definition at line 170 of file std_expr.cpp.
◆ operator!=() [1/4]
bool constant_exprt::operator!=
(
bool
rhs )
const
Return whether the expression lhs is not a constant of Boolean type or is not representing the Boolean value rhs.
Definition at line 47 of file std_expr.cpp.
◆ operator!=() [2/4]
◆ operator!=() [3/4]
bool constant_exprt::operator!=
(
int
rhs )
const
Return whether the expression lhs is not a constant of Boolean type or is not representing the Boolean value rhs.
Definition at line 164 of file std_expr.cpp.
◆ operator!=() [4/4]
bool constant_exprt::operator!=
(
std::nullptr_t
rhs )
const
◆ operator==() [1/4]
bool constant_exprt::operator==
(
bool
rhs )
const
Return whether the expression lhs is a constant of Boolean type that is representing the Boolean value rhs.
Definition at line 42 of file std_expr.cpp.
◆ operator==() [2/4]
◆ operator==() [3/4]
bool constant_exprt::operator==
(
int
rhs )
const
Return whether the expression lhs is a constant of Boolean type that is representing the Boolean value rhs.
Definition at line 68 of file std_expr.cpp.
◆ operator==() [4/4]
bool constant_exprt::operator==
(
std::nullptr_t
rhs )
const
Return whether the expression lhs is a constant representing the NULL pointer.
Definition at line 198 of file std_expr.cpp.
◆ set_value()
◆ validate()
◆ value_is_zero_string()
bool constant_exprt::value_is_zero_string
(
)
const
protected
The documentation for this class was generated from the following files: