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

Public Member Functions

 TernaryOpNode (const ValueRangeRef &intersect, VarNode *sink, const tree_nodeConstRef &inst, VarNode *source1, VarNode *source2, VarNode *source3, kind opcode)
 
 ~TernaryOpNode () override=default
 
 TernaryOpNode (const TernaryOpNode &)=delete
 
 TernaryOpNode (TernaryOpNode &&)=delete
 
TernaryOpNodeoperator= (const TernaryOpNode &)=delete
 
TernaryOpNodeoperator= (TernaryOpNode &&)=delete
 
OperationId getValueId () const override
 
kind getOpcode () const
 Return the opcode of the operation. More...
 
VarNodegetSource1 () const
 Returns the first operand of this operation. More...
 
VarNodegetSource2 () const
 Returns the second operand of this operation. More...
 
VarNodegetSource3 () const
 Returns the third operand of this operation. More...
 
std::vector< tree_nodeConstRefgetSources () const override
 
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 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 (TernaryOpNode const *)
 
static bool classof (OpNode const *BO)
 
static std::function< OpNode *(NodeContainer *)> opCtorGenerator (const tree_nodeConstRef &, unsigned int, const FunctionBehaviorConstRef &, const tree_managerConstRef &, const application_managerRef &)
 
- 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

VarNodesource1
 
VarNodesource2
 
VarNodesource3
 
kind opcode
 

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

Definition at line 3571 of file Range_Analysis.cpp.

Constructor & Destructor Documentation

◆ TernaryOpNode() [1/3]

TernaryOpNode::TernaryOpNode ( const ValueRangeRef &  intersect,
VarNode sink,
const tree_nodeConstRef inst,
VarNode source1,
VarNode source2,
VarNode source3,
kind  opcode 
)

Definition at line 3644 of file Range_Analysis.cpp.

References GET_CONST_NODE, VarNode::getBitWidth(), STR, THROW_ASSERT, and OpNode::ToString().

Referenced by opCtorGenerator().

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

◆ ~TernaryOpNode()

TernaryOpNode::~TernaryOpNode ( )
overridedefault

◆ TernaryOpNode() [2/3]

TernaryOpNode::TernaryOpNode ( const TernaryOpNode )
delete

◆ TernaryOpNode() [3/3]

TernaryOpNode::TernaryOpNode ( TernaryOpNode &&  )
delete

Member Function Documentation

◆ classof() [1/2]

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

Definition at line 3600 of file Range_Analysis.cpp.

◆ classof() [2/2]

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

Definition at line 3604 of file Range_Analysis.cpp.

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

Here is the call graph for this function:

◆ eval()

RangeRef TernaryOpNode::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.

Implements OpNode.

Definition at line 3662 of file Range_Analysis.cpp.

References branchOpRecurse(), OpNode::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, Empty, GET_CONST_NODE, GET_INDEX_CONST_NODE, OpNode::getInstruction(), OpNode::getIntersect(), getOpcode(), VarNode::getRange(), OpNode::getSink(), getSource1(), getSource2(), getSource3(), INDENT_DBG_MEX, isCompare(), Range::makeSatisfyingCmpRegion(), Regular, result, test(), THROW_ASSERT, and OpNode::ToString().

Here is the call graph for this function:

◆ getOpcode()

kind TernaryOpNode::getOpcode ( ) const
inline

Return the opcode of the operation.

Definition at line 3610 of file Range_Analysis.cpp.

References BinaryOpNode::opcode.

Referenced by eval(), and printDot().

Here is the caller graph for this function:

◆ getSource1()

VarNode* TernaryOpNode::getSource1 ( ) const
inline

Returns the first operand of this operation.

Definition at line 3615 of file Range_Analysis.cpp.

References BinaryOpNode::source1.

Referenced by eval(), print(), and printDot().

Here is the caller graph for this function:

◆ getSource2()

VarNode* TernaryOpNode::getSource2 ( ) const
inline

Returns the second operand of this operation.

Definition at line 3620 of file Range_Analysis.cpp.

References BinaryOpNode::source2.

Referenced by eval(), print(), and printDot().

Here is the caller graph for this function:

◆ getSource3()

VarNode* TernaryOpNode::getSource3 ( ) const
inline

Returns the third operand of this operation.

Definition at line 3625 of file Range_Analysis.cpp.

Referenced by eval(), print(), and printDot().

Here is the caller graph for this function:

◆ getSources()

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

Implements OpNode.

Definition at line 3629 of file Range_Analysis.cpp.

References VarNode::getValue(), BinaryOpNode::opCtorGenerator(), BinaryOpNode::print(), and BinaryOpNode::printDot().

Here is the call graph for this function:

◆ getValueId()

OperationId TernaryOpNode::getValueId ( ) const
inlineoverridevirtual

Implements OpNode.

Definition at line 3596 of file Range_Analysis.cpp.

References OpNode::TernaryOpId.

◆ opCtorGenerator()

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

Definition at line 3783 of file Range_Analysis.cpp.

References DEBUG_LEVEL_VERY_PEDANTIC, GET_CONST_NODE, INDENT_DBG_MEX, OpNode::sink, and TernaryOpNode().

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

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

TernaryOpNode& TernaryOpNode::operator= ( TernaryOpNode &&  )
delete

◆ print()

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

Prints the content of the operation.

Implements OpNode.

Definition at line 3815 of file Range_Analysis.cpp.

References GET_CONST_NODE, OpNode::getSink(), getSource1(), getSource2(), and getSource3().

Referenced by LoadOpNode::getSources().

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

◆ printDot()

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

Implements OpNode.

Definition at line 3823 of file Range_Analysis.cpp.

References GET_CONST_NODE, tree_helper::GetConstValue(), getOpcode(), OpNode::getSink(), getSource1(), getSource2(), getSource3(), tree_node::GetString(), and VarNode::getValue().

Referenced by LoadOpNode::getSources().

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

Field Documentation

◆ opcode

kind TernaryOpNode::opcode
private

Definition at line 3581 of file Range_Analysis.cpp.

◆ source1

VarNode* TernaryOpNode::source1
private

Definition at line 3575 of file Range_Analysis.cpp.

◆ source2

VarNode* TernaryOpNode::source2
private

Definition at line 3577 of file Range_Analysis.cpp.

◆ source3

VarNode* TernaryOpNode::source3
private

Definition at line 3579 of file Range_Analysis.cpp.


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

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