PandA-2024.02
Public Member Functions | Private Attributes
VarNode Class Reference
Collaboration diagram for VarNode:
Collaboration graph
[legend]

Public Member Functions

 VarNode (const tree_nodeConstRef &_V, unsigned int _function_id)
 The ctor. More...
 
 ~VarNode ()=default
 
 VarNode (const VarNode &)=delete
 
 VarNode (VarNode &&)=delete
 
VarNodeoperator= (const VarNode &)=delete
 
VarNodeoperator= (VarNode &&)=delete
 
void init (bool outside)
 Initializes the value of the node. More...
 
RangeConstRef getRange () const
 Returns the range of the variable represented by this node. More...
 
const tree_nodeConstRefgetValue () const
 Returns the variable represented by this node. More...
 
unsigned int getFunctionId () const
 
bw_t getBitWidth () const
 
void setRange (const RangeConstRef &newInterval)
 Changes the status of the variable represented by this node. More...
 
RangeRef getMaxRange () const
 
char getAbstractState ()
 
void storeAbstractState ()
 
int updateIR (const tree_managerRef &TM, int debug_level, application_managerRef AppM)
 
void print (std::ostream &OS) const
 Pretty print. More...
 
std::string ToString () const
 

Private Attributes

const tree_nodeConstRef V
 The program variable. More...
 
unsigned int function_id
 ID of the associated function. More...
 
RangeConstRef interval
 A Range associated to the variable, that is, its interval inferred by the analysis. More...
 
char abstractState
 Used by the crop meet operator. More...
 

Detailed Description

Definition at line 1184 of file Range_Analysis.cpp.

Constructor & Destructor Documentation

◆ VarNode() [1/3]

VarNode::VarNode ( const tree_nodeConstRef _V,
unsigned int  _function_id 
)
explicit

The ctor.

Definition at line 1252 of file Range_Analysis.cpp.

References interval, THROW_ASSERT, and Unknown.

◆ ~VarNode()

VarNode::~VarNode ( )
default

◆ VarNode() [2/3]

VarNode::VarNode ( const VarNode )
delete

◆ VarNode() [3/3]

VarNode::VarNode ( VarNode &&  )
delete

Member Function Documentation

◆ getAbstractState()

char VarNode::getAbstractState ( )
inline

Definition at line 1237 of file Range_Analysis.cpp.

References print(), and ToString().

Referenced by Meet::crop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBitWidth()

bw_t VarNode::getBitWidth ( ) const
inline

Definition at line 1221 of file Range_Analysis.cpp.

Referenced by UnaryOpNode::eval(), BinaryOpNode::eval(), UnaryOpNode::printDot(), and TernaryOpNode::TernaryOpNode().

Here is the caller graph for this function:

◆ getFunctionId()

unsigned int VarNode::getFunctionId ( ) const
inline

Definition at line 1217 of file Range_Analysis.cpp.

◆ getMaxRange()

RangeRef VarNode::getMaxRange ( ) const
inline

Definition at line 1232 of file Range_Analysis.cpp.

References Regular.

◆ getRange()

RangeConstRef VarNode::getRange ( ) const
inline

Returns the range of the variable represented by this node.

Definition at line 1208 of file Range_Analysis.cpp.

Referenced by Meet::crop(), UnaryOpNode::eval(), SigmaOpNode::eval(), BinaryOpNode::eval(), TernaryOpNode::eval(), Meet::fixed(), Meet::growth(), Meet::narrow(), print(), SymbRange::solveFuture(), and Meet::widen().

Here is the caller graph for this function:

◆ getValue()

const tree_nodeConstRef& VarNode::getValue ( ) const
inline

◆ init()

void VarNode::init ( bool  outside)

Initializes the value of the node.

Definition at line 1261 of file Range_Analysis.cpp.

References GET_CONST_NODE, interval, Regular, THROW_ASSERT, and Unknown.

◆ operator=() [1/2]

VarNode& VarNode::operator= ( const VarNode )
delete

◆ operator=() [2/2]

VarNode& VarNode::operator= ( VarNode &&  )
delete

◆ print()

void VarNode::print ( std::ostream &  OS) const

Pretty print.

Definition at line 1467 of file Range_Analysis.cpp.

References GET_CONST_NODE, tree_helper::GetConstValue(), and getRange().

Referenced by operator<<(), ValueRange::setRange(), and ToString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRange()

void VarNode::setRange ( const RangeConstRef &  newInterval)
inline

Changes the status of the variable represented by this node.

Definition at line 1227 of file Range_Analysis.cpp.

Referenced by Meet::crop(), Meet::fixed(), Meet::growth(), Meet::narrow(), and Meet::widen().

Here is the caller graph for this function:

◆ storeAbstractState()

void VarNode::storeAbstractState ( )

Definition at line 1488 of file Range_Analysis.cpp.

References abstractState, interval, Range::Max, Range::Min, and THROW_ASSERT.

◆ ToString()

std::string VarNode::ToString ( ) const

Definition at line 1481 of file Range_Analysis.cpp.

References print().

Referenced by ValueRange::setRange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateIR()

int VarNode::updateIR ( const tree_managerRef TM,
int  debug_level,
application_managerRef  AppM 
)

Field Documentation

◆ abstractState

char VarNode::abstractState
private

Used by the crop meet operator.

Definition at line 1195 of file Range_Analysis.cpp.

Referenced by storeAbstractState().

◆ function_id

unsigned int VarNode::function_id
private

ID of the associated function.

Definition at line 1189 of file Range_Analysis.cpp.

◆ interval

RangeConstRef VarNode::interval
private

A Range associated to the variable, that is, its interval inferred by the analysis.

Definition at line 1192 of file Range_Analysis.cpp.

Referenced by init(), storeAbstractState(), updateIR(), and VarNode().

◆ V

const tree_nodeConstRef VarNode::V
private

The program variable.

Definition at line 1187 of file Range_Analysis.cpp.


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

Generated on Mon Feb 12 2024 13:04:09 for PandA-2024.02 by doxygen 1.8.13