@@ -25,46 +25,49 @@ MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(SMT, smt, mlir::smt::SMTDialect)
2525// Type API.
2626// ===----------------------------------------------------------------------===//
2727
28- bool smtTypeIsAnyNonFuncSMTValueType (MlirType type) {
28+ bool mlirSMTTypeIsAnyNonFuncSMTValueType (MlirType type) {
2929 return isAnyNonFuncSMTValueType (unwrap (type));
3030}
3131
32- bool smtTypeIsAnySMTValueType (MlirType type) {
32+ bool mlirSMTTypeIsAnySMTValueType (MlirType type) {
3333 return isAnySMTValueType (unwrap (type));
3434}
3535
36- bool smtTypeIsAArray (MlirType type) { return isa<ArrayType>(unwrap (type)); }
36+ bool mlirSMTTypeIsAArray (MlirType type) { return isa<ArrayType>(unwrap (type)); }
3737
38- MlirType smtTypeGetArray (MlirContext ctx, MlirType domainType,
39- MlirType rangeType) {
38+ MlirType mlirSMTTypeGetArray (MlirContext ctx, MlirType domainType,
39+ MlirType rangeType) {
4040 return wrap (
4141 ArrayType::get (unwrap (ctx), unwrap (domainType), unwrap (rangeType)));
4242}
4343
44- bool smtTypeIsABitVector (MlirType type) {
44+ bool mlirSMTTypeIsABitVector (MlirType type) {
4545 return isa<BitVectorType>(unwrap (type));
4646}
4747
48- MlirType smtTypeGetBitVector (MlirContext ctx, int32_t width) {
48+ MlirType mlirSMTTypeGetBitVector (MlirContext ctx, int32_t width) {
4949 return wrap (BitVectorType::get (unwrap (ctx), width));
5050}
5151
52- bool smtTypeIsABool (MlirType type) { return isa<BoolType>(unwrap (type)); }
52+ bool mlirSMTTypeIsABool (MlirType type) { return isa<BoolType>(unwrap (type)); }
5353
54- MlirType smtTypeGetBool (MlirContext ctx) {
54+ MlirType mlirSMTTypeGetBool (MlirContext ctx) {
5555 return wrap (BoolType::get (unwrap (ctx)));
5656}
5757
58- bool smtTypeIsAInt (MlirType type) { return isa<IntType>(unwrap (type)); }
58+ bool mlirSMTTypeIsAInt (MlirType type) { return isa<IntType>(unwrap (type)); }
5959
60- MlirType smtTypeGetInt (MlirContext ctx) {
60+ MlirType mlirSMTTypeGetInt (MlirContext ctx) {
6161 return wrap (IntType::get (unwrap (ctx)));
6262}
6363
64- bool smtTypeIsASMTFunc (MlirType type) { return isa<SMTFuncType>(unwrap (type)); }
64+ bool mlirSMTTypeIsASMTFunc (MlirType type) {
65+ return isa<SMTFuncType>(unwrap (type));
66+ }
6567
66- MlirType smtTypeGetSMTFunc (MlirContext ctx, size_t numberOfDomainTypes,
67- const MlirType *domainTypes, MlirType rangeType) {
68+ MlirType mlirSMTTypeGetSMTFunc (MlirContext ctx, size_t numberOfDomainTypes,
69+ const MlirType *domainTypes,
70+ MlirType rangeType) {
6871 SmallVector<Type> domainTypesVec;
6972 domainTypesVec.reserve (numberOfDomainTypes);
7073
@@ -74,10 +77,11 @@ MlirType smtTypeGetSMTFunc(MlirContext ctx, size_t numberOfDomainTypes,
7477 return wrap (SMTFuncType::get (unwrap (ctx), domainTypesVec, unwrap (rangeType)));
7578}
7679
77- bool smtTypeIsASort (MlirType type) { return isa<SortType>(unwrap (type)); }
80+ bool mlirSMTTypeIsASort (MlirType type) { return isa<SortType>(unwrap (type)); }
7881
79- MlirType smtTypeGetSort (MlirContext ctx, MlirIdentifier identifier,
80- size_t numberOfSortParams, const MlirType *sortParams) {
82+ MlirType mlirSMTTypeGetSort (MlirContext ctx, MlirIdentifier identifier,
83+ size_t numberOfSortParams,
84+ const MlirType *sortParams) {
8185 SmallVector<Type> sortParamsVec;
8286 sortParamsVec.reserve (numberOfSortParams);
8387
@@ -91,31 +95,31 @@ MlirType smtTypeGetSort(MlirContext ctx, MlirIdentifier identifier,
9195// Attribute API.
9296// ===----------------------------------------------------------------------===//
9397
94- bool smtAttrCheckBVCmpPredicate (MlirContext ctx, MlirStringRef str) {
98+ bool mlirSMTAttrCheckBVCmpPredicate (MlirContext ctx, MlirStringRef str) {
9599 return symbolizeBVCmpPredicate (unwrap (str)).has_value ();
96100}
97101
98- bool smtAttrCheckIntPredicate (MlirContext ctx, MlirStringRef str) {
102+ bool mlirSMTAttrCheckIntPredicate (MlirContext ctx, MlirStringRef str) {
99103 return symbolizeIntPredicate (unwrap (str)).has_value ();
100104}
101105
102- bool smtAttrIsASMTAttribute (MlirAttribute attr) {
106+ bool mlirSMTAttrIsASMTAttribute (MlirAttribute attr) {
103107 return isa<BitVectorAttr, BVCmpPredicateAttr, IntPredicateAttr>(unwrap (attr));
104108}
105109
106- MlirAttribute smtAttrGetBitVector (MlirContext ctx, uint64_t value,
107- unsigned width) {
110+ MlirAttribute mlirSMTAttrGetBitVector (MlirContext ctx, uint64_t value,
111+ unsigned width) {
108112 return wrap (BitVectorAttr::get (unwrap (ctx), value, width));
109113}
110114
111- MlirAttribute smtAttrGetBVCmpPredicate (MlirContext ctx, MlirStringRef str) {
115+ MlirAttribute mlirSMTAttrGetBVCmpPredicate (MlirContext ctx, MlirStringRef str) {
112116 auto predicate = symbolizeBVCmpPredicate (unwrap (str));
113117 assert (predicate.has_value () && " invalid predicate" );
114118
115119 return wrap (BVCmpPredicateAttr::get (unwrap (ctx), predicate.value ()));
116120}
117121
118- MlirAttribute smtAttrGetIntPredicate (MlirContext ctx, MlirStringRef str) {
122+ MlirAttribute mlirSMTAttrGetIntPredicate (MlirContext ctx, MlirStringRef str) {
119123 auto predicate = symbolizeIntPredicate (unwrap (str));
120124 assert (predicate.has_value () && " invalid predicate" );
121125
0 commit comments