Skip to content

Commit

Permalink
[fix] Remove unused field
Browse files Browse the repository at this point in the history
  • Loading branch information
misonijnik committed Nov 2, 2023
1 parent 112f71b commit 8585d34
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 21 deletions.
5 changes: 0 additions & 5 deletions include/klee/Module/TargetHash.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,8 @@ struct TargetCmp {
bool operator()(const ref<Target> &a, const ref<Target> &b) const;
};

typedef std::pair<llvm::BasicBlock *, llvm::BasicBlock *> Transition;
typedef std::pair<llvm::BasicBlock *, unsigned> Branch;

struct TransitionHash {
std::size_t operator()(const Transition &p) const;
};

struct BranchHash {
std::size_t operator()(const Branch &p) const;
};
Expand Down
13 changes: 5 additions & 8 deletions lib/Core/ExecutionState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ ExecutionState::ExecutionState(const ExecutionState &state)
: initPC(state.initPC), pc(state.pc), prevPC(state.prevPC),
stack(state.stack), stackBalance(state.stackBalance),
incomingBBIndex(state.incomingBBIndex), depth(state.depth),
level(state.level), transitionLevel(state.transitionLevel),
addressSpace(state.addressSpace), constraints(state.constraints),
targetForest(state.targetForest), pathOS(state.pathOS),
symPathOS(state.symPathOS), coveredLines(state.coveredLines),
symbolics(state.symbolics), resolvedPointers(state.resolvedPointers),
level(state.level), addressSpace(state.addressSpace),
constraints(state.constraints), targetForest(state.targetForest),
pathOS(state.pathOS), symPathOS(state.symPathOS),
coveredLines(state.coveredLines), symbolics(state.symbolics),
resolvedPointers(state.resolvedPointers),
cexPreferences(state.cexPreferences), arrayNames(state.arrayNames),
steppedInstructions(state.steppedInstructions),
steppedMemoryInstructions(state.steppedMemoryInstructions),
Expand Down Expand Up @@ -448,9 +448,6 @@ void ExecutionState::increaseLevel() {
stack.infoStack().back().multilevel.replace({srcbb, srcLevel + 1});
level.insert(prevPC->parent);
}
if (srcbb != dstbb) {
transitionLevel.insert(std::make_pair(srcbb, dstbb));
}
}

bool ExecutionState::isGEPExpr(ref<Expr> expr) const {
Expand Down
1 change: 0 additions & 1 deletion lib/Core/ExecutionState.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ class ExecutionState {

/// @brief Exploration level, i.e., number of times KLEE cycled for this state
std::set<KBlock *, KBlockCompare> level;
std::unordered_set<Transition, TransitionHash> transitionLevel;

/// @brief Address space used by this state (e.g. Global and Heap)
AddressSpace addressSpace;
Expand Down
2 changes: 0 additions & 2 deletions lib/Core/TargetCalculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ DISABLE_WARNING_POP
namespace klee {
class CodeGraphInfo;
class ExecutionState;
struct TransitionHash;

enum class TrackCoverageBy { None, Blocks, Branches, All };

Expand All @@ -44,7 +43,6 @@ class TargetCalculator {
using StatesSet = std::unordered_set<ExecutionState *>;

typedef std::unordered_set<KBlock *> VisitedBlocks;
typedef std::unordered_set<Transition, TransitionHash> VisitedTransitions;
typedef std::unordered_set<Branch, BranchHash> VisitedBranches;

enum HistoryKind { Blocks, Transitions };
Expand Down
5 changes: 0 additions & 5 deletions lib/Module/TargetHash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ bool TargetCmp::operator()(const ref<Target> &a, const ref<Target> &b) const {
return a == b;
}

std::size_t TransitionHash::operator()(const Transition &p) const {
return reinterpret_cast<size_t>(p.first) * 31 +
reinterpret_cast<size_t>(p.second);
}

std::size_t BranchHash::operator()(const Branch &p) const {
return reinterpret_cast<size_t>(p.first) * 31 + p.second;
}

0 comments on commit 8585d34

Please sign in to comment.