Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SVF::AbstractValue Class Reference

#include <AbstractValue.h>

Public Member Functions

 AbstractValue ()
 
 AbstractValue (const AbstractValue &other)
 
bool isInterval () const
 
bool isAddr () const
 
 AbstractValue (AbstractValue &&other)
 
AbstractValueoperator= (const AbstractValue &other)
 
AbstractValueoperator= (const AbstractValue &&other)
 
AbstractValueoperator= (const IntervalValue &other)
 
AbstractValueoperator= (const AddressValue &other)
 
 AbstractValue (const IntervalValue &ival)
 
 AbstractValue (const AddressValue &addr)
 
IntervalValuegetInterval ()
 
const IntervalValue getInterval () const
 
AddressValuegetAddrs ()
 
const AddressValue getAddrs () const
 
 ~AbstractValue ()
 
bool equals (const AbstractValue &rhs) const
 
void join_with (const AbstractValue &other)
 
void meet_with (const AbstractValue &other)
 
void widen_with (const AbstractValue &other)
 
void narrow_with (const AbstractValue &other)
 
std::string toString () const
 

Public Attributes

IntervalValue interval
 
AddressValue addrs
 

Detailed Description

Definition at line 34 of file AbstractValue.h.

Constructor & Destructor Documentation

◆ AbstractValue() [1/5]

SVF::AbstractValue::AbstractValue ( )
inline

Definition at line 41 of file AbstractValue.h.

42 {
44 addrs = AddressValue();
45 }
IntervalValue interval
AddressValue addrs
static IntervalValue bottom()
Create the bottom IntervalValue [+inf, -inf].

◆ AbstractValue() [2/5]

SVF::AbstractValue::AbstractValue ( const AbstractValue other)
inline

Definition at line 47 of file AbstractValue.h.

48 {
49 interval = other.interval;
50 addrs = other.addrs;
51 }
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ AbstractValue() [3/5]

SVF::AbstractValue::AbstractValue ( AbstractValue &&  other)
inline

Definition at line 62 of file AbstractValue.h.

63 {
64 interval = SVFUtil::move(other.interval);
65 addrs = SVFUtil::move(other.addrs);
66 }
constexpr std::remove_reference< T >::type && move(T &&t) noexcept
Definition SVFUtil.h:447

◆ AbstractValue() [4/5]

SVF::AbstractValue::AbstractValue ( const IntervalValue ival)
inline

Definition at line 97 of file AbstractValue.h.

97: interval(ival), addrs(AddressValue()) {}

◆ AbstractValue() [5/5]

SVF::AbstractValue::AbstractValue ( const AddressValue addr)
inline

Definition at line 99 of file AbstractValue.h.

◆ ~AbstractValue()

SVF::AbstractValue::~AbstractValue ( )
inline

Definition at line 121 of file AbstractValue.h.

121{};

Member Function Documentation

◆ equals()

bool SVF::AbstractValue::equals ( const AbstractValue rhs) const
inline

Definition at line 123 of file AbstractValue.h.

124 {
125 return interval.equals(rhs.interval) && addrs.equals(rhs.addrs);
126 }
bool equals(const AddressValue &rhs) const
bool equals(const IntervalValue &other) const
Equality comparison.

◆ getAddrs() [1/2]

AddressValue & SVF::AbstractValue::getAddrs ( )
inline

Definition at line 111 of file AbstractValue.h.

112 {
113 return addrs;
114 }

◆ getAddrs() [2/2]

const AddressValue SVF::AbstractValue::getAddrs ( ) const
inline

Definition at line 116 of file AbstractValue.h.

117 {
118 return addrs;
119 }

◆ getInterval() [1/2]

IntervalValue & SVF::AbstractValue::getInterval ( )
inline

Definition at line 101 of file AbstractValue.h.

102 {
103 return interval;
104 }

◆ getInterval() [2/2]

const IntervalValue SVF::AbstractValue::getInterval ( ) const
inline

Definition at line 106 of file AbstractValue.h.

107 {
108 return interval;
109 }

◆ isAddr()

bool SVF::AbstractValue::isAddr ( ) const
inline

Definition at line 57 of file AbstractValue.h.

58 {
59 return !addrs.isBottom();
60 }
bool isBottom() const

◆ isInterval()

bool SVF::AbstractValue::isInterval ( ) const
inline

Definition at line 53 of file AbstractValue.h.

54 {
55 return !interval.isBottom();
56 }
bool isBottom() const

◆ join_with()

void SVF::AbstractValue::join_with ( const AbstractValue other)
inline

Definition at line 128 of file AbstractValue.h.

129 {
130 interval.join_with(other.interval);
131 addrs.join_with(other.addrs);
132 }
bool join_with(const AddressValue &other)
Current AddressValue joins with another AddressValue.
void join_with(const IntervalValue &other)
Current IntervalValue joins with another IntervalValue.

◆ meet_with()

void SVF::AbstractValue::meet_with ( const AbstractValue other)
inline

Definition at line 134 of file AbstractValue.h.

135 {
136 interval.meet_with(other.interval);
137 addrs.meet_with(other.addrs);
138 }
bool meet_with(const AddressValue &other)
Return a intersected AddressValue.
void meet_with(const IntervalValue &other)
Return a intersected IntervalValue.

◆ narrow_with()

void SVF::AbstractValue::narrow_with ( const AbstractValue other)
inline

Definition at line 146 of file AbstractValue.h.

147 {
148 interval.narrow_with(other.interval);
149 // TODO: narrow Addrs
150 }
void narrow_with(const IntervalValue &other)
Current IntervalValue narrow with another IntervalValue.

◆ operator=() [1/4]

AbstractValue & SVF::AbstractValue::operator= ( const AbstractValue &&  other)
inline

Definition at line 76 of file AbstractValue.h.

77 {
78 interval = SVFUtil::move(other.interval);
79 addrs = SVFUtil::move(other.addrs);
80 return *this;
81 }

◆ operator=() [2/4]

AbstractValue & SVF::AbstractValue::operator= ( const AbstractValue other)
inline

Definition at line 69 of file AbstractValue.h.

70 {
71 interval = other.interval;
72 addrs = other.addrs;
73 return *this;
74 }

◆ operator=() [3/4]

AbstractValue & SVF::AbstractValue::operator= ( const AddressValue other)
inline

Definition at line 90 of file AbstractValue.h.

91 {
92 addrs = other;
94 return *this;
95 }

◆ operator=() [4/4]

AbstractValue & SVF::AbstractValue::operator= ( const IntervalValue other)
inline

Definition at line 83 of file AbstractValue.h.

84 {
86 addrs = AddressValue();
87 return *this;
88 }

◆ toString()

std::string SVF::AbstractValue::toString ( ) const
inline

Definition at line 152 of file AbstractValue.h.

153 {
154 return "<" + interval.toString() + ", " + addrs.toString() + ">";
155 }
const std::string toString() const
const std::string toString() const

◆ widen_with()

void SVF::AbstractValue::widen_with ( const AbstractValue other)
inline

Definition at line 140 of file AbstractValue.h.

141 {
142 interval.widen_with(other.interval);
143 // TODO: widen Addrs
144 }
void widen_with(const IntervalValue &other)
Current IntervalValue widen with another IntervalValue.

Member Data Documentation

◆ addrs

AddressValue SVF::AbstractValue::addrs

Definition at line 39 of file AbstractValue.h.

◆ interval

IntervalValue SVF::AbstractValue::interval

Definition at line 38 of file AbstractValue.h.


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