From 42662b71a53d2e72481bc46994f44e47c7528a34 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Wed, 22 Nov 2023 22:59:32 +0000 Subject: Make Assignment::evaluate be const --- include/klee/Expr/Assignment.h | 4 ++-- lib/Core/Executor.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/klee/Expr/Assignment.h b/include/klee/Expr/Assignment.h index 7384e0cc..ba0c2a6c 100644 --- a/include/klee/Expr/Assignment.h +++ b/include/klee/Expr/Assignment.h @@ -44,7 +44,7 @@ namespace klee { } ref evaluate(const Array *mo, unsigned index) const; - ref evaluate(ref e); + ref evaluate(ref e) const; ConstraintSet createConstraintsFromAssignment() const; template @@ -82,7 +82,7 @@ namespace klee { } } - inline ref Assignment::evaluate(ref e) { + inline ref Assignment::evaluate(ref e) const { AssignmentEvaluator v(*this); return v.visit(e); } diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index c07fa18e..73f994ce 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -1351,7 +1351,7 @@ Executor::toConstant(ExecutionState &state, ref Executor::getValueFromSeeds(std::vector &seeds, ref e) { assert(!seeds.empty()); - for (auto seed:seeds) { + for (auto const &seed : seeds) { auto value = seed.assignment.evaluate(e); if (isa(value)) return value; -- cgit 1.4.1