(self, tp)
Convert a pySMT type into the corresponding Z3 sort.
Convert a pySMT type into the corresponding Z3 sort.
Convert a pySMT type into the corresponding Z3 sort .
def _type_to_z3(self, tp):
        """Convert a pySMT type into the corresponding Z3 sort."""
        if tp.is_bool_type():
            return self.z3BoolSort
        elif tp.is_real_type():
            return self.z3RealSort
        elif tp.is_int_type():
            return self.z3IntSort
        elif tp.is_array_type():
            key_sort = self._type_to_z3(tp.index_type)
            val_sort = self._type_to_z3(tp.elem_type)
            return self.z3ArraySort(key_sort, val_sort)
        elif tp.is_bv_type():
            return self.z3BitVecSort(tp.width)
        else:
            assert tp.is_custom_type(), "Unsupported type '%s'" % tp
            return self.z3Sort(tp)
        raise NotImplementedError("Unsupported type in conversion: %s" % tp)
def _type_to_z3 ( self , tp ) : if tp . is_bool_type ( ) : return self . z3BoolSort elif tp . is_real_type ( ) : return self . z3RealSort elif tp . is_int_type ( ) : return self . z3IntSort elif tp . is_array_type ( ) : key_sort = self . _type_to_z3 ( tp . index_type ) val_sort = self . _type_to_z3 ( tp . elem_type ) return self . z3ArraySort ( key_sort , val_sort ) elif tp . is_bv_type ( ) : return self . z3BitVecSort ( tp . width ) else : assert tp . is_custom_type ( ) , "Unsupported type '%s'" % tp return self . z3Sort ( tp ) raise NotImplementedError ( "Unsupported type in conversion: %s" % tp )