CBMC
can_forward_propagatet Class Reference

Determine whether an expression is constant. More...

#include <expr_util.h>

+ Inheritance diagram for can_forward_propagatet:
+ Collaboration diagram for can_forward_propagatet:

Public Member Functions

 can_forward_propagatet (const namespacet &ns)
 
bool operator() (const exprt &e) const
 returns true iff the expression can be considered constant More...
 

Protected Member Functions

virtual bool is_constant (const exprt &) const
 This function determines what expressions are to be propagated as "constants". More...
 
virtual bool is_constant_address_of (const exprt &) const
 this function determines which reference-typed expressions are constant More...
 

Protected Attributes

const namespacetns
 

Detailed Description

Determine whether an expression is constant.

A literal constant is constant, but so are, e.g., sums over constants or addresses of objects. An implementation may derive from this class to refine what it considers constant in a particular context by overriding is_constant and/or is_constant_address_of.

Definition at line 88 of file expr_util.h.

Constructor & Destructor Documentation

◆ can_forward_propagatet()

can_forward_propagatet::can_forward_propagatet ( const namespacet ns)
inlineexplicit

Definition at line 91 of file expr_util.h.

Member Function Documentation

◆ is_constant()

bool can_forward_propagatet::is_constant ( const exprt expr) const
protectedvirtual

This function determines what expressions are to be propagated as "constants".

Reimplemented in goto_symex_can_forward_propagatet, havoc_utils_can_forward_propagatet, and constant_propagator_can_forward_propagatet.

Definition at line 229 of file expr_util.cpp.

◆ is_constant_address_of()

bool can_forward_propagatet::is_constant_address_of ( const exprt expr) const
protectedvirtual

this function determines which reference-typed expressions are constant

Definition at line 309 of file expr_util.cpp.

◆ operator()()

bool can_forward_propagatet::operator() ( const exprt e) const
inline

returns true iff the expression can be considered constant

Definition at line 96 of file expr_util.h.

Member Data Documentation

◆ ns

const namespacet& can_forward_propagatet::ns
protected

Definition at line 102 of file expr_util.h.


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