ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
value_sett::objectt Class Reference

Record for an object reference. More...

#include <value_set.h>

Public Member Functions

 objectt ()
 objectt (bool offset_set, unsigned int operand)
 objectt (bool offset_set, const BigInt &_offset)
bool offset_is_zero () const
bool operator== (const objectt &o) const
bool operator!= (const objectt &o) const

Public Attributes

BigInt offset
 Record of the explicit offset into the object.
bool offset_is_set
 Whether or not the offset field of this objectt is valid; if this is true, then the reference has a fixed offset into the object, the value of which is in the offset field.
unsigned int offset_alignment
 Least alignment of the offset.

Detailed Description

Record for an object reference.

Any reference to an object is stored as an objectt, as a map element in an object_mapt. The actual object that this refers to is determined by the /key/ of this objectt in the object_mapt map.

This class itself just stores additional information about that reference: how far into the object does the pointer reference point, if there's an offset. Alternately, if the offset is not known, due to nondeterminism or otherwise, then this records that the offset can't be determined statically and must be evaluated at solver time.

Constructor & Destructor Documentation

◆ objectt() [1/3]

value_sett::objectt::objectt ( )
inline

◆ objectt() [2/3]

value_sett::objectt::objectt ( bool offset_set,
unsigned int operand )
inline

◆ objectt() [3/3]

value_sett::objectt::objectt ( bool offset_set,
const BigInt & _offset )
inlineexplicit

Member Function Documentation

◆ offset_is_zero()

bool value_sett::objectt::offset_is_zero ( ) const
inline

◆ operator!=()

bool value_sett::objectt::operator!= ( const objectt & o) const
inline

◆ operator==()

bool value_sett::objectt::operator== ( const objectt & o) const
inline

Member Data Documentation

◆ offset

BigInt value_sett::objectt::offset

Record of the explicit offset into the object.

Only valid when offset_is_set is true.

◆ offset_alignment

unsigned int value_sett::objectt::offset_alignment

Least alignment of the offset.

When offset_is_set is false, we state what we think the alignment of this pointer is. This becomes massively useful if we point at an array, but can know that the pointer is aligned to the array element edges. Units are bytes. Zero means N/A.

◆ offset_is_set

bool value_sett::objectt::offset_is_set

Whether or not the offset field of this objectt is valid; if this is true, then the reference has a fixed offset into the object, the value of which is in the offset field.

If not, then the offset isn't statically known, and must be handled at solver time.


The documentation for this class was generated from the following file: