CBMC
pointer_expr.h File Reference
#include "bitvector_types.h"
#include "std_expr.h"
+ Include dependency graph for pointer_expr.h:

Go to the source code of this file.

Classes

class  pointer_typet
 The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they have a subtype) More...
 
class  reference_typet
 The reference type. More...
 
class  object_descriptor_exprt
 Split an expression into a base object and a (byte) offset. More...
 
class  dynamic_object_exprt
 Representation of heap-allocated objects. More...
 
class  is_dynamic_object_exprt
 Evaluates to true if the operand is a pointer to a dynamic object. More...
 
class  address_of_exprt
 Operator to return the address of an object. More...
 
class  object_address_exprt
 Operator to return the address of an object. More...
 
class  field_address_exprt
 Operator to return the address of a field relative to a base address. More...
 
class  element_address_exprt
 Operator to return the address of an array element relative to a base address. More...
 
class  dereference_exprt
 Operator to dereference a pointer. More...
 
class  null_pointer_exprt
 The null pointer constant. More...
 
class  r_or_w_ok_exprt
 A base class for a predicate that indicates that an address range is ok to read or write or both. More...
 
class  r_ok_exprt
 A predicate that indicates that an address range is ok to read. More...
 
class  w_ok_exprt
 A predicate that indicates that an address range is ok to write. More...
 
class  annotated_pointer_constant_exprt
 Pointer-typed bitvector constant annotated with the pointer expression that the bitvector is the numeric representation of. More...
 
class  pointer_offset_exprt
 The offset (in bytes) of a pointer relative to the object. More...
 
class  pointer_object_exprt
 A numerical identifier for the object a pointer points to. More...
 
class  object_size_exprt
 Expression for finding the size (in bytes) of the object a pointer points to. More...
 
class  is_cstring_exprt
 A predicate that indicates that a zero-terminated string starts at the given address. More...
 
class  cstrlen_exprt
 An expression, akin to ISO C's strlen, that denotes the length of a zero-terminated string that starts at the given address. More...
 
class  live_object_exprt
 A predicate that indicates that the object pointed to is live. More...
 
class  writeable_object_exprt
 A predicate that indicates that the object pointed to is writeable. More...
 

Functions

template<>
bool can_cast_type< pointer_typet > (const typet &type)
 Check whether a reference to a typet is a pointer_typet. More...
 
const pointer_typetto_pointer_type (const typet &type)
 Cast a typet to a pointer_typet. More...
 
pointer_typetto_pointer_type (typet &type)
 Cast a typet to a pointer_typet. More...
 
bool is_void_pointer (const typet &type)
 This method tests, if the given typet is a pointer of type void. More...
 
template<>
bool can_cast_type< reference_typet > (const typet &type)
 Check whether a reference to a typet is a reference_typet. More...
 
const reference_typetto_reference_type (const typet &type)
 Cast a typet to a reference_typet. More...
 
reference_typetto_reference_type (typet &type)
 Cast a typet to a reference_typet. More...
 
bool is_reference (const typet &type)
 Returns true if the type is a reference. More...
 
bool is_rvalue_reference (const typet &type)
 Returns if the type is an R value reference. More...
 
template<>
bool can_cast_expr< object_descriptor_exprt > (const exprt &base)
 
void validate_expr (const object_descriptor_exprt &value)
 
const object_descriptor_exprtto_object_descriptor_expr (const exprt &expr)
 Cast an exprt to an object_descriptor_exprt. More...
 
object_descriptor_exprtto_object_descriptor_expr (exprt &expr)
 Cast an exprt to an object_descriptor_exprt. More...
 
template<>
bool can_cast_expr< dynamic_object_exprt > (const exprt &base)
 
void validate_expr (const dynamic_object_exprt &value)
 
const dynamic_object_exprtto_dynamic_object_expr (const exprt &expr)
 Cast an exprt to a dynamic_object_exprt. More...
 
dynamic_object_exprtto_dynamic_object_expr (exprt &expr)
 Cast an exprt to a dynamic_object_exprt. More...
 
template<>
bool can_cast_expr< is_dynamic_object_exprt > (const exprt &base)
 
void validate_expr (const is_dynamic_object_exprt &value)
 
const is_dynamic_object_exprtto_is_dynamic_object_expr (const exprt &expr)
 
is_dynamic_object_exprtto_is_dynamic_object_expr (exprt &expr)
 
template<>
bool can_cast_expr< address_of_exprt > (const exprt &base)
 
void validate_expr (const address_of_exprt &value)
 
const address_of_exprtto_address_of_expr (const exprt &expr)
 Cast an exprt to an address_of_exprt. More...
 
address_of_exprtto_address_of_expr (exprt &expr)
 Cast an exprt to an address_of_exprt. More...
 
template<>
bool can_cast_expr< object_address_exprt > (const exprt &base)
 
void validate_expr (const object_address_exprt &value)
 
const object_address_exprtto_object_address_expr (const exprt &expr)
 Cast an exprt to an object_address_exprt. More...
 
object_address_exprtto_object_address_expr (exprt &expr)
 Cast an exprt to an object_address_exprt. More...
 
template<>
bool can_cast_expr< field_address_exprt > (const exprt &expr)
 
void validate_expr (const field_address_exprt &value)
 
const field_address_exprtto_field_address_expr (const exprt &expr)
 Cast an exprt to an field_address_exprt. More...
 
field_address_exprtto_field_address_expr (exprt &expr)
 Cast an exprt to an field_address_exprt. More...
 
template<>
bool can_cast_expr< element_address_exprt > (const exprt &expr)
 
void validate_expr (const element_address_exprt &value)
 
const element_address_exprtto_element_address_expr (const exprt &expr)
 Cast an exprt to an element_address_exprt. More...
 
element_address_exprtto_element_address_expr (exprt &expr)
 Cast an exprt to an element_address_exprt. More...
 
template<>
bool can_cast_expr< dereference_exprt > (const exprt &base)
 
void validate_expr (const dereference_exprt &value)
 
const dereference_exprtto_dereference_expr (const exprt &expr)
 Cast an exprt to a dereference_exprt. More...
 
dereference_exprtto_dereference_expr (exprt &expr)
 Cast an exprt to a dereference_exprt. More...
 
const r_or_w_ok_exprtto_r_or_w_ok_expr (const exprt &expr)
 
const r_ok_exprtto_r_ok_expr (const exprt &expr)
 
const w_ok_exprtto_w_ok_expr (const exprt &expr)
 
template<>
bool can_cast_expr< annotated_pointer_constant_exprt > (const exprt &base)
 
void validate_expr (const annotated_pointer_constant_exprt &value)
 
const annotated_pointer_constant_exprtto_annotated_pointer_constant_expr (const exprt &expr)
 Cast an exprt to an annotated_pointer_constant_exprt. More...
 
annotated_pointer_constant_exprtto_annotated_pointer_constant_expr (exprt &expr)
 Cast an exprt to an annotated_pointer_constant_exprt. More...
 
template<>
bool can_cast_expr< pointer_offset_exprt > (const exprt &base)
 
void validate_expr (const pointer_offset_exprt &value)
 
const pointer_offset_exprtto_pointer_offset_expr (const exprt &expr)
 Cast an exprt to a pointer_offset_exprt. More...
 
pointer_offset_exprtto_pointer_offset_expr (exprt &expr)
 Cast an exprt to a pointer_offset_exprt. More...
 
template<>
bool can_cast_expr< pointer_object_exprt > (const exprt &base)
 
void validate_expr (const pointer_object_exprt &value)
 
const pointer_object_exprtto_pointer_object_expr (const exprt &expr)
 Cast an exprt to a pointer_object_exprt. More...
 
pointer_object_exprtto_pointer_object_expr (exprt &expr)
 Cast an exprt to a pointer_object_exprt. More...
 
const object_size_exprtto_object_size_expr (const exprt &expr)
 Cast an exprt to a object_size_exprt. More...
 
object_size_exprtto_object_size_expr (exprt &expr)
 Cast an exprt to a object_size_exprt. More...
 
template<>
bool can_cast_expr< object_size_exprt > (const exprt &base)
 
void validate_expr (const object_size_exprt &value)
 
template<>
bool can_cast_expr< is_cstring_exprt > (const exprt &base)
 
void validate_expr (const is_cstring_exprt &value)
 
