CBMC
|
Stores identifiers in unescaped and unquoted form. More...
#include <smt_terms.h>
Public Member Functions | |
smt_identifier_termt (irep_idt identifier, smt_sortt sort, std::vector< smt_indext > indices={}) | |
Constructs an identifier term with the given identifier and sort . | |
irep_idt | identifier () const |
std::vector< std::reference_wrapper< const smt_indext > > | indices () const |
![]() | |
smt_termt ()=delete | |
bool | operator== (const smt_termt &) const |
bool | operator!= (const smt_termt &) const |
const smt_sortt & | get_sort () const |
void | accept (smt_term_const_downcast_visitort &) const |
void | accept (smt_term_const_downcast_visitort &&) const |
std::string | pretty (unsigned indent=0, unsigned max_indent=0) const |
Stores identifiers in unescaped and unquoted form.
Any escaping or quoting required should be performed during printing.
The SMT-LIB standard Version 2.6 refers to "indexed" identifiers which have 1 or more indices and "simple" identifiers which have no indicies. The internal smt_identifier_termt
class is used for both kinds of identifier which are distinguished based on whether the collection of indices
is empty or not.
Definition at line 91 of file smt_terms.h.
smt_identifier_termt::smt_identifier_termt | ( | irep_idt | identifier, |
smt_sortt | sort, | ||
std::vector< smt_indext > | indices = {} |
||
) |
Constructs an identifier term with the given identifier
and sort
.
identifier | This should be the unescaped form of the identifier. Escaping of the identifier if required is to be performed as part of the printing operation. The given identifier is checked to ensure that it has not already been escaped, in order to avoid escaping it twice. Performing escaping during the printing will ensure that the identifiers output conform to the specification of the concrete form. |
sort | The sort which this term will have. All terms in our abstract form must be sorted, even if those sorts are not printed in all contexts. |
indices | This should be collection of indices for an indexed identifier, or an empty collection for simple (non-indexed) identifiers. |
Definition at line 60 of file smt_terms.cpp.
irep_idt smt_identifier_termt::identifier | ( | ) | const |
Definition at line 81 of file smt_terms.cpp.
std::vector< std::reference_wrapper< const smt_indext > > smt_identifier_termt::indices | ( | ) | const |
Definition at line 87 of file smt_terms.cpp.