45 return isa<BitVectorType>(
unwrap(type));
65 return isa<SMTFuncType>(
unwrap(type));
69 const MlirType *domainTypes,
72 domainTypesVec.reserve(numberOfDomainTypes);
74 for (
size_t i = 0; i < numberOfDomainTypes; i++)
75 domainTypesVec.push_back(
unwrap(domainTypes[i]));
83 size_t numberOfSortParams,
84 const MlirType *sortParams) {
86 sortParamsVec.reserve(numberOfSortParams);
88 for (
size_t i = 0; i < numberOfSortParams; i++)
89 sortParamsVec.push_back(
unwrap(sortParams[i]));
99 return symbolizeBVCmpPredicate(
unwrap(str)).has_value();
103 return symbolizeIntPredicate(
unwrap(str)).has_value();
107 return isa<BitVectorAttr, BVCmpPredicateAttr, IntPredicateAttr>(
unwrap(attr));
116 auto predicate = symbolizeBVCmpPredicate(
unwrap(str));
117 assert(predicate.has_value() &&
"invalid predicate");
123 auto predicate = symbolizeIntPredicate(
unwrap(str));
124 assert(predicate.has_value() &&
"invalid predicate");
#define MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Name, Namespace, ClassName)
MlirAttribute mlirSMTAttrGetIntPredicate(MlirContext ctx, MlirStringRef str)
Creates a smt::IntPredicateAttr with the given string.
bool mlirSMTTypeIsASMTFunc(MlirType type)
Checks if the given type is a smt::FuncType.
MlirAttribute mlirSMTAttrGetBitVector(MlirContext ctx, uint64_t value, unsigned width)
Creates a smt::BitVectorAttr with the given value and width.
MlirType mlirSMTTypeGetArray(MlirContext ctx, MlirType domainType, MlirType rangeType)
Creates an array type with the given domain and range types.
bool mlirSMTTypeIsABool(MlirType type)
Checks if the given type is a smt::BoolType.
bool mlirSMTAttrCheckBVCmpPredicate(MlirContext ctx, MlirStringRef str)
Checks if the given string is a valid smt::BVCmpPredicate.
MlirType mlirSMTTypeGetInt(MlirContext ctx)
Creates a smt::IntType.
MlirType mlirSMTTypeGetBitVector(MlirContext ctx, int32_t width)
Creates a smt::BitVectorType with the given width.
MlirAttribute mlirSMTAttrGetBVCmpPredicate(MlirContext ctx, MlirStringRef str)
Creates a smt::BVCmpPredicateAttr with the given string.
bool mlirSMTTypeIsASort(MlirType type)
Checks if the given type is a smt::SortType.
bool mlirSMTAttrIsASMTAttribute(MlirAttribute attr)
Checks if the given attribute is a smt::SMTAttribute.
bool mlirSMTTypeIsAnySMTValueType(MlirType type)
Checks if the given type is any SMT value type.
bool mlirSMTTypeIsAArray(MlirType type)
Checks if the given type is a smt::ArrayType.
MlirType mlirSMTTypeGetBool(MlirContext ctx)
Creates a smt::BoolType.
MlirType mlirSMTTypeGetSort(MlirContext ctx, MlirIdentifier identifier, size_t numberOfSortParams, const MlirType *sortParams)
Creates a smt::SortType with the given identifier and sort parameters.
bool mlirSMTTypeIsAnyNonFuncSMTValueType(MlirType type)
Checks if the given type is any non-func SMT value type.
bool mlirSMTTypeIsAInt(MlirType type)
Checks if the given type is a smt::IntType.
MlirType mlirSMTTypeGetSMTFunc(MlirContext ctx, size_t numberOfDomainTypes, const MlirType *domainTypes, MlirType rangeType)
Creates a smt::FuncType with the given domain and range types.
bool mlirSMTAttrCheckIntPredicate(MlirContext ctx, MlirStringRef str)
Checks if the given string is a valid smt::IntPredicate.
bool mlirSMTTypeIsABitVector(MlirType type)
Checks if the given type is a smt::BitVectorType.
mlir::Diagnostic & unwrap(MlirDiagnostic diagnostic)
MlirDiagnostic wrap(mlir::Diagnostic &diagnostic)
bool isAnySMTValueType(mlir::Type type)
Returns whether the given type is an SMT value type.
bool isAnyNonFuncSMTValueType(mlir::Type type)
Returns whether the given type is an SMT value type (excluding functions).
Include the generated interface declarations.
auto get(MLIRContext *context, Ts &&...params)
Helper method that injects context only if needed, this helps unify some of the attribute constructio...
A pointer to a sized fragment of a string, not necessarily null-terminated.