const is_cstring_exprtto_is_cstring_expr (const exprt &expr)
 Cast an exprt to a is_cstring_exprt. More...
 
is_cstring_exprtto_is_cstring_expr (exprt &expr)
 Cast an exprt to a is_cstring_exprt. More...
 
template<>
bool can_cast_expr< cstrlen_exprt > (const exprt &base)
 
void validate_expr (const cstrlen_exprt &value)
 
const cstrlen_exprtto_cstrlen_expr (const exprt &expr)
 Cast an exprt to a cstrlen_exprt. More...
 
cstrlen_exprtto_cstrlen_expr (exprt &expr)
 Cast an exprt to a cstrlen_exprt. More...
 
template<>
bool can_cast_expr< live_object_exprt > (const exprt &base)
 
void validate_expr (const live_object_exprt &value)
 
const live_object_exprtto_live_object_expr (const exprt &expr)
 Cast an exprt to a live_object_exprt. More...
 
live_object_exprtto_live_object_expr (exprt &expr)
 Cast an exprt to a live_object_exprt. More...
 
template<>
bool can_cast_expr< writeable_object_exprt > (const exprt &base)
 
void validate_expr (const writeable_object_exprt &value)
 
const writeable_object_exprtto_writeable_object_expr (const exprt &expr)
 Cast an exprt to a writeable_object_exprt. More...
 
writeable_object_exprtto_writeable_object_expr (exprt &expr)
 Cast an exprt to a writeable_object_exprt. More...
 

Detailed Description

API to expression classes for Pointers

Definition in file pointer_expr.h.

Function Documentation

◆ can_cast_expr< address_of_exprt >()

template<>
bool can_cast_expr< address_of_exprt > ( const exprt base)
inline

Definition at line 392 of file pointer_expr.h.

◆ can_cast_expr< annotated_pointer_constant_exprt >()

template<>
bool can_cast_expr< annotated_pointer_constant_exprt > ( const exprt base)
inline

Definition at line 850 of file pointer_expr.h.

◆ can_cast_expr< cstrlen_exprt >()

template<>
bool can_cast_expr< cstrlen_exprt > ( const exprt base)
inline

Definition at line 1144 of file pointer_expr.h.

◆ can_cast_expr< dereference_exprt >()

template<>
bool can_cast_expr< dereference_exprt > ( const exprt base)
inline

Definition at line 700 of file pointer_expr.h.

◆ can_cast_expr< dynamic_object_exprt >()

template<>
bool can_cast_expr< dynamic_object_exprt > ( const exprt base)
inline

Definition at line 285 of file pointer_expr.h.

◆ can_cast_expr< element_address_exprt >()

template<>
bool can_cast_expr< element_address_exprt > ( const exprt expr)
inline

Definition at line 624 of file pointer_expr.h.

◆ can_cast_expr< field_address_exprt >()

template<>
bool can_cast_expr< field_address_exprt > ( const exprt expr)
inline

Definition at line 542 of file pointer_expr.h.

◆ can_cast_expr< is_cstring_exprt >()

template<>
bool can_cast_expr< is_cstring_exprt > ( const exprt base)
inline

Definition at line 1086 of file pointer_expr.h.

◆ can_cast_expr< is_dynamic_object_exprt >()

template<>
bool can_cast_expr< is_dynamic_object_exprt > ( const exprt base)
inline

Definition at line 340 of file pointer_expr.h.

◆ can_cast_expr< live_object_exprt >()

template<>
bool can_cast_expr< live_object_exprt > ( const exprt base)
inline

Definition at line 1200 of file pointer_expr.h.

◆ can_cast_expr< object_address_exprt >()

template<>
bool can_cast_expr< object_address_exprt > ( const exprt base)
inline

Definition at line 458 of file pointer_expr.h.

◆ can_cast_expr< object_descriptor_exprt >()

template<>
bool can_cast_expr< object_descriptor_exprt > ( const exprt base)
inline

Definition at line 221 of file pointer_expr.h.

◆ can_cast_expr< object_size_exprt >()

template<>
bool can_cast_expr< object_size_exprt > ( const exprt base)
inline

Definition at line 1049 of file pointer_expr.h.

◆ can_cast_expr< pointer_object_exprt >()

