summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/system/cvc3_main.cpp30
-rw-r--r--test/unit/Makefile.am1
-rw-r--r--test/unit/context/context_black.h4
-rw-r--r--test/unit/expr/type_node_white.h33
-rw-r--r--test/unit/parser/parser_black.h8
-rw-r--r--test/unit/theory/type_enumerator_white.h3
-rw-r--r--test/unit/util/subrange_bound_white.h74
7 files changed, 24 insertions, 129 deletions
diff --git a/test/system/cvc3_main.cpp b/test/system/cvc3_main.cpp
index cee56757e..ff7448ded 100644
--- a/test/system/cvc3_main.cpp
+++ b/test/system/cvc3_main.cpp
@@ -1236,7 +1236,7 @@ void test15() {
/*****************************************************
* array declaration *
*****************************************************/
-
+/*
// array: index type
Type index_type = vc->subrangeType(vc->ratExpr(0),
vc->ratExpr(3));
@@ -1252,13 +1252,13 @@ void test15() {
arr = vc->writeExpr(arr, vc->ratExpr(1), vc->ratExpr(1));
arr = vc->writeExpr(arr, vc->ratExpr(2), vc->ratExpr(0));
arr = vc->writeExpr(arr, vc->ratExpr(3), vc->ratExpr(0));
-
+*/
/*****************************************************
* forall Expr *
*****************************************************/
-
+/*
// for loop: index
Expr id = vc->boundVarExpr("id", "0", vc->subrangeType(vc->ratExpr(0),
vc->ratExpr(2)));
@@ -1283,11 +1283,11 @@ void test15() {
}
cout << "End of counter-example" << endl << endl;
vc->pop();
-
+ */
/*****************************************************
* manual expansion *
*****************************************************/
-
+/*
Expr e1 = vc->leExpr(vc->readExpr(arr, vc->ratExpr(0)),
vc->readExpr(arr, vc->ratExpr(1)));
Expr e2 = vc->leExpr(vc->readExpr(arr, vc->ratExpr(1)),
@@ -1295,13 +1295,13 @@ void test15() {
Expr e3 = vc->leExpr(vc->readExpr(arr, vc->ratExpr(2)),
vc->readExpr(arr, vc->ratExpr(3)));
Expr manual_expr = vc->andExpr(e1, vc->andExpr(e2, e3));
-
+*/
/*****************************************************
* exists Expr *
*****************************************************/
-
+/*
// exists: index
Expr id_ex = vc->varExpr("id_ex", vc->subrangeType(vc->ratExpr(0),
vc->ratExpr(2)));
@@ -1313,14 +1313,14 @@ void test15() {
vc->readExpr(arr, vc->plusExpr(id_ex, vc->ratExpr(1))));
// exists expr
Expr ex_expr = vc->existsExpr(vars_ex, ex_body);
-
+*/
/*****************************************************
* ??? forall <==> manual expansion *
*****************************************************/
-
+ /*
cout << endl << "Checking forallExpr <==> manual expansion ..." << endl;
if (vc->query(vc->iffExpr(forall_expr, manual_expr)))
cout << " -- yes." << endl;
@@ -1334,12 +1334,13 @@ void test15() {
}
cout << endl;
-
+*/
/*****************************************************
* ??? !forall <==> existsExpr *
*****************************************************/
+ /*
cout << endl << "Checking !forallExpr <==> existsExpr ..." << endl;
if (vc->query(vc->iffExpr(vc->notExpr(forall_expr), ex_expr)))
cout << " -- yes." << endl;
@@ -1360,7 +1361,7 @@ void test15() {
}
cout << endl << "End of testcases." << endl << endl;
-
+*/
} catch(const Exception& e) {
exitStatus = 1;
@@ -1373,6 +1374,7 @@ void test15() {
void test16() {
ValidityChecker *vc = ValidityChecker::create();
try {
+ /*
Type zto100 = vc->subrangeType(vc->ratExpr(0), vc->ratExpr(100));
Expr mem = vc->varExpr("mem", vc->arrayType(zto100, vc->intType()));
Expr a = vc->varExpr("a", zto100);
@@ -1418,7 +1420,7 @@ void test16() {
//cout << Expr(ASSERT, eq) << "\n";
}
}
-
+*/
} catch(const Exception& e) {
exitStatus = 1;
cout << "*** Exception caught in test16(): \n" << e << endl;
@@ -1794,8 +1796,8 @@ void test20() {
constructors[2].push_back("cons");
selectors[2][0].push_back("s0");
types[2][0].push_back(vc->bitvecType(2).getExpr());
- selectors[2][0].push_back("s1");
- types[2][0].push_back(vc->arrayType(vc->intType(), vc->subrangeType(vc->ratExpr(0), vc->ratExpr(0))).getExpr());
+ //selectors[2][0].push_back("s1");
+ //types[2][0].push_back(vc->arrayType(vc->intType(), vc->subrangeType(vc->ratExpr(0), vc->ratExpr(0))).getExpr());
vc->dataType(names, constructors, selectors, types, returnTypes);
diff --git a/test/unit/Makefile.am b/test/unit/Makefile.am
index c2f2b24e2..53981f94e 100644
--- a/test/unit/Makefile.am
+++ b/test/unit/Makefile.am
@@ -52,7 +52,6 @@ UNIT_TESTS += \
util/rational_white \
util/stats_black \
util/boolean_simplification_black \
- util/subrange_bound_white \
main/interactive_shell_black
endif
diff --git a/test/unit/context/context_black.h b/test/unit/context/context_black.h
index 207fbc182..00dc42922 100644
--- a/test/unit/context/context_black.h
+++ b/test/unit/context/context_black.h
@@ -37,7 +37,7 @@ struct MyContextNotifyObj : public ContextNotifyObj {
nCalls(0) {
}
- virtual ~MyContextNotifyObj() throw(AssertionException) {}
+ virtual ~MyContextNotifyObj() {}
void contextNotifyPop() {
++nCalls;
@@ -75,7 +75,7 @@ public:
nSaves(0) {
}
- virtual ~MyContextObj() throw(AssertionException) {
+ virtual ~MyContextObj() {
destroy();
}
diff --git a/test/unit/expr/type_node_white.h b/test/unit/expr/type_node_white.h
index 701f04003..d0438e376 100644
--- a/test/unit/expr/type_node_white.h
+++ b/test/unit/expr/type_node_white.h
@@ -24,7 +24,6 @@
#include "expr/expr_manager.h"
#include "expr/node_manager.h"
#include "expr/type_node.h"
-#include "util/subrange_bound.h"
#include "smt/smt_engine.h"
using namespace CVC4;
@@ -59,7 +58,6 @@ public:
TypeNode booleanType = d_nm->booleanType();
TypeNode arrayType = d_nm->mkArrayType(realType, integerType);
TypeNode bvType = d_nm->mkBitVectorType(32);
- TypeNode subrangeType = d_nm->mkSubrangeType(SubrangeBounds(Integer(1), Integer(10)));
Node x = d_nm->mkBoundVar("x", realType);
Node xPos = d_nm->mkNode(GT, x, d_nm->mkConst(Rational(0)));
@@ -68,73 +66,42 @@ public:
vector<Expr> formals;
formals.push_back(x.toExpr());
d_smt->defineFunction(lambda.toExpr(), formals, xPos.toExpr());
- TypeNode predicateSubtype = d_nm->mkPredicateSubtype(lambda.toExpr());
TS_ASSERT( not realType.isComparableTo(booleanType) );
TS_ASSERT( realType.isComparableTo(integerType) );
TS_ASSERT( realType.isComparableTo(realType) );
TS_ASSERT( not realType.isComparableTo(arrayType) );
TS_ASSERT( not realType.isComparableTo(bvType) );
- TS_ASSERT( realType.isComparableTo(subrangeType) );
- TS_ASSERT( realType.isComparableTo(predicateSubtype) );
TS_ASSERT( not booleanType.isComparableTo(integerType) );
TS_ASSERT( not booleanType.isComparableTo(realType) );
TS_ASSERT( booleanType.isComparableTo(booleanType) );
TS_ASSERT( not booleanType.isComparableTo(arrayType) );
TS_ASSERT( not booleanType.isComparableTo(bvType) );
- TS_ASSERT( not booleanType.isComparableTo(subrangeType) );
- TS_ASSERT( not booleanType.isComparableTo(predicateSubtype) );
TS_ASSERT( integerType.isComparableTo(realType) );
TS_ASSERT( integerType.isComparableTo(integerType) );
TS_ASSERT( not integerType.isComparableTo(booleanType) );
TS_ASSERT( not integerType.isComparableTo(arrayType) );
TS_ASSERT( not integerType.isComparableTo(bvType) );
- TS_ASSERT( integerType.isComparableTo(subrangeType) );
- TS_ASSERT( integerType.isComparableTo(predicateSubtype) );
TS_ASSERT( not arrayType.isComparableTo(booleanType) );
TS_ASSERT( not arrayType.isComparableTo(integerType) );
TS_ASSERT( not arrayType.isComparableTo(realType) );
TS_ASSERT( arrayType.isComparableTo(arrayType) );
TS_ASSERT( not arrayType.isComparableTo(bvType) );
- TS_ASSERT( not arrayType.isComparableTo(subrangeType) );
- TS_ASSERT( not arrayType.isComparableTo(predicateSubtype) );
TS_ASSERT( not bvType.isComparableTo(booleanType) );
TS_ASSERT( not bvType.isComparableTo(integerType) );
TS_ASSERT( not bvType.isComparableTo(realType) );
TS_ASSERT( not bvType.isComparableTo(arrayType) );
TS_ASSERT( bvType.isComparableTo(bvType) );
- TS_ASSERT( not bvType.isComparableTo(subrangeType) );
- TS_ASSERT( not bvType.isComparableTo(predicateSubtype) );
-
- TS_ASSERT( not subrangeType.isComparableTo(booleanType) );
- TS_ASSERT( subrangeType.isComparableTo(integerType) );
- TS_ASSERT( subrangeType.isComparableTo(realType) );
- TS_ASSERT( not subrangeType.isComparableTo(arrayType) );
- TS_ASSERT( not subrangeType.isComparableTo(bvType) );
- TS_ASSERT( subrangeType.isComparableTo(subrangeType) );
- TS_ASSERT( subrangeType.isComparableTo(predicateSubtype) );
-
- TS_ASSERT( not predicateSubtype.isComparableTo(booleanType) );
- TS_ASSERT( predicateSubtype.isComparableTo(integerType) );
- TS_ASSERT( predicateSubtype.isComparableTo(realType) );
- TS_ASSERT( not predicateSubtype.isComparableTo(arrayType) );
- TS_ASSERT( not predicateSubtype.isComparableTo(bvType) );
- TS_ASSERT( predicateSubtype.isComparableTo(subrangeType) );
- TS_ASSERT( predicateSubtype.isComparableTo(predicateSubtype) );
TS_ASSERT(realType.getBaseType() == realType);
TS_ASSERT(integerType.getBaseType() == realType);
TS_ASSERT(booleanType.getBaseType() == booleanType);
TS_ASSERT(arrayType.getBaseType() == arrayType);
TS_ASSERT(bvType.getBaseType() == bvType);
- TS_ASSERT(subrangeType.getBaseType() == realType);
- TS_ASSERT(predicateSubtype.getBaseType() == realType);
-
- TS_ASSERT(predicateSubtype.getSubtypeParentType() == integerType);
}
};/* TypeNodeWhite */
diff --git a/test/unit/parser/parser_black.h b/test/unit/parser/parser_black.h
index 4fa163050..9266c42b0 100644
--- a/test/unit/parser/parser_black.h
+++ b/test/unit/parser/parser_black.h
@@ -257,10 +257,10 @@ public:
tryBadInput("a : INT; a: INT = 5;"); // can't define after decl
tryBadInput("a : INT = 5; a: BOOLEAN;"); // decl w/ incompatible type
tryBadInput("a : TYPE; a : INT; a : a;"); // ok except a is both INT and sort `a'
- tryBadInput("a : [1..-1];"); // bad subrange
- tryBadInput("a : [0. .0];"); // bad subrange
- tryBadInput("a : [..0];"); // bad subrange
- tryBadInput("a : [0.0];"); // bad subrange
+ //tryBadInput("a : [1..-1];"); // bad subrange
+ //tryBadInput("a : [0. .0];"); // bad subrange
+ //tryBadInput("a : [..0];"); // bad subrange
+ //tryBadInput("a : [0.0];"); // bad subrange
tryBadInput("DATATYPE list = nil | cons(car:INT,cdr:list) END; DATATYPE list = nil | cons(car:INT,cdr:list) END;");
tryBadInput("DATATYPE list = nil | cons(car:INT,cdr:list) END; DATATYPE list2 = nil END;");
tryBadInput("DATATYPE tree = node(data:(list,list,ARRAY trex OF list)), list = cons(car:ARRAY list OF tree,cdr:BITVECTOR(32)) END;");
diff --git a/test/unit/theory/type_enumerator_white.h b/test/unit/theory/type_enumerator_white.h
index 1631ddeba..3094345bd 100644
--- a/test/unit/theory/type_enumerator_white.h
+++ b/test/unit/theory/type_enumerator_white.h
@@ -140,7 +140,7 @@ public:
TS_ASSERT_EQUALS(*++te, d_nm->mkConst(Rational(1, 7)));
TS_ASSERT_EQUALS(*++te, d_nm->mkConst(Rational(-1, 7)));
TS_ASSERT( ! te.isFinished() );
-
+/*
// subrange bounded only below
te = TypeEnumerator(d_nm->mkSubrangeType(SubrangeBounds(SubrangeBound(Integer(0)), SubrangeBound())));
TS_ASSERT( ! te.isFinished() );
@@ -173,6 +173,7 @@ public:
TS_ASSERT_THROWS(*te, NoMoreValuesException);
std::cout<<"here\n";
TS_ASSERT_THROWS(*++te, NoMoreValuesException);
+ */
}
void testDatatypesFinite() {
diff --git a/test/unit/util/subrange_bound_white.h b/test/unit/util/subrange_bound_white.h
deleted file mode 100644
index c6281213c..000000000
--- a/test/unit/util/subrange_bound_white.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************* */
-/*! \file subrange_bound_white.h
- ** \verbatim
- ** Top contributors (to current version):
- ** Morgan Deters, Paul Meng, Tim King
- ** This file is part of the CVC4 project.
- ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS
- ** in the top-level source directory) and their institutional affiliations.
- ** All rights reserved. See the file COPYING in the top-level source
- ** directory for licensing information.\endverbatim
- **
- ** \brief White-box testing of CVC4::SubrangeBound
- **
- ** White-box testing of CVC4::SubrangeBound.
- **/
-
-#include <sstream>
-#include <string>
-
-#include "util/integer.h"
-#include "util/subrange_bound.h"
-
-using namespace CVC4;
-using namespace std;
-
-class SubrangeBoundWhite : public CxxTest::TestSuite {
- stringstream ss;
-
-public:
-
- void testInfinite() {
- SubrangeBound b;
- TS_ASSERT( ! b.hasBound() );
- TS_ASSERT_THROWS( b.getBound(), IllegalArgumentException );
- ss.str(""); ss << b;
- TS_ASSERT_EQUALS( ss.str(), "_" );
- }
-
- void testZero() {
- SubrangeBound b1(0), b2(Integer("0")), b3(Integer("1"));
- TS_ASSERT( b1.hasBound() && b2.hasBound() && b3.hasBound() );
- TS_ASSERT( b1.getBound() == 0 && b2.getBound() == 0 && b3.getBound() == 1 );
- TS_ASSERT( b1 == b2 ); TS_ASSERT( b2 == b1 );
- TS_ASSERT( !(b1 == b3) ); TS_ASSERT( !(b3 == b1) );
- TS_ASSERT( !(b2 == b3) ); TS_ASSERT( !(b3 == b2) );
- TS_ASSERT( !(b1 != b2) ); TS_ASSERT( !(b2 != b1) );
- TS_ASSERT( b1 != b3 ); TS_ASSERT( b3 != b1 );
- TS_ASSERT( b2 != b3 ); TS_ASSERT( b3 != b2 );
- ss.str(""); ss << b1;
- TS_ASSERT( ss.str() == "0" );
- ss.str(""); ss << b2;
- TS_ASSERT( ss.str() == "0" );
- ss.str(""); ss << b3;
- TS_ASSERT( ss.str() == "1" );
- }
-
- void testOne() {
- SubrangeBound b(Integer("1"));
- TS_ASSERT( b.hasBound() );
- TS_ASSERT( b.getBound() == 1 );
- ss.str(""); ss << b;
- TS_ASSERT( ss.str() == "1" );
- }
-
- void testMinusOne() {
- }
-
- void testLarge() {
- }
-
- void testSmall() {
- }
-
-};/* class SubrangeBoundWhite */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback