From 8a0f1af7500e10dadd97300f242424917d2e9902 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Mon, 1 Apr 2019 14:08:43 +0100 Subject: Use constraint sets and separate metadata for timing solver invocation Decouple ExecutionState from TimingSolver Instead of providing an execution state to the timing solver use a set of constraints and an additional object for metadata. Fixes: * correct accounting of metadata to a specific state * accounting of all solver invocations (e.g. solver-getRange was not accounted) * allows to invoke the solver without a state (avoids costly copying of states/constraints) --- lib/Core/Searcher.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Core/Searcher.cpp') diff --git a/lib/Core/Searcher.cpp b/lib/Core/Searcher.cpp index 6b7e9e49..765784c5 100644 --- a/lib/Core/Searcher.cpp +++ b/lib/Core/Searcher.cpp @@ -214,7 +214,9 @@ double WeightedRandomSearcher::getWeight(ExecutionState *es) { return inv; } case QueryCost: - return (es->queryCost.toSeconds() < .1) ? 1. : 1./ es->queryCost.toSeconds(); + return (es->queryMetaData.queryCost.toSeconds() < .1) + ? 1. + : 1. / es->queryMetaData.queryCost.toSeconds(); case CoveringNew: case MinDistToUncovered: { uint64_t md2u = computeMinDistToUncovered(es->pc, -- cgit 1.4.1