LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
SMTTypes.cpp.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* TypeDef Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9#ifdef GET_TYPEDEF_LIST
10#undef GET_TYPEDEF_LIST
11
18
19#endif // GET_TYPEDEF_LIST
20
21#ifdef GET_TYPEDEF_CLASSES
22#undef GET_TYPEDEF_CLASSES
23
24static ::mlir::OptionalParseResult generatedTypeParser(::mlir::AsmParser &parser, ::llvm::StringRef *mnemonic, ::mlir::Type &value) {
25 return ::mlir::AsmParser::KeywordSwitch<::mlir::OptionalParseResult>(parser)
26 .Case(::llzk::smt::BoolType::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) {
27 value = ::llzk::smt::BoolType::parse(parser);
28 return ::mlir::success(!!value);
29 })
30 .Case(::llzk::smt::IntType::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) {
31 value = ::llzk::smt::IntType::parse(parser);
32 return ::mlir::success(!!value);
33 })
34 .Case(::llzk::smt::BitVectorType::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) {
36 return ::mlir::success(!!value);
37 })
38 .Case(::llzk::smt::ArrayType::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) {
39 value = ::llzk::smt::ArrayType::parse(parser);
40 return ::mlir::success(!!value);
41 })
42 .Case(::llzk::smt::SMTFuncType::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) {
43 value = ::llzk::smt::SMTFuncType::parse(parser);
44 return ::mlir::success(!!value);
45 })
46 .Case(::llzk::smt::SortType::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) {
47 value = ::llzk::smt::SortType::parse(parser);
48 return ::mlir::success(!!value);
49 })
50 .Default([&](llvm::StringRef keyword, llvm::SMLoc) {
51 *mnemonic = keyword;
52 return std::nullopt;
53 });
54}
55
56static ::llvm::LogicalResult generatedTypePrinter(::mlir::Type def, ::mlir::AsmPrinter &printer) {
57 return ::llvm::TypeSwitch<::mlir::Type, ::llvm::LogicalResult>(def) .Case<::llzk::smt::BoolType>([&](auto t) {
59t.print(printer);
60 return ::mlir::success();
61 })
62 .Case<::llzk::smt::IntType>([&](auto t) {
64t.print(printer);
65 return ::mlir::success();
66 })
67 .Case<::llzk::smt::BitVectorType>([&](auto t) {
69t.print(printer);
70 return ::mlir::success();
71 })
72 .Case<::llzk::smt::ArrayType>([&](auto t) {
74t.print(printer);
75 return ::mlir::success();
76 })
77 .Case<::llzk::smt::SMTFuncType>([&](auto t) {
79t.print(printer);
80 return ::mlir::success();
81 })
82 .Case<::llzk::smt::SortType>([&](auto t) {
84t.print(printer);
85 return ::mlir::success();
86 })
87 .Default([](auto) { return ::mlir::failure(); });
88}
89
90namespace llzk {
91namespace smt {
92::mlir::Type BoolType::parse(::mlir::AsmParser &odsParser) {
93 ::mlir::Builder odsBuilder(odsParser.getContext());
94 ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation();
95 (void) odsLoc;
96 return BoolType::get(odsParser.getContext());
97}
98
99void BoolType::print(::mlir::AsmPrinter &odsPrinter) const {
100 ::mlir::Builder odsBuilder(getContext());
101}
102
103} // namespace smt
104} // namespace llzk
105MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BoolType)
106namespace llzk {
107namespace smt {
108::mlir::Type IntType::parse(::mlir::AsmParser &odsParser) {
109 ::mlir::Builder odsBuilder(odsParser.getContext());
110 ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation();
111 (void) odsLoc;
112 return IntType::get(odsParser.getContext());
113}
114
115void IntType::print(::mlir::AsmPrinter &odsPrinter) const {
116 ::mlir::Builder odsBuilder(getContext());
117}
118
119} // namespace smt
120} // namespace llzk
121MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntType)
122namespace llzk {
123namespace smt {
124namespace detail {
125struct BitVectorTypeStorage : public ::mlir::TypeStorage {
126 using KeyTy = std::tuple<int64_t>;
127 BitVectorTypeStorage(int64_t width) : width(std::move(width)) {}
128
129 KeyTy getAsKey() const {
130 return KeyTy(width);
131 }
132
133 bool operator==(const KeyTy &tblgenKey) const {
134 return (width == std::get<0>(tblgenKey));
135 }
136
137 static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) {
138 return ::llvm::hash_combine(std::get<0>(tblgenKey));
139 }
140
141 static BitVectorTypeStorage *construct(::mlir::TypeStorageAllocator &allocator, KeyTy &&tblgenKey) {
142 auto width = std::move(std::get<0>(tblgenKey));
143 return new (allocator.allocate<BitVectorTypeStorage>()) BitVectorTypeStorage(std::move(width));
144 }
145
146 int64_t width;
147};
148} // namespace detail
149BitVectorType BitVectorType::get(::mlir::MLIRContext *context, int64_t width) {
150 return Base::get(context, std::move(width));
151}
152
153BitVectorType BitVectorType::getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, int64_t width) {
154 return Base::getChecked(emitError, context, width);
155}
156
157::llvm::LogicalResult BitVectorType::verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int64_t width) {
158 if (::mlir::failed(verify(emitError, width)))
159 return ::mlir::failure();
160 return ::mlir::success();
161}
162
163::mlir::Type BitVectorType::parse(::mlir::AsmParser &odsParser) {
164 ::mlir::Builder odsBuilder(odsParser.getContext());
165 ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation();
166 (void) odsLoc;
167 ::mlir::FailureOr<int64_t> _result_width;
168 // Parse literal '<'
169 if (odsParser.parseLess()) return {};
170
171 // Parse variable 'width'
172 _result_width = ::mlir::FieldParser<int64_t>::parse(odsParser);
173 if (::mlir::failed(_result_width)) {
174 odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse BitVectorType parameter 'width' which is to be a `int64_t`");
175 return {};
176 }
177 // Parse literal '>'
178 if (odsParser.parseGreater()) return {};
179 assert(::mlir::succeeded(_result_width));
180 return odsParser.getChecked<BitVectorType>(odsLoc, odsParser.getContext(),
181 int64_t((*_result_width)));
182}
183
184void BitVectorType::print(::mlir::AsmPrinter &odsPrinter) const {
185 ::mlir::Builder odsBuilder(getContext());
186 odsPrinter << "<";
187 odsPrinter.printStrippedAttrOrType(getWidth());
188 odsPrinter << ">";
189}
190
191int64_t BitVectorType::getWidth() const {
192 return getImpl()->width;
193}
194
195} // namespace smt
196} // namespace llzk
197MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BitVectorType)
198namespace llzk {
199namespace smt {
200namespace detail {
201struct ArrayTypeStorage : public ::mlir::TypeStorage {
202 using KeyTy = std::tuple<mlir::Type, mlir::Type>;
203 ArrayTypeStorage(mlir::Type domainType, mlir::Type rangeType) : domainType(std::move(domainType)), rangeType(std::move(rangeType)) {}
204
205 KeyTy getAsKey() const {
206 return KeyTy(domainType, rangeType);
207 }
208
209 bool operator==(const KeyTy &tblgenKey) const {
210 return (domainType == std::get<0>(tblgenKey)) && (rangeType == std::get<1>(tblgenKey));
211 }
212
213 static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) {
214 return ::llvm::hash_combine(std::get<0>(tblgenKey), std::get<1>(tblgenKey));
215 }
216
217 static ArrayTypeStorage *construct(::mlir::TypeStorageAllocator &allocator, KeyTy &&tblgenKey) {
218 auto domainType = std::move(std::get<0>(tblgenKey));
219 auto rangeType = std::move(std::get<1>(tblgenKey));
220 return new (allocator.allocate<ArrayTypeStorage>()) ArrayTypeStorage(std::move(domainType), std::move(rangeType));
221 }
222
223 mlir::Type domainType;
224 mlir::Type rangeType;
225};
226} // namespace detail
227ArrayType ArrayType::get(::mlir::MLIRContext *context, mlir::Type domainType, mlir::Type rangeType) {
228 return Base::get(context, std::move(domainType), std::move(rangeType));
229}
230
231ArrayType ArrayType::getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, mlir::Type domainType, mlir::Type rangeType) {
232 return Base::getChecked(emitError, context, domainType, rangeType);
233}
234
235::llvm::LogicalResult ArrayType::verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, mlir::Type domainType, mlir::Type rangeType) {
236 if (::mlir::failed(verify(emitError, domainType, rangeType)))
237 return ::mlir::failure();
238 return ::mlir::success();
239}
240
241::mlir::Type ArrayType::parse(::mlir::AsmParser &odsParser) {
242 ::mlir::Builder odsBuilder(odsParser.getContext());
243 ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation();
244 (void) odsLoc;
245 ::mlir::FailureOr<mlir::Type> _result_domainType;
246 ::mlir::FailureOr<mlir::Type> _result_rangeType;
247 // Parse literal '<'
248 if (odsParser.parseLess()) return {};
249 // Parse literal '['
250 if (odsParser.parseLSquare()) return {};
251
252 // Parse variable 'domainType'
253 _result_domainType = ::mlir::FieldParser<mlir::Type>::parse(odsParser);
254 if (::mlir::failed(_result_domainType)) {
255 odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse ArrayType parameter 'domainType' which is to be a `mlir::Type`");
256 return {};
257 }
258 // Parse literal '->'
259 if (odsParser.parseArrow()) return {};
260
261 // Parse variable 'rangeType'
262 _result_rangeType = ::mlir::FieldParser<mlir::Type>::parse(odsParser);
263 if (::mlir::failed(_result_rangeType)) {
264 odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse ArrayType parameter 'rangeType' which is to be a `mlir::Type`");
265 return {};
266 }
267 // Parse literal ']'
268 if (odsParser.parseRSquare()) return {};
269 // Parse literal '>'
270 if (odsParser.parseGreater()) return {};
271 assert(::mlir::succeeded(_result_domainType));
272 assert(::mlir::succeeded(_result_rangeType));
273 return odsParser.getChecked<ArrayType>(odsLoc, odsParser.getContext(),
274 mlir::Type((*_result_domainType)),
275 mlir::Type((*_result_rangeType)));
276}
277
278void ArrayType::print(::mlir::AsmPrinter &odsPrinter) const {
279 ::mlir::Builder odsBuilder(getContext());
280 odsPrinter << "<";
281 odsPrinter << "[";
282 odsPrinter.printStrippedAttrOrType(getDomainType());
283 odsPrinter << ' ' << "->";
284 odsPrinter << ' ';
285 odsPrinter.printStrippedAttrOrType(getRangeType());
286 odsPrinter << "]";
287 odsPrinter << ">";
288}
289
290mlir::Type ArrayType::getDomainType() const {
291 return getImpl()->domainType;
292}
293
294mlir::Type ArrayType::getRangeType() const {
295 return getImpl()->rangeType;
296}
297
298} // namespace smt
299} // namespace llzk
300MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ArrayType)
301namespace llzk {
302namespace smt {
303namespace detail {
304struct SMTFuncTypeStorage : public ::mlir::TypeStorage {
305 using KeyTy = std::tuple<::llvm::ArrayRef<mlir::Type>, mlir::Type>;
306 SMTFuncTypeStorage(::llvm::ArrayRef<mlir::Type> domainTypes, mlir::Type rangeType) : domainTypes(std::move(domainTypes)), rangeType(std::move(rangeType)) {}
307
308 KeyTy getAsKey() const {
309 return KeyTy(domainTypes, rangeType);
310 }
311
312 bool operator==(const KeyTy &tblgenKey) const {
313 return (domainTypes == std::get<0>(tblgenKey)) && (rangeType == std::get<1>(tblgenKey));
314 }
315
316 static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) {
317 return ::llvm::hash_combine(std::get<0>(tblgenKey), std::get<1>(tblgenKey));
318 }
319
320 static SMTFuncTypeStorage *construct(::mlir::TypeStorageAllocator &allocator, KeyTy &&tblgenKey) {
321 auto domainTypes = std::move(std::get<0>(tblgenKey));
322 auto rangeType = std::move(std::get<1>(tblgenKey));
323 domainTypes = allocator.copyInto(domainTypes);
324 return new (allocator.allocate<SMTFuncTypeStorage>()) SMTFuncTypeStorage(std::move(domainTypes), std::move(rangeType));
325 }
326
327 ::llvm::ArrayRef<mlir::Type> domainTypes;
328 mlir::Type rangeType;
329};
330} // namespace detail
331SMTFuncType SMTFuncType::get(::mlir::MLIRContext *context, ::llvm::ArrayRef<mlir::Type> domainTypes, mlir::Type rangeType) {
332 return Base::get(context, std::move(domainTypes), std::move(rangeType));
333}
334
335SMTFuncType SMTFuncType::getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::llvm::ArrayRef<mlir::Type> domainTypes, mlir::Type rangeType) {
336 return Base::getChecked(emitError, context, domainTypes, rangeType);
337}
338
339SMTFuncType SMTFuncType::get(llvm::ArrayRef<mlir::Type> domainTypes, mlir::Type rangeType) {
340 return Base::get(rangeType.getContext(), domainTypes, rangeType);
341}
342
343SMTFuncType SMTFuncType::getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, llvm::ArrayRef<mlir::Type> domainTypes, mlir::Type rangeType) {
344 return Base::getChecked(emitError, rangeType.getContext(), domainTypes, rangeType);
345}
346
347SMTFuncType SMTFuncType::get(mlir::Type rangeType) {
348 return Base::get(rangeType.getContext(),
349 llvm::ArrayRef<mlir::Type>{}, rangeType);
350}
351
352SMTFuncType SMTFuncType::getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, mlir::Type rangeType) {
353 return Base::getChecked(emitError, rangeType.getContext(),
354 llvm::ArrayRef<mlir::Type>{}, rangeType);
355}
356
357::llvm::LogicalResult SMTFuncType::verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::llvm::ArrayRef<mlir::Type> domainTypes, mlir::Type rangeType) {
358 if (::mlir::failed(verify(emitError, domainTypes, rangeType)))
359 return ::mlir::failure();
360 return ::mlir::success();
361}
362
363::mlir::Type SMTFuncType::parse(::mlir::AsmParser &odsParser) {
364 ::mlir::Builder odsBuilder(odsParser.getContext());
365 ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation();
366 (void) odsLoc;
367 ::mlir::FailureOr<::llvm::SmallVector<mlir::Type>> _result_domainTypes;
368 ::mlir::FailureOr<mlir::Type> _result_rangeType;
369 // Parse literal '<'
370 if (odsParser.parseLess()) return {};
371 // Parse literal '('
372 if (odsParser.parseLParen()) return {};
373
374 // Parse variable 'domainTypes'
375 _result_domainTypes = ::mlir::FieldParser<::llvm::SmallVector<mlir::Type>>::parse(odsParser);
376 if (::mlir::failed(_result_domainTypes)) {
377 odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse SMTFuncType parameter 'domainTypes' which is to be a `::llvm::ArrayRef<mlir::Type>`");
378 return {};
379 }
380 // Parse literal ')'
381 if (odsParser.parseRParen()) return {};
382
383 // Parse variable 'rangeType'
384 _result_rangeType = ::mlir::FieldParser<mlir::Type>::parse(odsParser);
385 if (::mlir::failed(_result_rangeType)) {
386 odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse SMTFuncType parameter 'rangeType' which is to be a `mlir::Type`");
387 return {};
388 }
389 // Parse literal '>'
390 if (odsParser.parseGreater()) return {};
391 assert(::mlir::succeeded(_result_domainTypes));
392 assert(::mlir::succeeded(_result_rangeType));
393 return odsParser.getChecked<SMTFuncType>(odsLoc, odsParser.getContext(),
394 ::llvm::ArrayRef<mlir::Type>((*_result_domainTypes)),
395 mlir::Type((*_result_rangeType)));
396}
397
398void SMTFuncType::print(::mlir::AsmPrinter &odsPrinter) const {
399 ::mlir::Builder odsBuilder(getContext());
400 odsPrinter << "<";
401 odsPrinter << "(";
402 odsPrinter.printStrippedAttrOrType(getDomainTypes());
403 odsPrinter << ")";
404 odsPrinter << " ";
405 odsPrinter.printStrippedAttrOrType(getRangeType());
406 odsPrinter << ">";
407}
408
409::llvm::ArrayRef<mlir::Type> SMTFuncType::getDomainTypes() const {
410 return getImpl()->domainTypes;
411}
412
413mlir::Type SMTFuncType::getRangeType() const {
414 return getImpl()->rangeType;
415}
416
417} // namespace smt
418} // namespace llzk
419MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::SMTFuncType)
420namespace llzk {
421namespace smt {
422namespace detail {
423struct SortTypeStorage : public ::mlir::TypeStorage {
424 using KeyTy = std::tuple<mlir::StringAttr, ::llvm::ArrayRef<mlir::Type>>;
425 SortTypeStorage(mlir::StringAttr identifier, ::llvm::ArrayRef<mlir::Type> sortParams) : identifier(std::move(identifier)), sortParams(std::move(sortParams)) {}
426
427 KeyTy getAsKey() const {
428 return KeyTy(identifier, sortParams);
429 }
430
431 bool operator==(const KeyTy &tblgenKey) const {
432 return (identifier == std::get<0>(tblgenKey)) && (::llvm::ArrayRef<mlir::Type>(sortParams) == ::llvm::ArrayRef<mlir::Type>(std::get<1>(tblgenKey)));
433 }
434
435 static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) {
436 return ::llvm::hash_combine(std::get<0>(tblgenKey), std::get<1>(tblgenKey));
437 }
438
439 static SortTypeStorage *construct(::mlir::TypeStorageAllocator &allocator, KeyTy &&tblgenKey) {
440 auto identifier = std::move(std::get<0>(tblgenKey));
441 auto sortParams = std::move(std::get<1>(tblgenKey));
442 sortParams = allocator.copyInto(sortParams);
443 return new (allocator.allocate<SortTypeStorage>()) SortTypeStorage(std::move(identifier), std::move(sortParams));
444 }
445
446 mlir::StringAttr identifier;
447 ::llvm::ArrayRef<mlir::Type> sortParams;
448};
449} // namespace detail
450SortType SortType::get(::mlir::MLIRContext *context, mlir::StringAttr identifier, ::llvm::ArrayRef<mlir::Type> sortParams) {
451 return Base::get(context, std::move(identifier), std::move(sortParams));
452}
453
454SortType SortType::getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, mlir::StringAttr identifier, ::llvm::ArrayRef<mlir::Type> sortParams) {
455 return Base::getChecked(emitError, context, identifier, sortParams);
456}
457
458SortType SortType::get(::mlir::MLIRContext *context, llvm::StringRef identifier, llvm::ArrayRef<mlir::Type> sortParams) {
459 return Base::get(context, mlir::StringAttr::get(context, identifier),
460 sortParams);
461}
462
463SortType SortType::getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, llvm::StringRef identifier, llvm::ArrayRef<mlir::Type> sortParams) {
464 return Base::getChecked(emitError, context, mlir::StringAttr::get(context, identifier),
465 sortParams);
466}
467
468SortType SortType::get(::mlir::MLIRContext *context, llvm::StringRef identifier) {
469 return Base::get(context, mlir::StringAttr::get(context, identifier),
470 llvm::ArrayRef<mlir::Type>{});
471}
472
473SortType SortType::getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, llvm::StringRef identifier) {
474 return Base::getChecked(emitError, context, mlir::StringAttr::get(context, identifier),
475 llvm::ArrayRef<mlir::Type>{});
476}
477
478::llvm::LogicalResult SortType::verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, mlir::StringAttr identifier, ::llvm::ArrayRef<mlir::Type> sortParams) {
479 if (::mlir::failed(verify(emitError, identifier, sortParams)))
480 return ::mlir::failure();
481 return ::mlir::success();
482}
483
484::mlir::Type SortType::parse(::mlir::AsmParser &odsParser) {
485 ::mlir::Builder odsBuilder(odsParser.getContext());
486 ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation();
487 (void) odsLoc;
488 ::mlir::FailureOr<mlir::StringAttr> _result_identifier;
489 ::mlir::FailureOr<::llvm::SmallVector<mlir::Type>> _result_sortParams;
490 // Parse literal '<'
491 if (odsParser.parseLess()) return {};
492
493 // Parse variable 'identifier'
494 _result_identifier = ::mlir::FieldParser<mlir::StringAttr>::parse(odsParser);
495 if (::mlir::failed(_result_identifier)) {
496 odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse SortType parameter 'identifier' which is to be a `mlir::StringAttr`");
497 return {};
498 }
499 // Parse literal '['
500 if (odsParser.parseOptionalLSquare()) {
501 } else {
502
503 // Parse variable 'sortParams'
504 _result_sortParams = ::mlir::FieldParser<::llvm::SmallVector<mlir::Type>>::parse(odsParser);
505 if (::mlir::failed(_result_sortParams)) {
506 odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse SortType parameter 'sortParams' which is to be a `::llvm::ArrayRef<mlir::Type>`");
507 return {};
508 }
509 // Parse literal ']'
510 if (odsParser.parseRSquare()) return {};
511 }
512 // Parse literal '>'
513 if (odsParser.parseGreater()) return {};
514 assert(::mlir::succeeded(_result_identifier));
515 return odsParser.getChecked<SortType>(odsLoc, odsParser.getContext(),
516 mlir::StringAttr((*_result_identifier)),
517 ::llvm::ArrayRef<mlir::Type>((_result_sortParams.value_or(::llvm::SmallVector<mlir::Type>()))));
518}
519
520void SortType::print(::mlir::AsmPrinter &odsPrinter) const {
521 ::mlir::Builder odsBuilder(getContext());
522 odsPrinter << "<";
523 odsPrinter.printStrippedAttrOrType(getIdentifier());
524 if (!(::llvm::ArrayRef<mlir::Type>(getSortParams()) == ::llvm::ArrayRef<mlir::Type>(::llvm::SmallVector<mlir::Type>()))) {
525 odsPrinter << "[";
526 if (!(::llvm::ArrayRef<mlir::Type>(getSortParams()) == ::llvm::ArrayRef<mlir::Type>(::llvm::SmallVector<mlir::Type>()))) {
527 odsPrinter.printStrippedAttrOrType(getSortParams());
528 }
529 odsPrinter << "]";
530 } else {
531 }
532 odsPrinter << ">";
533}
534
535mlir::StringAttr SortType::getIdentifier() const {
536 return getImpl()->identifier;
537}
538
539::llvm::ArrayRef<mlir::Type> SortType::getSortParams() const {
540 return getImpl()->sortParams;
541}
542
543} // namespace smt
544} // namespace llzk
545MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::SortType)
546namespace llzk {
547namespace smt {
548
550::mlir::Type SMTDialect::parseType(::mlir::DialectAsmParser &parser) const {
551 ::llvm::SMLoc typeLoc = parser.getCurrentLocation();
552 ::llvm::StringRef mnemonic;
553 ::mlir::Type genType;
554 auto parseResult = generatedTypeParser(parser, &mnemonic, genType);
555 if (parseResult.has_value())
556 return genType;
557
558 parser.emitError(typeLoc) << "unknown type `"
559 << mnemonic << "` in dialect `" << getNamespace() << "`";
560 return {};
561}
562
563void SMTDialect::printType(::mlir::Type type,
564 ::mlir::DialectAsmPrinter &printer) const {
565 if (::mlir::succeeded(generatedTypePrinter(type, printer)))
566 return;
567
568}
569} // namespace smt
570} // namespace llzk
571
572#endif // GET_TYPEDEF_CLASSES
573
mlir::Type getDomainType() const
static ArrayType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, mlir::Type domainType, mlir::Type rangeType)
mlir::Type getRangeType() const
::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, mlir::Type domainType, mlir::Type rangeType)
::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, mlir::Type domainType, mlir::Type rangeType)
static constexpr ::llvm::StringLiteral getMnemonic()
void print(::mlir::AsmPrinter &odsPrinter) const
static ArrayType get(::mlir::MLIRContext *context, mlir::Type domainType, mlir::Type rangeType)
::mlir::Type parse(::mlir::AsmParser &odsParser)
static BitVectorType get(::mlir::MLIRContext *context, int64_t width)
void print(::mlir::AsmPrinter &odsPrinter) const
static constexpr ::llvm::StringLiteral getMnemonic()
::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int64_t width)
::mlir::Type parse(::mlir::AsmParser &odsParser)
static BitVectorType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, int64_t width)
::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int64_t width)
Definition SMTTypes.cpp:43
::mlir::Type parse(::mlir::AsmParser &odsParser)
void print(::mlir::AsmPrinter &odsPrinter) const
static constexpr ::llvm::StringLiteral getMnemonic()
void print(::mlir::AsmPrinter &odsPrinter) const
static constexpr ::llvm::StringLiteral getMnemonic()
::mlir::Type parse(::mlir::AsmParser &odsParser)
::mlir::Type parseType(::mlir::DialectAsmParser &parser) const override
Parse a type registered to this dialect.
void printType(::mlir::Type type, ::mlir::DialectAsmPrinter &os) const override
Print a type registered to this dialect.
void print(::mlir::AsmPrinter &odsPrinter) const
::llvm::ArrayRef< mlir::Type > getDomainTypes() const
::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::llvm::ArrayRef< mlir::Type > domainTypes, mlir::Type rangeType)
static SMTFuncType get(::mlir::MLIRContext *context, ::llvm::ArrayRef< mlir::Type > domainTypes, mlir::Type rangeType)
::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::llvm::ArrayRef< mlir::Type > domainTypes, mlir::Type rangeType)
Definition SMTTypes.cpp:70
mlir::Type getRangeType() const
static SMTFuncType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::llvm::ArrayRef< mlir::Type > domainTypes, mlir::Type rangeType)
::mlir::Type parse(::mlir::AsmParser &odsParser)
static constexpr ::llvm::StringLiteral getMnemonic()
::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, mlir::StringAttr identifier, ::llvm::ArrayRef< mlir::Type > sortParams)
static SortType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, mlir::StringAttr identifier, ::llvm::ArrayRef< mlir::Type > sortParams)
::mlir::Type parse(::mlir::AsmParser &odsParser)
void print(::mlir::AsmPrinter &odsPrinter) const
static constexpr ::llvm::StringLiteral getMnemonic()
::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, mlir::StringAttr identifier, ::llvm::ArrayRef< mlir::Type > sortParams)
Definition SMTTypes.cpp:90
static SortType get(::mlir::MLIRContext *context, mlir::StringAttr identifier, ::llvm::ArrayRef< mlir::Type > sortParams)
mlir::StringAttr getIdentifier() const
::llvm::ArrayRef< mlir::Type > getSortParams() const
::llvm::hash_code hashKey(const KeyTy &tblgenKey)
std::tuple< mlir::Type, mlir::Type > KeyTy
ArrayTypeStorage(mlir::Type domainType, mlir::Type rangeType)
static ArrayTypeStorage * construct(::mlir::TypeStorageAllocator &allocator, KeyTy &&tblgenKey)
bool operator==(const KeyTy &tblgenKey) const
static BitVectorTypeStorage * construct(::mlir::TypeStorageAllocator &allocator, KeyTy &&tblgenKey)
bool operator==(const KeyTy &tblgenKey) const
::llvm::hash_code hashKey(const KeyTy &tblgenKey)
bool operator==(const KeyTy &tblgenKey) const
SMTFuncTypeStorage(::llvm::ArrayRef< mlir::Type > domainTypes, mlir::Type rangeType)
::llvm::hash_code hashKey(const KeyTy &tblgenKey)
::llvm::ArrayRef< mlir::Type > domainTypes
std::tuple<::llvm::ArrayRef< mlir::Type >, mlir::Type > KeyTy
static SMTFuncTypeStorage * construct(::mlir::TypeStorageAllocator &allocator, KeyTy &&tblgenKey)
static SortTypeStorage * construct(::mlir::TypeStorageAllocator &allocator, KeyTy &&tblgenKey)
::llvm::ArrayRef< mlir::Type > sortParams
bool operator==(const KeyTy &tblgenKey) const
::llvm::hash_code hashKey(const KeyTy &tblgenKey)
SortTypeStorage(mlir::StringAttr identifier, ::llvm::ArrayRef< mlir::Type > sortParams)
std::tuple< mlir::StringAttr, ::llvm::ArrayRef< mlir::Type > > KeyTy