PandA-2024.02
Public Types | Public Member Functions | Data Fields
PointToSolution Struct Reference

This struct specifies a point-to solution. More...

#include <tree_node.hpp>

Public Types

enum  { GETID =(variables) = 0 }
 visitor enum More...
 

Public Member Functions

 PointToSolution ()
 Constructor. More...
 
virtual ~PointToSolution ()
 Destructor. More...
 
void Add (const std::string &variable)
 Add a symbolic variable to this point to set. More...
 
void Add (const tree_nodeRef &variable)
 Add a variable to this point to set. More...
 
bool is_a_singleton () const
 this function check if the point-to set is a singleton or not More...
 
bool is_fully_resolved () const
 this function check if the point-to set resolved w.r.t. More...
 
std::string ToString () const
 Print this point-to solution. More...
 
virtual void visit (tree_node_visitor *const v) const
 virtual function used to traverse the tree_node data structure. More...
 

Data Fields

bool anything
 True if it is not possible to determine where the pointer points to. More...
 
bool escaped
 True if the points to includes the local escaped solution. More...
 
bool ipa_escaped
 True if the points to includes the IPA escaped solution. More...
 
bool nonlocal
 True if the points to includes any global memory. More...
 
bool null
 True if the points to includes nothing. More...
 
std::vector< tree_nodeRefvariables
 Set of variables that this pointer may point to. More...
 

Detailed Description

This struct specifies a point-to solution.

Definition at line 1001 of file tree_node.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

visitor enum

Enumerator
GETID 

Definition at line 1068 of file tree_node.hpp.

Constructor & Destructor Documentation

◆ PointToSolution()

PointToSolution::PointToSolution ( )

Constructor.

Definition at line 499 of file tree_node.cpp.

References ~PointToSolution().

Here is the call graph for this function:

◆ ~PointToSolution()

PointToSolution::~PointToSolution ( )
virtualdefault

Destructor.

Referenced by PointToSolution().

Here is the caller graph for this function:

Member Function Documentation

◆ Add() [1/2]

void PointToSolution::Add ( const std::string &  variable)

Add a symbolic variable to this point to set.

Parameters
variableis the symbolic variable to be added

Definition at line 505 of file tree_node.cpp.

References anything, escaped, ipa_escaped, NODE_NOT_YET_SUPPORTED_EC, nonlocal, null, and THROW_ERROR_CODE.

◆ Add() [2/2]

void PointToSolution::Add ( const tree_nodeRef variable)

Add a variable to this point to set.

Parameters
variableis the variable to be added

Definition at line 533 of file tree_node.cpp.

References variables.

◆ is_a_singleton()

bool PointToSolution::is_a_singleton ( ) const

this function check if the point-to set is a singleton or not

Returns
true in case the point-to is a singleton, false otherwise

Definition at line 538 of file tree_node.cpp.

References anything, escaped, ipa_escaped, nonlocal, and variables.

◆ is_fully_resolved()

bool PointToSolution::is_fully_resolved ( ) const

this function check if the point-to set resolved w.r.t.

standard variables

Returns
true in case the point-to point-to set resolved w.r.t. standard variables, false otherwise

Definition at line 543 of file tree_node.cpp.

References anything, escaped, ipa_escaped, nonlocal, and variables.

◆ ToString()

std::string PointToSolution::ToString ( ) const

Print this point-to solution.

Returns
the string containing the point-to solution

Definition at line 548 of file tree_node.cpp.

References anything, escaped, GET_NODE, ipa_escaped, nonlocal, null, and variables.

◆ visit()

void PointToSolution::visit ( tree_node_visitor *const  v) const
virtual

virtual function used to traverse the tree_node data structure.

Parameters
vis a reference to the tree_node visitor class

Definition at line 578 of file tree_node.cpp.

References ALL_VISIT, SEQ_VISIT_MEMBER, and variables.

Referenced by call_expr::visit().

Here is the caller graph for this function:

Field Documentation

◆ anything

bool PointToSolution::anything

True if it is not possible to determine where the pointer points to.

Definition at line 1004 of file tree_node.hpp.

Referenced by Add(), is_a_singleton(), is_fully_resolved(), ToString(), and raw_writer::write_when_not_null_point_to().

◆ escaped

bool PointToSolution::escaped

True if the points to includes the local escaped solution.

Definition at line 1007 of file tree_node.hpp.

Referenced by Add(), is_a_singleton(), is_fully_resolved(), ToString(), and raw_writer::write_when_not_null_point_to().

◆ ipa_escaped

bool PointToSolution::ipa_escaped

True if the points to includes the IPA escaped solution.

Definition at line 1010 of file tree_node.hpp.

Referenced by Add(), is_a_singleton(), is_fully_resolved(), ToString(), and raw_writer::write_when_not_null_point_to().

◆ nonlocal

bool PointToSolution::nonlocal

True if the points to includes any global memory.

Definition at line 1013 of file tree_node.hpp.

Referenced by Add(), is_a_singleton(), is_fully_resolved(), ToString(), and raw_writer::write_when_not_null_point_to().

◆ null

bool PointToSolution::null

True if the points to includes nothing.

Definition at line 1016 of file tree_node.hpp.

Referenced by Add(), ToString(), and raw_writer::write_when_not_null_point_to().

◆ variables

std::vector<tree_nodeRef> PointToSolution::variables

Set of variables that this pointer may point to.

Definition at line 1019 of file tree_node.hpp.

Referenced by Add(), is_a_singleton(), is_fully_resolved(), ToString(), visit(), and raw_writer::write_when_not_null_point_to().


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

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