template<>
bool can_cast_expr< pointer_object_exprt > ( const exprt base)
inline

Definition at line 967 of file pointer_expr.h.

◆ can_cast_expr< pointer_offset_exprt >()

template<>
bool can_cast_expr< pointer_offset_exprt > ( const exprt base)
inline

Definition at line 909 of file pointer_expr.h.

◆ can_cast_expr< writeable_object_exprt >()

template<>
bool can_cast_expr< writeable_object_exprt > ( const exprt base)
inline

Definition at line 1256 of file pointer_expr.h.

◆ can_cast_type< pointer_typet >()

template<>
bool can_cast_type< pointer_typet > ( const typet type)
inline

Check whether a reference to a typet is a pointer_typet.

Parameters
typeSource type.
Returns
True if type is a pointer_typet.

Definition at line 66 of file pointer_expr.h.

◆ can_cast_type< reference_typet >()

template<>
bool can_cast_type< reference_typet > ( const typet type)
inline

Check whether a reference to a typet is a reference_typet.

Parameters
typeSource type.
Returns
True if type is a reference_typet.

Definition at line 135 of file pointer_expr.h.

◆ is_reference()

bool is_reference ( const typet type)

Returns true if the type is a reference.

Definition at line 143 of file std_types.cpp.

◆ is_rvalue_reference()

bool is_rvalue_reference ( const typet type)

Returns if the type is an R value reference.

Definition at line 150 of file std_types.cpp.

◆ is_void_pointer()

bool is_void_pointer ( const typet type)
inline

This method tests, if the given typet is a pointer of type void.

Definition at line 96 of file pointer_expr.h.

◆ to_address_of_expr() [1/2]

const address_of_exprt& to_address_of_expr ( const exprt expr)
inline

Cast an exprt to an address_of_exprt.

expr must be known to be address_of_exprt.

Parameters
exprSource expression
Returns
Object of type address_of_exprt

Definition at line 408 of file pointer_expr.h.

◆ to_address_of_expr() [2/2]

address_of_exprt& to_address_of_expr ( exprt expr)
inline

Cast an exprt to an address_of_exprt.

expr must be known to be address_of_exprt.

Parameters
exprSource expression
Returns
Object of type address_of_exprt

Definition at line 417 of file pointer_expr.h.

◆ to_annotated_pointer_constant_expr() [1/2]

const annotated_pointer_constant_exprt& to_annotated_pointer_constant_expr ( const exprt expr)
inline

Cast an exprt to an annotated_pointer_constant_exprt.

expr must be known to be annotated_pointer_constant_exprt.

Parameters
exprSource expression
Returns
Object of type annotated_pointer_constant_exprt

Definition at line 868 of file pointer_expr.h.

◆ to_annotated_pointer_constant_expr() [2/2]

annotated_pointer_constant_exprt& to_annotated_pointer_constant_expr ( exprt expr)
inline

Cast an exprt to an annotated_pointer_constant_exprt.

expr must be known to be annotated_pointer_constant_exprt.

Parameters
exprSource expression
Returns
Object of type annotated_pointer_constant_exprt

Definition at line 879 of file pointer_expr.h.

◆ to_cstrlen_expr() [1/2]

const cstrlen_exprt& to_cstrlen_expr ( const exprt expr)
inline

Cast an exprt to a cstrlen_exprt.

expr must be known to be cstrlen_exprt.

Parameters
exprSource expression
Returns
Object of type cstrlen_exprt

Definition at line 1160 of file pointer_expr.h.

◆ to_cstrlen_expr() [2/2]

cstrlen_exprt& to_cstrlen_expr ( exprt expr)
inline

Cast an exprt to a cstrlen_exprt.

expr must be known to be cstrlen_exprt.

Parameters
exprSource expression
Returns
Object of type cstrlen_exprt

Definition at line 1169 of file pointer_expr.h.

◆ to_dereference_expr() [1/2]

const dereference_exprt& to_dereference_expr ( const exprt expr)
inline

Cast an exprt to a dereference_exprt.

expr must be known to be dereference_exprt.

Parameters
exprSource expression
Returns
Object of type dereference_exprt

Definition at line 716 of file pointer_expr.h.

◆ to_dereference_expr() [2/2]

