PandA-2024.02
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
SigmaOpNode Class Reference

Specific type of UnaryOp used to represent sigma functions. More...

Inheritance diagram for SigmaOpNode:
Inheritance graph
[legend]
Collaboration diagram for SigmaOpNode:
Collaboration graph
[legend]

Public Member Functions

 SigmaOpNode (const ValueRangeRef &intersect, VarNode *sink, const tree_nodeConstRef &inst, VarNode *source, VarNode *SymbolicSource, kind opcode)
 
 ~SigmaOpNode () override=default
 
 SigmaOpNode (const SigmaOpNode &)=delete
 
 SigmaOpNode (SigmaOpNode &&)=delete
 
SigmaOpNodeoperator= (const SigmaOpNode &)=delete
 
SigmaOpNodeoperator= (SigmaOpNode &&)=delete
 
OperationId getValueId () const override
 
std::vector< tree_nodeConstRefgetSources () const override
 
bool isUnresolved () const
 
void markResolved ()
 
void markUnresolved ()
 
void print (std::ostream &OS) const override
 Prints the content of the operation. More...
 
void printDot (std::ostream &OS) const override
 
- Public Member Functions inherited from UnaryOpNode
 UnaryOpNode (const ValueRangeRef &intersect, VarNode *sink, const tree_nodeConstRef &inst, VarNode *source, kind opcode)
 
 ~UnaryOpNode () override=default
 
 UnaryOpNode (const UnaryOpNode &)=delete
 
 UnaryOpNode (UnaryOpNode &&)=delete
 
UnaryOpNodeoperator= (const UnaryOpNode &)=delete
 
UnaryOpNodeoperator= (UnaryOpNode &&)=delete
 
kind getOpcode () const
 Return the opcode of the operation. More...
 
VarNodegetSource () const
 Returns the source of the operation. More...
 
- Public Member Functions inherited from OpNode
virtual ~OpNode ()=default
 The dtor. It's virtual because this is a base class. More...
 
 OpNode (const OpNode &)=delete
 
 OpNode (OpNode &&)=delete
 
OpNodeoperator= (const OpNode &)=delete
 
OpNodeoperator= (OpNode &&)=delete
 
const tree_nodeConstRefgetInstruction () const
 Return the instruction that originated this op node. More...
 
void solveFuture (VarNode *future)
 Replace symbolic intervals with hard-wired constants. More...
 
ValueRangeConstRef getIntersect () const
 Returns the range of the operation. More...
 
void setIntersect (const RangeConstRef &newIntersect)
 Changes the interval of the operation. More...
 
VarNodegetSink () const
 Returns the target of the operation, that is, where the result will be stored. More...
 
std::string ToString () const
 

Static Public Member Functions

static bool classof (SigmaOpNode const *)
 
static bool classof (UnaryOpNode const *UO)
 
static bool classof (OpNode const *BO)
 
static std::function< OpNode *(NodeContainer *)> opCtorGenerator (const tree_nodeConstRef &stmt, unsigned int, const FunctionBehaviorConstRef &FB, const tree_managerConstRef &TM, const application_managerRef &AppM)
 
- Static Public Member Functions inherited from UnaryOpNode
static bool classof (UnaryOpNode const *)
 
static bool classof (OpNode const *BO)
 
static std::function< OpNode *(NodeContainer *)> opCtorGenerator (const tree_nodeConstRef &stmt, unsigned int, const FunctionBehaviorConstRef &FB, const tree_managerConstRef &TM, const application_managerRef &AppM)
 
- Static Public Member Functions inherited from OpNode
static bool classof (OpNode const *)
 

Private Member Functions

RangeRef eval () const override
 Computes the interval of the sink based on the interval of the sources, the operation and the interval associated to the operation. More...
 

Private Attributes

VarNodeSymbolicSource
 
bool unresolved
 

Additional Inherited Members

- Public Types inherited from OpNode
enum  OperationId {
  OperationId::UnaryOpId, OperationId::SigmaOpId, OperationId::BinaryOpId, OperationId::TernaryOpId,
  OperationId::PhiOpId, OperationId::ControlDepId, OperationId::LoadOpId, OperationId::StoreOpId
}
 
- Data Fields inherited from OpNode
enum OpNode::OperationId __attribute__
 
- Static Public Attributes inherited from OpNode
static int debug_level = DEBUG_LEVEL_NONE
 
- Protected Member Functions inherited from OpNode
 OpNode (const ValueRangeRef &intersect, VarNode *sink, const tree_nodeConstRef &inst)
 We do not want people creating objects of this class, but we want to inherit from it. More...
 

Detailed Description

Specific type of UnaryOp used to represent sigma functions.

Definition at line 2866 of file Range_Analysis.cpp.

Constructor & Destructor Documentation

◆ SigmaOpNode() [1/3]

SigmaOpNode::SigmaOpNode ( const ValueRangeRef &  intersect,
VarNode sink,
const tree_nodeConstRef inst,
VarNode source,
VarNode SymbolicSource,
kind  opcode 
)

