summaryrefslogtreecommitdiff
path: root/src/expr/declaration_scope.h
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2010-04-14 19:06:53 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2010-04-14 19:06:53 +0000
commitf8ca588548491146fffbf22b2e9082986504211c (patch)
tree980553ffdb2b275a1e203c6e87743a01d1d5e5bc /src/expr/declaration_scope.h
parent7c83d004874a46efe36d58717f7a4d72553b3693 (diff)
Marging from types 404:415, changes: Massive
* Types are now represented as nodes in the attribute table and are managed, i.e. you can say Type booleanType = d_nodeManager->booleanType(); Type t = d_nodeManager->mkFunctionType(booleanType, booleanType); FunctionType ft = (FunctionType)t; Assert(ft.getArgTypes()[0], booleanType); * The attributes now have a table for Nodes and a table for TNodes (both should be used with caution) * Changes the way nodes are extracted from NodeBuilder, added several methods to extract a Node, NodeValue, or Node*, with corresponding methods for extraction * Used the above in the construction of Expr and Type objects * The NodeManager now destroys the attributes in the destructor by pausing the garbage collection * To achive destruction a flag d_inDesctruction has been added to loosen the assertion in NodeValue::dec() (there might be -refcount TNodes leftover) * Beginnings of the Bitvector constants using GMP Not yet in tiptop phase, needs more documentation, and Types should be pulled out to TypeNodes eventually. Also, the types are currently defined in the builting_kinds, and I need to add these to the theory specific definitions with special 'type' constructs. I hate branching and merging.
Diffstat (limited to 'src/expr/declaration_scope.h')
-rw-r--r--src/expr/declaration_scope.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expr/declaration_scope.h b/src/expr/declaration_scope.h
index e08c25173..7d0f2b787 100644
--- a/src/expr/declaration_scope.h
+++ b/src/expr/declaration_scope.h
@@ -56,7 +56,7 @@ class CVC4_PUBLIC DeclarationScope {
context::CDMap<std::string,Expr,StringHashFunction> *d_exprMap;
/** A map for types. */
- context::CDMap<std::string,Type*,StringHashFunction> *d_typeMap;
+ context::CDMap<std::string,Type,StringHashFunction> *d_typeMap;
public:
/** Create a declaration scope. */
@@ -85,7 +85,7 @@ public:
* @param name an identifier
* @param t the type to bind to <code>name</code>
*/
- void bindType(const std::string& name, Type* t) throw ();
+ void bindType(const std::string& name, const Type& t) throw ();
/** Check whether a name is bound to an expression.
*
@@ -113,7 +113,7 @@ public:
* @param name the identifier to lookup
* @returns the type bound to <code>name</code> in the current scope.
*/
- Type* lookupType(const std::string& name) const throw ();
+ Type lookupType(const std::string& name) const throw ();
/** Pop a scope level. Deletes all bindings since the last call to
* <code>pushScope</code>. Calls to <code>pushScope</code> and
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback