CBMC
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
interval_domaint Class Reference

#include <interval_domain.h>

+ Inheritance diagram for interval_domaint:
+ Collaboration diagram for interval_domaint:

Public Member Functions

 
  how function calls are treated: a) there is an edge from each call site to the function head b) there is an edge from the last instruction (END_FUNCTION) of the function to the instruction following the call site (this also needs to set the LHS, if applicable)
 
void  output (std::ostream &out, const ai_baset &ai, const namespacet &ns) const override
 
 
  no states
 
void  make_top () final override
  all states – the analysis doesn't use this directly (see make_entry) and domains may refuse to implement it.
 
 
 
 
 
  Uses the abstract state to simplify a given expression using context- specific information.
 
- Public Member Functions inherited from ai_domain_baset
 
 
 
  Make this domain a reasonable entry-point state For most domains top is sufficient.
 
  Simplifies the expression but keeps it as an l-value.
 
  Gives a Boolean condition that is true for all values represented by the domain.
 

Static Public Member Functions

 
 

Protected Types

 
 

Protected Member Functions

  Sets *this to the mathematical join between the two domains.
 
 
void  assume_rec (const exprt &, bool negation=false)
 
 
void  assign (const exprt &lhs, const exprt &rhs)
 
 
 
- Protected Member Functions inherited from ai_domain_baset
  The constructor is expected to produce 'false' or 'bottom' A default constructor is not part of the domain interface.
 
  A copy constructor is part of the domain interface.
 

Protected Attributes

 
 
 

Additional Inherited Members

- Public Types inherited from ai_domain_baset
 
 

Detailed Description

Definition at line 23 of file interval_domain.h.

Member Typedef Documentation

◆  float_mapt

Definition at line 110 of file interval_domain.h.

◆  int_mapt

Definition at line 109 of file interval_domain.h.

Constructor & Destructor Documentation

◆  interval_domaint()

interval_domaint::interval_domaint ( )
inline

Definition at line 30 of file interval_domain.h.

Member Function Documentation

◆  ai_simplify()

bool interval_domaint::ai_simplify ( exprtcondition,
const namespacetns 
) const
overridevirtual

Uses the abstract state to simplify a given expression using context- specific information.

parameters: The expression to simplify.
Returns
A simplified version of the expression.

Reimplemented from ai_domain_baset.

Definition at line 488 of file interval_domain.cpp.

◆  assign()

void interval_domaint::assign ( const exprtlhs,
const exprtrhs 
)
protected

Definition at line 211 of file interval_domain.cpp.

◆  assume()

void interval_domaint::assume ( const exprtcond,
const namespacetns 
)

Definition at line 351 of file interval_domain.cpp.

◆  assume_rec() [1/2]

void interval_domaint::assume_rec ( const exprtcond,
bool  negation = false  
)
protected

Definition at line 358 of file interval_domain.cpp.

◆  assume_rec() [2/2]

void interval_domaint::assume_rec ( const exprtlhs,
irep_idt  id,
const exprtrhs 
)
protected

Definition at line 239 of file interval_domain.cpp.

◆  get_float_rec()

ieee_float_intervalt interval_domaint::get_float_rec ( const exprt &  )
protected

◆  get_int_rec()

integer_intervalt interval_domaint::get_int_rec ( const exprt &  )
protected

◆  havoc_rec()

void interval_domaint::havoc_rec ( const exprtlhs )
protected

Definition at line 217 of file interval_domain.cpp.

◆  is_bottom()

bool interval_domaint::is_bottom ( ) const
inlinefinaloverridevirtual

Implements ai_domain_baset.

Definition at line 72 of file interval_domain.h.

◆  is_float()

static bool interval_domaint::is_float ( const typetsrc )
inlinestatic

Definition at line 97 of file interval_domain.h.

◆  is_int()

static bool interval_domaint::is_int ( const typetsrc )
inlinestatic

Definition at line 92 of file interval_domain.h.

◆  is_top()

bool interval_domaint::is_top ( ) const
inlinefinaloverridevirtual

Implements ai_domain_baset.

Definition at line 83 of file interval_domain.h.

◆  join()

bool interval_domaint::join ( const interval_domaintb )
protected

Sets *this to the mathematical join between the two domains.

This can be thought of as an abstract version of union; *this is increased so that it contains all of the values that are represented by b as well as its original intervals. The result is an overapproximation, for example: "[0,1]".join("[3,4]") --> "[0,4]" includes 2 which isn't in [0,1] or [3,4].

 Join is used in several places, the most significant being
 merge, which uses it to bring together two different paths
 of analysis.
parameters: The interval domain, b, to join to this domain.
Returns
True if the join increases the set represented by *this, False if there is no change.

Definition at line 153 of file interval_domain.cpp.

◆  make_bottom()

void interval_domaint::make_bottom ( )
inlinefinaloverridevirtual

no states

Implements ai_domain_baset.

Definition at line 57 of file interval_domain.h.

◆  make_expression()

exprt interval_domaint::make_expression ( const symbol_exprtsrc ) const

Definition at line 408 of file interval_domain.cpp.

◆  make_top()

void interval_domaint::make_top ( )
inlinefinaloverridevirtual

all states – the analysis doesn't use this directly (see make_entry) and domains may refuse to implement it.

Implements ai_domain_baset.

Definition at line 65 of file interval_domain.h.

◆  merge()

bool interval_domaint::merge ( const interval_domaintb,
trace_ptrt   
)
inline

Definition at line 51 of file interval_domain.h.

◆  output()

void interval_domaint::output ( std::ostream &  out,
const ai_basetai,
const namespacetns 
) const
overridevirtual

Reimplemented from ai_domain_baset.

Definition at line 23 of file interval_domain.cpp.

◆  transform()

void interval_domaint::transform ( const irep_idtfunction_from,
trace_ptrt  from,
const irep_idtfunction_to,
trace_ptrt  to,
ai_basetai,
const namespacetns 
)
finaloverridevirtual

how function calls are treated: a) there is an edge from each call site to the function head b) there is an edge from the last instruction (END_FUNCTION) of the function to the instruction following the call site (this also needs to set the LHS, if applicable)

in some cases, function calls are skipped, in which case: c) there is an edge from the call instruction to the instruction after

"this" is the domain before the instruction "from" "from" is the instruction to be interpreted "to" is the next instruction (for GOTO, FUNCTION_CALL, END_FUNCTION)

PRECONDITION(from.is_dereferenceable(), "Must not be _::end()") PRECONDITION(to.is_dereferenceable(), "Must not be _::end()") PRECONDITION(are_comparable(from,to) || (from->is_function_call() || from->is_end_function())

The history aware version is used by the abstract interpreter for backwards compatability it calls the older signature

Implements ai_domain_baset.

Definition at line 59 of file interval_domain.cpp.

Member Data Documentation

◆  bottom

bool interval_domaint::bottom
protected

Definition at line 107 of file interval_domain.h.

◆  float_map

float_mapt interval_domaint::float_map
protected

Definition at line 113 of file interval_domain.h.

◆  int_map

int_mapt interval_domaint::int_map
protected

Definition at line 112 of file interval_domain.h.


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

AltStyle によって変換されたページ (->オリジナル) /