summaryrefslogtreecommitdiff
path: root/src/util/resource_manager.h
diff options
context:
space:
mode:
authorGereon Kremer <gereon.kremer@cs.rwth-aachen.de>2020-11-16 11:15:19 +0100
committerGitHub <noreply@github.com>2020-11-16 11:15:19 +0100
commitdb84323caa3009cf418f959313e49f5bea5d35a6 (patch)
treecf0e4d4d37f97fdb61255853b607fa254f708080 /src/util/resource_manager.h
parenta71274b992ea5ddfb930b754f1b705f417f7b4e5 (diff)
Improve accuracy of resource limitation (#4763)
The main goal of the resource limitation mechanism (via `--rlimit`) is to have a deterministic limitation on runtime. The ultimate goal would be that the actual runtime grows linearly with the spent resources. To achieve this, this PR does the following: - introduce new resources spent in places that are not yet covered - find resource weights that best approximate the runtime It provides a contrib script `learn_resource_weights.py` that uses statistics from a given benchmark run and uses linear regression to find good resource weights. The script also evaluates this estimate and identifies outliers, benchmarks for which this approximation is particularly bad. This probably indicates that on such a benchmark, some part of the code takes a significant amount of time but is not yet represented by a resource. Eventually, we should use the resulting resource weights as defaults for the options like `--rewrite-step`, `--theory-check-step`, etc.
Diffstat (limited to 'src/util/resource_manager.h')
-rw-r--r--src/util/resource_manager.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util/resource_manager.h b/src/util/resource_manager.h
index e67598afc..f6cff2e7f 100644
--- a/src/util/resource_manager.h
+++ b/src/util/resource_manager.h
@@ -10,7 +10,7 @@
** directory for licensing information.\endverbatim
**
** \brief Provides mechanisms to limit resources.
- **
+ **
** This file provides the ResourceManager class. It can be used to impose
** (cumulative and per-call) resource limits on the solver, as well as per-call
** time limits.
@@ -81,13 +81,18 @@ class CVC4_PUBLIC ResourceManager
/** Types of resources. */
enum class Resource
{
+ ArithPivotStep,
+ ArithNlLemmaStep,
BitblastStep,
BvEagerAssertStep,
BvPropagationStep,
BvSatConflictsStep,
+ BvSatPropagateStep,
+ BvSatSimplifyStep,
CnfStep,
DecisionStep,
LemmaStep,
+ NewSkolemStep,
ParseStep,
PreprocessStep,
QuantifierStep,
@@ -159,8 +164,6 @@ class CVC4_PUBLIC ResourceManager
*/
void endCall();
- static uint64_t getFrequencyCount() { return s_resourceCount; }
-
/**
* Registers a listener that is notified on a resource out or (per-call)
* timeout.
@@ -195,9 +198,6 @@ class CVC4_PUBLIC ResourceManager
/** A flag indicating whether resource limitation is active. */
bool d_on;
- /** Counter indicating how often to check resource manager in loops */
- static const uint64_t s_resourceCount;
-
/** Receives a notification on reaching a limit. */
std::vector<Listener*> d_listeners;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback