def test_is_selector(solver): dt_sort = create_datatype_sort(solver) dt = dt_sort.getDatatype() dt0 = dt[0] dt01 = dt0[1] cons_sort = dt01.getSelectorTerm().getSort() assert cons_sort.isSelector() Sort(solver).isSelector()
def test_is_first_class(solver): fun_sort = solver.mkFunctionSort(solver.getRealSort(), solver.getIntegerSort()) assert solver.getIntegerSort().isFirstClass() assert fun_sort.isFirstClass() reSort = solver.getRegExpSort() assert not reSort.isFirstClass() Sort(solver).isFirstClass()
def test_is_function_like(solver): fun_sort = solver.mkFunctionSort(solver.getRealSort(), solver.getIntegerSort()) assert not solver.getIntegerSort().isFunctionLike() assert fun_sort.isFunctionLike() dt_sort = create_datatype_sort(solver) dt = dt_sort.getDatatype() cons_sort = dt[0][1].getSelectorTerm().getSort() assert cons_sort.isFunctionLike() Sort(solver).isFunctionLike()
def test_operators_comparison(solver): solver.getIntegerSort() == Sort(solver) solver.getIntegerSort() != Sort(solver) solver.getIntegerSort() < Sort(solver) solver.getIntegerSort() <= Sort(solver) solver.getIntegerSort() > Sort(solver) solver.getIntegerSort() >= Sort(solver)
def test_is_floating_point(solver): if solver.supportsFloatingPoint(): assert solver.mkFloatingPointSort(8, 24).isFloatingPoint() Sort(solver).isFloatingPoint()
def test_is_rounding_mode(solver): if solver.supportsFloatingPoint(): assert solver.getRoundingModeSort().isRoundingMode() Sort(solver).isRoundingMode()
def test_is_string(solver): assert solver.getStringSort().isString() Sort(solver).isString()
def test_is_integer(solver): assert solver.getIntegerSort().isInteger() assert not solver.getRealSort().isInteger() Sort(solver).isInteger()
def test_is_subsort_of(solver): assert solver.getIntegerSort().isSubsortOf(solver.getIntegerSort()) assert solver.getIntegerSort().isSubsortOf(solver.getRealSort()) assert not solver.getIntegerSort().isSubsortOf(solver.getBooleanSort()) Sort(solver).isSubsortOf(Sort(solver))
def test_is_function(solver): fun_sort = solver.mkFunctionSort(solver.getRealSort(), solver.getIntegerSort()) assert fun_sort.isFunction() Sort(solver).isFunction()
def test_is_tester(solver): dt_sort = create_datatype_sort(solver) dt = dt_sort.getDatatype() cons_sort = dt[0].getTesterTerm().getSort() assert cons_sort.isTester() Sort(solver).isTester()
def test_is_constructor(solver): dt_sort = create_datatype_sort(solver) dt = dt_sort.getDatatype() cons_sort = dt[0].getConstructorTerm().getSort() assert cons_sort.isConstructor() Sort(solver).isConstructor()
def test_is_parametric_datatype(solver): param_dt_sort = create_param_datatype_sort(solver) assert param_dt_sort.isParametricDatatype() Sort(solver).isParametricDatatype()
def test_is_datatype(solver): dt_sort = create_datatype_sort(solver) assert dt_sort.isDatatype() Sort(solver).isDatatype()
def test_is_uninterpreted(solver): un_sort = solver.mkUninterpretedSort("asdf") assert un_sort.isUninterpretedSort() Sort(solver).isUninterpretedSort()
def test_is_sort_constructor(solver): sc_sort = solver.mkSortConstructorSort("asdf", 1) assert sc_sort.isSortConstructor() Sort(solver).isSortConstructor()
def test_is_predicate(solver): pred_sort = solver.mkPredicateSort(solver.getRealSort()) assert pred_sort.isPredicate() Sort(solver).isPredicate()
def test_is_tuple(solver): tup_sort = solver.mkTupleSort(solver.getRealSort()) assert tup_sort.isTuple() Sort(solver).isTuple()
def test_is_record(solver): rec_sort = solver.mkRecordSort([("asdf", solver.getRealSort())]) assert rec_sort.isRecord() Sort(solver).isRecord()
def test_is_comparable_to(solver): assert solver.getIntegerSort().isComparableTo(solver.getIntegerSort()) assert solver.getIntegerSort().isComparableTo(solver.getRealSort()) assert not solver.getIntegerSort().isComparableTo(solver.getBooleanSort()) Sort(solver).isComparableTo(Sort(solver))
def test_is_array(solver): arr_sort = solver.mkArraySort(solver.getRealSort(), solver.getIntegerSort()) assert arr_sort.isArray() Sort(solver).isArray()
def test_is_boolean(solver): assert solver.getBooleanSort().isBoolean() Sort(solver).isBoolean()
def test_is_set(solver): set_sort = solver.mkSetSort(solver.getRealSort()) assert set_sort.isSet() Sort(solver).isSet()
def test_is_real(solver): assert solver.getRealSort().isReal() assert not solver.getIntegerSort().isReal() Sort(solver).isReal()
def test_is_bag(solver): bag_sort = solver.mkBagSort(solver.getRealSort()) assert bag_sort.isBag() Sort(solver).isBag()
def test_is_reg_exp(solver): assert solver.getRegExpSort().isRegExp() Sort(solver).isRegExp()
def test_is_sequence(solver): seq_sort = solver.mkSequenceSort(solver.getRealSort()) assert seq_sort.isSequence() Sort(solver).isSequence()
def test_is_bit_vector(solver): assert solver.mkBitVectorSort(8).isBitVector() Sort(solver).isBitVector()
def test_is_rounding_mode(solver): assert solver.getRoundingModeSort().isRoundingMode() Sort(solver).isRoundingMode()