Supplements Environment
with non-standard comparison and join operations. More...
#include "clang/Analysis/FlowSensitive/DataflowEnvironment.h"
Same
: Val1
is equivalent to Val2
, according to the model.
JoinedVal
to approximate both Val1
and Val2
.
Supplements Environment
with non-standard comparison and join operations.
Definition at line 69 of file DataflowEnvironment.h.
◆ ~ValueModel() virtual clang::dataflow::Environment::ValueModel::~ValueModel ( ) virtualdefault ◆ compare()Returns: Same
: Val1
is equivalent to Val2
, according to the model.
Different
: Val1
is distinct from Val2
, according to the model. Unknown
: The model can't determine a relationship between Val1
and Val2
.
Requirements:
Val1
and Val2
must be distinct.
Val1
and Val2
must model values of type Type
.
Val1
and Val2
must be assigned to the same storage location in Env1
and Env2
respectively.
Definition at line 87 of file DataflowEnvironment.h.
References clang::dataflow::Unknown.
Referenced by clang::dataflow::compareDistinctValues(), and widen().
◆ join()Modifies JoinedVal
to approximate both Val1
and Val2
.
This should obey the properties of a lattice join.
Env1
and Env2
can be used to query child values and path condition implications of Val1
and Val2
respectively.
Requirements:
Val1
and Val2
must be distinct.
Val1
, Val2
, and JoinedVal
must model values of type Type
.
Val1
and Val2
must be assigned to the same storage location in Env1
and Env2
respectively.
Definition at line 109 of file DataflowEnvironment.h.
Referenced by clang::dataflow::joinDistinctValues().
◆ widen()This function may widen the current value – replace it with an approximation that can reach a fixed point more quickly than iterated application of the transfer function alone.
The previous value is provided to inform the choice of widened value. The function must also serve as a comparison operation, by indicating whether the widened value is equivalent to the previous value.
Returns one of the folowing:
std::nullopt
, if this value is not of interest to the model.WidenResult
with:
Value *
that points either to Current
or a widened version of Current
. This value must be consistent with the flow condition of CurrentEnv
. We particularly caution against using Prev
, which is rarely consistent.LatticeEffect
indicating whether the value should be considered a new value (Changed
) or one equivalent (if not necessarily equal) to Prev
(Unchanged
).PrevEnv
and CurrentEnv
can be used to query child values and path condition implications of Prev
and Current
, respectively.
Requirements:
Prev
and Current
must model values of type Type
.
Prev
and Current
must be assigned to the same storage location in PrevEnv
and CurrentEnv
, respectively.
Definition at line 141 of file DataflowEnvironment.h.
References clang::dataflow::Changed, compare(), clang::dataflow::Different, clang::dataflow::Same, clang::dataflow::Unchanged, and clang::dataflow::Unknown.
Referenced by clang::dataflow::widenDistinctValues().
The documentation for this class was generated from the following file:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4