From f56c7aa2a7200ece5d074651b9839eb917f910f5 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Wed, 27 Mar 2019 11:33:07 +0000 Subject: Move constraint implementation from header to cpp files --- lib/Expr/Constraints.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'lib/Expr') diff --git a/lib/Expr/Constraints.cpp b/lib/Expr/Constraints.cpp index 89e2ca59..1c7bee57 100644 --- a/lib/Expr/Constraints.cpp +++ b/lib/Expr/Constraints.cpp @@ -95,10 +95,6 @@ bool ConstraintManager::rewriteConstraints(ExprVisitor &visitor) { return changed; } -void ConstraintManager::simplifyForValidConstraint(ref e) { - // XXX -} - ref ConstraintManager::simplifyExpr(ref e) const { if (isa(e)) return e; @@ -168,3 +164,24 @@ void ConstraintManager::addConstraint(ref e) { e = simplifyExpr(e); addConstraintInternal(e); } + +ConstraintManager::ConstraintManager(const std::vector> &_constraints) + : constraints(_constraints) {} + +bool ConstraintManager::empty() const { return constraints.empty(); } + +klee::ref ConstraintManager::back() const { return constraints.back(); } + +klee::ConstraintManager::constraint_iterator ConstraintManager::begin() const { + return constraints.begin(); +} + +klee::ConstraintManager::constraint_iterator ConstraintManager::end() const { + return constraints.end(); +} + +size_t ConstraintSet::size() const noexcept { return constraints.size(); } + +bool ConstraintManager::operator==(const ConstraintManager &other) const { + return constraints == other.constraints; +} -- cgit 1.4.1