From 2499bd64a5ac688573ebbcd6114983f64a8094eb Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Wed, 20 Apr 2011 11:19:50 +0000 Subject: numerous bugfixes --- src/expr/declaration_scope.cpp | 4 ++++ src/expr/declaration_scope.h | 6 ++++++ 2 files changed, 10 insertions(+) (limited to 'src/expr') diff --git a/src/expr/declaration_scope.cpp b/src/expr/declaration_scope.cpp index cfcc62335..8dd329b83 100644 --- a/src/expr/declaration_scope.cpp +++ b/src/expr/declaration_scope.cpp @@ -72,6 +72,10 @@ bool DeclarationScope::isBoundDefinedFunction(const std::string& name) const thr return found != d_exprMap->end() && d_functions->contains((*found).second); } +bool DeclarationScope::isBoundDefinedFunction(Expr func) const throw() { + return d_functions->contains(func); +} + Expr DeclarationScope::lookup(const std::string& name) const throw(AssertionException) { return (*d_exprMap->find(name)).second; } diff --git a/src/expr/declaration_scope.h b/src/expr/declaration_scope.h index 6d89f5f4e..699dca6fa 100644 --- a/src/expr/declaration_scope.h +++ b/src/expr/declaration_scope.h @@ -133,6 +133,12 @@ public: */ bool isBoundDefinedFunction(const std::string& name) const throw(); + /** + * Check whether an Expr was bound to a function (i.e., was the + * second arg to bindDefinedFunction()). + */ + bool isBoundDefinedFunction(Expr func) const throw(); + /** * Check whether a name is bound to a type (or type constructor). * -- cgit v1.2.3