/* Bit-vector sort ----------------------------------------------------- */
-uint32_t Sort::getBVSize() const
+uint32_t Sort::getBitVectorSize() const
{
CVC5_API_TRY_CATCH_BEGIN;
CVC5_API_CHECK_NOT_NULL;
/* Floating-point sort ------------------------------------------------- */
-uint32_t Sort::getFPExponentSize() const
+uint32_t Sort::getFloatingPointExponentSize() const
{
CVC5_API_TRY_CATCH_BEGIN;
CVC5_API_CHECK_NOT_NULL;
CVC5_API_TRY_CATCH_END;
}
-uint32_t Sort::getFPSignificandSize() const
+uint32_t Sort::getFloatingPointSignificandSize() const
{
CVC5_API_TRY_CATCH_BEGIN;
CVC5_API_CHECK_NOT_NULL;
CVC5_API_ARG_CHECK_EXPECTED(exp > 0, exp) << "a value > 0";
CVC5_API_ARG_CHECK_EXPECTED(sig > 0, sig) << "a value > 0";
uint32_t bw = exp + sig;
- CVC5_API_ARG_CHECK_EXPECTED(bw == val.getSort().getBVSize(), val)
+ CVC5_API_ARG_CHECK_EXPECTED(bw == val.d_node->getType().getBitVectorSize(),
+ val)
<< "a bit-vector constant with bit-width '" << bw << "'";
CVC5_API_ARG_CHECK_EXPECTED(
- val.getSort().isBitVector() && val.d_node->isConst(), val)
+ val.d_node->getType().isBitVector() && val.d_node->isConst(), val)
<< "bit-vector constant";
//////// all checks before this line
return mkValHelper<cvc5::FloatingPoint>(
/**
* @return the bit-width of the bit-vector sort
*/
- uint32_t getBVSize() const;
+ uint32_t getBitVectorSize() const;
/* Floating-point sort ------------------------------------------------- */
/**
* @return the bit-width of the exponent of the floating-point sort
*/
- uint32_t getFPExponentSize() const;
+ uint32_t getFloatingPointExponentSize() const;
/**
* @return the width of the significand of the floating-point sort
*/
- uint32_t getFPSignificandSize() const;
+ uint32_t getFloatingPointSignificandSize() const;
/* Datatype sort ------------------------------------------------------- */
/**
* @return the bit-width of the bit-vector sort
*/
- public int getBVSize()
+ public int getBitVectorSize()
{
- return getBVSize(pointer);
+ return getBitVectorSize(pointer);
}
- private native int getBVSize(long pointer);
+ private native int getBitVectorSize(long pointer);
/* Floating-point sort ------------------------------------------------- */
/**
* @return the bit-width of the exponent of the floating-point sort
*/
- public int getFPExponentSize()
+ public int getFloatingPointExponentSize()
{
- return getFPExponentSize(pointer);
+ return getFloatingPointExponentSize(pointer);
}
- private native int getFPExponentSize(long pointer);
+ private native int getFloatingPointExponentSize(long pointer);
/**
* @return the width of the significand of the floating-point sort
*/
- public int getFPSignificandSize()
+ public int getFloatingPointSignificandSize()
{
- return getFPSignificandSize(pointer);
+ return getFloatingPointSignificandSize(pointer);
}
- private native int getFPSignificandSize(long pointer);
+ private native int getFloatingPointSignificandSize(long pointer);
/* Datatype sort ------------------------------------------------------- */
/*
* Class: cvc5_Sort
- * Method: getBVSize
+ * Method: getBitVectorSize
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_cvc5_Sort_getBVSize(JNIEnv* env,
- jobject,
- jlong pointer)
+JNIEXPORT jint JNICALL Java_cvc5_Sort_getBitVectorSize(JNIEnv* env,
+ jobject,
+ jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
- return static_cast<jint>(current->getBVSize());
+ return static_cast<jint>(current->getBitVectorSize());
CVC5_JAVA_API_TRY_CATCH_END_RETURN(env, 0);
}
/*
* Class: cvc5_Sort
- * Method: getFPExponentSize
+ * Method: getFloatingPointExponentSize
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_cvc5_Sort_getFPExponentSize(JNIEnv* env,
- jobject,
- jlong pointer)
+JNIEXPORT jint JNICALL
+Java_cvc5_Sort_getFloatingPointExponentSize(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
- return static_cast<jint>(current->getFPExponentSize());
+ return static_cast<jint>(current->getFloatingPointExponentSize());
CVC5_JAVA_API_TRY_CATCH_END_RETURN(env, 0);
}
/*
* Class: cvc5_Sort
- * Method: getFPSignificandSize
+ * Method: getFloatingPointSignificandSize
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_cvc5_Sort_getFPSignificandSize(JNIEnv* env,
- jobject,
- jlong pointer)
+JNIEXPORT jint JNICALL Java_cvc5_Sort_getFloatingPointSignificandSize(
+ JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
- return static_cast<jint>(current->getFPSignificandSize());
+ return static_cast<jint>(current->getFloatingPointSignificandSize());
CVC5_JAVA_API_TRY_CATCH_END_RETURN(env, 0);
}
vector[Sort] getUninterpretedSortParamSorts() except +
string getSortConstructorName() except +
size_t getSortConstructorArity() except +
- uint32_t getBVSize() except +
- uint32_t getFPExponentSize() except +
- uint32_t getFPSignificandSize() except +
+ uint32_t getBitVectorSize() except +
+ uint32_t getFloatingPointExponentSize() except +
+ uint32_t getFloatingPointSignificandSize() except +
vector[Sort] getDatatypeParamSorts() except +
size_t getDatatypeArity() except +
size_t getTupleLength() except +
def getSortConstructorArity(self):
return self.csort.getSortConstructorArity()
- def getBVSize(self):
- return self.csort.getBVSize()
+ def getBitVectorSize(self):
+ return self.csort.getBitVectorSize()
- def getFPExponentSize(self):
- return self.csort.getFPExponentSize()
+ def getFloatingPointExponentSize(self):
+ return self.csort.getFloatingPointExponentSize()
- def getFPSignificandSize(self):
- return self.csort.getFPSignificandSize()
+ def getFloatingPointSignificandSize(self):
+ return self.csort.getFloatingPointSignificandSize()
def getDatatypeParamSorts(self):
param_sorts = []
solver.setLogic("QF_BV");
Sort bvsort12979 = solver.mkBitVectorSort(12979);
Term input2_1 = solver.mkConst(bvsort12979, "intpu2_1");
- Term zero = solver.mkBitVector(bvsort12979.getBVSize(), "0", 10);
+ Term zero = solver.mkBitVector(bvsort12979.getBitVectorSize(), "0", 10);
vector<Term> args1;
args1.push_back(zero);
def test_get_bv_size(solver):
bvSort = solver.mkBitVectorSort(32)
- bvSort.getBVSize()
+ bvSort.getBitVectorSize()
setSort = solver.mkSetSort(solver.getIntegerSort())
with pytest.raises(RuntimeError):
- setSort.getBVSize()
+ setSort.getBitVectorSize()
def test_get_fp_exponent_size(solver):
fpSort = solver.mkFloatingPointSort(4, 8)
- fpSort.getFPExponentSize()
+ fpSort.getFloatingPointExponentSize()
setSort = solver.mkSetSort(solver.getIntegerSort())
with pytest.raises(RuntimeError):
- setSort.getFPExponentSize()
+ setSort.getFloatingPointExponentSize()
def test_get_fp_significand_size(solver):
fpSort = solver.mkFloatingPointSort(4, 8)
- fpSort.getFPSignificandSize()
+ fpSort.getFloatingPointSignificandSize()
setSort = solver.mkSetSort(solver.getIntegerSort())
with pytest.raises(RuntimeError):
- setSort.getFPSignificandSize()
+ setSort.getFloatingPointSignificandSize()
def test_get_datatype_paramsorts(solver):
assertThrows(CVC5ApiException.class, () -> bvSort.getSortConstructorArity());
}
- @Test void getBVSize() throws CVC5ApiException
+ @Test void getBitVectorSize() throws CVC5ApiException
{
Sort bvSort = d_solver.mkBitVectorSort(32);
- assertDoesNotThrow(() -> bvSort.getBVSize());
+ assertDoesNotThrow(() -> bvSort.getBitVectorSize());
Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
- assertThrows(CVC5ApiException.class, () -> setSort.getBVSize());
+ assertThrows(CVC5ApiException.class, () -> setSort.getBitVectorSize());
}
- @Test void getFPExponentSize() throws CVC5ApiException
+ @Test void getFloatingPointExponentSize() throws CVC5ApiException
{
Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
- assertDoesNotThrow(() -> fpSort.getFPExponentSize());
+ assertDoesNotThrow(() -> fpSort.getFloatingPointExponentSize());
Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
- assertThrows(CVC5ApiException.class, () -> setSort.getFPExponentSize());
+ assertThrows(CVC5ApiException.class, () -> setSort.getFloatingPointExponentSize());
}
- @Test void getFPSignificandSize() throws CVC5ApiException
+ @Test void getFloatingPointSignificandSize() throws CVC5ApiException
{
Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
- assertDoesNotThrow(() -> fpSort.getFPSignificandSize());
+ assertDoesNotThrow(() -> fpSort.getFloatingPointSignificandSize());
Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
- assertThrows(CVC5ApiException.class, () -> setSort.getFPSignificandSize());
+ assertThrows(CVC5ApiException.class, () -> setSort.getFloatingPointSignificandSize());
}
@Test void getDatatypeParamSorts() throws CVC5ApiException
ASSERT_THROW(bvSort.getSortConstructorArity(), CVC5ApiException);
}
-TEST_F(TestApiBlackSort, getBVSize)
+TEST_F(TestApiBlackSort, getBitVectorSize)
{
Sort bvSort = d_solver.mkBitVectorSort(32);
- ASSERT_NO_THROW(bvSort.getBVSize());
+ ASSERT_NO_THROW(bvSort.getBitVectorSize());
Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
- ASSERT_THROW(setSort.getBVSize(), CVC5ApiException);
+ ASSERT_THROW(setSort.getBitVectorSize(), CVC5ApiException);
}
-TEST_F(TestApiBlackSort, getFPExponentSize)
+TEST_F(TestApiBlackSort, getFloatingPointExponentSize)
{
Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
- ASSERT_NO_THROW(fpSort.getFPExponentSize());
+ ASSERT_NO_THROW(fpSort.getFloatingPointExponentSize());
Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
- ASSERT_THROW(setSort.getFPExponentSize(), CVC5ApiException);
+ ASSERT_THROW(setSort.getFloatingPointExponentSize(), CVC5ApiException);
}
-TEST_F(TestApiBlackSort, getFPSignificandSize)
+TEST_F(TestApiBlackSort, getFloatingPointSignificandSize)
{
Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
- ASSERT_NO_THROW(fpSort.getFPSignificandSize());
+ ASSERT_NO_THROW(fpSort.getFloatingPointSignificandSize());
Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
- ASSERT_THROW(setSort.getFPSignificandSize(), CVC5ApiException);
+ ASSERT_THROW(setSort.getFloatingPointSignificandSize(), CVC5ApiException);
}
TEST_F(TestApiBlackSort, getDatatypeParamSorts)