From: Tim King Date: Tue, 9 Jan 2018 02:38:20 +0000 (-0800) Subject: Remove throw specifiers from symbol table. (#1490) X-Git-Tag: cvc5-1.0.0~5369 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=215c41d35390927409aac3827798f89d82f6b4bb;p=cvc5.git Remove throw specifiers from symbol table. (#1490) --- diff --git a/src/expr/symbol_table.cpp b/src/expr/symbol_table.cpp index fd8b2d7e9..08326bc15 100644 --- a/src/expr/symbol_table.cpp +++ b/src/expr/symbol_table.cpp @@ -615,63 +615,74 @@ SymbolTable::SymbolTable() : d_implementation(new SymbolTable::Implementation()) {} SymbolTable::~SymbolTable() {} - -bool SymbolTable::bind(const string& name, Expr obj, bool levelZero, - bool doOverload) throw() { +bool SymbolTable::bind(const string& name, + Expr obj, + bool levelZero, + bool doOverload) +{ return d_implementation->bind(name, obj, levelZero, doOverload); } -bool SymbolTable::bindDefinedFunction(const string& name, Expr obj, - bool levelZero, bool doOverload) throw() { +bool SymbolTable::bindDefinedFunction(const string& name, + Expr obj, + bool levelZero, + bool doOverload) +{ return d_implementation->bindDefinedFunction(name, obj, levelZero, doOverload); } -void SymbolTable::bindType(const string& name, Type t, bool levelZero) throw() { +void SymbolTable::bindType(const string& name, Type t, bool levelZero) +{ d_implementation->bindType(name, t, levelZero); } -void SymbolTable::bindType(const string& name, const vector& params, - Type t, bool levelZero) throw() { +void SymbolTable::bindType(const string& name, + const vector& params, + Type t, + bool levelZero) +{ d_implementation->bindType(name, params, t, levelZero); } -bool SymbolTable::isBound(const string& name) const throw() { +bool SymbolTable::isBound(const string& name) const +{ return d_implementation->isBound(name); } -bool SymbolTable::isBoundDefinedFunction(const string& name) const throw() { +bool SymbolTable::isBoundDefinedFunction(const string& name) const +{ return d_implementation->isBoundDefinedFunction(name); } -bool SymbolTable::isBoundDefinedFunction(Expr func) const throw() { +bool SymbolTable::isBoundDefinedFunction(Expr func) const +{ return d_implementation->isBoundDefinedFunction(func); } -bool SymbolTable::isBoundType(const string& name) const throw() { +bool SymbolTable::isBoundType(const string& name) const +{ return d_implementation->isBoundType(name); } -Expr SymbolTable::lookup(const string& name) const throw() { +Expr SymbolTable::lookup(const string& name) const +{ return d_implementation->lookup(name); } -Type SymbolTable::lookupType(const string& name) const throw() { +Type SymbolTable::lookupType(const string& name) const +{ return d_implementation->lookupType(name); } Type SymbolTable::lookupType(const string& name, - const vector& params) const throw() { + const vector& params) const +{ return d_implementation->lookupType(name, params); } size_t SymbolTable::lookupArity(const string& name) { return d_implementation->lookupArity(name); } -void SymbolTable::popScope() throw(ScopeException) { - d_implementation->popScope(); -} - -void SymbolTable::pushScope() throw() { d_implementation->pushScope(); } -size_t SymbolTable::getLevel() const throw() { - return d_implementation->getLevel(); -} +void SymbolTable::popScope() { d_implementation->popScope(); } +void SymbolTable::pushScope() { d_implementation->pushScope(); } +size_t SymbolTable::getLevel() const { return d_implementation->getLevel(); } void SymbolTable::reset() { d_implementation->reset(); } } // namespace CVC4 diff --git a/src/expr/symbol_table.h b/src/expr/symbol_table.h index 854e8a04e..80f171866 100644 --- a/src/expr/symbol_table.h +++ b/src/expr/symbol_table.h @@ -64,8 +64,10 @@ class CVC4_PUBLIC SymbolTable { * * Returns false if the binding was invalid. */ - bool bind(const std::string& name, Expr obj, bool levelZero = false, - bool doOverload = false) throw(); + bool bind(const std::string& name, + Expr obj, + bool levelZero = false, + bool doOverload = false); /** * Bind a function body to a name in the current scope. @@ -92,9 +94,10 @@ class CVC4_PUBLIC SymbolTable { * * Returns false if the binding was invalid. */ - bool bindDefinedFunction(const std::string& name, Expr obj, + bool bindDefinedFunction(const std::string& name, + Expr obj, bool levelZero = false, - bool doOverload = false) throw(); + bool doOverload = false); /** * Bind a type to a name in the current scope. If name @@ -107,8 +110,7 @@ class CVC4_PUBLIC SymbolTable { * @param t the type to bind to name * @param levelZero set if the binding must be done at level 0 */ - void bindType(const std::string& name, Type t, - bool levelZero = false) throw(); + void bindType(const std::string& name, Type t, bool levelZero = false); /** * Bind a type to a name in the current scope. If name @@ -123,8 +125,10 @@ class CVC4_PUBLIC SymbolTable { * @param levelZero true to bind it globally (default is to bind it * locally within the current scope) */ - void bindType(const std::string& name, const std::vector& params, - Type t, bool levelZero = false) throw(); + void bindType(const std::string& name, + const std::vector& params, + Type t, + bool levelZero = false); /** * Check whether a name is bound to an expression with either bind() @@ -133,18 +137,18 @@ class CVC4_PUBLIC SymbolTable { * @param name the identifier to check. * @returns true iff name is bound in the current scope. */ - bool isBound(const std::string& name) const throw(); + bool isBound(const std::string& name) const; /** * Check whether a name was bound to a function with bindDefinedFunction(). */ - bool isBoundDefinedFunction(const std::string& name) const throw(); + bool isBoundDefinedFunction(const std::string& name) const; /** * Check whether an Expr was bound to a function (i.e., was the * second arg to bindDefinedFunction()). */ - bool isBoundDefinedFunction(Expr func) const throw(); + bool isBoundDefinedFunction(Expr func) const; /** * Check whether a name is bound to a type (or type constructor). @@ -152,7 +156,7 @@ class CVC4_PUBLIC SymbolTable { * @param name the identifier to check. * @returns true iff name is bound to a type in the current scope. */ - bool isBoundType(const std::string& name) const throw(); + bool isBoundType(const std::string& name) const; /** * Lookup a bound expression. @@ -163,7 +167,7 @@ class CVC4_PUBLIC SymbolTable { * It returns the null expression if there is not a unique expression bound to * name in the current scope (i.e. if there is not exactly one). */ - Expr lookup(const std::string& name) const throw(); + Expr lookup(const std::string& name) const; /** * Lookup a bound type. @@ -171,7 +175,7 @@ class CVC4_PUBLIC SymbolTable { * @param name the type identifier to lookup * @returns the type bound to name in the current scope. */ - Type lookupType(const std::string& name) const throw(); + Type lookupType(const std::string& name) const; /** * Lookup a bound parameterized type. @@ -182,7 +186,7 @@ class CVC4_PUBLIC SymbolTable { * the current scope. */ Type lookupType(const std::string& name, - const std::vector& params) const throw(); + const std::vector& params) const; /** * Lookup the arity of a bound parameterized type. @@ -195,13 +199,13 @@ class CVC4_PUBLIC SymbolTable { * * @throws ScopeException if the scope level is 0. */ - void popScope() throw(ScopeException); + void popScope(); /** Push a scope level and increase the scope level by 1. */ - void pushScope() throw(); + void pushScope(); /** Get the current level of this symbol table. */ - size_t getLevel() const throw(); + size_t getLevel() const; /** Reset everything. */ void reset();