diff options
author | Dejan Jovanović <dejan.jovanovic@gmail.com> | 2010-04-14 19:06:53 +0000 |
---|---|---|
committer | Dejan Jovanović <dejan.jovanovic@gmail.com> | 2010-04-14 19:06:53 +0000 |
commit | f8ca588548491146fffbf22b2e9082986504211c (patch) | |
tree | 980553ffdb2b275a1e203c6e87743a01d1d5e5bc /test/unit/expr/declaration_scope_black.h | |
parent | 7c83d004874a46efe36d58717f7a4d72553b3693 (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 'test/unit/expr/declaration_scope_black.h')
-rw-r--r-- | test/unit/expr/declaration_scope_black.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/unit/expr/declaration_scope_black.h b/test/unit/expr/declaration_scope_black.h index f93a3fcc8..67e6d3e98 100644 --- a/test/unit/expr/declaration_scope_black.h +++ b/test/unit/expr/declaration_scope_black.h @@ -56,7 +56,7 @@ public: void testBind() { DeclarationScope declScope; - Type *booleanType = d_exprManager->booleanType(); + Type booleanType = d_exprManager->booleanType(); Expr x = d_exprManager->mkVar(booleanType); declScope.bind("x",x); TS_ASSERT( declScope.isBound("x") ); @@ -65,7 +65,7 @@ public: void testBind2() { DeclarationScope declScope; - Type *booleanType = d_exprManager->booleanType(); + Type booleanType = d_exprManager->booleanType(); // var name attribute shouldn't matter Expr y = d_exprManager->mkVar("y", booleanType); declScope.bind("x",y); @@ -75,7 +75,7 @@ public: void testBind3() { DeclarationScope declScope; - Type *booleanType = d_exprManager->booleanType(); + Type booleanType = d_exprManager->booleanType(); Expr x = d_exprManager->mkVar(booleanType); declScope.bind("x",x); Expr y = d_exprManager->mkVar(booleanType); @@ -87,11 +87,11 @@ public: void testBind4() { DeclarationScope declScope; - Type *booleanType = d_exprManager->booleanType(); + Type booleanType = d_exprManager->booleanType(); Expr x = d_exprManager->mkVar(booleanType); declScope.bind("x",x); - Type *t = d_exprManager->mkSort("T"); + Type t = d_exprManager->mkSort("T"); // duplicate binding for type is OK declScope.bindType("x",t); @@ -103,7 +103,7 @@ public: void testBindType() { DeclarationScope declScope; - Type *s = d_exprManager->mkSort("S"); + Type s = d_exprManager->mkSort("S"); declScope.bindType("S",s); TS_ASSERT( declScope.isBoundType("S") ); TS_ASSERT_EQUALS( declScope.lookupType("S"), s ); @@ -112,7 +112,7 @@ public: void testBindType2() { DeclarationScope declScope; // type name attribute shouldn't matter - Type *s = d_exprManager->mkSort("S"); + Type s = d_exprManager->mkSort("S"); declScope.bindType("T",s); TS_ASSERT( declScope.isBoundType("T") ); TS_ASSERT_EQUALS( declScope.lookupType("T"), s ); @@ -120,9 +120,9 @@ public: void testBindType3() { DeclarationScope declScope; - Type *s = d_exprManager->mkSort("S"); + Type s = d_exprManager->mkSort("S"); declScope.bindType("S",s); - Type *t = d_exprManager->mkSort("T"); + Type t = d_exprManager->mkSort("T"); // new binding covers old declScope.bindType("S",t); TS_ASSERT( declScope.isBoundType("S") ); @@ -131,7 +131,7 @@ public: void testPushScope() { DeclarationScope declScope; - Type *booleanType = d_exprManager->booleanType(); + Type booleanType = d_exprManager->booleanType(); Expr x = d_exprManager->mkVar(booleanType); declScope.bind("x",x); declScope.pushScope(); |