LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
SMT.cpp.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: SMT.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10#ifdef GET_OP_LIST
11#undef GET_OP_LIST
12
69#endif // GET_OP_LIST
70
71#ifdef GET_OP_CLASSES
72#undef GET_OP_CLASSES
73
74
75//===----------------------------------------------------------------------===//
76// Local Utility Method Definitions
77//===----------------------------------------------------------------------===//
78
79namespace llzk {
80namespace smt {
81
82static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT1(
83 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
84 unsigned valueIndex) {
85 if (!((::llvm::isa<::llzk::smt::BoolType>(type)))) {
86 return op->emitOpError(valueKind) << " #" << valueIndex
87 << " must be variadic of , but got " << type;
88 }
89 return ::mlir::success();
90}
91
92static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT2(
93 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
94 unsigned valueIndex) {
95 if (!((::llvm::isa<::llzk::smt::BoolType>(type)))) {
96 return op->emitOpError(valueKind) << " #" << valueIndex
97 << " must be , but got " << type;
98 }
99 return ::mlir::success();
100}
101
102static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT3(
103 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
104 unsigned valueIndex) {
105 if (!((::llvm::isa<::llzk::smt::SMTFuncType>(type)))) {
106 return op->emitOpError(valueKind) << " #" << valueIndex
107 << " must be , but got " << type;
108 }
109 return ::mlir::success();
110}
111
112static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT4(
113 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
114 unsigned valueIndex) {
115 if (!((smt::isAnyNonFuncSMTValueType(type)))) {
116 return op->emitOpError(valueKind) << " #" << valueIndex
117 << " must be variadic of any non-function SMT value type, but got " << type;
118 }
119 return ::mlir::success();
120}
121
122static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT5(
123 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
124 unsigned valueIndex) {
125 if (!((smt::isAnyNonFuncSMTValueType(type)))) {
126 return op->emitOpError(valueKind) << " #" << valueIndex
127 << " must be any non-function SMT value type, but got " << type;
128 }
129 return ::mlir::success();
130}
131
132static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT6(
133 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
134 unsigned valueIndex) {
135 if (!((smt::isAnySMTValueType(type)))) {
136 return op->emitOpError(valueKind) << " #" << valueIndex
137 << " must be any SMT value type, but got " << type;
138 }
139 return ::mlir::success();
140}
141
142static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT7(
143 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
144 unsigned valueIndex) {
145 if (!((::llvm::isa<::llzk::smt::ArrayType>(type)))) {
146 return op->emitOpError(valueKind) << " #" << valueIndex
147 << " must be , but got " << type;
148 }
149 return ::mlir::success();
150}
151
152static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT8(
153 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
154 unsigned valueIndex) {
155 if (!((::llvm::isa<::llzk::smt::BitVectorType>(type)))) {
156 return op->emitOpError(valueKind) << " #" << valueIndex
157 << " must be , but got " << type;
158 }
159 return ::mlir::success();
160}
161
162static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT9(
163 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
164 unsigned valueIndex) {
165 if (!((::llvm::isa<::llzk::smt::IntType>(type)))) {
166 return op->emitOpError(valueKind) << " #" << valueIndex
167 << " must be , but got " << type;
168 }
169 return ::mlir::success();
170}
171
172static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT10(
173 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
174 unsigned valueIndex) {
175 if (!((true))) {
176 return op->emitOpError(valueKind) << " #" << valueIndex
177 << " must be variadic of any type, but got " << type;
178 }
179 return ::mlir::success();
180}
181
182static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT11(
183 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
184 unsigned valueIndex) {
185 if (!((::llvm::isa<::llzk::smt::IntType>(type)))) {
186 return op->emitOpError(valueKind) << " #" << valueIndex
187 << " must be variadic of , but got " << type;
188 }
189 return ::mlir::success();
190}
191
192static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT12(
193 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
194 unsigned valueIndex) {
195 if (!(!((smt::isAnySMTValueType(type))))) {
196 return op->emitOpError(valueKind) << " #" << valueIndex
197 << " must be variadic of any non-smt type, but got " << type;
198 }
199 return ::mlir::success();
200}
201
202static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT1(
203 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
204 if (attr && !((::llvm::isa<::mlir::UnitAttr>(attr))))
205 return emitError() << "attribute '" << attrName
206 << "' failed to satisfy constraint: unit attribute";
207 return ::mlir::success();
208}
209static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT1(
210 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
211 return __mlir_ods_local_attr_constraint_SMT1(attr, attrName, [op]() {
212 return op->emitOpError();
213 });
214}
215
216static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT2(
217 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
218 if (attr && !((::llvm::isa<::llzk::smt::BVCmpPredicateAttr>(attr))))
219 return emitError() << "attribute '" << attrName
220 << "' failed to satisfy constraint: smt bit-vector comparison predicate";
221 return ::mlir::success();
222}
223static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT2(
224 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
225 return __mlir_ods_local_attr_constraint_SMT2(attr, attrName, [op]() {
226 return op->emitOpError();
227 });
228}
229
230static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT3(
231 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
232 if (attr && !((::llvm::isa<::llzk::smt::BitVectorAttr>(attr))))
233 return emitError() << "attribute '" << attrName
234 << "' failed to satisfy constraint: ";
235 return ::mlir::success();
236}
237static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT3(
238 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
239 return __mlir_ods_local_attr_constraint_SMT3(attr, attrName, [op]() {
240 return op->emitOpError();
241 });
242}
243
244static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT4(
245 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
246 if (attr && !((::llvm::isa<::mlir::BoolAttr>(attr))))
247 return emitError() << "attribute '" << attrName
248 << "' failed to satisfy constraint: bool attribute";
249 return ::mlir::success();
250}
251static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT4(
252 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
253 return __mlir_ods_local_attr_constraint_SMT4(attr, attrName, [op]() {
254 return op->emitOpError();
255 });
256}
257
258static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT5(
259 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
260 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
261 return emitError() << "attribute '" << attrName
262 << "' failed to satisfy constraint: string attribute";
263 return ::mlir::success();
264}
265static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT5(
266 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
267 return __mlir_ods_local_attr_constraint_SMT5(attr, attrName, [op]() {
268 return op->emitOpError();
269 });
270}
271
272static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT6(
273 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
274 if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::cast<::mlir::IntegerAttr>(attr).getType().isSignlessInteger(32)))))
275 return emitError() << "attribute '" << attrName
276 << "' failed to satisfy constraint: 32-bit signless integer attribute";
277 return ::mlir::success();
278}
279static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT6(
280 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
281 return __mlir_ods_local_attr_constraint_SMT6(attr, attrName, [op]() {
282 return op->emitOpError();
283 });
284}
285
286static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT7(
287 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
288 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::StringAttr>(attr))); }))))
289 return emitError() << "attribute '" << attrName
290 << "' failed to satisfy constraint: string array attribute";
291 return ::mlir::success();
292}
293static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT7(
294 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
295 return __mlir_ods_local_attr_constraint_SMT7(attr, attrName, [op]() {
296 return op->emitOpError();
297 });
298}
299
300static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT8(
301 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
302 if (attr && !((::llvm::isa<::llzk::smt::IntPredicateAttr>(attr))))
303 return emitError() << "attribute '" << attrName
304 << "' failed to satisfy constraint: smt comparison predicate for integers";
305 return ::mlir::success();
306}
307static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT8(
308 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
309 return __mlir_ods_local_attr_constraint_SMT8(attr, attrName, [op]() {
310 return op->emitOpError();
311 });
312}
313
314static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT9(
315 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
316 if (attr && !((::llvm::isa<::mlir::IntegerAttr>(attr))))
317 return emitError() << "attribute '" << attrName
318 << "' failed to satisfy constraint: arbitrary integer attribute";
319 return ::mlir::success();
320}
321static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT9(
322 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
323 return __mlir_ods_local_attr_constraint_SMT9(attr, attrName, [op]() {
324 return op->emitOpError();
325 });
326}
327
328static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT10(
329 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
330 if (attr && !((((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::cast<::mlir::IntegerAttr>(attr).getType().isSignlessInteger(32)))) && ((!::llvm::cast<::mlir::IntegerAttr>(attr).getValue().isNegative()))))
331 return emitError() << "attribute '" << attrName
332 << "' failed to satisfy constraint: 32-bit signless integer attribute whose value is non-negative";
333 return ::mlir::success();
334}
335static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT10(
336 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
337 return __mlir_ods_local_attr_constraint_SMT10(attr, attrName, [op]() {
338 return op->emitOpError();
339 });
340}
341
342static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT11(
343 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
344 if (attr && !((::llvm::isa<::llzk::smt::KeywordAttr>(attr))))
345 return emitError() << "attribute '" << attrName
346 << "' failed to satisfy constraint: an SMT-LIB keyword";
347 return ::mlir::success();
348}
349static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT11(
350 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
351 return __mlir_ods_local_attr_constraint_SMT11(attr, attrName, [op]() {
352 return op->emitOpError();
353 });
354}
355
356static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT12(
357 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
358 if (attr && !((true)))
359 return emitError() << "attribute '" << attrName
360 << "' failed to satisfy constraint: any attribute";
361 return ::mlir::success();
362}
363static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT12(
364 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
365 return __mlir_ods_local_attr_constraint_SMT12(attr, attrName, [op]() {
366 return op->emitOpError();
367 });
368}
369
370static ::llvm::LogicalResult __mlir_ods_local_region_constraint_SMT1(
371 ::mlir::Operation *op, ::mlir::Region &region, ::llvm::StringRef regionName,
372 unsigned regionIndex) {
373 if (!((::llvm::hasNItems(region, 1)))) {
374 return op->emitOpError("region #") << regionIndex
375 << (regionName.empty() ? " " : " ('" + regionName + "') ")
376 << "failed to verify constraint: region with 1 blocks";
377 }
378 return ::mlir::success();
379}
380} // namespace smt
381} // namespace llzk
382namespace llzk {
383namespace smt {
384
385//===----------------------------------------------------------------------===//
386// ::llzk::smt::AndOp definitions
387//===----------------------------------------------------------------------===//
388
389namespace detail {
390std::pair<unsigned, unsigned> AndOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
391 bool isVariadic[] = {true};
392 int prevVariadicCount = 0;
393 for (unsigned i = 0; i < index; ++i)
394 if (isVariadic[i]) ++prevVariadicCount;
395
396 // Calculate how many dynamic values a static variadic operand corresponds to.
397 // This assumes all static variadic operands have the same dynamic value count.
398 int variadicSize = (odsOperandsSize - 0) / 1;
399 // `index` passed in as the parameter is the static index which counts each
400 // operand (variadic or not) as size 1. So here for each previous static variadic
401 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
402 // value pack for this static operand starts.
403 int start = index + (variadicSize - 1) * prevVariadicCount;
404 int size = isVariadic[index] ? variadicSize : 1;
405 return {start, size};
406}
407
408} // namespace detail
410
411::llvm::LogicalResult AndOpAdaptor::verify(::mlir::Location loc) {
412 return ::mlir::success();
413}
414
415std::pair<unsigned, unsigned> AndOp::getODSOperandIndexAndLength(unsigned index) {
416 bool isVariadic[] = {true};
417 int prevVariadicCount = 0;
418 for (unsigned i = 0; i < index; ++i)
419 if (isVariadic[i]) ++prevVariadicCount;
420
421 // Calculate how many dynamic values a static variadic operand corresponds to.
422 // This assumes all static variadic operands have the same dynamic value count.
423 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
424 // `index` passed in as the parameter is the static index which counts each
425 // operand (variadic or not) as size 1. So here for each previous static variadic
426 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
427 // value pack for this static operand starts.
428 int start = index + (variadicSize - 1) * prevVariadicCount;
429 int size = isVariadic[index] ? variadicSize : 1;
430 return {start, size};
431}
432
433::mlir::MutableOperandRange AndOp::getInputsMutable() {
434 auto range = getODSOperandIndexAndLength(0);
435 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
436 return mutableRange;
437}
438
439void AndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs) {
440 build(odsBuilder, odsState, mlir::ValueRange{lhs, rhs});
441
442}
443
444void AndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
445 odsState.addOperands(inputs);
446 odsState.addTypes(result);
447}
448
449void AndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
450 odsState.addOperands(operands);
451 odsState.addAttributes(attributes);
452 assert(resultTypes.size() == 1u && "mismatched number of return types");
453 odsState.addTypes(resultTypes);
454}
455
456void AndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
457 odsState.addOperands(operands);
458 odsState.addAttributes(attributes);
459
460 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
461 if (::mlir::succeeded(AndOp::inferReturnTypes(odsBuilder.getContext(),
462 odsState.location, operands,
463 odsState.attributes.getDictionary(odsState.getContext()),
464 odsState.getRawProperties(),
465 odsState.regions, inferredReturnTypes))) {
466 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
467 odsState.addTypes(inferredReturnTypes);
468 } else {
469 ::llvm::report_fatal_error("Failed to infer result type(s).");
470 }
471}
472
473::llvm::LogicalResult AndOp::verifyInvariantsImpl() {
474 {
475 unsigned index = 0; (void)index;
476 auto valueGroup0 = getODSOperands(0);
477
478 for (auto v : valueGroup0) {
479 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT1(*this, v.getType(), "operand", index++)))
480 return ::mlir::failure();
481 }
482 }
483 {
484 unsigned index = 0; (void)index;
485 auto valueGroup0 = getODSResults(0);
486
487 for (auto v : valueGroup0) {
488 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
489 return ::mlir::failure();
490 }
491 }
492 return ::mlir::success();
493}
494
495::llvm::LogicalResult AndOp::verifyInvariants() {
496 return verifyInvariantsImpl();
497}
498
499::llvm::LogicalResult AndOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
500 inferredReturnTypes.resize(1);
501 ::mlir::Builder odsBuilder(context);
502 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
503 inferredReturnTypes[0] = odsInferredType0;
504 return ::mlir::success();
505}
506
507::mlir::ParseResult AndOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
508 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
509 ::llvm::SMLoc inputsOperandsLoc;
510 (void)inputsOperandsLoc;
511
512 inputsOperandsLoc = parser.getCurrentLocation();
513 if (parser.parseOperandList(inputsOperands))
514 return ::mlir::failure();
515 {
516 auto loc = parser.getCurrentLocation();(void)loc;
517 if (parser.parseOptionalAttrDict(result.attributes))
518 return ::mlir::failure();
519 }
520 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
521 result.addTypes(odsBuildableType0);
522 if (parser.resolveOperands(inputsOperands, odsBuildableType0, inputsOperandsLoc, result.operands))
523 return ::mlir::failure();
524 return ::mlir::success();
525}
526
527void AndOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
528 _odsPrinter << ' ';
529 _odsPrinter << getInputs();
530 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
531 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
532}
533
534void AndOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
535}
536
537} // namespace smt
538} // namespace llzk
539MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::AndOp)
540
541namespace llzk {
542namespace smt {
543
544//===----------------------------------------------------------------------===//
545// ::llzk::smt::ApplyFuncOp definitions
546//===----------------------------------------------------------------------===//
547
548namespace detail {
549std::pair<unsigned, unsigned> ApplyFuncOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
550 bool isVariadic[] = {false, true};
551 int prevVariadicCount = 0;
552 for (unsigned i = 0; i < index; ++i)
553 if (isVariadic[i]) ++prevVariadicCount;
554
555 // Calculate how many dynamic values a static variadic operand corresponds to.
556 // This assumes all static variadic operands have the same dynamic value count.
557 int variadicSize = (odsOperandsSize - 1) / 1;
558 // `index` passed in as the parameter is the static index which counts each
559 // operand (variadic or not) as size 1. So here for each previous static variadic
560 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
561 // value pack for this static operand starts.
562 int start = index + (variadicSize - 1) * prevVariadicCount;
563 int size = isVariadic[index] ? variadicSize : 1;
564 return {start, size};
565}
566
567} // namespace detail
569
570::llvm::LogicalResult ApplyFuncOpAdaptor::verify(::mlir::Location loc) {
571 return ::mlir::success();
572}
573
574std::pair<unsigned, unsigned> ApplyFuncOp::getODSOperandIndexAndLength(unsigned index) {
575 bool isVariadic[] = {false, true};
576 int prevVariadicCount = 0;
577 for (unsigned i = 0; i < index; ++i)
578 if (isVariadic[i]) ++prevVariadicCount;
579
580 // Calculate how many dynamic values a static variadic operand corresponds to.
581 // This assumes all static variadic operands have the same dynamic value count.
582 int variadicSize = (getOperation()->getNumOperands() - 1) / 1;
583 // `index` passed in as the parameter is the static index which counts each
584 // operand (variadic or not) as size 1. So here for each previous static variadic
585 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
586 // value pack for this static operand starts.
587 int start = index + (variadicSize - 1) * prevVariadicCount;
588 int size = isVariadic[index] ? variadicSize : 1;
589 return {start, size};
590}
591
592::mlir::MutableOperandRange ApplyFuncOp::getArgsMutable() {
593 auto range = getODSOperandIndexAndLength(1);
594 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
595 return mutableRange;
596}
597
598void ApplyFuncOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value func, ::mlir::ValueRange args) {
599 odsState.addOperands(func);
600 odsState.addOperands(args);
601 odsState.addTypes(result);
602}
603
604void ApplyFuncOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value func, ::mlir::ValueRange args) {
605 odsState.addOperands(func);
606 odsState.addOperands(args);
607
608 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
609 if (::mlir::succeeded(ApplyFuncOp::inferReturnTypes(odsBuilder.getContext(),
610 odsState.location, odsState.operands,
611 odsState.attributes.getDictionary(odsState.getContext()),
612 odsState.getRawProperties(),
613 odsState.regions, inferredReturnTypes)))
614 odsState.addTypes(inferredReturnTypes);
615 else
616 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
617
618}
619
620void ApplyFuncOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value func, ::mlir::ValueRange args) {
621 odsState.addOperands(func);
622 odsState.addOperands(args);
623 assert(resultTypes.size() == 1u && "mismatched number of results");
624 odsState.addTypes(resultTypes);
625}
626
627void ApplyFuncOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
628 assert(operands.size() >= 1u && "mismatched number of parameters");
629 odsState.addOperands(operands);
630 odsState.addAttributes(attributes);
631 assert(resultTypes.size() == 1u && "mismatched number of return types");
632 odsState.addTypes(resultTypes);
633}
634
635void ApplyFuncOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
636 assert(operands.size() >= 1u && "mismatched number of parameters");
637 odsState.addOperands(operands);
638 odsState.addAttributes(attributes);
639
640 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
641 if (::mlir::succeeded(ApplyFuncOp::inferReturnTypes(odsBuilder.getContext(),
642 odsState.location, operands,
643 odsState.attributes.getDictionary(odsState.getContext()),
644 odsState.getRawProperties(),
645 odsState.regions, inferredReturnTypes))) {
646 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
647 odsState.addTypes(inferredReturnTypes);
648 } else {
649 ::llvm::report_fatal_error("Failed to infer result type(s).");
650 }
651}
652
653::llvm::LogicalResult ApplyFuncOp::verifyInvariantsImpl() {
654 {
655 unsigned index = 0; (void)index;
656 auto valueGroup0 = getODSOperands(0);
657
658 for (auto v : valueGroup0) {
659 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT3(*this, v.getType(), "operand", index++)))
660 return ::mlir::failure();
661 }
662 auto valueGroup1 = getODSOperands(1);
663
664 for (auto v : valueGroup1) {
665 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT4(*this, v.getType(), "operand", index++)))
666 return ::mlir::failure();
667 }
668 }
669 {
670 unsigned index = 0; (void)index;
671 auto valueGroup0 = getODSResults(0);
672
673 for (auto v : valueGroup0) {
674 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT5(*this, v.getType(), "result", index++)))
675 return ::mlir::failure();
676 }
677 }
678 if (!((std::equal_to<>()(cast<SMTFuncType>((*this->getODSOperands(0).begin()).getType()).getRangeType(), (*this->getODSResults(0).begin()).getType()))))
679 return emitOpError("failed to verify that summary");
680 if (!((llvm::equal(cast<SMTFuncType>((*this->getODSOperands(0).begin()).getType()).getDomainTypes(), this->getODSOperands(1).getType()))))
681 return emitOpError("failed to verify that summary");
682 return ::mlir::success();
683}
684
685::llvm::LogicalResult ApplyFuncOp::verifyInvariants() {
686 return verifyInvariantsImpl();
687}
688
689::llvm::LogicalResult ApplyFuncOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
690 inferredReturnTypes.resize(1);
691 ::mlir::Builder odsBuilder(context);
692 if (operands.size() <= 0)
693 return ::mlir::failure();
694 ::mlir::Type odsInferredType0 = cast<SMTFuncType>(operands[0].getType()).getRangeType();
695 inferredReturnTypes[0] = odsInferredType0;
696 return ::mlir::success();
697}
698
699::mlir::ParseResult ApplyFuncOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
700 ::mlir::OpAsmParser::UnresolvedOperand funcRawOperand{};
701 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> funcOperands(&funcRawOperand, 1); ::llvm::SMLoc funcOperandsLoc;
702 (void)funcOperandsLoc;
703 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
704 ::llvm::SMLoc argsOperandsLoc;
705 (void)argsOperandsLoc;
706 ::mlir::Type funcRawType{};
707 ::llvm::ArrayRef<::mlir::Type> funcTypes(&funcRawType, 1);
708
709 funcOperandsLoc = parser.getCurrentLocation();
710 if (parser.parseOperand(funcRawOperand))
711 return ::mlir::failure();
712 if (parser.parseLParen())
713 return ::mlir::failure();
714
715 argsOperandsLoc = parser.getCurrentLocation();
716 if (parser.parseOperandList(argsOperands))
717 return ::mlir::failure();
718 if (parser.parseRParen())
719 return ::mlir::failure();
720 {
721 auto loc = parser.getCurrentLocation();(void)loc;
722 if (parser.parseOptionalAttrDict(result.attributes))
723 return ::mlir::failure();
724 }
725 if (parser.parseColon())
726 return ::mlir::failure();
727
728 if (parser.parseType(funcRawType))
729 return ::mlir::failure();
730 for (::mlir::Type type : funcTypes) {
731 (void)type;
732 if (!((::llvm::isa<::llzk::smt::SMTFuncType>(type)))) {
733 return parser.emitError(parser.getNameLoc()) << "'func' must be , but got " << type;
734 }
735 }
736 result.addTypes(cast<SMTFuncType>(funcTypes[0]).getRangeType());
737 if (parser.resolveOperands(funcOperands, funcTypes, funcOperandsLoc, result.operands))
738 return ::mlir::failure();
739 if (parser.resolveOperands(argsOperands, cast<SMTFuncType>(funcTypes[0]).getDomainTypes(), argsOperandsLoc, result.operands))
740 return ::mlir::failure();
741 return ::mlir::success();
742}
743
744void ApplyFuncOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
745 _odsPrinter << ' ';
746 _odsPrinter << getFunc();
747 _odsPrinter << "(";
748 _odsPrinter << getArgs();
749 _odsPrinter << ")";
750 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
751 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
752 _odsPrinter << ' ' << ":";
753 _odsPrinter << ' ';
754 _odsPrinter << getFunc().getType();
755}
756
757void ApplyFuncOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
758}
759
760} // namespace smt
761} // namespace llzk
762MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ApplyFuncOp)
763
764namespace llzk {
765namespace smt {
766
767//===----------------------------------------------------------------------===//
768// ::llzk::smt::ArrayBroadcastOp definitions
769//===----------------------------------------------------------------------===//
770
771namespace detail {
772} // namespace detail
774
775::llvm::LogicalResult ArrayBroadcastOpAdaptor::verify(::mlir::Location loc) {
776 return ::mlir::success();
777}
778
779void ArrayBroadcastOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value) {
780 odsState.addOperands(value);
781 odsState.addTypes(result);
782}
783
784void ArrayBroadcastOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
785 odsState.addOperands(value);
786 assert(resultTypes.size() == 1u && "mismatched number of results");
787 odsState.addTypes(resultTypes);
788}
789
790void ArrayBroadcastOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
791 assert(operands.size() == 1u && "mismatched number of parameters");
792 odsState.addOperands(operands);
793 odsState.addAttributes(attributes);
794 assert(resultTypes.size() == 1u && "mismatched number of return types");
795 odsState.addTypes(resultTypes);
796}
797
799 {
800 unsigned index = 0; (void)index;
801 auto valueGroup0 = getODSOperands(0);
802
803 for (auto v : valueGroup0) {
804 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
805 return ::mlir::failure();
806 }
807 }
808 {
809 unsigned index = 0; (void)index;
810 auto valueGroup0 = getODSResults(0);
811
812 for (auto v : valueGroup0) {
813 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT7(*this, v.getType(), "result", index++)))
814 return ::mlir::failure();
815 }
816 }
817 if (!((std::equal_to<>()(cast<ArrayType>((*this->getODSResults(0).begin()).getType()).getRangeType(), (*this->getODSOperands(0).begin()).getType()))))
818 return emitOpError("failed to verify that summary");
819 return ::mlir::success();
820}
821
822::llvm::LogicalResult ArrayBroadcastOp::verifyInvariants() {
823 return verifyInvariantsImpl();
824}
825
826::mlir::ParseResult ArrayBroadcastOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
827 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
828 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
829 (void)valueOperandsLoc;
830 ::mlir::Type resultRawType{};
831 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
832
833 valueOperandsLoc = parser.getCurrentLocation();
834 if (parser.parseOperand(valueRawOperand))
835 return ::mlir::failure();
836 {
837 auto loc = parser.getCurrentLocation();(void)loc;
838 if (parser.parseOptionalAttrDict(result.attributes))
839 return ::mlir::failure();
840 }
841 if (parser.parseColon())
842 return ::mlir::failure();
843
844 if (parser.parseType(resultRawType))
845 return ::mlir::failure();
846 for (::mlir::Type type : resultTypes) {
847 (void)type;
848 if (!((::llvm::isa<::llzk::smt::ArrayType>(type)))) {
849 return parser.emitError(parser.getNameLoc()) << "'result' must be , but got " << type;
850 }
851 }
852 result.addTypes(resultTypes);
853 if (parser.resolveOperands(valueOperands, cast<ArrayType>(resultTypes[0]).getRangeType(), valueOperandsLoc, result.operands))
854 return ::mlir::failure();
855 return ::mlir::success();
856}
857
858void ArrayBroadcastOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
859 _odsPrinter << ' ';
860 _odsPrinter << getValue();
861 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
862 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
863 _odsPrinter << ' ' << ":";
864 _odsPrinter << ' ';
865 _odsPrinter << getResult().getType();
866}
867
868void ArrayBroadcastOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
869}
870
871} // namespace smt
872} // namespace llzk
873MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ArrayBroadcastOp)
874
875namespace llzk {
876namespace smt {
877
878//===----------------------------------------------------------------------===//
879// ::llzk::smt::ArraySelectOp definitions
880//===----------------------------------------------------------------------===//
881
882namespace detail {
883} // namespace detail
885
886::llvm::LogicalResult ArraySelectOpAdaptor::verify(::mlir::Location loc) {
887 return ::mlir::success();
888}
889
890void ArraySelectOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value array, ::mlir::Value index) {
891 odsState.addOperands(array);
892 odsState.addOperands(index);
893 odsState.addTypes(result);
894}
895
896void ArraySelectOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value array, ::mlir::Value index) {
897 odsState.addOperands(array);
898 odsState.addOperands(index);
899
900 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
901 if (::mlir::succeeded(ArraySelectOp::inferReturnTypes(odsBuilder.getContext(),
902 odsState.location, odsState.operands,
903 odsState.attributes.getDictionary(odsState.getContext()),
904 odsState.getRawProperties(),
905 odsState.regions, inferredReturnTypes)))
906 odsState.addTypes(inferredReturnTypes);
907 else
908 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
909
910}
911
912void ArraySelectOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value array, ::mlir::Value index) {
913 odsState.addOperands(array);
914 odsState.addOperands(index);
915 assert(resultTypes.size() == 1u && "mismatched number of results");
916 odsState.addTypes(resultTypes);
917}
918
919void ArraySelectOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
920 assert(operands.size() == 2u && "mismatched number of parameters");
921 odsState.addOperands(operands);
922 odsState.addAttributes(attributes);
923 assert(resultTypes.size() == 1u && "mismatched number of return types");
924 odsState.addTypes(resultTypes);
925}
926
927void ArraySelectOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
928 assert(operands.size() == 2u && "mismatched number of parameters");
929 odsState.addOperands(operands);
930 odsState.addAttributes(attributes);
931
932 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
933 if (::mlir::succeeded(ArraySelectOp::inferReturnTypes(odsBuilder.getContext(),
934 odsState.location, operands,
935 odsState.attributes.getDictionary(odsState.getContext()),
936 odsState.getRawProperties(),
937 odsState.regions, inferredReturnTypes))) {
938 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
939 odsState.addTypes(inferredReturnTypes);
940 } else {
941 ::llvm::report_fatal_error("Failed to infer result type(s).");
942 }
943}
944
945::llvm::LogicalResult ArraySelectOp::verifyInvariantsImpl() {
946 {
947 unsigned index = 0; (void)index;
948 auto valueGroup0 = getODSOperands(0);
949
950 for (auto v : valueGroup0) {
951 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT7(*this, v.getType(), "operand", index++)))
952 return ::mlir::failure();
953 }
954 auto valueGroup1 = getODSOperands(1);
955
956 for (auto v : valueGroup1) {
957 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
958 return ::mlir::failure();
959 }
960 }
961 {
962 unsigned index = 0; (void)index;
963 auto valueGroup0 = getODSResults(0);
964
965 for (auto v : valueGroup0) {
966 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "result", index++)))
967 return ::mlir::failure();
968 }
969 }
970 if (!((std::equal_to<>()(cast<ArrayType>((*this->getODSOperands(0).begin()).getType()).getDomainType(), (*this->getODSOperands(1).begin()).getType()))))
971 return emitOpError("failed to verify that summary");
972 if (!((std::equal_to<>()(cast<ArrayType>((*this->getODSOperands(0).begin()).getType()).getRangeType(), (*this->getODSResults(0).begin()).getType()))))
973 return emitOpError("failed to verify that summary");
974 return ::mlir::success();
975}
976
977::llvm::LogicalResult ArraySelectOp::verifyInvariants() {
978 return verifyInvariantsImpl();
979}
980
981::llvm::LogicalResult ArraySelectOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
982 inferredReturnTypes.resize(1);
983 ::mlir::Builder odsBuilder(context);
984 if (operands.size() <= 0)
985 return ::mlir::failure();
986 ::mlir::Type odsInferredType0 = cast<ArrayType>(operands[0].getType()).getRangeType();
987 inferredReturnTypes[0] = odsInferredType0;
988 return ::mlir::success();
989}
990
991::mlir::ParseResult ArraySelectOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
992 ::mlir::OpAsmParser::UnresolvedOperand arrayRawOperand{};
993 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> arrayOperands(&arrayRawOperand, 1); ::llvm::SMLoc arrayOperandsLoc;
994 (void)arrayOperandsLoc;
995 ::mlir::OpAsmParser::UnresolvedOperand indexRawOperand{};
996 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> indexOperands(&indexRawOperand, 1); ::llvm::SMLoc indexOperandsLoc;
997 (void)indexOperandsLoc;
998 ::mlir::Type arrayRawType{};
999 ::llvm::ArrayRef<::mlir::Type> arrayTypes(&arrayRawType, 1);
1000
1001 arrayOperandsLoc = parser.getCurrentLocation();
1002 if (parser.parseOperand(arrayRawOperand))
1003 return ::mlir::failure();
1004 if (parser.parseLSquare())
1005 return ::mlir::failure();
1006
1007 indexOperandsLoc = parser.getCurrentLocation();
1008 if (parser.parseOperand(indexRawOperand))
1009 return ::mlir::failure();
1010 if (parser.parseRSquare())
1011 return ::mlir::failure();
1012 {
1013 auto loc = parser.getCurrentLocation();(void)loc;
1014 if (parser.parseOptionalAttrDict(result.attributes))
1015 return ::mlir::failure();
1016 }
1017 if (parser.parseColon())
1018 return ::mlir::failure();
1019
1020 if (parser.parseType(arrayRawType))
1021 return ::mlir::failure();
1022 for (::mlir::Type type : arrayTypes) {
1023 (void)type;
1024 if (!((::llvm::isa<::llzk::smt::ArrayType>(type)))) {
1025 return parser.emitError(parser.getNameLoc()) << "'array' must be , but got " << type;
1026 }
1027 }
1028 result.addTypes(cast<ArrayType>(arrayTypes[0]).getRangeType());
1029 if (parser.resolveOperands(arrayOperands, arrayTypes, arrayOperandsLoc, result.operands))
1030 return ::mlir::failure();
1031 if (parser.resolveOperands(indexOperands, cast<ArrayType>(arrayTypes[0]).getDomainType(), indexOperandsLoc, result.operands))
1032 return ::mlir::failure();
1033 return ::mlir::success();
1034}
1035
1036void ArraySelectOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1037 _odsPrinter << ' ';
1038 _odsPrinter << getArray();
1039 _odsPrinter << "[";
1040 _odsPrinter << getIndex();
1041 _odsPrinter << "]";
1042 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1043 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1044 _odsPrinter << ' ' << ":";
1045 _odsPrinter << ' ';
1046 _odsPrinter << getArray().getType();
1047}
1048
1049void ArraySelectOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1050}
1051
1052} // namespace smt
1053} // namespace llzk
1054MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ArraySelectOp)
1055
1056namespace llzk {
1057namespace smt {
1058
1059//===----------------------------------------------------------------------===//
1060// ::llzk::smt::ArrayStoreOp definitions
1061//===----------------------------------------------------------------------===//
1062
1063namespace detail {
1064} // namespace detail
1066
1067::llvm::LogicalResult ArrayStoreOpAdaptor::verify(::mlir::Location loc) {
1068 return ::mlir::success();
1069}
1070
1071void ArrayStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value array, ::mlir::Value index, ::mlir::Value value) {
1072 odsState.addOperands(array);
1073 odsState.addOperands(index);
1074 odsState.addOperands(value);
1075 odsState.addTypes(result);
1076}
1077
1078void ArrayStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value array, ::mlir::Value index, ::mlir::Value value) {
1079 odsState.addOperands(array);
1080 odsState.addOperands(index);
1081 odsState.addOperands(value);
1082
1083 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1084 if (::mlir::succeeded(ArrayStoreOp::inferReturnTypes(odsBuilder.getContext(),
1085 odsState.location, odsState.operands,
1086 odsState.attributes.getDictionary(odsState.getContext()),
1087 odsState.getRawProperties(),
1088 odsState.regions, inferredReturnTypes)))
1089 odsState.addTypes(inferredReturnTypes);
1090 else
1091 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1092
1093}
1094
1095void ArrayStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value array, ::mlir::Value index, ::mlir::Value value) {
1096 odsState.addOperands(array);
1097 odsState.addOperands(index);
1098 odsState.addOperands(value);
1099 assert(resultTypes.size() == 1u && "mismatched number of results");
1100 odsState.addTypes(resultTypes);
1101}
1102
1103void ArrayStoreOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1104 assert(operands.size() == 3u && "mismatched number of parameters");
1105 odsState.addOperands(operands);
1106 odsState.addAttributes(attributes);
1107 assert(resultTypes.size() == 1u && "mismatched number of return types");
1108 odsState.addTypes(resultTypes);
1109}
1110
1111void ArrayStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1112 assert(operands.size() == 3u && "mismatched number of parameters");
1113 odsState.addOperands(operands);
1114 odsState.addAttributes(attributes);
1115
1116 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1117 if (::mlir::succeeded(ArrayStoreOp::inferReturnTypes(odsBuilder.getContext(),
1118 odsState.location, operands,
1119 odsState.attributes.getDictionary(odsState.getContext()),
1120 odsState.getRawProperties(),
1121 odsState.regions, inferredReturnTypes))) {
1122 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1123 odsState.addTypes(inferredReturnTypes);
1124 } else {
1125 ::llvm::report_fatal_error("Failed to infer result type(s).");
1126 }
1127}
1128
1129::llvm::LogicalResult ArrayStoreOp::verifyInvariantsImpl() {
1130 {
1131 unsigned index = 0; (void)index;
1132 auto valueGroup0 = getODSOperands(0);
1133
1134 for (auto v : valueGroup0) {
1135 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT7(*this, v.getType(), "operand", index++)))
1136 return ::mlir::failure();
1137 }
1138 auto valueGroup1 = getODSOperands(1);
1139
1140 for (auto v : valueGroup1) {
1141 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
1142 return ::mlir::failure();
1143 }
1144 auto valueGroup2 = getODSOperands(2);
1145
1146 for (auto v : valueGroup2) {
1147 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
1148 return ::mlir::failure();
1149 }
1150 }
1151 {
1152 unsigned index = 0; (void)index;
1153 auto valueGroup0 = getODSResults(0);
1154
1155 for (auto v : valueGroup0) {
1156 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT7(*this, v.getType(), "result", index++)))
1157 return ::mlir::failure();
1158 }
1159 }
1160 if (!((std::equal_to<>()(cast<ArrayType>((*this->getODSOperands(0).begin()).getType()).getDomainType(), (*this->getODSOperands(1).begin()).getType()))))
1161 return emitOpError("failed to verify that summary");
1162 if (!((std::equal_to<>()(cast<ArrayType>((*this->getODSOperands(0).begin()).getType()).getRangeType(), (*this->getODSOperands(2).begin()).getType()))))
1163 return emitOpError("failed to verify that summary");
1164 if (!((((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()) && ((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()))))
1165 return emitOpError("failed to verify that all of {array, result} have same type");
1166 return ::mlir::success();
1167}
1168
1169::llvm::LogicalResult ArrayStoreOp::verifyInvariants() {
1170 return verifyInvariantsImpl();
1171}
1172
1173::llvm::LogicalResult ArrayStoreOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1174 inferredReturnTypes.resize(1);
1175 ::mlir::Builder odsBuilder(context);
1176 if (operands.size() <= 0)
1177 return ::mlir::failure();
1178 ::mlir::Type odsInferredType0 = operands[0].getType();
1179 inferredReturnTypes[0] = odsInferredType0;
1180 return ::mlir::success();
1181}
1182
1183::mlir::ParseResult ArrayStoreOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1184 ::mlir::OpAsmParser::UnresolvedOperand arrayRawOperand{};
1185 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> arrayOperands(&arrayRawOperand, 1); ::llvm::SMLoc arrayOperandsLoc;
1186 (void)arrayOperandsLoc;
1187 ::mlir::OpAsmParser::UnresolvedOperand indexRawOperand{};
1188 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> indexOperands(&indexRawOperand, 1); ::llvm::SMLoc indexOperandsLoc;
1189 (void)indexOperandsLoc;
1190 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
1191 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
1192 (void)valueOperandsLoc;
1193 ::mlir::Type arrayRawType{};
1194 ::llvm::ArrayRef<::mlir::Type> arrayTypes(&arrayRawType, 1);
1195
1196 arrayOperandsLoc = parser.getCurrentLocation();
1197 if (parser.parseOperand(arrayRawOperand))
1198 return ::mlir::failure();
1199 if (parser.parseLSquare())
1200 return ::mlir::failure();
1201
1202 indexOperandsLoc = parser.getCurrentLocation();
1203 if (parser.parseOperand(indexRawOperand))
1204 return ::mlir::failure();
1205 if (parser.parseRSquare())
1206 return ::mlir::failure();
1207 if (parser.parseComma())
1208 return ::mlir::failure();
1209
1210 valueOperandsLoc = parser.getCurrentLocation();
1211 if (parser.parseOperand(valueRawOperand))
1212 return ::mlir::failure();
1213 {
1214 auto loc = parser.getCurrentLocation();(void)loc;
1215 if (parser.parseOptionalAttrDict(result.attributes))
1216 return ::mlir::failure();
1217 }
1218 if (parser.parseColon())
1219 return ::mlir::failure();
1220
1221 if (parser.parseType(arrayRawType))
1222 return ::mlir::failure();
1223 for (::mlir::Type type : arrayTypes) {
1224 (void)type;
1225 if (!((::llvm::isa<::llzk::smt::ArrayType>(type)))) {
1226 return parser.emitError(parser.getNameLoc()) << "'array' must be , but got " << type;
1227 }
1228 }
1229 result.addTypes(arrayTypes[0]);
1230 if (parser.resolveOperands(arrayOperands, arrayTypes, arrayOperandsLoc, result.operands))
1231 return ::mlir::failure();
1232 if (parser.resolveOperands(indexOperands, cast<ArrayType>(arrayTypes[0]).getDomainType(), indexOperandsLoc, result.operands))
1233 return ::mlir::failure();
1234 if (parser.resolveOperands(valueOperands, cast<ArrayType>(arrayTypes[0]).getRangeType(), valueOperandsLoc, result.operands))
1235 return ::mlir::failure();
1236 return ::mlir::success();
1237}
1238
1239void ArrayStoreOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1240 _odsPrinter << ' ';
1241 _odsPrinter << getArray();
1242 _odsPrinter << "[";
1243 _odsPrinter << getIndex();
1244 _odsPrinter << "]";
1245 _odsPrinter << ",";
1246 _odsPrinter << ' ';
1247 _odsPrinter << getValue();
1248 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1249 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1250 _odsPrinter << ' ' << ":";
1251 _odsPrinter << ' ';
1252 _odsPrinter << getArray().getType();
1253}
1254
1255void ArrayStoreOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1256}
1257
1258} // namespace smt
1259} // namespace llzk
1260MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ArrayStoreOp)
1261
1262namespace llzk {
1263namespace smt {
1264
1265//===----------------------------------------------------------------------===//
1266// ::llzk::smt::AssertOp definitions
1267//===----------------------------------------------------------------------===//
1268
1269namespace detail {
1270} // namespace detail
1272
1273::llvm::LogicalResult AssertOpAdaptor::verify(::mlir::Location loc) {
1274 return ::mlir::success();
1275}
1276
1277void AssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
1278 odsState.addOperands(input);
1279}
1280
1281void AssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
1282 odsState.addOperands(input);
1283 assert(resultTypes.size() == 0u && "mismatched number of results");
1284 odsState.addTypes(resultTypes);
1285}
1286
1287void AssertOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1288 assert(operands.size() == 1u && "mismatched number of parameters");
1289 odsState.addOperands(operands);
1290 odsState.addAttributes(attributes);
1291 assert(resultTypes.size() == 0u && "mismatched number of return types");
1292 odsState.addTypes(resultTypes);
1293}
1294
1295::llvm::LogicalResult AssertOp::verifyInvariantsImpl() {
1296 {
1297 unsigned index = 0; (void)index;
1298 auto valueGroup0 = getODSOperands(0);
1299
1300 for (auto v : valueGroup0) {
1301 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "operand", index++)))
1302 return ::mlir::failure();
1303 }
1304 }
1305 return ::mlir::success();
1306}
1307
1308::llvm::LogicalResult AssertOp::verifyInvariants() {
1309 return verifyInvariantsImpl();
1310}
1311
1312::mlir::ParseResult AssertOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1313 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
1314 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
1315 (void)inputOperandsLoc;
1316
1317 inputOperandsLoc = parser.getCurrentLocation();
1318 if (parser.parseOperand(inputRawOperand))
1319 return ::mlir::failure();
1320 {
1321 auto loc = parser.getCurrentLocation();(void)loc;
1322 if (parser.parseOptionalAttrDict(result.attributes))
1323 return ::mlir::failure();
1324 }
1325 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
1326 if (parser.resolveOperands(inputOperands, odsBuildableType0, inputOperandsLoc, result.operands))
1327 return ::mlir::failure();
1328 return ::mlir::success();
1329}
1330
1331void AssertOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1332 _odsPrinter << ' ';
1333 _odsPrinter << getInput();
1334 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1335 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1336}
1337
1338} // namespace smt
1339} // namespace llzk
1340MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::AssertOp)
1341
1342namespace llzk {
1343namespace smt {
1344
1345//===----------------------------------------------------------------------===//
1346// ::llzk::smt::BV2IntOp definitions
1347//===----------------------------------------------------------------------===//
1348
1349namespace detail {
1350BV2IntOpGenericAdaptorBase::BV2IntOpGenericAdaptorBase(BV2IntOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
1351
1353 auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().is_signed);
1354 if (!attr)
1355 attr = ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr);
1356 return attr;
1357}
1358
1360 auto attr = getIsSignedAttr();
1361 if (!attr)
1362 return ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr) != nullptr;
1363 return attr != nullptr;
1364}
1365
1366} // namespace detail
1368
1369::llvm::LogicalResult BV2IntOpAdaptor::verify(::mlir::Location loc) {
1370 auto tblgen_is_signed = getProperties().is_signed; (void)tblgen_is_signed;
1371
1372 if (tblgen_is_signed && !((::llvm::isa<::mlir::UnitAttr>(tblgen_is_signed))))
1373 return emitError(loc, "'smt.bv2int' op ""attribute 'is_signed' failed to satisfy constraint: unit attribute");
1374 return ::mlir::success();
1375}
1376
1377::llvm::LogicalResult BV2IntOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1378 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1379 if (!dict) {
1380 emitError() << "expected DictionaryAttr to set properties";
1381 return ::mlir::failure();
1382 }
1383
1384 {
1385 auto &propStorage = prop.is_signed;
1386 auto attr = dict.get("is_signed");
1387 if (attr) {
1388 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1389 if (convertedAttr) {
1390 propStorage = convertedAttr;
1391 } else {
1392 emitError() << "Invalid attribute `is_signed` in property conversion: " << attr;
1393 return ::mlir::failure();
1394 }
1395 }
1396 }
1397 return ::mlir::success();
1398}
1399
1400::mlir::Attribute BV2IntOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1401 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1402 ::mlir::Builder odsBuilder{ctx};
1403
1404 {
1405 const auto &propStorage = prop.is_signed;
1406 if (propStorage)
1407 attrs.push_back(odsBuilder.getNamedAttr("is_signed",
1408 propStorage));
1409 }
1410
1411 if (!attrs.empty())
1412 return odsBuilder.getDictionaryAttr(attrs);
1413 return {};
1414}
1415
1416llvm::hash_code BV2IntOp::computePropertiesHash(const Properties &prop) {
1417 return llvm::hash_combine(
1418 llvm::hash_value(prop.is_signed.getAsOpaquePointer()));
1419}
1420
1421std::optional<mlir::Attribute> BV2IntOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1422 if (name == "is_signed")
1423 return prop.is_signed;
1424 return std::nullopt;
1425}
1426
1427void BV2IntOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1428 if (name == "is_signed") {
1429 prop.is_signed = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.is_signed)>>(value);
1430 return;
1431 }
1432}
1433
1434void BV2IntOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
1435 if (prop.is_signed) attrs.append("is_signed", prop.is_signed);
1436}
1437
1438::llvm::LogicalResult BV2IntOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1439 {
1440 ::mlir::Attribute attr = attrs.get(getIsSignedAttrName(opName));
1441 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(attr, "is_signed", emitError)))
1442 return ::mlir::failure();
1443 }
1444 return ::mlir::success();
1445}
1446
1447::llvm::LogicalResult BV2IntOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
1448 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
1449 if (::mlir::failed(reader.readOptionalAttribute(prop.is_signed)))
1450 return ::mlir::failure();
1451 return ::mlir::success();
1452}
1453
1454void BV2IntOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
1455 auto &prop = getProperties(); (void)prop;
1456
1457 writer.writeOptionalAttribute(prop.is_signed);
1458}
1459
1461 auto attr = getIsSignedAttr();
1462 if (!attr)
1463 return ((false) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr) != nullptr;
1464 return attr != nullptr;
1465}
1466
1467void BV2IntOp::setIsSigned(bool attrValue) {
1468 auto &odsProp = getProperties().is_signed;
1469 if (attrValue)
1470 odsProp = ((attrValue) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr);
1471 else
1472 odsProp = nullptr;
1473}
1474
1475void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input, /*optional*/::mlir::UnitAttr is_signed) {
1476 odsState.addOperands(input);
1477 if (is_signed) {
1478 odsState.getOrAddProperties<Properties>().is_signed = is_signed;
1479 }
1480 odsState.addTypes(result);
1481}
1482
1483void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input, /*optional*/::mlir::UnitAttr is_signed) {
1484 odsState.addOperands(input);
1485 if (is_signed) {
1486 odsState.getOrAddProperties<Properties>().is_signed = is_signed;
1487 }
1488
1489 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1490 if (::mlir::succeeded(BV2IntOp::inferReturnTypes(odsBuilder.getContext(),
1491 odsState.location, odsState.operands,
1492 odsState.attributes.getDictionary(odsState.getContext()),
1493 odsState.getRawProperties(),
1494 odsState.regions, inferredReturnTypes)))
1495 odsState.addTypes(inferredReturnTypes);
1496 else
1497 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1498
1499}
1500
1501void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input, /*optional*/::mlir::UnitAttr is_signed) {
1502 odsState.addOperands(input);
1503 if (is_signed) {
1504 odsState.getOrAddProperties<Properties>().is_signed = is_signed;
1505 }
1506 assert(resultTypes.size() == 1u && "mismatched number of results");
1507 odsState.addTypes(resultTypes);
1508}
1509
1510void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input, /*optional*/bool is_signed) {
1511 odsState.addOperands(input);
1512 if (is_signed) {
1513 odsState.getOrAddProperties<Properties>().is_signed = ((is_signed) ? odsBuilder.getUnitAttr() : nullptr);
1514 }
1515 odsState.addTypes(result);
1516}
1517
1518void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input, /*optional*/bool is_signed) {
1519 odsState.addOperands(input);
1520 if (is_signed) {
1521 odsState.getOrAddProperties<Properties>().is_signed = ((is_signed) ? odsBuilder.getUnitAttr() : nullptr);
1522 }
1523
1524 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1525 if (::mlir::succeeded(BV2IntOp::inferReturnTypes(odsBuilder.getContext(),
1526 odsState.location, odsState.operands,
1527 odsState.attributes.getDictionary(odsState.getContext()),
1528 odsState.getRawProperties(),
1529 odsState.regions, inferredReturnTypes)))
1530 odsState.addTypes(inferredReturnTypes);
1531 else
1532 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1533
1534}
1535
1536void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input, /*optional*/bool is_signed) {
1537 odsState.addOperands(input);
1538 if (is_signed) {
1539 odsState.getOrAddProperties<Properties>().is_signed = ((is_signed) ? odsBuilder.getUnitAttr() : nullptr);
1540 }
1541 assert(resultTypes.size() == 1u && "mismatched number of results");
1542 odsState.addTypes(resultTypes);
1543}
1544
1545void BV2IntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1546 assert(operands.size() == 1u && "mismatched number of parameters");
1547 odsState.addOperands(operands);
1548 odsState.addAttributes(attributes);
1549 assert(resultTypes.size() == 1u && "mismatched number of return types");
1550 odsState.addTypes(resultTypes);
1551
1552 if (!attributes.empty()) {
1553 ::mlir::OpaqueProperties properties =
1554 &odsState.getOrAddProperties<BV2IntOp::Properties>();
1555 std::optional<::mlir::RegisteredOperationName> info =
1556 odsState.name.getRegisteredInfo();
1557 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1558 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
1559 ::llvm::report_fatal_error("Property conversion failed.");
1560 }
1561}
1562
1563void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1564 assert(operands.size() == 1u && "mismatched number of parameters");
1565 odsState.addOperands(operands);
1566 odsState.addAttributes(attributes);
1567
1568 if (!attributes.empty()) {
1569 ::mlir::OpaqueProperties properties =
1570 &odsState.getOrAddProperties<BV2IntOp::Properties>();
1571 std::optional<::mlir::RegisteredOperationName> info =
1572 odsState.name.getRegisteredInfo();
1573 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1574 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
1575 ::llvm::report_fatal_error("Property conversion failed.");
1576 }
1577 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1578 if (::mlir::succeeded(BV2IntOp::inferReturnTypes(odsBuilder.getContext(),
1579 odsState.location, operands,
1580 odsState.attributes.getDictionary(odsState.getContext()),
1581 odsState.getRawProperties(),
1582 odsState.regions, inferredReturnTypes))) {
1583 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1584 odsState.addTypes(inferredReturnTypes);
1585 } else {
1586 ::llvm::report_fatal_error("Failed to infer result type(s).");
1587 }
1588}
1589
1590::llvm::LogicalResult BV2IntOp::verifyInvariantsImpl() {
1591 auto tblgen_is_signed = getProperties().is_signed; (void)tblgen_is_signed;
1592
1593 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(*this, tblgen_is_signed, "is_signed")))
1594 return ::mlir::failure();
1595 {
1596 unsigned index = 0; (void)index;
1597 auto valueGroup0 = getODSOperands(0);
1598
1599 for (auto v : valueGroup0) {
1600 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
1601 return ::mlir::failure();
1602 }
1603 }
1604 {
1605 unsigned index = 0; (void)index;
1606 auto valueGroup0 = getODSResults(0);
1607
1608 for (auto v : valueGroup0) {
1609 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
1610 return ::mlir::failure();
1611 }
1612 }
1613 return ::mlir::success();
1614}
1615
1616::llvm::LogicalResult BV2IntOp::verifyInvariants() {
1617 return verifyInvariantsImpl();
1618}
1619
1620::llvm::LogicalResult BV2IntOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1621 inferredReturnTypes.resize(1);
1622 ::mlir::Builder odsBuilder(context);
1623 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
1624 inferredReturnTypes[0] = odsInferredType0;
1625 return ::mlir::success();
1626}
1627
1628::mlir::ParseResult BV2IntOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1629 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
1630 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
1631 (void)inputOperandsLoc;
1632 ::mlir::Type inputRawType{};
1633 ::llvm::ArrayRef<::mlir::Type> inputTypes(&inputRawType, 1);
1634
1635 inputOperandsLoc = parser.getCurrentLocation();
1636 if (parser.parseOperand(inputRawOperand))
1637 return ::mlir::failure();
1638 if (::mlir::succeeded(parser.parseOptionalKeyword("signed"))) {
1639 result.getOrAddProperties<BV2IntOp::Properties>().is_signed = parser.getBuilder().getUnitAttr(); }
1640 {
1641 auto loc = parser.getCurrentLocation();(void)loc;
1642 if (parser.parseOptionalAttrDict(result.attributes))
1643 return ::mlir::failure();
1644 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
1645 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
1646 })))
1647 return ::mlir::failure();
1648 }
1649 if (parser.parseColon())
1650 return ::mlir::failure();
1651
1652 if (parser.parseType(inputRawType))
1653 return ::mlir::failure();
1654 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
1655 result.addTypes(odsBuildableType0);
1656 if (parser.resolveOperands(inputOperands, inputTypes, inputOperandsLoc, result.operands))
1657 return ::mlir::failure();
1658 return ::mlir::success();
1659}
1660
1661void BV2IntOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1662 _odsPrinter << ' ';
1663 _odsPrinter << getInput();
1664 if ((getIsSignedAttr() && getIsSignedAttr() != ((false) ? ::mlir::OpBuilder((*this)->getContext()).getUnitAttr() : nullptr))) {
1665 _odsPrinter << ' ' << "signed";
1666 }
1667 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1668 elidedAttrs.push_back("is_signed");
1669 {
1670 ::mlir::Builder odsBuilder(getContext());
1671 ::mlir::Attribute attr = getIsSignedAttr();
1672 if(attr && (attr == ((false) ? odsBuilder.getUnitAttr() : nullptr)))
1673 elidedAttrs.push_back("is_signed");
1674 }
1675 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1676 _odsPrinter << ' ' << ":";
1677 _odsPrinter << ' ';
1678 _odsPrinter << getInput().getType();
1679}
1680
1681void BV2IntOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1682}
1683
1684} // namespace smt
1685} // namespace llzk
1686MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BV2IntOp)
1687
1688namespace llzk {
1689namespace smt {
1690
1691//===----------------------------------------------------------------------===//
1692// ::llzk::smt::BVAShrOp definitions
1693//===----------------------------------------------------------------------===//
1694
1695namespace detail {
1696} // namespace detail
1698
1699::llvm::LogicalResult BVAShrOpAdaptor::verify(::mlir::Location loc) {
1700 return ::mlir::success();
1701}
1702
1703void BVAShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1704 odsState.addOperands(lhs);
1705 odsState.addOperands(rhs);
1706 odsState.addTypes(result);
1707}
1708
1709void BVAShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1710 odsState.addOperands(lhs);
1711 odsState.addOperands(rhs);
1712
1713 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1714 if (::mlir::succeeded(BVAShrOp::inferReturnTypes(odsBuilder.getContext(),
1715 odsState.location, odsState.operands,
1716 odsState.attributes.getDictionary(odsState.getContext()),
1717 odsState.getRawProperties(),
1718 odsState.regions, inferredReturnTypes)))
1719 odsState.addTypes(inferredReturnTypes);
1720 else
1721 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1722
1723}
1724
1725void BVAShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1726 odsState.addOperands(lhs);
1727 odsState.addOperands(rhs);
1728 assert(resultTypes.size() == 1u && "mismatched number of results");
1729 odsState.addTypes(resultTypes);
1730}
1731
1732void BVAShrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1733 assert(operands.size() == 2u && "mismatched number of parameters");
1734 odsState.addOperands(operands);
1735 odsState.addAttributes(attributes);
1736 assert(resultTypes.size() == 1u && "mismatched number of return types");
1737 odsState.addTypes(resultTypes);
1738}
1739
1740void BVAShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1741 assert(operands.size() == 2u && "mismatched number of parameters");
1742 odsState.addOperands(operands);
1743 odsState.addAttributes(attributes);
1744
1745 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1746 if (::mlir::succeeded(BVAShrOp::inferReturnTypes(odsBuilder.getContext(),
1747 odsState.location, operands,
1748 odsState.attributes.getDictionary(odsState.getContext()),
1749 odsState.getRawProperties(),
1750 odsState.regions, inferredReturnTypes))) {
1751 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1752 odsState.addTypes(inferredReturnTypes);
1753 } else {
1754 ::llvm::report_fatal_error("Failed to infer result type(s).");
1755 }
1756}
1757
1758::llvm::LogicalResult BVAShrOp::verifyInvariantsImpl() {
1759 {
1760 unsigned index = 0; (void)index;
1761 auto valueGroup0 = getODSOperands(0);
1762
1763 for (auto v : valueGroup0) {
1764 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
1765 return ::mlir::failure();
1766 }
1767 auto valueGroup1 = getODSOperands(1);
1768
1769 for (auto v : valueGroup1) {
1770 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
1771 return ::mlir::failure();
1772 }
1773 }
1774 {
1775 unsigned index = 0; (void)index;
1776 auto valueGroup0 = getODSResults(0);
1777
1778 for (auto v : valueGroup0) {
1779 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
1780 return ::mlir::failure();
1781 }
1782 }
1783 return ::mlir::success();
1784}
1785
1786::llvm::LogicalResult BVAShrOp::verifyInvariants() {
1787 return verifyInvariantsImpl();
1788}
1789
1790::llvm::LogicalResult BVAShrOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1791 inferredReturnTypes.resize(1);
1792 ::mlir::Builder odsBuilder(context);
1793 if (operands.size() <= 0)
1794 return ::mlir::failure();
1795 ::mlir::Type odsInferredType0 = operands[0].getType();
1796 inferredReturnTypes[0] = odsInferredType0;
1797 return ::mlir::success();
1798}
1799
1800::mlir::ParseResult BVAShrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1801 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1802 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1803 (void)lhsOperandsLoc;
1804 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1805 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1806 (void)rhsOperandsLoc;
1807 ::mlir::Type resultRawType{};
1808 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
1809
1810 lhsOperandsLoc = parser.getCurrentLocation();
1811 if (parser.parseOperand(lhsRawOperand))
1812 return ::mlir::failure();
1813 if (parser.parseComma())
1814 return ::mlir::failure();
1815
1816 rhsOperandsLoc = parser.getCurrentLocation();
1817 if (parser.parseOperand(rhsRawOperand))
1818 return ::mlir::failure();
1819 {
1820 auto loc = parser.getCurrentLocation();(void)loc;
1821 if (parser.parseOptionalAttrDict(result.attributes))
1822 return ::mlir::failure();
1823 }
1824 if (parser.parseColon())
1825 return ::mlir::failure();
1826
1827 if (parser.parseType(resultRawType))
1828 return ::mlir::failure();
1829 result.addTypes(resultTypes);
1830 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
1831 return ::mlir::failure();
1832 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
1833 return ::mlir::failure();
1834 return ::mlir::success();
1835}
1836
1837void BVAShrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1838 _odsPrinter << ' ';
1839 _odsPrinter << getLhs();
1840 _odsPrinter << ",";
1841 _odsPrinter << ' ';
1842 _odsPrinter << getRhs();
1843 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1844 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1845 _odsPrinter << ' ' << ":";
1846 _odsPrinter << ' ';
1847 _odsPrinter << getResult().getType();
1848}
1849
1850void BVAShrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1851}
1852
1853} // namespace smt
1854} // namespace llzk
1855MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVAShrOp)
1856
1857namespace llzk {
1858namespace smt {
1859
1860//===----------------------------------------------------------------------===//
1861// ::llzk::smt::BVAddOp definitions
1862//===----------------------------------------------------------------------===//
1863
1864namespace detail {
1865} // namespace detail
1867
1868::llvm::LogicalResult BVAddOpAdaptor::verify(::mlir::Location loc) {
1869 return ::mlir::success();
1870}
1871
1872void BVAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1873 odsState.addOperands(lhs);
1874 odsState.addOperands(rhs);
1875 odsState.addTypes(result);
1876}
1877
1878void BVAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1879 odsState.addOperands(lhs);
1880 odsState.addOperands(rhs);
1881
1882 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1883 if (::mlir::succeeded(BVAddOp::inferReturnTypes(odsBuilder.getContext(),
1884 odsState.location, odsState.operands,
1885 odsState.attributes.getDictionary(odsState.getContext()),
1886 odsState.getRawProperties(),
1887 odsState.regions, inferredReturnTypes)))
1888 odsState.addTypes(inferredReturnTypes);
1889 else
1890 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1891
1892}
1893
1894void BVAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1895 odsState.addOperands(lhs);
1896 odsState.addOperands(rhs);
1897 assert(resultTypes.size() == 1u && "mismatched number of results");
1898 odsState.addTypes(resultTypes);
1899}
1900
1901void BVAddOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1902 assert(operands.size() == 2u && "mismatched number of parameters");
1903 odsState.addOperands(operands);
1904 odsState.addAttributes(attributes);
1905 assert(resultTypes.size() == 1u && "mismatched number of return types");
1906 odsState.addTypes(resultTypes);
1907}
1908
1909void BVAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1910 assert(operands.size() == 2u && "mismatched number of parameters");
1911 odsState.addOperands(operands);
1912 odsState.addAttributes(attributes);
1913
1914 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1915 if (::mlir::succeeded(BVAddOp::inferReturnTypes(odsBuilder.getContext(),
1916 odsState.location, operands,
1917 odsState.attributes.getDictionary(odsState.getContext()),
1918 odsState.getRawProperties(),
1919 odsState.regions, inferredReturnTypes))) {
1920 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1921 odsState.addTypes(inferredReturnTypes);
1922 } else {
1923 ::llvm::report_fatal_error("Failed to infer result type(s).");
1924 }
1925}
1926
1927::llvm::LogicalResult BVAddOp::verifyInvariantsImpl() {
1928 {
1929 unsigned index = 0; (void)index;
1930 auto valueGroup0 = getODSOperands(0);
1931
1932 for (auto v : valueGroup0) {
1933 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
1934 return ::mlir::failure();
1935 }
1936 auto valueGroup1 = getODSOperands(1);
1937
1938 for (auto v : valueGroup1) {
1939 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
1940 return ::mlir::failure();
1941 }
1942 }
1943 {
1944 unsigned index = 0; (void)index;
1945 auto valueGroup0 = getODSResults(0);
1946
1947 for (auto v : valueGroup0) {
1948 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
1949 return ::mlir::failure();
1950 }
1951 }
1952 return ::mlir::success();
1953}
1954
1955::llvm::LogicalResult BVAddOp::verifyInvariants() {
1956 return verifyInvariantsImpl();
1957}
1958
1959::llvm::LogicalResult BVAddOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1960 inferredReturnTypes.resize(1);
1961 ::mlir::Builder odsBuilder(context);
1962 if (operands.size() <= 0)
1963 return ::mlir::failure();
1964 ::mlir::Type odsInferredType0 = operands[0].getType();
1965 inferredReturnTypes[0] = odsInferredType0;
1966 return ::mlir::success();
1967}
1968
1969::mlir::ParseResult BVAddOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1970 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1971 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1972 (void)lhsOperandsLoc;
1973 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1974 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1975 (void)rhsOperandsLoc;
1976 ::mlir::Type resultRawType{};
1977 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
1978
1979 lhsOperandsLoc = parser.getCurrentLocation();
1980 if (parser.parseOperand(lhsRawOperand))
1981 return ::mlir::failure();
1982 if (parser.parseComma())
1983 return ::mlir::failure();
1984
1985 rhsOperandsLoc = parser.getCurrentLocation();
1986 if (parser.parseOperand(rhsRawOperand))
1987 return ::mlir::failure();
1988 {
1989 auto loc = parser.getCurrentLocation();(void)loc;
1990 if (parser.parseOptionalAttrDict(result.attributes))
1991 return ::mlir::failure();
1992 }
1993 if (parser.parseColon())
1994 return ::mlir::failure();
1995
1996 if (parser.parseType(resultRawType))
1997 return ::mlir::failure();
1998 result.addTypes(resultTypes);
1999 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
2000 return ::mlir::failure();
2001 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
2002 return ::mlir::failure();
2003 return ::mlir::success();
2004}
2005
2006void BVAddOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2007 _odsPrinter << ' ';
2008 _odsPrinter << getLhs();
2009 _odsPrinter << ",";
2010 _odsPrinter << ' ';
2011 _odsPrinter << getRhs();
2012 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2013 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2014 _odsPrinter << ' ' << ":";
2015 _odsPrinter << ' ';
2016 _odsPrinter << getResult().getType();
2017}
2018
2019void BVAddOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2020}
2021
2022} // namespace smt
2023} // namespace llzk
2024MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVAddOp)
2025
2026namespace llzk {
2027namespace smt {
2028
2029//===----------------------------------------------------------------------===//
2030// ::llzk::smt::BVAndOp definitions
2031//===----------------------------------------------------------------------===//
2032
2033namespace detail {
2034} // namespace detail
2036
2037::llvm::LogicalResult BVAndOpAdaptor::verify(::mlir::Location loc) {
2038 return ::mlir::success();
2039}
2040
2041void BVAndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2042 odsState.addOperands(lhs);
2043 odsState.addOperands(rhs);
2044 odsState.addTypes(result);
2045}
2046
2047void BVAndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2048 odsState.addOperands(lhs);
2049 odsState.addOperands(rhs);
2050
2051 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2052 if (::mlir::succeeded(BVAndOp::inferReturnTypes(odsBuilder.getContext(),
2053 odsState.location, odsState.operands,
2054 odsState.attributes.getDictionary(odsState.getContext()),
2055 odsState.getRawProperties(),
2056 odsState.regions, inferredReturnTypes)))
2057 odsState.addTypes(inferredReturnTypes);
2058 else
2059 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2060
2061}
2062
2063void BVAndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2064 odsState.addOperands(lhs);
2065 odsState.addOperands(rhs);
2066 assert(resultTypes.size() == 1u && "mismatched number of results");
2067 odsState.addTypes(resultTypes);
2068}
2069
2070void BVAndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2071 assert(operands.size() == 2u && "mismatched number of parameters");
2072 odsState.addOperands(operands);
2073 odsState.addAttributes(attributes);
2074 assert(resultTypes.size() == 1u && "mismatched number of return types");
2075 odsState.addTypes(resultTypes);
2076}
2077
2078void BVAndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2079 assert(operands.size() == 2u && "mismatched number of parameters");
2080 odsState.addOperands(operands);
2081 odsState.addAttributes(attributes);
2082
2083 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2084 if (::mlir::succeeded(BVAndOp::inferReturnTypes(odsBuilder.getContext(),
2085 odsState.location, operands,
2086 odsState.attributes.getDictionary(odsState.getContext()),
2087 odsState.getRawProperties(),
2088 odsState.regions, inferredReturnTypes))) {
2089 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2090 odsState.addTypes(inferredReturnTypes);
2091 } else {
2092 ::llvm::report_fatal_error("Failed to infer result type(s).");
2093 }
2094}
2095
2096::llvm::LogicalResult BVAndOp::verifyInvariantsImpl() {
2097 {
2098 unsigned index = 0; (void)index;
2099 auto valueGroup0 = getODSOperands(0);
2100
2101 for (auto v : valueGroup0) {
2102 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2103 return ::mlir::failure();
2104 }
2105 auto valueGroup1 = getODSOperands(1);
2106
2107 for (auto v : valueGroup1) {
2108 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2109 return ::mlir::failure();
2110 }
2111 }
2112 {
2113 unsigned index = 0; (void)index;
2114 auto valueGroup0 = getODSResults(0);
2115
2116 for (auto v : valueGroup0) {
2117 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
2118 return ::mlir::failure();
2119 }
2120 }
2121 return ::mlir::success();
2122}
2123
2124::llvm::LogicalResult BVAndOp::verifyInvariants() {
2125 return verifyInvariantsImpl();
2126}
2127
2128::llvm::LogicalResult BVAndOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
2129 inferredReturnTypes.resize(1);
2130 ::mlir::Builder odsBuilder(context);
2131 if (operands.size() <= 0)
2132 return ::mlir::failure();
2133 ::mlir::Type odsInferredType0 = operands[0].getType();
2134 inferredReturnTypes[0] = odsInferredType0;
2135 return ::mlir::success();
2136}
2137
2138::mlir::ParseResult BVAndOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2139 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2140 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2141 (void)lhsOperandsLoc;
2142 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2143 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2144 (void)rhsOperandsLoc;
2145 ::mlir::Type resultRawType{};
2146 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
2147
2148 lhsOperandsLoc = parser.getCurrentLocation();
2149 if (parser.parseOperand(lhsRawOperand))
2150 return ::mlir::failure();
2151 if (parser.parseComma())
2152 return ::mlir::failure();
2153
2154 rhsOperandsLoc = parser.getCurrentLocation();
2155 if (parser.parseOperand(rhsRawOperand))
2156 return ::mlir::failure();
2157 {
2158 auto loc = parser.getCurrentLocation();(void)loc;
2159 if (parser.parseOptionalAttrDict(result.attributes))
2160 return ::mlir::failure();
2161 }
2162 if (parser.parseColon())
2163 return ::mlir::failure();
2164
2165 if (parser.parseType(resultRawType))
2166 return ::mlir::failure();
2167 result.addTypes(resultTypes);
2168 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
2169 return ::mlir::failure();
2170 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
2171 return ::mlir::failure();
2172 return ::mlir::success();
2173}
2174
2175void BVAndOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2176 _odsPrinter << ' ';
2177 _odsPrinter << getLhs();
2178 _odsPrinter << ",";
2179 _odsPrinter << ' ';
2180 _odsPrinter << getRhs();
2181 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2182 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2183 _odsPrinter << ' ' << ":";
2184 _odsPrinter << ' ';
2185 _odsPrinter << getResult().getType();
2186}
2187
2188void BVAndOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2189}
2190
2191} // namespace smt
2192} // namespace llzk
2193MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVAndOp)
2194
2195namespace llzk {
2196namespace smt {
2197
2198//===----------------------------------------------------------------------===//
2199// ::llzk::smt::BVCmpOp definitions
2200//===----------------------------------------------------------------------===//
2201
2202namespace detail {
2203BVCmpOpGenericAdaptorBase::BVCmpOpGenericAdaptorBase(BVCmpOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
2204
2206 auto attr = getPredAttr();
2207 return attr.getValue();
2208}
2209
2210} // namespace detail
2212
2213::llvm::LogicalResult BVCmpOpAdaptor::verify(::mlir::Location loc) {
2214 auto tblgen_pred = getProperties().pred; (void)tblgen_pred;
2215 if (!tblgen_pred) return emitError(loc, "'smt.bv.cmp' op ""requires attribute 'pred'");
2216
2217 if (tblgen_pred && !((::llvm::isa<::llzk::smt::BVCmpPredicateAttr>(tblgen_pred))))
2218 return emitError(loc, "'smt.bv.cmp' op ""attribute 'pred' failed to satisfy constraint: smt bit-vector comparison predicate");
2219 return ::mlir::success();
2220}
2221
2222::llvm::LogicalResult BVCmpOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2223 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2224 if (!dict) {
2225 emitError() << "expected DictionaryAttr to set properties";
2226 return ::mlir::failure();
2227 }
2228
2229 {
2230 auto &propStorage = prop.pred;
2231 auto attr = dict.get("pred");
2232 if (attr) {
2233 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
2234 if (convertedAttr) {
2235 propStorage = convertedAttr;
2236 } else {
2237 emitError() << "Invalid attribute `pred` in property conversion: " << attr;
2238 return ::mlir::failure();
2239 }
2240 }
2241 }
2242 return ::mlir::success();
2243}
2244
2245::mlir::Attribute BVCmpOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2246 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2247 ::mlir::Builder odsBuilder{ctx};
2248
2249 {
2250 const auto &propStorage = prop.pred;
2251 if (propStorage)
2252 attrs.push_back(odsBuilder.getNamedAttr("pred",
2253 propStorage));
2254 }
2255
2256 if (!attrs.empty())
2257 return odsBuilder.getDictionaryAttr(attrs);
2258 return {};
2259}
2260
2261llvm::hash_code BVCmpOp::computePropertiesHash(const Properties &prop) {
2262 return llvm::hash_combine(
2263 llvm::hash_value(prop.pred.getAsOpaquePointer()));
2264}
2265
2266std::optional<mlir::Attribute> BVCmpOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2267 if (name == "pred")
2268 return prop.pred;
2269 return std::nullopt;
2270}
2271
2272void BVCmpOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2273 if (name == "pred") {
2274 prop.pred = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.pred)>>(value);
2275 return;
2276 }
2277}
2278
2279void BVCmpOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
2280 if (prop.pred) attrs.append("pred", prop.pred);
2281}
2282
2283::llvm::LogicalResult BVCmpOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2284 {
2285 ::mlir::Attribute attr = attrs.get(getPredAttrName(opName));
2286 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT2(attr, "pred", emitError)))
2287 return ::mlir::failure();
2288 }
2289 return ::mlir::success();
2290}
2291
2292::llvm::LogicalResult BVCmpOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
2293 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
2294 if (::mlir::failed(reader.readAttribute(prop.pred)))
2295 return ::mlir::failure();
2296 return ::mlir::success();
2297}
2298
2299void BVCmpOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
2300 auto &prop = getProperties(); (void)prop;
2301 writer.writeAttribute(prop.pred);
2302}
2303
2305 auto attr = getPredAttr();
2306 return attr.getValue();
2307}
2308
2310 getProperties().pred = ::llzk::smt::BVCmpPredicateAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
2311}
2312
2313void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::BVCmpPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2314 odsState.addOperands(lhs);
2315 odsState.addOperands(rhs);
2316 odsState.getOrAddProperties<Properties>().pred = pred;
2317 odsState.addTypes(result);
2318}
2319
2320void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::BVCmpPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2321 odsState.addOperands(lhs);
2322 odsState.addOperands(rhs);
2323 odsState.getOrAddProperties<Properties>().pred = pred;
2324
2325 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2326 if (::mlir::succeeded(BVCmpOp::inferReturnTypes(odsBuilder.getContext(),
2327 odsState.location, odsState.operands,
2328 odsState.attributes.getDictionary(odsState.getContext()),
2329 odsState.getRawProperties(),
2330 odsState.regions, inferredReturnTypes)))
2331 odsState.addTypes(inferredReturnTypes);
2332 else
2333 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2334
2335}
2336
2337void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::BVCmpPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2338 odsState.addOperands(lhs);
2339 odsState.addOperands(rhs);
2340 odsState.getOrAddProperties<Properties>().pred = pred;
2341 assert(resultTypes.size() == 1u && "mismatched number of results");
2342 odsState.addTypes(resultTypes);
2343}
2344
2345void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::BVCmpPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2346 odsState.addOperands(lhs);
2347 odsState.addOperands(rhs);
2348 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::BVCmpPredicateAttr::get(odsBuilder.getContext(), pred);
2349 odsState.addTypes(result);
2350}
2351
2352void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::BVCmpPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2353 odsState.addOperands(lhs);
2354 odsState.addOperands(rhs);
2355 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::BVCmpPredicateAttr::get(odsBuilder.getContext(), pred);
2356
2357 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2358 if (::mlir::succeeded(BVCmpOp::inferReturnTypes(odsBuilder.getContext(),
2359 odsState.location, odsState.operands,
2360 odsState.attributes.getDictionary(odsState.getContext()),
2361 odsState.getRawProperties(),
2362 odsState.regions, inferredReturnTypes)))
2363 odsState.addTypes(inferredReturnTypes);
2364 else
2365 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2366
2367}
2368
2369void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::BVCmpPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2370 odsState.addOperands(lhs);
2371 odsState.addOperands(rhs);
2372 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::BVCmpPredicateAttr::get(odsBuilder.getContext(), pred);
2373 assert(resultTypes.size() == 1u && "mismatched number of results");
2374 odsState.addTypes(resultTypes);
2375}
2376
2377void BVCmpOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2378 assert(operands.size() == 2u && "mismatched number of parameters");
2379 odsState.addOperands(operands);
2380 odsState.addAttributes(attributes);
2381 assert(resultTypes.size() == 1u && "mismatched number of return types");
2382 odsState.addTypes(resultTypes);
2383
2384 if (!attributes.empty()) {
2385 ::mlir::OpaqueProperties properties =
2386 &odsState.getOrAddProperties<BVCmpOp::Properties>();
2387 std::optional<::mlir::RegisteredOperationName> info =
2388 odsState.name.getRegisteredInfo();
2389 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
2390 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
2391 ::llvm::report_fatal_error("Property conversion failed.");
2392 }
2393}
2394
2395void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2396 assert(operands.size() == 2u && "mismatched number of parameters");
2397 odsState.addOperands(operands);
2398 odsState.addAttributes(attributes);
2399
2400 if (!attributes.empty()) {
2401 ::mlir::OpaqueProperties properties =
2402 &odsState.getOrAddProperties<BVCmpOp::Properties>();
2403 std::optional<::mlir::RegisteredOperationName> info =
2404 odsState.name.getRegisteredInfo();
2405 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
2406 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
2407 ::llvm::report_fatal_error("Property conversion failed.");
2408 }
2409 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2410 if (::mlir::succeeded(BVCmpOp::inferReturnTypes(odsBuilder.getContext(),
2411 odsState.location, operands,
2412 odsState.attributes.getDictionary(odsState.getContext()),
2413 odsState.getRawProperties(),
2414 odsState.regions, inferredReturnTypes))) {
2415 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2416 odsState.addTypes(inferredReturnTypes);
2417 } else {
2418 ::llvm::report_fatal_error("Failed to infer result type(s).");
2419 }
2420}
2421
2422::llvm::LogicalResult BVCmpOp::verifyInvariantsImpl() {
2423 auto tblgen_pred = getProperties().pred; (void)tblgen_pred;
2424 if (!tblgen_pred) return emitOpError("requires attribute 'pred'");
2425
2426 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT2(*this, tblgen_pred, "pred")))
2427 return ::mlir::failure();
2428 {
2429 unsigned index = 0; (void)index;
2430 auto valueGroup0 = getODSOperands(0);
2431
2432 for (auto v : valueGroup0) {
2433 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2434 return ::mlir::failure();
2435 }
2436 auto valueGroup1 = getODSOperands(1);
2437
2438 for (auto v : valueGroup1) {
2439 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2440 return ::mlir::failure();
2441 }
2442 }
2443 {
2444 unsigned index = 0; (void)index;
2445 auto valueGroup0 = getODSResults(0);
2446
2447 for (auto v : valueGroup0) {
2448 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
2449 return ::mlir::failure();
2450 }
2451 }
2452 return ::mlir::success();
2453}
2454
2455::llvm::LogicalResult BVCmpOp::verifyInvariants() {
2456 return verifyInvariantsImpl();
2457}
2458
2459::llvm::LogicalResult BVCmpOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
2460 inferredReturnTypes.resize(1);
2461 ::mlir::Builder odsBuilder(context);
2462 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
2463 inferredReturnTypes[0] = odsInferredType0;
2464 return ::mlir::success();
2465}
2466
2467::mlir::ParseResult BVCmpOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2469 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2470 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2471 (void)lhsOperandsLoc;
2472 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2473 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2474 (void)rhsOperandsLoc;
2475 ::mlir::Type lhsRawType{};
2476 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2477
2478 {
2479 ::llvm::StringRef attrStr;
2480 ::mlir::NamedAttrList attrStorage;
2481 auto loc = parser.getCurrentLocation();
2482 if (parser.parseOptionalKeyword(&attrStr, {"slt","sle","sgt","sge","ult","ule","ugt","uge"})) {
2483 ::mlir::StringAttr attrVal;
2484 ::mlir::OptionalParseResult parseResult =
2485 parser.parseOptionalAttribute(attrVal,
2486 parser.getBuilder().getNoneType(),
2487 "pred", attrStorage);
2488 if (parseResult.has_value()) {
2489 if (failed(*parseResult))
2490 return ::mlir::failure();
2491 attrStr = attrVal.getValue();
2492 } else {
2493 return parser.emitError(loc, "expected string or keyword containing one of the following enum values for attribute 'pred' [slt, sle, sgt, sge, ult, ule, ugt, uge]");
2494 }
2495 }
2496 if (!attrStr.empty()) {
2497 auto attrOptional = ::llzk::smt::symbolizeBVCmpPredicate(attrStr);
2498 if (!attrOptional)
2499 return parser.emitError(loc, "invalid ")
2500 << "pred attribute specification: \"" << attrStr << '"';;
2501
2502 predAttr = ::llzk::smt::BVCmpPredicateAttr::get(parser.getBuilder().getContext(), *attrOptional);
2503 result.getOrAddProperties<BVCmpOp::Properties>().pred = predAttr;
2504 }
2505 }
2506
2507 lhsOperandsLoc = parser.getCurrentLocation();
2508 if (parser.parseOperand(lhsRawOperand))
2509 return ::mlir::failure();
2510 if (parser.parseComma())
2511 return ::mlir::failure();
2512
2513 rhsOperandsLoc = parser.getCurrentLocation();
2514 if (parser.parseOperand(rhsRawOperand))
2515 return ::mlir::failure();
2516 {
2517 auto loc = parser.getCurrentLocation();(void)loc;
2518 if (parser.parseOptionalAttrDict(result.attributes))
2519 return ::mlir::failure();
2520 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
2521 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
2522 })))
2523 return ::mlir::failure();
2524 }
2525 if (parser.parseColon())
2526 return ::mlir::failure();
2527
2528 if (parser.parseType(lhsRawType))
2529 return ::mlir::failure();
2530 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
2531 result.addTypes(odsBuildableType0);
2532 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2533 return ::mlir::failure();
2534 if (parser.resolveOperands(rhsOperands, lhsTypes[0], rhsOperandsLoc, result.operands))
2535 return ::mlir::failure();
2536 return ::mlir::success();
2537}
2538
2539void BVCmpOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2540 _odsPrinter << ' ';
2541
2542 {
2543 auto caseValue = getPred();
2544 auto caseValueStr = stringifyBVCmpPredicate(caseValue);
2545 _odsPrinter << caseValueStr;
2546 }
2547 _odsPrinter << ' ';
2548 _odsPrinter << getLhs();
2549 _odsPrinter << ",";
2550 _odsPrinter << ' ';
2551 _odsPrinter << getRhs();
2552 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2553 elidedAttrs.push_back("pred");
2554 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2555 _odsPrinter << ' ' << ":";
2556 _odsPrinter << ' ';
2557 _odsPrinter << getLhs().getType();
2558}
2559
2560void BVCmpOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2561}
2562
2563} // namespace smt
2564} // namespace llzk
2565MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVCmpOp)
2566
2567namespace llzk {
2568namespace smt {
2569
2570//===----------------------------------------------------------------------===//
2571// ::llzk::smt::BVConstantOp definitions
2572//===----------------------------------------------------------------------===//
2573
2574namespace detail {
2575BVConstantOpGenericAdaptorBase::BVConstantOpGenericAdaptorBase(BVConstantOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
2576
2577::llzk::smt::BitVectorAttr BVConstantOpGenericAdaptorBase::getValue() {
2578 auto attr = getValueAttr();
2579 return ::llvm::cast<::llzk::smt::BitVectorAttr>(attr);
2580}
2581
2582} // namespace detail
2584
2585::llvm::LogicalResult BVConstantOpAdaptor::verify(::mlir::Location loc) {
2586 auto tblgen_value = getProperties().value; (void)tblgen_value;
2587 if (!tblgen_value) return emitError(loc, "'smt.bv.constant' op ""requires attribute 'value'");
2588
2589 if (tblgen_value && !((::llvm::isa<::llzk::smt::BitVectorAttr>(tblgen_value))))
2590 return emitError(loc, "'smt.bv.constant' op ""attribute 'value' failed to satisfy constraint: ");
2591 return ::mlir::success();
2592}
2593
2594::llvm::LogicalResult BVConstantOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2595 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2596 if (!dict) {
2597 emitError() << "expected DictionaryAttr to set properties";
2598 return ::mlir::failure();
2599 }
2600
2601 {
2602 auto &propStorage = prop.value;
2603 auto attr = dict.get("value");
2604 if (attr) {
2605 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
2606 if (convertedAttr) {
2607 propStorage = convertedAttr;
2608 } else {
2609 emitError() << "Invalid attribute `value` in property conversion: " << attr;
2610 return ::mlir::failure();
2611 }
2612 }
2613 }
2614 return ::mlir::success();
2615}
2616
2617::mlir::Attribute BVConstantOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2618 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2619 ::mlir::Builder odsBuilder{ctx};
2620
2621 {
2622 const auto &propStorage = prop.value;
2623 if (propStorage)
2624 attrs.push_back(odsBuilder.getNamedAttr("value",
2625 propStorage));
2626 }
2627
2628 if (!attrs.empty())
2629 return odsBuilder.getDictionaryAttr(attrs);
2630 return {};
2631}
2632
2634 return llvm::hash_combine(
2635 llvm::hash_value(prop.value.getAsOpaquePointer()));
2636}
2637
2638std::optional<mlir::Attribute> BVConstantOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2639 if (name == "value")
2640 return prop.value;
2641 return std::nullopt;
2642}
2643
2644void BVConstantOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2645 if (name == "value") {
2646 prop.value = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.value)>>(value);
2647 return;
2648 }
2649}
2650
2651void BVConstantOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
2652 if (prop.value) attrs.append("value", prop.value);
2653}
2654
2655::llvm::LogicalResult BVConstantOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2656 {
2657 ::mlir::Attribute attr = attrs.get(getValueAttrName(opName));
2658 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT3(attr, "value", emitError)))
2659 return ::mlir::failure();
2660 }
2661 return ::mlir::success();
2662}
2663
2664::llvm::LogicalResult BVConstantOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
2665 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
2666 if (::mlir::failed(reader.readAttribute(prop.value)))
2667 return ::mlir::failure();
2668 return ::mlir::success();
2669}
2670
2671void BVConstantOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
2672 auto &prop = getProperties(); (void)prop;
2673 writer.writeAttribute(prop.value);
2674}
2675
2676::llzk::smt::BitVectorAttr BVConstantOp::getValue() {
2677 auto attr = getValueAttr();
2678 return ::llvm::cast<::llzk::smt::BitVectorAttr>(attr);
2679}
2680
2681void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, const llvm::APInt &value) {
2682 build(odsBuilder, odsState,
2683 BitVectorAttr::get(odsBuilder.getContext(), value));
2684
2685}
2686
2687void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint64_t value, unsigned width) {
2688 build(odsBuilder, odsState,
2689 BitVectorAttr::get(odsBuilder.getContext(), value, width));
2690
2691}
2692
2693void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::BitVectorAttr value) {
2694 odsState.getOrAddProperties<Properties>().value = value;
2695 odsState.addTypes(result);
2696}
2697
2698void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::BitVectorAttr value) {
2699 odsState.getOrAddProperties<Properties>().value = value;
2700
2701 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2702 if (::mlir::succeeded(BVConstantOp::inferReturnTypes(odsBuilder.getContext(),
2703 odsState.location, odsState.operands,
2704 odsState.attributes.getDictionary(odsState.getContext()),
2705 odsState.getRawProperties(),
2706 odsState.regions, inferredReturnTypes)))
2707 odsState.addTypes(inferredReturnTypes);
2708 else
2709 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2710
2711}
2712
2713void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::BitVectorAttr value) {
2714 odsState.getOrAddProperties<Properties>().value = value;
2715 assert(resultTypes.size() == 1u && "mismatched number of results");
2716 odsState.addTypes(resultTypes);
2717}
2718
2719void BVConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2720 assert(operands.size() == 0u && "mismatched number of parameters");
2721 odsState.addOperands(operands);
2722 odsState.addAttributes(attributes);
2723 assert(resultTypes.size() == 1u && "mismatched number of return types");
2724 odsState.addTypes(resultTypes);
2725
2726 if (!attributes.empty()) {
2727 ::mlir::OpaqueProperties properties =
2728 &odsState.getOrAddProperties<BVConstantOp::Properties>();
2729 std::optional<::mlir::RegisteredOperationName> info =
2730 odsState.name.getRegisteredInfo();
2731 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
2732 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
2733 ::llvm::report_fatal_error("Property conversion failed.");
2734 }
2735}
2736
2737void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2738 assert(operands.size() == 0u && "mismatched number of parameters");
2739 odsState.addOperands(operands);
2740 odsState.addAttributes(attributes);
2741
2742 if (!attributes.empty()) {
2743 ::mlir::OpaqueProperties properties =
2744 &odsState.getOrAddProperties<BVConstantOp::Properties>();
2745 std::optional<::mlir::RegisteredOperationName> info =
2746 odsState.name.getRegisteredInfo();
2747 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
2748 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
2749 ::llvm::report_fatal_error("Property conversion failed.");
2750 }
2751 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2752 if (::mlir::succeeded(BVConstantOp::inferReturnTypes(odsBuilder.getContext(),
2753 odsState.location, operands,
2754 odsState.attributes.getDictionary(odsState.getContext()),
2755 odsState.getRawProperties(),
2756 odsState.regions, inferredReturnTypes))) {
2757 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2758 odsState.addTypes(inferredReturnTypes);
2759 } else {
2760 ::llvm::report_fatal_error("Failed to infer result type(s).");
2761 }
2762}
2763
2764::llvm::LogicalResult BVConstantOp::verifyInvariantsImpl() {
2765 auto tblgen_value = getProperties().value; (void)tblgen_value;
2766 if (!tblgen_value) return emitOpError("requires attribute 'value'");
2767
2768 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT3(*this, tblgen_value, "value")))
2769 return ::mlir::failure();
2770 {
2771 unsigned index = 0; (void)index;
2772 auto valueGroup0 = getODSResults(0);
2773
2774 for (auto v : valueGroup0) {
2775 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
2776 return ::mlir::failure();
2777 }
2778 }
2779 return ::mlir::success();
2780}
2781
2782::llvm::LogicalResult BVConstantOp::verifyInvariants() {
2783 return verifyInvariantsImpl();
2784}
2785
2786::mlir::ParseResult BVConstantOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2787 ::llzk::smt::BitVectorAttr valueAttr;
2788
2789 if (parser.parseAttribute(valueAttr, ::mlir::Type{}))
2790 return ::mlir::failure();
2791 if (valueAttr) result.getOrAddProperties<BVConstantOp::Properties>().value = valueAttr;
2792 {
2793 auto loc = parser.getCurrentLocation();(void)loc;
2794 if (parser.parseOptionalAttrDict(result.attributes))
2795 return ::mlir::failure();
2796 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
2797 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
2798 })))
2799 return ::mlir::failure();
2800 }
2801
2802 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
2803 if (::mlir::failed(BVConstantOp::inferReturnTypes(parser.getContext(),
2804 result.location, result.operands,
2805 result.attributes.getDictionary(parser.getContext()),
2806 result.getRawProperties(),
2807 result.regions, inferredReturnTypes)))
2808 return ::mlir::failure();
2809 result.addTypes(inferredReturnTypes);
2810 return ::mlir::success();
2811}
2812
2813void BVConstantOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2814 _odsPrinter << ' ';
2815 _odsPrinter.printAttribute(getValueAttr());
2816 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2817 elidedAttrs.push_back("value");
2818 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2819}
2820
2821void BVConstantOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2822}
2823
2824} // namespace smt
2825} // namespace llzk
2826MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVConstantOp)
2827
2828namespace llzk {
2829namespace smt {
2830
2831//===----------------------------------------------------------------------===//
2832// ::llzk::smt::BVLShrOp definitions
2833//===----------------------------------------------------------------------===//
2834
2835namespace detail {
2836} // namespace detail
2838
2839::llvm::LogicalResult BVLShrOpAdaptor::verify(::mlir::Location loc) {
2840 return ::mlir::success();
2841}
2842
2843void BVLShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2844 odsState.addOperands(lhs);
2845 odsState.addOperands(rhs);
2846 odsState.addTypes(result);
2847}
2848
2849void BVLShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2850 odsState.addOperands(lhs);
2851 odsState.addOperands(rhs);
2852
2853 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2854 if (::mlir::succeeded(BVLShrOp::inferReturnTypes(odsBuilder.getContext(),
2855 odsState.location, odsState.operands,
2856 odsState.attributes.getDictionary(odsState.getContext()),
2857 odsState.getRawProperties(),
2858 odsState.regions, inferredReturnTypes)))
2859 odsState.addTypes(inferredReturnTypes);
2860 else
2861 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2862
2863}
2864
2865void BVLShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2866 odsState.addOperands(lhs);
2867 odsState.addOperands(rhs);
2868 assert(resultTypes.size() == 1u && "mismatched number of results");
2869 odsState.addTypes(resultTypes);
2870}
2871
2872void BVLShrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2873 assert(operands.size() == 2u && "mismatched number of parameters");
2874 odsState.addOperands(operands);
2875 odsState.addAttributes(attributes);
2876 assert(resultTypes.size() == 1u && "mismatched number of return types");
2877 odsState.addTypes(resultTypes);
2878}
2879
2880void BVLShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2881 assert(operands.size() == 2u && "mismatched number of parameters");
2882 odsState.addOperands(operands);
2883 odsState.addAttributes(attributes);
2884
2885 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2886 if (::mlir::succeeded(BVLShrOp::inferReturnTypes(odsBuilder.getContext(),
2887 odsState.location, operands,
2888 odsState.attributes.getDictionary(odsState.getContext()),
2889 odsState.getRawProperties(),
2890 odsState.regions, inferredReturnTypes))) {
2891 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2892 odsState.addTypes(inferredReturnTypes);
2893 } else {
2894 ::llvm::report_fatal_error("Failed to infer result type(s).");
2895 }
2896}
2897
2898::llvm::LogicalResult BVLShrOp::verifyInvariantsImpl() {
2899 {
2900 unsigned index = 0; (void)index;
2901 auto valueGroup0 = getODSOperands(0);
2902
2903 for (auto v : valueGroup0) {
2904 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2905 return ::mlir::failure();
2906 }
2907 auto valueGroup1 = getODSOperands(1);
2908
2909 for (auto v : valueGroup1) {
2910 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2911 return ::mlir::failure();
2912 }
2913 }
2914 {
2915 unsigned index = 0; (void)index;
2916 auto valueGroup0 = getODSResults(0);
2917
2918 for (auto v : valueGroup0) {
2919 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
2920 return ::mlir::failure();
2921 }
2922 }
2923 return ::mlir::success();
2924}
2925
2926::llvm::LogicalResult BVLShrOp::verifyInvariants() {
2927 return verifyInvariantsImpl();
2928}
2929
2930::llvm::LogicalResult BVLShrOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
2931 inferredReturnTypes.resize(1);
2932 ::mlir::Builder odsBuilder(context);
2933 if (operands.size() <= 0)
2934 return ::mlir::failure();
2935 ::mlir::Type odsInferredType0 = operands[0].getType();
2936 inferredReturnTypes[0] = odsInferredType0;
2937 return ::mlir::success();
2938}
2939
2940::mlir::ParseResult BVLShrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2941 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2942 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2943 (void)lhsOperandsLoc;
2944 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2945 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2946 (void)rhsOperandsLoc;
2947 ::mlir::Type resultRawType{};
2948 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
2949
2950 lhsOperandsLoc = parser.getCurrentLocation();
2951 if (parser.parseOperand(lhsRawOperand))
2952 return ::mlir::failure();
2953 if (parser.parseComma())
2954 return ::mlir::failure();
2955
2956 rhsOperandsLoc = parser.getCurrentLocation();
2957 if (parser.parseOperand(rhsRawOperand))
2958 return ::mlir::failure();
2959 {
2960 auto loc = parser.getCurrentLocation();(void)loc;
2961 if (parser.parseOptionalAttrDict(result.attributes))
2962 return ::mlir::failure();
2963 }
2964 if (parser.parseColon())
2965 return ::mlir::failure();
2966
2967 if (parser.parseType(resultRawType))
2968 return ::mlir::failure();
2969 result.addTypes(resultTypes);
2970 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
2971 return ::mlir::failure();
2972 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
2973 return ::mlir::failure();
2974 return ::mlir::success();
2975}
2976
2977void BVLShrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2978 _odsPrinter << ' ';
2979 _odsPrinter << getLhs();
2980 _odsPrinter << ",";
2981 _odsPrinter << ' ';
2982 _odsPrinter << getRhs();
2983 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2984 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2985 _odsPrinter << ' ' << ":";
2986 _odsPrinter << ' ';
2987 _odsPrinter << getResult().getType();
2988}
2989
2990void BVLShrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2991}
2992
2993} // namespace smt
2994} // namespace llzk
2995MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVLShrOp)
2996
2997namespace llzk {
2998namespace smt {
2999
3000//===----------------------------------------------------------------------===//
3001// ::llzk::smt::BVMulOp definitions
3002//===----------------------------------------------------------------------===//
3003
3004namespace detail {
3005} // namespace detail
3007
3008::llvm::LogicalResult BVMulOpAdaptor::verify(::mlir::Location loc) {
3009 return ::mlir::success();
3010}
3011
3012void BVMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3013 odsState.addOperands(lhs);
3014 odsState.addOperands(rhs);
3015 odsState.addTypes(result);
3016}
3017
3018void BVMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3019 odsState.addOperands(lhs);
3020 odsState.addOperands(rhs);
3021
3022 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3023 if (::mlir::succeeded(BVMulOp::inferReturnTypes(odsBuilder.getContext(),
3024 odsState.location, odsState.operands,
3025 odsState.attributes.getDictionary(odsState.getContext()),
3026 odsState.getRawProperties(),
3027 odsState.regions, inferredReturnTypes)))
3028 odsState.addTypes(inferredReturnTypes);
3029 else
3030 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3031
3032}
3033
3034void BVMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3035 odsState.addOperands(lhs);
3036 odsState.addOperands(rhs);
3037 assert(resultTypes.size() == 1u && "mismatched number of results");
3038 odsState.addTypes(resultTypes);
3039}
3040
3041void BVMulOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3042 assert(operands.size() == 2u && "mismatched number of parameters");
3043 odsState.addOperands(operands);
3044 odsState.addAttributes(attributes);
3045 assert(resultTypes.size() == 1u && "mismatched number of return types");
3046 odsState.addTypes(resultTypes);
3047}
3048
3049void BVMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3050 assert(operands.size() == 2u && "mismatched number of parameters");
3051 odsState.addOperands(operands);
3052 odsState.addAttributes(attributes);
3053
3054 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3055 if (::mlir::succeeded(BVMulOp::inferReturnTypes(odsBuilder.getContext(),
3056 odsState.location, operands,
3057 odsState.attributes.getDictionary(odsState.getContext()),
3058 odsState.getRawProperties(),
3059 odsState.regions, inferredReturnTypes))) {
3060 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3061 odsState.addTypes(inferredReturnTypes);
3062 } else {
3063 ::llvm::report_fatal_error("Failed to infer result type(s).");
3064 }
3065}
3066
3067::llvm::LogicalResult BVMulOp::verifyInvariantsImpl() {
3068 {
3069 unsigned index = 0; (void)index;
3070 auto valueGroup0 = getODSOperands(0);
3071
3072 for (auto v : valueGroup0) {
3073 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3074 return ::mlir::failure();
3075 }
3076 auto valueGroup1 = getODSOperands(1);
3077
3078 for (auto v : valueGroup1) {
3079 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3080 return ::mlir::failure();
3081 }
3082 }
3083 {
3084 unsigned index = 0; (void)index;
3085 auto valueGroup0 = getODSResults(0);
3086
3087 for (auto v : valueGroup0) {
3088 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3089 return ::mlir::failure();
3090 }
3091 }
3092 return ::mlir::success();
3093}
3094
3095::llvm::LogicalResult BVMulOp::verifyInvariants() {
3096 return verifyInvariantsImpl();
3097}
3098
3099::llvm::LogicalResult BVMulOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
3100 inferredReturnTypes.resize(1);
3101 ::mlir::Builder odsBuilder(context);
3102 if (operands.size() <= 0)
3103 return ::mlir::failure();
3104 ::mlir::Type odsInferredType0 = operands[0].getType();
3105 inferredReturnTypes[0] = odsInferredType0;
3106 return ::mlir::success();
3107}
3108
3109::mlir::ParseResult BVMulOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3110 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3111 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3112 (void)lhsOperandsLoc;
3113 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3114 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3115 (void)rhsOperandsLoc;
3116 ::mlir::Type resultRawType{};
3117 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3118
3119 lhsOperandsLoc = parser.getCurrentLocation();
3120 if (parser.parseOperand(lhsRawOperand))
3121 return ::mlir::failure();
3122 if (parser.parseComma())
3123 return ::mlir::failure();
3124
3125 rhsOperandsLoc = parser.getCurrentLocation();
3126 if (parser.parseOperand(rhsRawOperand))
3127 return ::mlir::failure();
3128 {
3129 auto loc = parser.getCurrentLocation();(void)loc;
3130 if (parser.parseOptionalAttrDict(result.attributes))
3131 return ::mlir::failure();
3132 }
3133 if (parser.parseColon())
3134 return ::mlir::failure();
3135
3136 if (parser.parseType(resultRawType))
3137 return ::mlir::failure();
3138 result.addTypes(resultTypes);
3139 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
3140 return ::mlir::failure();
3141 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
3142 return ::mlir::failure();
3143 return ::mlir::success();
3144}
3145
3146void BVMulOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3147 _odsPrinter << ' ';
3148 _odsPrinter << getLhs();
3149 _odsPrinter << ",";
3150 _odsPrinter << ' ';
3151 _odsPrinter << getRhs();
3152 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3153 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3154 _odsPrinter << ' ' << ":";
3155 _odsPrinter << ' ';
3156 _odsPrinter << getResult().getType();
3157}
3158
3159void BVMulOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3160}
3161
3162} // namespace smt
3163} // namespace llzk
3164MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVMulOp)
3165
3166namespace llzk {
3167namespace smt {
3168
3169//===----------------------------------------------------------------------===//
3170// ::llzk::smt::BVNegOp definitions
3171//===----------------------------------------------------------------------===//
3172
3173namespace detail {
3174} // namespace detail
3176
3177::llvm::LogicalResult BVNegOpAdaptor::verify(::mlir::Location loc) {
3178 return ::mlir::success();
3179}
3180
3181void BVNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
3182 odsState.addOperands(input);
3183 odsState.addTypes(result);
3184}
3185
3186void BVNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
3187 odsState.addOperands(input);
3188
3189 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3190 if (::mlir::succeeded(BVNegOp::inferReturnTypes(odsBuilder.getContext(),
3191 odsState.location, odsState.operands,
3192 odsState.attributes.getDictionary(odsState.getContext()),
3193 odsState.getRawProperties(),
3194 odsState.regions, inferredReturnTypes)))
3195 odsState.addTypes(inferredReturnTypes);
3196 else
3197 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3198
3199}
3200
3201void BVNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
3202 odsState.addOperands(input);
3203 assert(resultTypes.size() == 1u && "mismatched number of results");
3204 odsState.addTypes(resultTypes);
3205}
3206
3207void BVNegOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3208 assert(operands.size() == 1u && "mismatched number of parameters");
3209 odsState.addOperands(operands);
3210 odsState.addAttributes(attributes);
3211 assert(resultTypes.size() == 1u && "mismatched number of return types");
3212 odsState.addTypes(resultTypes);
3213}
3214
3215void BVNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3216 assert(operands.size() == 1u && "mismatched number of parameters");
3217 odsState.addOperands(operands);
3218 odsState.addAttributes(attributes);
3219
3220 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3221 if (::mlir::succeeded(BVNegOp::inferReturnTypes(odsBuilder.getContext(),
3222 odsState.location, operands,
3223 odsState.attributes.getDictionary(odsState.getContext()),
3224 odsState.getRawProperties(),
3225 odsState.regions, inferredReturnTypes))) {
3226 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3227 odsState.addTypes(inferredReturnTypes);
3228 } else {
3229 ::llvm::report_fatal_error("Failed to infer result type(s).");
3230 }
3231}
3232
3233::llvm::LogicalResult BVNegOp::verifyInvariantsImpl() {
3234 {
3235 unsigned index = 0; (void)index;
3236 auto valueGroup0 = getODSOperands(0);
3237
3238 for (auto v : valueGroup0) {
3239 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3240 return ::mlir::failure();
3241 }
3242 }
3243 {
3244 unsigned index = 0; (void)index;
3245 auto valueGroup0 = getODSResults(0);
3246
3247 for (auto v : valueGroup0) {
3248 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3249 return ::mlir::failure();
3250 }
3251 }
3252 return ::mlir::success();
3253}
3254
3255::llvm::LogicalResult BVNegOp::verifyInvariants() {
3256 return verifyInvariantsImpl();
3257}
3258
3259::llvm::LogicalResult BVNegOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
3260 inferredReturnTypes.resize(1);
3261 ::mlir::Builder odsBuilder(context);
3262 if (operands.size() <= 0)
3263 return ::mlir::failure();
3264 ::mlir::Type odsInferredType0 = operands[0].getType();
3265 inferredReturnTypes[0] = odsInferredType0;
3266 return ::mlir::success();
3267}
3268
3269::mlir::ParseResult BVNegOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3270 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
3271 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
3272 (void)inputOperandsLoc;
3273 ::mlir::Type resultRawType{};
3274 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3275
3276 inputOperandsLoc = parser.getCurrentLocation();
3277 if (parser.parseOperand(inputRawOperand))
3278 return ::mlir::failure();
3279 {
3280 auto loc = parser.getCurrentLocation();(void)loc;
3281 if (parser.parseOptionalAttrDict(result.attributes))
3282 return ::mlir::failure();
3283 }
3284 if (parser.parseColon())
3285 return ::mlir::failure();
3286
3287 if (parser.parseType(resultRawType))
3288 return ::mlir::failure();
3289 result.addTypes(resultTypes);
3290 if (parser.resolveOperands(inputOperands, resultTypes[0], inputOperandsLoc, result.operands))
3291 return ::mlir::failure();
3292 return ::mlir::success();
3293}
3294
3295void BVNegOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3296 _odsPrinter << ' ';
3297 _odsPrinter << getInput();
3298 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3299 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3300 _odsPrinter << ' ' << ":";
3301 _odsPrinter << ' ';
3302 _odsPrinter << getResult().getType();
3303}
3304
3305void BVNegOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3306}
3307
3308} // namespace smt
3309} // namespace llzk
3310MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVNegOp)
3311
3312namespace llzk {
3313namespace smt {
3314
3315//===----------------------------------------------------------------------===//
3316// ::llzk::smt::BVNotOp definitions
3317//===----------------------------------------------------------------------===//
3318
3319namespace detail {
3320} // namespace detail
3322
3323::llvm::LogicalResult BVNotOpAdaptor::verify(::mlir::Location loc) {
3324 return ::mlir::success();
3325}
3326
3327void BVNotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
3328 odsState.addOperands(input);
3329 odsState.addTypes(result);
3330}
3331
3332void BVNotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
3333 odsState.addOperands(input);
3334
3335 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3336 if (::mlir::succeeded(BVNotOp::inferReturnTypes(odsBuilder.getContext(),
3337 odsState.location, odsState.operands,
3338 odsState.attributes.getDictionary(odsState.getContext()),
3339 odsState.getRawProperties(),
3340 odsState.regions, inferredReturnTypes)))
3341 odsState.addTypes(inferredReturnTypes);
3342 else
3343 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3344
3345}
3346
3347void BVNotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
3348 odsState.addOperands(input);
3349 assert(resultTypes.size() == 1u && "mismatched number of results");
3350 odsState.addTypes(resultTypes);
3351}
3352
3353void BVNotOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3354 assert(operands.size() == 1u && "mismatched number of parameters");
3355 odsState.addOperands(operands);
3356 odsState.addAttributes(attributes);
3357 assert(resultTypes.size() == 1u && "mismatched number of return types");
3358 odsState.addTypes(resultTypes);
3359}
3360
3361void BVNotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3362 assert(operands.size() == 1u && "mismatched number of parameters");
3363 odsState.addOperands(operands);
3364 odsState.addAttributes(attributes);
3365
3366 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3367 if (::mlir::succeeded(BVNotOp::inferReturnTypes(odsBuilder.getContext(),
3368 odsState.location, operands,
3369 odsState.attributes.getDictionary(odsState.getContext()),
3370 odsState.getRawProperties(),
3371 odsState.regions, inferredReturnTypes))) {
3372 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3373 odsState.addTypes(inferredReturnTypes);
3374 } else {
3375 ::llvm::report_fatal_error("Failed to infer result type(s).");
3376 }
3377}
3378
3379::llvm::LogicalResult BVNotOp::verifyInvariantsImpl() {
3380 {
3381 unsigned index = 0; (void)index;
3382 auto valueGroup0 = getODSOperands(0);
3383
3384 for (auto v : valueGroup0) {
3385 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3386 return ::mlir::failure();
3387 }
3388 }
3389 {
3390 unsigned index = 0; (void)index;
3391 auto valueGroup0 = getODSResults(0);
3392
3393 for (auto v : valueGroup0) {
3394 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3395 return ::mlir::failure();
3396 }
3397 }
3398 return ::mlir::success();
3399}
3400
3401::llvm::LogicalResult BVNotOp::verifyInvariants() {
3402 return verifyInvariantsImpl();
3403}
3404
3405::llvm::LogicalResult BVNotOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
3406 inferredReturnTypes.resize(1);
3407 ::mlir::Builder odsBuilder(context);
3408 if (operands.size() <= 0)
3409 return ::mlir::failure();
3410 ::mlir::Type odsInferredType0 = operands[0].getType();
3411 inferredReturnTypes[0] = odsInferredType0;
3412 return ::mlir::success();
3413}
3414
3415::mlir::ParseResult BVNotOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3416 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
3417 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
3418 (void)inputOperandsLoc;
3419 ::mlir::Type resultRawType{};
3420 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3421
3422 inputOperandsLoc = parser.getCurrentLocation();
3423 if (parser.parseOperand(inputRawOperand))
3424 return ::mlir::failure();
3425 {
3426 auto loc = parser.getCurrentLocation();(void)loc;
3427 if (parser.parseOptionalAttrDict(result.attributes))
3428 return ::mlir::failure();
3429 }
3430 if (parser.parseColon())
3431 return ::mlir::failure();
3432
3433 if (parser.parseType(resultRawType))
3434 return ::mlir::failure();
3435 result.addTypes(resultTypes);
3436 if (parser.resolveOperands(inputOperands, resultTypes[0], inputOperandsLoc, result.operands))
3437 return ::mlir::failure();
3438 return ::mlir::success();
3439}
3440
3441void BVNotOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3442 _odsPrinter << ' ';
3443 _odsPrinter << getInput();
3444 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3445 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3446 _odsPrinter << ' ' << ":";
3447 _odsPrinter << ' ';
3448 _odsPrinter << getResult().getType();
3449}
3450
3451void BVNotOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3452}
3453
3454} // namespace smt
3455} // namespace llzk
3456MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVNotOp)
3457
3458namespace llzk {
3459namespace smt {
3460
3461//===----------------------------------------------------------------------===//
3462// ::llzk::smt::BVOrOp definitions
3463//===----------------------------------------------------------------------===//
3464
3465namespace detail {
3466} // namespace detail
3468
3469::llvm::LogicalResult BVOrOpAdaptor::verify(::mlir::Location loc) {
3470 return ::mlir::success();
3471}
3472
3473void BVOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3474 odsState.addOperands(lhs);
3475 odsState.addOperands(rhs);
3476 odsState.addTypes(result);
3477}
3478
3479void BVOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3480 odsState.addOperands(lhs);
3481 odsState.addOperands(rhs);
3482
3483 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3484 if (::mlir::succeeded(BVOrOp::inferReturnTypes(odsBuilder.getContext(),
3485 odsState.location, odsState.operands,
3486 odsState.attributes.getDictionary(odsState.getContext()),
3487 odsState.getRawProperties(),
3488 odsState.regions, inferredReturnTypes)))
3489 odsState.addTypes(inferredReturnTypes);
3490 else
3491 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3492
3493}
3494
3495void BVOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3496 odsState.addOperands(lhs);
3497 odsState.addOperands(rhs);
3498 assert(resultTypes.size() == 1u && "mismatched number of results");
3499 odsState.addTypes(resultTypes);
3500}
3501
3502void BVOrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3503 assert(operands.size() == 2u && "mismatched number of parameters");
3504 odsState.addOperands(operands);
3505 odsState.addAttributes(attributes);
3506 assert(resultTypes.size() == 1u && "mismatched number of return types");
3507 odsState.addTypes(resultTypes);
3508}
3509
3510void BVOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3511 assert(operands.size() == 2u && "mismatched number of parameters");
3512 odsState.addOperands(operands);
3513 odsState.addAttributes(attributes);
3514
3515 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3516 if (::mlir::succeeded(BVOrOp::inferReturnTypes(odsBuilder.getContext(),
3517 odsState.location, operands,
3518 odsState.attributes.getDictionary(odsState.getContext()),
3519 odsState.getRawProperties(),
3520 odsState.regions, inferredReturnTypes))) {
3521 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3522 odsState.addTypes(inferredReturnTypes);
3523 } else {
3524 ::llvm::report_fatal_error("Failed to infer result type(s).");
3525 }
3526}
3527
3528::llvm::LogicalResult BVOrOp::verifyInvariantsImpl() {
3529 {
3530 unsigned index = 0; (void)index;
3531 auto valueGroup0 = getODSOperands(0);
3532
3533 for (auto v : valueGroup0) {
3534 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3535 return ::mlir::failure();
3536 }
3537 auto valueGroup1 = getODSOperands(1);
3538
3539 for (auto v : valueGroup1) {
3540 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3541 return ::mlir::failure();
3542 }
3543 }
3544 {
3545 unsigned index = 0; (void)index;
3546 auto valueGroup0 = getODSResults(0);
3547
3548 for (auto v : valueGroup0) {
3549 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3550 return ::mlir::failure();
3551 }
3552 }
3553 return ::mlir::success();
3554}
3555
3556::llvm::LogicalResult BVOrOp::verifyInvariants() {
3557 return verifyInvariantsImpl();
3558}
3559
3560::llvm::LogicalResult BVOrOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
3561 inferredReturnTypes.resize(1);
3562 ::mlir::Builder odsBuilder(context);
3563 if (operands.size() <= 0)
3564 return ::mlir::failure();
3565 ::mlir::Type odsInferredType0 = operands[0].getType();
3566 inferredReturnTypes[0] = odsInferredType0;
3567 return ::mlir::success();
3568}
3569
3570::mlir::ParseResult BVOrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3571 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3572 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3573 (void)lhsOperandsLoc;
3574 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3575 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3576 (void)rhsOperandsLoc;
3577 ::mlir::Type resultRawType{};
3578 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3579
3580 lhsOperandsLoc = parser.getCurrentLocation();
3581 if (parser.parseOperand(lhsRawOperand))
3582 return ::mlir::failure();
3583 if (parser.parseComma())
3584 return ::mlir::failure();
3585
3586 rhsOperandsLoc = parser.getCurrentLocation();
3587 if (parser.parseOperand(rhsRawOperand))
3588 return ::mlir::failure();
3589 {
3590 auto loc = parser.getCurrentLocation();(void)loc;
3591 if (parser.parseOptionalAttrDict(result.attributes))
3592 return ::mlir::failure();
3593 }
3594 if (parser.parseColon())
3595 return ::mlir::failure();
3596
3597 if (parser.parseType(resultRawType))
3598 return ::mlir::failure();
3599 result.addTypes(resultTypes);
3600 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
3601 return ::mlir::failure();
3602 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
3603 return ::mlir::failure();
3604 return ::mlir::success();
3605}
3606
3607void BVOrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3608 _odsPrinter << ' ';
3609 _odsPrinter << getLhs();
3610 _odsPrinter << ",";
3611 _odsPrinter << ' ';
3612 _odsPrinter << getRhs();
3613 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3614 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3615 _odsPrinter << ' ' << ":";
3616 _odsPrinter << ' ';
3617 _odsPrinter << getResult().getType();
3618}
3619
3620void BVOrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3621}
3622
3623} // namespace smt
3624} // namespace llzk
3625MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVOrOp)
3626
3627namespace llzk {
3628namespace smt {
3629
3630//===----------------------------------------------------------------------===//
3631// ::llzk::smt::BVSDivOp definitions
3632//===----------------------------------------------------------------------===//
3633
3634namespace detail {
3635} // namespace detail
3637
3638::llvm::LogicalResult BVSDivOpAdaptor::verify(::mlir::Location loc) {
3639 return ::mlir::success();
3640}
3641
3642void BVSDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3643 odsState.addOperands(lhs);
3644 odsState.addOperands(rhs);
3645 odsState.addTypes(result);
3646}
3647
3648void BVSDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3649 odsState.addOperands(lhs);
3650 odsState.addOperands(rhs);
3651
3652 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3653 if (::mlir::succeeded(BVSDivOp::inferReturnTypes(odsBuilder.getContext(),
3654 odsState.location, odsState.operands,
3655 odsState.attributes.getDictionary(odsState.getContext()),
3656 odsState.getRawProperties(),
3657 odsState.regions, inferredReturnTypes)))
3658 odsState.addTypes(inferredReturnTypes);
3659 else
3660 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3661
3662}
3663
3664void BVSDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3665 odsState.addOperands(lhs);
3666 odsState.addOperands(rhs);
3667 assert(resultTypes.size() == 1u && "mismatched number of results");
3668 odsState.addTypes(resultTypes);
3669}
3670
3671void BVSDivOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3672 assert(operands.size() == 2u && "mismatched number of parameters");
3673 odsState.addOperands(operands);
3674 odsState.addAttributes(attributes);
3675 assert(resultTypes.size() == 1u && "mismatched number of return types");
3676 odsState.addTypes(resultTypes);
3677}
3678
3679void BVSDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3680 assert(operands.size() == 2u && "mismatched number of parameters");
3681 odsState.addOperands(operands);
3682 odsState.addAttributes(attributes);
3683
3684 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3685 if (::mlir::succeeded(BVSDivOp::inferReturnTypes(odsBuilder.getContext(),
3686 odsState.location, operands,
3687 odsState.attributes.getDictionary(odsState.getContext()),
3688 odsState.getRawProperties(),
3689 odsState.regions, inferredReturnTypes))) {
3690 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3691 odsState.addTypes(inferredReturnTypes);
3692 } else {
3693 ::llvm::report_fatal_error("Failed to infer result type(s).");
3694 }
3695}
3696
3697::llvm::LogicalResult BVSDivOp::verifyInvariantsImpl() {
3698 {
3699 unsigned index = 0; (void)index;
3700 auto valueGroup0 = getODSOperands(0);
3701
3702 for (auto v : valueGroup0) {
3703 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3704 return ::mlir::failure();
3705 }
3706 auto valueGroup1 = getODSOperands(1);
3707
3708 for (auto v : valueGroup1) {
3709 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3710 return ::mlir::failure();
3711 }
3712 }
3713 {
3714 unsigned index = 0; (void)index;
3715 auto valueGroup0 = getODSResults(0);
3716
3717 for (auto v : valueGroup0) {
3718 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3719 return ::mlir::failure();
3720 }
3721 }
3722 return ::mlir::success();
3723}
3724
3725::llvm::LogicalResult BVSDivOp::verifyInvariants() {
3726 return verifyInvariantsImpl();
3727}
3728
3729::llvm::LogicalResult BVSDivOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
3730 inferredReturnTypes.resize(1);
3731 ::mlir::Builder odsBuilder(context);
3732 if (operands.size() <= 0)
3733 return ::mlir::failure();
3734 ::mlir::Type odsInferredType0 = operands[0].getType();
3735 inferredReturnTypes[0] = odsInferredType0;
3736 return ::mlir::success();
3737}
3738
3739::mlir::ParseResult BVSDivOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3740 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3741 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3742 (void)lhsOperandsLoc;
3743 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3744 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3745 (void)rhsOperandsLoc;
3746 ::mlir::Type resultRawType{};
3747 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3748
3749 lhsOperandsLoc = parser.getCurrentLocation();
3750 if (parser.parseOperand(lhsRawOperand))
3751 return ::mlir::failure();
3752 if (parser.parseComma())
3753 return ::mlir::failure();
3754
3755 rhsOperandsLoc = parser.getCurrentLocation();
3756 if (parser.parseOperand(rhsRawOperand))
3757 return ::mlir::failure();
3758 {
3759 auto loc = parser.getCurrentLocation();(void)loc;
3760 if (parser.parseOptionalAttrDict(result.attributes))
3761 return ::mlir::failure();
3762 }
3763 if (parser.parseColon())
3764 return ::mlir::failure();
3765
3766 if (parser.parseType(resultRawType))
3767 return ::mlir::failure();
3768 result.addTypes(resultTypes);
3769 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
3770 return ::mlir::failure();
3771 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
3772 return ::mlir::failure();
3773 return ::mlir::success();
3774}
3775
3776void BVSDivOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3777 _odsPrinter << ' ';
3778 _odsPrinter << getLhs();
3779 _odsPrinter << ",";
3780 _odsPrinter << ' ';
3781 _odsPrinter << getRhs();
3782 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3783 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3784 _odsPrinter << ' ' << ":";
3785 _odsPrinter << ' ';
3786 _odsPrinter << getResult().getType();
3787}
3788
3789void BVSDivOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3790}
3791
3792} // namespace smt
3793} // namespace llzk
3794MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVSDivOp)
3795
3796namespace llzk {
3797namespace smt {
3798
3799//===----------------------------------------------------------------------===//
3800// ::llzk::smt::BVSModOp definitions
3801//===----------------------------------------------------------------------===//
3802
3803namespace detail {
3804} // namespace detail
3806
3807::llvm::LogicalResult BVSModOpAdaptor::verify(::mlir::Location loc) {
3808 return ::mlir::success();
3809}
3810
3811void BVSModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3812 odsState.addOperands(lhs);
3813 odsState.addOperands(rhs);
3814 odsState.addTypes(result);
3815}
3816
3817void BVSModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3818 odsState.addOperands(lhs);
3819 odsState.addOperands(rhs);
3820
3821 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3822 if (::mlir::succeeded(BVSModOp::inferReturnTypes(odsBuilder.getContext(),
3823 odsState.location, odsState.operands,
3824 odsState.attributes.getDictionary(odsState.getContext()),
3825 odsState.getRawProperties(),
3826 odsState.regions, inferredReturnTypes)))
3827 odsState.addTypes(inferredReturnTypes);
3828 else
3829 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3830
3831}
3832
3833void BVSModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3834 odsState.addOperands(lhs);
3835 odsState.addOperands(rhs);
3836 assert(resultTypes.size() == 1u && "mismatched number of results");
3837 odsState.addTypes(resultTypes);
3838}
3839
3840void BVSModOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3841 assert(operands.size() == 2u && "mismatched number of parameters");
3842 odsState.addOperands(operands);
3843 odsState.addAttributes(attributes);
3844 assert(resultTypes.size() == 1u && "mismatched number of return types");
3845 odsState.addTypes(resultTypes);
3846}
3847
3848void BVSModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3849 assert(operands.size() == 2u && "mismatched number of parameters");
3850 odsState.addOperands(operands);
3851 odsState.addAttributes(attributes);
3852
3853 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3854 if (::mlir::succeeded(BVSModOp::inferReturnTypes(odsBuilder.getContext(),
3855 odsState.location, operands,
3856 odsState.attributes.getDictionary(odsState.getContext()),
3857 odsState.getRawProperties(),
3858 odsState.regions, inferredReturnTypes))) {
3859 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3860 odsState.addTypes(inferredReturnTypes);
3861 } else {
3862 ::llvm::report_fatal_error("Failed to infer result type(s).");
3863 }
3864}
3865
3866::llvm::LogicalResult BVSModOp::verifyInvariantsImpl() {
3867 {
3868 unsigned index = 0; (void)index;
3869 auto valueGroup0 = getODSOperands(0);
3870
3871 for (auto v : valueGroup0) {
3872 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3873 return ::mlir::failure();
3874 }
3875 auto valueGroup1 = getODSOperands(1);
3876
3877 for (auto v : valueGroup1) {
3878 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3879 return ::mlir::failure();
3880 }
3881 }
3882 {
3883 unsigned index = 0; (void)index;
3884 auto valueGroup0 = getODSResults(0);
3885
3886 for (auto v : valueGroup0) {
3887 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3888 return ::mlir::failure();
3889 }
3890 }
3891 return ::mlir::success();
3892}
3893
3894::llvm::LogicalResult BVSModOp::verifyInvariants() {
3895 return verifyInvariantsImpl();
3896}
3897
3898::llvm::LogicalResult BVSModOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
3899 inferredReturnTypes.resize(1);
3900 ::mlir::Builder odsBuilder(context);
3901 if (operands.size() <= 0)
3902 return ::mlir::failure();
3903 ::mlir::Type odsInferredType0 = operands[0].getType();
3904 inferredReturnTypes[0] = odsInferredType0;
3905 return ::mlir::success();
3906}
3907
3908::mlir::ParseResult BVSModOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3909 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3910 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3911 (void)lhsOperandsLoc;
3912 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3913 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3914 (void)rhsOperandsLoc;
3915 ::mlir::Type resultRawType{};
3916 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3917
3918 lhsOperandsLoc = parser.getCurrentLocation();
3919 if (parser.parseOperand(lhsRawOperand))
3920 return ::mlir::failure();
3921 if (parser.parseComma())
3922 return ::mlir::failure();
3923
3924 rhsOperandsLoc = parser.getCurrentLocation();
3925 if (parser.parseOperand(rhsRawOperand))
3926 return ::mlir::failure();
3927 {
3928 auto loc = parser.getCurrentLocation();(void)loc;
3929 if (parser.parseOptionalAttrDict(result.attributes))
3930 return ::mlir::failure();
3931 }
3932 if (parser.parseColon())
3933 return ::mlir::failure();
3934
3935 if (parser.parseType(resultRawType))
3936 return ::mlir::failure();
3937 result.addTypes(resultTypes);
3938 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
3939 return ::mlir::failure();
3940 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
3941 return ::mlir::failure();
3942 return ::mlir::success();
3943}
3944
3945void BVSModOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3946 _odsPrinter << ' ';
3947 _odsPrinter << getLhs();
3948 _odsPrinter << ",";
3949 _odsPrinter << ' ';
3950 _odsPrinter << getRhs();
3951 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3952 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3953 _odsPrinter << ' ' << ":";
3954 _odsPrinter << ' ';
3955 _odsPrinter << getResult().getType();
3956}
3957
3958void BVSModOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3959}
3960
3961} // namespace smt
3962} // namespace llzk
3963MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVSModOp)
3964
3965namespace llzk {
3966namespace smt {
3967
3968//===----------------------------------------------------------------------===//
3969// ::llzk::smt::BVSRemOp definitions
3970//===----------------------------------------------------------------------===//
3971
3972namespace detail {
3973} // namespace detail
3975
3976::llvm::LogicalResult BVSRemOpAdaptor::verify(::mlir::Location loc) {
3977 return ::mlir::success();
3978}
3979
3980void BVSRemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3981 odsState.addOperands(lhs);
3982 odsState.addOperands(rhs);
3983 odsState.addTypes(result);
3984}
3985
3986void BVSRemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3987 odsState.addOperands(lhs);
3988 odsState.addOperands(rhs);
3989
3990 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3991 if (::mlir::succeeded(BVSRemOp::inferReturnTypes(odsBuilder.getContext(),
3992 odsState.location, odsState.operands,
3993 odsState.attributes.getDictionary(odsState.getContext()),
3994 odsState.getRawProperties(),
3995 odsState.regions, inferredReturnTypes)))
3996 odsState.addTypes(inferredReturnTypes);
3997 else
3998 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3999
4000}
4001
4002void BVSRemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4003 odsState.addOperands(lhs);
4004 odsState.addOperands(rhs);
4005 assert(resultTypes.size() == 1u && "mismatched number of results");
4006 odsState.addTypes(resultTypes);
4007}
4008
4009void BVSRemOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4010 assert(operands.size() == 2u && "mismatched number of parameters");
4011 odsState.addOperands(operands);
4012 odsState.addAttributes(attributes);
4013 assert(resultTypes.size() == 1u && "mismatched number of return types");
4014 odsState.addTypes(resultTypes);
4015}
4016
4017void BVSRemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4018 assert(operands.size() == 2u && "mismatched number of parameters");
4019 odsState.addOperands(operands);
4020 odsState.addAttributes(attributes);
4021
4022 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4023 if (::mlir::succeeded(BVSRemOp::inferReturnTypes(odsBuilder.getContext(),
4024 odsState.location, operands,
4025 odsState.attributes.getDictionary(odsState.getContext()),
4026 odsState.getRawProperties(),
4027 odsState.regions, inferredReturnTypes))) {
4028 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4029 odsState.addTypes(inferredReturnTypes);
4030 } else {
4031 ::llvm::report_fatal_error("Failed to infer result type(s).");
4032 }
4033}
4034
4035::llvm::LogicalResult BVSRemOp::verifyInvariantsImpl() {
4036 {
4037 unsigned index = 0; (void)index;
4038 auto valueGroup0 = getODSOperands(0);
4039
4040 for (auto v : valueGroup0) {
4041 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4042 return ::mlir::failure();
4043 }
4044 auto valueGroup1 = getODSOperands(1);
4045
4046 for (auto v : valueGroup1) {
4047 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4048 return ::mlir::failure();
4049 }
4050 }
4051 {
4052 unsigned index = 0; (void)index;
4053 auto valueGroup0 = getODSResults(0);
4054
4055 for (auto v : valueGroup0) {
4056 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
4057 return ::mlir::failure();
4058 }
4059 }
4060 return ::mlir::success();
4061}
4062
4063::llvm::LogicalResult BVSRemOp::verifyInvariants() {
4064 return verifyInvariantsImpl();
4065}
4066
4067::llvm::LogicalResult BVSRemOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
4068 inferredReturnTypes.resize(1);
4069 ::mlir::Builder odsBuilder(context);
4070 if (operands.size() <= 0)
4071 return ::mlir::failure();
4072 ::mlir::Type odsInferredType0 = operands[0].getType();
4073 inferredReturnTypes[0] = odsInferredType0;
4074 return ::mlir::success();
4075}
4076
4077::mlir::ParseResult BVSRemOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4078 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4079 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4080 (void)lhsOperandsLoc;
4081 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4082 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4083 (void)rhsOperandsLoc;
4084 ::mlir::Type resultRawType{};
4085 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
4086
4087 lhsOperandsLoc = parser.getCurrentLocation();
4088 if (parser.parseOperand(lhsRawOperand))
4089 return ::mlir::failure();
4090 if (parser.parseComma())
4091 return ::mlir::failure();
4092
4093 rhsOperandsLoc = parser.getCurrentLocation();
4094 if (parser.parseOperand(rhsRawOperand))
4095 return ::mlir::failure();
4096 {
4097 auto loc = parser.getCurrentLocation();(void)loc;
4098 if (parser.parseOptionalAttrDict(result.attributes))
4099 return ::mlir::failure();
4100 }
4101 if (parser.parseColon())
4102 return ::mlir::failure();
4103
4104 if (parser.parseType(resultRawType))
4105 return ::mlir::failure();
4106 result.addTypes(resultTypes);
4107 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
4108 return ::mlir::failure();
4109 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
4110 return ::mlir::failure();
4111 return ::mlir::success();
4112}
4113
4114void BVSRemOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4115 _odsPrinter << ' ';
4116 _odsPrinter << getLhs();
4117 _odsPrinter << ",";
4118 _odsPrinter << ' ';
4119 _odsPrinter << getRhs();
4120 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4121 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4122 _odsPrinter << ' ' << ":";
4123 _odsPrinter << ' ';
4124 _odsPrinter << getResult().getType();
4125}
4126
4127void BVSRemOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4128}
4129
4130} // namespace smt
4131} // namespace llzk
4132MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVSRemOp)
4133
4134namespace llzk {
4135namespace smt {
4136
4137//===----------------------------------------------------------------------===//
4138// ::llzk::smt::BVShlOp definitions
4139//===----------------------------------------------------------------------===//
4140
4141namespace detail {
4142} // namespace detail
4144
4145::llvm::LogicalResult BVShlOpAdaptor::verify(::mlir::Location loc) {
4146 return ::mlir::success();
4147}
4148
4149void BVShlOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4150 odsState.addOperands(lhs);
4151 odsState.addOperands(rhs);
4152 odsState.addTypes(result);
4153}
4154
4155void BVShlOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
4156 odsState.addOperands(lhs);
4157 odsState.addOperands(rhs);
4158
4159 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4160 if (::mlir::succeeded(BVShlOp::inferReturnTypes(odsBuilder.getContext(),
4161 odsState.location, odsState.operands,
4162 odsState.attributes.getDictionary(odsState.getContext()),
4163 odsState.getRawProperties(),
4164 odsState.regions, inferredReturnTypes)))
4165 odsState.addTypes(inferredReturnTypes);
4166 else
4167 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4168
4169}
4170
4171void BVShlOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4172 odsState.addOperands(lhs);
4173 odsState.addOperands(rhs);
4174 assert(resultTypes.size() == 1u && "mismatched number of results");
4175 odsState.addTypes(resultTypes);
4176}
4177
4178void BVShlOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4179 assert(operands.size() == 2u && "mismatched number of parameters");
4180 odsState.addOperands(operands);
4181 odsState.addAttributes(attributes);
4182 assert(resultTypes.size() == 1u && "mismatched number of return types");
4183 odsState.addTypes(resultTypes);
4184}
4185
4186void BVShlOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4187 assert(operands.size() == 2u && "mismatched number of parameters");
4188 odsState.addOperands(operands);
4189 odsState.addAttributes(attributes);
4190
4191 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4192 if (::mlir::succeeded(BVShlOp::inferReturnTypes(odsBuilder.getContext(),
4193 odsState.location, operands,
4194 odsState.attributes.getDictionary(odsState.getContext()),
4195 odsState.getRawProperties(),
4196 odsState.regions, inferredReturnTypes))) {
4197 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4198 odsState.addTypes(inferredReturnTypes);
4199 } else {
4200 ::llvm::report_fatal_error("Failed to infer result type(s).");
4201 }
4202}
4203
4204::llvm::LogicalResult BVShlOp::verifyInvariantsImpl() {
4205 {
4206 unsigned index = 0; (void)index;
4207 auto valueGroup0 = getODSOperands(0);
4208
4209 for (auto v : valueGroup0) {
4210 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4211 return ::mlir::failure();
4212 }
4213 auto valueGroup1 = getODSOperands(1);
4214
4215 for (auto v : valueGroup1) {
4216 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4217 return ::mlir::failure();
4218 }
4219 }
4220 {
4221 unsigned index = 0; (void)index;
4222 auto valueGroup0 = getODSResults(0);
4223
4224 for (auto v : valueGroup0) {
4225 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
4226 return ::mlir::failure();
4227 }
4228 }
4229 return ::mlir::success();
4230}
4231
4232::llvm::LogicalResult BVShlOp::verifyInvariants() {
4233 return verifyInvariantsImpl();
4234}
4235
4236::llvm::LogicalResult BVShlOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
4237 inferredReturnTypes.resize(1);
4238 ::mlir::Builder odsBuilder(context);
4239 if (operands.size() <= 0)
4240 return ::mlir::failure();
4241 ::mlir::Type odsInferredType0 = operands[0].getType();
4242 inferredReturnTypes[0] = odsInferredType0;
4243 return ::mlir::success();
4244}
4245
4246::mlir::ParseResult BVShlOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4247 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4248 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4249 (void)lhsOperandsLoc;
4250 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4251 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4252 (void)rhsOperandsLoc;
4253 ::mlir::Type resultRawType{};
4254 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
4255
4256 lhsOperandsLoc = parser.getCurrentLocation();
4257 if (parser.parseOperand(lhsRawOperand))
4258 return ::mlir::failure();
4259 if (parser.parseComma())
4260 return ::mlir::failure();
4261
4262 rhsOperandsLoc = parser.getCurrentLocation();
4263 if (parser.parseOperand(rhsRawOperand))
4264 return ::mlir::failure();
4265 {
4266 auto loc = parser.getCurrentLocation();(void)loc;
4267 if (parser.parseOptionalAttrDict(result.attributes))
4268 return ::mlir::failure();
4269 }
4270 if (parser.parseColon())
4271 return ::mlir::failure();
4272
4273 if (parser.parseType(resultRawType))
4274 return ::mlir::failure();
4275 result.addTypes(resultTypes);
4276 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
4277 return ::mlir::failure();
4278 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
4279 return ::mlir::failure();
4280 return ::mlir::success();
4281}
4282
4283void BVShlOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4284 _odsPrinter << ' ';
4285 _odsPrinter << getLhs();
4286 _odsPrinter << ",";
4287 _odsPrinter << ' ';
4288 _odsPrinter << getRhs();
4289 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4290 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4291 _odsPrinter << ' ' << ":";
4292 _odsPrinter << ' ';
4293 _odsPrinter << getResult().getType();
4294}
4295
4296void BVShlOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4297}
4298
4299} // namespace smt
4300} // namespace llzk
4301MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVShlOp)
4302
4303namespace llzk {
4304namespace smt {
4305
4306//===----------------------------------------------------------------------===//
4307// ::llzk::smt::BVUDivOp definitions
4308//===----------------------------------------------------------------------===//
4309
4310namespace detail {
4311} // namespace detail
4313
4314::llvm::LogicalResult BVUDivOpAdaptor::verify(::mlir::Location loc) {
4315 return ::mlir::success();
4316}
4317
4318void BVUDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4319 odsState.addOperands(lhs);
4320 odsState.addOperands(rhs);
4321 odsState.addTypes(result);
4322}
4323
4324void BVUDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
4325 odsState.addOperands(lhs);
4326 odsState.addOperands(rhs);
4327
4328 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4329 if (::mlir::succeeded(BVUDivOp::inferReturnTypes(odsBuilder.getContext(),
4330 odsState.location, odsState.operands,
4331 odsState.attributes.getDictionary(odsState.getContext()),
4332 odsState.getRawProperties(),
4333 odsState.regions, inferredReturnTypes)))
4334 odsState.addTypes(inferredReturnTypes);
4335 else
4336 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4337
4338}
4339
4340void BVUDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4341 odsState.addOperands(lhs);
4342 odsState.addOperands(rhs);
4343 assert(resultTypes.size() == 1u && "mismatched number of results");
4344 odsState.addTypes(resultTypes);
4345}
4346
4347void BVUDivOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4348 assert(operands.size() == 2u && "mismatched number of parameters");
4349 odsState.addOperands(operands);
4350 odsState.addAttributes(attributes);
4351 assert(resultTypes.size() == 1u && "mismatched number of return types");
4352 odsState.addTypes(resultTypes);
4353}
4354
4355void BVUDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4356 assert(operands.size() == 2u && "mismatched number of parameters");
4357 odsState.addOperands(operands);
4358 odsState.addAttributes(attributes);
4359
4360 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4361 if (::mlir::succeeded(BVUDivOp::inferReturnTypes(odsBuilder.getContext(),
4362 odsState.location, operands,
4363 odsState.attributes.getDictionary(odsState.getContext()),
4364 odsState.getRawProperties(),
4365 odsState.regions, inferredReturnTypes))) {
4366 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4367 odsState.addTypes(inferredReturnTypes);
4368 } else {
4369 ::llvm::report_fatal_error("Failed to infer result type(s).");
4370 }
4371}
4372
4373::llvm::LogicalResult BVUDivOp::verifyInvariantsImpl() {
4374 {
4375 unsigned index = 0; (void)index;
4376 auto valueGroup0 = getODSOperands(0);
4377
4378 for (auto v : valueGroup0) {
4379 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4380 return ::mlir::failure();
4381 }
4382 auto valueGroup1 = getODSOperands(1);
4383
4384 for (auto v : valueGroup1) {
4385 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4386 return ::mlir::failure();
4387 }
4388 }
4389 {
4390 unsigned index = 0; (void)index;
4391 auto valueGroup0 = getODSResults(0);
4392
4393 for (auto v : valueGroup0) {
4394 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
4395 return ::mlir::failure();
4396 }
4397 }
4398 return ::mlir::success();
4399}
4400
4401::llvm::LogicalResult BVUDivOp::verifyInvariants() {
4402 return verifyInvariantsImpl();
4403}
4404
4405::llvm::LogicalResult BVUDivOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
4406 inferredReturnTypes.resize(1);
4407 ::mlir::Builder odsBuilder(context);
4408 if (operands.size() <= 0)
4409 return ::mlir::failure();
4410 ::mlir::Type odsInferredType0 = operands[0].getType();
4411 inferredReturnTypes[0] = odsInferredType0;
4412 return ::mlir::success();
4413}
4414
4415::mlir::ParseResult BVUDivOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4416 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4417 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4418 (void)lhsOperandsLoc;
4419 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4420 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4421 (void)rhsOperandsLoc;
4422 ::mlir::Type resultRawType{};
4423 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
4424
4425 lhsOperandsLoc = parser.getCurrentLocation();
4426 if (parser.parseOperand(lhsRawOperand))
4427 return ::mlir::failure();
4428 if (parser.parseComma())
4429 return ::mlir::failure();
4430
4431 rhsOperandsLoc = parser.getCurrentLocation();
4432 if (parser.parseOperand(rhsRawOperand))
4433 return ::mlir::failure();
4434 {
4435 auto loc = parser.getCurrentLocation();(void)loc;
4436 if (parser.parseOptionalAttrDict(result.attributes))
4437 return ::mlir::failure();
4438 }
4439 if (parser.parseColon())
4440 return ::mlir::failure();
4441
4442 if (parser.parseType(resultRawType))
4443 return ::mlir::failure();
4444 result.addTypes(resultTypes);
4445 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
4446 return ::mlir::failure();
4447 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
4448 return ::mlir::failure();
4449 return ::mlir::success();
4450}
4451
4452void BVUDivOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4453 _odsPrinter << ' ';
4454 _odsPrinter << getLhs();
4455 _odsPrinter << ",";
4456 _odsPrinter << ' ';
4457 _odsPrinter << getRhs();
4458 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4459 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4460 _odsPrinter << ' ' << ":";
4461 _odsPrinter << ' ';
4462 _odsPrinter << getResult().getType();
4463}
4464
4465void BVUDivOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4466}
4467
4468} // namespace smt
4469} // namespace llzk
4470MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVUDivOp)
4471
4472namespace llzk {
4473namespace smt {
4474
4475//===----------------------------------------------------------------------===//
4476// ::llzk::smt::BVURemOp definitions
4477//===----------------------------------------------------------------------===//
4478
4479namespace detail {
4480} // namespace detail
4482
4483::llvm::LogicalResult BVURemOpAdaptor::verify(::mlir::Location loc) {
4484 return ::mlir::success();
4485}
4486
4487void BVURemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4488 odsState.addOperands(lhs);
4489 odsState.addOperands(rhs);
4490 odsState.addTypes(result);
4491}
4492
4493void BVURemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
4494 odsState.addOperands(lhs);
4495 odsState.addOperands(rhs);
4496
4497 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4498 if (::mlir::succeeded(BVURemOp::inferReturnTypes(odsBuilder.getContext(),
4499 odsState.location, odsState.operands,
4500 odsState.attributes.getDictionary(odsState.getContext()),
4501 odsState.getRawProperties(),
4502 odsState.regions, inferredReturnTypes)))
4503 odsState.addTypes(inferredReturnTypes);
4504 else
4505 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4506
4507}
4508
4509void BVURemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4510 odsState.addOperands(lhs);
4511 odsState.addOperands(rhs);
4512 assert(resultTypes.size() == 1u && "mismatched number of results");
4513 odsState.addTypes(resultTypes);
4514}
4515
4516void BVURemOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4517 assert(operands.size() == 2u && "mismatched number of parameters");
4518 odsState.addOperands(operands);
4519 odsState.addAttributes(attributes);
4520 assert(resultTypes.size() == 1u && "mismatched number of return types");
4521 odsState.addTypes(resultTypes);
4522}
4523
4524void BVURemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4525 assert(operands.size() == 2u && "mismatched number of parameters");
4526 odsState.addOperands(operands);
4527 odsState.addAttributes(attributes);
4528
4529 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4530 if (::mlir::succeeded(BVURemOp::inferReturnTypes(odsBuilder.getContext(),
4531 odsState.location, operands,
4532 odsState.attributes.getDictionary(odsState.getContext()),
4533 odsState.getRawProperties(),
4534 odsState.regions, inferredReturnTypes))) {
4535 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4536 odsState.addTypes(inferredReturnTypes);
4537 } else {
4538 ::llvm::report_fatal_error("Failed to infer result type(s).");
4539 }
4540}
4541
4542::llvm::LogicalResult BVURemOp::verifyInvariantsImpl() {
4543 {
4544 unsigned index = 0; (void)index;
4545 auto valueGroup0 = getODSOperands(0);
4546
4547 for (auto v : valueGroup0) {
4548 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4549 return ::mlir::failure();
4550 }
4551 auto valueGroup1 = getODSOperands(1);
4552
4553 for (auto v : valueGroup1) {
4554 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4555 return ::mlir::failure();
4556 }
4557 }
4558 {
4559 unsigned index = 0; (void)index;
4560 auto valueGroup0 = getODSResults(0);
4561
4562 for (auto v : valueGroup0) {
4563 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
4564 return ::mlir::failure();
4565 }
4566 }
4567 return ::mlir::success();
4568}
4569
4570::llvm::LogicalResult BVURemOp::verifyInvariants() {
4571 return verifyInvariantsImpl();
4572}
4573
4574::llvm::LogicalResult BVURemOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
4575 inferredReturnTypes.resize(1);
4576 ::mlir::Builder odsBuilder(context);
4577 if (operands.size() <= 0)
4578 return ::mlir::failure();
4579 ::mlir::Type odsInferredType0 = operands[0].getType();
4580 inferredReturnTypes[0] = odsInferredType0;
4581 return ::mlir::success();
4582}
4583
4584::mlir::ParseResult BVURemOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4585 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4586 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4587 (void)lhsOperandsLoc;
4588 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4589 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4590 (void)rhsOperandsLoc;
4591 ::mlir::Type resultRawType{};
4592 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
4593
4594 lhsOperandsLoc = parser.getCurrentLocation();
4595 if (parser.parseOperand(lhsRawOperand))
4596 return ::mlir::failure();
4597 if (parser.parseComma())
4598 return ::mlir::failure();
4599
4600 rhsOperandsLoc = parser.getCurrentLocation();
4601 if (parser.parseOperand(rhsRawOperand))
4602 return ::mlir::failure();
4603 {
4604 auto loc = parser.getCurrentLocation();(void)loc;
4605 if (parser.parseOptionalAttrDict(result.attributes))
4606 return ::mlir::failure();
4607 }
4608 if (parser.parseColon())
4609 return ::mlir::failure();
4610
4611 if (parser.parseType(resultRawType))
4612 return ::mlir::failure();
4613 result.addTypes(resultTypes);
4614 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
4615 return ::mlir::failure();
4616 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
4617 return ::mlir::failure();
4618 return ::mlir::success();
4619}
4620
4621void BVURemOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4622 _odsPrinter << ' ';
4623 _odsPrinter << getLhs();
4624 _odsPrinter << ",";
4625 _odsPrinter << ' ';
4626 _odsPrinter << getRhs();
4627 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4628 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4629 _odsPrinter << ' ' << ":";
4630 _odsPrinter << ' ';
4631 _odsPrinter << getResult().getType();
4632}
4633
4634void BVURemOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4635}
4636
4637} // namespace smt
4638} // namespace llzk
4639MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVURemOp)
4640
4641namespace llzk {
4642namespace smt {
4643
4644//===----------------------------------------------------------------------===//
4645// ::llzk::smt::BVXOrOp definitions
4646//===----------------------------------------------------------------------===//
4647
4648namespace detail {
4649} // namespace detail
4651
4652::llvm::LogicalResult BVXOrOpAdaptor::verify(::mlir::Location loc) {
4653 return ::mlir::success();
4654}
4655
4656void BVXOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4657 odsState.addOperands(lhs);
4658 odsState.addOperands(rhs);
4659 odsState.addTypes(result);
4660}
4661
4662void BVXOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
4663 odsState.addOperands(lhs);
4664 odsState.addOperands(rhs);
4665
4666 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4667 if (::mlir::succeeded(BVXOrOp::inferReturnTypes(odsBuilder.getContext(),
4668 odsState.location, odsState.operands,
4669 odsState.attributes.getDictionary(odsState.getContext()),
4670 odsState.getRawProperties(),
4671 odsState.regions, inferredReturnTypes)))
4672 odsState.addTypes(inferredReturnTypes);
4673 else
4674 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4675
4676}
4677
4678void BVXOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4679 odsState.addOperands(lhs);
4680 odsState.addOperands(rhs);
4681 assert(resultTypes.size() == 1u && "mismatched number of results");
4682 odsState.addTypes(resultTypes);
4683}
4684
4685void BVXOrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4686 assert(operands.size() == 2u && "mismatched number of parameters");
4687 odsState.addOperands(operands);
4688 odsState.addAttributes(attributes);
4689 assert(resultTypes.size() == 1u && "mismatched number of return types");
4690 odsState.addTypes(resultTypes);
4691}
4692
4693void BVXOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4694 assert(operands.size() == 2u && "mismatched number of parameters");
4695 odsState.addOperands(operands);
4696 odsState.addAttributes(attributes);
4697
4698 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4699 if (::mlir::succeeded(BVXOrOp::inferReturnTypes(odsBuilder.getContext(),
4700 odsState.location, operands,
4701 odsState.attributes.getDictionary(odsState.getContext()),
4702 odsState.getRawProperties(),
4703 odsState.regions, inferredReturnTypes))) {
4704 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4705 odsState.addTypes(inferredReturnTypes);
4706 } else {
4707 ::llvm::report_fatal_error("Failed to infer result type(s).");
4708 }
4709}
4710
4711::llvm::LogicalResult BVXOrOp::verifyInvariantsImpl() {
4712 {
4713 unsigned index = 0; (void)index;
4714 auto valueGroup0 = getODSOperands(0);
4715
4716 for (auto v : valueGroup0) {
4717 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4718 return ::mlir::failure();
4719 }
4720 auto valueGroup1 = getODSOperands(1);
4721
4722 for (auto v : valueGroup1) {
4723 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4724 return ::mlir::failure();
4725 }
4726 }
4727 {
4728 unsigned index = 0; (void)index;
4729 auto valueGroup0 = getODSResults(0);
4730
4731 for (auto v : valueGroup0) {
4732 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
4733 return ::mlir::failure();
4734 }
4735 }
4736 return ::mlir::success();
4737}
4738
4739::llvm::LogicalResult BVXOrOp::verifyInvariants() {
4740 return verifyInvariantsImpl();
4741}
4742
4743::llvm::LogicalResult BVXOrOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
4744 inferredReturnTypes.resize(1);
4745 ::mlir::Builder odsBuilder(context);
4746 if (operands.size() <= 0)
4747 return ::mlir::failure();
4748 ::mlir::Type odsInferredType0 = operands[0].getType();
4749 inferredReturnTypes[0] = odsInferredType0;
4750 return ::mlir::success();
4751}
4752
4753::mlir::ParseResult BVXOrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4754 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4755 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4756 (void)lhsOperandsLoc;
4757 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4758 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4759 (void)rhsOperandsLoc;
4760 ::mlir::Type resultRawType{};
4761 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
4762
4763 lhsOperandsLoc = parser.getCurrentLocation();
4764 if (parser.parseOperand(lhsRawOperand))
4765 return ::mlir::failure();
4766 if (parser.parseComma())
4767 return ::mlir::failure();
4768
4769 rhsOperandsLoc = parser.getCurrentLocation();
4770 if (parser.parseOperand(rhsRawOperand))
4771 return ::mlir::failure();
4772 {
4773 auto loc = parser.getCurrentLocation();(void)loc;
4774 if (parser.parseOptionalAttrDict(result.attributes))
4775 return ::mlir::failure();
4776 }
4777 if (parser.parseColon())
4778 return ::mlir::failure();
4779
4780 if (parser.parseType(resultRawType))
4781 return ::mlir::failure();
4782 result.addTypes(resultTypes);
4783 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
4784 return ::mlir::failure();
4785 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
4786 return ::mlir::failure();
4787 return ::mlir::success();
4788}
4789
4790void BVXOrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4791 _odsPrinter << ' ';
4792 _odsPrinter << getLhs();
4793 _odsPrinter << ",";
4794 _odsPrinter << ' ';
4795 _odsPrinter << getRhs();
4796 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4797 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4798 _odsPrinter << ' ' << ":";
4799 _odsPrinter << ' ';
4800 _odsPrinter << getResult().getType();
4801}
4802
4803void BVXOrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4804}
4805
4806} // namespace smt
4807} // namespace llzk
4808MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVXOrOp)
4809
4810namespace llzk {
4811namespace smt {
4812
4813//===----------------------------------------------------------------------===//
4814// ::llzk::smt::BoolConstantOp definitions
4815//===----------------------------------------------------------------------===//
4816
4817namespace detail {
4819
4821 auto attr = getValueAttr();
4822 return attr.getValue();
4823}
4824
4825} // namespace detail
4827
4828::llvm::LogicalResult BoolConstantOpAdaptor::verify(::mlir::Location loc) {
4829 auto tblgen_value = getProperties().value; (void)tblgen_value;
4830 if (!tblgen_value) return emitError(loc, "'smt.constant' op ""requires attribute 'value'");
4831
4832 if (tblgen_value && !((::llvm::isa<::mlir::BoolAttr>(tblgen_value))))
4833 return emitError(loc, "'smt.constant' op ""attribute 'value' failed to satisfy constraint: bool attribute");
4834 return ::mlir::success();
4835}
4836
4837::llvm::LogicalResult BoolConstantOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4838 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
4839 if (!dict) {
4840 emitError() << "expected DictionaryAttr to set properties";
4841 return ::mlir::failure();
4842 }
4843
4844 {
4845 auto &propStorage = prop.value;
4846 auto attr = dict.get("value");
4847 if (attr) {
4848 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
4849 if (convertedAttr) {
4850 propStorage = convertedAttr;
4851 } else {
4852 emitError() << "Invalid attribute `value` in property conversion: " << attr;
4853 return ::mlir::failure();
4854 }
4855 }
4856 }
4857 return ::mlir::success();
4858}
4859
4860::mlir::Attribute BoolConstantOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4861 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4862 ::mlir::Builder odsBuilder{ctx};
4863
4864 {
4865 const auto &propStorage = prop.value;
4866 if (propStorage)
4867 attrs.push_back(odsBuilder.getNamedAttr("value",
4868 propStorage));
4869 }
4870
4871 if (!attrs.empty())
4872 return odsBuilder.getDictionaryAttr(attrs);
4873 return {};
4874}
4875
4877 return llvm::hash_combine(
4878 llvm::hash_value(prop.value.getAsOpaquePointer()));
4879}
4880
4881std::optional<mlir::Attribute> BoolConstantOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4882 if (name == "value")
4883 return prop.value;
4884 return std::nullopt;
4885}
4886
4887void BoolConstantOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4888 if (name == "value") {
4889 prop.value = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.value)>>(value);
4890 return;
4891 }
4892}
4893
4894void BoolConstantOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
4895 if (prop.value) attrs.append("value", prop.value);
4896}
4897
4898::llvm::LogicalResult BoolConstantOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4899 {
4900 ::mlir::Attribute attr = attrs.get(getValueAttrName(opName));
4901 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT4(attr, "value", emitError)))
4902 return ::mlir::failure();
4903 }
4904 return ::mlir::success();
4905}
4906
4907::llvm::LogicalResult BoolConstantOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
4908 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
4909 if (::mlir::failed(reader.readAttribute(prop.value)))
4910 return ::mlir::failure();
4911 return ::mlir::success();
4912}
4913
4914void BoolConstantOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
4915 auto &prop = getProperties(); (void)prop;
4916 writer.writeAttribute(prop.value);
4917}
4918
4920 auto attr = getValueAttr();
4921 return attr.getValue();
4922}
4923
4924void BoolConstantOp::setValue(bool attrValue) {
4925 getProperties().value = ::mlir::Builder((*this)->getContext()).getBoolAttr(attrValue);
4926}
4927
4928void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::BoolAttr value) {
4929 odsState.getOrAddProperties<Properties>().value = value;
4930 odsState.addTypes(result);
4931}
4932
4933void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::BoolAttr value) {
4934 odsState.getOrAddProperties<Properties>().value = value;
4935
4936 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4937 if (::mlir::succeeded(BoolConstantOp::inferReturnTypes(odsBuilder.getContext(),
4938 odsState.location, odsState.operands,
4939 odsState.attributes.getDictionary(odsState.getContext()),
4940 odsState.getRawProperties(),
4941 odsState.regions, inferredReturnTypes)))
4942 odsState.addTypes(inferredReturnTypes);
4943 else
4944 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4945
4946}
4947
4948void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::BoolAttr value) {
4949 odsState.getOrAddProperties<Properties>().value = value;
4950 assert(resultTypes.size() == 1u && "mismatched number of results");
4951 odsState.addTypes(resultTypes);
4952}
4953
4954void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, bool value) {
4955 odsState.getOrAddProperties<Properties>().value = odsBuilder.getBoolAttr(value);
4956 odsState.addTypes(result);
4957}
4958
4959void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, bool value) {
4960 odsState.getOrAddProperties<Properties>().value = odsBuilder.getBoolAttr(value);
4961
4962 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4963 if (::mlir::succeeded(BoolConstantOp::inferReturnTypes(odsBuilder.getContext(),
4964 odsState.location, odsState.operands,
4965 odsState.attributes.getDictionary(odsState.getContext()),
4966 odsState.getRawProperties(),
4967 odsState.regions, inferredReturnTypes)))
4968 odsState.addTypes(inferredReturnTypes);
4969 else
4970 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4971
4972}
4973
4974void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool value) {
4975 odsState.getOrAddProperties<Properties>().value = odsBuilder.getBoolAttr(value);
4976 assert(resultTypes.size() == 1u && "mismatched number of results");
4977 odsState.addTypes(resultTypes);
4978}
4979
4980void BoolConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4981 assert(operands.size() == 0u && "mismatched number of parameters");
4982 odsState.addOperands(operands);
4983 odsState.addAttributes(attributes);
4984 assert(resultTypes.size() == 1u && "mismatched number of return types");
4985 odsState.addTypes(resultTypes);
4986
4987 if (!attributes.empty()) {
4988 ::mlir::OpaqueProperties properties =
4989 &odsState.getOrAddProperties<BoolConstantOp::Properties>();
4990 std::optional<::mlir::RegisteredOperationName> info =
4991 odsState.name.getRegisteredInfo();
4992 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
4993 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
4994 ::llvm::report_fatal_error("Property conversion failed.");
4995 }
4996}
4997
4998void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4999 assert(operands.size() == 0u && "mismatched number of parameters");
5000 odsState.addOperands(operands);
5001 odsState.addAttributes(attributes);
5002
5003 if (!attributes.empty()) {
5004 ::mlir::OpaqueProperties properties =
5005 &odsState.getOrAddProperties<BoolConstantOp::Properties>();
5006 std::optional<::mlir::RegisteredOperationName> info =
5007 odsState.name.getRegisteredInfo();
5008 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
5009 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
5010 ::llvm::report_fatal_error("Property conversion failed.");
5011 }
5012 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5013 if (::mlir::succeeded(BoolConstantOp::inferReturnTypes(odsBuilder.getContext(),
5014 odsState.location, operands,
5015 odsState.attributes.getDictionary(odsState.getContext()),
5016 odsState.getRawProperties(),
5017 odsState.regions, inferredReturnTypes))) {
5018 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
5019 odsState.addTypes(inferredReturnTypes);
5020 } else {
5021 ::llvm::report_fatal_error("Failed to infer result type(s).");
5022 }
5023}
5024
5026 auto tblgen_value = getProperties().value; (void)tblgen_value;
5027 if (!tblgen_value) return emitOpError("requires attribute 'value'");
5028
5029 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT4(*this, tblgen_value, "value")))
5030 return ::mlir::failure();
5031 {
5032 unsigned index = 0; (void)index;
5033 auto valueGroup0 = getODSResults(0);
5034
5035 for (auto v : valueGroup0) {
5036 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
5037 return ::mlir::failure();
5038 }
5039 }
5040 return ::mlir::success();
5041}
5042
5043::llvm::LogicalResult BoolConstantOp::verifyInvariants() {
5044 return verifyInvariantsImpl();
5045}
5046
5047::llvm::LogicalResult BoolConstantOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
5048 inferredReturnTypes.resize(1);
5049 ::mlir::Builder odsBuilder(context);
5050 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
5051 inferredReturnTypes[0] = odsInferredType0;
5052 return ::mlir::success();
5053}
5054
5055::mlir::ParseResult BoolConstantOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5056 ::mlir::BoolAttr valueAttr;
5057
5058 if (parser.parseCustomAttributeWithFallback(valueAttr, parser.getBuilder().getIntegerType(1))) {
5059 return ::mlir::failure();
5060 }
5061 if (valueAttr) result.getOrAddProperties<BoolConstantOp::Properties>().value = valueAttr;
5062 {
5063 auto loc = parser.getCurrentLocation();(void)loc;
5064 if (parser.parseOptionalAttrDict(result.attributes))
5065 return ::mlir::failure();
5066 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
5067 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
5068 })))
5069 return ::mlir::failure();
5070 }
5071 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
5072 result.addTypes(odsBuildableType0);
5073 return ::mlir::success();
5074}
5075
5076void BoolConstantOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
5077 _odsPrinter << ' ';
5078 _odsPrinter.printAttributeWithoutType(getValueAttr());
5079 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5080 elidedAttrs.push_back("value");
5081 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5082}
5083
5084void BoolConstantOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5085}
5086
5087} // namespace smt
5088} // namespace llzk
5089MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BoolConstantOp)
5090
5091namespace llzk {
5092namespace smt {
5093
5094//===----------------------------------------------------------------------===//
5095// ::llzk::smt::CheckOp definitions
5096//===----------------------------------------------------------------------===//
5097
5098namespace detail {
5099} // namespace detail
5101
5102::llvm::LogicalResult CheckOpAdaptor::verify(::mlir::Location loc) {
5103 return ::mlir::success();
5104}
5105
5106std::pair<unsigned, unsigned> CheckOp::getODSResultIndexAndLength(unsigned index) {
5107 bool isVariadic[] = {true};
5108 int prevVariadicCount = 0;
5109 for (unsigned i = 0; i < index; ++i)
5110 if (isVariadic[i]) ++prevVariadicCount;
5111
5112 // Calculate how many dynamic values a static variadic operand corresponds to.
5113 // This assumes all static variadic operands have the same dynamic value count.
5114 int variadicSize = (getOperation()->getNumResults() - 0) / 1;
5115 // `index` passed in as the parameter is the static index which counts each
5116 // operand (variadic or not) as size 1. So here for each previous static variadic
5117 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5118 // value pack for this static operand starts.
5119 int start = index + (variadicSize - 1) * prevVariadicCount;
5120 int size = isVariadic[index] ? variadicSize : 1;
5121 return {start, size};
5122}
5123
5124void CheckOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange results) {
5125 (void)odsState.addRegion();
5126 (void)odsState.addRegion();
5127 (void)odsState.addRegion();
5128 odsState.addTypes(results);
5129}
5130
5131void CheckOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5132 assert(operands.size() == 0u && "mismatched number of parameters");
5133 odsState.addOperands(operands);
5134 odsState.addAttributes(attributes);
5135 for (unsigned i = 0; i != 3; ++i)
5136 (void)odsState.addRegion();
5137 odsState.addTypes(resultTypes);
5138}
5139
5140::llvm::LogicalResult CheckOp::verifyInvariantsImpl() {
5141 {
5142 unsigned index = 0; (void)index;
5143 auto valueGroup0 = getODSResults(0);
5144
5145 for (auto v : valueGroup0) {
5146 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT10(*this, v.getType(), "result", index++)))
5147 return ::mlir::failure();
5148 }
5149 }
5150 {
5151 unsigned index = 0; (void)index;
5152
5153 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
5154 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "satRegion", index++)))
5155 return ::mlir::failure();
5156
5157 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(1)))
5158 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "unknownRegion", index++)))
5159 return ::mlir::failure();
5160
5161 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(2)))
5162 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "unsatRegion", index++)))
5163 return ::mlir::failure();
5164 }
5165 return ::mlir::success();
5166}
5167
5168::llvm::LogicalResult CheckOp::verifyInvariants() {
5169 return verifyInvariantsImpl();
5170}
5171
5172::mlir::ParseResult CheckOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5173 std::unique_ptr<::mlir::Region> satRegionRegion = std::make_unique<::mlir::Region>();
5174 std::unique_ptr<::mlir::Region> unknownRegionRegion = std::make_unique<::mlir::Region>();
5175 std::unique_ptr<::mlir::Region> unsatRegionRegion = std::make_unique<::mlir::Region>();
5176 ::llvm::SmallVector<::mlir::Type, 1> resultsTypes;
5177 {
5178 auto loc = parser.getCurrentLocation();(void)loc;
5179 if (parser.parseOptionalAttrDict(result.attributes))
5180 return ::mlir::failure();
5181 }
5182 if (parser.parseKeyword("sat"))
5183 return ::mlir::failure();
5184
5185 if (parser.parseRegion(*satRegionRegion))
5186 return ::mlir::failure();
5187
5188 ensureTerminator(*satRegionRegion, parser.getBuilder(), result.location);
5189 if (parser.parseKeyword("unknown"))
5190 return ::mlir::failure();
5191
5192 if (parser.parseRegion(*unknownRegionRegion))
5193 return ::mlir::failure();
5194
5195 ensureTerminator(*unknownRegionRegion, parser.getBuilder(), result.location);
5196 if (parser.parseKeyword("unsat"))
5197 return ::mlir::failure();
5198
5199 if (parser.parseRegion(*unsatRegionRegion))
5200 return ::mlir::failure();
5201
5202 ensureTerminator(*unsatRegionRegion, parser.getBuilder(), result.location);
5203 if (::mlir::succeeded(parser.parseOptionalArrow())) {
5204
5205 if (parser.parseTypeList(resultsTypes))
5206 return ::mlir::failure();
5207 }
5208 result.addRegion(std::move(satRegionRegion));
5209 result.addRegion(std::move(unknownRegionRegion));
5210 result.addRegion(std::move(unsatRegionRegion));
5211 result.addTypes(resultsTypes);
5212 return ::mlir::success();
5213}
5214
5215void CheckOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
5216 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5217 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5218 _odsPrinter << ' ' << "sat";
5219 _odsPrinter << ' ';
5220
5221 {
5222 bool printTerminator = true;
5223 if (auto *term = getSatRegion().empty() ? nullptr : getSatRegion().begin()->getTerminator()) {
5224 printTerminator = !term->getAttrDictionary().empty() ||
5225 term->getNumOperands() != 0 ||
5226 term->getNumResults() != 0;
5227 }
5228 _odsPrinter.printRegion(getSatRegion(), /*printEntryBlockArgs=*/true,
5229 /*printBlockTerminators=*/printTerminator);
5230 }
5231 _odsPrinter << ' ' << "unknown";
5232 _odsPrinter << ' ';
5233
5234 {
5235 bool printTerminator = true;
5236 if (auto *term = getUnknownRegion().empty() ? nullptr : getUnknownRegion().begin()->getTerminator()) {
5237 printTerminator = !term->getAttrDictionary().empty() ||
5238 term->getNumOperands() != 0 ||
5239 term->getNumResults() != 0;
5240 }
5241 _odsPrinter.printRegion(getUnknownRegion(), /*printEntryBlockArgs=*/true,
5242 /*printBlockTerminators=*/printTerminator);
5243 }
5244 _odsPrinter << ' ' << "unsat";
5245 _odsPrinter << ' ';
5246
5247 {
5248 bool printTerminator = true;
5249 if (auto *term = getUnsatRegion().empty() ? nullptr : getUnsatRegion().begin()->getTerminator()) {
5250 printTerminator = !term->getAttrDictionary().empty() ||
5251 term->getNumOperands() != 0 ||
5252 term->getNumResults() != 0;
5253 }
5254 _odsPrinter.printRegion(getUnsatRegion(), /*printEntryBlockArgs=*/true,
5255 /*printBlockTerminators=*/printTerminator);
5256 }
5257 if (!getResults().empty()) {
5258 _odsPrinter << ' ' << "->";
5259 _odsPrinter << ' ';
5260 _odsPrinter << getResults().getTypes();
5261 }
5262}
5263
5264} // namespace smt
5265} // namespace llzk
5266MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::CheckOp)
5267
5268namespace llzk {
5269namespace smt {
5270
5271//===----------------------------------------------------------------------===//
5272// ::llzk::smt::ConcatOp definitions
5273//===----------------------------------------------------------------------===//
5274
5275namespace detail {
5276} // namespace detail
5278
5279::llvm::LogicalResult ConcatOpAdaptor::verify(::mlir::Location loc) {
5280 return ::mlir::success();
5281}
5282
5283void ConcatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
5284 odsState.addOperands(lhs);
5285 odsState.addOperands(rhs);
5286 odsState.addTypes(result);
5287}
5288
5289void ConcatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
5290 odsState.addOperands(lhs);
5291 odsState.addOperands(rhs);
5292
5293 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5294 if (::mlir::succeeded(ConcatOp::inferReturnTypes(odsBuilder.getContext(),
5295 odsState.location, odsState.operands,
5296 odsState.attributes.getDictionary(odsState.getContext()),
5297 odsState.getRawProperties(),
5298 odsState.regions, inferredReturnTypes)))
5299 odsState.addTypes(inferredReturnTypes);
5300 else
5301 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
5302
5303}
5304
5305void ConcatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
5306 odsState.addOperands(lhs);
5307 odsState.addOperands(rhs);
5308 assert(resultTypes.size() == 1u && "mismatched number of results");
5309 odsState.addTypes(resultTypes);
5310}
5311
5312void ConcatOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5313 assert(operands.size() == 2u && "mismatched number of parameters");
5314 odsState.addOperands(operands);
5315 odsState.addAttributes(attributes);
5316 assert(resultTypes.size() == 1u && "mismatched number of return types");
5317 odsState.addTypes(resultTypes);
5318}
5319
5320void ConcatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5321 assert(operands.size() == 2u && "mismatched number of parameters");
5322 odsState.addOperands(operands);
5323 odsState.addAttributes(attributes);
5324
5325 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5326 if (::mlir::succeeded(ConcatOp::inferReturnTypes(odsBuilder.getContext(),
5327 odsState.location, operands,
5328 odsState.attributes.getDictionary(odsState.getContext()),
5329 odsState.getRawProperties(),
5330 odsState.regions, inferredReturnTypes))) {
5331 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
5332 odsState.addTypes(inferredReturnTypes);
5333 } else {
5334 ::llvm::report_fatal_error("Failed to infer result type(s).");
5335 }
5336}
5337
5338::llvm::LogicalResult ConcatOp::verifyInvariantsImpl() {
5339 {
5340 unsigned index = 0; (void)index;
5341 auto valueGroup0 = getODSOperands(0);
5342
5343 for (auto v : valueGroup0) {
5344 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
5345 return ::mlir::failure();
5346 }
5347 auto valueGroup1 = getODSOperands(1);
5348
5349 for (auto v : valueGroup1) {
5350 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
5351 return ::mlir::failure();
5352 }
5353 }
5354 {
5355 unsigned index = 0; (void)index;
5356 auto valueGroup0 = getODSResults(0);
5357
5358 for (auto v : valueGroup0) {
5359 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
5360 return ::mlir::failure();
5361 }
5362 }
5363 return ::mlir::success();
5364}
5365
5366::llvm::LogicalResult ConcatOp::verifyInvariants() {
5367 return verifyInvariantsImpl();
5368}
5369
5370::mlir::ParseResult ConcatOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5371 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
5372 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
5373 (void)lhsOperandsLoc;
5374 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
5375 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
5376 (void)rhsOperandsLoc;
5377 ::llvm::SmallVector<::mlir::Type, 1> allOperandTypes;
5378
5379 lhsOperandsLoc = parser.getCurrentLocation();
5380 if (parser.parseOperand(lhsRawOperand))
5381 return ::mlir::failure();
5382 if (parser.parseComma())
5383 return ::mlir::failure();
5384
5385 rhsOperandsLoc = parser.getCurrentLocation();
5386 if (parser.parseOperand(rhsRawOperand))
5387 return ::mlir::failure();
5388 {
5389 auto loc = parser.getCurrentLocation();(void)loc;
5390 if (parser.parseOptionalAttrDict(result.attributes))
5391 return ::mlir::failure();
5392 }
5393 if (parser.parseColon())
5394 return ::mlir::failure();
5395
5396 if (parser.parseTypeList(allOperandTypes))
5397 return ::mlir::failure();
5398 if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(lhsOperands, rhsOperands), allOperandTypes, parser.getNameLoc(), result.operands))
5399 return ::mlir::failure();
5400
5401 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
5402 if (::mlir::failed(ConcatOp::inferReturnTypes(parser.getContext(),
5403 result.location, result.operands,
5404 result.attributes.getDictionary(parser.getContext()),
5405 result.getRawProperties(),
5406 result.regions, inferredReturnTypes)))
5407 return ::mlir::failure();
5408 result.addTypes(inferredReturnTypes);
5409 return ::mlir::success();
5410}
5411
5412void ConcatOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
5413 _odsPrinter << ' ';
5414 _odsPrinter << getLhs();
5415 _odsPrinter << ",";
5416 _odsPrinter << ' ';
5417 _odsPrinter << getRhs();
5418 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5419 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5420 _odsPrinter << ' ' << ":";
5421 _odsPrinter << ' ';
5422 _odsPrinter << getOperation()->getOperandTypes();
5423}
5424
5425void ConcatOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5426}
5427
5428} // namespace smt
5429} // namespace llzk
5430MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ConcatOp)
5431
5432namespace llzk {
5433namespace smt {
5434
5435//===----------------------------------------------------------------------===//
5436// ::llzk::smt::DeclareFunOp definitions
5437//===----------------------------------------------------------------------===//
5438
5439namespace detail {
5440DeclareFunOpGenericAdaptorBase::DeclareFunOpGenericAdaptorBase(DeclareFunOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
5441
5442::std::optional< ::llvm::StringRef > DeclareFunOpGenericAdaptorBase::getNamePrefix() {
5443 auto attr = getNamePrefixAttr();
5444 return attr ? ::std::optional< ::llvm::StringRef >(attr.getValue()) : (::std::nullopt);
5445}
5446
5447} // namespace detail
5449
5450::llvm::LogicalResult DeclareFunOpAdaptor::verify(::mlir::Location loc) {
5451 auto tblgen_namePrefix = getProperties().namePrefix; (void)tblgen_namePrefix;
5452
5453 if (tblgen_namePrefix && !((::llvm::isa<::mlir::StringAttr>(tblgen_namePrefix))))
5454 return emitError(loc, "'smt.declare_fun' op ""attribute 'namePrefix' failed to satisfy constraint: string attribute");
5455 return ::mlir::success();
5456}
5457
5458::llvm::LogicalResult DeclareFunOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5459 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
5460 if (!dict) {
5461 emitError() << "expected DictionaryAttr to set properties";
5462 return ::mlir::failure();
5463 }
5464
5465 {
5466 auto &propStorage = prop.namePrefix;
5467 auto attr = dict.get("namePrefix");
5468 if (attr) {
5469 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
5470 if (convertedAttr) {
5471 propStorage = convertedAttr;
5472 } else {
5473 emitError() << "Invalid attribute `namePrefix` in property conversion: " << attr;
5474 return ::mlir::failure();
5475 }
5476 }
5477 }
5478 return ::mlir::success();
5479}
5480
5481::mlir::Attribute DeclareFunOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
5482 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5483 ::mlir::Builder odsBuilder{ctx};
5484
5485 {
5486 const auto &propStorage = prop.namePrefix;
5487 if (propStorage)
5488 attrs.push_back(odsBuilder.getNamedAttr("namePrefix",
5489 propStorage));
5490 }
5491
5492 if (!attrs.empty())
5493 return odsBuilder.getDictionaryAttr(attrs);
5494 return {};
5495}
5496
5498 return llvm::hash_combine(
5499 llvm::hash_value(prop.namePrefix.getAsOpaquePointer()));
5500}
5501
5502std::optional<mlir::Attribute> DeclareFunOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
5503 if (name == "namePrefix")
5504 return prop.namePrefix;
5505 return std::nullopt;
5506}
5507
5508void DeclareFunOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
5509 if (name == "namePrefix") {
5510 prop.namePrefix = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.namePrefix)>>(value);
5511 return;
5512 }
5513}
5514
5515void DeclareFunOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
5516 if (prop.namePrefix) attrs.append("namePrefix", prop.namePrefix);
5517}
5518
5519::llvm::LogicalResult DeclareFunOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5520 {
5521 ::mlir::Attribute attr = attrs.get(getNamePrefixAttrName(opName));
5522 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT5(attr, "namePrefix", emitError)))
5523 return ::mlir::failure();
5524 }
5525 return ::mlir::success();
5526}
5527
5528::llvm::LogicalResult DeclareFunOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
5529 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
5530 if (::mlir::failed(reader.readOptionalAttribute(prop.namePrefix)))
5531 return ::mlir::failure();
5532 return ::mlir::success();
5533}
5534
5535void DeclareFunOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
5536 auto &prop = getProperties(); (void)prop;
5537
5538 writer.writeOptionalAttribute(prop.namePrefix);
5539}
5540
5541::std::optional< ::llvm::StringRef > DeclareFunOp::getNamePrefix() {
5542 auto attr = getNamePrefixAttr();
5543 return attr ? ::std::optional< ::llvm::StringRef >(attr.getValue()) : (::std::nullopt);
5544}
5545
5546void DeclareFunOp::setNamePrefix(::std::optional<::llvm::StringRef> attrValue) {
5547 auto &odsProp = getProperties().namePrefix;
5548 if (attrValue)
5549 odsProp = ::mlir::Builder((*this)->getContext()).getStringAttr(*attrValue);
5550 else
5551 odsProp = nullptr;
5552}
5553
5554void DeclareFunOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Type type) {
5555 build(odsBuilder, odsState, type, nullptr);
5556
5557}
5558
5559void DeclareFunOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, /*optional*/::mlir::StringAttr namePrefix) {
5560 if (namePrefix) {
5561 odsState.getOrAddProperties<Properties>().namePrefix = namePrefix;
5562 }
5563 odsState.addTypes(result);
5564}
5565
5566void DeclareFunOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::StringAttr namePrefix) {
5567 if (namePrefix) {
5568 odsState.getOrAddProperties<Properties>().namePrefix = namePrefix;
5569 }
5570 assert(resultTypes.size() == 1u && "mismatched number of results");
5571 odsState.addTypes(resultTypes);
5572}
5573
5574void DeclareFunOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5575 assert(operands.size() == 0u && "mismatched number of parameters");
5576 odsState.addOperands(operands);
5577 odsState.addAttributes(attributes);
5578 assert(resultTypes.size() == 1u && "mismatched number of return types");
5579 odsState.addTypes(resultTypes);
5580
5581 if (!attributes.empty()) {
5582 ::mlir::OpaqueProperties properties =
5583 &odsState.getOrAddProperties<DeclareFunOp::Properties>();
5584 std::optional<::mlir::RegisteredOperationName> info =
5585 odsState.name.getRegisteredInfo();
5586 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
5587 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
5588 ::llvm::report_fatal_error("Property conversion failed.");
5589 }
5590}
5591
5592::llvm::LogicalResult DeclareFunOp::verifyInvariantsImpl() {
5593 auto tblgen_namePrefix = getProperties().namePrefix; (void)tblgen_namePrefix;
5594
5595 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT5(*this, tblgen_namePrefix, "namePrefix")))
5596 return ::mlir::failure();
5597 {
5598 unsigned index = 0; (void)index;
5599 auto valueGroup0 = getODSResults(0);
5600
5601 for (auto v : valueGroup0) {
5602 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "result", index++)))
5603 return ::mlir::failure();
5604 }
5605 }
5606 return ::mlir::success();
5607}
5608
5609::llvm::LogicalResult DeclareFunOp::verifyInvariants() {
5610 return verifyInvariantsImpl();
5611}
5612
5613::mlir::ParseResult DeclareFunOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5614 ::mlir::StringAttr namePrefixAttr;
5615 ::mlir::Type resultRawType{};
5616 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
5617
5618 ::mlir::OptionalParseResult parseResultnamePrefixAttr =
5619 parser.parseOptionalAttribute(namePrefixAttr, parser.getBuilder().getType<::mlir::NoneType>());
5620 if (parseResultnamePrefixAttr.has_value() && failed(*parseResultnamePrefixAttr))
5621 return ::mlir::failure();
5622 if (parseResultnamePrefixAttr.has_value() && succeeded(*parseResultnamePrefixAttr))
5623 if (namePrefixAttr) result.getOrAddProperties<DeclareFunOp::Properties>().namePrefix = namePrefixAttr;
5624 if (namePrefixAttr) {
5625 }
5626 {
5627 auto loc = parser.getCurrentLocation();(void)loc;
5628 if (parser.parseOptionalAttrDict(result.attributes))
5629 return ::mlir::failure();
5630 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
5631 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
5632 })))
5633 return ::mlir::failure();
5634 }
5635 if (parser.parseColon())
5636 return ::mlir::failure();
5637
5638 if (parser.parseType(resultRawType))
5639 return ::mlir::failure();
5640 result.addTypes(resultTypes);
5641 return ::mlir::success();
5642}
5643
5644void DeclareFunOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
5645 if (getNamePrefixAttr()) {
5646 _odsPrinter << ' ';
5647 _odsPrinter.printAttributeWithoutType(getNamePrefixAttr());
5648 }
5649 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5650 elidedAttrs.push_back("namePrefix");
5651 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5652 _odsPrinter << ' ' << ":";
5653 _odsPrinter << ' ';
5654 _odsPrinter << getResult().getType();
5655}
5656
5657void DeclareFunOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5658 {
5659 auto valueRange = getODSResultIndexAndLength(0);
5660 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
5661 effects.emplace_back(::mlir::MemoryEffects::Allocate::get(), getOperation()->getOpResult(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
5662 }
5663 }
5664}
5665
5666} // namespace smt
5667} // namespace llzk
5668MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::DeclareFunOp)
5669
5670namespace llzk {
5671namespace smt {
5672
5673//===----------------------------------------------------------------------===//
5674// ::llzk::smt::DistinctOp definitions
5675//===----------------------------------------------------------------------===//
5676
5677namespace detail {
5678std::pair<unsigned, unsigned> DistinctOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
5679 bool isVariadic[] = {true};
5680 int prevVariadicCount = 0;
5681 for (unsigned i = 0; i < index; ++i)
5682 if (isVariadic[i]) ++prevVariadicCount;
5683
5684 // Calculate how many dynamic values a static variadic operand corresponds to.
5685 // This assumes all static variadic operands have the same dynamic value count.
5686 int variadicSize = (odsOperandsSize - 0) / 1;
5687 // `index` passed in as the parameter is the static index which counts each
5688 // operand (variadic or not) as size 1. So here for each previous static variadic
5689 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5690 // value pack for this static operand starts.
5691 int start = index + (variadicSize - 1) * prevVariadicCount;
5692 int size = isVariadic[index] ? variadicSize : 1;
5693 return {start, size};
5694}
5695
5696} // namespace detail
5698
5699::llvm::LogicalResult DistinctOpAdaptor::verify(::mlir::Location loc) {
5700 return ::mlir::success();
5701}
5702
5703std::pair<unsigned, unsigned> DistinctOp::getODSOperandIndexAndLength(unsigned index) {
5704 bool isVariadic[] = {true};
5705 int prevVariadicCount = 0;
5706 for (unsigned i = 0; i < index; ++i)
5707 if (isVariadic[i]) ++prevVariadicCount;
5708
5709 // Calculate how many dynamic values a static variadic operand corresponds to.
5710 // This assumes all static variadic operands have the same dynamic value count.
5711 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
5712 // `index` passed in as the parameter is the static index which counts each
5713 // operand (variadic or not) as size 1. So here for each previous static variadic
5714 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5715 // value pack for this static operand starts.
5716 int start = index + (variadicSize - 1) * prevVariadicCount;
5717 int size = isVariadic[index] ? variadicSize : 1;
5718 return {start, size};
5719}
5720
5721::mlir::MutableOperandRange DistinctOp::getInputsMutable() {
5722 auto range = getODSOperandIndexAndLength(0);
5723 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
5724 return mutableRange;
5725}
5726
5727void DistinctOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs) {
5728 build(odsBuilder, odsState, mlir::ValueRange{lhs, rhs});
5729
5730}
5731
5732void DistinctOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
5733 odsState.addOperands(inputs);
5734 odsState.addTypes(result);
5735}
5736
5737void DistinctOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5738 odsState.addOperands(operands);
5739 odsState.addAttributes(attributes);
5740 assert(resultTypes.size() == 1u && "mismatched number of return types");
5741 odsState.addTypes(resultTypes);
5742}
5743
5744void DistinctOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5745 odsState.addOperands(operands);
5746 odsState.addAttributes(attributes);
5747
5748 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5749 if (::mlir::succeeded(DistinctOp::inferReturnTypes(odsBuilder.getContext(),
5750 odsState.location, operands,
5751 odsState.attributes.getDictionary(odsState.getContext()),
5752 odsState.getRawProperties(),
5753 odsState.regions, inferredReturnTypes))) {
5754 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
5755 odsState.addTypes(inferredReturnTypes);
5756 } else {
5757 ::llvm::report_fatal_error("Failed to infer result type(s).");
5758 }
5759}
5760
5761::llvm::LogicalResult DistinctOp::verifyInvariantsImpl() {
5762 {
5763 unsigned index = 0; (void)index;
5764 auto valueGroup0 = getODSOperands(0);
5765
5766 for (auto v : valueGroup0) {
5767 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT4(*this, v.getType(), "operand", index++)))
5768 return ::mlir::failure();
5769 }
5770 }
5771 {
5772 unsigned index = 0; (void)index;
5773 auto valueGroup0 = getODSResults(0);
5774
5775 for (auto v : valueGroup0) {
5776 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
5777 return ::mlir::failure();
5778 }
5779 }
5780 return ::mlir::success();
5781}
5782
5783::llvm::LogicalResult DistinctOp::verifyInvariants() {
5784 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
5785 return ::mlir::success();
5786 return ::mlir::failure();
5787}
5788
5789::llvm::LogicalResult DistinctOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
5790 inferredReturnTypes.resize(1);
5791 ::mlir::Builder odsBuilder(context);
5792 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
5793 inferredReturnTypes[0] = odsInferredType0;
5794 return ::mlir::success();
5795}
5796
5797void DistinctOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5798}
5799
5800} // namespace smt
5801} // namespace llzk
5802MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::DistinctOp)
5803
5804namespace llzk {
5805namespace smt {
5806
5807//===----------------------------------------------------------------------===//
5808// ::llzk::smt::EqOp definitions
5809//===----------------------------------------------------------------------===//
5810
5811namespace detail {
5812std::pair<unsigned, unsigned> EqOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
5813 bool isVariadic[] = {true};
5814 int prevVariadicCount = 0;
5815 for (unsigned i = 0; i < index; ++i)
5816 if (isVariadic[i]) ++prevVariadicCount;
5817
5818 // Calculate how many dynamic values a static variadic operand corresponds to.
5819 // This assumes all static variadic operands have the same dynamic value count.
5820 int variadicSize = (odsOperandsSize - 0) / 1;
5821 // `index` passed in as the parameter is the static index which counts each
5822 // operand (variadic or not) as size 1. So here for each previous static variadic
5823 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5824 // value pack for this static operand starts.
5825 int start = index + (variadicSize - 1) * prevVariadicCount;
5826 int size = isVariadic[index] ? variadicSize : 1;
5827 return {start, size};
5828}
5829
5830} // namespace detail
5832
5833::llvm::LogicalResult EqOpAdaptor::verify(::mlir::Location loc) {
5834 return ::mlir::success();
5835}
5836
5837std::pair<unsigned, unsigned> EqOp::getODSOperandIndexAndLength(unsigned index) {
5838 bool isVariadic[] = {true};
5839 int prevVariadicCount = 0;
5840 for (unsigned i = 0; i < index; ++i)
5841 if (isVariadic[i]) ++prevVariadicCount;
5842
5843 // Calculate how many dynamic values a static variadic operand corresponds to.
5844 // This assumes all static variadic operands have the same dynamic value count.
5845 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
5846 // `index` passed in as the parameter is the static index which counts each
5847 // operand (variadic or not) as size 1. So here for each previous static variadic
5848 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5849 // value pack for this static operand starts.
5850 int start = index + (variadicSize - 1) * prevVariadicCount;
5851 int size = isVariadic[index] ? variadicSize : 1;
5852 return {start, size};
5853}
5854
5855::mlir::MutableOperandRange EqOp::getInputsMutable() {
5856 auto range = getODSOperandIndexAndLength(0);
5857 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
5858 return mutableRange;
5859}
5860
5861void EqOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs) {
5862 build(odsBuilder, odsState, mlir::ValueRange{lhs, rhs});
5863
5864}
5865
5866void EqOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
5867 odsState.addOperands(inputs);
5868 odsState.addTypes(result);
5869}
5870
5871void EqOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5872 odsState.addOperands(operands);
5873 odsState.addAttributes(attributes);
5874 assert(resultTypes.size() == 1u && "mismatched number of return types");
5875 odsState.addTypes(resultTypes);
5876}
5877
5878void EqOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5879 odsState.addOperands(operands);
5880 odsState.addAttributes(attributes);
5881
5882 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5883 if (::mlir::succeeded(EqOp::inferReturnTypes(odsBuilder.getContext(),
5884 odsState.location, operands,
5885 odsState.attributes.getDictionary(odsState.getContext()),
5886 odsState.getRawProperties(),
5887 odsState.regions, inferredReturnTypes))) {
5888 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
5889 odsState.addTypes(inferredReturnTypes);
5890 } else {
5891 ::llvm::report_fatal_error("Failed to infer result type(s).");
5892 }
5893}
5894
5895::llvm::LogicalResult EqOp::verifyInvariantsImpl() {
5896 {
5897 unsigned index = 0; (void)index;
5898 auto valueGroup0 = getODSOperands(0);
5899
5900 for (auto v : valueGroup0) {
5901 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT4(*this, v.getType(), "operand", index++)))
5902 return ::mlir::failure();
5903 }
5904 }
5905 {
5906 unsigned index = 0; (void)index;
5907 auto valueGroup0 = getODSResults(0);
5908
5909 for (auto v : valueGroup0) {
5910 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
5911 return ::mlir::failure();
5912 }
5913 }
5914 return ::mlir::success();
5915}
5916
5917::llvm::LogicalResult EqOp::verifyInvariants() {
5918 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
5919 return ::mlir::success();
5920 return ::mlir::failure();
5921}
5922
5923::llvm::LogicalResult EqOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
5924 inferredReturnTypes.resize(1);
5925 ::mlir::Builder odsBuilder(context);
5926 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
5927 inferredReturnTypes[0] = odsInferredType0;
5928 return ::mlir::success();
5929}
5930
5931void EqOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5932}
5933
5934} // namespace smt
5935} // namespace llzk
5936MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::EqOp)
5937
5938namespace llzk {
5939namespace smt {
5940
5941//===----------------------------------------------------------------------===//
5942// ::llzk::smt::ExistsOp definitions
5943//===----------------------------------------------------------------------===//
5944
5945namespace detail {
5947
5949 auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().weight);
5950 return attr;
5951}
5952
5954 auto attr = getWeightAttr();
5955 return attr.getValue().getZExtValue();
5956}
5957
5959 auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().noPattern);
5960 if (!attr)
5961 attr = ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr);
5962 return attr;
5963}
5964
5966 auto attr = getNoPatternAttr();
5967 if (!attr)
5968 return ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr) != nullptr;
5969 return attr != nullptr;
5970}
5971
5972::std::optional< ::mlir::ArrayAttr > ExistsOpGenericAdaptorBase::getBoundVarNames() {
5973 auto attr = getBoundVarNamesAttr();
5974 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5975}
5976
5977} // namespace detail
5979
5980::llvm::LogicalResult ExistsOpAdaptor::verify(::mlir::Location loc) {
5981 auto tblgen_boundVarNames = getProperties().boundVarNames; (void)tblgen_boundVarNames;
5982 auto tblgen_noPattern = getProperties().noPattern; (void)tblgen_noPattern;
5983 auto tblgen_weight = getProperties().weight; (void)tblgen_weight;
5984
5985 if (tblgen_weight && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_weight))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_weight).getType().isSignlessInteger(32)))))
5986 return emitError(loc, "'smt.exists' op ""attribute 'weight' failed to satisfy constraint: 32-bit signless integer attribute");
5987
5988 if (tblgen_noPattern && !((::llvm::isa<::mlir::UnitAttr>(tblgen_noPattern))))
5989 return emitError(loc, "'smt.exists' op ""attribute 'noPattern' failed to satisfy constraint: unit attribute");
5990
5991 if (tblgen_boundVarNames && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_boundVarNames))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_boundVarNames), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::StringAttr>(attr))); }))))
5992 return emitError(loc, "'smt.exists' op ""attribute 'boundVarNames' failed to satisfy constraint: string array attribute");
5993 return ::mlir::success();
5994}
5995
5996::llvm::LogicalResult ExistsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5997 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
5998 if (!dict) {
5999 emitError() << "expected DictionaryAttr to set properties";
6000 return ::mlir::failure();
6001 }
6002
6003 {
6004 auto &propStorage = prop.boundVarNames;
6005 auto attr = dict.get("boundVarNames");
6006 if (attr) {
6007 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6008 if (convertedAttr) {
6009 propStorage = convertedAttr;
6010 } else {
6011 emitError() << "Invalid attribute `boundVarNames` in property conversion: " << attr;
6012 return ::mlir::failure();
6013 }
6014 }
6015 }
6016
6017 {
6018 auto &propStorage = prop.noPattern;
6019 auto attr = dict.get("noPattern");
6020 if (attr) {
6021 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6022 if (convertedAttr) {
6023 propStorage = convertedAttr;
6024 } else {
6025 emitError() << "Invalid attribute `noPattern` in property conversion: " << attr;
6026 return ::mlir::failure();
6027 }
6028 }
6029 }
6030
6031 {
6032 auto &propStorage = prop.weight;
6033 auto attr = dict.get("weight");
6034 if (attr) {
6035 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6036 if (convertedAttr) {
6037 propStorage = convertedAttr;
6038 } else {
6039 emitError() << "Invalid attribute `weight` in property conversion: " << attr;
6040 return ::mlir::failure();
6041 }
6042 }
6043 }
6044 return ::mlir::success();
6045}
6046
6047::mlir::Attribute ExistsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6048 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6049 ::mlir::Builder odsBuilder{ctx};
6050
6051 {
6052 const auto &propStorage = prop.boundVarNames;
6053 if (propStorage)
6054 attrs.push_back(odsBuilder.getNamedAttr("boundVarNames",
6055 propStorage));
6056 }
6057
6058 {
6059 const auto &propStorage = prop.noPattern;
6060 if (propStorage)
6061 attrs.push_back(odsBuilder.getNamedAttr("noPattern",
6062 propStorage));
6063 }
6064
6065 {
6066 const auto &propStorage = prop.weight;
6067 if (propStorage)
6068 attrs.push_back(odsBuilder.getNamedAttr("weight",
6069 propStorage));
6070 }
6071
6072 if (!attrs.empty())
6073 return odsBuilder.getDictionaryAttr(attrs);
6074 return {};
6075}
6076
6077llvm::hash_code ExistsOp::computePropertiesHash(const Properties &prop) {
6078 return llvm::hash_combine(
6079 llvm::hash_value(prop.boundVarNames.getAsOpaquePointer()),
6080 llvm::hash_value(prop.noPattern.getAsOpaquePointer()),
6081 llvm::hash_value(prop.weight.getAsOpaquePointer()));
6082}
6083
6084std::optional<mlir::Attribute> ExistsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6085 if (name == "boundVarNames")
6086 return prop.boundVarNames;
6087
6088 if (name == "noPattern")
6089 return prop.noPattern;
6090
6091 if (name == "weight")
6092 return prop.weight;
6093 return std::nullopt;
6094}
6095
6096void ExistsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
6097 if (name == "boundVarNames") {
6098 prop.boundVarNames = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.boundVarNames)>>(value);
6099 return;
6100 }
6101
6102 if (name == "noPattern") {
6103 prop.noPattern = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noPattern)>>(value);
6104 return;
6105 }
6106
6107 if (name == "weight") {
6108 prop.weight = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.weight)>>(value);
6109 return;
6110 }
6111}
6112
6113void ExistsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
6114 if (prop.boundVarNames) attrs.append("boundVarNames", prop.boundVarNames);
6115
6116 if (prop.noPattern) attrs.append("noPattern", prop.noPattern);
6117
6118 if (prop.weight) attrs.append("weight", prop.weight);
6119}
6120
6121::llvm::LogicalResult ExistsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6122 {
6123 ::mlir::Attribute attr = attrs.get(getBoundVarNamesAttrName(opName));
6124 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT7(attr, "boundVarNames", emitError)))
6125 return ::mlir::failure();
6126 }
6127
6128 {
6129 ::mlir::Attribute attr = attrs.get(getNoPatternAttrName(opName));
6130 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(attr, "noPattern", emitError)))
6131 return ::mlir::failure();
6132 }
6133
6134 {
6135 ::mlir::Attribute attr = attrs.get(getWeightAttrName(opName));
6136 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(attr, "weight", emitError)))
6137 return ::mlir::failure();
6138 }
6139 return ::mlir::success();
6140}
6141
6142::llvm::LogicalResult ExistsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
6143 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
6144 if (::mlir::failed(reader.readOptionalAttribute(prop.boundVarNames)))
6145 return ::mlir::failure();
6146
6147 if (::mlir::failed(reader.readOptionalAttribute(prop.noPattern)))
6148 return ::mlir::failure();
6149
6150 if (::mlir::failed(reader.readOptionalAttribute(prop.weight)))
6151 return ::mlir::failure();
6152 return ::mlir::success();
6153}
6154
6155void ExistsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
6156 auto &prop = getProperties(); (void)prop;
6157
6158 writer.writeOptionalAttribute(prop.boundVarNames);
6159
6160 writer.writeOptionalAttribute(prop.noPattern);
6161
6162 writer.writeOptionalAttribute(prop.weight);
6163}
6164
6166 auto attr = getWeightAttr();
6167 return attr.getValue().getZExtValue();
6168}
6169
6171 auto attr = getNoPatternAttr();
6172 if (!attr)
6173 return ((false) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr) != nullptr;
6174 return attr != nullptr;
6175}
6176
6177::std::optional< ::mlir::ArrayAttr > ExistsOp::getBoundVarNames() {
6178 auto attr = getBoundVarNamesAttr();
6179 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6180}
6181
6182void ExistsOp::setWeight(uint32_t attrValue) {
6183 getProperties().weight = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
6184}
6185
6186void ExistsOp::setNoPattern(bool attrValue) {
6187 auto &odsProp = getProperties().noPattern;
6188 if (attrValue)
6189 odsProp = ((attrValue) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr);
6190 else
6191 odsProp = nullptr;
6192}
6193
6194void ExistsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
6195 ::mlir::Builder odsBuilder(opName.getContext());
6196 if (!properties.weight)
6197 properties.weight = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
6198}
6199
6200::llvm::LogicalResult ExistsOp::verifyInvariantsImpl() {
6201 auto tblgen_boundVarNames = getProperties().boundVarNames; (void)tblgen_boundVarNames;
6202 auto tblgen_noPattern = getProperties().noPattern; (void)tblgen_noPattern;
6203 auto tblgen_weight = getProperties().weight; (void)tblgen_weight;
6204
6205 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(*this, tblgen_weight, "weight")))
6206 return ::mlir::failure();
6207
6208 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(*this, tblgen_noPattern, "noPattern")))
6209 return ::mlir::failure();
6210
6211 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT7(*this, tblgen_boundVarNames, "boundVarNames")))
6212 return ::mlir::failure();
6213 {
6214 unsigned index = 0; (void)index;
6215 auto valueGroup0 = getODSResults(0);
6216
6217 for (auto v : valueGroup0) {
6218 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
6219 return ::mlir::failure();
6220 }
6221 }
6222 {
6223 unsigned index = 0; (void)index;
6224
6225 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
6226 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "body", index++)))
6227 return ::mlir::failure();
6228
6229 for (auto &region : getPatterns())
6230 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "patterns", index++)))
6231 return ::mlir::failure();
6232 }
6233 return ::mlir::success();
6234}
6235
6236::llvm::LogicalResult ExistsOp::verifyInvariants() {
6237 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
6238 return ::mlir::success();
6239 return ::mlir::failure();
6240}
6241
6242::llvm::LogicalResult ExistsOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
6243 inferredReturnTypes.resize(1);
6244 ::mlir::Builder odsBuilder(context);
6245 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
6246 inferredReturnTypes[0] = odsInferredType0;
6247 return ::mlir::success();
6248}
6249
6250::mlir::ParseResult ExistsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
6251 ::mlir::ArrayAttr boundVarNamesAttr;
6252 ::mlir::IntegerAttr weightAttr;
6253 std::unique_ptr<::mlir::Region> bodyRegion = std::make_unique<::mlir::Region>();
6254 ::llvm::SmallVector<std::unique_ptr<::mlir::Region>, 2> patternsRegions;
6255
6256 ::mlir::OptionalParseResult parseResultboundVarNamesAttr =
6257 parser.parseOptionalAttribute(boundVarNamesAttr, parser.getBuilder().getType<::mlir::NoneType>());
6258 if (parseResultboundVarNamesAttr.has_value() && failed(*parseResultboundVarNamesAttr))
6259 return ::mlir::failure();
6260 if (parseResultboundVarNamesAttr.has_value() && succeeded(*parseResultboundVarNamesAttr))
6261 if (boundVarNamesAttr) result.getOrAddProperties<ExistsOp::Properties>().boundVarNames = boundVarNamesAttr;
6262 if (boundVarNamesAttr) {
6263 }
6264 if (::mlir::succeeded(parser.parseOptionalKeyword("no_pattern"))) {
6265 result.getOrAddProperties<ExistsOp::Properties>().noPattern = parser.getBuilder().getUnitAttr(); }
6266 if (::mlir::succeeded(parser.parseOptionalKeyword("weight"))) {
6267
6268 if (parser.parseCustomAttributeWithFallback(weightAttr, parser.getBuilder().getIntegerType(32))) {
6269 return ::mlir::failure();
6270 }
6271 if (weightAttr) result.getOrAddProperties<ExistsOp::Properties>().weight = weightAttr;
6272 }
6273 {
6274 auto loc = parser.getCurrentLocation();(void)loc;
6275 if (parser.parseOptionalAttrDictWithKeyword(result.attributes))
6276 return ::mlir::failure();
6277 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
6278 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
6279 })))
6280 return ::mlir::failure();
6281 }
6282
6283 if (parser.parseRegion(*bodyRegion))
6284 return ::mlir::failure();
6285
6286 ensureTerminator(*bodyRegion, parser.getBuilder(), result.location);
6287 if (::mlir::succeeded(parser.parseOptionalKeyword("patterns"))) {
6288
6289 {
6290 std::unique_ptr<::mlir::Region> region;
6291 auto firstRegionResult = parser.parseOptionalRegion(region);
6292 if (firstRegionResult.has_value()) {
6293 if (failed(*firstRegionResult))
6294 return ::mlir::failure();
6295 patternsRegions.emplace_back(std::move(region));
6296
6297 // Parse any trailing regions.
6298 while (succeeded(parser.parseOptionalComma())) {
6299 region = std::make_unique<::mlir::Region>();
6300 if (parser.parseRegion(*region))
6301 return ::mlir::failure();
6302 patternsRegions.emplace_back(std::move(region));
6303 }
6304 }
6305 }
6306
6307 for (auto &region : patternsRegions)
6308 ensureTerminator(*region, parser.getBuilder(), result.location);
6309 }
6310 result.addRegion(std::move(bodyRegion));
6311 result.addRegions(patternsRegions);
6312 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
6313 result.addTypes(odsBuildableType0);
6314 return ::mlir::success();
6315}
6316
6317void ExistsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
6318 if (getBoundVarNamesAttr()) {
6319 _odsPrinter << ' ';
6320 _odsPrinter.printAttributeWithoutType(getBoundVarNamesAttr());
6321 }
6322 if ((getNoPatternAttr() && getNoPatternAttr() != ((false) ? ::mlir::OpBuilder((*this)->getContext()).getUnitAttr() : nullptr))) {
6323 _odsPrinter << ' ' << "no_pattern";
6324 }
6325 if (getWeightAttr() != ::mlir::OpBuilder((*this)->getContext()).getIntegerAttr(::mlir::OpBuilder((*this)->getContext()).getIntegerType(32), 0)) {
6326 _odsPrinter << ' ' << "weight";
6327 _odsPrinter << ' ';
6328 _odsPrinter.printAttributeWithoutType(getWeightAttr());
6329 }
6330 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
6331 elidedAttrs.push_back("boundVarNames");
6332 elidedAttrs.push_back("noPattern");
6333 elidedAttrs.push_back("weight");
6334 {
6335 ::mlir::Builder odsBuilder(getContext());
6336 ::mlir::Attribute attr = getWeightAttr();
6337 if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
6338 elidedAttrs.push_back("weight");
6339 }
6340 {
6341 ::mlir::Builder odsBuilder(getContext());
6342 ::mlir::Attribute attr = getNoPatternAttr();
6343 if(attr && (attr == ((false) ? odsBuilder.getUnitAttr() : nullptr)))
6344 elidedAttrs.push_back("noPattern");
6345 }
6346 _odsPrinter.printOptionalAttrDictWithKeyword((*this)->getAttrs(), elidedAttrs);
6347 _odsPrinter << ' ';
6348
6349 {
6350 bool printTerminator = true;
6351 if (auto *term = getBody().empty() ? nullptr : getBody().begin()->getTerminator()) {
6352 printTerminator = !term->getAttrDictionary().empty() ||
6353 term->getNumOperands() != 0 ||
6354 term->getNumResults() != 0;
6355 }
6356 _odsPrinter.printRegion(getBody(), /*printEntryBlockArgs=*/true,
6357 /*printBlockTerminators=*/printTerminator);
6358 }
6359 if (!getPatterns().empty()) {
6360 _odsPrinter << ' ' << "patterns";
6361 _odsPrinter << ' ';
6362 llvm::interleaveComma(getPatterns(), _odsPrinter, [&](::mlir::Region &region) {
6363
6364 {
6365 bool printTerminator = true;
6366 if (auto *term = region.empty() ? nullptr : region.begin()->getTerminator()) {
6367 printTerminator = !term->getAttrDictionary().empty() ||
6368 term->getNumOperands() != 0 ||
6369 term->getNumResults() != 0;
6370 }
6371 _odsPrinter.printRegion(region, /*printEntryBlockArgs=*/true,
6372 /*printBlockTerminators=*/printTerminator);
6373 }
6374 });
6375 }
6376}
6377
6378} // namespace smt
6379} // namespace llzk
6380MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ExistsOp)
6381
6382namespace llzk {
6383namespace smt {
6384
6385//===----------------------------------------------------------------------===//
6386// ::llzk::smt::ExtractOp definitions
6387//===----------------------------------------------------------------------===//
6388
6389namespace detail {
6390ExtractOpGenericAdaptorBase::ExtractOpGenericAdaptorBase(ExtractOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
6391
6393 auto attr = getLowBitAttr();
6394 return attr.getValue().getZExtValue();
6395}
6396
6397} // namespace detail
6399
6400::llvm::LogicalResult ExtractOpAdaptor::verify(::mlir::Location loc) {
6401 auto tblgen_lowBit = getProperties().lowBit; (void)tblgen_lowBit;
6402 if (!tblgen_lowBit) return emitError(loc, "'smt.bv.extract' op ""requires attribute 'lowBit'");
6403
6404 if (tblgen_lowBit && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_lowBit))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_lowBit).getType().isSignlessInteger(32)))))
6405 return emitError(loc, "'smt.bv.extract' op ""attribute 'lowBit' failed to satisfy constraint: 32-bit signless integer attribute");
6406 return ::mlir::success();
6407}
6408
6409::llvm::LogicalResult ExtractOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6410 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
6411 if (!dict) {
6412 emitError() << "expected DictionaryAttr to set properties";
6413 return ::mlir::failure();
6414 }
6415
6416 {
6417 auto &propStorage = prop.lowBit;
6418 auto attr = dict.get("lowBit");
6419 if (attr) {
6420 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6421 if (convertedAttr) {
6422 propStorage = convertedAttr;
6423 } else {
6424 emitError() << "Invalid attribute `lowBit` in property conversion: " << attr;
6425 return ::mlir::failure();
6426 }
6427 }
6428 }
6429 return ::mlir::success();
6430}
6431
6432::mlir::Attribute ExtractOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6433 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6434 ::mlir::Builder odsBuilder{ctx};
6435
6436 {
6437 const auto &propStorage = prop.lowBit;
6438 if (propStorage)
6439 attrs.push_back(odsBuilder.getNamedAttr("lowBit",
6440 propStorage));
6441 }
6442
6443 if (!attrs.empty())
6444 return odsBuilder.getDictionaryAttr(attrs);
6445 return {};
6446}
6447
6448llvm::hash_code ExtractOp::computePropertiesHash(const Properties &prop) {
6449 return llvm::hash_combine(
6450 llvm::hash_value(prop.lowBit.getAsOpaquePointer()));
6451}
6452
6453std::optional<mlir::Attribute> ExtractOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6454 if (name == "lowBit")
6455 return prop.lowBit;
6456 return std::nullopt;
6457}
6458
6459void ExtractOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
6460 if (name == "lowBit") {
6461 prop.lowBit = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.lowBit)>>(value);
6462 return;
6463 }
6464}
6465
6466void ExtractOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
6467 if (prop.lowBit) attrs.append("lowBit", prop.lowBit);
6468}
6469
6470::llvm::LogicalResult ExtractOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6471 {
6472 ::mlir::Attribute attr = attrs.get(getLowBitAttrName(opName));
6473 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(attr, "lowBit", emitError)))
6474 return ::mlir::failure();
6475 }
6476 return ::mlir::success();
6477}
6478
6479::llvm::LogicalResult ExtractOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
6480 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
6481 if (::mlir::failed(reader.readAttribute(prop.lowBit)))
6482 return ::mlir::failure();
6483 return ::mlir::success();
6484}
6485
6486void ExtractOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
6487 auto &prop = getProperties(); (void)prop;
6488 writer.writeAttribute(prop.lowBit);
6489}
6490
6492 auto attr = getLowBitAttr();
6493 return attr.getValue().getZExtValue();
6494}
6495
6496void ExtractOp::setLowBit(uint32_t attrValue) {
6497 getProperties().lowBit = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
6498}
6499
6500void ExtractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::IntegerAttr lowBit, ::mlir::Value input) {
6501 odsState.addOperands(input);
6502 odsState.getOrAddProperties<Properties>().lowBit = lowBit;
6503 odsState.addTypes(result);
6504}
6505
6506void ExtractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr lowBit, ::mlir::Value input) {
6507 odsState.addOperands(input);
6508 odsState.getOrAddProperties<Properties>().lowBit = lowBit;
6509 assert(resultTypes.size() == 1u && "mismatched number of results");
6510 odsState.addTypes(resultTypes);
6511}
6512
6513void ExtractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, uint32_t lowBit, ::mlir::Value input) {
6514 odsState.addOperands(input);
6515 odsState.getOrAddProperties<Properties>().lowBit = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), lowBit);
6516 odsState.addTypes(result);
6517}
6518
6519void ExtractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t lowBit, ::mlir::Value input) {
6520 odsState.addOperands(input);
6521 odsState.getOrAddProperties<Properties>().lowBit = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), lowBit);
6522 assert(resultTypes.size() == 1u && "mismatched number of results");
6523 odsState.addTypes(resultTypes);
6524}
6525
6526void ExtractOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6527 assert(operands.size() == 1u && "mismatched number of parameters");
6528 odsState.addOperands(operands);
6529 odsState.addAttributes(attributes);
6530 assert(resultTypes.size() == 1u && "mismatched number of return types");
6531 odsState.addTypes(resultTypes);
6532
6533 if (!attributes.empty()) {
6534 ::mlir::OpaqueProperties properties =
6535 &odsState.getOrAddProperties<ExtractOp::Properties>();
6536 std::optional<::mlir::RegisteredOperationName> info =
6537 odsState.name.getRegisteredInfo();
6538 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
6539 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
6540 ::llvm::report_fatal_error("Property conversion failed.");
6541 }
6542}
6543
6544::llvm::LogicalResult ExtractOp::verifyInvariantsImpl() {
6545 auto tblgen_lowBit = getProperties().lowBit; (void)tblgen_lowBit;
6546 if (!tblgen_lowBit) return emitOpError("requires attribute 'lowBit'");
6547
6548 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(*this, tblgen_lowBit, "lowBit")))
6549 return ::mlir::failure();
6550 {
6551 unsigned index = 0; (void)index;
6552 auto valueGroup0 = getODSOperands(0);
6553
6554 for (auto v : valueGroup0) {
6555 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
6556 return ::mlir::failure();
6557 }
6558 }
6559 {
6560 unsigned index = 0; (void)index;
6561 auto valueGroup0 = getODSResults(0);
6562
6563 for (auto v : valueGroup0) {
6564 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
6565 return ::mlir::failure();
6566 }
6567 }
6568 return ::mlir::success();
6569}
6570
6571::llvm::LogicalResult ExtractOp::verifyInvariants() {
6572 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
6573 return ::mlir::success();
6574 return ::mlir::failure();
6575}
6576
6577::mlir::ParseResult ExtractOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
6578 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
6579 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
6580 (void)inputOperandsLoc;
6581 ::mlir::IntegerAttr lowBitAttr;
6582 ::llvm::ArrayRef<::mlir::Type> inputTypes;
6583 ::llvm::ArrayRef<::mlir::Type> resultTypes;
6584
6585 inputOperandsLoc = parser.getCurrentLocation();
6586 if (parser.parseOperand(inputRawOperand))
6587 return ::mlir::failure();
6588 if (parser.parseKeyword("from"))
6589 return ::mlir::failure();
6590
6591 if (parser.parseCustomAttributeWithFallback(lowBitAttr, parser.getBuilder().getIntegerType(32))) {
6592 return ::mlir::failure();
6593 }
6594 if (lowBitAttr) result.getOrAddProperties<ExtractOp::Properties>().lowBit = lowBitAttr;
6595 {
6596 auto loc = parser.getCurrentLocation();(void)loc;
6597 if (parser.parseOptionalAttrDict(result.attributes))
6598 return ::mlir::failure();
6599 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
6600 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
6601 })))
6602 return ::mlir::failure();
6603 }
6604 if (parser.parseColon())
6605 return ::mlir::failure();
6606
6607 ::mlir::FunctionType input__result_functionType;
6608 if (parser.parseType(input__result_functionType))
6609 return ::mlir::failure();
6610 inputTypes = input__result_functionType.getInputs();
6611 resultTypes = input__result_functionType.getResults();
6612 result.addTypes(resultTypes);
6613 if (parser.resolveOperands(inputOperands, inputTypes, inputOperandsLoc, result.operands))
6614 return ::mlir::failure();
6615 return ::mlir::success();
6616}
6617
6618void ExtractOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
6619 _odsPrinter << ' ';
6620 _odsPrinter << getInput();
6621 _odsPrinter << ' ' << "from";
6622 _odsPrinter << ' ';
6623 _odsPrinter.printAttributeWithoutType(getLowBitAttr());
6624 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
6625 elidedAttrs.push_back("lowBit");
6626 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
6627 _odsPrinter << ' ' << ":";
6628 _odsPrinter << ' ';
6629 _odsPrinter.printFunctionalType(::llvm::ArrayRef<::mlir::Type>(getInput().getType()), ::llvm::ArrayRef<::mlir::Type>(getResult().getType()));
6630}
6631
6632void ExtractOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
6633}
6634
6635} // namespace smt
6636} // namespace llzk
6637MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ExtractOp)
6638
6639namespace llzk {
6640namespace smt {
6641
6642//===----------------------------------------------------------------------===//
6643// ::llzk::smt::ForallOp definitions
6644//===----------------------------------------------------------------------===//
6645
6646namespace detail {
6648
6650 auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().weight);
6651 return attr;
6652}
6653
6655 auto attr = getWeightAttr();
6656 return attr.getValue().getZExtValue();
6657}
6658
6660 auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().noPattern);
6661 if (!attr)
6662 attr = ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr);
6663 return attr;
6664}
6665
6667 auto attr = getNoPatternAttr();
6668 if (!attr)
6669 return ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr) != nullptr;
6670 return attr != nullptr;
6671}
6672
6673::std::optional< ::mlir::ArrayAttr > ForallOpGenericAdaptorBase::getBoundVarNames() {
6674 auto attr = getBoundVarNamesAttr();
6675 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6676}
6677
6678} // namespace detail
6680
6681::llvm::LogicalResult ForallOpAdaptor::verify(::mlir::Location loc) {
6682 auto tblgen_boundVarNames = getProperties().boundVarNames; (void)tblgen_boundVarNames;
6683 auto tblgen_noPattern = getProperties().noPattern; (void)tblgen_noPattern;
6684 auto tblgen_weight = getProperties().weight; (void)tblgen_weight;
6685
6686 if (tblgen_weight && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_weight))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_weight).getType().isSignlessInteger(32)))))
6687 return emitError(loc, "'smt.forall' op ""attribute 'weight' failed to satisfy constraint: 32-bit signless integer attribute");
6688
6689 if (tblgen_noPattern && !((::llvm::isa<::mlir::UnitAttr>(tblgen_noPattern))))
6690 return emitError(loc, "'smt.forall' op ""attribute 'noPattern' failed to satisfy constraint: unit attribute");
6691
6692 if (tblgen_boundVarNames && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_boundVarNames))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_boundVarNames), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::StringAttr>(attr))); }))))
6693 return emitError(loc, "'smt.forall' op ""attribute 'boundVarNames' failed to satisfy constraint: string array attribute");
6694 return ::mlir::success();
6695}
6696
6697::llvm::LogicalResult ForallOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6698 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
6699 if (!dict) {
6700 emitError() << "expected DictionaryAttr to set properties";
6701 return ::mlir::failure();
6702 }
6703
6704 {
6705 auto &propStorage = prop.boundVarNames;
6706 auto attr = dict.get("boundVarNames");
6707 if (attr) {
6708 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6709 if (convertedAttr) {
6710 propStorage = convertedAttr;
6711 } else {
6712 emitError() << "Invalid attribute `boundVarNames` in property conversion: " << attr;
6713 return ::mlir::failure();
6714 }
6715 }
6716 }
6717
6718 {
6719 auto &propStorage = prop.noPattern;
6720 auto attr = dict.get("noPattern");
6721 if (attr) {
6722 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6723 if (convertedAttr) {
6724 propStorage = convertedAttr;
6725 } else {
6726 emitError() << "Invalid attribute `noPattern` in property conversion: " << attr;
6727 return ::mlir::failure();
6728 }
6729 }
6730 }
6731
6732 {
6733 auto &propStorage = prop.weight;
6734 auto attr = dict.get("weight");
6735 if (attr) {
6736 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6737 if (convertedAttr) {
6738 propStorage = convertedAttr;
6739 } else {
6740 emitError() << "Invalid attribute `weight` in property conversion: " << attr;
6741 return ::mlir::failure();
6742 }
6743 }
6744 }
6745 return ::mlir::success();
6746}
6747
6748::mlir::Attribute ForallOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6749 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6750 ::mlir::Builder odsBuilder{ctx};
6751
6752 {
6753 const auto &propStorage = prop.boundVarNames;
6754 if (propStorage)
6755 attrs.push_back(odsBuilder.getNamedAttr("boundVarNames",
6756 propStorage));
6757 }
6758
6759 {
6760 const auto &propStorage = prop.noPattern;
6761 if (propStorage)
6762 attrs.push_back(odsBuilder.getNamedAttr("noPattern",
6763 propStorage));
6764 }
6765
6766 {
6767 const auto &propStorage = prop.weight;
6768 if (propStorage)
6769 attrs.push_back(odsBuilder.getNamedAttr("weight",
6770 propStorage));
6771 }
6772
6773 if (!attrs.empty())
6774 return odsBuilder.getDictionaryAttr(attrs);
6775 return {};
6776}
6777
6778llvm::hash_code ForallOp::computePropertiesHash(const Properties &prop) {
6779 return llvm::hash_combine(
6780 llvm::hash_value(prop.boundVarNames.getAsOpaquePointer()),
6781 llvm::hash_value(prop.noPattern.getAsOpaquePointer()),
6782 llvm::hash_value(prop.weight.getAsOpaquePointer()));
6783}
6784
6785std::optional<mlir::Attribute> ForallOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6786 if (name == "boundVarNames")
6787 return prop.boundVarNames;
6788
6789 if (name == "noPattern")
6790 return prop.noPattern;
6791
6792 if (name == "weight")
6793 return prop.weight;
6794 return std::nullopt;
6795}
6796
6797void ForallOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
6798 if (name == "boundVarNames") {
6799 prop.boundVarNames = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.boundVarNames)>>(value);
6800 return;
6801 }
6802
6803 if (name == "noPattern") {
6804 prop.noPattern = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noPattern)>>(value);
6805 return;
6806 }
6807
6808 if (name == "weight") {
6809 prop.weight = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.weight)>>(value);
6810 return;
6811 }
6812}
6813
6814void ForallOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
6815 if (prop.boundVarNames) attrs.append("boundVarNames", prop.boundVarNames);
6816
6817 if (prop.noPattern) attrs.append("noPattern", prop.noPattern);
6818
6819 if (prop.weight) attrs.append("weight", prop.weight);
6820}
6821
6822::llvm::LogicalResult ForallOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6823 {
6824 ::mlir::Attribute attr = attrs.get(getBoundVarNamesAttrName(opName));
6825 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT7(attr, "boundVarNames", emitError)))
6826 return ::mlir::failure();
6827 }
6828
6829 {
6830 ::mlir::Attribute attr = attrs.get(getNoPatternAttrName(opName));
6831 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(attr, "noPattern", emitError)))
6832 return ::mlir::failure();
6833 }
6834
6835 {
6836 ::mlir::Attribute attr = attrs.get(getWeightAttrName(opName));
6837 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(attr, "weight", emitError)))
6838 return ::mlir::failure();
6839 }
6840 return ::mlir::success();
6841}
6842
6843::llvm::LogicalResult ForallOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
6844 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
6845 if (::mlir::failed(reader.readOptionalAttribute(prop.boundVarNames)))
6846 return ::mlir::failure();
6847
6848 if (::mlir::failed(reader.readOptionalAttribute(prop.noPattern)))
6849 return ::mlir::failure();
6850
6851 if (::mlir::failed(reader.readOptionalAttribute(prop.weight)))
6852 return ::mlir::failure();
6853 return ::mlir::success();
6854}
6855
6856void ForallOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
6857 auto &prop = getProperties(); (void)prop;
6858
6859 writer.writeOptionalAttribute(prop.boundVarNames);
6860
6861 writer.writeOptionalAttribute(prop.noPattern);
6862
6863 writer.writeOptionalAttribute(prop.weight);
6864}
6865
6867 auto attr = getWeightAttr();
6868 return attr.getValue().getZExtValue();
6869}
6870
6872 auto attr = getNoPatternAttr();
6873 if (!attr)
6874 return ((false) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr) != nullptr;
6875 return attr != nullptr;
6876}
6877
6878::std::optional< ::mlir::ArrayAttr > ForallOp::getBoundVarNames() {
6879 auto attr = getBoundVarNamesAttr();
6880 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6881}
6882
6883void ForallOp::setWeight(uint32_t attrValue) {
6884 getProperties().weight = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
6885}
6886
6887void ForallOp::setNoPattern(bool attrValue) {
6888 auto &odsProp = getProperties().noPattern;
6889 if (attrValue)
6890 odsProp = ((attrValue) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr);
6891 else
6892 odsProp = nullptr;
6893}
6894
6895void ForallOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
6896 ::mlir::Builder odsBuilder(opName.getContext());
6897 if (!properties.weight)
6898 properties.weight = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
6899}
6900
6901::llvm::LogicalResult ForallOp::verifyInvariantsImpl() {
6902 auto tblgen_boundVarNames = getProperties().boundVarNames; (void)tblgen_boundVarNames;
6903 auto tblgen_noPattern = getProperties().noPattern; (void)tblgen_noPattern;
6904 auto tblgen_weight = getProperties().weight; (void)tblgen_weight;
6905
6906 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(*this, tblgen_weight, "weight")))
6907 return ::mlir::failure();
6908
6909 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(*this, tblgen_noPattern, "noPattern")))
6910 return ::mlir::failure();
6911
6912 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT7(*this, tblgen_boundVarNames, "boundVarNames")))
6913 return ::mlir::failure();
6914 {
6915 unsigned index = 0; (void)index;
6916 auto valueGroup0 = getODSResults(0);
6917
6918 for (auto v : valueGroup0) {
6919 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
6920 return ::mlir::failure();
6921 }
6922 }
6923 {
6924 unsigned index = 0; (void)index;
6925
6926 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
6927 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "body", index++)))
6928 return ::mlir::failure();
6929
6930 for (auto &region : getPatterns())
6931 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "patterns", index++)))
6932 return ::mlir::failure();
6933 }
6934 return ::mlir::success();
6935}
6936
6937::llvm::LogicalResult ForallOp::verifyInvariants() {
6938 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
6939 return ::mlir::success();
6940 return ::mlir::failure();
6941}
6942
6943::llvm::LogicalResult ForallOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
6944 inferredReturnTypes.resize(1);
6945 ::mlir::Builder odsBuilder(context);
6946 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
6947 inferredReturnTypes[0] = odsInferredType0;
6948 return ::mlir::success();
6949}
6950
6951::mlir::ParseResult ForallOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
6952 ::mlir::ArrayAttr boundVarNamesAttr;
6953 ::mlir::IntegerAttr weightAttr;
6954 std::unique_ptr<::mlir::Region> bodyRegion = std::make_unique<::mlir::Region>();
6955 ::llvm::SmallVector<std::unique_ptr<::mlir::Region>, 2> patternsRegions;
6956
6957 ::mlir::OptionalParseResult parseResultboundVarNamesAttr =
6958 parser.parseOptionalAttribute(boundVarNamesAttr, parser.getBuilder().getType<::mlir::NoneType>());
6959 if (parseResultboundVarNamesAttr.has_value() && failed(*parseResultboundVarNamesAttr))
6960 return ::mlir::failure();
6961 if (parseResultboundVarNamesAttr.has_value() && succeeded(*parseResultboundVarNamesAttr))
6962 if (boundVarNamesAttr) result.getOrAddProperties<ForallOp::Properties>().boundVarNames = boundVarNamesAttr;
6963 if (boundVarNamesAttr) {
6964 }
6965 if (::mlir::succeeded(parser.parseOptionalKeyword("no_pattern"))) {
6966 result.getOrAddProperties<ForallOp::Properties>().noPattern = parser.getBuilder().getUnitAttr(); }
6967 if (::mlir::succeeded(parser.parseOptionalKeyword("weight"))) {
6968
6969 if (parser.parseCustomAttributeWithFallback(weightAttr, parser.getBuilder().getIntegerType(32))) {
6970 return ::mlir::failure();
6971 }
6972 if (weightAttr) result.getOrAddProperties<ForallOp::Properties>().weight = weightAttr;
6973 }
6974 {
6975 auto loc = parser.getCurrentLocation();(void)loc;
6976 if (parser.parseOptionalAttrDictWithKeyword(result.attributes))
6977 return ::mlir::failure();
6978 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
6979 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
6980 })))
6981 return ::mlir::failure();
6982 }
6983
6984 if (parser.parseRegion(*bodyRegion))
6985 return ::mlir::failure();
6986
6987 ensureTerminator(*bodyRegion, parser.getBuilder(), result.location);
6988 if (::mlir::succeeded(parser.parseOptionalKeyword("patterns"))) {
6989
6990 {
6991 std::unique_ptr<::mlir::Region> region;
6992 auto firstRegionResult = parser.parseOptionalRegion(region);
6993 if (firstRegionResult.has_value()) {
6994 if (failed(*firstRegionResult))
6995 return ::mlir::failure();
6996 patternsRegions.emplace_back(std::move(region));
6997
6998 // Parse any trailing regions.
6999 while (succeeded(parser.parseOptionalComma())) {
7000 region = std::make_unique<::mlir::Region>();
7001 if (parser.parseRegion(*region))
7002 return ::mlir::failure();
7003 patternsRegions.emplace_back(std::move(region));
7004 }
7005 }
7006 }
7007
7008 for (auto &region : patternsRegions)
7009 ensureTerminator(*region, parser.getBuilder(), result.location);
7010 }
7011 result.addRegion(std::move(bodyRegion));
7012 result.addRegions(patternsRegions);
7013 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
7014 result.addTypes(odsBuildableType0);
7015 return ::mlir::success();
7016}
7017
7018void ForallOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7019 if (getBoundVarNamesAttr()) {
7020 _odsPrinter << ' ';
7021 _odsPrinter.printAttributeWithoutType(getBoundVarNamesAttr());
7022 }
7023 if ((getNoPatternAttr() && getNoPatternAttr() != ((false) ? ::mlir::OpBuilder((*this)->getContext()).getUnitAttr() : nullptr))) {
7024 _odsPrinter << ' ' << "no_pattern";
7025 }
7026 if (getWeightAttr() != ::mlir::OpBuilder((*this)->getContext()).getIntegerAttr(::mlir::OpBuilder((*this)->getContext()).getIntegerType(32), 0)) {
7027 _odsPrinter << ' ' << "weight";
7028 _odsPrinter << ' ';
7029 _odsPrinter.printAttributeWithoutType(getWeightAttr());
7030 }
7031 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7032 elidedAttrs.push_back("boundVarNames");
7033 elidedAttrs.push_back("noPattern");
7034 elidedAttrs.push_back("weight");
7035 {
7036 ::mlir::Builder odsBuilder(getContext());
7037 ::mlir::Attribute attr = getWeightAttr();
7038 if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
7039 elidedAttrs.push_back("weight");
7040 }
7041 {
7042 ::mlir::Builder odsBuilder(getContext());
7043 ::mlir::Attribute attr = getNoPatternAttr();
7044 if(attr && (attr == ((false) ? odsBuilder.getUnitAttr() : nullptr)))
7045 elidedAttrs.push_back("noPattern");
7046 }
7047 _odsPrinter.printOptionalAttrDictWithKeyword((*this)->getAttrs(), elidedAttrs);
7048 _odsPrinter << ' ';
7049
7050 {
7051 bool printTerminator = true;
7052 if (auto *term = getBody().empty() ? nullptr : getBody().begin()->getTerminator()) {
7053 printTerminator = !term->getAttrDictionary().empty() ||
7054 term->getNumOperands() != 0 ||
7055 term->getNumResults() != 0;
7056 }
7057 _odsPrinter.printRegion(getBody(), /*printEntryBlockArgs=*/true,
7058 /*printBlockTerminators=*/printTerminator);
7059 }
7060 if (!getPatterns().empty()) {
7061 _odsPrinter << ' ' << "patterns";
7062 _odsPrinter << ' ';
7063 llvm::interleaveComma(getPatterns(), _odsPrinter, [&](::mlir::Region &region) {
7064
7065 {
7066 bool printTerminator = true;
7067 if (auto *term = region.empty() ? nullptr : region.begin()->getTerminator()) {
7068 printTerminator = !term->getAttrDictionary().empty() ||
7069 term->getNumOperands() != 0 ||
7070 term->getNumResults() != 0;
7071 }
7072 _odsPrinter.printRegion(region, /*printEntryBlockArgs=*/true,
7073 /*printBlockTerminators=*/printTerminator);
7074 }
7075 });
7076 }
7077}
7078
7079} // namespace smt
7080} // namespace llzk
7081MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ForallOp)
7082
7083namespace llzk {
7084namespace smt {
7085
7086//===----------------------------------------------------------------------===//
7087// ::llzk::smt::ImpliesOp definitions
7088//===----------------------------------------------------------------------===//
7089
7090namespace detail {
7091} // namespace detail
7093
7094::llvm::LogicalResult ImpliesOpAdaptor::verify(::mlir::Location loc) {
7095 return ::mlir::success();
7096}
7097
7098void ImpliesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
7099 odsState.addOperands(lhs);
7100 odsState.addOperands(rhs);
7101 odsState.addTypes(result);
7102}
7103
7104void ImpliesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
7105 odsState.addOperands(lhs);
7106 odsState.addOperands(rhs);
7107
7108 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7109 if (::mlir::succeeded(ImpliesOp::inferReturnTypes(odsBuilder.getContext(),
7110 odsState.location, odsState.operands,
7111 odsState.attributes.getDictionary(odsState.getContext()),
7112 odsState.getRawProperties(),
7113 odsState.regions, inferredReturnTypes)))
7114 odsState.addTypes(inferredReturnTypes);
7115 else
7116 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
7117
7118}
7119
7120void ImpliesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
7121 odsState.addOperands(lhs);
7122 odsState.addOperands(rhs);
7123 assert(resultTypes.size() == 1u && "mismatched number of results");
7124 odsState.addTypes(resultTypes);
7125}
7126
7127void ImpliesOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7128 assert(operands.size() == 2u && "mismatched number of parameters");
7129 odsState.addOperands(operands);
7130 odsState.addAttributes(attributes);
7131 assert(resultTypes.size() == 1u && "mismatched number of return types");
7132 odsState.addTypes(resultTypes);
7133}
7134
7135void ImpliesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7136 assert(operands.size() == 2u && "mismatched number of parameters");
7137 odsState.addOperands(operands);
7138 odsState.addAttributes(attributes);
7139
7140 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7141 if (::mlir::succeeded(ImpliesOp::inferReturnTypes(odsBuilder.getContext(),
7142 odsState.location, operands,
7143 odsState.attributes.getDictionary(odsState.getContext()),
7144 odsState.getRawProperties(),
7145 odsState.regions, inferredReturnTypes))) {
7146 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
7147 odsState.addTypes(inferredReturnTypes);
7148 } else {
7149 ::llvm::report_fatal_error("Failed to infer result type(s).");
7150 }
7151}
7152
7153::llvm::LogicalResult ImpliesOp::verifyInvariantsImpl() {
7154 {
7155 unsigned index = 0; (void)index;
7156 auto valueGroup0 = getODSOperands(0);
7157
7158 for (auto v : valueGroup0) {
7159 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "operand", index++)))
7160 return ::mlir::failure();
7161 }
7162 auto valueGroup1 = getODSOperands(1);
7163
7164 for (auto v : valueGroup1) {
7165 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "operand", index++)))
7166 return ::mlir::failure();
7167 }
7168 }
7169 {
7170 unsigned index = 0; (void)index;
7171 auto valueGroup0 = getODSResults(0);
7172
7173 for (auto v : valueGroup0) {
7174 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
7175 return ::mlir::failure();
7176 }
7177 }
7178 return ::mlir::success();
7179}
7180
7181::llvm::LogicalResult ImpliesOp::verifyInvariants() {
7182 return verifyInvariantsImpl();
7183}
7184
7185::llvm::LogicalResult ImpliesOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
7186 inferredReturnTypes.resize(1);
7187 ::mlir::Builder odsBuilder(context);
7188 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
7189 inferredReturnTypes[0] = odsInferredType0;
7190 return ::mlir::success();
7191}
7192
7193::mlir::ParseResult ImpliesOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7194 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
7195 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
7196 (void)lhsOperandsLoc;
7197 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
7198 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
7199 (void)rhsOperandsLoc;
7200
7201 lhsOperandsLoc = parser.getCurrentLocation();
7202 if (parser.parseOperand(lhsRawOperand))
7203 return ::mlir::failure();
7204 if (parser.parseComma())
7205 return ::mlir::failure();
7206
7207 rhsOperandsLoc = parser.getCurrentLocation();
7208 if (parser.parseOperand(rhsRawOperand))
7209 return ::mlir::failure();
7210 {
7211 auto loc = parser.getCurrentLocation();(void)loc;
7212 if (parser.parseOptionalAttrDict(result.attributes))
7213 return ::mlir::failure();
7214 }
7215 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
7216 result.addTypes(odsBuildableType0);
7217 if (parser.resolveOperands(lhsOperands, odsBuildableType0, lhsOperandsLoc, result.operands))
7218 return ::mlir::failure();
7219 if (parser.resolveOperands(rhsOperands, odsBuildableType0, rhsOperandsLoc, result.operands))
7220 return ::mlir::failure();
7221 return ::mlir::success();
7222}
7223
7224void ImpliesOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7225 _odsPrinter << ' ';
7226 _odsPrinter << getLhs();
7227 _odsPrinter << ",";
7228 _odsPrinter << ' ';
7229 _odsPrinter << getRhs();
7230 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7231 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
7232}
7233
7234void ImpliesOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7235}
7236
7237} // namespace smt
7238} // namespace llzk
7239MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ImpliesOp)
7240
7241namespace llzk {
7242namespace smt {
7243
7244//===----------------------------------------------------------------------===//
7245// ::llzk::smt::Int2BVOp definitions
7246//===----------------------------------------------------------------------===//
7247
7248namespace detail {
7249} // namespace detail
7251
7252::llvm::LogicalResult Int2BVOpAdaptor::verify(::mlir::Location loc) {
7253 return ::mlir::success();
7254}
7255
7256void Int2BVOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
7257 odsState.addOperands(input);
7258 odsState.addTypes(result);
7259}
7260
7261void Int2BVOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
7262 odsState.addOperands(input);
7263 assert(resultTypes.size() == 1u && "mismatched number of results");
7264 odsState.addTypes(resultTypes);
7265}
7266
7267void Int2BVOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7268 assert(operands.size() == 1u && "mismatched number of parameters");
7269 odsState.addOperands(operands);
7270 odsState.addAttributes(attributes);
7271 assert(resultTypes.size() == 1u && "mismatched number of return types");
7272 odsState.addTypes(resultTypes);
7273}
7274
7275::llvm::LogicalResult Int2BVOp::verifyInvariantsImpl() {
7276 {
7277 unsigned index = 0; (void)index;
7278 auto valueGroup0 = getODSOperands(0);
7279
7280 for (auto v : valueGroup0) {
7281 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
7282 return ::mlir::failure();
7283 }
7284 }
7285 {
7286 unsigned index = 0; (void)index;
7287 auto valueGroup0 = getODSResults(0);
7288
7289 for (auto v : valueGroup0) {
7290 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
7291 return ::mlir::failure();
7292 }
7293 }
7294 return ::mlir::success();
7295}
7296
7297::llvm::LogicalResult Int2BVOp::verifyInvariants() {
7298 return verifyInvariantsImpl();
7299}
7300
7301::mlir::ParseResult Int2BVOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7302 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
7303 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
7304 (void)inputOperandsLoc;
7305 ::mlir::Type resultRawType{};
7306 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
7307
7308 inputOperandsLoc = parser.getCurrentLocation();
7309 if (parser.parseOperand(inputRawOperand))
7310 return ::mlir::failure();
7311 {
7312 auto loc = parser.getCurrentLocation();(void)loc;
7313 if (parser.parseOptionalAttrDict(result.attributes))
7314 return ::mlir::failure();
7315 }
7316 if (parser.parseColon())
7317 return ::mlir::failure();
7318
7319 if (parser.parseType(resultRawType))
7320 return ::mlir::failure();
7321 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
7322 result.addTypes(resultTypes);
7323 if (parser.resolveOperands(inputOperands, odsBuildableType0, inputOperandsLoc, result.operands))
7324 return ::mlir::failure();
7325 return ::mlir::success();
7326}
7327
7328void Int2BVOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7329 _odsPrinter << ' ';
7330 _odsPrinter << getInput();
7331 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7332 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
7333 _odsPrinter << ' ' << ":";
7334 _odsPrinter << ' ';
7335 _odsPrinter << getResult().getType();
7336}
7337
7338void Int2BVOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7339}
7340
7341} // namespace smt
7342} // namespace llzk
7343MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::Int2BVOp)
7344
7345namespace llzk {
7346namespace smt {
7347
7348//===----------------------------------------------------------------------===//
7349// ::llzk::smt::IntAbsOp definitions
7350//===----------------------------------------------------------------------===//
7351
7352namespace detail {
7353} // namespace detail
7355
7356::llvm::LogicalResult IntAbsOpAdaptor::verify(::mlir::Location loc) {
7357 return ::mlir::success();
7358}
7359
7360void IntAbsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
7361 odsState.addOperands(input);
7362 odsState.addTypes(result);
7363}
7364
7365void IntAbsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
7366 odsState.addOperands(input);
7367
7368 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7369 if (::mlir::succeeded(IntAbsOp::inferReturnTypes(odsBuilder.getContext(),
7370 odsState.location, odsState.operands,
7371 odsState.attributes.getDictionary(odsState.getContext()),
7372 odsState.getRawProperties(),
7373 odsState.regions, inferredReturnTypes)))
7374 odsState.addTypes(inferredReturnTypes);
7375 else
7376 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
7377
7378}
7379
7380void IntAbsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
7381 odsState.addOperands(input);
7382 assert(resultTypes.size() == 1u && "mismatched number of results");
7383 odsState.addTypes(resultTypes);
7384}
7385
7386void IntAbsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7387 assert(operands.size() == 1u && "mismatched number of parameters");
7388 odsState.addOperands(operands);
7389 odsState.addAttributes(attributes);
7390 assert(resultTypes.size() == 1u && "mismatched number of return types");
7391 odsState.addTypes(resultTypes);
7392}
7393
7394void IntAbsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7395 assert(operands.size() == 1u && "mismatched number of parameters");
7396 odsState.addOperands(operands);
7397 odsState.addAttributes(attributes);
7398
7399 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7400 if (::mlir::succeeded(IntAbsOp::inferReturnTypes(odsBuilder.getContext(),
7401 odsState.location, operands,
7402 odsState.attributes.getDictionary(odsState.getContext()),
7403 odsState.getRawProperties(),
7404 odsState.regions, inferredReturnTypes))) {
7405 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
7406 odsState.addTypes(inferredReturnTypes);
7407 } else {
7408 ::llvm::report_fatal_error("Failed to infer result type(s).");
7409 }
7410}
7411
7412::llvm::LogicalResult IntAbsOp::verifyInvariantsImpl() {
7413 {
7414 unsigned index = 0; (void)index;
7415 auto valueGroup0 = getODSOperands(0);
7416
7417 for (auto v : valueGroup0) {
7418 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
7419 return ::mlir::failure();
7420 }
7421 }
7422 {
7423 unsigned index = 0; (void)index;
7424 auto valueGroup0 = getODSResults(0);
7425
7426 for (auto v : valueGroup0) {
7427 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
7428 return ::mlir::failure();
7429 }
7430 }
7431 return ::mlir::success();
7432}
7433
7434::llvm::LogicalResult IntAbsOp::verifyInvariants() {
7435 return verifyInvariantsImpl();
7436}
7437
7438::llvm::LogicalResult IntAbsOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
7439 inferredReturnTypes.resize(1);
7440 ::mlir::Builder odsBuilder(context);
7441 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
7442 inferredReturnTypes[0] = odsInferredType0;
7443 return ::mlir::success();
7444}
7445
7446::mlir::ParseResult IntAbsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7447 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
7448 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
7449 (void)inputOperandsLoc;
7450
7451 inputOperandsLoc = parser.getCurrentLocation();
7452 if (parser.parseOperand(inputRawOperand))
7453 return ::mlir::failure();
7454 {
7455 auto loc = parser.getCurrentLocation();(void)loc;
7456 if (parser.parseOptionalAttrDict(result.attributes))
7457 return ::mlir::failure();
7458 }
7459 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
7460 result.addTypes(odsBuildableType0);
7461 if (parser.resolveOperands(inputOperands, odsBuildableType0, inputOperandsLoc, result.operands))
7462 return ::mlir::failure();
7463 return ::mlir::success();
7464}
7465
7466void IntAbsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7467 _odsPrinter << ' ';
7468 _odsPrinter << getInput();
7469 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7470 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
7471}
7472
7473void IntAbsOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7474}
7475
7476} // namespace smt
7477} // namespace llzk
7478MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntAbsOp)
7479
7480namespace llzk {
7481namespace smt {
7482
7483//===----------------------------------------------------------------------===//
7484// ::llzk::smt::IntAddOp definitions
7485//===----------------------------------------------------------------------===//
7486
7487namespace detail {
7488std::pair<unsigned, unsigned> IntAddOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
7489 bool isVariadic[] = {true};
7490 int prevVariadicCount = 0;
7491 for (unsigned i = 0; i < index; ++i)
7492 if (isVariadic[i]) ++prevVariadicCount;
7493
7494 // Calculate how many dynamic values a static variadic operand corresponds to.
7495 // This assumes all static variadic operands have the same dynamic value count.
7496 int variadicSize = (odsOperandsSize - 0) / 1;
7497 // `index` passed in as the parameter is the static index which counts each
7498 // operand (variadic or not) as size 1. So here for each previous static variadic
7499 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
7500 // value pack for this static operand starts.
7501 int start = index + (variadicSize - 1) * prevVariadicCount;
7502 int size = isVariadic[index] ? variadicSize : 1;
7503 return {start, size};
7504}
7505
7506} // namespace detail
7508
7509::llvm::LogicalResult IntAddOpAdaptor::verify(::mlir::Location loc) {
7510 return ::mlir::success();
7511}
7512
7513std::pair<unsigned, unsigned> IntAddOp::getODSOperandIndexAndLength(unsigned index) {
7514 bool isVariadic[] = {true};
7515 int prevVariadicCount = 0;
7516 for (unsigned i = 0; i < index; ++i)
7517 if (isVariadic[i]) ++prevVariadicCount;
7518
7519 // Calculate how many dynamic values a static variadic operand corresponds to.
7520 // This assumes all static variadic operands have the same dynamic value count.
7521 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
7522 // `index` passed in as the parameter is the static index which counts each
7523 // operand (variadic or not) as size 1. So here for each previous static variadic
7524 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
7525 // value pack for this static operand starts.
7526 int start = index + (variadicSize - 1) * prevVariadicCount;
7527 int size = isVariadic[index] ? variadicSize : 1;
7528 return {start, size};
7529}
7530
7531::mlir::MutableOperandRange IntAddOp::getInputsMutable() {
7532 auto range = getODSOperandIndexAndLength(0);
7533 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
7534 return mutableRange;
7535}
7536
7537void IntAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
7538 odsState.addOperands(inputs);
7539 odsState.addTypes(result);
7540}
7541
7542void IntAddOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7543 odsState.addOperands(operands);
7544 odsState.addAttributes(attributes);
7545 assert(resultTypes.size() == 1u && "mismatched number of return types");
7546 odsState.addTypes(resultTypes);
7547}
7548
7549void IntAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7550 odsState.addOperands(operands);
7551 odsState.addAttributes(attributes);
7552
7553 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7554 if (::mlir::succeeded(IntAddOp::inferReturnTypes(odsBuilder.getContext(),
7555 odsState.location, operands,
7556 odsState.attributes.getDictionary(odsState.getContext()),
7557 odsState.getRawProperties(),
7558 odsState.regions, inferredReturnTypes))) {
7559 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
7560 odsState.addTypes(inferredReturnTypes);
7561 } else {
7562 ::llvm::report_fatal_error("Failed to infer result type(s).");
7563 }
7564}
7565
7566::llvm::LogicalResult IntAddOp::verifyInvariantsImpl() {
7567 {
7568 unsigned index = 0; (void)index;
7569 auto valueGroup0 = getODSOperands(0);
7570
7571 for (auto v : valueGroup0) {
7572 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT11(*this, v.getType(), "operand", index++)))
7573 return ::mlir::failure();
7574 }
7575 }
7576 {
7577 unsigned index = 0; (void)index;
7578 auto valueGroup0 = getODSResults(0);
7579
7580 for (auto v : valueGroup0) {
7581 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
7582 return ::mlir::failure();
7583 }
7584 }
7585 return ::mlir::success();
7586}
7587
7588::llvm::LogicalResult IntAddOp::verifyInvariants() {
7589 return verifyInvariantsImpl();
7590}
7591
7592::llvm::LogicalResult IntAddOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
7593 inferredReturnTypes.resize(1);
7594 ::mlir::Builder odsBuilder(context);
7595 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
7596 inferredReturnTypes[0] = odsInferredType0;
7597 return ::mlir::success();
7598}
7599
7600::mlir::ParseResult IntAddOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7601 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
7602 ::llvm::SMLoc inputsOperandsLoc;
7603 (void)inputsOperandsLoc;
7604
7605 inputsOperandsLoc = parser.getCurrentLocation();
7606 if (parser.parseOperandList(inputsOperands))
7607 return ::mlir::failure();
7608 {
7609 auto loc = parser.getCurrentLocation();(void)loc;
7610 if (parser.parseOptionalAttrDict(result.attributes))
7611 return ::mlir::failure();
7612 }
7613 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
7614 result.addTypes(odsBuildableType0);
7615 if (parser.resolveOperands(inputsOperands, odsBuildableType0, inputsOperandsLoc, result.operands))
7616 return ::mlir::failure();
7617 return ::mlir::success();
7618}
7619
7620void IntAddOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7621 _odsPrinter << ' ';
7622 _odsPrinter << getInputs();
7623 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7624 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
7625}
7626
7627void IntAddOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7628}
7629
7630} // namespace smt
7631} // namespace llzk
7632MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntAddOp)
7633
7634namespace llzk {
7635namespace smt {
7636
7637//===----------------------------------------------------------------------===//
7638// ::llzk::smt::IntCmpOp definitions
7639//===----------------------------------------------------------------------===//
7640
7641namespace detail {
7642IntCmpOpGenericAdaptorBase::IntCmpOpGenericAdaptorBase(IntCmpOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
7643
7645 auto attr = getPredAttr();
7646 return attr.getValue();
7647}
7648
7649} // namespace detail
7651
7652::llvm::LogicalResult IntCmpOpAdaptor::verify(::mlir::Location loc) {
7653 auto tblgen_pred = getProperties().pred; (void)tblgen_pred;
7654 if (!tblgen_pred) return emitError(loc, "'smt.int.cmp' op ""requires attribute 'pred'");
7655
7656 if (tblgen_pred && !((::llvm::isa<::llzk::smt::IntPredicateAttr>(tblgen_pred))))
7657 return emitError(loc, "'smt.int.cmp' op ""attribute 'pred' failed to satisfy constraint: smt comparison predicate for integers");
7658 return ::mlir::success();
7659}
7660
7661::llvm::LogicalResult IntCmpOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7662 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
7663 if (!dict) {
7664 emitError() << "expected DictionaryAttr to set properties";
7665 return ::mlir::failure();
7666 }
7667
7668 {
7669 auto &propStorage = prop.pred;
7670 auto attr = dict.get("pred");
7671 if (attr) {
7672 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
7673 if (convertedAttr) {
7674 propStorage = convertedAttr;
7675 } else {
7676 emitError() << "Invalid attribute `pred` in property conversion: " << attr;
7677 return ::mlir::failure();
7678 }
7679 }
7680 }
7681 return ::mlir::success();
7682}
7683
7684::mlir::Attribute IntCmpOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
7685 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
7686 ::mlir::Builder odsBuilder{ctx};
7687
7688 {
7689 const auto &propStorage = prop.pred;
7690 if (propStorage)
7691 attrs.push_back(odsBuilder.getNamedAttr("pred",
7692 propStorage));
7693 }
7694
7695 if (!attrs.empty())
7696 return odsBuilder.getDictionaryAttr(attrs);
7697 return {};
7698}
7699
7700llvm::hash_code IntCmpOp::computePropertiesHash(const Properties &prop) {
7701 return llvm::hash_combine(
7702 llvm::hash_value(prop.pred.getAsOpaquePointer()));
7703}
7704
7705std::optional<mlir::Attribute> IntCmpOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
7706 if (name == "pred")
7707 return prop.pred;
7708 return std::nullopt;
7709}
7710
7711void IntCmpOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
7712 if (name == "pred") {
7713 prop.pred = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.pred)>>(value);
7714 return;
7715 }
7716}
7717
7718void IntCmpOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
7719 if (prop.pred) attrs.append("pred", prop.pred);
7720}
7721
7722::llvm::LogicalResult IntCmpOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7723 {
7724 ::mlir::Attribute attr = attrs.get(getPredAttrName(opName));
7725 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT8(attr, "pred", emitError)))
7726 return ::mlir::failure();
7727 }
7728 return ::mlir::success();
7729}
7730
7731::llvm::LogicalResult IntCmpOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
7732 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
7733 if (::mlir::failed(reader.readAttribute(prop.pred)))
7734 return ::mlir::failure();
7735 return ::mlir::success();
7736}
7737
7738void IntCmpOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
7739 auto &prop = getProperties(); (void)prop;
7740 writer.writeAttribute(prop.pred);
7741}
7742
7744 auto attr = getPredAttr();
7745 return attr.getValue();
7746}
7747
7749 getProperties().pred = ::llzk::smt::IntPredicateAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
7750}
7751
7752void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::IntPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7753 odsState.addOperands(lhs);
7754 odsState.addOperands(rhs);
7755 odsState.getOrAddProperties<Properties>().pred = pred;
7756 odsState.addTypes(result);
7757}
7758
7759void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::IntPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7760 odsState.addOperands(lhs);
7761 odsState.addOperands(rhs);
7762 odsState.getOrAddProperties<Properties>().pred = pred;
7763
7764 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7765 if (::mlir::succeeded(IntCmpOp::inferReturnTypes(odsBuilder.getContext(),
7766 odsState.location, odsState.operands,
7767 odsState.attributes.getDictionary(odsState.getContext()),
7768 odsState.getRawProperties(),
7769 odsState.regions, inferredReturnTypes)))
7770 odsState.addTypes(inferredReturnTypes);
7771 else
7772 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
7773
7774}
7775
7776void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::IntPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7777 odsState.addOperands(lhs);
7778 odsState.addOperands(rhs);
7779 odsState.getOrAddProperties<Properties>().pred = pred;
7780 assert(resultTypes.size() == 1u && "mismatched number of results");
7781 odsState.addTypes(resultTypes);
7782}
7783
7784void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::IntPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7785 odsState.addOperands(lhs);
7786 odsState.addOperands(rhs);
7787 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::IntPredicateAttr::get(odsBuilder.getContext(), pred);
7788 odsState.addTypes(result);
7789}
7790
7791void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::IntPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7792 odsState.addOperands(lhs);
7793 odsState.addOperands(rhs);
7794 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::IntPredicateAttr::get(odsBuilder.getContext(), pred);
7795
7796 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7797 if (::mlir::succeeded(IntCmpOp::inferReturnTypes(odsBuilder.getContext(),
7798 odsState.location, odsState.operands,
7799 odsState.attributes.getDictionary(odsState.getContext()),
7800 odsState.getRawProperties(),
7801 odsState.regions, inferredReturnTypes)))
7802 odsState.addTypes(inferredReturnTypes);
7803 else
7804 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
7805
7806}
7807
7808void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::IntPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7809 odsState.addOperands(lhs);
7810 odsState.addOperands(rhs);
7811 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::IntPredicateAttr::get(odsBuilder.getContext(), pred);
7812 assert(resultTypes.size() == 1u && "mismatched number of results");
7813 odsState.addTypes(resultTypes);
7814}
7815
7816void IntCmpOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7817 assert(operands.size() == 2u && "mismatched number of parameters");
7818 odsState.addOperands(operands);
7819 odsState.addAttributes(attributes);
7820 assert(resultTypes.size() == 1u && "mismatched number of return types");
7821 odsState.addTypes(resultTypes);
7822
7823 if (!attributes.empty()) {
7824 ::mlir::OpaqueProperties properties =
7825 &odsState.getOrAddProperties<IntCmpOp::Properties>();
7826 std::optional<::mlir::RegisteredOperationName> info =
7827 odsState.name.getRegisteredInfo();
7828 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
7829 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
7830 ::llvm::report_fatal_error("Property conversion failed.");
7831 }
7832}
7833
7834void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7835 assert(operands.size() == 2u && "mismatched number of parameters");
7836 odsState.addOperands(operands);
7837 odsState.addAttributes(attributes);
7838
7839 if (!attributes.empty()) {
7840 ::mlir::OpaqueProperties properties =
7841 &odsState.getOrAddProperties<IntCmpOp::Properties>();
7842 std::optional<::mlir::RegisteredOperationName> info =
7843 odsState.name.getRegisteredInfo();
7844 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
7845 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
7846 ::llvm::report_fatal_error("Property conversion failed.");
7847 }
7848 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7849 if (::mlir::succeeded(IntCmpOp::inferReturnTypes(odsBuilder.getContext(),
7850 odsState.location, operands,
7851 odsState.attributes.getDictionary(odsState.getContext()),
7852 odsState.getRawProperties(),
7853 odsState.regions, inferredReturnTypes))) {
7854 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
7855 odsState.addTypes(inferredReturnTypes);
7856 } else {
7857 ::llvm::report_fatal_error("Failed to infer result type(s).");
7858 }
7859}
7860
7861::llvm::LogicalResult IntCmpOp::verifyInvariantsImpl() {
7862 auto tblgen_pred = getProperties().pred; (void)tblgen_pred;
7863 if (!tblgen_pred) return emitOpError("requires attribute 'pred'");
7864
7865 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT8(*this, tblgen_pred, "pred")))
7866 return ::mlir::failure();
7867 {
7868 unsigned index = 0; (void)index;
7869 auto valueGroup0 = getODSOperands(0);
7870
7871 for (auto v : valueGroup0) {
7872 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
7873 return ::mlir::failure();
7874 }
7875 auto valueGroup1 = getODSOperands(1);
7876
7877 for (auto v : valueGroup1) {
7878 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
7879 return ::mlir::failure();
7880 }
7881 }
7882 {
7883 unsigned index = 0; (void)index;
7884 auto valueGroup0 = getODSResults(0);
7885
7886 for (auto v : valueGroup0) {
7887 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
7888 return ::mlir::failure();
7889 }
7890 }
7891 return ::mlir::success();
7892}
7893
7894::llvm::LogicalResult IntCmpOp::verifyInvariants() {
7895 return verifyInvariantsImpl();
7896}
7897
7898::llvm::LogicalResult IntCmpOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
7899 inferredReturnTypes.resize(1);
7900 ::mlir::Builder odsBuilder(context);
7901 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
7902 inferredReturnTypes[0] = odsInferredType0;
7903 return ::mlir::success();
7904}
7905
7906::mlir::ParseResult IntCmpOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7908 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
7909 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
7910 (void)lhsOperandsLoc;
7911 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
7912 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
7913 (void)rhsOperandsLoc;
7914
7915 {
7916 ::llvm::StringRef attrStr;
7917 ::mlir::NamedAttrList attrStorage;
7918 auto loc = parser.getCurrentLocation();
7919 if (parser.parseOptionalKeyword(&attrStr, {"lt","le","gt","ge"})) {
7920 ::mlir::StringAttr attrVal;
7921 ::mlir::OptionalParseResult parseResult =
7922 parser.parseOptionalAttribute(attrVal,
7923 parser.getBuilder().getNoneType(),
7924 "pred", attrStorage);
7925 if (parseResult.has_value()) {
7926 if (failed(*parseResult))
7927 return ::mlir::failure();
7928 attrStr = attrVal.getValue();
7929 } else {
7930 return parser.emitError(loc, "expected string or keyword containing one of the following enum values for attribute 'pred' [lt, le, gt, ge]");
7931 }
7932 }
7933 if (!attrStr.empty()) {
7934 auto attrOptional = ::llzk::smt::symbolizeIntPredicate(attrStr);
7935 if (!attrOptional)
7936 return parser.emitError(loc, "invalid ")
7937 << "pred attribute specification: \"" << attrStr << '"';;
7938
7939 predAttr = ::llzk::smt::IntPredicateAttr::get(parser.getBuilder().getContext(), *attrOptional);
7940 result.getOrAddProperties<IntCmpOp::Properties>().pred = predAttr;
7941 }
7942 }
7943
7944 lhsOperandsLoc = parser.getCurrentLocation();
7945 if (parser.parseOperand(lhsRawOperand))
7946 return ::mlir::failure();
7947 if (parser.parseComma())
7948 return ::mlir::failure();
7949
7950 rhsOperandsLoc = parser.getCurrentLocation();
7951 if (parser.parseOperand(rhsRawOperand))
7952 return ::mlir::failure();
7953 {
7954 auto loc = parser.getCurrentLocation();(void)loc;
7955 if (parser.parseOptionalAttrDict(result.attributes))
7956 return ::mlir::failure();
7957 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
7958 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
7959 })))
7960 return ::mlir::failure();
7961 }
7962 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
7963 ::mlir::Type odsBuildableType1 = parser.getBuilder().getType<::llzk::smt::IntType>();
7964 result.addTypes(odsBuildableType0);
7965 if (parser.resolveOperands(lhsOperands, odsBuildableType1, lhsOperandsLoc, result.operands))
7966 return ::mlir::failure();
7967 if (parser.resolveOperands(rhsOperands, odsBuildableType1, rhsOperandsLoc, result.operands))
7968 return ::mlir::failure();
7969 return ::mlir::success();
7970}
7971
7972void IntCmpOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7973 _odsPrinter << ' ';
7974
7975 {
7976 auto caseValue = getPred();
7977 auto caseValueStr = stringifyIntPredicate(caseValue);
7978 _odsPrinter << caseValueStr;
7979 }
7980 _odsPrinter << ' ';
7981 _odsPrinter << getLhs();
7982 _odsPrinter << ",";
7983 _odsPrinter << ' ';
7984 _odsPrinter << getRhs();
7985 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7986 elidedAttrs.push_back("pred");
7987 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
7988}
7989
7990void IntCmpOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7991}
7992
7993} // namespace smt
7994} // namespace llzk
7995MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntCmpOp)
7996
7997namespace llzk {
7998namespace smt {
7999
8000//===----------------------------------------------------------------------===//
8001// ::llzk::smt::IntConstantOp definitions
8002//===----------------------------------------------------------------------===//
8003
8004namespace detail {
8006
8008 auto attr = getValueAttr();
8009 return attr.getValue();
8010}
8011
8012} // namespace detail
8014
8015::llvm::LogicalResult IntConstantOpAdaptor::verify(::mlir::Location loc) {
8016 auto tblgen_value = getProperties().value; (void)tblgen_value;
8017 if (!tblgen_value) return emitError(loc, "'smt.int.constant' op ""requires attribute 'value'");
8018
8019 if (tblgen_value && !((::llvm::isa<::mlir::IntegerAttr>(tblgen_value))))
8020 return emitError(loc, "'smt.int.constant' op ""attribute 'value' failed to satisfy constraint: arbitrary integer attribute");
8021 return ::mlir::success();
8022}
8023
8024::llvm::LogicalResult IntConstantOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8025 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
8026 if (!dict) {
8027 emitError() << "expected DictionaryAttr to set properties";
8028 return ::mlir::failure();
8029 }
8030
8031 {
8032 auto &propStorage = prop.value;
8033 auto attr = dict.get("value");
8034 if (attr) {
8035 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
8036 if (convertedAttr) {
8037 propStorage = convertedAttr;
8038 } else {
8039 emitError() << "Invalid attribute `value` in property conversion: " << attr;
8040 return ::mlir::failure();
8041 }
8042 }
8043 }
8044 return ::mlir::success();
8045}
8046
8047::mlir::Attribute IntConstantOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
8048 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
8049 ::mlir::Builder odsBuilder{ctx};
8050
8051 {
8052 const auto &propStorage = prop.value;
8053 if (propStorage)
8054 attrs.push_back(odsBuilder.getNamedAttr("value",
8055 propStorage));
8056 }
8057
8058 if (!attrs.empty())
8059 return odsBuilder.getDictionaryAttr(attrs);
8060 return {};
8061}
8062
8064 return llvm::hash_combine(
8065 llvm::hash_value(prop.value.getAsOpaquePointer()));
8066}
8067
8068std::optional<mlir::Attribute> IntConstantOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
8069 if (name == "value")
8070 return prop.value;
8071 return std::nullopt;
8072}
8073
8074void IntConstantOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
8075 if (name == "value") {
8076 prop.value = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.value)>>(value);
8077 return;
8078 }
8079}
8080
8081void IntConstantOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
8082 if (prop.value) attrs.append("value", prop.value);
8083}
8084
8085::llvm::LogicalResult IntConstantOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8086 {
8087 ::mlir::Attribute attr = attrs.get(getValueAttrName(opName));
8088 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT9(attr, "value", emitError)))
8089 return ::mlir::failure();
8090 }
8091 return ::mlir::success();
8092}
8093
8094::llvm::LogicalResult IntConstantOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
8095 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
8096 if (::mlir::failed(reader.readAttribute(prop.value)))
8097 return ::mlir::failure();
8098 return ::mlir::success();
8099}
8100
8101void IntConstantOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
8102 auto &prop = getProperties(); (void)prop;
8103 writer.writeAttribute(prop.value);
8104}
8105
8107 auto attr = getValueAttr();
8108 return attr.getValue();
8109}
8110
8111void IntConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::IntegerAttr value) {
8112 odsState.getOrAddProperties<Properties>().value = value;
8113 odsState.addTypes(result);
8114}
8115
8116void IntConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr value) {
8117 odsState.getOrAddProperties<Properties>().value = value;
8118
8119 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8120 if (::mlir::succeeded(IntConstantOp::inferReturnTypes(odsBuilder.getContext(),
8121 odsState.location, odsState.operands,
8122 odsState.attributes.getDictionary(odsState.getContext()),
8123 odsState.getRawProperties(),
8124 odsState.regions, inferredReturnTypes)))
8125 odsState.addTypes(inferredReturnTypes);
8126 else
8127 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8128
8129}
8130
8131void IntConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr value) {
8132 odsState.getOrAddProperties<Properties>().value = value;
8133 assert(resultTypes.size() == 1u && "mismatched number of results");
8134 odsState.addTypes(resultTypes);
8135}
8136
8137void IntConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8138 assert(operands.size() == 0u && "mismatched number of parameters");
8139 odsState.addOperands(operands);
8140 odsState.addAttributes(attributes);
8141 assert(resultTypes.size() == 1u && "mismatched number of return types");
8142 odsState.addTypes(resultTypes);
8143
8144 if (!attributes.empty()) {
8145 ::mlir::OpaqueProperties properties =
8146 &odsState.getOrAddProperties<IntConstantOp::Properties>();
8147 std::optional<::mlir::RegisteredOperationName> info =
8148 odsState.name.getRegisteredInfo();
8149 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
8150 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
8151 ::llvm::report_fatal_error("Property conversion failed.");
8152 }
8153}
8154
8155void IntConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8156 assert(operands.size() == 0u && "mismatched number of parameters");
8157 odsState.addOperands(operands);
8158 odsState.addAttributes(attributes);
8159
8160 if (!attributes.empty()) {
8161 ::mlir::OpaqueProperties properties =
8162 &odsState.getOrAddProperties<IntConstantOp::Properties>();
8163 std::optional<::mlir::RegisteredOperationName> info =
8164 odsState.name.getRegisteredInfo();
8165 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
8166 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
8167 ::llvm::report_fatal_error("Property conversion failed.");
8168 }
8169 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8170 if (::mlir::succeeded(IntConstantOp::inferReturnTypes(odsBuilder.getContext(),
8171 odsState.location, operands,
8172 odsState.attributes.getDictionary(odsState.getContext()),
8173 odsState.getRawProperties(),
8174 odsState.regions, inferredReturnTypes))) {
8175 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8176 odsState.addTypes(inferredReturnTypes);
8177 } else {
8178 ::llvm::report_fatal_error("Failed to infer result type(s).");
8179 }
8180}
8181
8183 auto tblgen_value = getProperties().value; (void)tblgen_value;
8184 if (!tblgen_value) return emitOpError("requires attribute 'value'");
8185
8186 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT9(*this, tblgen_value, "value")))
8187 return ::mlir::failure();
8188 {
8189 unsigned index = 0; (void)index;
8190 auto valueGroup0 = getODSResults(0);
8191
8192 for (auto v : valueGroup0) {
8193 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8194 return ::mlir::failure();
8195 }
8196 }
8197 return ::mlir::success();
8198}
8199
8200::llvm::LogicalResult IntConstantOp::verifyInvariants() {
8201 return verifyInvariantsImpl();
8202}
8203
8204::llvm::LogicalResult IntConstantOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
8205 inferredReturnTypes.resize(1);
8206 ::mlir::Builder odsBuilder(context);
8207 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8208 inferredReturnTypes[0] = odsInferredType0;
8209 return ::mlir::success();
8210}
8211
8212void IntConstantOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8213}
8214
8215} // namespace smt
8216} // namespace llzk
8217MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntConstantOp)
8218
8219namespace llzk {
8220namespace smt {
8221
8222//===----------------------------------------------------------------------===//
8223// ::llzk::smt::IntDivOp definitions
8224//===----------------------------------------------------------------------===//
8225
8226namespace detail {
8227} // namespace detail
8229
8230::llvm::LogicalResult IntDivOpAdaptor::verify(::mlir::Location loc) {
8231 return ::mlir::success();
8232}
8233
8234void IntDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
8235 odsState.addOperands(lhs);
8236 odsState.addOperands(rhs);
8237 odsState.addTypes(result);
8238}
8239
8240void IntDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
8241 odsState.addOperands(lhs);
8242 odsState.addOperands(rhs);
8243
8244 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8245 if (::mlir::succeeded(IntDivOp::inferReturnTypes(odsBuilder.getContext(),
8246 odsState.location, odsState.operands,
8247 odsState.attributes.getDictionary(odsState.getContext()),
8248 odsState.getRawProperties(),
8249 odsState.regions, inferredReturnTypes)))
8250 odsState.addTypes(inferredReturnTypes);
8251 else
8252 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8253
8254}
8255
8256void IntDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
8257 odsState.addOperands(lhs);
8258 odsState.addOperands(rhs);
8259 assert(resultTypes.size() == 1u && "mismatched number of results");
8260 odsState.addTypes(resultTypes);
8261}
8262
8263void IntDivOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8264 assert(operands.size() == 2u && "mismatched number of parameters");
8265 odsState.addOperands(operands);
8266 odsState.addAttributes(attributes);
8267 assert(resultTypes.size() == 1u && "mismatched number of return types");
8268 odsState.addTypes(resultTypes);
8269}
8270
8271void IntDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8272 assert(operands.size() == 2u && "mismatched number of parameters");
8273 odsState.addOperands(operands);
8274 odsState.addAttributes(attributes);
8275
8276 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8277 if (::mlir::succeeded(IntDivOp::inferReturnTypes(odsBuilder.getContext(),
8278 odsState.location, operands,
8279 odsState.attributes.getDictionary(odsState.getContext()),
8280 odsState.getRawProperties(),
8281 odsState.regions, inferredReturnTypes))) {
8282 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8283 odsState.addTypes(inferredReturnTypes);
8284 } else {
8285 ::llvm::report_fatal_error("Failed to infer result type(s).");
8286 }
8287}
8288
8289::llvm::LogicalResult IntDivOp::verifyInvariantsImpl() {
8290 {
8291 unsigned index = 0; (void)index;
8292 auto valueGroup0 = getODSOperands(0);
8293
8294 for (auto v : valueGroup0) {
8295 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8296 return ::mlir::failure();
8297 }
8298 auto valueGroup1 = getODSOperands(1);
8299
8300 for (auto v : valueGroup1) {
8301 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8302 return ::mlir::failure();
8303 }
8304 }
8305 {
8306 unsigned index = 0; (void)index;
8307 auto valueGroup0 = getODSResults(0);
8308
8309 for (auto v : valueGroup0) {
8310 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8311 return ::mlir::failure();
8312 }
8313 }
8314 return ::mlir::success();
8315}
8316
8317::llvm::LogicalResult IntDivOp::verifyInvariants() {
8318 return verifyInvariantsImpl();
8319}
8320
8321::llvm::LogicalResult IntDivOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
8322 inferredReturnTypes.resize(1);
8323 ::mlir::Builder odsBuilder(context);
8324 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8325 inferredReturnTypes[0] = odsInferredType0;
8326 return ::mlir::success();
8327}
8328
8329::mlir::ParseResult IntDivOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8330 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
8331 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
8332 (void)lhsOperandsLoc;
8333 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
8334 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
8335 (void)rhsOperandsLoc;
8336
8337 lhsOperandsLoc = parser.getCurrentLocation();
8338 if (parser.parseOperand(lhsRawOperand))
8339 return ::mlir::failure();
8340 if (parser.parseComma())
8341 return ::mlir::failure();
8342
8343 rhsOperandsLoc = parser.getCurrentLocation();
8344 if (parser.parseOperand(rhsRawOperand))
8345 return ::mlir::failure();
8346 {
8347 auto loc = parser.getCurrentLocation();(void)loc;
8348 if (parser.parseOptionalAttrDict(result.attributes))
8349 return ::mlir::failure();
8350 }
8351 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
8352 result.addTypes(odsBuildableType0);
8353 if (parser.resolveOperands(lhsOperands, odsBuildableType0, lhsOperandsLoc, result.operands))
8354 return ::mlir::failure();
8355 if (parser.resolveOperands(rhsOperands, odsBuildableType0, rhsOperandsLoc, result.operands))
8356 return ::mlir::failure();
8357 return ::mlir::success();
8358}
8359
8360void IntDivOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
8361 _odsPrinter << ' ';
8362 _odsPrinter << getLhs();
8363 _odsPrinter << ",";
8364 _odsPrinter << ' ';
8365 _odsPrinter << getRhs();
8366 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
8367 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
8368}
8369
8370void IntDivOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8371}
8372
8373} // namespace smt
8374} // namespace llzk
8375MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntDivOp)
8376
8377namespace llzk {
8378namespace smt {
8379
8380//===----------------------------------------------------------------------===//
8381// ::llzk::smt::IntModOp definitions
8382//===----------------------------------------------------------------------===//
8383
8384namespace detail {
8385} // namespace detail
8387
8388::llvm::LogicalResult IntModOpAdaptor::verify(::mlir::Location loc) {
8389 return ::mlir::success();
8390}
8391
8392void IntModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
8393 odsState.addOperands(lhs);
8394 odsState.addOperands(rhs);
8395 odsState.addTypes(result);
8396}
8397
8398void IntModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
8399 odsState.addOperands(lhs);
8400 odsState.addOperands(rhs);
8401
8402 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8403 if (::mlir::succeeded(IntModOp::inferReturnTypes(odsBuilder.getContext(),
8404 odsState.location, odsState.operands,
8405 odsState.attributes.getDictionary(odsState.getContext()),
8406 odsState.getRawProperties(),
8407 odsState.regions, inferredReturnTypes)))
8408 odsState.addTypes(inferredReturnTypes);
8409 else
8410 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8411
8412}
8413
8414void IntModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
8415 odsState.addOperands(lhs);
8416 odsState.addOperands(rhs);
8417 assert(resultTypes.size() == 1u && "mismatched number of results");
8418 odsState.addTypes(resultTypes);
8419}
8420
8421void IntModOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8422 assert(operands.size() == 2u && "mismatched number of parameters");
8423 odsState.addOperands(operands);
8424 odsState.addAttributes(attributes);
8425 assert(resultTypes.size() == 1u && "mismatched number of return types");
8426 odsState.addTypes(resultTypes);
8427}
8428
8429void IntModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8430 assert(operands.size() == 2u && "mismatched number of parameters");
8431 odsState.addOperands(operands);
8432 odsState.addAttributes(attributes);
8433
8434 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8435 if (::mlir::succeeded(IntModOp::inferReturnTypes(odsBuilder.getContext(),
8436 odsState.location, operands,
8437 odsState.attributes.getDictionary(odsState.getContext()),
8438 odsState.getRawProperties(),
8439 odsState.regions, inferredReturnTypes))) {
8440 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8441 odsState.addTypes(inferredReturnTypes);
8442 } else {
8443 ::llvm::report_fatal_error("Failed to infer result type(s).");
8444 }
8445}
8446
8447::llvm::LogicalResult IntModOp::verifyInvariantsImpl() {
8448 {
8449 unsigned index = 0; (void)index;
8450 auto valueGroup0 = getODSOperands(0);
8451
8452 for (auto v : valueGroup0) {
8453 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8454 return ::mlir::failure();
8455 }
8456 auto valueGroup1 = getODSOperands(1);
8457
8458 for (auto v : valueGroup1) {
8459 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8460 return ::mlir::failure();
8461 }
8462 }
8463 {
8464 unsigned index = 0; (void)index;
8465 auto valueGroup0 = getODSResults(0);
8466
8467 for (auto v : valueGroup0) {
8468 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8469 return ::mlir::failure();
8470 }
8471 }
8472 return ::mlir::success();
8473}
8474
8475::llvm::LogicalResult IntModOp::verifyInvariants() {
8476 return verifyInvariantsImpl();
8477}
8478
8479::llvm::LogicalResult IntModOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
8480 inferredReturnTypes.resize(1);
8481 ::mlir::Builder odsBuilder(context);
8482 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8483 inferredReturnTypes[0] = odsInferredType0;
8484 return ::mlir::success();
8485}
8486
8487::mlir::ParseResult IntModOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8488 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
8489 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
8490 (void)lhsOperandsLoc;
8491 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
8492 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
8493 (void)rhsOperandsLoc;
8494
8495 lhsOperandsLoc = parser.getCurrentLocation();
8496 if (parser.parseOperand(lhsRawOperand))
8497 return ::mlir::failure();
8498 if (parser.parseComma())
8499 return ::mlir::failure();
8500
8501 rhsOperandsLoc = parser.getCurrentLocation();
8502 if (parser.parseOperand(rhsRawOperand))
8503 return ::mlir::failure();
8504 {
8505 auto loc = parser.getCurrentLocation();(void)loc;
8506 if (parser.parseOptionalAttrDict(result.attributes))
8507 return ::mlir::failure();
8508 }
8509 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
8510 result.addTypes(odsBuildableType0);
8511 if (parser.resolveOperands(lhsOperands, odsBuildableType0, lhsOperandsLoc, result.operands))
8512 return ::mlir::failure();
8513 if (parser.resolveOperands(rhsOperands, odsBuildableType0, rhsOperandsLoc, result.operands))
8514 return ::mlir::failure();
8515 return ::mlir::success();
8516}
8517
8518void IntModOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
8519 _odsPrinter << ' ';
8520 _odsPrinter << getLhs();
8521 _odsPrinter << ",";
8522 _odsPrinter << ' ';
8523 _odsPrinter << getRhs();
8524 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
8525 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
8526}
8527
8528void IntModOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8529}
8530
8531} // namespace smt
8532} // namespace llzk
8533MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntModOp)
8534
8535namespace llzk {
8536namespace smt {
8537
8538//===----------------------------------------------------------------------===//
8539// ::llzk::smt::IntMulOp definitions
8540//===----------------------------------------------------------------------===//
8541
8542namespace detail {
8543std::pair<unsigned, unsigned> IntMulOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
8544 bool isVariadic[] = {true};
8545 int prevVariadicCount = 0;
8546 for (unsigned i = 0; i < index; ++i)
8547 if (isVariadic[i]) ++prevVariadicCount;
8548
8549 // Calculate how many dynamic values a static variadic operand corresponds to.
8550 // This assumes all static variadic operands have the same dynamic value count.
8551 int variadicSize = (odsOperandsSize - 0) / 1;
8552 // `index` passed in as the parameter is the static index which counts each
8553 // operand (variadic or not) as size 1. So here for each previous static variadic
8554 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
8555 // value pack for this static operand starts.
8556 int start = index + (variadicSize - 1) * prevVariadicCount;
8557 int size = isVariadic[index] ? variadicSize : 1;
8558 return {start, size};
8559}
8560
8561} // namespace detail
8563
8564::llvm::LogicalResult IntMulOpAdaptor::verify(::mlir::Location loc) {
8565 return ::mlir::success();
8566}
8567
8568std::pair<unsigned, unsigned> IntMulOp::getODSOperandIndexAndLength(unsigned index) {
8569 bool isVariadic[] = {true};
8570 int prevVariadicCount = 0;
8571 for (unsigned i = 0; i < index; ++i)
8572 if (isVariadic[i]) ++prevVariadicCount;
8573
8574 // Calculate how many dynamic values a static variadic operand corresponds to.
8575 // This assumes all static variadic operands have the same dynamic value count.
8576 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
8577 // `index` passed in as the parameter is the static index which counts each
8578 // operand (variadic or not) as size 1. So here for each previous static variadic
8579 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
8580 // value pack for this static operand starts.
8581 int start = index + (variadicSize - 1) * prevVariadicCount;
8582 int size = isVariadic[index] ? variadicSize : 1;
8583 return {start, size};
8584}
8585
8586::mlir::MutableOperandRange IntMulOp::getInputsMutable() {
8587 auto range = getODSOperandIndexAndLength(0);
8588 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
8589 return mutableRange;
8590}
8591
8592void IntMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
8593 odsState.addOperands(inputs);
8594 odsState.addTypes(result);
8595}
8596
8597void IntMulOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8598 odsState.addOperands(operands);
8599 odsState.addAttributes(attributes);
8600 assert(resultTypes.size() == 1u && "mismatched number of return types");
8601 odsState.addTypes(resultTypes);
8602}
8603
8604void IntMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8605 odsState.addOperands(operands);
8606 odsState.addAttributes(attributes);
8607
8608 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8609 if (::mlir::succeeded(IntMulOp::inferReturnTypes(odsBuilder.getContext(),
8610 odsState.location, operands,
8611 odsState.attributes.getDictionary(odsState.getContext()),
8612 odsState.getRawProperties(),
8613 odsState.regions, inferredReturnTypes))) {
8614 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8615 odsState.addTypes(inferredReturnTypes);
8616 } else {
8617 ::llvm::report_fatal_error("Failed to infer result type(s).");
8618 }
8619}
8620
8621::llvm::LogicalResult IntMulOp::verifyInvariantsImpl() {
8622 {
8623 unsigned index = 0; (void)index;
8624 auto valueGroup0 = getODSOperands(0);
8625
8626 for (auto v : valueGroup0) {
8627 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT11(*this, v.getType(), "operand", index++)))
8628 return ::mlir::failure();
8629 }
8630 }
8631 {
8632 unsigned index = 0; (void)index;
8633 auto valueGroup0 = getODSResults(0);
8634
8635 for (auto v : valueGroup0) {
8636 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8637 return ::mlir::failure();
8638 }
8639 }
8640 return ::mlir::success();
8641}
8642
8643::llvm::LogicalResult IntMulOp::verifyInvariants() {
8644 return verifyInvariantsImpl();
8645}
8646
8647::llvm::LogicalResult IntMulOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
8648 inferredReturnTypes.resize(1);
8649 ::mlir::Builder odsBuilder(context);
8650 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8651 inferredReturnTypes[0] = odsInferredType0;
8652 return ::mlir::success();
8653}
8654
8655::mlir::ParseResult IntMulOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8656 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
8657 ::llvm::SMLoc inputsOperandsLoc;
8658 (void)inputsOperandsLoc;
8659
8660 inputsOperandsLoc = parser.getCurrentLocation();
8661 if (parser.parseOperandList(inputsOperands))
8662 return ::mlir::failure();
8663 {
8664 auto loc = parser.getCurrentLocation();(void)loc;
8665 if (parser.parseOptionalAttrDict(result.attributes))
8666 return ::mlir::failure();
8667 }
8668 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
8669 result.addTypes(odsBuildableType0);
8670 if (parser.resolveOperands(inputsOperands, odsBuildableType0, inputsOperandsLoc, result.operands))
8671 return ::mlir::failure();
8672 return ::mlir::success();
8673}
8674
8675void IntMulOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
8676 _odsPrinter << ' ';
8677 _odsPrinter << getInputs();
8678 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
8679 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
8680}
8681
8682void IntMulOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8683}
8684
8685} // namespace smt
8686} // namespace llzk
8687MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntMulOp)
8688
8689namespace llzk {
8690namespace smt {
8691
8692//===----------------------------------------------------------------------===//
8693// ::llzk::smt::IntNegOp definitions
8694//===----------------------------------------------------------------------===//
8695
8696namespace detail {
8697} // namespace detail
8699
8700::llvm::LogicalResult IntNegOpAdaptor::verify(::mlir::Location loc) {
8701 return ::mlir::success();
8702}
8703
8704void IntNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
8705 odsState.addOperands(input);
8706 odsState.addTypes(result);
8707}
8708
8709void IntNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
8710 odsState.addOperands(input);
8711
8712 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8713 if (::mlir::succeeded(IntNegOp::inferReturnTypes(odsBuilder.getContext(),
8714 odsState.location, odsState.operands,
8715 odsState.attributes.getDictionary(odsState.getContext()),
8716 odsState.getRawProperties(),
8717 odsState.regions, inferredReturnTypes)))
8718 odsState.addTypes(inferredReturnTypes);
8719 else
8720 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8721
8722}
8723
8724void IntNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
8725 odsState.addOperands(input);
8726 assert(resultTypes.size() == 1u && "mismatched number of results");
8727 odsState.addTypes(resultTypes);
8728}
8729
8730void IntNegOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8731 assert(operands.size() == 1u && "mismatched number of parameters");
8732 odsState.addOperands(operands);
8733 odsState.addAttributes(attributes);
8734 assert(resultTypes.size() == 1u && "mismatched number of return types");
8735 odsState.addTypes(resultTypes);
8736}
8737
8738void IntNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8739 assert(operands.size() == 1u && "mismatched number of parameters");
8740 odsState.addOperands(operands);
8741 odsState.addAttributes(attributes);
8742
8743 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8744 if (::mlir::succeeded(IntNegOp::inferReturnTypes(odsBuilder.getContext(),
8745 odsState.location, operands,
8746 odsState.attributes.getDictionary(odsState.getContext()),
8747 odsState.getRawProperties(),
8748 odsState.regions, inferredReturnTypes))) {
8749 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8750 odsState.addTypes(inferredReturnTypes);
8751 } else {
8752 ::llvm::report_fatal_error("Failed to infer result type(s).");
8753 }
8754}
8755
8756::llvm::LogicalResult IntNegOp::verifyInvariantsImpl() {
8757 {
8758 unsigned index = 0; (void)index;
8759 auto valueGroup0 = getODSOperands(0);
8760
8761 for (auto v : valueGroup0) {
8762 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8763 return ::mlir::failure();
8764 }
8765 }
8766 {
8767 unsigned index = 0; (void)index;
8768 auto valueGroup0 = getODSResults(0);
8769
8770 for (auto v : valueGroup0) {
8771 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8772 return ::mlir::failure();
8773 }
8774 }
8775 return ::mlir::success();
8776}
8777
8778::llvm::LogicalResult IntNegOp::verifyInvariants() {
8779 return verifyInvariantsImpl();
8780}
8781
8782::llvm::LogicalResult IntNegOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
8783 inferredReturnTypes.resize(1);
8784 ::mlir::Builder odsBuilder(context);
8785 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8786 inferredReturnTypes[0] = odsInferredType0;
8787 return ::mlir::success();
8788}
8789
8790::mlir::ParseResult IntNegOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8791 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
8792 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
8793 (void)inputOperandsLoc;
8794
8795 inputOperandsLoc = parser.getCurrentLocation();
8796 if (parser.parseOperand(inputRawOperand))
8797 return ::mlir::failure();
8798 {
8799 auto loc = parser.getCurrentLocation();(void)loc;
8800 if (parser.parseOptionalAttrDict(result.attributes))
8801 return ::mlir::failure();
8802 }
8803 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
8804 result.addTypes(odsBuildableType0);
8805 if (parser.resolveOperands(inputOperands, odsBuildableType0, inputOperandsLoc, result.operands))
8806 return ::mlir::failure();
8807 return ::mlir::success();
8808}
8809
8810void IntNegOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
8811 _odsPrinter << ' ';
8812 _odsPrinter << getInput();
8813 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
8814 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
8815}
8816
8817void IntNegOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8818}
8819
8820} // namespace smt
8821} // namespace llzk
8822MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntNegOp)
8823
8824namespace llzk {
8825namespace smt {
8826
8827//===----------------------------------------------------------------------===//
8828// ::llzk::smt::IntSubOp definitions
8829//===----------------------------------------------------------------------===//
8830
8831namespace detail {
8832} // namespace detail
8834
8835::llvm::LogicalResult IntSubOpAdaptor::verify(::mlir::Location loc) {
8836 return ::mlir::success();
8837}
8838
8839void IntSubOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
8840 odsState.addOperands(lhs);
8841 odsState.addOperands(rhs);
8842 odsState.addTypes(result);
8843}
8844
8845void IntSubOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
8846 odsState.addOperands(lhs);
8847 odsState.addOperands(rhs);
8848
8849 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8850 if (::mlir::succeeded(IntSubOp::inferReturnTypes(odsBuilder.getContext(),
8851 odsState.location, odsState.operands,
8852 odsState.attributes.getDictionary(odsState.getContext()),
8853 odsState.getRawProperties(),
8854 odsState.regions, inferredReturnTypes)))
8855 odsState.addTypes(inferredReturnTypes);
8856 else
8857 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8858
8859}
8860
8861void IntSubOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
8862 odsState.addOperands(lhs);
8863 odsState.addOperands(rhs);
8864 assert(resultTypes.size() == 1u && "mismatched number of results");
8865 odsState.addTypes(resultTypes);
8866}
8867
8868void IntSubOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8869 assert(operands.size() == 2u && "mismatched number of parameters");
8870 odsState.addOperands(operands);
8871 odsState.addAttributes(attributes);
8872 assert(resultTypes.size() == 1u && "mismatched number of return types");
8873 odsState.addTypes(resultTypes);
8874}
8875
8876void IntSubOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8877 assert(operands.size() == 2u && "mismatched number of parameters");
8878 odsState.addOperands(operands);
8879 odsState.addAttributes(attributes);
8880
8881 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8882 if (::mlir::succeeded(IntSubOp::inferReturnTypes(odsBuilder.getContext(),
8883 odsState.location, operands,
8884 odsState.attributes.getDictionary(odsState.getContext()),
8885 odsState.getRawProperties(),
8886 odsState.regions, inferredReturnTypes))) {
8887 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8888 odsState.addTypes(inferredReturnTypes);
8889 } else {
8890 ::llvm::report_fatal_error("Failed to infer result type(s).");
8891 }
8892}
8893
8894::llvm::LogicalResult IntSubOp::verifyInvariantsImpl() {
8895 {
8896 unsigned index = 0; (void)index;
8897 auto valueGroup0 = getODSOperands(0);
8898
8899 for (auto v : valueGroup0) {
8900 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8901 return ::mlir::failure();
8902 }
8903 auto valueGroup1 = getODSOperands(1);
8904
8905 for (auto v : valueGroup1) {
8906 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8907 return ::mlir::failure();
8908 }
8909 }
8910 {
8911 unsigned index = 0; (void)index;
8912 auto valueGroup0 = getODSResults(0);
8913
8914 for (auto v : valueGroup0) {
8915 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8916 return ::mlir::failure();
8917 }
8918 }
8919 return ::mlir::success();
8920}
8921
8922::llvm::LogicalResult IntSubOp::verifyInvariants() {
8923 return verifyInvariantsImpl();
8924}
8925
8926::llvm::LogicalResult IntSubOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
8927 inferredReturnTypes.resize(1);
8928 ::mlir::Builder odsBuilder(context);
8929 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8930 inferredReturnTypes[0] = odsInferredType0;
8931 return ::mlir::success();
8932}
8933
8934::mlir::ParseResult IntSubOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8935 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
8936 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
8937 (void)lhsOperandsLoc;
8938 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
8939 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
8940 (void)rhsOperandsLoc;
8941
8942 lhsOperandsLoc = parser.getCurrentLocation();
8943 if (parser.parseOperand(lhsRawOperand))
8944 return ::mlir::failure();
8945 if (parser.parseComma())
8946 return ::mlir::failure();
8947
8948 rhsOperandsLoc = parser.getCurrentLocation();
8949 if (parser.parseOperand(rhsRawOperand))
8950 return ::mlir::failure();
8951 {
8952 auto loc = parser.getCurrentLocation();(void)loc;
8953 if (parser.parseOptionalAttrDict(result.attributes))
8954 return ::mlir::failure();
8955 }
8956 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
8957 result.addTypes(odsBuildableType0);
8958 if (parser.resolveOperands(lhsOperands, odsBuildableType0, lhsOperandsLoc, result.operands))
8959 return ::mlir::failure();
8960 if (parser.resolveOperands(rhsOperands, odsBuildableType0, rhsOperandsLoc, result.operands))
8961 return ::mlir::failure();
8962 return ::mlir::success();
8963}
8964
8965void IntSubOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
8966 _odsPrinter << ' ';
8967 _odsPrinter << getLhs();
8968 _odsPrinter << ",";
8969 _odsPrinter << ' ';
8970 _odsPrinter << getRhs();
8971 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
8972 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
8973}
8974
8975void IntSubOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8976}
8977
8978} // namespace smt
8979} // namespace llzk
8980MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntSubOp)
8981
8982namespace llzk {
8983namespace smt {
8984
8985//===----------------------------------------------------------------------===//
8986// ::llzk::smt::IteOp definitions
8987//===----------------------------------------------------------------------===//
8988
8989namespace detail {
8990} // namespace detail
8992
8993::llvm::LogicalResult IteOpAdaptor::verify(::mlir::Location loc) {
8994 return ::mlir::success();
8995}
8996
8997void IteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value cond, ::mlir::Value thenValue, ::mlir::Value elseValue) {
8998 odsState.addOperands(cond);
8999 odsState.addOperands(thenValue);
9000 odsState.addOperands(elseValue);
9001 odsState.addTypes(result);
9002}
9003
9004void IteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value cond, ::mlir::Value thenValue, ::mlir::Value elseValue) {
9005 odsState.addOperands(cond);
9006 odsState.addOperands(thenValue);
9007 odsState.addOperands(elseValue);
9008
9009 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
9010 if (::mlir::succeeded(IteOp::inferReturnTypes(odsBuilder.getContext(),
9011 odsState.location, odsState.operands,
9012 odsState.attributes.getDictionary(odsState.getContext()),
9013 odsState.getRawProperties(),
9014 odsState.regions, inferredReturnTypes)))
9015 odsState.addTypes(inferredReturnTypes);
9016 else
9017 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
9018
9019}
9020
9021void IteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::mlir::Value thenValue, ::mlir::Value elseValue) {
9022 odsState.addOperands(cond);
9023 odsState.addOperands(thenValue);
9024 odsState.addOperands(elseValue);
9025 assert(resultTypes.size() == 1u && "mismatched number of results");
9026 odsState.addTypes(resultTypes);
9027}
9028
9029void IteOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9030 assert(operands.size() == 3u && "mismatched number of parameters");
9031 odsState.addOperands(operands);
9032 odsState.addAttributes(attributes);
9033 assert(resultTypes.size() == 1u && "mismatched number of return types");
9034 odsState.addTypes(resultTypes);
9035}
9036
9037void IteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9038 assert(operands.size() == 3u && "mismatched number of parameters");
9039 odsState.addOperands(operands);
9040 odsState.addAttributes(attributes);
9041
9042 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
9043 if (::mlir::succeeded(IteOp::inferReturnTypes(odsBuilder.getContext(),
9044 odsState.location, operands,
9045 odsState.attributes.getDictionary(odsState.getContext()),
9046 odsState.getRawProperties(),
9047 odsState.regions, inferredReturnTypes))) {
9048 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
9049 odsState.addTypes(inferredReturnTypes);
9050 } else {
9051 ::llvm::report_fatal_error("Failed to infer result type(s).");
9052 }
9053}
9054
9055::llvm::LogicalResult IteOp::verifyInvariantsImpl() {
9056 {
9057 unsigned index = 0; (void)index;
9058 auto valueGroup0 = getODSOperands(0);
9059
9060 for (auto v : valueGroup0) {
9061 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "operand", index++)))
9062 return ::mlir::failure();
9063 }
9064 auto valueGroup1 = getODSOperands(1);
9065
9066 for (auto v : valueGroup1) {
9067 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
9068 return ::mlir::failure();
9069 }
9070 auto valueGroup2 = getODSOperands(2);
9071
9072 for (auto v : valueGroup2) {
9073 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
9074 return ::mlir::failure();
9075 }
9076 }
9077 {
9078 unsigned index = 0; (void)index;
9079 auto valueGroup0 = getODSResults(0);
9080
9081 for (auto v : valueGroup0) {
9082 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "result", index++)))
9083 return ::mlir::failure();
9084 }
9085 }
9086 if (!((((*this->getODSOperands(1).begin()).getType()) == ((*this->getODSOperands(2).begin()).getType()) && ((*this->getODSOperands(2).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()) && ((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(1).begin()).getType()))))
9087 return emitOpError("failed to verify that all of {thenValue, elseValue, result} have same type");
9088 return ::mlir::success();
9089}
9090
9091::llvm::LogicalResult IteOp::verifyInvariants() {
9092 return verifyInvariantsImpl();
9093}
9094
9095::llvm::LogicalResult IteOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
9096 inferredReturnTypes.resize(1);
9097 ::mlir::Builder odsBuilder(context);
9098 if (operands.size() <= 2)
9099 return ::mlir::failure();
9100 ::mlir::Type odsInferredType0 = operands[2].getType();
9101 inferredReturnTypes[0] = odsInferredType0;
9102 return ::mlir::success();
9103}
9104
9105::mlir::ParseResult IteOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9106 ::mlir::OpAsmParser::UnresolvedOperand condRawOperand{};
9107 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> condOperands(&condRawOperand, 1); ::llvm::SMLoc condOperandsLoc;
9108 (void)condOperandsLoc;
9109 ::mlir::OpAsmParser::UnresolvedOperand thenValueRawOperand{};
9110 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> thenValueOperands(&thenValueRawOperand, 1); ::llvm::SMLoc thenValueOperandsLoc;
9111 (void)thenValueOperandsLoc;
9112 ::mlir::OpAsmParser::UnresolvedOperand elseValueRawOperand{};
9113 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> elseValueOperands(&elseValueRawOperand, 1); ::llvm::SMLoc elseValueOperandsLoc;
9114 (void)elseValueOperandsLoc;
9115 ::mlir::Type resultRawType{};
9116 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
9117
9118 condOperandsLoc = parser.getCurrentLocation();
9119 if (parser.parseOperand(condRawOperand))
9120 return ::mlir::failure();
9121 if (parser.parseComma())
9122 return ::mlir::failure();
9123
9124 thenValueOperandsLoc = parser.getCurrentLocation();
9125 if (parser.parseOperand(thenValueRawOperand))
9126 return ::mlir::failure();
9127 if (parser.parseComma())
9128 return ::mlir::failure();
9129
9130 elseValueOperandsLoc = parser.getCurrentLocation();
9131 if (parser.parseOperand(elseValueRawOperand))
9132 return ::mlir::failure();
9133 {
9134 auto loc = parser.getCurrentLocation();(void)loc;
9135 if (parser.parseOptionalAttrDict(result.attributes))
9136 return ::mlir::failure();
9137 }
9138 if (parser.parseColon())
9139 return ::mlir::failure();
9140
9141 if (parser.parseType(resultRawType))
9142 return ::mlir::failure();
9143 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
9144 result.addTypes(resultTypes);
9145 if (parser.resolveOperands(condOperands, odsBuildableType0, condOperandsLoc, result.operands))
9146 return ::mlir::failure();
9147 if (parser.resolveOperands(thenValueOperands, resultTypes[0], thenValueOperandsLoc, result.operands))
9148 return ::mlir::failure();
9149 if (parser.resolveOperands(elseValueOperands, resultTypes[0], elseValueOperandsLoc, result.operands))
9150 return ::mlir::failure();
9151 return ::mlir::success();
9152}
9153
9154void IteOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9155 _odsPrinter << ' ';
9156 _odsPrinter << getCond();
9157 _odsPrinter << ",";
9158 _odsPrinter << ' ';
9159 _odsPrinter << getThenValue();
9160 _odsPrinter << ",";
9161 _odsPrinter << ' ';
9162 _odsPrinter << getElseValue();
9163 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9164 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9165 _odsPrinter << ' ' << ":";
9166 _odsPrinter << ' ';
9167 _odsPrinter << getResult().getType();
9168}
9169
9170void IteOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9171}
9172
9173} // namespace smt
9174} // namespace llzk
9175MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IteOp)
9176
9177namespace llzk {
9178namespace smt {
9179
9180//===----------------------------------------------------------------------===//
9181// ::llzk::smt::NotOp definitions
9182//===----------------------------------------------------------------------===//
9183
9184namespace detail {
9185} // namespace detail
9187
9188::llvm::LogicalResult NotOpAdaptor::verify(::mlir::Location loc) {
9189 return ::mlir::success();
9190}
9191
9192void NotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
9193 odsState.addOperands(input);
9194 odsState.addTypes(result);
9195}
9196
9197void NotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
9198 odsState.addOperands(input);
9199
9200 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
9201 if (::mlir::succeeded(NotOp::inferReturnTypes(odsBuilder.getContext(),
9202 odsState.location, odsState.operands,
9203 odsState.attributes.getDictionary(odsState.getContext()),
9204 odsState.getRawProperties(),
9205 odsState.regions, inferredReturnTypes)))
9206 odsState.addTypes(inferredReturnTypes);
9207 else
9208 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
9209
9210}
9211
9212void NotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
9213 odsState.addOperands(input);
9214 assert(resultTypes.size() == 1u && "mismatched number of results");
9215 odsState.addTypes(resultTypes);
9216}
9217
9218void NotOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9219 assert(operands.size() == 1u && "mismatched number of parameters");
9220 odsState.addOperands(operands);
9221 odsState.addAttributes(attributes);
9222 assert(resultTypes.size() == 1u && "mismatched number of return types");
9223 odsState.addTypes(resultTypes);
9224}
9225
9226void NotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9227 assert(operands.size() == 1u && "mismatched number of parameters");
9228 odsState.addOperands(operands);
9229 odsState.addAttributes(attributes);
9230
9231 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
9232 if (::mlir::succeeded(NotOp::inferReturnTypes(odsBuilder.getContext(),
9233 odsState.location, operands,
9234 odsState.attributes.getDictionary(odsState.getContext()),
9235 odsState.getRawProperties(),
9236 odsState.regions, inferredReturnTypes))) {
9237 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
9238 odsState.addTypes(inferredReturnTypes);
9239 } else {
9240 ::llvm::report_fatal_error("Failed to infer result type(s).");
9241 }
9242}
9243
9244::llvm::LogicalResult NotOp::verifyInvariantsImpl() {
9245 {
9246 unsigned index = 0; (void)index;
9247 auto valueGroup0 = getODSOperands(0);
9248
9249 for (auto v : valueGroup0) {
9250 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "operand", index++)))
9251 return ::mlir::failure();
9252 }
9253 }
9254 {
9255 unsigned index = 0; (void)index;
9256 auto valueGroup0 = getODSResults(0);
9257
9258 for (auto v : valueGroup0) {
9259 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
9260 return ::mlir::failure();
9261 }
9262 }
9263 return ::mlir::success();
9264}
9265
9266::llvm::LogicalResult NotOp::verifyInvariants() {
9267 return verifyInvariantsImpl();
9268}
9269
9270::llvm::LogicalResult NotOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
9271 inferredReturnTypes.resize(1);
9272 ::mlir::Builder odsBuilder(context);
9273 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
9274 inferredReturnTypes[0] = odsInferredType0;
9275 return ::mlir::success();
9276}
9277
9278::mlir::ParseResult NotOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9279 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
9280 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
9281 (void)inputOperandsLoc;
9282
9283 inputOperandsLoc = parser.getCurrentLocation();
9284 if (parser.parseOperand(inputRawOperand))
9285 return ::mlir::failure();
9286 {
9287 auto loc = parser.getCurrentLocation();(void)loc;
9288 if (parser.parseOptionalAttrDict(result.attributes))
9289 return ::mlir::failure();
9290 }
9291 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
9292 result.addTypes(odsBuildableType0);
9293 if (parser.resolveOperands(inputOperands, odsBuildableType0, inputOperandsLoc, result.operands))
9294 return ::mlir::failure();
9295 return ::mlir::success();
9296}
9297
9298void NotOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9299 _odsPrinter << ' ';
9300 _odsPrinter << getInput();
9301 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9302 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9303}
9304
9305void NotOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9306}
9307
9308} // namespace smt
9309} // namespace llzk
9310MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::NotOp)
9311
9312namespace llzk {
9313namespace smt {
9314
9315//===----------------------------------------------------------------------===//
9316// ::llzk::smt::OrOp definitions
9317//===----------------------------------------------------------------------===//
9318
9319namespace detail {
9320std::pair<unsigned, unsigned> OrOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
9321 bool isVariadic[] = {true};
9322 int prevVariadicCount = 0;
9323 for (unsigned i = 0; i < index; ++i)
9324 if (isVariadic[i]) ++prevVariadicCount;
9325
9326 // Calculate how many dynamic values a static variadic operand corresponds to.
9327 // This assumes all static variadic operands have the same dynamic value count.
9328 int variadicSize = (odsOperandsSize - 0) / 1;
9329 // `index` passed in as the parameter is the static index which counts each
9330 // operand (variadic or not) as size 1. So here for each previous static variadic
9331 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
9332 // value pack for this static operand starts.
9333 int start = index + (variadicSize - 1) * prevVariadicCount;
9334 int size = isVariadic[index] ? variadicSize : 1;
9335 return {start, size};
9336}
9337
9338} // namespace detail
9340
9341::llvm::LogicalResult OrOpAdaptor::verify(::mlir::Location loc) {
9342 return ::mlir::success();
9343}
9344
9345std::pair<unsigned, unsigned> OrOp::getODSOperandIndexAndLength(unsigned index) {
9346 bool isVariadic[] = {true};
9347 int prevVariadicCount = 0;
9348 for (unsigned i = 0; i < index; ++i)
9349 if (isVariadic[i]) ++prevVariadicCount;
9350
9351 // Calculate how many dynamic values a static variadic operand corresponds to.
9352 // This assumes all static variadic operands have the same dynamic value count.
9353 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
9354 // `index` passed in as the parameter is the static index which counts each
9355 // operand (variadic or not) as size 1. So here for each previous static variadic
9356 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
9357 // value pack for this static operand starts.
9358 int start = index + (variadicSize - 1) * prevVariadicCount;
9359 int size = isVariadic[index] ? variadicSize : 1;
9360 return {start, size};
9361}
9362
9363::mlir::MutableOperandRange OrOp::getInputsMutable() {
9364 auto range = getODSOperandIndexAndLength(0);
9365 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
9366 return mutableRange;
9367}
9368
9369void OrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs) {
9370 build(odsBuilder, odsState, mlir::ValueRange{lhs, rhs});
9371
9372}
9373
9374void OrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
9375 odsState.addOperands(inputs);
9376 odsState.addTypes(result);
9377}
9378
9379void OrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9380 odsState.addOperands(operands);
9381 odsState.addAttributes(attributes);
9382 assert(resultTypes.size() == 1u && "mismatched number of return types");
9383 odsState.addTypes(resultTypes);
9384}
9385
9386void OrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9387 odsState.addOperands(operands);
9388 odsState.addAttributes(attributes);
9389
9390 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
9391 if (::mlir::succeeded(OrOp::inferReturnTypes(odsBuilder.getContext(),
9392 odsState.location, operands,
9393 odsState.attributes.getDictionary(odsState.getContext()),
9394 odsState.getRawProperties(),
9395 odsState.regions, inferredReturnTypes))) {
9396 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
9397 odsState.addTypes(inferredReturnTypes);
9398 } else {
9399 ::llvm::report_fatal_error("Failed to infer result type(s).");
9400 }
9401}
9402
9403::llvm::LogicalResult OrOp::verifyInvariantsImpl() {
9404 {
9405 unsigned index = 0; (void)index;
9406 auto valueGroup0 = getODSOperands(0);
9407
9408 for (auto v : valueGroup0) {
9409 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT1(*this, v.getType(), "operand", index++)))
9410 return ::mlir::failure();
9411 }
9412 }
9413 {
9414 unsigned index = 0; (void)index;
9415 auto valueGroup0 = getODSResults(0);
9416
9417 for (auto v : valueGroup0) {
9418 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
9419 return ::mlir::failure();
9420 }
9421 }
9422 return ::mlir::success();
9423}
9424
9425::llvm::LogicalResult OrOp::verifyInvariants() {
9426 return verifyInvariantsImpl();
9427}
9428
9429::llvm::LogicalResult OrOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
9430 inferredReturnTypes.resize(1);
9431 ::mlir::Builder odsBuilder(context);
9432 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
9433 inferredReturnTypes[0] = odsInferredType0;
9434 return ::mlir::success();
9435}
9436
9437::mlir::ParseResult OrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9438 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
9439 ::llvm::SMLoc inputsOperandsLoc;
9440 (void)inputsOperandsLoc;
9441
9442 inputsOperandsLoc = parser.getCurrentLocation();
9443 if (parser.parseOperandList(inputsOperands))
9444 return ::mlir::failure();
9445 {
9446 auto loc = parser.getCurrentLocation();(void)loc;
9447 if (parser.parseOptionalAttrDict(result.attributes))
9448 return ::mlir::failure();
9449 }
9450 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
9451 result.addTypes(odsBuildableType0);
9452 if (parser.resolveOperands(inputsOperands, odsBuildableType0, inputsOperandsLoc, result.operands))
9453 return ::mlir::failure();
9454 return ::mlir::success();
9455}
9456
9457void OrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9458 _odsPrinter << ' ';
9459 _odsPrinter << getInputs();
9460 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9461 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9462}
9463
9464void OrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9465}
9466
9467} // namespace smt
9468} // namespace llzk
9469MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::OrOp)
9470
9471namespace llzk {
9472namespace smt {
9473
9474//===----------------------------------------------------------------------===//
9475// ::llzk::smt::PopOp definitions
9476//===----------------------------------------------------------------------===//
9477
9478namespace detail {
9479PopOpGenericAdaptorBase::PopOpGenericAdaptorBase(PopOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9480
9482 auto attr = getCountAttr();
9483 return attr.getValue().getZExtValue();
9484}
9485
9486} // namespace detail
9488
9489::llvm::LogicalResult PopOpAdaptor::verify(::mlir::Location loc) {
9490 auto tblgen_count = getProperties().count; (void)tblgen_count;
9491 if (!tblgen_count) return emitError(loc, "'smt.pop' op ""requires attribute 'count'");
9492
9493 if (tblgen_count && !((((::llvm::isa<::mlir::IntegerAttr>(tblgen_count))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getType().isSignlessInteger(32)))) && ((!::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getValue().isNegative()))))
9494 return emitError(loc, "'smt.pop' op ""attribute 'count' failed to satisfy constraint: 32-bit signless integer attribute whose value is non-negative");
9495 return ::mlir::success();
9496}
9497
9498::llvm::LogicalResult PopOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9499 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
9500 if (!dict) {
9501 emitError() << "expected DictionaryAttr to set properties";
9502 return ::mlir::failure();
9503 }
9504
9505 {
9506 auto &propStorage = prop.count;
9507 auto attr = dict.get("count");
9508 if (attr) {
9509 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
9510 if (convertedAttr) {
9511 propStorage = convertedAttr;
9512 } else {
9513 emitError() << "Invalid attribute `count` in property conversion: " << attr;
9514 return ::mlir::failure();
9515 }
9516 }
9517 }
9518 return ::mlir::success();
9519}
9520
9521::mlir::Attribute PopOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9522 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9523 ::mlir::Builder odsBuilder{ctx};
9524
9525 {
9526 const auto &propStorage = prop.count;
9527 if (propStorage)
9528 attrs.push_back(odsBuilder.getNamedAttr("count",
9529 propStorage));
9530 }
9531
9532 if (!attrs.empty())
9533 return odsBuilder.getDictionaryAttr(attrs);
9534 return {};
9535}
9536
9537llvm::hash_code PopOp::computePropertiesHash(const Properties &prop) {
9538 return llvm::hash_combine(
9539 llvm::hash_value(prop.count.getAsOpaquePointer()));
9540}
9541
9542std::optional<mlir::Attribute> PopOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9543 if (name == "count")
9544 return prop.count;
9545 return std::nullopt;
9546}
9547
9548void PopOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9549 if (name == "count") {
9550 prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
9551 return;
9552 }
9553}
9554
9555void PopOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
9556 if (prop.count) attrs.append("count", prop.count);
9557}
9558
9559::llvm::LogicalResult PopOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9560 {
9561 ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
9562 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT10(attr, "count", emitError)))
9563 return ::mlir::failure();
9564 }
9565 return ::mlir::success();
9566}
9567
9568::llvm::LogicalResult PopOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
9569 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
9570 if (::mlir::failed(reader.readAttribute(prop.count)))
9571 return ::mlir::failure();
9572 return ::mlir::success();
9573}
9574
9575void PopOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
9576 auto &prop = getProperties(); (void)prop;
9577 writer.writeAttribute(prop.count);
9578}
9579
9581 auto attr = getCountAttr();
9582 return attr.getValue().getZExtValue();
9583}
9584
9585void PopOp::setCount(uint32_t attrValue) {
9586 getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
9587}
9588
9589void PopOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
9590 odsState.getOrAddProperties<Properties>().count = count;
9591}
9592
9593void PopOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
9594 odsState.getOrAddProperties<Properties>().count = count;
9595 assert(resultTypes.size() == 0u && "mismatched number of results");
9596 odsState.addTypes(resultTypes);
9597}
9598
9599void PopOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t count) {
9600 odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), count);
9601}
9602
9603void PopOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t count) {
9604 odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), count);
9605 assert(resultTypes.size() == 0u && "mismatched number of results");
9606 odsState.addTypes(resultTypes);
9607}
9608
9609void PopOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9610 assert(operands.size() == 0u && "mismatched number of parameters");
9611 odsState.addOperands(operands);
9612 odsState.addAttributes(attributes);
9613 assert(resultTypes.size() == 0u && "mismatched number of return types");
9614 odsState.addTypes(resultTypes);
9615
9616 if (!attributes.empty()) {
9617 ::mlir::OpaqueProperties properties =
9618 &odsState.getOrAddProperties<PopOp::Properties>();
9619 std::optional<::mlir::RegisteredOperationName> info =
9620 odsState.name.getRegisteredInfo();
9621 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
9622 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
9623 ::llvm::report_fatal_error("Property conversion failed.");
9624 }
9625}
9626
9627::llvm::LogicalResult PopOp::verifyInvariantsImpl() {
9628 auto tblgen_count = getProperties().count; (void)tblgen_count;
9629 if (!tblgen_count) return emitOpError("requires attribute 'count'");
9630
9631 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT10(*this, tblgen_count, "count")))
9632 return ::mlir::failure();
9633 return ::mlir::success();
9634}
9635
9636::llvm::LogicalResult PopOp::verifyInvariants() {
9637 return verifyInvariantsImpl();
9638}
9639
9640::mlir::ParseResult PopOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9641 ::mlir::IntegerAttr countAttr;
9642
9643 if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(32))) {
9644 return ::mlir::failure();
9645 }
9646 if (countAttr) result.getOrAddProperties<PopOp::Properties>().count = countAttr;
9647 {
9648 auto loc = parser.getCurrentLocation();(void)loc;
9649 if (parser.parseOptionalAttrDict(result.attributes))
9650 return ::mlir::failure();
9651 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
9652 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
9653 })))
9654 return ::mlir::failure();
9655 }
9656 return ::mlir::success();
9657}
9658
9659void PopOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9660 _odsPrinter << ' ';
9661 _odsPrinter.printAttributeWithoutType(getCountAttr());
9662 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9663 elidedAttrs.push_back("count");
9664 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9665}
9666
9667} // namespace smt
9668} // namespace llzk
9669MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::PopOp)
9670
9671namespace llzk {
9672namespace smt {
9673
9674//===----------------------------------------------------------------------===//
9675// ::llzk::smt::PushOp definitions
9676//===----------------------------------------------------------------------===//
9677
9678namespace detail {
9679PushOpGenericAdaptorBase::PushOpGenericAdaptorBase(PushOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9680
9682 auto attr = getCountAttr();
9683 return attr.getValue().getZExtValue();
9684}
9685
9686} // namespace detail
9688
9689::llvm::LogicalResult PushOpAdaptor::verify(::mlir::Location loc) {
9690 auto tblgen_count = getProperties().count; (void)tblgen_count;
9691 if (!tblgen_count) return emitError(loc, "'smt.push' op ""requires attribute 'count'");
9692
9693 if (tblgen_count && !((((::llvm::isa<::mlir::IntegerAttr>(tblgen_count))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getType().isSignlessInteger(32)))) && ((!::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getValue().isNegative()))))
9694 return emitError(loc, "'smt.push' op ""attribute 'count' failed to satisfy constraint: 32-bit signless integer attribute whose value is non-negative");
9695 return ::mlir::success();
9696}
9697
9698::llvm::LogicalResult PushOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9699 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
9700 if (!dict) {
9701 emitError() << "expected DictionaryAttr to set properties";
9702 return ::mlir::failure();
9703 }
9704
9705 {
9706 auto &propStorage = prop.count;
9707 auto attr = dict.get("count");
9708 if (attr) {
9709 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
9710 if (convertedAttr) {
9711 propStorage = convertedAttr;
9712 } else {
9713 emitError() << "Invalid attribute `count` in property conversion: " << attr;
9714 return ::mlir::failure();
9715 }
9716 }
9717 }
9718 return ::mlir::success();
9719}
9720
9721::mlir::Attribute PushOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9722 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9723 ::mlir::Builder odsBuilder{ctx};
9724
9725 {
9726 const auto &propStorage = prop.count;
9727 if (propStorage)
9728 attrs.push_back(odsBuilder.getNamedAttr("count",
9729 propStorage));
9730 }
9731
9732 if (!attrs.empty())
9733 return odsBuilder.getDictionaryAttr(attrs);
9734 return {};
9735}
9736
9737llvm::hash_code PushOp::computePropertiesHash(const Properties &prop) {
9738 return llvm::hash_combine(
9739 llvm::hash_value(prop.count.getAsOpaquePointer()));
9740}
9741
9742std::optional<mlir::Attribute> PushOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9743 if (name == "count")
9744 return prop.count;
9745 return std::nullopt;
9746}
9747
9748void PushOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9749 if (name == "count") {
9750 prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
9751 return;
9752 }
9753}
9754
9755void PushOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
9756 if (prop.count) attrs.append("count", prop.count);
9757}
9758
9759::llvm::LogicalResult PushOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9760 {
9761 ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
9762 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT10(attr, "count", emitError)))
9763 return ::mlir::failure();
9764 }
9765 return ::mlir::success();
9766}
9767
9768::llvm::LogicalResult PushOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
9769 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
9770 if (::mlir::failed(reader.readAttribute(prop.count)))
9771 return ::mlir::failure();
9772 return ::mlir::success();
9773}
9774
9775void PushOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
9776 auto &prop = getProperties(); (void)prop;
9777 writer.writeAttribute(prop.count);
9778}
9779
9781 auto attr = getCountAttr();
9782 return attr.getValue().getZExtValue();
9783}
9784
9785void PushOp::setCount(uint32_t attrValue) {
9786 getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
9787}
9788
9789void PushOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
9790 odsState.getOrAddProperties<Properties>().count = count;
9791}
9792
9793void PushOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
9794 odsState.getOrAddProperties<Properties>().count = count;
9795 assert(resultTypes.size() == 0u && "mismatched number of results");
9796 odsState.addTypes(resultTypes);
9797}
9798
9799void PushOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t count) {
9800 odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), count);
9801}
9802
9803void PushOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t count) {
9804 odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), count);
9805 assert(resultTypes.size() == 0u && "mismatched number of results");
9806 odsState.addTypes(resultTypes);
9807}
9808
9809void PushOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9810 assert(operands.size() == 0u && "mismatched number of parameters");
9811 odsState.addOperands(operands);
9812 odsState.addAttributes(attributes);
9813 assert(resultTypes.size() == 0u && "mismatched number of return types");
9814 odsState.addTypes(resultTypes);
9815
9816 if (!attributes.empty()) {
9817 ::mlir::OpaqueProperties properties =
9818 &odsState.getOrAddProperties<PushOp::Properties>();
9819 std::optional<::mlir::RegisteredOperationName> info =
9820 odsState.name.getRegisteredInfo();
9821 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
9822 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
9823 ::llvm::report_fatal_error("Property conversion failed.");
9824 }
9825}
9826
9827::llvm::LogicalResult PushOp::verifyInvariantsImpl() {
9828 auto tblgen_count = getProperties().count; (void)tblgen_count;
9829 if (!tblgen_count) return emitOpError("requires attribute 'count'");
9830
9831 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT10(*this, tblgen_count, "count")))
9832 return ::mlir::failure();
9833 return ::mlir::success();
9834}
9835
9836::llvm::LogicalResult PushOp::verifyInvariants() {
9837 return verifyInvariantsImpl();
9838}
9839
9840::mlir::ParseResult PushOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9841 ::mlir::IntegerAttr countAttr;
9842
9843 if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(32))) {
9844 return ::mlir::failure();
9845 }
9846 if (countAttr) result.getOrAddProperties<PushOp::Properties>().count = countAttr;
9847 {
9848 auto loc = parser.getCurrentLocation();(void)loc;
9849 if (parser.parseOptionalAttrDict(result.attributes))
9850 return ::mlir::failure();
9851 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
9852 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
9853 })))
9854 return ::mlir::failure();
9855 }
9856 return ::mlir::success();
9857}
9858
9859void PushOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9860 _odsPrinter << ' ';
9861 _odsPrinter.printAttributeWithoutType(getCountAttr());
9862 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9863 elidedAttrs.push_back("count");
9864 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9865}
9866
9867} // namespace smt
9868} // namespace llzk
9869MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::PushOp)
9870
9871namespace llzk {
9872namespace smt {
9873
9874//===----------------------------------------------------------------------===//
9875// ::llzk::smt::RepeatOp definitions
9876//===----------------------------------------------------------------------===//
9877
9878namespace detail {
9879} // namespace detail
9881
9882::llvm::LogicalResult RepeatOpAdaptor::verify(::mlir::Location loc) {
9883 return ::mlir::success();
9884}
9885
9886void RepeatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
9887 odsState.addOperands(input);
9888 odsState.addTypes(result);
9889}
9890
9891void RepeatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
9892 odsState.addOperands(input);
9893 assert(resultTypes.size() == 1u && "mismatched number of results");
9894 odsState.addTypes(resultTypes);
9895}
9896
9897void RepeatOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9898 assert(operands.size() == 1u && "mismatched number of parameters");
9899 odsState.addOperands(operands);
9900 odsState.addAttributes(attributes);
9901 assert(resultTypes.size() == 1u && "mismatched number of return types");
9902 odsState.addTypes(resultTypes);
9903}
9904
9905::llvm::LogicalResult RepeatOp::verifyInvariantsImpl() {
9906 {
9907 unsigned index = 0; (void)index;
9908 auto valueGroup0 = getODSOperands(0);
9909
9910 for (auto v : valueGroup0) {
9911 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
9912 return ::mlir::failure();
9913 }
9914 }
9915 {
9916 unsigned index = 0; (void)index;
9917 auto valueGroup0 = getODSResults(0);
9918
9919 for (auto v : valueGroup0) {
9920 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
9921 return ::mlir::failure();
9922 }
9923 }
9924 return ::mlir::success();
9925}
9926
9927::llvm::LogicalResult RepeatOp::verifyInvariants() {
9928 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
9929 return ::mlir::success();
9930 return ::mlir::failure();
9931}
9932
9933void RepeatOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9934}
9935
9936} // namespace smt
9937} // namespace llzk
9938MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::RepeatOp)
9939
9940namespace llzk {
9941namespace smt {
9942
9943//===----------------------------------------------------------------------===//
9944// ::llzk::smt::ResetOp definitions
9945//===----------------------------------------------------------------------===//
9946
9947namespace detail {
9948} // namespace detail
9950
9951::llvm::LogicalResult ResetOpAdaptor::verify(::mlir::Location loc) {
9952 return ::mlir::success();
9953}
9954
9955void ResetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
9956}
9957
9958void ResetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
9959 assert(resultTypes.size() == 0u && "mismatched number of results");
9960 odsState.addTypes(resultTypes);
9961}
9962
9963void ResetOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9964 assert(operands.size() == 0u && "mismatched number of parameters");
9965 odsState.addOperands(operands);
9966 odsState.addAttributes(attributes);
9967 assert(resultTypes.size() == 0u && "mismatched number of return types");
9968 odsState.addTypes(resultTypes);
9969}
9970
9971::llvm::LogicalResult ResetOp::verifyInvariantsImpl() {
9972 return ::mlir::success();
9973}
9974
9975::llvm::LogicalResult ResetOp::verifyInvariants() {
9976 return verifyInvariantsImpl();
9977}
9978
9979::mlir::ParseResult ResetOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9980 {
9981 auto loc = parser.getCurrentLocation();(void)loc;
9982 if (parser.parseOptionalAttrDict(result.attributes))
9983 return ::mlir::failure();
9984 }
9985 return ::mlir::success();
9986}
9987
9988void ResetOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9989 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9990 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9991}
9992
9993} // namespace smt
9994} // namespace llzk
9995MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ResetOp)
9996
9997namespace llzk {
9998namespace smt {
9999
10000//===----------------------------------------------------------------------===//
10001// ::llzk::smt::SetInfoOp definitions
10002//===----------------------------------------------------------------------===//
10003
10004namespace detail {
10005SetInfoOpGenericAdaptorBase::SetInfoOpGenericAdaptorBase(SetInfoOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
10006
10007::llzk::smt::KeywordAttr SetInfoOpGenericAdaptorBase::getKey() {
10008 auto attr = getKeyAttr();
10009 return ::llvm::cast<::llzk::smt::KeywordAttr>(attr);
10010}
10011
10013 auto attr = getValueAttr();
10014 return attr;
10015}
10016
10017} // namespace detail
10019
10020::llvm::LogicalResult SetInfoOpAdaptor::verify(::mlir::Location loc) {
10021 auto tblgen_key = getProperties().key; (void)tblgen_key;
10022 if (!tblgen_key) return emitError(loc, "'smt.set_info' op ""requires attribute 'key'");
10023 auto tblgen_value = getProperties().value; (void)tblgen_value;
10024 if (!tblgen_value) return emitError(loc, "'smt.set_info' op ""requires attribute 'value'");
10025
10026 if (tblgen_key && !((::llvm::isa<::llzk::smt::KeywordAttr>(tblgen_key))))
10027 return emitError(loc, "'smt.set_info' op ""attribute 'key' failed to satisfy constraint: an SMT-LIB keyword");
10028
10029 if (tblgen_value && !((true)))
10030 return emitError(loc, "'smt.set_info' op ""attribute 'value' failed to satisfy constraint: any attribute");
10031 return ::mlir::success();
10032}
10033
10034::llvm::LogicalResult SetInfoOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10035 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
10036 if (!dict) {
10037 emitError() << "expected DictionaryAttr to set properties";
10038 return ::mlir::failure();
10039 }
10040
10041 {
10042 auto &propStorage = prop.key;
10043 auto attr = dict.get("key");
10044 if (attr) {
10045 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
10046 if (convertedAttr) {
10047 propStorage = convertedAttr;
10048 } else {
10049 emitError() << "Invalid attribute `key` in property conversion: " << attr;
10050 return ::mlir::failure();
10051 }
10052 }
10053 }
10054
10055 {
10056 auto &propStorage = prop.value;
10057 auto attr = dict.get("value");
10058 if (attr) {
10059 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
10060 if (convertedAttr) {
10061 propStorage = convertedAttr;
10062 } else {
10063 emitError() << "Invalid attribute `value` in property conversion: " << attr;
10064 return ::mlir::failure();
10065 }
10066 }
10067 }
10068 return ::mlir::success();
10069}
10070
10071::mlir::Attribute SetInfoOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
10072 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
10073 ::mlir::Builder odsBuilder{ctx};
10074
10075 {
10076 const auto &propStorage = prop.key;
10077 if (propStorage)
10078 attrs.push_back(odsBuilder.getNamedAttr("key",
10079 propStorage));
10080 }
10081
10082 {
10083 const auto &propStorage = prop.value;
10084 if (propStorage)
10085 attrs.push_back(odsBuilder.getNamedAttr("value",
10086 propStorage));
10087 }
10088
10089 if (!attrs.empty())
10090 return odsBuilder.getDictionaryAttr(attrs);
10091 return {};
10092}
10093
10094llvm::hash_code SetInfoOp::computePropertiesHash(const Properties &prop) {
10095 return llvm::hash_combine(
10096 llvm::hash_value(prop.key.getAsOpaquePointer()),
10097 llvm::hash_value(prop.value.getAsOpaquePointer()));
10098}
10099
10100std::optional<mlir::Attribute> SetInfoOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
10101 if (name == "key")
10102 return prop.key;
10103
10104 if (name == "value")
10105 return prop.value;
10106 return std::nullopt;
10107}
10108
10109void SetInfoOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
10110 if (name == "key") {
10111 prop.key = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.key)>>(value);
10112 return;
10113 }
10114
10115 if (name == "value") {
10116 prop.value = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.value)>>(value);
10117 return;
10118 }
10119}
10120
10121void SetInfoOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
10122 if (prop.key) attrs.append("key", prop.key);
10123
10124 if (prop.value) attrs.append("value", prop.value);
10125}
10126
10127::llvm::LogicalResult SetInfoOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10128 {
10129 ::mlir::Attribute attr = attrs.get(getKeyAttrName(opName));
10130 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT11(attr, "key", emitError)))
10131 return ::mlir::failure();
10132 }
10133
10134 {
10135 ::mlir::Attribute attr = attrs.get(getValueAttrName(opName));
10136 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT12(attr, "value", emitError)))
10137 return ::mlir::failure();
10138 }
10139 return ::mlir::success();
10140}
10141
10142::llvm::LogicalResult SetInfoOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
10143 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
10144 if (::mlir::failed(reader.readAttribute(prop.key)))
10145 return ::mlir::failure();
10146
10147 if (::mlir::failed(reader.readAttribute(prop.value)))
10148 return ::mlir::failure();
10149 return ::mlir::success();
10150}
10151
10152void SetInfoOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
10153 auto &prop = getProperties(); (void)prop;
10154 writer.writeAttribute(prop.key);
10155 writer.writeAttribute(prop.value);
10156}
10157
10158::llzk::smt::KeywordAttr SetInfoOp::getKey() {
10159 auto attr = getKeyAttr();
10160 return ::llvm::cast<::llzk::smt::KeywordAttr>(attr);
10161}
10162
10163::mlir::Attribute SetInfoOp::getValue() {
10164 auto attr = getValueAttr();
10165 return attr;
10166}
10167
10168void SetInfoOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::KeywordAttr key, ::mlir::Attribute value) {
10169 odsState.getOrAddProperties<Properties>().key = key;
10170 odsState.getOrAddProperties<Properties>().value = value;
10171}
10172
10173void SetInfoOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::KeywordAttr key, ::mlir::Attribute value) {
10174 odsState.getOrAddProperties<Properties>().key = key;
10175 odsState.getOrAddProperties<Properties>().value = value;
10176 assert(resultTypes.size() == 0u && "mismatched number of results");
10177 odsState.addTypes(resultTypes);
10178}
10179
10180void SetInfoOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10181 assert(operands.size() == 0u && "mismatched number of parameters");
10182 odsState.addOperands(operands);
10183 odsState.addAttributes(attributes);
10184 assert(resultTypes.size() == 0u && "mismatched number of return types");
10185 odsState.addTypes(resultTypes);
10186
10187 if (!attributes.empty()) {
10188 ::mlir::OpaqueProperties properties =
10189 &odsState.getOrAddProperties<SetInfoOp::Properties>();
10190 std::optional<::mlir::RegisteredOperationName> info =
10191 odsState.name.getRegisteredInfo();
10192 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
10193 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
10194 ::llvm::report_fatal_error("Property conversion failed.");
10195 }
10196}
10197
10198::llvm::LogicalResult SetInfoOp::verifyInvariantsImpl() {
10199 auto tblgen_key = getProperties().key; (void)tblgen_key;
10200 if (!tblgen_key) return emitOpError("requires attribute 'key'");
10201 auto tblgen_value = getProperties().value; (void)tblgen_value;
10202 if (!tblgen_value) return emitOpError("requires attribute 'value'");
10203
10204 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT11(*this, tblgen_key, "key")))
10205 return ::mlir::failure();
10206
10207 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT12(*this, tblgen_value, "value")))
10208 return ::mlir::failure();
10209 return ::mlir::success();
10210}
10211
10212::llvm::LogicalResult SetInfoOp::verifyInvariants() {
10213 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
10214 return ::mlir::success();
10215 return ::mlir::failure();
10216}
10217
10218} // namespace smt
10219} // namespace llzk
10220MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::SetInfoOp)
10221
10222namespace llzk {
10223namespace smt {
10224
10225//===----------------------------------------------------------------------===//
10226// ::llzk::smt::SetLogicOp definitions
10227//===----------------------------------------------------------------------===//
10228
10229namespace detail {
10230SetLogicOpGenericAdaptorBase::SetLogicOpGenericAdaptorBase(SetLogicOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
10231
10233 auto attr = getLogicAttr();
10234 return attr.getValue();
10235}
10236
10237} // namespace detail
10239
10240::llvm::LogicalResult SetLogicOpAdaptor::verify(::mlir::Location loc) {
10241 auto tblgen_logic = getProperties().logic; (void)tblgen_logic;
10242 if (!tblgen_logic) return emitError(loc, "'smt.set_logic' op ""requires attribute 'logic'");
10243
10244 if (tblgen_logic && !((::llvm::isa<::mlir::StringAttr>(tblgen_logic))))
10245 return emitError(loc, "'smt.set_logic' op ""attribute 'logic' failed to satisfy constraint: string attribute");
10246 return ::mlir::success();
10247}
10248
10249::llvm::LogicalResult SetLogicOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10250 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
10251 if (!dict) {
10252 emitError() << "expected DictionaryAttr to set properties";
10253 return ::mlir::failure();
10254 }
10255
10256 {
10257 auto &propStorage = prop.logic;
10258 auto attr = dict.get("logic");
10259 if (attr) {
10260 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
10261 if (convertedAttr) {
10262 propStorage = convertedAttr;
10263 } else {
10264 emitError() << "Invalid attribute `logic` in property conversion: " << attr;
10265 return ::mlir::failure();
10266 }
10267 }
10268 }
10269 return ::mlir::success();
10270}
10271
10272::mlir::Attribute SetLogicOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
10273 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
10274 ::mlir::Builder odsBuilder{ctx};
10275
10276 {
10277 const auto &propStorage = prop.logic;
10278 if (propStorage)
10279 attrs.push_back(odsBuilder.getNamedAttr("logic",
10280 propStorage));
10281 }
10282
10283 if (!attrs.empty())
10284 return odsBuilder.getDictionaryAttr(attrs);
10285 return {};
10286}
10287
10288llvm::hash_code SetLogicOp::computePropertiesHash(const Properties &prop) {
10289 return llvm::hash_combine(
10290 llvm::hash_value(prop.logic.getAsOpaquePointer()));
10291}
10292
10293std::optional<mlir::Attribute> SetLogicOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
10294 if (name == "logic")
10295 return prop.logic;
10296 return std::nullopt;
10297}
10298
10299void SetLogicOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
10300 if (name == "logic") {
10301 prop.logic = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.logic)>>(value);
10302 return;
10303 }
10304}
10305
10306void SetLogicOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
10307 if (prop.logic) attrs.append("logic", prop.logic);
10308}
10309
10310::llvm::LogicalResult SetLogicOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10311 {
10312 ::mlir::Attribute attr = attrs.get(getLogicAttrName(opName));
10313 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT5(attr, "logic", emitError)))
10314 return ::mlir::failure();
10315 }
10316 return ::mlir::success();
10317}
10318
10319::llvm::LogicalResult SetLogicOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
10320 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
10321 if (::mlir::failed(reader.readAttribute(prop.logic)))
10322 return ::mlir::failure();
10323 return ::mlir::success();
10324}
10325
10326void SetLogicOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
10327 auto &prop = getProperties(); (void)prop;
10328 writer.writeAttribute(prop.logic);
10329}
10330
10331::llvm::StringRef SetLogicOp::getLogic() {
10332 auto attr = getLogicAttr();
10333 return attr.getValue();
10334}
10335
10336void SetLogicOp::setLogic(::llvm::StringRef attrValue) {
10337 getProperties().logic = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
10338}
10339
10340void SetLogicOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr logic) {
10341 odsState.getOrAddProperties<Properties>().logic = logic;
10342}
10343
10344void SetLogicOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr logic) {
10345 odsState.getOrAddProperties<Properties>().logic = logic;
10346 assert(resultTypes.size() == 0u && "mismatched number of results");
10347 odsState.addTypes(resultTypes);
10348}
10349
10350void SetLogicOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef logic) {
10351 odsState.getOrAddProperties<Properties>().logic = odsBuilder.getStringAttr(logic);
10352}
10353
10354void SetLogicOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef logic) {
10355 odsState.getOrAddProperties<Properties>().logic = odsBuilder.getStringAttr(logic);
10356 assert(resultTypes.size() == 0u && "mismatched number of results");
10357 odsState.addTypes(resultTypes);
10358}
10359
10360void SetLogicOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10361 assert(operands.size() == 0u && "mismatched number of parameters");
10362 odsState.addOperands(operands);
10363 odsState.addAttributes(attributes);
10364 assert(resultTypes.size() == 0u && "mismatched number of return types");
10365 odsState.addTypes(resultTypes);
10366
10367 if (!attributes.empty()) {
10368 ::mlir::OpaqueProperties properties =
10369 &odsState.getOrAddProperties<SetLogicOp::Properties>();
10370 std::optional<::mlir::RegisteredOperationName> info =
10371 odsState.name.getRegisteredInfo();
10372 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
10373 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
10374 ::llvm::report_fatal_error("Property conversion failed.");
10375 }
10376}
10377
10378::llvm::LogicalResult SetLogicOp::verifyInvariantsImpl() {
10379 auto tblgen_logic = getProperties().logic; (void)tblgen_logic;
10380 if (!tblgen_logic) return emitOpError("requires attribute 'logic'");
10381
10382 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT5(*this, tblgen_logic, "logic")))
10383 return ::mlir::failure();
10384 return ::mlir::success();
10385}
10386
10387::llvm::LogicalResult SetLogicOp::verifyInvariants() {
10388 return verifyInvariantsImpl();
10389}
10390
10391::mlir::ParseResult SetLogicOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10392 ::mlir::StringAttr logicAttr;
10393
10394 if (parser.parseCustomAttributeWithFallback(logicAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
10395 return ::mlir::failure();
10396 }
10397 if (logicAttr) result.getOrAddProperties<SetLogicOp::Properties>().logic = logicAttr;
10398 {
10399 auto loc = parser.getCurrentLocation();(void)loc;
10400 if (parser.parseOptionalAttrDict(result.attributes))
10401 return ::mlir::failure();
10402 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
10403 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
10404 })))
10405 return ::mlir::failure();
10406 }
10407 return ::mlir::success();
10408}
10409
10410void SetLogicOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
10411 _odsPrinter << ' ';
10412 _odsPrinter.printAttributeWithoutType(getLogicAttr());
10413 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
10414 elidedAttrs.push_back("logic");
10415 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
10416}
10417
10418} // namespace smt
10419} // namespace llzk
10420MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::SetLogicOp)
10421
10422namespace llzk {
10423namespace smt {
10424
10425//===----------------------------------------------------------------------===//
10426// ::llzk::smt::SolverOp definitions
10427//===----------------------------------------------------------------------===//
10428
10429namespace detail {
10430std::pair<unsigned, unsigned> SolverOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
10431 bool isVariadic[] = {true};
10432 int prevVariadicCount = 0;
10433 for (unsigned i = 0; i < index; ++i)
10434 if (isVariadic[i]) ++prevVariadicCount;
10435
10436 // Calculate how many dynamic values a static variadic operand corresponds to.
10437 // This assumes all static variadic operands have the same dynamic value count.
10438 int variadicSize = (odsOperandsSize - 0) / 1;
10439 // `index` passed in as the parameter is the static index which counts each
10440 // operand (variadic or not) as size 1. So here for each previous static variadic
10441 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10442 // value pack for this static operand starts.
10443 int start = index + (variadicSize - 1) * prevVariadicCount;
10444 int size = isVariadic[index] ? variadicSize : 1;
10445 return {start, size};
10446}
10447
10448} // namespace detail
10450
10451::llvm::LogicalResult SolverOpAdaptor::verify(::mlir::Location loc) {
10452 return ::mlir::success();
10453}
10454
10455std::pair<unsigned, unsigned> SolverOp::getODSOperandIndexAndLength(unsigned index) {
10456 bool isVariadic[] = {true};
10457 int prevVariadicCount = 0;
10458 for (unsigned i = 0; i < index; ++i)
10459 if (isVariadic[i]) ++prevVariadicCount;
10460
10461 // Calculate how many dynamic values a static variadic operand corresponds to.
10462 // This assumes all static variadic operands have the same dynamic value count.
10463 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
10464 // `index` passed in as the parameter is the static index which counts each
10465 // operand (variadic or not) as size 1. So here for each previous static variadic
10466 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10467 // value pack for this static operand starts.
10468 int start = index + (variadicSize - 1) * prevVariadicCount;
10469 int size = isVariadic[index] ? variadicSize : 1;
10470 return {start, size};
10471}
10472
10473::mlir::MutableOperandRange SolverOp::getInputsMutable() {
10474 auto range = getODSOperandIndexAndLength(0);
10475 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
10476 return mutableRange;
10477}
10478
10479std::pair<unsigned, unsigned> SolverOp::getODSResultIndexAndLength(unsigned index) {
10480 bool isVariadic[] = {true};
10481 int prevVariadicCount = 0;
10482 for (unsigned i = 0; i < index; ++i)
10483 if (isVariadic[i]) ++prevVariadicCount;
10484
10485 // Calculate how many dynamic values a static variadic operand corresponds to.
10486 // This assumes all static variadic operands have the same dynamic value count.
10487 int variadicSize = (getOperation()->getNumResults() - 0) / 1;
10488 // `index` passed in as the parameter is the static index which counts each
10489 // operand (variadic or not) as size 1. So here for each previous static variadic
10490 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10491 // value pack for this static operand starts.
10492 int start = index + (variadicSize - 1) * prevVariadicCount;
10493 int size = isVariadic[index] ? variadicSize : 1;
10494 return {start, size};
10495}
10496
10497void SolverOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10498 odsState.addOperands(operands);
10499 odsState.addAttributes(attributes);
10500 for (unsigned i = 0; i != 1; ++i)
10501 (void)odsState.addRegion();
10502 odsState.addTypes(resultTypes);
10503}
10504
10505::llvm::LogicalResult SolverOp::verifyInvariantsImpl() {
10506 {
10507 unsigned index = 0; (void)index;
10508 auto valueGroup0 = getODSOperands(0);
10509
10510 for (auto v : valueGroup0) {
10511 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT12(*this, v.getType(), "operand", index++)))
10512 return ::mlir::failure();
10513 }
10514 }
10515 {
10516 unsigned index = 0; (void)index;
10517 auto valueGroup0 = getODSResults(0);
10518
10519 for (auto v : valueGroup0) {
10520 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT12(*this, v.getType(), "result", index++)))
10521 return ::mlir::failure();
10522 }
10523 }
10524 {
10525 unsigned index = 0; (void)index;
10526
10527 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
10528 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "bodyRegion", index++)))
10529 return ::mlir::failure();
10530 }
10531 return ::mlir::success();
10532}
10533
10534::llvm::LogicalResult SolverOp::verifyInvariants() {
10535 return verifyInvariantsImpl();
10536}
10537
10538::mlir::ParseResult SolverOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10539 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
10540 ::llvm::SMLoc inputsOperandsLoc;
10541 (void)inputsOperandsLoc;
10542 ::llvm::ArrayRef<::mlir::Type> inputsTypes;
10543 ::llvm::ArrayRef<::mlir::Type> resultsTypes;
10544 std::unique_ptr<::mlir::Region> bodyRegionRegion = std::make_unique<::mlir::Region>();
10545 if (parser.parseLParen())
10546 return ::mlir::failure();
10547
10548 inputsOperandsLoc = parser.getCurrentLocation();
10549 if (parser.parseOperandList(inputsOperands))
10550 return ::mlir::failure();
10551 if (parser.parseRParen())
10552 return ::mlir::failure();
10553 {
10554 auto loc = parser.getCurrentLocation();(void)loc;
10555 if (parser.parseOptionalAttrDict(result.attributes))
10556 return ::mlir::failure();
10557 }
10558 if (parser.parseColon())
10559 return ::mlir::failure();
10560
10561 ::mlir::FunctionType inputs__results_functionType;
10562 if (parser.parseType(inputs__results_functionType))
10563 return ::mlir::failure();
10564 inputsTypes = inputs__results_functionType.getInputs();
10565 resultsTypes = inputs__results_functionType.getResults();
10566
10567 if (parser.parseRegion(*bodyRegionRegion))
10568 return ::mlir::failure();
10569
10570 ensureTerminator(*bodyRegionRegion, parser.getBuilder(), result.location);
10571 result.addRegion(std::move(bodyRegionRegion));
10572 result.addTypes(resultsTypes);
10573 if (parser.resolveOperands(inputsOperands, inputsTypes, inputsOperandsLoc, result.operands))
10574 return ::mlir::failure();
10575 return ::mlir::success();
10576}
10577
10578void SolverOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
10579 _odsPrinter << "(";
10580 _odsPrinter << getInputs();
10581 _odsPrinter << ")";
10582 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
10583 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
10584 _odsPrinter << ' ' << ":";
10585 _odsPrinter << ' ';
10586 _odsPrinter.printFunctionalType(getInputs().getTypes(), getResults().getTypes());
10587 _odsPrinter << ' ';
10588
10589 {
10590 bool printTerminator = true;
10591 if (auto *term = getBodyRegion().empty() ? nullptr : getBodyRegion().begin()->getTerminator()) {
10592 printTerminator = !term->getAttrDictionary().empty() ||
10593 term->getNumOperands() != 0 ||
10594 term->getNumResults() != 0;
10595 }
10596 _odsPrinter.printRegion(getBodyRegion(), /*printEntryBlockArgs=*/true,
10597 /*printBlockTerminators=*/printTerminator);
10598 }
10599}
10600
10601} // namespace smt
10602} // namespace llzk
10603MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::SolverOp)
10604
10605namespace llzk {
10606namespace smt {
10607
10608//===----------------------------------------------------------------------===//
10609// ::llzk::smt::XOrOp definitions
10610//===----------------------------------------------------------------------===//
10611
10612namespace detail {
10613std::pair<unsigned, unsigned> XOrOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
10614 bool isVariadic[] = {true};
10615 int prevVariadicCount = 0;
10616 for (unsigned i = 0; i < index; ++i)
10617 if (isVariadic[i]) ++prevVariadicCount;
10618
10619 // Calculate how many dynamic values a static variadic operand corresponds to.
10620 // This assumes all static variadic operands have the same dynamic value count.
10621 int variadicSize = (odsOperandsSize - 0) / 1;
10622 // `index` passed in as the parameter is the static index which counts each
10623 // operand (variadic or not) as size 1. So here for each previous static variadic
10624 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10625 // value pack for this static operand starts.
10626 int start = index + (variadicSize - 1) * prevVariadicCount;
10627 int size = isVariadic[index] ? variadicSize : 1;
10628 return {start, size};
10629}
10630
10631} // namespace detail
10633
10634::llvm::LogicalResult XOrOpAdaptor::verify(::mlir::Location loc) {
10635 return ::mlir::success();
10636}
10637
10638std::pair<unsigned, unsigned> XOrOp::getODSOperandIndexAndLength(unsigned index) {
10639 bool isVariadic[] = {true};
10640 int prevVariadicCount = 0;
10641 for (unsigned i = 0; i < index; ++i)
10642 if (isVariadic[i]) ++prevVariadicCount;
10643
10644 // Calculate how many dynamic values a static variadic operand corresponds to.
10645 // This assumes all static variadic operands have the same dynamic value count.
10646 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
10647 // `index` passed in as the parameter is the static index which counts each
10648 // operand (variadic or not) as size 1. So here for each previous static variadic
10649 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10650 // value pack for this static operand starts.
10651 int start = index + (variadicSize - 1) * prevVariadicCount;
10652 int size = isVariadic[index] ? variadicSize : 1;
10653 return {start, size};
10654}
10655
10656::mlir::MutableOperandRange XOrOp::getInputsMutable() {
10657 auto range = getODSOperandIndexAndLength(0);
10658 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
10659 return mutableRange;
10660}
10661
10662void XOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs) {
10663 build(odsBuilder, odsState, mlir::ValueRange{lhs, rhs});
10664
10665}
10666
10667void XOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
10668 odsState.addOperands(inputs);
10669 odsState.addTypes(result);
10670}
10671
10672void XOrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10673 odsState.addOperands(operands);
10674 odsState.addAttributes(attributes);
10675 assert(resultTypes.size() == 1u && "mismatched number of return types");
10676 odsState.addTypes(resultTypes);
10677}
10678
10679void XOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10680 odsState.addOperands(operands);
10681 odsState.addAttributes(attributes);
10682
10683 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
10684 if (::mlir::succeeded(XOrOp::inferReturnTypes(odsBuilder.getContext(),
10685 odsState.location, operands,
10686 odsState.attributes.getDictionary(odsState.getContext()),
10687 odsState.getRawProperties(),
10688 odsState.regions, inferredReturnTypes))) {
10689 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
10690 odsState.addTypes(inferredReturnTypes);
10691 } else {
10692 ::llvm::report_fatal_error("Failed to infer result type(s).");
10693 }
10694}
10695
10696::llvm::LogicalResult XOrOp::verifyInvariantsImpl() {
10697 {
10698 unsigned index = 0; (void)index;
10699 auto valueGroup0 = getODSOperands(0);
10700
10701 for (auto v : valueGroup0) {
10702 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT1(*this, v.getType(), "operand", index++)))
10703 return ::mlir::failure();
10704 }
10705 }
10706 {
10707 unsigned index = 0; (void)index;
10708 auto valueGroup0 = getODSResults(0);
10709
10710 for (auto v : valueGroup0) {
10711 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
10712 return ::mlir::failure();
10713 }
10714 }
10715 return ::mlir::success();
10716}
10717
10718::llvm::LogicalResult XOrOp::verifyInvariants() {
10719 return verifyInvariantsImpl();
10720}
10721
10722::llvm::LogicalResult XOrOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
10723 inferredReturnTypes.resize(1);
10724 ::mlir::Builder odsBuilder(context);
10725 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
10726 inferredReturnTypes[0] = odsInferredType0;
10727 return ::mlir::success();
10728}
10729
10730::mlir::ParseResult XOrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10731 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
10732 ::llvm::SMLoc inputsOperandsLoc;
10733 (void)inputsOperandsLoc;
10734
10735 inputsOperandsLoc = parser.getCurrentLocation();
10736 if (parser.parseOperandList(inputsOperands))
10737 return ::mlir::failure();
10738 {
10739 auto loc = parser.getCurrentLocation();(void)loc;
10740 if (parser.parseOptionalAttrDict(result.attributes))
10741 return ::mlir::failure();
10742 }
10743 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
10744 result.addTypes(odsBuildableType0);
10745 if (parser.resolveOperands(inputsOperands, odsBuildableType0, inputsOperandsLoc, result.operands))
10746 return ::mlir::failure();
10747 return ::mlir::success();
10748}
10749
10750void XOrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
10751 _odsPrinter << ' ';
10752 _odsPrinter << getInputs();
10753 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
10754 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
10755}
10756
10757void XOrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
10758}
10759
10760} // namespace smt
10761} // namespace llzk
10762MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::XOrOp)
10763
10764namespace llzk {
10765namespace smt {
10766
10767//===----------------------------------------------------------------------===//
10768// ::llzk::smt::YieldOp definitions
10769//===----------------------------------------------------------------------===//
10770
10771namespace detail {
10772std::pair<unsigned, unsigned> YieldOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
10773 bool isVariadic[] = {true};
10774 int prevVariadicCount = 0;
10775 for (unsigned i = 0; i < index; ++i)
10776 if (isVariadic[i]) ++prevVariadicCount;
10777
10778 // Calculate how many dynamic values a static variadic operand corresponds to.
10779 // This assumes all static variadic operands have the same dynamic value count.
10780 int variadicSize = (odsOperandsSize - 0) / 1;
10781 // `index` passed in as the parameter is the static index which counts each
10782 // operand (variadic or not) as size 1. So here for each previous static variadic
10783 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10784 // value pack for this static operand starts.
10785 int start = index + (variadicSize - 1) * prevVariadicCount;
10786 int size = isVariadic[index] ? variadicSize : 1;
10787 return {start, size};
10788}
10789
10790} // namespace detail
10792
10793::llvm::LogicalResult YieldOpAdaptor::verify(::mlir::Location loc) {
10794 return ::mlir::success();
10795}
10796
10797std::pair<unsigned, unsigned> YieldOp::getODSOperandIndexAndLength(unsigned index) {
10798 bool isVariadic[] = {true};
10799 int prevVariadicCount = 0;
10800 for (unsigned i = 0; i < index; ++i)
10801 if (isVariadic[i]) ++prevVariadicCount;
10802
10803 // Calculate how many dynamic values a static variadic operand corresponds to.
10804 // This assumes all static variadic operands have the same dynamic value count.
10805 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
10806 // `index` passed in as the parameter is the static index which counts each
10807 // operand (variadic or not) as size 1. So here for each previous static variadic
10808 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10809 // value pack for this static operand starts.
10810 int start = index + (variadicSize - 1) * prevVariadicCount;
10811 int size = isVariadic[index] ? variadicSize : 1;
10812 return {start, size};
10813}
10814
10815::mlir::MutableOperandRange YieldOp::getValuesMutable() {
10816 auto range = getODSOperandIndexAndLength(0);
10817 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
10818 return mutableRange;
10819}
10820
10821void YieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
10822 build(odsBuilder, odsState, {});
10823
10824}
10825
10826void YieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange values) {
10827 odsState.addOperands(values);
10828}
10829
10830void YieldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10831 odsState.addOperands(operands);
10832 odsState.addAttributes(attributes);
10833 assert(resultTypes.size() == 0u && "mismatched number of return types");
10834 odsState.addTypes(resultTypes);
10835}
10836
10837::llvm::LogicalResult YieldOp::verifyInvariantsImpl() {
10838 {
10839 unsigned index = 0; (void)index;
10840 auto valueGroup0 = getODSOperands(0);
10841
10842 for (auto v : valueGroup0) {
10843 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT10(*this, v.getType(), "operand", index++)))
10844 return ::mlir::failure();
10845 }
10846 }
10847 return ::mlir::success();
10848}
10849
10850::llvm::LogicalResult YieldOp::verifyInvariants() {
10851 return verifyInvariantsImpl();
10852}
10853
10854::mlir::ParseResult YieldOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10855 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> valuesOperands;
10856 ::llvm::SMLoc valuesOperandsLoc;
10857 (void)valuesOperandsLoc;
10858 ::llvm::SmallVector<::mlir::Type, 1> valuesTypes;
10859
10860 valuesOperandsLoc = parser.getCurrentLocation();
10861 if (parser.parseOperandList(valuesOperands))
10862 return ::mlir::failure();
10863 if (!valuesOperands.empty()) {
10864 if (parser.parseColon())
10865 return ::mlir::failure();
10866
10867 if (parser.parseTypeList(valuesTypes))
10868 return ::mlir::failure();
10869 }
10870 {
10871 auto loc = parser.getCurrentLocation();(void)loc;
10872 if (parser.parseOptionalAttrDict(result.attributes))
10873 return ::mlir::failure();
10874 }
10875 if (parser.resolveOperands(valuesOperands, valuesTypes, valuesOperandsLoc, result.operands))
10876 return ::mlir::failure();
10877 return ::mlir::success();
10878}
10879
10880void YieldOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
10881 if (!getValues().empty()) {
10882 _odsPrinter << ' ';
10883 _odsPrinter << getValues();
10884 _odsPrinter << ' ' << ":";
10885 _odsPrinter << ' ';
10886 _odsPrinter << getValues().getTypes();
10887 }
10888 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
10889 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
10890}
10891
10892void YieldOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
10893}
10894
10895::mlir::MutableOperandRange YieldOp::getMutableSuccessorOperands(
10896 ::mlir::RegionBranchPoint point) {
10897 return ::mlir::MutableOperandRange(*this);
10898}
10899
10900} // namespace smt
10901} // namespace llzk
10902MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::YieldOp)
10903
10904
10905#endif // GET_OP_CLASSES
10906
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:411
AndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:326
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:386
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:395
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:380
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:527
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:415
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:499
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:495
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:433
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:534
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs)
Definition SMT.cpp.inc:439
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:473
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:507
ApplyFuncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:454
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:570
ApplyFuncOpAdaptor(ApplyFuncOp op)
Definition SMT.cpp.inc:568
::mlir::MutableOperandRange getArgsMutable()
Definition SMT.cpp.inc:592
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:685
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:653
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value func, ::mlir::ValueRange args)
Definition SMT.cpp.inc:598
::mlir::TypedValue<::llzk::smt::SMTFuncType > getFunc()
Definition SMT.h.inc:518
::mlir::Operation::operand_range getArgs()
Definition SMT.h.inc:522
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:536
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:699
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:757
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:512
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:689
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:574
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:744
ArrayBroadcastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:599
ArrayBroadcastOpAdaptor(ArrayBroadcastOp op)
Definition SMT.cpp.inc:773
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:775
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:858
::mlir::TypedValue<::mlir::Type > getValue()
Definition SMT.h.inc:662
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:868
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:798
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:826
::mlir::TypedValue<::llzk::smt::ArrayType > getResult()
Definition SMT.h.inc:681
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:822
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value)
Definition SMT.cpp.inc:779
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:675
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:656
ArraySelectOpAdaptor(ArraySelectOp op)
Definition SMT.cpp.inc:884
ArraySelectOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:735
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:886
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:991
::mlir::TypedValue<::mlir::Type > getIndex()
Definition SMT.h.inc:806
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:824
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:1049
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value array, ::mlir::Value index)
Definition SMT.cpp.inc:890
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:796
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1036
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:981
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:945
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:977
::mlir::TypedValue<::llzk::smt::ArrayType > getArray()
Definition SMT.h.inc:802
ArrayStoreOpAdaptor(ArrayStoreOp op)
Definition SMT.cpp.inc:1065
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:1067
ArrayStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:887
::mlir::TypedValue<::mlir::Type > getValue()
Definition SMT.h.inc:966
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1239
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:952
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:1255
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:1173
::mlir::TypedValue<::llzk::smt::ArrayType > getArray()
Definition SMT.h.inc:958
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:1183
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:989
::mlir::TypedValue<::mlir::Type > getIndex()
Definition SMT.h.inc:962
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:1129
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:1169
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value array, ::mlir::Value index, ::mlir::Value value)
Definition SMT.cpp.inc:1071
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:1273
AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1052
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:1312
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:1295
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1331
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input)
Definition SMT.cpp.inc:1277
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1109
::mlir::TypedValue<::llzk::smt::BoolType > getInput()
Definition SMT.h.inc:1115
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:1308
BV2IntOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1210
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:1369
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:1438
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:1590
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:1628
::mlir::TypedValue<::llzk::smt::BitVectorType > getInput()
Definition SMT.h.inc:1285
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:1447
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:1434
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:1616
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1661
::mlir::UnitAttr getIsSignedAttr()
Definition SMT.h.inc:1317
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:1400
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:1298
::mlir::StringAttr getIsSignedAttrName()
Definition SMT.h.inc:1263
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:1620
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:1377
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:1681
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:1416
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:1421
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input, ::mlir::UnitAttr is_signed)
Definition SMT.cpp.inc:1475
FoldAdaptor::Properties Properties
Definition SMT.h.inc:1257
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:1454
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1279
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:1427
void setIsSigned(bool attrValue)
Definition SMT.cpp.inc:1467
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:1699
BVAShrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1402
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:1800
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:1491
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:1850
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:1469
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:1786
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:1473
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:1758
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:1790
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:1703
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1463
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:1497
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1837
BVAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1554
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:1868
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:1959
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:2006
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:1649
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:1625
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:1955
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:2019
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1615
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:1872
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:1927
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:1621
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:1643
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:1969
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:2037
BVAndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1706
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:1773
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:2138
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:2124
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:2175
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:1777
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:2128
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:1801
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1767
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:1795
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:2041
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:2096
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:2188
BVCmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1889
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:2213
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:2272
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:2560
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:2455
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::BVCmpPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:2313
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:2539
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:2467
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:1972
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:2279
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:2261
::mlir::StringAttr getPredAttrName()
Definition SMT.h.inc:1946
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:2299
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:1990
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:2245
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:2283
FoldAdaptor::Properties Properties
Definition SMT.h.inc:1940
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:2422
::llzk::smt::BVCmpPredicate getPred()
Definition SMT.cpp.inc:2304
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:2266
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1962
::llzk::smt::BVCmpPredicateAttr getPredAttr()
Definition SMT.h.inc:2009
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:2292
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:2459
void setPred(::llzk::smt::BVCmpPredicate attrValue)
Definition SMT.cpp.inc:2309
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:1968
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:2222
static BVCmpPredicateAttr get(::mlir::MLIRContext *context, BVCmpPredicate val)
BVConstantOpAdaptor(BVConstantOp op)
Definition SMT.cpp.inc:2583
BVConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2119
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:2585
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:2655
::llzk::smt::BitVectorAttr getValue()
Definition SMT.cpp.inc:2676
::llzk::smt::BitVectorAttr getValueAttr()
Definition SMT.h.inc:2213
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2194
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:2782
::mlir::StringAttr getValueAttrName()
Definition SMT.h.inc:2168
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:2644
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:2764
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMTOps.cpp:119
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:2671
FoldAdaptor::Properties Properties
Definition SMT.h.inc:2162
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:2638
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:2664
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, const llvm::APInt &value)
Definition SMT.cpp.inc:2681
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:2786
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:2594
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:2633
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:2821
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:2813
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:2617
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:2651
BVLShrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2292
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:2839
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:2898
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:2843
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:2977
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:2930
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:2387
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2381
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:2926
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:2359
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:2353
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:2940
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:2363
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:2990
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3008
BVMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2444
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3095
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:2511
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:2539
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2533
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3146
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3109
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:3099
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:2515
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:2505
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3159
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:3012
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3067
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3177
BVNegOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2596
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3295
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2672
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3233
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:2653
::mlir::TypedValue<::llzk::smt::BitVectorType > getInput()
Definition SMT.h.inc:2659
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3305
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3255
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:3259
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:2678
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:3181
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3269
BVNotOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2735
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3323
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3401
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:3405
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:2792
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3415
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3451
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3441
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:2817
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:3327
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2811
::mlir::TypedValue<::llzk::smt::BitVectorType > getInput()
Definition SMT.h.inc:2798
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3379
BVOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2874
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3469
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:2969
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3556
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:2935
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:2941
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3528
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:3473
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:2945
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2963
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3620
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:3560
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3607
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3570
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3638
BVSDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3026
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3115
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3697
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3725
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3097
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:3642
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:3729
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3776
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3739
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3121
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3087
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3789
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3093
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3807
BVSModOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3178
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3267
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3866
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3245
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3249
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3894
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:3811
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3908
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3239
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:3898
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3958
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3273
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3945
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3976
BVSRemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3330
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3419
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:3980
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3397
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:4127
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:4063
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4035
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:4067
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:4077
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3401
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3391
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:4114
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3425
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:4145
BVShlOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3482
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3549
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:4296
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4204
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3571
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:4232
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3553
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:4149
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3543
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3577
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:4246
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:4283
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:4236
BVUDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3634
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:4314
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:4465
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3723
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3695
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:4318
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:4401
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3705
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:4405
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:4415
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3729
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4373
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:4452
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3701
BVURemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3786
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:4483
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3847
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3881
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:4574
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3853
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:4584
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3875
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3857
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:4634
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4542
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:4570
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:4487
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:4621
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:4652
BVXOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3938
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:4009
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:4656
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3999
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:4005
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:4753
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4711
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4027
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:4790
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:4743
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:4033
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:4803
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:4739
BoolConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4121
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:4828
BoolConstantOpAdaptor(BoolConstantOp op)
Definition SMT.cpp.inc:4826
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:4907
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:4887
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:4876
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::BoolAttr value)
Definition SMT.cpp.inc:4928
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:4881
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:5055
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5025
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4196
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:5084
::mlir::StringAttr getValueAttrName()
Definition SMT.h.inc:4170
FoldAdaptor::Properties Properties
Definition SMT.h.inc:4164
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:4894
void setValue(bool attrValue)
Definition SMT.cpp.inc:4924
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5043
::mlir::BoolAttr getValueAttr()
Definition SMT.h.inc:4215
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:5047
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:4860
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:5076
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:4914
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:4837
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:4898
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5102
CheckOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4312
::mlir::Region & getUnsatRegion()
Definition SMT.h.inc:4390
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange results)
Definition SMT.cpp.inc:5124
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:5172
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5140
::mlir::Region & getUnknownRegion()
Definition SMT.h.inc:4386
::mlir::Region & getSatRegion()
Definition SMT.h.inc:4382
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5168
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition SMT.cpp.inc:5106
::mlir::Operation::result_range getResults()
Definition SMT.h.inc:4378
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:5215
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4372
ConcatOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4443
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5279
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:4514
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:5425
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5338
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5366
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:4504
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:5370
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:5283
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:5412
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:4510
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4532
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMTOps.cpp:316
DeclareFunOpAdaptor(DeclareFunOp op)
Definition SMT.cpp.inc:5448
DeclareFunOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4626
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5450
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:5458
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:5613
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5609
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:5644
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:5535
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:5528
void setNamePrefix(::std::optional<::llvm::StringRef > attrValue)
Definition SMT.cpp.inc:5546
::mlir::StringAttr getNamePrefixAttr()
Definition SMT.h.inc:4720
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:5508
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:5515
::mlir::TypedValue<::mlir::Type > getResult()
Definition SMT.h.inc:4707
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:5502
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:5657
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition SMT.h.inc:4697
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5592
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:5481
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:5497
FoldAdaptor::Properties Properties
Definition SMT.h.inc:4669
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:5519
::std::optional< ::llvm::StringRef > getNamePrefix()
Definition SMT.cpp.inc:5541
::mlir::StringAttr getNamePrefixAttrName()
Definition SMT.h.inc:4675
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Type type)
Definition SMT.cpp.inc:5554
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4701
DistinctOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4798
DistinctOpAdaptor(DistinctOp op)
Definition SMT.cpp.inc:5697
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5699
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:4852
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5783
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4867
::llvm::LogicalResult verify()
Definition SMTOps.cpp:286
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:5703
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:5789
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5761
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:5721
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs)
Definition SMT.cpp.inc:5727
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:5797
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5833
EqOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4927
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5917
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:5923
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:5837
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:5855
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs)
Definition SMT.cpp.inc:5861
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5895
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:4981
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:5931
::llvm::LogicalResult verify()
Definition SMTOps.cpp:264
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4996
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5980
ExistsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5128
::mlir::Region & getBody()
Definition SMT.h.inc:5229
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:6250
FoldAdaptor::Properties Properties
Definition SMT.h.inc:5171
::llvm::LogicalResult verify()
Definition SMTOps.cpp:605
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:6113
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:6084
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:6096
::mlir::StringAttr getNoPatternAttrName()
Definition SMT.h.inc:5185
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:6200
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:6077
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:6142
::mlir::MutableArrayRef<::mlir::Region > getPatterns()
Definition SMT.h.inc:5233
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:6317
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:6236
void setNoPattern(bool attrValue)
Definition SMT.cpp.inc:6186
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:6242
::mlir::UnitAttr getNoPatternAttr()
Definition SMT.h.inc:5251
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:5219
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition SMT.cpp.inc:6194
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:6047
::mlir::ArrayAttr getBoundVarNamesAttr()
Definition SMT.h.inc:5256
::std::optional< ::mlir::ArrayAttr > getBoundVarNames()
Definition SMT.cpp.inc:6177
::mlir::StringAttr getWeightAttrName()
Definition SMT.h.inc:5193
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:6121
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:6155
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:5996
::mlir::StringAttr getBoundVarNamesAttrName()
Definition SMT.h.inc:5177
::mlir::IntegerAttr getWeightAttr()
Definition SMT.h.inc:5246
uint32_t getWeight()
Definition SMT.cpp.inc:6165
void setWeight(uint32_t attrValue)
Definition SMT.cpp.inc:6182
ExtractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5382
ExtractOpAdaptor(ExtractOp op)
Definition SMT.cpp.inc:6398
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:6400
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:6577
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:6571
::mlir::TypedValue<::llzk::smt::BitVectorType > getInput()
Definition SMT.h.inc:5457
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:5451
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:6470
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:6618
::mlir::StringAttr getLowBitAttrName()
Definition SMT.h.inc:5435
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:6409
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:6432
FoldAdaptor::Properties Properties
Definition SMT.h.inc:5429
void setLowBit(uint32_t attrValue)
Definition SMT.cpp.inc:6496
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:6453
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:5470
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:6448
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::IntegerAttr lowBit, ::mlir::Value input)
Definition SMT.cpp.inc:6500
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:6486
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:6479
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:6466
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:6544
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:6632
::llvm::LogicalResult verify()
Definition SMTOps.cpp:298
::mlir::IntegerAttr getLowBitAttr()
Definition SMT.h.inc:5489
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:5476
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:6459
ForallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5634
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:6681
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:6785
::std::optional< ::mlir::ArrayAttr > getBoundVarNames()
Definition SMT.cpp.inc:6878
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7018
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:6797
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:6951
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:6814
::mlir::StringAttr getBoundVarNamesAttrName()
Definition SMT.h.inc:5683
::llvm::LogicalResult verify()
Definition SMTOps.cpp:577
::mlir::Region & getBody()
Definition SMT.h.inc:5735
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:6697
::mlir::ArrayAttr getBoundVarNamesAttr()
Definition SMT.h.inc:5762
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:6822
::mlir::IntegerAttr getWeightAttr()
Definition SMT.h.inc:5752
::mlir::StringAttr getWeightAttrName()
Definition SMT.h.inc:5699
uint32_t getWeight()
Definition SMT.cpp.inc:6866
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:6856
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:6778
::mlir::StringAttr getNoPatternAttrName()
Definition SMT.h.inc:5691
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:6901
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:6843
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:6943
void setWeight(uint32_t attrValue)
Definition SMT.cpp.inc:6883
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:5725
::mlir::UnitAttr getNoPatternAttr()
Definition SMT.h.inc:5757
::mlir::MutableArrayRef<::mlir::Region > getPatterns()
Definition SMT.h.inc:5739
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:6748
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition SMT.cpp.inc:6895
void setNoPattern(bool attrValue)
Definition SMT.cpp.inc:6887
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:6937
FoldAdaptor::Properties Properties
Definition SMT.h.inc:5677
ImpliesOpAdaptor(ImpliesOp op)
Definition SMT.cpp.inc:7092
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7094
ImpliesOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5857
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:7234
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7224
::mlir::TypedValue<::llzk::smt::BoolType > getRhs()
Definition SMT.h.inc:5928
::mlir::TypedValue<::llzk::smt::BoolType > getLhs()
Definition SMT.h.inc:5924
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:7193
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:7098
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:7181
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:7153
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:5918
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:7185
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:5946
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7252
Int2BVOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6009
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6085
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:7275
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:7297
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7328
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:7256
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:7301
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:6091
::mlir::TypedValue<::llzk::smt::IntType > getInput()
Definition SMT.h.inc:6072
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:6066
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:7338
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7356
IntAbsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6145
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7466
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:7446
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:7473
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:7412
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6221
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:7438
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:7434
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:7360
::mlir::TypedValue<::llzk::smt::IntType > getInput()
Definition SMT.h.inc:6208
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:6202
IntAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6281
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7509
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:6341
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:6335
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:7592
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs)
Definition SMT.cpp.inc:7537
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:7627
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:7566
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7620
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:7531
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6350
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:7513
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:7588
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:7600
IntCmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6442
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7652
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:6515
::mlir::StringAttr getPredAttrName()
Definition SMT.h.inc:6499
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:7861
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::IntPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:7752
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:7722
void setPred(::llzk::smt::IntPredicate attrValue)
Definition SMT.cpp.inc:7748
FoldAdaptor::Properties Properties
Definition SMT.h.inc:6493
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:7700
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:7684
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:7990
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:7898
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:7718
::llzk::smt::IntPredicate getPred()
Definition SMT.cpp.inc:7743
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:7711
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:7705
::mlir::TypedValue<::llzk::smt::IntType > getRhs()
Definition SMT.h.inc:6525
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:7894
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:7661
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7972
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:7731
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6543
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:7906
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:7738
::mlir::TypedValue<::llzk::smt::IntType > getLhs()
Definition SMT.h.inc:6521
::llzk::smt::IntPredicateAttr getPredAttr()
Definition SMT.h.inc:6562
IntConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6672
IntConstantOpAdaptor(IntConstantOp op)
Definition SMT.cpp.inc:8013
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8015
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:8094
::mlir::APInt getValue()
Definition SMT.cpp.inc:8106
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:8081
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8200
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:8085
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:8204
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:8101
FoldAdaptor::Properties Properties
Definition SMT.h.inc:6715
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:8068
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:8047
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:8024
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6747
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:8063
::mlir::IntegerAttr getValueAttr()
Definition SMT.h.inc:6766
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8182
::mlir::StringAttr getValueAttrName()
Definition SMT.h.inc:6721
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::IntegerAttr value)
Definition SMT.cpp.inc:8111
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8212
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:8074
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8230
IntDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6843
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:8329
::mlir::TypedValue<::llzk::smt::IntType > getRhs()
Definition SMT.h.inc:6914
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8370
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8317
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8289
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:8234
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6932
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:8360
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:6904
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:8321
::mlir::TypedValue<::llzk::smt::IntType > getLhs()
Definition SMT.h.inc:6910
IntModOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6995
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8388
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:8392
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8475
::mlir::TypedValue<::llzk::smt::IntType > getLhs()
Definition SMT.h.inc:7062
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7056
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8447
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:8487
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7084
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8528
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:8479
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:8518
::mlir::TypedValue<::llzk::smt::IntType > getRhs()
Definition SMT.h.inc:7066
IntMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7144
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8564
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs)
Definition SMT.cpp.inc:8592
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7213
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:8568
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8643
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:8655
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8682
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:7204
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8621
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:8675
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7198
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:8647
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:8586
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8700
IntNegOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7274
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:8810
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8817
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8778
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8756
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7331
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:8790
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7350
::mlir::TypedValue<::llzk::smt::IntType > getInput()
Definition SMT.h.inc:7337
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:8704
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:8782
static IntPredicateAttr get(::mlir::MLIRContext *context, IntPredicate val)
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8835
IntSubOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7413
::mlir::TypedValue<::llzk::smt::IntType > getLhs()
Definition SMT.h.inc:7480
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:8839
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:8965
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8894
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8975
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7474
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:8926
::mlir::TypedValue<::llzk::smt::IntType > getRhs()
Definition SMT.h.inc:7484
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7502
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:8934
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8922
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8993
IteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7565
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:9170
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9154
::mlir::TypedValue<::mlir::Type > getElseValue()
Definition SMT.h.inc:7644
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7667
::mlir::TypedValue<::mlir::Type > getThenValue()
Definition SMT.h.inc:7640
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:9095
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9091
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7630
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value cond, ::mlir::Value thenValue, ::mlir::Value elseValue)
Definition SMT.cpp.inc:8997
::mlir::TypedValue<::mlir::Type > getResult()
Definition SMT.h.inc:7673
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9055
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9105
::mlir::TypedValue<::llzk::smt::BoolType > getCond()
Definition SMT.h.inc:7636
NotOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7730
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9188
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9298
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:9270
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7806
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9266
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7787
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9244
::mlir::TypedValue<::llzk::smt::BoolType > getInput()
Definition SMT.h.inc:7793
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:9305
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9278
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:9192
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9341
OrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7866
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7935
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9457
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9425
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs)
Definition SMT.cpp.inc:9369
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9437
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9403
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition SMT.cpp.inc:9429
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:9363
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:9464
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7920
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:7926
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:9345
PopOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8028
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9489
::mlir::StringAttr getCountAttrName()
Definition SMT.h.inc:8077
FoldAdaptor::Properties Properties
Definition SMT.h.inc:8071
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:9568
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:9498
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:9575
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9627
uint32_t getCount()
Definition SMT.cpp.inc:9580
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9659
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:9555
void setCount(uint32_t attrValue)
Definition SMT.cpp.inc:9585
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9640
::mlir::IntegerAttr getCountAttr()
Definition SMT.h.inc:8118
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9636
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:9537
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count)
Definition SMT.cpp.inc:9589
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:9521
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:9542
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:9548
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:9559
PushOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8223
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9689
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9827
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9836
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:9748
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:9742
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:9759
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count)
Definition SMT.cpp.inc:9789
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:9775
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9840
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:9721
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9859
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:9768
uint32_t getCount()
Definition SMT.cpp.inc:9780
FoldAdaptor::Properties Properties
Definition SMT.h.inc:8266
::mlir::StringAttr getCountAttrName()
Definition SMT.h.inc:8272
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:9698
::mlir::IntegerAttr getCountAttr()
Definition SMT.h.inc:8313
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:9737
void setCount(uint32_t attrValue)
Definition SMT.cpp.inc:9785
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:9755
RepeatOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8387
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9882
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:9933
::llvm::LogicalResult verify()
Definition SMTOps.cpp:334
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, unsigned count, mlir::Value input)
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:8463
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:8444
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9927
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9905
ResetOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8527
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9951
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9975
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9988
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9971
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
Definition SMT.cpp.inc:9955
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9979
::llvm::LogicalResult verify(::mlir::Location loc)
SetInfoOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8693
::mlir::Attribute getValue()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llzk::smt::KeywordAttr getKeyAttr()
Definition SMT.h.inc:8791
::llzk::smt::KeywordAttr getKey()
::llvm::LogicalResult verifyInvariantsImpl()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::StringAttr getValueAttrName()
Definition SMT.h.inc:8750
::llvm::LogicalResult verifyInvariants()
FoldAdaptor::Properties Properties
Definition SMT.h.inc:8736
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Attribute getValueAttr()
Definition SMT.h.inc:8796
::llvm::LogicalResult verify()
Definition SMTOps.cpp:198
::mlir::StringAttr getKeyAttrName()
Definition SMT.h.inc:8742
static llvm::hash_code computePropertiesHash(const Properties &prop)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::KeywordAttr key, ::mlir::Attribute value)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
SetLogicOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8903
::llvm::LogicalResult verify(::mlir::Location loc)
SetLogicOpAdaptor(SetLogicOp op)
::llvm::StringRef getLogic()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getLogicAttr()
Definition SMT.h.inc:8993
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr logic)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariants()
void setLogic(::llvm::StringRef attrValue)
::mlir::StringAttr getLogicAttrName()
Definition SMT.h.inc:8952
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
FoldAdaptor::Properties Properties
Definition SMT.h.inc:8946
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::LogicalResult verify(::mlir::Location loc)
SolverOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:9072
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:9138
::llvm::LogicalResult verifyInvariants()
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute > attributes={})
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::result_range getResults()
Definition SMT.h.inc:9144
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:9126
void print(::mlir::OpAsmPrinter &_odsPrinter)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Region & getBodyRegion()
Definition SMT.h.inc:9148
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:9132
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::MutableOperandRange getInputsMutable()
::llvm::LogicalResult verify(::mlir::Location loc)
XOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:9197
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:9266
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariantsImpl()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:9251
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::MutableOperandRange getInputsMutable()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariants()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs)
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:9257
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult verify(::mlir::Location loc)
YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:9325
::mlir::MutableOperandRange getValuesMutable()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariants()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:9379
::mlir::Operation::operand_range getValues()
Definition SMT.h.inc:9385
::mlir::MutableOperandRange getMutableSuccessorOperands(::mlir::RegionBranchPoint point)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariantsImpl()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:390
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:549
BV2IntOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1183
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:1179
::llzk::smt::BVCmpPredicateAttr getPredAttr()
Definition SMT.h.inc:1876
::llzk::smt::BVCmpPredicate getPred()
Definition SMT.cpp.inc:2205
BVCmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1858
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:1854
::llzk::smt::BitVectorAttr getValueAttr()
Definition SMT.h.inc:2106
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:2084
BVConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2088
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:4086
BoolConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4090
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:4591
DeclareFunOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4595
::std::optional< ::llvm::StringRef > getNamePrefix()
Definition SMT.cpp.inc:5442
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:5678
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:5812
::std::optional< ::mlir::ArrayAttr > getBoundVarNames()
Definition SMT.cpp.inc:5972
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:5077
ExistsOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5081
ExtractOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5351
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:5347
::std::optional< ::mlir::ArrayAttr > getBoundVarNames()
Definition SMT.cpp.inc:6673
ForallOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5587
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:5583
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:7488
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:6407
::llzk::smt::IntPredicateAttr getPredAttr()
Definition SMT.h.inc:6429
IntCmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6411
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:6637
IntConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6641
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:8543
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:9320
PopOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7997
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:7993
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:8188
PushOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8192
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:8652
SetInfoOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8656
::llzk::smt::KeywordAttr getKeyAttr()
Definition SMT.h.inc:8674
SetLogicOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8872
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:8868
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
bool isAnyNonFuncSMTValueType(mlir::Type type)
Returns whether the given type is an SMT value type (excluding functions).
::llvm::StringRef stringifyBVCmpPredicate(BVCmpPredicate val)
::llvm::StringRef stringifyIntPredicate(IntPredicate val)
::std::optional< IntPredicate > symbolizeIntPredicate(::llvm::StringRef str)
::std::optional< BVCmpPredicate > symbolizeBVCmpPredicate(::llvm::StringRef str)
bool isAnySMTValueType(mlir::Type type)
Returns whether the given type is an SMT value type.