Definition at line 2936 of file Range_Analysis.cpp.

Referenced by opCtorGenerator().

Here is the caller graph for this function:

◆ ~SigmaOpNode()

SigmaOpNode::~SigmaOpNode ( )
overridedefault

◆ SigmaOpNode() [2/3]

SigmaOpNode::SigmaOpNode ( const SigmaOpNode )
delete

◆ SigmaOpNode() [3/3]

SigmaOpNode::SigmaOpNode ( SigmaOpNode &&  )
delete

Member Function Documentation

◆ classof() [1/3]

static bool SigmaOpNode::classof ( SigmaOpNode const *  )
inlinestatic

Definition at line 2892 of file Range_Analysis.cpp.

◆ classof() [2/3]

static bool SigmaOpNode::classof ( UnaryOpNode const *  UO)
inlinestatic

Definition at line 2896 of file Range_Analysis.cpp.

References UnaryOpNode::getValueId(), and OpNode::SigmaOpId.

Here is the call graph for this function:

◆ classof() [3/3]

static bool SigmaOpNode::classof ( OpNode const *  BO)
inlinestatic

Definition at line 2900 of file Range_Analysis.cpp.

References OpNode::getValueId(), and OpNode::SigmaOpId.

Here is the call graph for this function:

◆ eval()

RangeRef SigmaOpNode::eval ( ) const
overrideprivatevirtual

Computes the interval of the sink based on the interval of the sources, the operation and the interval associated to the operation.

Reimplemented from UnaryOpNode.

Definition at line 2944 of file Range_Analysis.cpp.

References OpNode::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, OpNode::getIntersect(), VarNode::getRange(), UnaryOpNode::getSource(), INDENT_DBG_MEX, result, and OpNode::ToString().

Here is the call graph for this function:

◆ getSources()

std::vector<tree_nodeConstRef> SigmaOpNode::getSources ( ) const
inlineoverridevirtual

Reimplemented from UnaryOpNode.

Definition at line 2904 of file Range_Analysis.cpp.

References UnaryOpNode::getSources(), and VarNode::getValue().

Here is the call graph for this function:

◆ getValueId()

OperationId SigmaOpNode::getValueId ( ) const
inlineoverridevirtual

Reimplemented from UnaryOpNode.

Definition at line 2888 of file Range_Analysis.cpp.

References OpNode::SigmaOpId.

◆ isUnresolved()

bool SigmaOpNode::isUnresolved ( ) const
inline

Definition at line 2914 of file Range_Analysis.cpp.

◆ markResolved()

void SigmaOpNode::markResolved ( )
inline

Definition at line 2918 of file Range_Analysis.cpp.

◆ markUnresolved()

void SigmaOpNode::markUnresolved ( )
inline

Definition at line 2922 of file Range_Analysis.cpp.

References UnaryOpNode::opCtorGenerator(), UnaryOpNode::print(), and UnaryOpNode::printDot().

Here is the call graph for this function:

◆ opCtorGenerator()

std::function< OpNode *(NodeContainer *)> SigmaOpNode::opCtorGenerator ( const tree_nodeConstRef stmt,
unsigned int  function_id,
const FunctionBehaviorConstRef FB,
const tree_managerConstRef TM,
const application_managerRef AppM 
)
static

Definition at line 2976 of file Range_Analysis.cpp.

References DEBUG_LEVEL_VERY_PEDANTIC, GET_CONST_NODE, INDENT_DBG_MEX, phi, SigmaOpNode(), OpNode::sink, and UnaryOpNode::source.

Referenced by BinaryOpNode::getSources(), and LoadOpNode::printDot().

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

SigmaOpNode& SigmaOpNode::operator= ( SigmaOpNode &&  )
delete

◆ print()

void SigmaOpNode::print ( std::ostream &  OS) const
overridevirtual

Prints the content of the operation.

Reimplemented from UnaryOpNode.

Definition at line 3025 of file Range_Analysis.cpp.

References GET_CONST_NODE, OpNode::getSink(), and UnaryOpNode::getSource().

Referenced by BinaryOpNode::getSources().

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

◆ printDot()

void SigmaOpNode::printDot ( std::ostream &  OS) const
overridevirtual

Reimplemented from UnaryOpNode.

Definition at line 3031 of file Range_Analysis.cpp.

References GET_CONST_NODE, tree_helper::GetConstValue(), OpNode::getIntersect(), OpNode::getSink(), UnaryOpNode::getSource(), VarNode::getValue(), and SymbolicSource.

Referenced by BinaryOpNode::getSources().

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

Field Documentation

◆ SymbolicSource

VarNode* SigmaOpNode::SymbolicSource
private

Definition at line 2874 of file Range_Analysis.cpp.

Referenced by printDot().

◆ unresolved

bool SigmaOpNode::unresolved
private

Definition at line 2876 of file Range_Analysis.cpp.


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

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