A goto_instruction_codet representing the declaration that an input of a particular description has a value which corresponds to the value of a given expression (or expressions).
More...
#include <goto_instruction_code.h>
+ Inheritance diagram for code_inputt:
+ Collaboration diagram for code_inputt:
This constructor is for support of calls to __CPROVER_input in user code.
This constructor is intended for generating input instructions as part of synthetic entry point code, rather than as part of user code.
- 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 goto_instruction_codet representing the declaration that an input of a particular description has a value which corresponds to the value of a given expression (or expressions).
When working with the C front end, calls to the __CPROVER_input intrinsic can be added to the input code in order add instructions of this type to the goto program. The first argument is expected to be a C string denoting the input identifier. The second argument is the expression for the input value.
Definition at line 406 of file goto_instruction_code.h.
Constructor & Destructor Documentation
◆ code_inputt() [1/2]
code_inputt::code_inputt
(
std::vector<
exprt >
arguments,
)
explicit
This constructor is for support of calls to __CPROVER_input in user code.
Where the first first argument is a description which may be any const char * and one or more corresponding expression arguments follow.
Definition at line 22 of file goto_instruction_code.cpp.
◆ code_inputt() [2/2]
This constructor is intended for generating input instructions as part of synthetic entry point code, rather than as part of user code.
- Parameters
-
description This is used to construct an expression for a pointer to a string constant containing the description text. This expression is then used as the first argument.
expression This expression corresponds to a value which should be recorded as an input.
location A location to associate with this instruction.
Definition at line 32 of file goto_instruction_code.cpp.
Member Function Documentation
◆ check()
The documentation for this class was generated from the following files: