cprover
custom_bitvector_domaint Class Reference

#include <custom_bitvector_analysis.h>

Inheritance diagram for custom_bitvector_domaint:
[legend]
Collaboration diagram for custom_bitvector_domaint:
[legend]

Classes

struct  vectorst
 

Public Types

typedef unsigned long long bit_vectort
 
typedef std::map< irep_idt, bit_vectortbitst
 
- Public Types inherited from ai_domain_baset
typedef goto_programt::const_targett locationt
 

Public Member Functions

void transform (locationt from, locationt to, ai_baset &ai, const namespacet &ns) final
 
void output (std::ostream &out, const ai_baset &ai, const namespacet &ns) const final
 
void make_bottom () final
 
void make_top () final
 
void make_entry () final
 
bool merge (const custom_bitvector_domaint &b, locationt from, locationt to)
 
void assign_lhs (const exprt &, const vectorst &)
 
void assign_lhs (const irep_idt &, const vectorst &)
 
vectorst get_rhs (const exprt &) const
 
vectorst get_rhs (const irep_idt &) const
 
 custom_bitvector_domaint ()
 
exprt eval (const exprt &src, custom_bitvector_analysist &) const
 
- Public Member Functions inherited from ai_domain_baset
 ai_domain_baset ()
 
virtual ~ai_domain_baset ()
 
virtual void transform (locationt from, locationt to, ai_baset &ai, const namespacet &ns)=0
 
virtual jsont output_json (const ai_baset &ai, const namespacet &ns) const
 
virtual xmlt output_xml (const ai_baset &ai, const namespacet &ns) const
 
virtual bool ai_simplify (exprt &condition, const namespacet &ns) const
 
virtual bool ai_simplify_lhs (exprt &condition, const namespacet &ns) const
 Use the information in the domain to simplify the expression on the LHS of an assignment. More...
 

Static Public Member Functions

static vectorst merge (const vectorst &a, const vectorst &b)
 
static bool has_get_must_or_may (const exprt &)
 

Public Attributes

bitst may_bits
 
bitst must_bits
 
tvt has_values
 

Private Types

enum  modet { modet::SET_MUST, modet::CLEAR_MUST, modet::SET_MAY, modet::CLEAR_MAY }
 

Private Member Functions

void set_bit (const exprt &, unsigned bit_nr, modet)
 
void set_bit (const irep_idt &, unsigned bit_nr, modet)
 
void erase_blank_vectors (bitst &)
 erase blank bitvectors More...
 

Static Private Member Functions

static void set_bit (bit_vectort &dest, unsigned bit_nr)
 
static void clear_bit (bit_vectort &dest, unsigned bit_nr)
 
static bool get_bit (const bit_vectort src, unsigned bit_nr)
 
static irep_idt object2id (const exprt &)
 

Detailed Description

Definition at line 23 of file custom_bitvector_analysis.h.

Member Typedef Documentation

§ bit_vectort

typedef unsigned long long custom_bitvector_domaint::bit_vectort

Definition at line 61 of file custom_bitvector_analysis.h.

§ bitst

Definition at line 63 of file custom_bitvector_analysis.h.

Member Enumeration Documentation

§ modet

enum custom_bitvector_domaint::modet
strongprivate
Enumerator
SET_MUST 
CLEAR_MUST 
SET_MAY 
CLEAR_MAY 

Definition at line 100 of file custom_bitvector_analysis.h.

Constructor & Destructor Documentation

§ custom_bitvector_domaint()

custom_bitvector_domaint::custom_bitvector_domaint ( )
inline

Definition at line 90 of file custom_bitvector_analysis.h.

References eval(), and has_get_must_or_may().

Member Function Documentation

§ assign_lhs() [1/2]

void custom_bitvector_domaint::assign_lhs ( const exprt lhs,
const vectorst vectors 
)

Definition at line 87 of file custom_bitvector_analysis.cpp.

References object2id().

Referenced by transform().

§ assign_lhs() [2/2]

void custom_bitvector_domaint::assign_lhs ( const irep_idt identifier,
const vectorst vectors 
)

§ clear_bit()

static void custom_bitvector_domaint::clear_bit ( bit_vectort dest,
unsigned  bit_nr 
)
inlinestaticprivate

Definition at line 110 of file custom_bitvector_analysis.h.

Referenced by set_bit(), and transform().

§ erase_blank_vectors()

void custom_bitvector_domaint::erase_blank_vectors ( bitst bits)
private

erase blank bitvectors

Definition at line 592 of file custom_bitvector_analysis.cpp.

Referenced by get_bit(), merge(), and transform().

§ eval()

§ get_bit()

static bool custom_bitvector_domaint::get_bit ( const bit_vectort  src,
unsigned  bit_nr 
)
inlinestaticprivate

Definition at line 116 of file custom_bitvector_analysis.h.

References erase_blank_vectors(), and object2id().

Referenced by eval().

§ get_rhs() [1/2]

custom_bitvector_domaint::vectorst custom_bitvector_domaint::get_rhs ( const exprt rhs) const

Definition at line 130 of file custom_bitvector_analysis.cpp.

References irept::id(), merge(), object2id(), to_if_expr(), and to_typecast_expr().

Referenced by eval(), and transform().

§ get_rhs() [2/2]

custom_bitvector_domaint::vectorst custom_bitvector_domaint::get_rhs ( const irep_idt identifier) const

§ has_get_must_or_may()

bool custom_bitvector_domaint::has_get_must_or_may ( const exprt src)
static

§ make_bottom()

void custom_bitvector_domaint::make_bottom ( )
inlinefinalvirtual

Implements ai_domain_baset.

Definition at line 37 of file custom_bitvector_analysis.h.

References has_values, may_bits, and must_bits.

Referenced by transform().

§ make_entry()

void custom_bitvector_domaint::make_entry ( )
inlinefinalvirtual

Implements ai_domain_baset.

Definition at line 51 of file custom_bitvector_analysis.h.

References make_top(), and merge().

§ make_top()

void custom_bitvector_domaint::make_top ( )
inlinefinalvirtual

Implements ai_domain_baset.

Definition at line 44 of file custom_bitvector_analysis.h.

References has_values, may_bits, and must_bits.

Referenced by make_entry().

§ merge() [1/2]

bool custom_bitvector_domaint::merge ( const custom_bitvector_domaint b,
locationt  from,
locationt  to 
)

§ merge() [2/2]

static vectorst custom_bitvector_domaint::merge ( const vectorst a,
const vectorst b 
)
inlinestatic

§ object2id()

§ output()

void custom_bitvector_domaint::output ( std::ostream &  out,
const ai_baset ai,
const namespacet ns 
) const
finalvirtual

§ set_bit() [1/3]

void custom_bitvector_domaint::set_bit ( const exprt lhs,
unsigned  bit_nr,
modet  mode 
)
private

Definition at line 44 of file custom_bitvector_analysis.cpp.

References object2id().

Referenced by set_bit(), and transform().

§ set_bit() [2/3]

void custom_bitvector_domaint::set_bit ( const irep_idt identifier,
unsigned  bit_nr,
modet  mode 
)
private

§ set_bit() [3/3]

static void custom_bitvector_domaint::set_bit ( bit_vectort dest,
unsigned  bit_nr 
)
inlinestaticprivate

Definition at line 105 of file custom_bitvector_analysis.h.

§ transform()

Member Data Documentation

§ has_values

tvt custom_bitvector_domaint::has_values

Definition at line 88 of file custom_bitvector_analysis.h.

Referenced by make_bottom(), make_top(), merge(), and output().

§ may_bits

bitst custom_bitvector_domaint::may_bits

§ must_bits

bitst custom_bitvector_domaint::must_bits

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