dereference_exprt& to_dereference_expr ( exprt expr)
inline

Cast an exprt to a dereference_exprt.

expr must be known to be dereference_exprt.

Parameters
exprSource expression
Returns
Object of type dereference_exprt

Definition at line 725 of file pointer_expr.h.

◆ to_dynamic_object_expr() [1/2]

const dynamic_object_exprt& to_dynamic_object_expr ( const exprt expr)
inline

Cast an exprt to a dynamic_object_exprt.

expr must be known to be dynamic_object_exprt.

Parameters
exprSource expression
Returns
Object of type dynamic_object_exprt

Definition at line 301 of file pointer_expr.h.

◆ to_dynamic_object_expr() [2/2]

dynamic_object_exprt& to_dynamic_object_expr ( exprt expr)
inline

Cast an exprt to a dynamic_object_exprt.

expr must be known to be dynamic_object_exprt.

Parameters
exprSource expression
Returns
Object of type dynamic_object_exprt

Definition at line 311 of file pointer_expr.h.

◆ to_element_address_expr() [1/2]

const element_address_exprt& to_element_address_expr ( const exprt expr)
inline

Cast an exprt to an element_address_exprt.

expr must be known to be element_address_exprt.

Parameters
exprSource expression
Returns
Object of type element_address_exprt

Definition at line 640 of file pointer_expr.h.

◆ to_element_address_expr() [2/2]

element_address_exprt& to_element_address_expr ( exprt expr)
inline

Cast an exprt to an element_address_exprt.

expr must be known to be element_address_exprt.

Parameters
exprSource expression
Returns
Object of type element_address_exprt

Definition at line 650 of file pointer_expr.h.

◆ to_field_address_expr() [1/2]

const field_address_exprt& to_field_address_expr ( const exprt expr)
inline

Cast an exprt to an field_address_exprt.

expr must be known to be field_address_exprt.

Parameters
exprSource expression
Returns
Object of type field_address_exprt

Definition at line 558 of file pointer_expr.h.

◆ to_field_address_expr() [2/2]

field_address_exprt& to_field_address_expr ( exprt expr)
inline

Cast an exprt to an field_address_exprt.

expr must be known to be field_address_exprt.

Parameters
exprSource expression
Returns
Object of type field_address_exprt

Definition at line 568 of file pointer_expr.h.

◆ to_is_cstring_expr() [1/2]

const is_cstring_exprt& to_is_cstring_expr ( const exprt expr)
inline

Cast an exprt to a is_cstring_exprt.

expr must be known to be is_cstring_exprt.

Parameters
exprSource expression
Returns
Object of type is_cstring_exprt

Definition at line 1102 of file pointer_expr.h.

◆ to_is_cstring_expr() [2/2]

is_cstring_exprt& to_is_cstring_expr ( exprt expr)
inline

Cast an exprt to a is_cstring_exprt.

expr must be known to be is_cstring_exprt.

Parameters
exprSource expression
Returns
Object of type is_cstring_exprt

Definition at line 1111 of file pointer_expr.h.

◆ to_is_dynamic_object_expr() [1/2]

const is_dynamic_object_exprt& to_is_dynamic_object_expr ( const exprt expr)
inline

Definition at line 351 of file pointer_expr.h.

◆ to_is_dynamic_object_expr() [2/2]

is_dynamic_object_exprt& to_is_dynamic_object_expr ( exprt expr)
inline

Definition at line 361 of file pointer_expr.h.

◆ to_live_object_expr() [1/2]

const live_object_exprt& to_live_object_expr ( const exprt expr)
inline

Cast an exprt to a live_object_exprt.

expr must be known to be live_object_exprt.

Parameters
exprSource expression
Returns
Object of type live_object_exprt

Definition at line 1216 of file pointer_expr.h.

◆ to_live_object_expr() [2/2]

live_object_exprt& to_live_object_expr ( exprt expr)
inline

Cast an exprt to a live_object_exprt.

expr must be known to be live_object_exprt.

Parameters
exprSource expression
Returns
Object of type live_object_exprt

Definition at line 1225 of file pointer_expr.h.

◆ to_object_address_expr() [1/2]

const object_address_exprt& to_object_address_expr ( const exprt expr)
inline

Cast an exprt to an object_address_exprt.

expr must be known to be object_address_exprt.

Parameters
exprSource expression
Returns
Object of type object_address_exprt

Definition at line 474 of file pointer_expr.h.

◆ to_object_address_expr() [2/2]

object_address_exprt& to_object_address_expr ( exprt expr)
inline

Cast an exprt to an object_address_exprt.

expr must be known to be object_address_exprt.

Parameters
exprSource expression
Returns
Object of type object_address_exprt

Definition at line 484 of file pointer_expr.h.

◆ to_object_descriptor_expr() [1/2]

const object_descriptor_exprt& to_object_descriptor_expr ( const exprt expr)
inline

Cast an exprt to an object_descriptor_exprt.

expr must be known to be object_descriptor_exprt.

Parameters
exprSource expression
Returns
Object of type object_descriptor_exprt

Definition at line 238 of file pointer_expr.h.

◆ to_object_descriptor_expr() [2/2]

object_descriptor_exprt& to_object_descriptor_expr ( exprt expr)
inline

Cast an exprt to an object_descriptor_exprt.

expr must be known to be object_descriptor_exprt.

Parameters
exprSource expression
Returns
Object of type object_descriptor_exprt

Definition at line 248 of file pointer_expr.h.

◆ to_object_size_expr() [1/2]

const object_size_exprt& to_object_size_expr ( const exprt expr)
inline

Cast an exprt to a object_size_exprt.

expr must be known to be object_size_exprt.

Parameters
exprSource expression
Returns
Object of type object_size_exprt

Definition at line 1031 of file pointer_expr.h.

◆ to_object_size_expr() [2/2]

object_size_exprt& to_object_size_expr ( exprt expr)
inline

Cast an exprt to a object_size_exprt.

expr must be known to be object_size_exprt.

Parameters
exprSource expression
Returns
Object of type object_size_exprt

Definition at line 1040 of file pointer_expr.h.

◆ to_pointer_object_expr() [1/2]

const pointer_object_exprt& to_pointer_object_expr ( const exprt expr)
inline

Cast an exprt to a pointer_object_exprt.

expr must be known to be pointer_object_exprt.

Parameters
exprSource expression
Returns
Object of type pointer_object_exprt

Definition at line 986 of file pointer_expr.h.

◆ to_pointer_object_expr() [2/2]

pointer_object_exprt& to_pointer_object_expr ( exprt expr)
inline

Cast an exprt to a pointer_object_exprt.

expr must be known to be pointer_object_exprt.

Parameters
exprSource expression
Returns
Object of type pointer_object_exprt

Definition at line 996 of file pointer_expr.h.

◆ to_pointer_offset_expr() [1/2]

const pointer_offset_exprt& to_pointer_offset_expr ( const exprt expr)
inline

Cast an exprt to a pointer_offset_exprt.

expr must be known to be pointer_offset_exprt.

Parameters
exprSource expression
Returns
Object of type pointer_offset_exprt

Definition at line 928 of file pointer_expr.h.

◆ to_pointer_offset_expr() [2/2]

pointer_offset_exprt& to_pointer_offset_expr ( exprt expr)
inline

Cast an exprt to a pointer_offset_exprt.

expr must be known to be pointer_offset_exprt.

Parameters
exprSource expression
Returns
Object of type pointer_offset_exprt

Definition at line 938 of file pointer_expr.h.

◆ to_pointer_type() [1/2]

const pointer_typet& to_pointer_type ( const typet type)
inline

Cast a typet to a pointer_typet.

This is an unchecked conversion. type must be known to be pointer_typet. Will fail with a precondition violation if type doesn't match.

Parameters
typeSource type.
Returns
Object of type pointer_typet.

Definition at line 79 of file pointer_expr.h.

◆ to_pointer_type() [2/2]

pointer_typet& to_pointer_type ( typet type)
inline

Cast a typet to a pointer_typet.

This is an unchecked conversion. type must be known to be pointer_typet. Will fail with a precondition violation if type doesn't match.

Parameters
typeSource type.
Returns
Object of type pointer_typet.

Definition at line 87 of file pointer_expr.h.

◆ to_r_ok_expr()

const r_ok_exprt& to_r_ok_expr ( const exprt expr)
inline

Definition at line 783 of file pointer_expr.h.

◆ to_r_or_w_ok_expr()

const r_or_w_ok_exprt& to_r_or_w_ok_expr ( const exprt expr)
inline

Definition at line 764 of file pointer_expr.h.

◆ to_reference_type() [1/2]

const reference_typet& to_reference_type ( const typet type)
inline

Cast a typet to a reference_typet.

This is an unchecked conversion. type must be known to be reference_typet. Will fail with a precondition violation if type doesn't match.

Parameters
typeSource type.
Returns
Object of type reference_typet.

Definition at line 148 of file pointer_expr.h.

◆ to_reference_type() [2/2]

reference_typet& to_reference_type ( typet type)
inline

Cast a typet to a reference_typet.

This is an unchecked conversion. type must be known to be reference_typet. Will fail with a precondition violation if type doesn't match.

Parameters
typeSource type.
Returns
Object of type reference_typet.

Definition at line 155 of file pointer_expr.h.

◆ to_w_ok_expr()

const w_ok_exprt& to_w_ok_expr ( const exprt expr)
inline

Definition at line 801 of file pointer_expr.h.

◆ to_writeable_object_expr() [1/2]

const writeable_object_exprt& to_writeable_object_expr ( const exprt expr)
inline

Cast an exprt to a writeable_object_exprt.

expr must be known to be writeable_object_exprt.

Parameters
exprSource expression
Returns
Object of type writeable_object_exprt

Definition at line 1272 of file pointer_expr.h.

◆ to_writeable_object_expr() [2/2]

writeable_object_exprt& to_writeable_object_expr ( exprt expr)
inline

Cast an exprt to a writeable_object_exprt.

expr must be known to be writeable_object_exprt.

Parameters
exprSource expression
Returns
Object of type writeable_object_exprt

Definition at line 1282 of file pointer_expr.h.

◆ validate_expr() [1/16]

void validate_expr ( const address_of_exprt value)
inline

Definition at line 397 of file pointer_expr.h.

◆ validate_expr() [2/16]

void validate_expr ( const annotated_pointer_constant_exprt value)
inline

Definition at line 855 of file pointer_expr.h.

◆ validate_expr() [3/16]

void validate_expr ( const cstrlen_exprt value)
inline

Definition at line 1149 of file pointer_expr.h.

◆ validate_expr() [4/16]

void validate_expr ( const dereference_exprt value)
inline

Definition at line 705 of file pointer_expr.h.

◆ validate_expr() [5/16]

void validate_expr ( const dynamic_object_exprt value)
inline

Definition at line 290 of file pointer_expr.h.

◆ validate_expr() [6/16]

void validate_expr ( const element_address_exprt value)
inline

Definition at line 629 of file pointer_expr.h.

◆ validate_expr() [7/16]

void validate_expr ( const field_address_exprt value)
inline

Definition at line 547 of file pointer_expr.h.

◆ validate_expr() [8/16]

void validate_expr ( const is_cstring_exprt value)
inline

Definition at line 1091 of file pointer_expr.h.

◆ validate_expr() [9/16]

void validate_expr ( const is_dynamic_object_exprt value)
inline

Definition at line 345 of file pointer_expr.h.

◆ validate_expr() [10/16]

void validate_expr ( const live_object_exprt value)
inline

Definition at line 1205 of file pointer_expr.h.

◆ validate_expr() [11/16]

void validate_expr ( const object_address_exprt value)
inline

Definition at line 463 of file pointer_expr.h.

◆ validate_expr() [12/16]

void validate_expr ( const object_descriptor_exprt value)
inline

Definition at line 226 of file pointer_expr.h.

◆ validate_expr() [13/16]

void validate_expr ( const object_size_exprt value)
inline

Definition at line 1054 of file pointer_expr.h.

◆ validate_expr() [14/16]

void validate_expr ( const pointer_object_exprt value)
inline

Definition at line 972 of file pointer_expr.h.

◆ validate_expr() [15/16]

void validate_expr ( const pointer_offset_exprt value)
inline

Definition at line 914 of file pointer_expr.h.

◆ validate_expr() [16/16]

void validate_expr ( const writeable_object_exprt value)
inline

Definition at line 1261 of file pointer_expr.h.