about summary refs log tree commit diff homepage
path: root/lib/Core/ExecutionState.cpp
diff options
context:
space:
mode:
authorTimotej Kapus <tk1713@ic.ac.uk>2019-12-02 15:05:03 +0000
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2019-12-12 16:17:09 +0000
commitebd3eb0ec11b053ddf5eee44c1217436948279d9 (patch)
tree640f1a1832b9ae6b4b18fd4815379df4614f2f93 /lib/Core/ExecutionState.cpp
parent0de67b9f0c3f7f331f873f19561aef311d2bed4a (diff)
downloadklee-ebd3eb0ec11b053ddf5eee44c1217436948279d9.tar.gz
[Searchers] Remove weight from es, add nurs_depth
Having both weight and depth in execution state is wasteful,
therefore this patch removes weight.

The nurs:depth searcher is replaced by nurs:rp, which uses pow to compute
the weight

A new nurs:depth searcher is introduced that biases the search with depth,
making it the only other searcher that prefers to go deep (similar to dfs).
Diffstat (limited to 'lib/Core/ExecutionState.cpp')
-rw-r--r--lib/Core/ExecutionState.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/Core/ExecutionState.cpp b/lib/Core/ExecutionState.cpp
index 15003b0e..60715b33 100644
--- a/lib/Core/ExecutionState.cpp
+++ b/lib/Core/ExecutionState.cpp
@@ -69,7 +69,6 @@ ExecutionState::ExecutionState(KFunction *kf) :
     pc(kf->instructions),
     prevPC(pc),
 
-    weight(1),
     depth(0),
 
     instsSinceCovNew(0),
@@ -111,7 +110,6 @@ ExecutionState::ExecutionState(const ExecutionState& state):
     constraints(state.constraints),
 
     queryCost(state.queryCost),
-    weight(state.weight),
     depth(state.depth),
 
     pathOS(state.pathOS),
@@ -141,9 +139,6 @@ ExecutionState *ExecutionState::branch() {
   falseState->coveredNew = false;
   falseState->coveredLines.clear();
 
-  weight *= .5;
-  falseState->weight -= weight;
-
   return falseState;
 }