-cp ${CVC5_JAR_FILE}
-tag "apiNote:a:Note:"
-notimestamp
- --no-module-directories
COMMAND find ${JAVADOC_OUTPUT_DIR} -type f -exec sed -i'orig' 's/<!-- Generated by javadoc [^>]* -->//' {} "\;"
COMMAND find ${SPHINX_GH_OUTPUT_DIR} -name '*orig' -delete
DEPENDS cvc5jar ${CVC5_JAR_FILE}
CVC5_API_TRY_CATCH_END;
}
-bool Sort::isSortConstructor() const
+bool Sort::isUninterpretedSortConstructor() const
{
CVC5_API_TRY_CATCH_BEGIN;
//////// all checks before this line
CVC5_API_CHECK(!d_type->isParametricDatatype()
|| d_type->getNumChildren() == params.size() + 1)
<< "Arity mismatch for instantiated parametric datatype";
- CVC5_API_CHECK(!isSortConstructor()
+ CVC5_API_CHECK(!d_type->isSortConstructor()
|| d_type->getSortConstructorArity() == params.size())
<< "Arity mismatch for instantiated sort constructor";
//////// all checks before this line
/* Sort constructor sort ----------------------------------------------- */
-size_t Sort::getSortConstructorArity() const
+size_t Sort::getUninterpretedSortConstructorArity() const
{
CVC5_API_TRY_CATCH_BEGIN;
CVC5_API_CHECK_NOT_NULL;
- CVC5_API_CHECK(isSortConstructor()) << "Not a sort constructor sort.";
+ CVC5_API_CHECK(d_type->isSortConstructor()) << "Not a sort constructor sort.";
//////// all checks before this line
return d_type->getSortConstructorArity();
////////
CVC5_API_TRY_CATCH_END;
}
-Sort Solver::mkSortConstructorSort(const std::string& symbol,
- size_t arity) const
+Sort Solver::mkUninterpretedSortConstructorSort(const std::string& symbol,
+ size_t arity) const
{
CVC5_API_TRY_CATCH_BEGIN;
CVC5_API_ARG_CHECK_EXPECTED(arity > 0, arity) << "an arity > 0";
bool isUninterpretedSort() const;
/**
- * Is this a sort constructor kind?
+ * Is this an uninterpreted sort constructor kind?
+ *
+ * An uninterpreted sort constructor has arity > 0 and can be instantiated to
+ * construct uninterpreted sorts with given sort parameters.
+ *
* @return true if this is a sort constructor kind
*/
- bool isSortConstructor() const;
+ bool isUninterpretedSortConstructor() const;
/**
* @return the underlying datatype of a datatype sort
Datatype getDatatype() const;
/**
- * Instantiate a parameterized datatype/sort sort.
+ * Instantiate a parameterized datatype sort or uninterpreted sort
+ * constructor sort.
+ *
* Create sorts parameter with Solver::mkParamSort().
+ *
* @param params the list of sort parameters to instantiate with
*/
Sort instantiate(const std::vector<Sort>& params) const;
/* Sort constructor sort ----------------------------------------------- */
/**
- * @return the arity of a sort constructor sort
+ * @return the arity of an uninterpreted sort constructor sort
*/
- size_t getSortConstructorArity() const;
+ size_t getUninterpretedSortConstructorArity() const;
/* Bit-vector sort ----------------------------------------------------- */
Sort mkUnresolvedSort(const std::string& symbol, size_t arity = 0) const;
/**
- * Create a sort constructor sort.
+ * Create an uninterpreted sort constructor sort.
+ *
+ * An uninterpreted sort constructor is an uninterpreted sort with arity > 0.
+ *
* @param symbol the symbol of the sort
- * @param arity the arity of the sort
- * @return the sort constructor sort
+ * @param arity the arity of the sort (must be > 0)
+ * @return the uninterpreted sort constructor sort
*/
- Sort mkSortConstructorSort(const std::string& symbol, size_t arity) const;
+ Sort mkUninterpretedSortConstructorSort(const std::string& symbol,
+ size_t arity) const;
/**
* Create a tuple sort.
* (declare-sort <symbol> <numeral>)
* \endverbatim
*
+ * @note This corresponds to mkUninterpretedSort(const std::string&) const if
+ * arity = 0, and to
+ * mkUninterpretedSortConstructorSort(const std::string&, size_t arity) const
+ * if arity > 0.
+ *
* @param symbol the name of the sort
* @param arity the arity of the sort
* @return the sort
/**
* Create a sort constructor sort.
+ *
+ * An uninterpreted sort constructor is an uninterpreted sort with
+ * arity > 0.
+ *
* @param symbol the symbol of the sort
- * @param arity the arity of the sort
+ * @param arity the arity of the sort (must be > 0)
* @return the sort constructor sort
* @throws CVC5ApiException
*/
- public Sort mkSortConstructorSort(String symbol, int arity) throws CVC5ApiException
+ public Sort mkUninterpretedSortConstructorSort(String symbol, int arity) throws CVC5ApiException
{
Utils.validateUnsigned(arity, "arity");
- long sortPointer = mkSortConstructorSort(pointer, symbol, arity);
+ long sortPointer = mkUninterpretedSortConstructorSort(pointer, symbol, arity);
return new Sort(this, sortPointer);
}
- private native long mkSortConstructorSort(long pointer, String symbol, int arity);
+ private native long mkUninterpretedSortConstructorSort(long pointer, String symbol, int arity);
/**
* Create a tuple sort.
* {@code
* ( declare-sort <symbol> <numeral> )
* }
+ * @apiNote This corresponds to mkUninterpretedSort() const if arity = 0, and
+ * to mkUninterpretedSortConstructorSort() const if arity > 0.
* @param symbol the name of the sort
* @param arity the arity of the sort
* @return the sort
private native boolean isUninterpretedSort(long pointer);
/**
- * Is this a sort constructor kind?
+ * Is this an uninterpreted sort constructor kind?
+ *
+ * An uninterpreted sort constructor is an uninterpreted sort with arity
+ * > 0.
+ *
* @return true if this is a sort constructor kind
*/
- public boolean isSortConstructor()
+ public boolean isUninterpretedSortConstructor()
{
- return isSortConstructor(pointer);
+ return isUninterpretedSortConstructor(pointer);
}
- private native boolean isSortConstructor(long pointer);
+ private native boolean isUninterpretedSortConstructor(long pointer);
/**
* @return the underlying datatype of a datatype sort
private native long getDatatype(long pointer);
/**
- * Instantiate a parameterized datatype/sort sort.
+ * Instantiate a parameterized datatype sort or uninterpreted sort
+ * constructor sort.
* Create sorts parameter with Solver.mkParamSort().
* @param params the list of sort parameters to instantiate with
*/
/* Sort constructor sort ----------------------------------------------- */
/**
- * @return the arity of a sort constructor sort
+ * @return the arity of an uninterpreted sort constructor sort
*/
- public int getSortConstructorArity()
+ public int getUninterpretedSortConstructorArity()
{
- return getSortConstructorArity(pointer);
+ return getUninterpretedSortConstructorArity(pointer);
}
- private native int getSortConstructorArity(long pointer);
+ private native int getUninterpretedSortConstructorArity(long pointer);
/* Bit-vector sort ----------------------------------------------------- */
/*
* Class: io_github_cvc5_api_Solver
- * Method: mkSortConstructorSort
+ * Method: mkUninterpretedSortConstructorSort
* Signature: (JLjava/lang/String;I)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkSortConstructorSort(
+JNIEXPORT jlong JNICALL
+Java_io_github_cvc5_api_Solver_mkUninterpretedSortConstructorSort(
JNIEnv* env, jobject, jlong pointer, jstring jSymbol, jint arity)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Solver* solver = reinterpret_cast<Solver*>(pointer);
const char* s = env->GetStringUTFChars(jSymbol, nullptr);
std::string cSymbol(s);
- Sort* retPointer =
- new Sort(solver->mkSortConstructorSort(cSymbol, (size_t)arity));
+ Sort* retPointer = new Sort(
+ solver->mkUninterpretedSortConstructorSort(cSymbol, (size_t)arity));
env->ReleaseStringUTFChars(jSymbol, s);
return reinterpret_cast<jlong>(retPointer);
/*
* Class: io_github_cvc5_api_Sort
- * Method: isSortConstructor
+ * Method: isUninterpretedSortConstructor
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isSortConstructor(
- JNIEnv* env, jobject, jlong pointer)
+JNIEXPORT jboolean JNICALL
+Java_io_github_cvc5_api_Sort_isUninterpretedSortConstructor(JNIEnv* env,
+ jobject,
+ jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
- return static_cast<jboolean>(current->isSortConstructor());
+ return static_cast<jboolean>(current->isUninterpretedSortConstructor());
CVC5_JAVA_API_TRY_CATCH_END_RETURN(env, static_cast<jboolean>(false));
}
/*
* Class: io_github_cvc5_api_Sort
- * Method: getSortConstructorArity
+ * Method: getUninterpretedSortConstructorArity
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Sort_getSortConstructorArity(
- JNIEnv* env, jobject, jlong pointer)
+JNIEXPORT jint JNICALL
+Java_io_github_cvc5_api_Sort_getUninterpretedSortConstructorArity(JNIEnv* env,
+ jobject,
+ jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
- return static_cast<jint>(current->getSortConstructorArity());
+ return static_cast<jint>(current->getUninterpretedSortConstructorArity());
CVC5_JAVA_API_TRY_CATCH_END_RETURN(env, 0);
}
Sort mkSequenceSort(Sort elemSort) except +
Sort mkUninterpretedSort(const string& symbol) except +
Sort mkUnresolvedSort(const string& symbol, size_t arity) except +
- Sort mkSortConstructorSort(const string& symbol, size_t arity) except +
+ Sort mkUninterpretedSortConstructorSort(const string& symbol, size_t arity) except +
Sort mkTupleSort(const vector[Sort]& sorts) except +
Term mkTerm(Op op) except +
Term mkTerm(Op op, const vector[Term]& children) except +
bint isBag() except +
bint isSequence() except +
bint isUninterpretedSort() except +
- bint isSortConstructor() except +
+ bint isUninterpretedSortConstructor() except +
Datatype getDatatype() except +
Sort instantiate(const vector[Sort]& params) except +
Sort substitute(const vector[Sort] & es, const vector[Sort] & reps) except +
Sort getSequenceElementSort() except +
bint isUninterpretedSortParameterized() except +
vector[Sort] getUninterpretedSortParamSorts() except +
- size_t getSortConstructorArity() except +
+ size_t getUninterpretedSortConstructorArity() except +
uint32_t getBitVectorSize() except +
uint32_t getFloatingPointExponentSize() except +
uint32_t getFloatingPointSignificandSize() except +
sort.csort = self.csolver.mkUnresolvedSort(name.encode(), arity)
return sort
- def mkSortConstructorSort(self, str symbol, size_t arity):
+ def mkUninterpretedSortConstructorSort(self, str symbol, size_t arity):
"""Create a sort constructor sort.
+ An uninterpreted sort constructor is an uninterpreted sort with
+ arity > 0.
+
:param symbol: the symbol of the sort
- :param arity: the arity of the sort
+ :param arity: the arity of the sort (must be > 0)
:return: the sort constructor sort
"""
cdef Sort sort = Sort(self)
- sort.csort =self.csolver.mkSortConstructorSort(symbol.encode(), arity)
+ sort.csort = self.csolver.mkUninterpretedSortConstructorSort(
+ symbol.encode(), arity)
return sort
@expand_list_arg(num_req_args=0)
( declare-sort <symbol> <numeral> )
+ .. note::
+ This corresponds to :py:meth:`Solver.mkUninterpretedSort()` if
+ arity = 0, and to
+ :py:meth:`Solver.mkUninterpretedSortConstructorSort()` if arity > 0.
+
:param symbol: the name of the sort
:param arity: the arity of the sort
:return: the sort
"""
return self.csort.isUninterpretedSort()
- def isSortConstructor(self):
+ def isUninterpretedSortConstructor(self):
"""
Is this a sort constructor kind?
+ An uninterpreted sort constructor is an uninterpreted sort with
+ arity > 0.
+
:return: True if this a sort constructor kind.
"""
- return self.csort.isSortConstructor()
+ return self.csort.isUninterpretedSortConstructor()
def getDatatype(self):
"""
def instantiate(self, params):
"""
- Instantiate a parameterized datatype/sort sort.
+ Instantiate a parameterized datatype sort or uninterpreted sort
+ constructor sort.
Create sorts parameter with :py:meth:`Solver.mkParamSort()`
:param params: the list of sort parameters to instantiate with
param_sorts.append(sort)
return param_sorts
- def getSortConstructorArity(self):
+ def getUninterpretedSortConstructorArity(self):
"""
:return: the arity of a sort constructor sort
"""
- return self.csort.getSortConstructorArity()
+ return self.csort.getUninterpretedSortConstructorArity()
def getBitVectorSize(self):
"""
"expected parametric datatype");
return p.second.instantiate(params);
}
- bool isSortConstructor = p.second.isSortConstructor();
+ bool isSortConstructor = p.second.isUninterpretedSortConstructor();
if (TraceIsOn("sort"))
{
Trace("sort") << "instantiating using a sort "
{
Trace("parser") << "newSortConstructor(" << name << ", " << arity << ")"
<< std::endl;
- api::Sort type = d_solver->mkSortConstructorSort(name, arity);
+ api::Sort type = d_solver->mkUninterpretedSortConstructorSort(name, arity);
defineType(name, vector<api::Sort>(arity), type);
return type;
}
api::Sort Parser::mkUnresolvedTypeConstructor(const std::string& name,
size_t arity)
{
- api::Sort unresolved = d_solver->mkSortConstructorSort(name, arity);
+ api::Sort unresolved =
+ d_solver->mkUninterpretedSortConstructorSort(name, arity);
defineType(name, vector<api::Sort>(arity), unresolved);
d_unresolved.insert(unresolved);
return unresolved;
{
Trace("parser") << "newSortConstructor(P)(" << name << ", " << params.size()
<< ")" << std::endl;
- api::Sort unresolved = d_solver->mkSortConstructorSort(name, params.size());
+ api::Sort unresolved =
+ d_solver->mkUninterpretedSortConstructorSort(name, params.size());
defineType(name, params, unresolved);
api::Sort t = getSort(name, params);
d_unresolved.insert(unresolved);
* END;
*/
unresTypes.clear();
- Sort unresList5 = d_solver.mkSortConstructorSort("list5", 1);
+ Sort unresList5 = d_solver.mkUninterpretedSortConstructorSort("list5", 1);
unresTypes.insert(unresList5);
std::vector<Sort> v;
*/
// Make unresolved types as placeholders
std::set<Sort> unresTypes;
- Sort unresList = d_solver.mkSortConstructorSort("plist", 1);
+ Sort unresList = d_solver.mkUninterpretedSortConstructorSort("plist", 1);
unresTypes.insert(unresList);
std::vector<Sort> v;
{
Sort s1 = d_solver.getBooleanSort();
- Sort u1 = d_solver.mkSortConstructorSort("_x0", 1);
- Sort u2 = d_solver.mkSortConstructorSort("_x1", 1);
+ Sort u1 = d_solver.mkUninterpretedSortConstructorSort("_x0", 1);
+ Sort u2 = d_solver.mkUninterpretedSortConstructorSort("_x1", 1);
Sort p1 = d_solver.mkParamSort("_x4");
Sort p2 = d_solver.mkParamSort("_x27");
Sort p3 = d_solver.mkParamSort("_x3");
ASSERT_NO_THROW(d_solver.mkUnresolvedSort("", 1));
}
-TEST_F(TestApiBlackSolver, mkSortConstructorSort)
+TEST_F(TestApiBlackSolver, mkUninterpretedSortConstructorSort)
{
- ASSERT_NO_THROW(d_solver.mkSortConstructorSort("s", 2));
- ASSERT_NO_THROW(d_solver.mkSortConstructorSort("", 2));
- ASSERT_THROW(d_solver.mkSortConstructorSort("", 0), CVC5ApiException);
+ ASSERT_NO_THROW(d_solver.mkUninterpretedSortConstructorSort("s", 2));
+ ASSERT_NO_THROW(d_solver.mkUninterpretedSortConstructorSort("", 2));
+ ASSERT_THROW(d_solver.mkUninterpretedSortConstructorSort("", 0),
+ CVC5ApiException);
}
TEST_F(TestApiBlackSolver, mkTupleSort)
ASSERT_NO_THROW(Sort().isUninterpretedSort());
}
-TEST_F(TestApiBlackSort, isSortConstructor)
+TEST_F(TestApiBlackSort, isUninterpretedSortConstructor)
{
- Sort sc_sort = d_solver.mkSortConstructorSort("asdf", 1);
- ASSERT_TRUE(sc_sort.isSortConstructor());
- ASSERT_NO_THROW(Sort().isSortConstructor());
+ Sort sc_sort = d_solver.mkUninterpretedSortConstructorSort("asdf", 1);
+ ASSERT_TRUE(sc_sort.isUninterpretedSortConstructor());
+ ASSERT_NO_THROW(Sort().isUninterpretedSortConstructor());
}
TEST_F(TestApiBlackSort, getDatatype)
{
Sort uSort = d_solver.mkUninterpretedSort("u");
ASSERT_FALSE(uSort.isUninterpretedSortParameterized());
- Sort sSort = d_solver.mkSortConstructorSort("s", 1);
+ Sort sSort = d_solver.mkUninterpretedSortConstructorSort("s", 1);
Sort siSort = sSort.instantiate({uSort});
ASSERT_TRUE(siSort.isUninterpretedSortParameterized());
Sort bvSort = d_solver.mkBitVectorSort(32);
{
Sort uSort = d_solver.mkUninterpretedSort("u");
ASSERT_NO_THROW(uSort.getUninterpretedSortParamSorts());
- Sort sSort = d_solver.mkSortConstructorSort("s", 2);
+ Sort sSort = d_solver.mkUninterpretedSortConstructorSort("s", 2);
Sort siSort = sSort.instantiate({uSort, uSort});
ASSERT_EQ(siSort.getUninterpretedSortParamSorts().size(), 2);
Sort bvSort = d_solver.mkBitVectorSort(32);
TEST_F(TestApiBlackSort, getUninterpretedSortConstructorName)
{
- Sort sSort = d_solver.mkSortConstructorSort("s", 2);
+ Sort sSort = d_solver.mkUninterpretedSortConstructorSort("s", 2);
ASSERT_NO_THROW(sSort.getSymbol());
Sort bvSort = d_solver.mkBitVectorSort(32);
ASSERT_THROW(bvSort.getSymbol(), CVC5ApiException);
TEST_F(TestApiBlackSort, getUninterpretedSortConstructorArity)
{
- Sort sSort = d_solver.mkSortConstructorSort("s", 2);
- ASSERT_NO_THROW(sSort.getSortConstructorArity());
+ Sort sSort = d_solver.mkUninterpretedSortConstructorSort("s", 2);
+ ASSERT_NO_THROW(sSort.getUninterpretedSortConstructorArity());
Sort bvSort = d_solver.mkBitVectorSort(32);
- ASSERT_THROW(bvSort.getSortConstructorArity(), CVC5ApiException);
+ ASSERT_THROW(bvSort.getUninterpretedSortConstructorArity(), CVC5ApiException);
}
TEST_F(TestApiBlackSort, getBitVectorSize)
* END;
*/
unresTypes.clear();
- Sort unresList5 = d_solver.mkSortConstructorSort("list5", 1);
+ Sort unresList5 = d_solver.mkUninterpretedSortConstructorSort("list5", 1);
unresTypes.add(unresList5);
List<Sort> v = new ArrayList<>();
*/
// Make unresolved types as placeholders
Set<Sort> unresTypes = new HashSet<>();
- Sort unresList = d_solver.mkSortConstructorSort("plist", 1);
+ Sort unresList = d_solver.mkUninterpretedSortConstructorSort("plist", 1);
unresTypes.add(unresList);
List<Sort> v = new ArrayList<>();
assertDoesNotThrow(() -> d_solver.mkUnresolvedSort("", 1));
}
- @Test void mkSortConstructorSort() throws CVC5ApiException
+ @Test void mkUninterpretedSortConstructorSort() throws CVC5ApiException
{
- assertDoesNotThrow(() -> d_solver.mkSortConstructorSort("s", 2));
- assertDoesNotThrow(() -> d_solver.mkSortConstructorSort("", 2));
- assertThrows(CVC5ApiException.class, () -> d_solver.mkSortConstructorSort("", 0));
+ assertDoesNotThrow(() -> d_solver.mkUninterpretedSortConstructorSort("s", 2));
+ assertDoesNotThrow(() -> d_solver.mkUninterpretedSortConstructorSort("", 2));
+ assertThrows(CVC5ApiException.class, () -> d_solver.mkUninterpretedSortConstructorSort("", 0));
}
@Test void mkTupleSort() throws CVC5ApiException
assertDoesNotThrow(() -> d_solver.getNullSort().isUninterpretedSort());
}
- @Test void isSortConstructor() throws CVC5ApiException
+ @Test void isUninterpretedSortSortConstructor() throws CVC5ApiException
{
- Sort sc_sort = d_solver.mkSortConstructorSort("asdf", 1);
- assertTrue(sc_sort.isSortConstructor());
- assertDoesNotThrow(() -> d_solver.getNullSort().isSortConstructor());
+ Sort sc_sort = d_solver.mkUninterpretedSortConstructorSort("asdf", 1);
+ assertTrue(sc_sort.isUninterpretedSortConstructor());
+ assertDoesNotThrow(() -> d_solver.getNullSort().isUninterpretedSortConstructor());
}
@Test void getDatatype() throws CVC5ApiException
{
Sort uSort = d_solver.mkUninterpretedSort("u");
assertFalse(uSort.isUninterpretedSortParameterized());
- Sort sSort = d_solver.mkSortConstructorSort("s", 1);
+ Sort sSort = d_solver.mkUninterpretedSortConstructorSort("s", 1);
Sort siSort = sSort.instantiate(new Sort[] {uSort});
assertTrue(siSort.isUninterpretedSortParameterized());
Sort bvSort = d_solver.mkBitVectorSort(32);
{
Sort uSort = d_solver.mkUninterpretedSort("u");
assertDoesNotThrow(() -> uSort.getUninterpretedSortParamSorts());
- Sort sSort = d_solver.mkSortConstructorSort("s", 2);
+ Sort sSort = d_solver.mkUninterpretedSortConstructorSort("s", 2);
Sort siSort = sSort.instantiate(new Sort[] {uSort, uSort});
assertEquals(siSort.getUninterpretedSortParamSorts().length, 2);
Sort bvSort = d_solver.mkBitVectorSort(32);
@Test void getUninterpretedSortConstructorName() throws CVC5ApiException
{
- Sort sSort = d_solver.mkSortConstructorSort("s", 2);
+ Sort sSort = d_solver.mkUninterpretedSortConstructorSort("s", 2);
assertDoesNotThrow(() -> sSort.getSymbol());
Sort bvSort = d_solver.mkBitVectorSort(32);
assertThrows(CVC5ApiException.class, () -> bvSort.getSymbol());
@Test void getUninterpretedSortConstructorArity() throws CVC5ApiException
{
- Sort sSort = d_solver.mkSortConstructorSort("s", 2);
- assertDoesNotThrow(() -> sSort.getSortConstructorArity());
+ Sort sSort = d_solver.mkUninterpretedSortConstructorSort("s", 2);
+ assertDoesNotThrow(() -> sSort.getUninterpretedSortConstructorArity());
Sort bvSort = d_solver.mkBitVectorSort(32);
- assertThrows(CVC5ApiException.class, () -> bvSort.getSortConstructorArity());
+ assertThrows(CVC5ApiException.class, () -> bvSort.getUninterpretedSortConstructorArity());
}
@Test void getBitVectorSize() throws CVC5ApiException
# list5[X] = cons(car: X, cdr: list5[list5[X]]) | nil
# END
unresTypes.clear()
- unresList5 = solver.mkSortConstructorSort("list5", 1)
+ unresList5 = solver.mkUninterpretedSortConstructorSort("list5", 1)
unresTypes.add(unresList5)
v = []
# Make unresolved types as placeholders
unresTypes = set([])
- unresList = solver.mkSortConstructorSort("plist", 1)
+ unresList = solver.mkUninterpretedSortConstructorSort("plist", 1)
unresTypes.add(unresList)
v = []
def test_mk_sort_constructor_sort(solver):
- solver.mkSortConstructorSort("s", 2)
- solver.mkSortConstructorSort("", 2)
+ solver.mkUninterpretedSortConstructorSort("s", 2)
+ solver.mkUninterpretedSortConstructorSort("", 2)
with pytest.raises(RuntimeError):
- solver.mkSortConstructorSort("", 0)
+ solver.mkUninterpretedSortConstructorSort("", 0)
def test_mk_tuple_sort(solver):
def test_is_sort_constructor(solver):
- sc_sort = solver.mkSortConstructorSort("asdf", 1)
- assert sc_sort.isSortConstructor()
- Sort(solver).isSortConstructor()
+ sc_sort = solver.mkUninterpretedSortConstructorSort("asdf", 1)
+ assert sc_sort.isUninterpretedSortConstructor()
+ Sort(solver).isUninterpretedSortConstructor()
def test_get_datatype(solver):
def test_is_uninterpreted_sort_parameterized(solver):
uSort = solver.mkUninterpretedSort("u")
assert not uSort.isUninterpretedSortParameterized()
- sSort = solver.mkSortConstructorSort("s", 1)
+ sSort = solver.mkUninterpretedSortConstructorSort("s", 1)
siSort = sSort.instantiate([uSort])
assert siSort.isUninterpretedSortParameterized()
bvSort = solver.mkBitVectorSort(32)
def test_get_uninterpreted_sort_paramsorts(solver):
uSort = solver.mkUninterpretedSort("u")
uSort.getUninterpretedSortParamSorts()
- sSort = solver.mkSortConstructorSort("s", 2)
+ sSort = solver.mkUninterpretedSortConstructorSort("s", 2)
siSort = sSort.instantiate([uSort, uSort])
assert len(siSort.getUninterpretedSortParamSorts()) == 2
bvSort = solver.mkBitVectorSort(32)
def test_get_uninterpreted_sort_constructor_name(solver):
- sSort = solver.mkSortConstructorSort("s", 2)
+ sSort = solver.mkUninterpretedSortConstructorSort("s", 2)
sSort.getSymbol()
bvSort = solver.mkBitVectorSort(32)
with pytest.raises(RuntimeError):
def test_get_uninterpreted_sort_constructor_arity(solver):
- sSort = solver.mkSortConstructorSort("s", 2)
- sSort.getSortConstructorArity()
+ sSort = solver.mkUninterpretedSortConstructorSort("s", 2)
+ sSort.getUninterpretedSortConstructorArity()
bvSort = solver.mkBitVectorSort(32)
with pytest.raises(RuntimeError):
- bvSort.getSortConstructorArity()
+ bvSort.getUninterpretedSortConstructorArity()
def test_get_bv_size(solver):