LLZK 2.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
68#endif // GET_OP_LIST
69
70#ifdef GET_OP_CLASSES
71#undef GET_OP_CLASSES
72
73
74//===----------------------------------------------------------------------===//
75// Local Utility Method Definitions
76//===----------------------------------------------------------------------===//
77
78namespace llzk {
79namespace smt {
80
81static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT1(
82 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
83 unsigned valueIndex) {
84 if (!((::llvm::isa<::llzk::smt::BoolType>(type)))) {
85 return op->emitOpError(valueKind) << " #" << valueIndex
86 << " must be variadic of , but got " << type;
87 }
88 return ::mlir::success();
89}
90
91static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT2(
92 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
93 unsigned valueIndex) {
94 if (!((::llvm::isa<::llzk::smt::BoolType>(type)))) {
95 return op->emitOpError(valueKind) << " #" << valueIndex
96 << " must be , but got " << type;
97 }
98 return ::mlir::success();
99}
100
101static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT3(
102 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
103 unsigned valueIndex) {
104 if (!((::llvm::isa<::llzk::smt::SMTFuncType>(type)))) {
105 return op->emitOpError(valueKind) << " #" << valueIndex
106 << " must be , but got " << type;
107 }
108 return ::mlir::success();
109}
110
111static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT4(
112 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
113 unsigned valueIndex) {
114 if (!((smt::isAnyNonFuncSMTValueType(type)))) {
115 return op->emitOpError(valueKind) << " #" << valueIndex
116 << " must be variadic of any non-function SMT value type, but got " << type;
117 }
118 return ::mlir::success();
119}
120
121static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT5(
122 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
123 unsigned valueIndex) {
124 if (!((smt::isAnyNonFuncSMTValueType(type)))) {
125 return op->emitOpError(valueKind) << " #" << valueIndex
126 << " must be any non-function SMT value type, but got " << type;
127 }
128 return ::mlir::success();
129}
130
131static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT6(
132 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
133 unsigned valueIndex) {
134 if (!((smt::isAnySMTValueType(type)))) {
135 return op->emitOpError(valueKind) << " #" << valueIndex
136 << " must be any SMT value type, but got " << type;
137 }
138 return ::mlir::success();
139}
140
141static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT7(
142 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
143 unsigned valueIndex) {
144 if (!((::llvm::isa<::llzk::smt::ArrayType>(type)))) {
145 return op->emitOpError(valueKind) << " #" << valueIndex
146 << " must be , but got " << type;
147 }
148 return ::mlir::success();
149}
150
151static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT8(
152 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
153 unsigned valueIndex) {
154 if (!((::llvm::isa<::llzk::smt::BitVectorType>(type)))) {
155 return op->emitOpError(valueKind) << " #" << valueIndex
156 << " must be , but got " << type;
157 }
158 return ::mlir::success();
159}
160
161static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT9(
162 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
163 unsigned valueIndex) {
164 if (!((::llvm::isa<::llzk::smt::IntType>(type)))) {
165 return op->emitOpError(valueKind) << " #" << valueIndex
166 << " must be , but got " << type;
167 }
168 return ::mlir::success();
169}
170
171static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT10(
172 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
173 unsigned valueIndex) {
174 if (!((true))) {
175 return op->emitOpError(valueKind) << " #" << valueIndex
176 << " must be variadic of any type, but got " << type;
177 }
178 return ::mlir::success();
179}
180
181static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT11(
182 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
183 unsigned valueIndex) {
184 if (!((::llvm::isa<::llzk::smt::IntType>(type)))) {
185 return op->emitOpError(valueKind) << " #" << valueIndex
186 << " must be variadic of , but got " << type;
187 }
188 return ::mlir::success();
189}
190
191static ::llvm::LogicalResult __mlir_ods_local_type_constraint_SMT12(
192 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
193 unsigned valueIndex) {
194 if (!(!((smt::isAnySMTValueType(type))))) {
195 return op->emitOpError(valueKind) << " #" << valueIndex
196 << " must be variadic of any non-smt type, but got " << type;
197 }
198 return ::mlir::success();
199}
200
201static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT1(
202 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
203 if (attr && !((::llvm::isa<::mlir::UnitAttr>(attr))))
204 return emitError() << "attribute '" << attrName
205 << "' failed to satisfy constraint: unit attribute";
206 return ::mlir::success();
207}
208static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT1(
209 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
210 return __mlir_ods_local_attr_constraint_SMT1(attr, attrName, [op]() {
211 return op->emitOpError();
212 });
213}
214
215static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT2(
216 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
217 if (attr && !((::llvm::isa<::llzk::smt::BVCmpPredicateAttr>(attr))))
218 return emitError() << "attribute '" << attrName
219 << "' failed to satisfy constraint: smt bit-vector comparison predicate";
220 return ::mlir::success();
221}
222static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT2(
223 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
224 return __mlir_ods_local_attr_constraint_SMT2(attr, attrName, [op]() {
225 return op->emitOpError();
226 });
227}
228
229static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT3(
230 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
231 if (attr && !((::llvm::isa<::llzk::smt::BitVectorAttr>(attr))))
232 return emitError() << "attribute '" << attrName
233 << "' failed to satisfy constraint: ";
234 return ::mlir::success();
235}
236static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT3(
237 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
238 return __mlir_ods_local_attr_constraint_SMT3(attr, attrName, [op]() {
239 return op->emitOpError();
240 });
241}
242
243static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT4(
244 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
245 if (attr && !((::llvm::isa<::mlir::BoolAttr>(attr))))
246 return emitError() << "attribute '" << attrName
247 << "' failed to satisfy constraint: bool attribute";
248 return ::mlir::success();
249}
250static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT4(
251 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
252 return __mlir_ods_local_attr_constraint_SMT4(attr, attrName, [op]() {
253 return op->emitOpError();
254 });
255}
256
257static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT5(
258 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
259 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
260 return emitError() << "attribute '" << attrName
261 << "' failed to satisfy constraint: string attribute";
262 return ::mlir::success();
263}
264static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT5(
265 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
266 return __mlir_ods_local_attr_constraint_SMT5(attr, attrName, [op]() {
267 return op->emitOpError();
268 });
269}
270
271static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT6(
272 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
273 if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::cast<::mlir::IntegerAttr>(attr).getType().isSignlessInteger(32)))))
274 return emitError() << "attribute '" << attrName
275 << "' failed to satisfy constraint: 32-bit signless integer attribute";
276 return ::mlir::success();
277}
278static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT6(
279 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
280 return __mlir_ods_local_attr_constraint_SMT6(attr, attrName, [op]() {
281 return op->emitOpError();
282 });
283}
284
285static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT7(
286 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
287 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))); }))))
288 return emitError() << "attribute '" << attrName
289 << "' failed to satisfy constraint: string array attribute";
290 return ::mlir::success();
291}
292static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT7(
293 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
294 return __mlir_ods_local_attr_constraint_SMT7(attr, attrName, [op]() {
295 return op->emitOpError();
296 });
297}
298
299static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT8(
300 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
301 if (attr && !((::llvm::isa<::llzk::smt::IntPredicateAttr>(attr))))
302 return emitError() << "attribute '" << attrName
303 << "' failed to satisfy constraint: smt comparison predicate for integers";
304 return ::mlir::success();
305}
306static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT8(
307 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
308 return __mlir_ods_local_attr_constraint_SMT8(attr, attrName, [op]() {
309 return op->emitOpError();
310 });
311}
312
313static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT9(
314 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
315 if (attr && !((::llvm::isa<::mlir::IntegerAttr>(attr))))
316 return emitError() << "attribute '" << attrName
317 << "' failed to satisfy constraint: arbitrary integer attribute";
318 return ::mlir::success();
319}
320static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT9(
321 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
322 return __mlir_ods_local_attr_constraint_SMT9(attr, attrName, [op]() {
323 return op->emitOpError();
324 });
325}
326
327static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT10(
328 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
329 if (attr && !((((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::cast<::mlir::IntegerAttr>(attr).getType().isSignlessInteger(32)))) && ((!::llvm::cast<::mlir::IntegerAttr>(attr).getValue().isNegative()))))
330 return emitError() << "attribute '" << attrName
331 << "' failed to satisfy constraint: 32-bit signless integer attribute whose value is non-negative";
332 return ::mlir::success();
333}
334static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_SMT10(
335 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
336 return __mlir_ods_local_attr_constraint_SMT10(attr, attrName, [op]() {
337 return op->emitOpError();
338 });
339}
340
341static ::llvm::LogicalResult __mlir_ods_local_region_constraint_SMT1(
342 ::mlir::Operation *op, ::mlir::Region &region, ::llvm::StringRef regionName,
343 unsigned regionIndex) {
344 if (!((::llvm::hasNItems(region, 1)))) {
345 return op->emitOpError("region #") << regionIndex
346 << (regionName.empty() ? " " : " ('" + regionName + "') ")
347 << "failed to verify constraint: region with 1 blocks";
348 }
349 return ::mlir::success();
350}
351} // namespace smt
352} // namespace llzk
353namespace llzk {
354namespace smt {
355
356//===----------------------------------------------------------------------===//
357// ::llzk::smt::AndOp definitions
358//===----------------------------------------------------------------------===//
359
360namespace detail {
361std::pair<unsigned, unsigned> AndOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
362 bool isVariadic[] = {true};
363 int prevVariadicCount = 0;
364 for (unsigned i = 0; i < index; ++i)
365 if (isVariadic[i]) ++prevVariadicCount;
366
367 // Calculate how many dynamic values a static variadic operand corresponds to.
368 // This assumes all static variadic operands have the same dynamic value count.
369 int variadicSize = (odsOperandsSize - 0) / 1;
370 // `index` passed in as the parameter is the static index which counts each
371 // operand (variadic or not) as size 1. So here for each previous static variadic
372 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
373 // value pack for this static operand starts.
374 int start = index + (variadicSize - 1) * prevVariadicCount;
375 int size = isVariadic[index] ? variadicSize : 1;
376 return {start, size};
377}
378
379} // namespace detail
381
382::llvm::LogicalResult AndOpAdaptor::verify(::mlir::Location loc) {
383 return ::mlir::success();
384}
385
386std::pair<unsigned, unsigned> AndOp::getODSOperandIndexAndLength(unsigned index) {
387 bool isVariadic[] = {true};
388 int prevVariadicCount = 0;
389 for (unsigned i = 0; i < index; ++i)
390 if (isVariadic[i]) ++prevVariadicCount;
391
392 // Calculate how many dynamic values a static variadic operand corresponds to.
393 // This assumes all static variadic operands have the same dynamic value count.
394 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
395 // `index` passed in as the parameter is the static index which counts each
396 // operand (variadic or not) as size 1. So here for each previous static variadic
397 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
398 // value pack for this static operand starts.
399 int start = index + (variadicSize - 1) * prevVariadicCount;
400 int size = isVariadic[index] ? variadicSize : 1;
401 return {start, size};
402}
403
404::mlir::MutableOperandRange AndOp::getInputsMutable() {
405 auto range = getODSOperandIndexAndLength(0);
406 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
407 return mutableRange;
408}
409
410void AndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs) {
411 build(odsBuilder, odsState, mlir::ValueRange{lhs, rhs});
412
413}
414
415void AndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
416 odsState.addOperands(inputs);
417 odsState.addTypes(result);
418}
419
420void AndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
421 odsState.addOperands(operands);
422 odsState.addAttributes(attributes);
423 assert(resultTypes.size() == 1u && "mismatched number of return types");
424 odsState.addTypes(resultTypes);
425}
426
427void AndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
428 odsState.addOperands(operands);
429 odsState.addAttributes(attributes);
430
431 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
432 if (::mlir::succeeded(AndOp::inferReturnTypes(odsBuilder.getContext(),
433 odsState.location, operands,
434 odsState.attributes.getDictionary(odsState.getContext()),
435 odsState.getRawProperties(),
436 odsState.regions, inferredReturnTypes))) {
437 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
438 odsState.addTypes(inferredReturnTypes);
439 } else {
440 ::llvm::report_fatal_error("Failed to infer result type(s).");
441 }
442}
443
444::llvm::LogicalResult AndOp::verifyInvariantsImpl() {
445 {
446 unsigned index = 0; (void)index;
447 auto valueGroup0 = getODSOperands(0);
448
449 for (auto v : valueGroup0) {
450 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT1(*this, v.getType(), "operand", index++)))
451 return ::mlir::failure();
452 }
453 }
454 {
455 unsigned index = 0; (void)index;
456 auto valueGroup0 = getODSResults(0);
457
458 for (auto v : valueGroup0) {
459 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
460 return ::mlir::failure();
461 }
462 }
463 return ::mlir::success();
464}
465
466::llvm::LogicalResult AndOp::verifyInvariants() {
467 return verifyInvariantsImpl();
468}
469
470::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) {
471 inferredReturnTypes.resize(1);
472 ::mlir::Builder odsBuilder(context);
473 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
474 inferredReturnTypes[0] = odsInferredType0;
475 return ::mlir::success();
476}
477
478::mlir::ParseResult AndOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
479 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
480 ::llvm::SMLoc inputsOperandsLoc;
481 (void)inputsOperandsLoc;
482
483 inputsOperandsLoc = parser.getCurrentLocation();
484 if (parser.parseOperandList(inputsOperands))
485 return ::mlir::failure();
486 {
487 auto loc = parser.getCurrentLocation();(void)loc;
488 if (parser.parseOptionalAttrDict(result.attributes))
489 return ::mlir::failure();
490 }
491 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
492 result.addTypes(odsBuildableType0);
493 if (parser.resolveOperands(inputsOperands, odsBuildableType0, inputsOperandsLoc, result.operands))
494 return ::mlir::failure();
495 return ::mlir::success();
496}
497
498void AndOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
499 _odsPrinter << ' ';
500 _odsPrinter << getInputs();
501 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
502 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
503}
504
505void AndOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
506}
507
508} // namespace smt
509} // namespace llzk
510MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::AndOp)
511
512namespace llzk {
513namespace smt {
514
515//===----------------------------------------------------------------------===//
516// ::llzk::smt::ApplyFuncOp definitions
517//===----------------------------------------------------------------------===//
518
519namespace detail {
520std::pair<unsigned, unsigned> ApplyFuncOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
521 bool isVariadic[] = {false, true};
522 int prevVariadicCount = 0;
523 for (unsigned i = 0; i < index; ++i)
524 if (isVariadic[i]) ++prevVariadicCount;
525
526 // Calculate how many dynamic values a static variadic operand corresponds to.
527 // This assumes all static variadic operands have the same dynamic value count.
528 int variadicSize = (odsOperandsSize - 1) / 1;
529 // `index` passed in as the parameter is the static index which counts each
530 // operand (variadic or not) as size 1. So here for each previous static variadic
531 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
532 // value pack for this static operand starts.
533 int start = index + (variadicSize - 1) * prevVariadicCount;
534 int size = isVariadic[index] ? variadicSize : 1;
535 return {start, size};
536}
537
538} // namespace detail
540
541::llvm::LogicalResult ApplyFuncOpAdaptor::verify(::mlir::Location loc) {
542 return ::mlir::success();
543}
544
545std::pair<unsigned, unsigned> ApplyFuncOp::getODSOperandIndexAndLength(unsigned index) {
546 bool isVariadic[] = {false, true};
547 int prevVariadicCount = 0;
548 for (unsigned i = 0; i < index; ++i)
549 if (isVariadic[i]) ++prevVariadicCount;
550
551 // Calculate how many dynamic values a static variadic operand corresponds to.
552 // This assumes all static variadic operands have the same dynamic value count.
553 int variadicSize = (getOperation()->getNumOperands() - 1) / 1;
554 // `index` passed in as the parameter is the static index which counts each
555 // operand (variadic or not) as size 1. So here for each previous static variadic
556 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
557 // value pack for this static operand starts.
558 int start = index + (variadicSize - 1) * prevVariadicCount;
559 int size = isVariadic[index] ? variadicSize : 1;
560 return {start, size};
561}
562
563::mlir::MutableOperandRange ApplyFuncOp::getArgsMutable() {
564 auto range = getODSOperandIndexAndLength(1);
565 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
566 return mutableRange;
567}
568
569void ApplyFuncOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value func, ::mlir::ValueRange args) {
570 odsState.addOperands(func);
571 odsState.addOperands(args);
572 odsState.addTypes(result);
573}
574
575void ApplyFuncOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value func, ::mlir::ValueRange args) {
576 odsState.addOperands(func);
577 odsState.addOperands(args);
578
579 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
580 if (::mlir::succeeded(ApplyFuncOp::inferReturnTypes(odsBuilder.getContext(),
581 odsState.location, odsState.operands,
582 odsState.attributes.getDictionary(odsState.getContext()),
583 odsState.getRawProperties(),
584 odsState.regions, inferredReturnTypes)))
585 odsState.addTypes(inferredReturnTypes);
586 else
587 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
588
589}
590
591void ApplyFuncOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value func, ::mlir::ValueRange args) {
592 odsState.addOperands(func);
593 odsState.addOperands(args);
594 assert(resultTypes.size() == 1u && "mismatched number of results");
595 odsState.addTypes(resultTypes);
596}
597
598void ApplyFuncOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
599 assert(operands.size() >= 1u && "mismatched number of parameters");
600 odsState.addOperands(operands);
601 odsState.addAttributes(attributes);
602 assert(resultTypes.size() == 1u && "mismatched number of return types");
603 odsState.addTypes(resultTypes);
604}
605
606void ApplyFuncOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
607 assert(operands.size() >= 1u && "mismatched number of parameters");
608 odsState.addOperands(operands);
609 odsState.addAttributes(attributes);
610
611 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
612 if (::mlir::succeeded(ApplyFuncOp::inferReturnTypes(odsBuilder.getContext(),
613 odsState.location, operands,
614 odsState.attributes.getDictionary(odsState.getContext()),
615 odsState.getRawProperties(),
616 odsState.regions, inferredReturnTypes))) {
617 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
618 odsState.addTypes(inferredReturnTypes);
619 } else {
620 ::llvm::report_fatal_error("Failed to infer result type(s).");
621 }
622}
623
624::llvm::LogicalResult ApplyFuncOp::verifyInvariantsImpl() {
625 {
626 unsigned index = 0; (void)index;
627 auto valueGroup0 = getODSOperands(0);
628
629 for (auto v : valueGroup0) {
630 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT3(*this, v.getType(), "operand", index++)))
631 return ::mlir::failure();
632 }
633 auto valueGroup1 = getODSOperands(1);
634
635 for (auto v : valueGroup1) {
636 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT4(*this, v.getType(), "operand", index++)))
637 return ::mlir::failure();
638 }
639 }
640 {
641 unsigned index = 0; (void)index;
642 auto valueGroup0 = getODSResults(0);
643
644 for (auto v : valueGroup0) {
645 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT5(*this, v.getType(), "result", index++)))
646 return ::mlir::failure();
647 }
648 }
649 if (!((std::equal_to<>()(cast<SMTFuncType>((*this->getODSOperands(0).begin()).getType()).getRangeType(), (*this->getODSResults(0).begin()).getType()))))
650 return emitOpError("failed to verify that summary");
651 if (!((llvm::equal(cast<SMTFuncType>((*this->getODSOperands(0).begin()).getType()).getDomainTypes(), this->getODSOperands(1).getType()))))
652 return emitOpError("failed to verify that summary");
653 return ::mlir::success();
654}
655
656::llvm::LogicalResult ApplyFuncOp::verifyInvariants() {
657 return verifyInvariantsImpl();
658}
659
660::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) {
661 inferredReturnTypes.resize(1);
662 ::mlir::Builder odsBuilder(context);
663 if (operands.size() <= 0)
664 return ::mlir::failure();
665 ::mlir::Type odsInferredType0 = cast<SMTFuncType>(operands[0].getType()).getRangeType();
666 inferredReturnTypes[0] = odsInferredType0;
667 return ::mlir::success();
668}
669
670::mlir::ParseResult ApplyFuncOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
671 ::mlir::OpAsmParser::UnresolvedOperand funcRawOperand{};
672 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> funcOperands(&funcRawOperand, 1); ::llvm::SMLoc funcOperandsLoc;
673 (void)funcOperandsLoc;
674 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
675 ::llvm::SMLoc argsOperandsLoc;
676 (void)argsOperandsLoc;
677 ::mlir::Type funcRawType{};
678 ::llvm::ArrayRef<::mlir::Type> funcTypes(&funcRawType, 1);
679
680 funcOperandsLoc = parser.getCurrentLocation();
681 if (parser.parseOperand(funcRawOperand))
682 return ::mlir::failure();
683 if (parser.parseLParen())
684 return ::mlir::failure();
685
686 argsOperandsLoc = parser.getCurrentLocation();
687 if (parser.parseOperandList(argsOperands))
688 return ::mlir::failure();
689 if (parser.parseRParen())
690 return ::mlir::failure();
691 {
692 auto loc = parser.getCurrentLocation();(void)loc;
693 if (parser.parseOptionalAttrDict(result.attributes))
694 return ::mlir::failure();
695 }
696 if (parser.parseColon())
697 return ::mlir::failure();
698
699 if (parser.parseType(funcRawType))
700 return ::mlir::failure();
701 for (::mlir::Type type : funcTypes) {
702 (void)type;
703 if (!((::llvm::isa<::llzk::smt::SMTFuncType>(type)))) {
704 return parser.emitError(parser.getNameLoc()) << "'func' must be , but got " << type;
705 }
706 }
707 result.addTypes(cast<SMTFuncType>(funcTypes[0]).getRangeType());
708 if (parser.resolveOperands(funcOperands, funcTypes, funcOperandsLoc, result.operands))
709 return ::mlir::failure();
710 if (parser.resolveOperands(argsOperands, cast<SMTFuncType>(funcTypes[0]).getDomainTypes(), argsOperandsLoc, result.operands))
711 return ::mlir::failure();
712 return ::mlir::success();
713}
714
715void ApplyFuncOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
716 _odsPrinter << ' ';
717 _odsPrinter << getFunc();
718 _odsPrinter << "(";
719 _odsPrinter << getArgs();
720 _odsPrinter << ")";
721 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
722 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
723 _odsPrinter << ' ' << ":";
724 _odsPrinter << ' ';
725 _odsPrinter << getFunc().getType();
726}
727
728void ApplyFuncOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
729}
730
731} // namespace smt
732} // namespace llzk
733MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ApplyFuncOp)
734
735namespace llzk {
736namespace smt {
737
738//===----------------------------------------------------------------------===//
739// ::llzk::smt::ArrayBroadcastOp definitions
740//===----------------------------------------------------------------------===//
741
742namespace detail {
743} // namespace detail
745
746::llvm::LogicalResult ArrayBroadcastOpAdaptor::verify(::mlir::Location loc) {
747 return ::mlir::success();
748}
749
750void ArrayBroadcastOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value) {
751 odsState.addOperands(value);
752 odsState.addTypes(result);
753}
754
755void ArrayBroadcastOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
756 odsState.addOperands(value);
757 assert(resultTypes.size() == 1u && "mismatched number of results");
758 odsState.addTypes(resultTypes);
759}
760
761void ArrayBroadcastOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
762 assert(operands.size() == 1u && "mismatched number of parameters");
763 odsState.addOperands(operands);
764 odsState.addAttributes(attributes);
765 assert(resultTypes.size() == 1u && "mismatched number of return types");
766 odsState.addTypes(resultTypes);
767}
768
770 {
771 unsigned index = 0; (void)index;
772 auto valueGroup0 = getODSOperands(0);
773
774 for (auto v : valueGroup0) {
775 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
776 return ::mlir::failure();
777 }
778 }
779 {
780 unsigned index = 0; (void)index;
781 auto valueGroup0 = getODSResults(0);
782
783 for (auto v : valueGroup0) {
784 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT7(*this, v.getType(), "result", index++)))
785 return ::mlir::failure();
786 }
787 }
788 if (!((std::equal_to<>()(cast<ArrayType>((*this->getODSResults(0).begin()).getType()).getRangeType(), (*this->getODSOperands(0).begin()).getType()))))
789 return emitOpError("failed to verify that summary");
790 return ::mlir::success();
791}
792
793::llvm::LogicalResult ArrayBroadcastOp::verifyInvariants() {
794 return verifyInvariantsImpl();
795}
796
797::mlir::ParseResult ArrayBroadcastOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
798 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
799 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
800 (void)valueOperandsLoc;
801 ::mlir::Type resultRawType{};
802 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
803
804 valueOperandsLoc = parser.getCurrentLocation();
805 if (parser.parseOperand(valueRawOperand))
806 return ::mlir::failure();
807 {
808 auto loc = parser.getCurrentLocation();(void)loc;
809 if (parser.parseOptionalAttrDict(result.attributes))
810 return ::mlir::failure();
811 }
812 if (parser.parseColon())
813 return ::mlir::failure();
814
815 if (parser.parseType(resultRawType))
816 return ::mlir::failure();
817 for (::mlir::Type type : resultTypes) {
818 (void)type;
819 if (!((::llvm::isa<::llzk::smt::ArrayType>(type)))) {
820 return parser.emitError(parser.getNameLoc()) << "'result' must be , but got " << type;
821 }
822 }
823 result.addTypes(resultTypes);
824 if (parser.resolveOperands(valueOperands, cast<ArrayType>(resultTypes[0]).getRangeType(), valueOperandsLoc, result.operands))
825 return ::mlir::failure();
826 return ::mlir::success();
827}
828
829void ArrayBroadcastOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
830 _odsPrinter << ' ';
831 _odsPrinter << getValue();
832 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
833 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
834 _odsPrinter << ' ' << ":";
835 _odsPrinter << ' ';
836 _odsPrinter << getResult().getType();
837}
838
839void ArrayBroadcastOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
840}
841
842} // namespace smt
843} // namespace llzk
844MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ArrayBroadcastOp)
845
846namespace llzk {
847namespace smt {
848
849//===----------------------------------------------------------------------===//
850// ::llzk::smt::ArraySelectOp definitions
851//===----------------------------------------------------------------------===//
852
853namespace detail {
854} // namespace detail
856
857::llvm::LogicalResult ArraySelectOpAdaptor::verify(::mlir::Location loc) {
858 return ::mlir::success();
859}
860
861void ArraySelectOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value array, ::mlir::Value index) {
862 odsState.addOperands(array);
863 odsState.addOperands(index);
864 odsState.addTypes(result);
865}
866
867void ArraySelectOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value array, ::mlir::Value index) {
868 odsState.addOperands(array);
869 odsState.addOperands(index);
870
871 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
872 if (::mlir::succeeded(ArraySelectOp::inferReturnTypes(odsBuilder.getContext(),
873 odsState.location, odsState.operands,
874 odsState.attributes.getDictionary(odsState.getContext()),
875 odsState.getRawProperties(),
876 odsState.regions, inferredReturnTypes)))
877 odsState.addTypes(inferredReturnTypes);
878 else
879 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
880
881}
882
883void ArraySelectOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value array, ::mlir::Value index) {
884 odsState.addOperands(array);
885 odsState.addOperands(index);
886 assert(resultTypes.size() == 1u && "mismatched number of results");
887 odsState.addTypes(resultTypes);
888}
889
890void ArraySelectOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
891 assert(operands.size() == 2u && "mismatched number of parameters");
892 odsState.addOperands(operands);
893 odsState.addAttributes(attributes);
894 assert(resultTypes.size() == 1u && "mismatched number of return types");
895 odsState.addTypes(resultTypes);
896}
897
898void ArraySelectOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
899 assert(operands.size() == 2u && "mismatched number of parameters");
900 odsState.addOperands(operands);
901 odsState.addAttributes(attributes);
902
903 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
904 if (::mlir::succeeded(ArraySelectOp::inferReturnTypes(odsBuilder.getContext(),
905 odsState.location, operands,
906 odsState.attributes.getDictionary(odsState.getContext()),
907 odsState.getRawProperties(),
908 odsState.regions, inferredReturnTypes))) {
909 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
910 odsState.addTypes(inferredReturnTypes);
911 } else {
912 ::llvm::report_fatal_error("Failed to infer result type(s).");
913 }
914}
915
916::llvm::LogicalResult ArraySelectOp::verifyInvariantsImpl() {
917 {
918 unsigned index = 0; (void)index;
919 auto valueGroup0 = getODSOperands(0);
920
921 for (auto v : valueGroup0) {
922 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT7(*this, v.getType(), "operand", index++)))
923 return ::mlir::failure();
924 }
925 auto valueGroup1 = getODSOperands(1);
926
927 for (auto v : valueGroup1) {
928 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
929 return ::mlir::failure();
930 }
931 }
932 {
933 unsigned index = 0; (void)index;
934 auto valueGroup0 = getODSResults(0);
935
936 for (auto v : valueGroup0) {
937 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "result", index++)))
938 return ::mlir::failure();
939 }
940 }
941 if (!((std::equal_to<>()(cast<ArrayType>((*this->getODSOperands(0).begin()).getType()).getDomainType(), (*this->getODSOperands(1).begin()).getType()))))
942 return emitOpError("failed to verify that summary");
943 if (!((std::equal_to<>()(cast<ArrayType>((*this->getODSOperands(0).begin()).getType()).getRangeType(), (*this->getODSResults(0).begin()).getType()))))
944 return emitOpError("failed to verify that summary");
945 return ::mlir::success();
946}
947
948::llvm::LogicalResult ArraySelectOp::verifyInvariants() {
949 return verifyInvariantsImpl();
950}
951
952::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) {
953 inferredReturnTypes.resize(1);
954 ::mlir::Builder odsBuilder(context);
955 if (operands.size() <= 0)
956 return ::mlir::failure();
957 ::mlir::Type odsInferredType0 = cast<ArrayType>(operands[0].getType()).getRangeType();
958 inferredReturnTypes[0] = odsInferredType0;
959 return ::mlir::success();
960}
961
962::mlir::ParseResult ArraySelectOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
963 ::mlir::OpAsmParser::UnresolvedOperand arrayRawOperand{};
964 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> arrayOperands(&arrayRawOperand, 1); ::llvm::SMLoc arrayOperandsLoc;
965 (void)arrayOperandsLoc;
966 ::mlir::OpAsmParser::UnresolvedOperand indexRawOperand{};
967 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> indexOperands(&indexRawOperand, 1); ::llvm::SMLoc indexOperandsLoc;
968 (void)indexOperandsLoc;
969 ::mlir::Type arrayRawType{};
970 ::llvm::ArrayRef<::mlir::Type> arrayTypes(&arrayRawType, 1);
971
972 arrayOperandsLoc = parser.getCurrentLocation();
973 if (parser.parseOperand(arrayRawOperand))
974 return ::mlir::failure();
975 if (parser.parseLSquare())
976 return ::mlir::failure();
977
978 indexOperandsLoc = parser.getCurrentLocation();
979 if (parser.parseOperand(indexRawOperand))
980 return ::mlir::failure();
981 if (parser.parseRSquare())
982 return ::mlir::failure();
983 {
984 auto loc = parser.getCurrentLocation();(void)loc;
985 if (parser.parseOptionalAttrDict(result.attributes))
986 return ::mlir::failure();
987 }
988 if (parser.parseColon())
989 return ::mlir::failure();
990
991 if (parser.parseType(arrayRawType))
992 return ::mlir::failure();
993 for (::mlir::Type type : arrayTypes) {
994 (void)type;
995 if (!((::llvm::isa<::llzk::smt::ArrayType>(type)))) {
996 return parser.emitError(parser.getNameLoc()) << "'array' must be , but got " << type;
997 }
998 }
999 result.addTypes(cast<ArrayType>(arrayTypes[0]).getRangeType());
1000 if (parser.resolveOperands(arrayOperands, arrayTypes, arrayOperandsLoc, result.operands))
1001 return ::mlir::failure();
1002 if (parser.resolveOperands(indexOperands, cast<ArrayType>(arrayTypes[0]).getDomainType(), indexOperandsLoc, result.operands))
1003 return ::mlir::failure();
1004 return ::mlir::success();
1005}
1006
1007void ArraySelectOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1008 _odsPrinter << ' ';
1009 _odsPrinter << getArray();
1010 _odsPrinter << "[";
1011 _odsPrinter << getIndex();
1012 _odsPrinter << "]";
1013 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1014 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1015 _odsPrinter << ' ' << ":";
1016 _odsPrinter << ' ';
1017 _odsPrinter << getArray().getType();
1018}
1019
1020void ArraySelectOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1021}
1022
1023} // namespace smt
1024} // namespace llzk
1025MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ArraySelectOp)
1026
1027namespace llzk {
1028namespace smt {
1029
1030//===----------------------------------------------------------------------===//
1031// ::llzk::smt::ArrayStoreOp definitions
1032//===----------------------------------------------------------------------===//
1033
1034namespace detail {
1035} // namespace detail
1037
1038::llvm::LogicalResult ArrayStoreOpAdaptor::verify(::mlir::Location loc) {
1039 return ::mlir::success();
1040}
1041
1042void ArrayStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value array, ::mlir::Value index, ::mlir::Value value) {
1043 odsState.addOperands(array);
1044 odsState.addOperands(index);
1045 odsState.addOperands(value);
1046 odsState.addTypes(result);
1047}
1048
1049void ArrayStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value array, ::mlir::Value index, ::mlir::Value value) {
1050 odsState.addOperands(array);
1051 odsState.addOperands(index);
1052 odsState.addOperands(value);
1053
1054 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1055 if (::mlir::succeeded(ArrayStoreOp::inferReturnTypes(odsBuilder.getContext(),
1056 odsState.location, odsState.operands,
1057 odsState.attributes.getDictionary(odsState.getContext()),
1058 odsState.getRawProperties(),
1059 odsState.regions, inferredReturnTypes)))
1060 odsState.addTypes(inferredReturnTypes);
1061 else
1062 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1063
1064}
1065
1066void ArrayStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value array, ::mlir::Value index, ::mlir::Value value) {
1067 odsState.addOperands(array);
1068 odsState.addOperands(index);
1069 odsState.addOperands(value);
1070 assert(resultTypes.size() == 1u && "mismatched number of results");
1071 odsState.addTypes(resultTypes);
1072}
1073
1074void ArrayStoreOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1075 assert(operands.size() == 3u && "mismatched number of parameters");
1076 odsState.addOperands(operands);
1077 odsState.addAttributes(attributes);
1078 assert(resultTypes.size() == 1u && "mismatched number of return types");
1079 odsState.addTypes(resultTypes);
1080}
1081
1082void ArrayStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1083 assert(operands.size() == 3u && "mismatched number of parameters");
1084 odsState.addOperands(operands);
1085 odsState.addAttributes(attributes);
1086
1087 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1088 if (::mlir::succeeded(ArrayStoreOp::inferReturnTypes(odsBuilder.getContext(),
1089 odsState.location, operands,
1090 odsState.attributes.getDictionary(odsState.getContext()),
1091 odsState.getRawProperties(),
1092 odsState.regions, inferredReturnTypes))) {
1093 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1094 odsState.addTypes(inferredReturnTypes);
1095 } else {
1096 ::llvm::report_fatal_error("Failed to infer result type(s).");
1097 }
1098}
1099
1100::llvm::LogicalResult ArrayStoreOp::verifyInvariantsImpl() {
1101 {
1102 unsigned index = 0; (void)index;
1103 auto valueGroup0 = getODSOperands(0);
1104
1105 for (auto v : valueGroup0) {
1106 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT7(*this, v.getType(), "operand", index++)))
1107 return ::mlir::failure();
1108 }
1109 auto valueGroup1 = getODSOperands(1);
1110
1111 for (auto v : valueGroup1) {
1112 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
1113 return ::mlir::failure();
1114 }
1115 auto valueGroup2 = getODSOperands(2);
1116
1117 for (auto v : valueGroup2) {
1118 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
1119 return ::mlir::failure();
1120 }
1121 }
1122 {
1123 unsigned index = 0; (void)index;
1124 auto valueGroup0 = getODSResults(0);
1125
1126 for (auto v : valueGroup0) {
1127 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT7(*this, v.getType(), "result", index++)))
1128 return ::mlir::failure();
1129 }
1130 }
1131 if (!((std::equal_to<>()(cast<ArrayType>((*this->getODSOperands(0).begin()).getType()).getDomainType(), (*this->getODSOperands(1).begin()).getType()))))
1132 return emitOpError("failed to verify that summary");
1133 if (!((std::equal_to<>()(cast<ArrayType>((*this->getODSOperands(0).begin()).getType()).getRangeType(), (*this->getODSOperands(2).begin()).getType()))))
1134 return emitOpError("failed to verify that summary");
1135 if (!((((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()) && ((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()))))
1136 return emitOpError("failed to verify that all of {array, result} have same type");
1137 return ::mlir::success();
1138}
1139
1140::llvm::LogicalResult ArrayStoreOp::verifyInvariants() {
1141 return verifyInvariantsImpl();
1142}
1143
1144::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) {
1145 inferredReturnTypes.resize(1);
1146 ::mlir::Builder odsBuilder(context);
1147 if (operands.size() <= 0)
1148 return ::mlir::failure();
1149 ::mlir::Type odsInferredType0 = operands[0].getType();
1150 inferredReturnTypes[0] = odsInferredType0;
1151 return ::mlir::success();
1152}
1153
1154::mlir::ParseResult ArrayStoreOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1155 ::mlir::OpAsmParser::UnresolvedOperand arrayRawOperand{};
1156 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> arrayOperands(&arrayRawOperand, 1); ::llvm::SMLoc arrayOperandsLoc;
1157 (void)arrayOperandsLoc;
1158 ::mlir::OpAsmParser::UnresolvedOperand indexRawOperand{};
1159 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> indexOperands(&indexRawOperand, 1); ::llvm::SMLoc indexOperandsLoc;
1160 (void)indexOperandsLoc;
1161 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
1162 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
1163 (void)valueOperandsLoc;
1164 ::mlir::Type arrayRawType{};
1165 ::llvm::ArrayRef<::mlir::Type> arrayTypes(&arrayRawType, 1);
1166
1167 arrayOperandsLoc = parser.getCurrentLocation();
1168 if (parser.parseOperand(arrayRawOperand))
1169 return ::mlir::failure();
1170 if (parser.parseLSquare())
1171 return ::mlir::failure();
1172
1173 indexOperandsLoc = parser.getCurrentLocation();
1174 if (parser.parseOperand(indexRawOperand))
1175 return ::mlir::failure();
1176 if (parser.parseRSquare())
1177 return ::mlir::failure();
1178 if (parser.parseComma())
1179 return ::mlir::failure();
1180
1181 valueOperandsLoc = parser.getCurrentLocation();
1182 if (parser.parseOperand(valueRawOperand))
1183 return ::mlir::failure();
1184 {
1185 auto loc = parser.getCurrentLocation();(void)loc;
1186 if (parser.parseOptionalAttrDict(result.attributes))
1187 return ::mlir::failure();
1188 }
1189 if (parser.parseColon())
1190 return ::mlir::failure();
1191
1192 if (parser.parseType(arrayRawType))
1193 return ::mlir::failure();
1194 for (::mlir::Type type : arrayTypes) {
1195 (void)type;
1196 if (!((::llvm::isa<::llzk::smt::ArrayType>(type)))) {
1197 return parser.emitError(parser.getNameLoc()) << "'array' must be , but got " << type;
1198 }
1199 }
1200 result.addTypes(arrayTypes[0]);
1201 if (parser.resolveOperands(arrayOperands, arrayTypes, arrayOperandsLoc, result.operands))
1202 return ::mlir::failure();
1203 if (parser.resolveOperands(indexOperands, cast<ArrayType>(arrayTypes[0]).getDomainType(), indexOperandsLoc, result.operands))
1204 return ::mlir::failure();
1205 if (parser.resolveOperands(valueOperands, cast<ArrayType>(arrayTypes[0]).getRangeType(), valueOperandsLoc, result.operands))
1206 return ::mlir::failure();
1207 return ::mlir::success();
1208}
1209
1210void ArrayStoreOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1211 _odsPrinter << ' ';
1212 _odsPrinter << getArray();
1213 _odsPrinter << "[";
1214 _odsPrinter << getIndex();
1215 _odsPrinter << "]";
1216 _odsPrinter << ",";
1217 _odsPrinter << ' ';
1218 _odsPrinter << getValue();
1219 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1220 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1221 _odsPrinter << ' ' << ":";
1222 _odsPrinter << ' ';
1223 _odsPrinter << getArray().getType();
1224}
1225
1226void ArrayStoreOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1227}
1228
1229} // namespace smt
1230} // namespace llzk
1231MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ArrayStoreOp)
1232
1233namespace llzk {
1234namespace smt {
1235
1236//===----------------------------------------------------------------------===//
1237// ::llzk::smt::AssertOp definitions
1238//===----------------------------------------------------------------------===//
1239
1240namespace detail {
1241} // namespace detail
1243
1244::llvm::LogicalResult AssertOpAdaptor::verify(::mlir::Location loc) {
1245 return ::mlir::success();
1246}
1247
1248void AssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
1249 odsState.addOperands(input);
1250}
1251
1252void AssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
1253 odsState.addOperands(input);
1254 assert(resultTypes.size() == 0u && "mismatched number of results");
1255 odsState.addTypes(resultTypes);
1256}
1257
1258void AssertOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1259 assert(operands.size() == 1u && "mismatched number of parameters");
1260 odsState.addOperands(operands);
1261 odsState.addAttributes(attributes);
1262 assert(resultTypes.size() == 0u && "mismatched number of return types");
1263 odsState.addTypes(resultTypes);
1264}
1265
1266::llvm::LogicalResult AssertOp::verifyInvariantsImpl() {
1267 {
1268 unsigned index = 0; (void)index;
1269 auto valueGroup0 = getODSOperands(0);
1270
1271 for (auto v : valueGroup0) {
1272 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "operand", index++)))
1273 return ::mlir::failure();
1274 }
1275 }
1276 return ::mlir::success();
1277}
1278
1279::llvm::LogicalResult AssertOp::verifyInvariants() {
1280 return verifyInvariantsImpl();
1281}
1282
1283::mlir::ParseResult AssertOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1284 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
1285 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
1286 (void)inputOperandsLoc;
1287
1288 inputOperandsLoc = parser.getCurrentLocation();
1289 if (parser.parseOperand(inputRawOperand))
1290 return ::mlir::failure();
1291 {
1292 auto loc = parser.getCurrentLocation();(void)loc;
1293 if (parser.parseOptionalAttrDict(result.attributes))
1294 return ::mlir::failure();
1295 }
1296 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
1297 if (parser.resolveOperands(inputOperands, odsBuildableType0, inputOperandsLoc, result.operands))
1298 return ::mlir::failure();
1299 return ::mlir::success();
1300}
1301
1302void AssertOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1303 _odsPrinter << ' ';
1304 _odsPrinter << getInput();
1305 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1306 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1307}
1308
1309} // namespace smt
1310} // namespace llzk
1311MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::AssertOp)
1312
1313namespace llzk {
1314namespace smt {
1315
1316//===----------------------------------------------------------------------===//
1317// ::llzk::smt::BV2IntOp definitions
1318//===----------------------------------------------------------------------===//
1319
1320namespace detail {
1321BV2IntOpGenericAdaptorBase::BV2IntOpGenericAdaptorBase(BV2IntOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
1322
1324 auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().is_signed);
1325 if (!attr)
1326 attr = ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr);
1327 return attr;
1328}
1329
1331 auto attr = getIsSignedAttr();
1332 if (!attr)
1333 return ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr) != nullptr;
1334 return attr != nullptr;
1335}
1336
1337} // namespace detail
1339
1340::llvm::LogicalResult BV2IntOpAdaptor::verify(::mlir::Location loc) {
1341 auto tblgen_is_signed = getProperties().is_signed; (void)tblgen_is_signed;
1342
1343 if (tblgen_is_signed && !((::llvm::isa<::mlir::UnitAttr>(tblgen_is_signed))))
1344 return emitError(loc, "'smt.bv2int' op ""attribute 'is_signed' failed to satisfy constraint: unit attribute");
1345 return ::mlir::success();
1346}
1347
1348::llvm::LogicalResult BV2IntOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1349 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1350 if (!dict) {
1351 emitError() << "expected DictionaryAttr to set properties";
1352 return ::mlir::failure();
1353 }
1354
1355 {
1356 auto &propStorage = prop.is_signed;
1357 auto attr = dict.get("is_signed");
1358 if (attr) {
1359 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1360 if (convertedAttr) {
1361 propStorage = convertedAttr;
1362 } else {
1363 emitError() << "Invalid attribute `is_signed` in property conversion: " << attr;
1364 return ::mlir::failure();
1365 }
1366 }
1367 }
1368 return ::mlir::success();
1369}
1370
1371::mlir::Attribute BV2IntOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1372 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1373 ::mlir::Builder odsBuilder{ctx};
1374
1375 {
1376 const auto &propStorage = prop.is_signed;
1377 if (propStorage)
1378 attrs.push_back(odsBuilder.getNamedAttr("is_signed",
1379 propStorage));
1380 }
1381
1382 if (!attrs.empty())
1383 return odsBuilder.getDictionaryAttr(attrs);
1384 return {};
1385}
1386
1387llvm::hash_code BV2IntOp::computePropertiesHash(const Properties &prop) {
1388 return llvm::hash_combine(
1389 llvm::hash_value(prop.is_signed.getAsOpaquePointer()));
1390}
1391
1392std::optional<mlir::Attribute> BV2IntOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1393 if (name == "is_signed")
1394 return prop.is_signed;
1395 return std::nullopt;
1396}
1397
1398void BV2IntOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1399 if (name == "is_signed") {
1400 prop.is_signed = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.is_signed)>>(value);
1401 return;
1402 }
1403}
1404
1405void BV2IntOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
1406 if (prop.is_signed) attrs.append("is_signed", prop.is_signed);
1407}
1408
1409::llvm::LogicalResult BV2IntOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1410 {
1411 ::mlir::Attribute attr = attrs.get(getIsSignedAttrName(opName));
1412 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(attr, "is_signed", emitError)))
1413 return ::mlir::failure();
1414 }
1415 return ::mlir::success();
1416}
1417
1418::llvm::LogicalResult BV2IntOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
1419 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
1420 if (::mlir::failed(reader.readOptionalAttribute(prop.is_signed)))
1421 return ::mlir::failure();
1422 return ::mlir::success();
1423}
1424
1425void BV2IntOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
1426 auto &prop = getProperties(); (void)prop;
1427
1428 writer.writeOptionalAttribute(prop.is_signed);
1429}
1430
1432 auto attr = getIsSignedAttr();
1433 if (!attr)
1434 return ((false) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr) != nullptr;
1435 return attr != nullptr;
1436}
1437
1438void BV2IntOp::setIsSigned(bool attrValue) {
1439 auto &odsProp = getProperties().is_signed;
1440 if (attrValue)
1441 odsProp = ((attrValue) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr);
1442 else
1443 odsProp = nullptr;
1444}
1445
1446void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input, /*optional*/::mlir::UnitAttr is_signed) {
1447 odsState.addOperands(input);
1448 if (is_signed) {
1449 odsState.getOrAddProperties<Properties>().is_signed = is_signed;
1450 }
1451 odsState.addTypes(result);
1452}
1453
1454void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input, /*optional*/::mlir::UnitAttr is_signed) {
1455 odsState.addOperands(input);
1456 if (is_signed) {
1457 odsState.getOrAddProperties<Properties>().is_signed = is_signed;
1458 }
1459
1460 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1461 if (::mlir::succeeded(BV2IntOp::inferReturnTypes(odsBuilder.getContext(),
1462 odsState.location, odsState.operands,
1463 odsState.attributes.getDictionary(odsState.getContext()),
1464 odsState.getRawProperties(),
1465 odsState.regions, inferredReturnTypes)))
1466 odsState.addTypes(inferredReturnTypes);
1467 else
1468 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1469
1470}
1471
1472void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input, /*optional*/::mlir::UnitAttr is_signed) {
1473 odsState.addOperands(input);
1474 if (is_signed) {
1475 odsState.getOrAddProperties<Properties>().is_signed = is_signed;
1476 }
1477 assert(resultTypes.size() == 1u && "mismatched number of results");
1478 odsState.addTypes(resultTypes);
1479}
1480
1481void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input, /*optional*/bool is_signed) {
1482 odsState.addOperands(input);
1483 if (is_signed) {
1484 odsState.getOrAddProperties<Properties>().is_signed = ((is_signed) ? odsBuilder.getUnitAttr() : nullptr);
1485 }
1486 odsState.addTypes(result);
1487}
1488
1489void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input, /*optional*/bool is_signed) {
1490 odsState.addOperands(input);
1491 if (is_signed) {
1492 odsState.getOrAddProperties<Properties>().is_signed = ((is_signed) ? odsBuilder.getUnitAttr() : nullptr);
1493 }
1494
1495 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1496 if (::mlir::succeeded(BV2IntOp::inferReturnTypes(odsBuilder.getContext(),
1497 odsState.location, odsState.operands,
1498 odsState.attributes.getDictionary(odsState.getContext()),
1499 odsState.getRawProperties(),
1500 odsState.regions, inferredReturnTypes)))
1501 odsState.addTypes(inferredReturnTypes);
1502 else
1503 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1504
1505}
1506
1507void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input, /*optional*/bool is_signed) {
1508 odsState.addOperands(input);
1509 if (is_signed) {
1510 odsState.getOrAddProperties<Properties>().is_signed = ((is_signed) ? odsBuilder.getUnitAttr() : nullptr);
1511 }
1512 assert(resultTypes.size() == 1u && "mismatched number of results");
1513 odsState.addTypes(resultTypes);
1514}
1515
1516void BV2IntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1517 assert(operands.size() == 1u && "mismatched number of parameters");
1518 odsState.addOperands(operands);
1519 odsState.addAttributes(attributes);
1520 assert(resultTypes.size() == 1u && "mismatched number of return types");
1521 odsState.addTypes(resultTypes);
1522
1523 if (!attributes.empty()) {
1524 ::mlir::OpaqueProperties properties =
1525 &odsState.getOrAddProperties<BV2IntOp::Properties>();
1526 std::optional<::mlir::RegisteredOperationName> info =
1527 odsState.name.getRegisteredInfo();
1528 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1529 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
1530 ::llvm::report_fatal_error("Property conversion failed.");
1531 }
1532}
1533
1534void BV2IntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1535 assert(operands.size() == 1u && "mismatched number of parameters");
1536 odsState.addOperands(operands);
1537 odsState.addAttributes(attributes);
1538
1539 if (!attributes.empty()) {
1540 ::mlir::OpaqueProperties properties =
1541 &odsState.getOrAddProperties<BV2IntOp::Properties>();
1542 std::optional<::mlir::RegisteredOperationName> info =
1543 odsState.name.getRegisteredInfo();
1544 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1545 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
1546 ::llvm::report_fatal_error("Property conversion failed.");
1547 }
1548 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1549 if (::mlir::succeeded(BV2IntOp::inferReturnTypes(odsBuilder.getContext(),
1550 odsState.location, operands,
1551 odsState.attributes.getDictionary(odsState.getContext()),
1552 odsState.getRawProperties(),
1553 odsState.regions, inferredReturnTypes))) {
1554 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1555 odsState.addTypes(inferredReturnTypes);
1556 } else {
1557 ::llvm::report_fatal_error("Failed to infer result type(s).");
1558 }
1559}
1560
1561::llvm::LogicalResult BV2IntOp::verifyInvariantsImpl() {
1562 auto tblgen_is_signed = getProperties().is_signed; (void)tblgen_is_signed;
1563
1564 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(*this, tblgen_is_signed, "is_signed")))
1565 return ::mlir::failure();
1566 {
1567 unsigned index = 0; (void)index;
1568 auto valueGroup0 = getODSOperands(0);
1569
1570 for (auto v : valueGroup0) {
1571 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
1572 return ::mlir::failure();
1573 }
1574 }
1575 {
1576 unsigned index = 0; (void)index;
1577 auto valueGroup0 = getODSResults(0);
1578
1579 for (auto v : valueGroup0) {
1580 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
1581 return ::mlir::failure();
1582 }
1583 }
1584 return ::mlir::success();
1585}
1586
1587::llvm::LogicalResult BV2IntOp::verifyInvariants() {
1588 return verifyInvariantsImpl();
1589}
1590
1591::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) {
1592 inferredReturnTypes.resize(1);
1593 ::mlir::Builder odsBuilder(context);
1594 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
1595 inferredReturnTypes[0] = odsInferredType0;
1596 return ::mlir::success();
1597}
1598
1599::mlir::ParseResult BV2IntOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1600 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
1601 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
1602 (void)inputOperandsLoc;
1603 ::mlir::Type inputRawType{};
1604 ::llvm::ArrayRef<::mlir::Type> inputTypes(&inputRawType, 1);
1605
1606 inputOperandsLoc = parser.getCurrentLocation();
1607 if (parser.parseOperand(inputRawOperand))
1608 return ::mlir::failure();
1609 if (::mlir::succeeded(parser.parseOptionalKeyword("signed"))) {
1610 result.getOrAddProperties<BV2IntOp::Properties>().is_signed = parser.getBuilder().getUnitAttr(); }
1611 {
1612 auto loc = parser.getCurrentLocation();(void)loc;
1613 if (parser.parseOptionalAttrDict(result.attributes))
1614 return ::mlir::failure();
1615 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
1616 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
1617 })))
1618 return ::mlir::failure();
1619 }
1620 if (parser.parseColon())
1621 return ::mlir::failure();
1622
1623 if (parser.parseType(inputRawType))
1624 return ::mlir::failure();
1625 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
1626 result.addTypes(odsBuildableType0);
1627 if (parser.resolveOperands(inputOperands, inputTypes, inputOperandsLoc, result.operands))
1628 return ::mlir::failure();
1629 return ::mlir::success();
1630}
1631
1632void BV2IntOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1633 _odsPrinter << ' ';
1634 _odsPrinter << getInput();
1635 if ((getIsSignedAttr() && getIsSignedAttr() != ((false) ? ::mlir::OpBuilder((*this)->getContext()).getUnitAttr() : nullptr))) {
1636 _odsPrinter << ' ' << "signed";
1637 }
1638 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1639 elidedAttrs.push_back("is_signed");
1640 {
1641 ::mlir::Builder odsBuilder(getContext());
1642 ::mlir::Attribute attr = getIsSignedAttr();
1643 if(attr && (attr == ((false) ? odsBuilder.getUnitAttr() : nullptr)))
1644 elidedAttrs.push_back("is_signed");
1645 }
1646 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1647 _odsPrinter << ' ' << ":";
1648 _odsPrinter << ' ';
1649 _odsPrinter << getInput().getType();
1650}
1651
1652void BV2IntOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1653}
1654
1655} // namespace smt
1656} // namespace llzk
1657MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BV2IntOp)
1658
1659namespace llzk {
1660namespace smt {
1661
1662//===----------------------------------------------------------------------===//
1663// ::llzk::smt::BVAShrOp definitions
1664//===----------------------------------------------------------------------===//
1665
1666namespace detail {
1667} // namespace detail
1669
1670::llvm::LogicalResult BVAShrOpAdaptor::verify(::mlir::Location loc) {
1671 return ::mlir::success();
1672}
1673
1674void BVAShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1675 odsState.addOperands(lhs);
1676 odsState.addOperands(rhs);
1677 odsState.addTypes(result);
1678}
1679
1680void BVAShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1681 odsState.addOperands(lhs);
1682 odsState.addOperands(rhs);
1683
1684 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1685 if (::mlir::succeeded(BVAShrOp::inferReturnTypes(odsBuilder.getContext(),
1686 odsState.location, odsState.operands,
1687 odsState.attributes.getDictionary(odsState.getContext()),
1688 odsState.getRawProperties(),
1689 odsState.regions, inferredReturnTypes)))
1690 odsState.addTypes(inferredReturnTypes);
1691 else
1692 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1693
1694}
1695
1696void BVAShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1697 odsState.addOperands(lhs);
1698 odsState.addOperands(rhs);
1699 assert(resultTypes.size() == 1u && "mismatched number of results");
1700 odsState.addTypes(resultTypes);
1701}
1702
1703void BVAShrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1704 assert(operands.size() == 2u && "mismatched number of parameters");
1705 odsState.addOperands(operands);
1706 odsState.addAttributes(attributes);
1707 assert(resultTypes.size() == 1u && "mismatched number of return types");
1708 odsState.addTypes(resultTypes);
1709}
1710
1711void BVAShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1712 assert(operands.size() == 2u && "mismatched number of parameters");
1713 odsState.addOperands(operands);
1714 odsState.addAttributes(attributes);
1715
1716 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1717 if (::mlir::succeeded(BVAShrOp::inferReturnTypes(odsBuilder.getContext(),
1718 odsState.location, operands,
1719 odsState.attributes.getDictionary(odsState.getContext()),
1720 odsState.getRawProperties(),
1721 odsState.regions, inferredReturnTypes))) {
1722 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1723 odsState.addTypes(inferredReturnTypes);
1724 } else {
1725 ::llvm::report_fatal_error("Failed to infer result type(s).");
1726 }
1727}
1728
1729::llvm::LogicalResult BVAShrOp::verifyInvariantsImpl() {
1730 {
1731 unsigned index = 0; (void)index;
1732 auto valueGroup0 = getODSOperands(0);
1733
1734 for (auto v : valueGroup0) {
1735 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
1736 return ::mlir::failure();
1737 }
1738 auto valueGroup1 = getODSOperands(1);
1739
1740 for (auto v : valueGroup1) {
1741 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
1742 return ::mlir::failure();
1743 }
1744 }
1745 {
1746 unsigned index = 0; (void)index;
1747 auto valueGroup0 = getODSResults(0);
1748
1749 for (auto v : valueGroup0) {
1750 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
1751 return ::mlir::failure();
1752 }
1753 }
1754 return ::mlir::success();
1755}
1756
1757::llvm::LogicalResult BVAShrOp::verifyInvariants() {
1758 return verifyInvariantsImpl();
1759}
1760
1761::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) {
1762 inferredReturnTypes.resize(1);
1763 ::mlir::Builder odsBuilder(context);
1764 if (operands.size() <= 0)
1765 return ::mlir::failure();
1766 ::mlir::Type odsInferredType0 = operands[0].getType();
1767 inferredReturnTypes[0] = odsInferredType0;
1768 return ::mlir::success();
1769}
1770
1771::mlir::ParseResult BVAShrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1772 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1773 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1774 (void)lhsOperandsLoc;
1775 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1776 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1777 (void)rhsOperandsLoc;
1778 ::mlir::Type resultRawType{};
1779 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
1780
1781 lhsOperandsLoc = parser.getCurrentLocation();
1782 if (parser.parseOperand(lhsRawOperand))
1783 return ::mlir::failure();
1784 if (parser.parseComma())
1785 return ::mlir::failure();
1786
1787 rhsOperandsLoc = parser.getCurrentLocation();
1788 if (parser.parseOperand(rhsRawOperand))
1789 return ::mlir::failure();
1790 {
1791 auto loc = parser.getCurrentLocation();(void)loc;
1792 if (parser.parseOptionalAttrDict(result.attributes))
1793 return ::mlir::failure();
1794 }
1795 if (parser.parseColon())
1796 return ::mlir::failure();
1797
1798 if (parser.parseType(resultRawType))
1799 return ::mlir::failure();
1800 result.addTypes(resultTypes);
1801 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
1802 return ::mlir::failure();
1803 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
1804 return ::mlir::failure();
1805 return ::mlir::success();
1806}
1807
1808void BVAShrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1809 _odsPrinter << ' ';
1810 _odsPrinter << getLhs();
1811 _odsPrinter << ",";
1812 _odsPrinter << ' ';
1813 _odsPrinter << getRhs();
1814 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1815 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1816 _odsPrinter << ' ' << ":";
1817 _odsPrinter << ' ';
1818 _odsPrinter << getResult().getType();
1819}
1820
1821void BVAShrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1822}
1823
1824} // namespace smt
1825} // namespace llzk
1826MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVAShrOp)
1827
1828namespace llzk {
1829namespace smt {
1830
1831//===----------------------------------------------------------------------===//
1832// ::llzk::smt::BVAddOp definitions
1833//===----------------------------------------------------------------------===//
1834
1835namespace detail {
1836} // namespace detail
1838
1839::llvm::LogicalResult BVAddOpAdaptor::verify(::mlir::Location loc) {
1840 return ::mlir::success();
1841}
1842
1843void BVAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1844 odsState.addOperands(lhs);
1845 odsState.addOperands(rhs);
1846 odsState.addTypes(result);
1847}
1848
1849void BVAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1850 odsState.addOperands(lhs);
1851 odsState.addOperands(rhs);
1852
1853 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1854 if (::mlir::succeeded(BVAddOp::inferReturnTypes(odsBuilder.getContext(),
1855 odsState.location, odsState.operands,
1856 odsState.attributes.getDictionary(odsState.getContext()),
1857 odsState.getRawProperties(),
1858 odsState.regions, inferredReturnTypes)))
1859 odsState.addTypes(inferredReturnTypes);
1860 else
1861 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1862
1863}
1864
1865void BVAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1866 odsState.addOperands(lhs);
1867 odsState.addOperands(rhs);
1868 assert(resultTypes.size() == 1u && "mismatched number of results");
1869 odsState.addTypes(resultTypes);
1870}
1871
1872void BVAddOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1873 assert(operands.size() == 2u && "mismatched number of parameters");
1874 odsState.addOperands(operands);
1875 odsState.addAttributes(attributes);
1876 assert(resultTypes.size() == 1u && "mismatched number of return types");
1877 odsState.addTypes(resultTypes);
1878}
1879
1880void BVAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1881 assert(operands.size() == 2u && "mismatched number of parameters");
1882 odsState.addOperands(operands);
1883 odsState.addAttributes(attributes);
1884
1885 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1886 if (::mlir::succeeded(BVAddOp::inferReturnTypes(odsBuilder.getContext(),
1887 odsState.location, operands,
1888 odsState.attributes.getDictionary(odsState.getContext()),
1889 odsState.getRawProperties(),
1890 odsState.regions, inferredReturnTypes))) {
1891 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1892 odsState.addTypes(inferredReturnTypes);
1893 } else {
1894 ::llvm::report_fatal_error("Failed to infer result type(s).");
1895 }
1896}
1897
1898::llvm::LogicalResult BVAddOp::verifyInvariantsImpl() {
1899 {
1900 unsigned index = 0; (void)index;
1901 auto valueGroup0 = getODSOperands(0);
1902
1903 for (auto v : valueGroup0) {
1904 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
1905 return ::mlir::failure();
1906 }
1907 auto valueGroup1 = getODSOperands(1);
1908
1909 for (auto v : valueGroup1) {
1910 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
1911 return ::mlir::failure();
1912 }
1913 }
1914 {
1915 unsigned index = 0; (void)index;
1916 auto valueGroup0 = getODSResults(0);
1917
1918 for (auto v : valueGroup0) {
1919 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
1920 return ::mlir::failure();
1921 }
1922 }
1923 return ::mlir::success();
1924}
1925
1926::llvm::LogicalResult BVAddOp::verifyInvariants() {
1927 return verifyInvariantsImpl();
1928}
1929
1930::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) {
1931 inferredReturnTypes.resize(1);
1932 ::mlir::Builder odsBuilder(context);
1933 if (operands.size() <= 0)
1934 return ::mlir::failure();
1935 ::mlir::Type odsInferredType0 = operands[0].getType();
1936 inferredReturnTypes[0] = odsInferredType0;
1937 return ::mlir::success();
1938}
1939
1940::mlir::ParseResult BVAddOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1941 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1942 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1943 (void)lhsOperandsLoc;
1944 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1945 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1946 (void)rhsOperandsLoc;
1947 ::mlir::Type resultRawType{};
1948 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
1949
1950 lhsOperandsLoc = parser.getCurrentLocation();
1951 if (parser.parseOperand(lhsRawOperand))
1952 return ::mlir::failure();
1953 if (parser.parseComma())
1954 return ::mlir::failure();
1955
1956 rhsOperandsLoc = parser.getCurrentLocation();
1957 if (parser.parseOperand(rhsRawOperand))
1958 return ::mlir::failure();
1959 {
1960 auto loc = parser.getCurrentLocation();(void)loc;
1961 if (parser.parseOptionalAttrDict(result.attributes))
1962 return ::mlir::failure();
1963 }
1964 if (parser.parseColon())
1965 return ::mlir::failure();
1966
1967 if (parser.parseType(resultRawType))
1968 return ::mlir::failure();
1969 result.addTypes(resultTypes);
1970 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
1971 return ::mlir::failure();
1972 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
1973 return ::mlir::failure();
1974 return ::mlir::success();
1975}
1976
1977void BVAddOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1978 _odsPrinter << ' ';
1979 _odsPrinter << getLhs();
1980 _odsPrinter << ",";
1981 _odsPrinter << ' ';
1982 _odsPrinter << getRhs();
1983 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1984 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1985 _odsPrinter << ' ' << ":";
1986 _odsPrinter << ' ';
1987 _odsPrinter << getResult().getType();
1988}
1989
1990void BVAddOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1991}
1992
1993} // namespace smt
1994} // namespace llzk
1995MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVAddOp)
1996
1997namespace llzk {
1998namespace smt {
1999
2000//===----------------------------------------------------------------------===//
2001// ::llzk::smt::BVAndOp definitions
2002//===----------------------------------------------------------------------===//
2003
2004namespace detail {
2005} // namespace detail
2007
2008::llvm::LogicalResult BVAndOpAdaptor::verify(::mlir::Location loc) {
2009 return ::mlir::success();
2010}
2011
2012void BVAndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2013 odsState.addOperands(lhs);
2014 odsState.addOperands(rhs);
2015 odsState.addTypes(result);
2016}
2017
2018void BVAndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2019 odsState.addOperands(lhs);
2020 odsState.addOperands(rhs);
2021
2022 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2023 if (::mlir::succeeded(BVAndOp::inferReturnTypes(odsBuilder.getContext(),
2024 odsState.location, odsState.operands,
2025 odsState.attributes.getDictionary(odsState.getContext()),
2026 odsState.getRawProperties(),
2027 odsState.regions, inferredReturnTypes)))
2028 odsState.addTypes(inferredReturnTypes);
2029 else
2030 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2031
2032}
2033
2034void BVAndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2035 odsState.addOperands(lhs);
2036 odsState.addOperands(rhs);
2037 assert(resultTypes.size() == 1u && "mismatched number of results");
2038 odsState.addTypes(resultTypes);
2039}
2040
2041void BVAndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2042 assert(operands.size() == 2u && "mismatched number of parameters");
2043 odsState.addOperands(operands);
2044 odsState.addAttributes(attributes);
2045 assert(resultTypes.size() == 1u && "mismatched number of return types");
2046 odsState.addTypes(resultTypes);
2047}
2048
2049void BVAndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2050 assert(operands.size() == 2u && "mismatched number of parameters");
2051 odsState.addOperands(operands);
2052 odsState.addAttributes(attributes);
2053
2054 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2055 if (::mlir::succeeded(BVAndOp::inferReturnTypes(odsBuilder.getContext(),
2056 odsState.location, operands,
2057 odsState.attributes.getDictionary(odsState.getContext()),
2058 odsState.getRawProperties(),
2059 odsState.regions, inferredReturnTypes))) {
2060 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2061 odsState.addTypes(inferredReturnTypes);
2062 } else {
2063 ::llvm::report_fatal_error("Failed to infer result type(s).");
2064 }
2065}
2066
2067::llvm::LogicalResult BVAndOp::verifyInvariantsImpl() {
2068 {
2069 unsigned index = 0; (void)index;
2070 auto valueGroup0 = getODSOperands(0);
2071
2072 for (auto v : valueGroup0) {
2073 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2074 return ::mlir::failure();
2075 }
2076 auto valueGroup1 = getODSOperands(1);
2077
2078 for (auto v : valueGroup1) {
2079 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2080 return ::mlir::failure();
2081 }
2082 }
2083 {
2084 unsigned index = 0; (void)index;
2085 auto valueGroup0 = getODSResults(0);
2086
2087 for (auto v : valueGroup0) {
2088 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
2089 return ::mlir::failure();
2090 }
2091 }
2092 return ::mlir::success();
2093}
2094
2095::llvm::LogicalResult BVAndOp::verifyInvariants() {
2096 return verifyInvariantsImpl();
2097}
2098
2099::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) {
2100 inferredReturnTypes.resize(1);
2101 ::mlir::Builder odsBuilder(context);
2102 if (operands.size() <= 0)
2103 return ::mlir::failure();
2104 ::mlir::Type odsInferredType0 = operands[0].getType();
2105 inferredReturnTypes[0] = odsInferredType0;
2106 return ::mlir::success();
2107}
2108
2109::mlir::ParseResult BVAndOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2110 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2111 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2112 (void)lhsOperandsLoc;
2113 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2114 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2115 (void)rhsOperandsLoc;
2116 ::mlir::Type resultRawType{};
2117 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
2118
2119 lhsOperandsLoc = parser.getCurrentLocation();
2120 if (parser.parseOperand(lhsRawOperand))
2121 return ::mlir::failure();
2122 if (parser.parseComma())
2123 return ::mlir::failure();
2124
2125 rhsOperandsLoc = parser.getCurrentLocation();
2126 if (parser.parseOperand(rhsRawOperand))
2127 return ::mlir::failure();
2128 {
2129 auto loc = parser.getCurrentLocation();(void)loc;
2130 if (parser.parseOptionalAttrDict(result.attributes))
2131 return ::mlir::failure();
2132 }
2133 if (parser.parseColon())
2134 return ::mlir::failure();
2135
2136 if (parser.parseType(resultRawType))
2137 return ::mlir::failure();
2138 result.addTypes(resultTypes);
2139 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
2140 return ::mlir::failure();
2141 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
2142 return ::mlir::failure();
2143 return ::mlir::success();
2144}
2145
2146void BVAndOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2147 _odsPrinter << ' ';
2148 _odsPrinter << getLhs();
2149 _odsPrinter << ",";
2150 _odsPrinter << ' ';
2151 _odsPrinter << getRhs();
2152 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2153 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2154 _odsPrinter << ' ' << ":";
2155 _odsPrinter << ' ';
2156 _odsPrinter << getResult().getType();
2157}
2158
2159void BVAndOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2160}
2161
2162} // namespace smt
2163} // namespace llzk
2164MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVAndOp)
2165
2166namespace llzk {
2167namespace smt {
2168
2169//===----------------------------------------------------------------------===//
2170// ::llzk::smt::BVCmpOp definitions
2171//===----------------------------------------------------------------------===//
2172
2173namespace detail {
2174BVCmpOpGenericAdaptorBase::BVCmpOpGenericAdaptorBase(BVCmpOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
2175
2177 auto attr = getPredAttr();
2178 return attr.getValue();
2179}
2180
2181} // namespace detail
2183
2184::llvm::LogicalResult BVCmpOpAdaptor::verify(::mlir::Location loc) {
2185 auto tblgen_pred = getProperties().pred; (void)tblgen_pred;
2186 if (!tblgen_pred) return emitError(loc, "'smt.bv.cmp' op ""requires attribute 'pred'");
2187
2188 if (tblgen_pred && !((::llvm::isa<::llzk::smt::BVCmpPredicateAttr>(tblgen_pred))))
2189 return emitError(loc, "'smt.bv.cmp' op ""attribute 'pred' failed to satisfy constraint: smt bit-vector comparison predicate");
2190 return ::mlir::success();
2191}
2192
2193::llvm::LogicalResult BVCmpOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2194 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2195 if (!dict) {
2196 emitError() << "expected DictionaryAttr to set properties";
2197 return ::mlir::failure();
2198 }
2199
2200 {
2201 auto &propStorage = prop.pred;
2202 auto attr = dict.get("pred");
2203 if (attr) {
2204 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
2205 if (convertedAttr) {
2206 propStorage = convertedAttr;
2207 } else {
2208 emitError() << "Invalid attribute `pred` in property conversion: " << attr;
2209 return ::mlir::failure();
2210 }
2211 }
2212 }
2213 return ::mlir::success();
2214}
2215
2216::mlir::Attribute BVCmpOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2217 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2218 ::mlir::Builder odsBuilder{ctx};
2219
2220 {
2221 const auto &propStorage = prop.pred;
2222 if (propStorage)
2223 attrs.push_back(odsBuilder.getNamedAttr("pred",
2224 propStorage));
2225 }
2226
2227 if (!attrs.empty())
2228 return odsBuilder.getDictionaryAttr(attrs);
2229 return {};
2230}
2231
2232llvm::hash_code BVCmpOp::computePropertiesHash(const Properties &prop) {
2233 return llvm::hash_combine(
2234 llvm::hash_value(prop.pred.getAsOpaquePointer()));
2235}
2236
2237std::optional<mlir::Attribute> BVCmpOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2238 if (name == "pred")
2239 return prop.pred;
2240 return std::nullopt;
2241}
2242
2243void BVCmpOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2244 if (name == "pred") {
2245 prop.pred = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.pred)>>(value);
2246 return;
2247 }
2248}
2249
2250void BVCmpOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
2251 if (prop.pred) attrs.append("pred", prop.pred);
2252}
2253
2254::llvm::LogicalResult BVCmpOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2255 {
2256 ::mlir::Attribute attr = attrs.get(getPredAttrName(opName));
2257 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT2(attr, "pred", emitError)))
2258 return ::mlir::failure();
2259 }
2260 return ::mlir::success();
2261}
2262
2263::llvm::LogicalResult BVCmpOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
2264 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
2265 if (::mlir::failed(reader.readAttribute(prop.pred)))
2266 return ::mlir::failure();
2267 return ::mlir::success();
2268}
2269
2270void BVCmpOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
2271 auto &prop = getProperties(); (void)prop;
2272 writer.writeAttribute(prop.pred);
2273}
2274
2276 auto attr = getPredAttr();
2277 return attr.getValue();
2278}
2279
2281 getProperties().pred = ::llzk::smt::BVCmpPredicateAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
2282}
2283
2284void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::BVCmpPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2285 odsState.addOperands(lhs);
2286 odsState.addOperands(rhs);
2287 odsState.getOrAddProperties<Properties>().pred = pred;
2288 odsState.addTypes(result);
2289}
2290
2291void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::BVCmpPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2292 odsState.addOperands(lhs);
2293 odsState.addOperands(rhs);
2294 odsState.getOrAddProperties<Properties>().pred = pred;
2295
2296 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2297 if (::mlir::succeeded(BVCmpOp::inferReturnTypes(odsBuilder.getContext(),
2298 odsState.location, odsState.operands,
2299 odsState.attributes.getDictionary(odsState.getContext()),
2300 odsState.getRawProperties(),
2301 odsState.regions, inferredReturnTypes)))
2302 odsState.addTypes(inferredReturnTypes);
2303 else
2304 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2305
2306}
2307
2308void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::BVCmpPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2309 odsState.addOperands(lhs);
2310 odsState.addOperands(rhs);
2311 odsState.getOrAddProperties<Properties>().pred = pred;
2312 assert(resultTypes.size() == 1u && "mismatched number of results");
2313 odsState.addTypes(resultTypes);
2314}
2315
2316void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::BVCmpPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2317 odsState.addOperands(lhs);
2318 odsState.addOperands(rhs);
2319 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::BVCmpPredicateAttr::get(odsBuilder.getContext(), pred);
2320 odsState.addTypes(result);
2321}
2322
2323void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::BVCmpPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2324 odsState.addOperands(lhs);
2325 odsState.addOperands(rhs);
2326 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::BVCmpPredicateAttr::get(odsBuilder.getContext(), pred);
2327
2328 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2329 if (::mlir::succeeded(BVCmpOp::inferReturnTypes(odsBuilder.getContext(),
2330 odsState.location, odsState.operands,
2331 odsState.attributes.getDictionary(odsState.getContext()),
2332 odsState.getRawProperties(),
2333 odsState.regions, inferredReturnTypes)))
2334 odsState.addTypes(inferredReturnTypes);
2335 else
2336 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2337
2338}
2339
2340void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::BVCmpPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
2341 odsState.addOperands(lhs);
2342 odsState.addOperands(rhs);
2343 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::BVCmpPredicateAttr::get(odsBuilder.getContext(), pred);
2344 assert(resultTypes.size() == 1u && "mismatched number of results");
2345 odsState.addTypes(resultTypes);
2346}
2347
2348void BVCmpOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2349 assert(operands.size() == 2u && "mismatched number of parameters");
2350 odsState.addOperands(operands);
2351 odsState.addAttributes(attributes);
2352 assert(resultTypes.size() == 1u && "mismatched number of return types");
2353 odsState.addTypes(resultTypes);
2354
2355 if (!attributes.empty()) {
2356 ::mlir::OpaqueProperties properties =
2357 &odsState.getOrAddProperties<BVCmpOp::Properties>();
2358 std::optional<::mlir::RegisteredOperationName> info =
2359 odsState.name.getRegisteredInfo();
2360 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
2361 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
2362 ::llvm::report_fatal_error("Property conversion failed.");
2363 }
2364}
2365
2366void BVCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2367 assert(operands.size() == 2u && "mismatched number of parameters");
2368 odsState.addOperands(operands);
2369 odsState.addAttributes(attributes);
2370
2371 if (!attributes.empty()) {
2372 ::mlir::OpaqueProperties properties =
2373 &odsState.getOrAddProperties<BVCmpOp::Properties>();
2374 std::optional<::mlir::RegisteredOperationName> info =
2375 odsState.name.getRegisteredInfo();
2376 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
2377 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
2378 ::llvm::report_fatal_error("Property conversion failed.");
2379 }
2380 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2381 if (::mlir::succeeded(BVCmpOp::inferReturnTypes(odsBuilder.getContext(),
2382 odsState.location, operands,
2383 odsState.attributes.getDictionary(odsState.getContext()),
2384 odsState.getRawProperties(),
2385 odsState.regions, inferredReturnTypes))) {
2386 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2387 odsState.addTypes(inferredReturnTypes);
2388 } else {
2389 ::llvm::report_fatal_error("Failed to infer result type(s).");
2390 }
2391}
2392
2393::llvm::LogicalResult BVCmpOp::verifyInvariantsImpl() {
2394 auto tblgen_pred = getProperties().pred; (void)tblgen_pred;
2395 if (!tblgen_pred) return emitOpError("requires attribute 'pred'");
2396
2397 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT2(*this, tblgen_pred, "pred")))
2398 return ::mlir::failure();
2399 {
2400 unsigned index = 0; (void)index;
2401 auto valueGroup0 = getODSOperands(0);
2402
2403 for (auto v : valueGroup0) {
2404 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2405 return ::mlir::failure();
2406 }
2407 auto valueGroup1 = getODSOperands(1);
2408
2409 for (auto v : valueGroup1) {
2410 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2411 return ::mlir::failure();
2412 }
2413 }
2414 {
2415 unsigned index = 0; (void)index;
2416 auto valueGroup0 = getODSResults(0);
2417
2418 for (auto v : valueGroup0) {
2419 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
2420 return ::mlir::failure();
2421 }
2422 }
2423 return ::mlir::success();
2424}
2425
2426::llvm::LogicalResult BVCmpOp::verifyInvariants() {
2427 return verifyInvariantsImpl();
2428}
2429
2430::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) {
2431 inferredReturnTypes.resize(1);
2432 ::mlir::Builder odsBuilder(context);
2433 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
2434 inferredReturnTypes[0] = odsInferredType0;
2435 return ::mlir::success();
2436}
2437
2438::mlir::ParseResult BVCmpOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2440 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2441 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2442 (void)lhsOperandsLoc;
2443 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2444 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2445 (void)rhsOperandsLoc;
2446 ::mlir::Type lhsRawType{};
2447 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2448
2449 {
2450 ::llvm::StringRef attrStr;
2451 ::mlir::NamedAttrList attrStorage;
2452 auto loc = parser.getCurrentLocation();
2453 if (parser.parseOptionalKeyword(&attrStr, {"slt","sle","sgt","sge","ult","ule","ugt","uge"})) {
2454 ::mlir::StringAttr attrVal;
2455 ::mlir::OptionalParseResult parseResult =
2456 parser.parseOptionalAttribute(attrVal,
2457 parser.getBuilder().getNoneType(),
2458 "pred", attrStorage);
2459 if (parseResult.has_value()) {
2460 if (failed(*parseResult))
2461 return ::mlir::failure();
2462 attrStr = attrVal.getValue();
2463 } else {
2464 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]");
2465 }
2466 }
2467 if (!attrStr.empty()) {
2468 auto attrOptional = ::llzk::smt::symbolizeBVCmpPredicate(attrStr);
2469 if (!attrOptional)
2470 return parser.emitError(loc, "invalid ")
2471 << "pred attribute specification: \"" << attrStr << '"';;
2472
2473 predAttr = ::llzk::smt::BVCmpPredicateAttr::get(parser.getBuilder().getContext(), *attrOptional);
2474 result.getOrAddProperties<BVCmpOp::Properties>().pred = predAttr;
2475 }
2476 }
2477
2478 lhsOperandsLoc = parser.getCurrentLocation();
2479 if (parser.parseOperand(lhsRawOperand))
2480 return ::mlir::failure();
2481 if (parser.parseComma())
2482 return ::mlir::failure();
2483
2484 rhsOperandsLoc = parser.getCurrentLocation();
2485 if (parser.parseOperand(rhsRawOperand))
2486 return ::mlir::failure();
2487 {
2488 auto loc = parser.getCurrentLocation();(void)loc;
2489 if (parser.parseOptionalAttrDict(result.attributes))
2490 return ::mlir::failure();
2491 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
2492 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
2493 })))
2494 return ::mlir::failure();
2495 }
2496 if (parser.parseColon())
2497 return ::mlir::failure();
2498
2499 if (parser.parseType(lhsRawType))
2500 return ::mlir::failure();
2501 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
2502 result.addTypes(odsBuildableType0);
2503 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2504 return ::mlir::failure();
2505 if (parser.resolveOperands(rhsOperands, lhsTypes[0], rhsOperandsLoc, result.operands))
2506 return ::mlir::failure();
2507 return ::mlir::success();
2508}
2509
2510void BVCmpOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2511 _odsPrinter << ' ';
2512
2513 {
2514 auto caseValue = getPred();
2515 auto caseValueStr = stringifyBVCmpPredicate(caseValue);
2516 _odsPrinter << caseValueStr;
2517 }
2518 _odsPrinter << ' ';
2519 _odsPrinter << getLhs();
2520 _odsPrinter << ",";
2521 _odsPrinter << ' ';
2522 _odsPrinter << getRhs();
2523 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2524 elidedAttrs.push_back("pred");
2525 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2526 _odsPrinter << ' ' << ":";
2527 _odsPrinter << ' ';
2528 _odsPrinter << getLhs().getType();
2529}
2530
2531void BVCmpOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2532}
2533
2534} // namespace smt
2535} // namespace llzk
2536MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVCmpOp)
2537
2538namespace llzk {
2539namespace smt {
2540
2541//===----------------------------------------------------------------------===//
2542// ::llzk::smt::BVConstantOp definitions
2543//===----------------------------------------------------------------------===//
2544
2545namespace detail {
2546BVConstantOpGenericAdaptorBase::BVConstantOpGenericAdaptorBase(BVConstantOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
2547
2548::llzk::smt::BitVectorAttr BVConstantOpGenericAdaptorBase::getValue() {
2549 auto attr = getValueAttr();
2550 return ::llvm::cast<::llzk::smt::BitVectorAttr>(attr);
2551}
2552
2553} // namespace detail
2555
2556::llvm::LogicalResult BVConstantOpAdaptor::verify(::mlir::Location loc) {
2557 auto tblgen_value = getProperties().value; (void)tblgen_value;
2558 if (!tblgen_value) return emitError(loc, "'smt.bv.constant' op ""requires attribute 'value'");
2559
2560 if (tblgen_value && !((::llvm::isa<::llzk::smt::BitVectorAttr>(tblgen_value))))
2561 return emitError(loc, "'smt.bv.constant' op ""attribute 'value' failed to satisfy constraint: ");
2562 return ::mlir::success();
2563}
2564
2565::llvm::LogicalResult BVConstantOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2566 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2567 if (!dict) {
2568 emitError() << "expected DictionaryAttr to set properties";
2569 return ::mlir::failure();
2570 }
2571
2572 {
2573 auto &propStorage = prop.value;
2574 auto attr = dict.get("value");
2575 if (attr) {
2576 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
2577 if (convertedAttr) {
2578 propStorage = convertedAttr;
2579 } else {
2580 emitError() << "Invalid attribute `value` in property conversion: " << attr;
2581 return ::mlir::failure();
2582 }
2583 }
2584 }
2585 return ::mlir::success();
2586}
2587
2588::mlir::Attribute BVConstantOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2589 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2590 ::mlir::Builder odsBuilder{ctx};
2591
2592 {
2593 const auto &propStorage = prop.value;
2594 if (propStorage)
2595 attrs.push_back(odsBuilder.getNamedAttr("value",
2596 propStorage));
2597 }
2598
2599 if (!attrs.empty())
2600 return odsBuilder.getDictionaryAttr(attrs);
2601 return {};
2602}
2603
2605 return llvm::hash_combine(
2606 llvm::hash_value(prop.value.getAsOpaquePointer()));
2607}
2608
2609std::optional<mlir::Attribute> BVConstantOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2610 if (name == "value")
2611 return prop.value;
2612 return std::nullopt;
2613}
2614
2615void BVConstantOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2616 if (name == "value") {
2617 prop.value = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.value)>>(value);
2618 return;
2619 }
2620}
2621
2622void BVConstantOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
2623 if (prop.value) attrs.append("value", prop.value);
2624}
2625
2626::llvm::LogicalResult BVConstantOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2627 {
2628 ::mlir::Attribute attr = attrs.get(getValueAttrName(opName));
2629 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT3(attr, "value", emitError)))
2630 return ::mlir::failure();
2631 }
2632 return ::mlir::success();
2633}
2634
2635::llvm::LogicalResult BVConstantOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
2636 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
2637 if (::mlir::failed(reader.readAttribute(prop.value)))
2638 return ::mlir::failure();
2639 return ::mlir::success();
2640}
2641
2642void BVConstantOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
2643 auto &prop = getProperties(); (void)prop;
2644 writer.writeAttribute(prop.value);
2645}
2646
2647::llzk::smt::BitVectorAttr BVConstantOp::getValue() {
2648 auto attr = getValueAttr();
2649 return ::llvm::cast<::llzk::smt::BitVectorAttr>(attr);
2650}
2651
2652void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, const llvm::APInt &value) {
2653 build(odsBuilder, odsState,
2654 BitVectorAttr::get(odsBuilder.getContext(), value));
2655
2656}
2657
2658void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint64_t value, unsigned width) {
2659 build(odsBuilder, odsState,
2660 BitVectorAttr::get(odsBuilder.getContext(), value, width));
2661
2662}
2663
2664void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::BitVectorAttr value) {
2665 odsState.getOrAddProperties<Properties>().value = value;
2666 odsState.addTypes(result);
2667}
2668
2669void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::BitVectorAttr value) {
2670 odsState.getOrAddProperties<Properties>().value = value;
2671
2672 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2673 if (::mlir::succeeded(BVConstantOp::inferReturnTypes(odsBuilder.getContext(),
2674 odsState.location, odsState.operands,
2675 odsState.attributes.getDictionary(odsState.getContext()),
2676 odsState.getRawProperties(),
2677 odsState.regions, inferredReturnTypes)))
2678 odsState.addTypes(inferredReturnTypes);
2679 else
2680 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2681
2682}
2683
2684void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::BitVectorAttr value) {
2685 odsState.getOrAddProperties<Properties>().value = value;
2686 assert(resultTypes.size() == 1u && "mismatched number of results");
2687 odsState.addTypes(resultTypes);
2688}
2689
2690void BVConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2691 assert(operands.size() == 0u && "mismatched number of parameters");
2692 odsState.addOperands(operands);
2693 odsState.addAttributes(attributes);
2694 assert(resultTypes.size() == 1u && "mismatched number of return types");
2695 odsState.addTypes(resultTypes);
2696
2697 if (!attributes.empty()) {
2698 ::mlir::OpaqueProperties properties =
2699 &odsState.getOrAddProperties<BVConstantOp::Properties>();
2700 std::optional<::mlir::RegisteredOperationName> info =
2701 odsState.name.getRegisteredInfo();
2702 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
2703 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
2704 ::llvm::report_fatal_error("Property conversion failed.");
2705 }
2706}
2707
2708void BVConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2709 assert(operands.size() == 0u && "mismatched number of parameters");
2710 odsState.addOperands(operands);
2711 odsState.addAttributes(attributes);
2712
2713 if (!attributes.empty()) {
2714 ::mlir::OpaqueProperties properties =
2715 &odsState.getOrAddProperties<BVConstantOp::Properties>();
2716 std::optional<::mlir::RegisteredOperationName> info =
2717 odsState.name.getRegisteredInfo();
2718 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
2719 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
2720 ::llvm::report_fatal_error("Property conversion failed.");
2721 }
2722 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2723 if (::mlir::succeeded(BVConstantOp::inferReturnTypes(odsBuilder.getContext(),
2724 odsState.location, operands,
2725 odsState.attributes.getDictionary(odsState.getContext()),
2726 odsState.getRawProperties(),
2727 odsState.regions, inferredReturnTypes))) {
2728 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2729 odsState.addTypes(inferredReturnTypes);
2730 } else {
2731 ::llvm::report_fatal_error("Failed to infer result type(s).");
2732 }
2733}
2734
2735::llvm::LogicalResult BVConstantOp::verifyInvariantsImpl() {
2736 auto tblgen_value = getProperties().value; (void)tblgen_value;
2737 if (!tblgen_value) return emitOpError("requires attribute 'value'");
2738
2739 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT3(*this, tblgen_value, "value")))
2740 return ::mlir::failure();
2741 {
2742 unsigned index = 0; (void)index;
2743 auto valueGroup0 = getODSResults(0);
2744
2745 for (auto v : valueGroup0) {
2746 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
2747 return ::mlir::failure();
2748 }
2749 }
2750 return ::mlir::success();
2751}
2752
2753::llvm::LogicalResult BVConstantOp::verifyInvariants() {
2754 return verifyInvariantsImpl();
2755}
2756
2757::mlir::ParseResult BVConstantOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2758 ::llzk::smt::BitVectorAttr valueAttr;
2759
2760 if (parser.parseAttribute(valueAttr, ::mlir::Type{}))
2761 return ::mlir::failure();
2762 if (valueAttr) result.getOrAddProperties<BVConstantOp::Properties>().value = valueAttr;
2763 {
2764 auto loc = parser.getCurrentLocation();(void)loc;
2765 if (parser.parseOptionalAttrDict(result.attributes))
2766 return ::mlir::failure();
2767 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
2768 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
2769 })))
2770 return ::mlir::failure();
2771 }
2772
2773 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
2774 if (::mlir::failed(BVConstantOp::inferReturnTypes(parser.getContext(),
2775 result.location, result.operands,
2776 result.attributes.getDictionary(parser.getContext()),
2777 result.getRawProperties(),
2778 result.regions, inferredReturnTypes)))
2779 return ::mlir::failure();
2780 result.addTypes(inferredReturnTypes);
2781 return ::mlir::success();
2782}
2783
2784void BVConstantOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2785 _odsPrinter << ' ';
2786 _odsPrinter.printAttribute(getValueAttr());
2787 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2788 elidedAttrs.push_back("value");
2789 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2790}
2791
2792void BVConstantOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2793}
2794
2795} // namespace smt
2796} // namespace llzk
2797MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVConstantOp)
2798
2799namespace llzk {
2800namespace smt {
2801
2802//===----------------------------------------------------------------------===//
2803// ::llzk::smt::BVLShrOp definitions
2804//===----------------------------------------------------------------------===//
2805
2806namespace detail {
2807} // namespace detail
2809
2810::llvm::LogicalResult BVLShrOpAdaptor::verify(::mlir::Location loc) {
2811 return ::mlir::success();
2812}
2813
2814void BVLShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2815 odsState.addOperands(lhs);
2816 odsState.addOperands(rhs);
2817 odsState.addTypes(result);
2818}
2819
2820void BVLShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2821 odsState.addOperands(lhs);
2822 odsState.addOperands(rhs);
2823
2824 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2825 if (::mlir::succeeded(BVLShrOp::inferReturnTypes(odsBuilder.getContext(),
2826 odsState.location, odsState.operands,
2827 odsState.attributes.getDictionary(odsState.getContext()),
2828 odsState.getRawProperties(),
2829 odsState.regions, inferredReturnTypes)))
2830 odsState.addTypes(inferredReturnTypes);
2831 else
2832 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2833
2834}
2835
2836void BVLShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2837 odsState.addOperands(lhs);
2838 odsState.addOperands(rhs);
2839 assert(resultTypes.size() == 1u && "mismatched number of results");
2840 odsState.addTypes(resultTypes);
2841}
2842
2843void BVLShrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2844 assert(operands.size() == 2u && "mismatched number of parameters");
2845 odsState.addOperands(operands);
2846 odsState.addAttributes(attributes);
2847 assert(resultTypes.size() == 1u && "mismatched number of return types");
2848 odsState.addTypes(resultTypes);
2849}
2850
2851void BVLShrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2852 assert(operands.size() == 2u && "mismatched number of parameters");
2853 odsState.addOperands(operands);
2854 odsState.addAttributes(attributes);
2855
2856 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2857 if (::mlir::succeeded(BVLShrOp::inferReturnTypes(odsBuilder.getContext(),
2858 odsState.location, operands,
2859 odsState.attributes.getDictionary(odsState.getContext()),
2860 odsState.getRawProperties(),
2861 odsState.regions, inferredReturnTypes))) {
2862 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2863 odsState.addTypes(inferredReturnTypes);
2864 } else {
2865 ::llvm::report_fatal_error("Failed to infer result type(s).");
2866 }
2867}
2868
2869::llvm::LogicalResult BVLShrOp::verifyInvariantsImpl() {
2870 {
2871 unsigned index = 0; (void)index;
2872 auto valueGroup0 = getODSOperands(0);
2873
2874 for (auto v : valueGroup0) {
2875 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2876 return ::mlir::failure();
2877 }
2878 auto valueGroup1 = getODSOperands(1);
2879
2880 for (auto v : valueGroup1) {
2881 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
2882 return ::mlir::failure();
2883 }
2884 }
2885 {
2886 unsigned index = 0; (void)index;
2887 auto valueGroup0 = getODSResults(0);
2888
2889 for (auto v : valueGroup0) {
2890 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
2891 return ::mlir::failure();
2892 }
2893 }
2894 return ::mlir::success();
2895}
2896
2897::llvm::LogicalResult BVLShrOp::verifyInvariants() {
2898 return verifyInvariantsImpl();
2899}
2900
2901::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) {
2902 inferredReturnTypes.resize(1);
2903 ::mlir::Builder odsBuilder(context);
2904 if (operands.size() <= 0)
2905 return ::mlir::failure();
2906 ::mlir::Type odsInferredType0 = operands[0].getType();
2907 inferredReturnTypes[0] = odsInferredType0;
2908 return ::mlir::success();
2909}
2910
2911::mlir::ParseResult BVLShrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2912 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2913 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2914 (void)lhsOperandsLoc;
2915 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2916 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2917 (void)rhsOperandsLoc;
2918 ::mlir::Type resultRawType{};
2919 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
2920
2921 lhsOperandsLoc = parser.getCurrentLocation();
2922 if (parser.parseOperand(lhsRawOperand))
2923 return ::mlir::failure();
2924 if (parser.parseComma())
2925 return ::mlir::failure();
2926
2927 rhsOperandsLoc = parser.getCurrentLocation();
2928 if (parser.parseOperand(rhsRawOperand))
2929 return ::mlir::failure();
2930 {
2931 auto loc = parser.getCurrentLocation();(void)loc;
2932 if (parser.parseOptionalAttrDict(result.attributes))
2933 return ::mlir::failure();
2934 }
2935 if (parser.parseColon())
2936 return ::mlir::failure();
2937
2938 if (parser.parseType(resultRawType))
2939 return ::mlir::failure();
2940 result.addTypes(resultTypes);
2941 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
2942 return ::mlir::failure();
2943 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
2944 return ::mlir::failure();
2945 return ::mlir::success();
2946}
2947
2948void BVLShrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2949 _odsPrinter << ' ';
2950 _odsPrinter << getLhs();
2951 _odsPrinter << ",";
2952 _odsPrinter << ' ';
2953 _odsPrinter << getRhs();
2954 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2955 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2956 _odsPrinter << ' ' << ":";
2957 _odsPrinter << ' ';
2958 _odsPrinter << getResult().getType();
2959}
2960
2961void BVLShrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2962}
2963
2964} // namespace smt
2965} // namespace llzk
2966MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVLShrOp)
2967
2968namespace llzk {
2969namespace smt {
2970
2971//===----------------------------------------------------------------------===//
2972// ::llzk::smt::BVMulOp definitions
2973//===----------------------------------------------------------------------===//
2974
2975namespace detail {
2976} // namespace detail
2978
2979::llvm::LogicalResult BVMulOpAdaptor::verify(::mlir::Location loc) {
2980 return ::mlir::success();
2981}
2982
2983void BVMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2984 odsState.addOperands(lhs);
2985 odsState.addOperands(rhs);
2986 odsState.addTypes(result);
2987}
2988
2989void BVMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2990 odsState.addOperands(lhs);
2991 odsState.addOperands(rhs);
2992
2993 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2994 if (::mlir::succeeded(BVMulOp::inferReturnTypes(odsBuilder.getContext(),
2995 odsState.location, odsState.operands,
2996 odsState.attributes.getDictionary(odsState.getContext()),
2997 odsState.getRawProperties(),
2998 odsState.regions, inferredReturnTypes)))
2999 odsState.addTypes(inferredReturnTypes);
3000 else
3001 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3002
3003}
3004
3005void BVMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3006 odsState.addOperands(lhs);
3007 odsState.addOperands(rhs);
3008 assert(resultTypes.size() == 1u && "mismatched number of results");
3009 odsState.addTypes(resultTypes);
3010}
3011
3012void BVMulOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3013 assert(operands.size() == 2u && "mismatched number of parameters");
3014 odsState.addOperands(operands);
3015 odsState.addAttributes(attributes);
3016 assert(resultTypes.size() == 1u && "mismatched number of return types");
3017 odsState.addTypes(resultTypes);
3018}
3019
3020void BVMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3021 assert(operands.size() == 2u && "mismatched number of parameters");
3022 odsState.addOperands(operands);
3023 odsState.addAttributes(attributes);
3024
3025 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3026 if (::mlir::succeeded(BVMulOp::inferReturnTypes(odsBuilder.getContext(),
3027 odsState.location, operands,
3028 odsState.attributes.getDictionary(odsState.getContext()),
3029 odsState.getRawProperties(),
3030 odsState.regions, inferredReturnTypes))) {
3031 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3032 odsState.addTypes(inferredReturnTypes);
3033 } else {
3034 ::llvm::report_fatal_error("Failed to infer result type(s).");
3035 }
3036}
3037
3038::llvm::LogicalResult BVMulOp::verifyInvariantsImpl() {
3039 {
3040 unsigned index = 0; (void)index;
3041 auto valueGroup0 = getODSOperands(0);
3042
3043 for (auto v : valueGroup0) {
3044 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3045 return ::mlir::failure();
3046 }
3047 auto valueGroup1 = getODSOperands(1);
3048
3049 for (auto v : valueGroup1) {
3050 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3051 return ::mlir::failure();
3052 }
3053 }
3054 {
3055 unsigned index = 0; (void)index;
3056 auto valueGroup0 = getODSResults(0);
3057
3058 for (auto v : valueGroup0) {
3059 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3060 return ::mlir::failure();
3061 }
3062 }
3063 return ::mlir::success();
3064}
3065
3066::llvm::LogicalResult BVMulOp::verifyInvariants() {
3067 return verifyInvariantsImpl();
3068}
3069
3070::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) {
3071 inferredReturnTypes.resize(1);
3072 ::mlir::Builder odsBuilder(context);
3073 if (operands.size() <= 0)
3074 return ::mlir::failure();
3075 ::mlir::Type odsInferredType0 = operands[0].getType();
3076 inferredReturnTypes[0] = odsInferredType0;
3077 return ::mlir::success();
3078}
3079
3080::mlir::ParseResult BVMulOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3081 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3082 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3083 (void)lhsOperandsLoc;
3084 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3085 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3086 (void)rhsOperandsLoc;
3087 ::mlir::Type resultRawType{};
3088 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3089
3090 lhsOperandsLoc = parser.getCurrentLocation();
3091 if (parser.parseOperand(lhsRawOperand))
3092 return ::mlir::failure();
3093 if (parser.parseComma())
3094 return ::mlir::failure();
3095
3096 rhsOperandsLoc = parser.getCurrentLocation();
3097 if (parser.parseOperand(rhsRawOperand))
3098 return ::mlir::failure();
3099 {
3100 auto loc = parser.getCurrentLocation();(void)loc;
3101 if (parser.parseOptionalAttrDict(result.attributes))
3102 return ::mlir::failure();
3103 }
3104 if (parser.parseColon())
3105 return ::mlir::failure();
3106
3107 if (parser.parseType(resultRawType))
3108 return ::mlir::failure();
3109 result.addTypes(resultTypes);
3110 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
3111 return ::mlir::failure();
3112 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
3113 return ::mlir::failure();
3114 return ::mlir::success();
3115}
3116
3117void BVMulOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3118 _odsPrinter << ' ';
3119 _odsPrinter << getLhs();
3120 _odsPrinter << ",";
3121 _odsPrinter << ' ';
3122 _odsPrinter << getRhs();
3123 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3124 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3125 _odsPrinter << ' ' << ":";
3126 _odsPrinter << ' ';
3127 _odsPrinter << getResult().getType();
3128}
3129
3130void BVMulOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3131}
3132
3133} // namespace smt
3134} // namespace llzk
3135MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVMulOp)
3136
3137namespace llzk {
3138namespace smt {
3139
3140//===----------------------------------------------------------------------===//
3141// ::llzk::smt::BVNegOp definitions
3142//===----------------------------------------------------------------------===//
3143
3144namespace detail {
3145} // namespace detail
3147
3148::llvm::LogicalResult BVNegOpAdaptor::verify(::mlir::Location loc) {
3149 return ::mlir::success();
3150}
3151
3152void BVNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
3153 odsState.addOperands(input);
3154 odsState.addTypes(result);
3155}
3156
3157void BVNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
3158 odsState.addOperands(input);
3159
3160 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3161 if (::mlir::succeeded(BVNegOp::inferReturnTypes(odsBuilder.getContext(),
3162 odsState.location, odsState.operands,
3163 odsState.attributes.getDictionary(odsState.getContext()),
3164 odsState.getRawProperties(),
3165 odsState.regions, inferredReturnTypes)))
3166 odsState.addTypes(inferredReturnTypes);
3167 else
3168 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3169
3170}
3171
3172void BVNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
3173 odsState.addOperands(input);
3174 assert(resultTypes.size() == 1u && "mismatched number of results");
3175 odsState.addTypes(resultTypes);
3176}
3177
3178void BVNegOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3179 assert(operands.size() == 1u && "mismatched number of parameters");
3180 odsState.addOperands(operands);
3181 odsState.addAttributes(attributes);
3182 assert(resultTypes.size() == 1u && "mismatched number of return types");
3183 odsState.addTypes(resultTypes);
3184}
3185
3186void BVNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3187 assert(operands.size() == 1u && "mismatched number of parameters");
3188 odsState.addOperands(operands);
3189 odsState.addAttributes(attributes);
3190
3191 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3192 if (::mlir::succeeded(BVNegOp::inferReturnTypes(odsBuilder.getContext(),
3193 odsState.location, operands,
3194 odsState.attributes.getDictionary(odsState.getContext()),
3195 odsState.getRawProperties(),
3196 odsState.regions, inferredReturnTypes))) {
3197 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3198 odsState.addTypes(inferredReturnTypes);
3199 } else {
3200 ::llvm::report_fatal_error("Failed to infer result type(s).");
3201 }
3202}
3203
3204::llvm::LogicalResult BVNegOp::verifyInvariantsImpl() {
3205 {
3206 unsigned index = 0; (void)index;
3207 auto valueGroup0 = getODSOperands(0);
3208
3209 for (auto v : valueGroup0) {
3210 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3211 return ::mlir::failure();
3212 }
3213 }
3214 {
3215 unsigned index = 0; (void)index;
3216 auto valueGroup0 = getODSResults(0);
3217
3218 for (auto v : valueGroup0) {
3219 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3220 return ::mlir::failure();
3221 }
3222 }
3223 return ::mlir::success();
3224}
3225
3226::llvm::LogicalResult BVNegOp::verifyInvariants() {
3227 return verifyInvariantsImpl();
3228}
3229
3230::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) {
3231 inferredReturnTypes.resize(1);
3232 ::mlir::Builder odsBuilder(context);
3233 if (operands.size() <= 0)
3234 return ::mlir::failure();
3235 ::mlir::Type odsInferredType0 = operands[0].getType();
3236 inferredReturnTypes[0] = odsInferredType0;
3237 return ::mlir::success();
3238}
3239
3240::mlir::ParseResult BVNegOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3241 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
3242 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
3243 (void)inputOperandsLoc;
3244 ::mlir::Type resultRawType{};
3245 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3246
3247 inputOperandsLoc = parser.getCurrentLocation();
3248 if (parser.parseOperand(inputRawOperand))
3249 return ::mlir::failure();
3250 {
3251 auto loc = parser.getCurrentLocation();(void)loc;
3252 if (parser.parseOptionalAttrDict(result.attributes))
3253 return ::mlir::failure();
3254 }
3255 if (parser.parseColon())
3256 return ::mlir::failure();
3257
3258 if (parser.parseType(resultRawType))
3259 return ::mlir::failure();
3260 result.addTypes(resultTypes);
3261 if (parser.resolveOperands(inputOperands, resultTypes[0], inputOperandsLoc, result.operands))
3262 return ::mlir::failure();
3263 return ::mlir::success();
3264}
3265
3266void BVNegOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3267 _odsPrinter << ' ';
3268 _odsPrinter << getInput();
3269 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3270 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3271 _odsPrinter << ' ' << ":";
3272 _odsPrinter << ' ';
3273 _odsPrinter << getResult().getType();
3274}
3275
3276void BVNegOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3277}
3278
3279} // namespace smt
3280} // namespace llzk
3281MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVNegOp)
3282
3283namespace llzk {
3284namespace smt {
3285
3286//===----------------------------------------------------------------------===//
3287// ::llzk::smt::BVNotOp definitions
3288//===----------------------------------------------------------------------===//
3289
3290namespace detail {
3291} // namespace detail
3293
3294::llvm::LogicalResult BVNotOpAdaptor::verify(::mlir::Location loc) {
3295 return ::mlir::success();
3296}
3297
3298void BVNotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
3299 odsState.addOperands(input);
3300 odsState.addTypes(result);
3301}
3302
3303void BVNotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
3304 odsState.addOperands(input);
3305
3306 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3307 if (::mlir::succeeded(BVNotOp::inferReturnTypes(odsBuilder.getContext(),
3308 odsState.location, odsState.operands,
3309 odsState.attributes.getDictionary(odsState.getContext()),
3310 odsState.getRawProperties(),
3311 odsState.regions, inferredReturnTypes)))
3312 odsState.addTypes(inferredReturnTypes);
3313 else
3314 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3315
3316}
3317
3318void BVNotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
3319 odsState.addOperands(input);
3320 assert(resultTypes.size() == 1u && "mismatched number of results");
3321 odsState.addTypes(resultTypes);
3322}
3323
3324void BVNotOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3325 assert(operands.size() == 1u && "mismatched number of parameters");
3326 odsState.addOperands(operands);
3327 odsState.addAttributes(attributes);
3328 assert(resultTypes.size() == 1u && "mismatched number of return types");
3329 odsState.addTypes(resultTypes);
3330}
3331
3332void BVNotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3333 assert(operands.size() == 1u && "mismatched number of parameters");
3334 odsState.addOperands(operands);
3335 odsState.addAttributes(attributes);
3336
3337 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3338 if (::mlir::succeeded(BVNotOp::inferReturnTypes(odsBuilder.getContext(),
3339 odsState.location, operands,
3340 odsState.attributes.getDictionary(odsState.getContext()),
3341 odsState.getRawProperties(),
3342 odsState.regions, inferredReturnTypes))) {
3343 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3344 odsState.addTypes(inferredReturnTypes);
3345 } else {
3346 ::llvm::report_fatal_error("Failed to infer result type(s).");
3347 }
3348}
3349
3350::llvm::LogicalResult BVNotOp::verifyInvariantsImpl() {
3351 {
3352 unsigned index = 0; (void)index;
3353 auto valueGroup0 = getODSOperands(0);
3354
3355 for (auto v : valueGroup0) {
3356 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3357 return ::mlir::failure();
3358 }
3359 }
3360 {
3361 unsigned index = 0; (void)index;
3362 auto valueGroup0 = getODSResults(0);
3363
3364 for (auto v : valueGroup0) {
3365 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3366 return ::mlir::failure();
3367 }
3368 }
3369 return ::mlir::success();
3370}
3371
3372::llvm::LogicalResult BVNotOp::verifyInvariants() {
3373 return verifyInvariantsImpl();
3374}
3375
3376::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) {
3377 inferredReturnTypes.resize(1);
3378 ::mlir::Builder odsBuilder(context);
3379 if (operands.size() <= 0)
3380 return ::mlir::failure();
3381 ::mlir::Type odsInferredType0 = operands[0].getType();
3382 inferredReturnTypes[0] = odsInferredType0;
3383 return ::mlir::success();
3384}
3385
3386::mlir::ParseResult BVNotOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3387 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
3388 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
3389 (void)inputOperandsLoc;
3390 ::mlir::Type resultRawType{};
3391 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3392
3393 inputOperandsLoc = parser.getCurrentLocation();
3394 if (parser.parseOperand(inputRawOperand))
3395 return ::mlir::failure();
3396 {
3397 auto loc = parser.getCurrentLocation();(void)loc;
3398 if (parser.parseOptionalAttrDict(result.attributes))
3399 return ::mlir::failure();
3400 }
3401 if (parser.parseColon())
3402 return ::mlir::failure();
3403
3404 if (parser.parseType(resultRawType))
3405 return ::mlir::failure();
3406 result.addTypes(resultTypes);
3407 if (parser.resolveOperands(inputOperands, resultTypes[0], inputOperandsLoc, result.operands))
3408 return ::mlir::failure();
3409 return ::mlir::success();
3410}
3411
3412void BVNotOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3413 _odsPrinter << ' ';
3414 _odsPrinter << getInput();
3415 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3416 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3417 _odsPrinter << ' ' << ":";
3418 _odsPrinter << ' ';
3419 _odsPrinter << getResult().getType();
3420}
3421
3422void BVNotOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3423}
3424
3425} // namespace smt
3426} // namespace llzk
3427MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVNotOp)
3428
3429namespace llzk {
3430namespace smt {
3431
3432//===----------------------------------------------------------------------===//
3433// ::llzk::smt::BVOrOp definitions
3434//===----------------------------------------------------------------------===//
3435
3436namespace detail {
3437} // namespace detail
3439
3440::llvm::LogicalResult BVOrOpAdaptor::verify(::mlir::Location loc) {
3441 return ::mlir::success();
3442}
3443
3444void BVOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3445 odsState.addOperands(lhs);
3446 odsState.addOperands(rhs);
3447 odsState.addTypes(result);
3448}
3449
3450void BVOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3451 odsState.addOperands(lhs);
3452 odsState.addOperands(rhs);
3453
3454 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3455 if (::mlir::succeeded(BVOrOp::inferReturnTypes(odsBuilder.getContext(),
3456 odsState.location, odsState.operands,
3457 odsState.attributes.getDictionary(odsState.getContext()),
3458 odsState.getRawProperties(),
3459 odsState.regions, inferredReturnTypes)))
3460 odsState.addTypes(inferredReturnTypes);
3461 else
3462 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3463
3464}
3465
3466void BVOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3467 odsState.addOperands(lhs);
3468 odsState.addOperands(rhs);
3469 assert(resultTypes.size() == 1u && "mismatched number of results");
3470 odsState.addTypes(resultTypes);
3471}
3472
3473void BVOrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3474 assert(operands.size() == 2u && "mismatched number of parameters");
3475 odsState.addOperands(operands);
3476 odsState.addAttributes(attributes);
3477 assert(resultTypes.size() == 1u && "mismatched number of return types");
3478 odsState.addTypes(resultTypes);
3479}
3480
3481void BVOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3482 assert(operands.size() == 2u && "mismatched number of parameters");
3483 odsState.addOperands(operands);
3484 odsState.addAttributes(attributes);
3485
3486 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3487 if (::mlir::succeeded(BVOrOp::inferReturnTypes(odsBuilder.getContext(),
3488 odsState.location, operands,
3489 odsState.attributes.getDictionary(odsState.getContext()),
3490 odsState.getRawProperties(),
3491 odsState.regions, inferredReturnTypes))) {
3492 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3493 odsState.addTypes(inferredReturnTypes);
3494 } else {
3495 ::llvm::report_fatal_error("Failed to infer result type(s).");
3496 }
3497}
3498
3499::llvm::LogicalResult BVOrOp::verifyInvariantsImpl() {
3500 {
3501 unsigned index = 0; (void)index;
3502 auto valueGroup0 = getODSOperands(0);
3503
3504 for (auto v : valueGroup0) {
3505 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3506 return ::mlir::failure();
3507 }
3508 auto valueGroup1 = getODSOperands(1);
3509
3510 for (auto v : valueGroup1) {
3511 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3512 return ::mlir::failure();
3513 }
3514 }
3515 {
3516 unsigned index = 0; (void)index;
3517 auto valueGroup0 = getODSResults(0);
3518
3519 for (auto v : valueGroup0) {
3520 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3521 return ::mlir::failure();
3522 }
3523 }
3524 return ::mlir::success();
3525}
3526
3527::llvm::LogicalResult BVOrOp::verifyInvariants() {
3528 return verifyInvariantsImpl();
3529}
3530
3531::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) {
3532 inferredReturnTypes.resize(1);
3533 ::mlir::Builder odsBuilder(context);
3534 if (operands.size() <= 0)
3535 return ::mlir::failure();
3536 ::mlir::Type odsInferredType0 = operands[0].getType();
3537 inferredReturnTypes[0] = odsInferredType0;
3538 return ::mlir::success();
3539}
3540
3541::mlir::ParseResult BVOrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3542 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3543 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3544 (void)lhsOperandsLoc;
3545 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3546 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3547 (void)rhsOperandsLoc;
3548 ::mlir::Type resultRawType{};
3549 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3550
3551 lhsOperandsLoc = parser.getCurrentLocation();
3552 if (parser.parseOperand(lhsRawOperand))
3553 return ::mlir::failure();
3554 if (parser.parseComma())
3555 return ::mlir::failure();
3556
3557 rhsOperandsLoc = parser.getCurrentLocation();
3558 if (parser.parseOperand(rhsRawOperand))
3559 return ::mlir::failure();
3560 {
3561 auto loc = parser.getCurrentLocation();(void)loc;
3562 if (parser.parseOptionalAttrDict(result.attributes))
3563 return ::mlir::failure();
3564 }
3565 if (parser.parseColon())
3566 return ::mlir::failure();
3567
3568 if (parser.parseType(resultRawType))
3569 return ::mlir::failure();
3570 result.addTypes(resultTypes);
3571 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
3572 return ::mlir::failure();
3573 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
3574 return ::mlir::failure();
3575 return ::mlir::success();
3576}
3577
3578void BVOrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3579 _odsPrinter << ' ';
3580 _odsPrinter << getLhs();
3581 _odsPrinter << ",";
3582 _odsPrinter << ' ';
3583 _odsPrinter << getRhs();
3584 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3585 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3586 _odsPrinter << ' ' << ":";
3587 _odsPrinter << ' ';
3588 _odsPrinter << getResult().getType();
3589}
3590
3591void BVOrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3592}
3593
3594} // namespace smt
3595} // namespace llzk
3596MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVOrOp)
3597
3598namespace llzk {
3599namespace smt {
3600
3601//===----------------------------------------------------------------------===//
3602// ::llzk::smt::BVSDivOp definitions
3603//===----------------------------------------------------------------------===//
3604
3605namespace detail {
3606} // namespace detail
3608
3609::llvm::LogicalResult BVSDivOpAdaptor::verify(::mlir::Location loc) {
3610 return ::mlir::success();
3611}
3612
3613void BVSDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3614 odsState.addOperands(lhs);
3615 odsState.addOperands(rhs);
3616 odsState.addTypes(result);
3617}
3618
3619void BVSDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3620 odsState.addOperands(lhs);
3621 odsState.addOperands(rhs);
3622
3623 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3624 if (::mlir::succeeded(BVSDivOp::inferReturnTypes(odsBuilder.getContext(),
3625 odsState.location, odsState.operands,
3626 odsState.attributes.getDictionary(odsState.getContext()),
3627 odsState.getRawProperties(),
3628 odsState.regions, inferredReturnTypes)))
3629 odsState.addTypes(inferredReturnTypes);
3630 else
3631 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3632
3633}
3634
3635void BVSDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3636 odsState.addOperands(lhs);
3637 odsState.addOperands(rhs);
3638 assert(resultTypes.size() == 1u && "mismatched number of results");
3639 odsState.addTypes(resultTypes);
3640}
3641
3642void BVSDivOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3643 assert(operands.size() == 2u && "mismatched number of parameters");
3644 odsState.addOperands(operands);
3645 odsState.addAttributes(attributes);
3646 assert(resultTypes.size() == 1u && "mismatched number of return types");
3647 odsState.addTypes(resultTypes);
3648}
3649
3650void BVSDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3651 assert(operands.size() == 2u && "mismatched number of parameters");
3652 odsState.addOperands(operands);
3653 odsState.addAttributes(attributes);
3654
3655 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3656 if (::mlir::succeeded(BVSDivOp::inferReturnTypes(odsBuilder.getContext(),
3657 odsState.location, operands,
3658 odsState.attributes.getDictionary(odsState.getContext()),
3659 odsState.getRawProperties(),
3660 odsState.regions, inferredReturnTypes))) {
3661 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3662 odsState.addTypes(inferredReturnTypes);
3663 } else {
3664 ::llvm::report_fatal_error("Failed to infer result type(s).");
3665 }
3666}
3667
3668::llvm::LogicalResult BVSDivOp::verifyInvariantsImpl() {
3669 {
3670 unsigned index = 0; (void)index;
3671 auto valueGroup0 = getODSOperands(0);
3672
3673 for (auto v : valueGroup0) {
3674 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3675 return ::mlir::failure();
3676 }
3677 auto valueGroup1 = getODSOperands(1);
3678
3679 for (auto v : valueGroup1) {
3680 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3681 return ::mlir::failure();
3682 }
3683 }
3684 {
3685 unsigned index = 0; (void)index;
3686 auto valueGroup0 = getODSResults(0);
3687
3688 for (auto v : valueGroup0) {
3689 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3690 return ::mlir::failure();
3691 }
3692 }
3693 return ::mlir::success();
3694}
3695
3696::llvm::LogicalResult BVSDivOp::verifyInvariants() {
3697 return verifyInvariantsImpl();
3698}
3699
3700::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) {
3701 inferredReturnTypes.resize(1);
3702 ::mlir::Builder odsBuilder(context);
3703 if (operands.size() <= 0)
3704 return ::mlir::failure();
3705 ::mlir::Type odsInferredType0 = operands[0].getType();
3706 inferredReturnTypes[0] = odsInferredType0;
3707 return ::mlir::success();
3708}
3709
3710::mlir::ParseResult BVSDivOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3711 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3712 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3713 (void)lhsOperandsLoc;
3714 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3715 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3716 (void)rhsOperandsLoc;
3717 ::mlir::Type resultRawType{};
3718 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3719
3720 lhsOperandsLoc = parser.getCurrentLocation();
3721 if (parser.parseOperand(lhsRawOperand))
3722 return ::mlir::failure();
3723 if (parser.parseComma())
3724 return ::mlir::failure();
3725
3726 rhsOperandsLoc = parser.getCurrentLocation();
3727 if (parser.parseOperand(rhsRawOperand))
3728 return ::mlir::failure();
3729 {
3730 auto loc = parser.getCurrentLocation();(void)loc;
3731 if (parser.parseOptionalAttrDict(result.attributes))
3732 return ::mlir::failure();
3733 }
3734 if (parser.parseColon())
3735 return ::mlir::failure();
3736
3737 if (parser.parseType(resultRawType))
3738 return ::mlir::failure();
3739 result.addTypes(resultTypes);
3740 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
3741 return ::mlir::failure();
3742 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
3743 return ::mlir::failure();
3744 return ::mlir::success();
3745}
3746
3747void BVSDivOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3748 _odsPrinter << ' ';
3749 _odsPrinter << getLhs();
3750 _odsPrinter << ",";
3751 _odsPrinter << ' ';
3752 _odsPrinter << getRhs();
3753 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3754 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3755 _odsPrinter << ' ' << ":";
3756 _odsPrinter << ' ';
3757 _odsPrinter << getResult().getType();
3758}
3759
3760void BVSDivOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3761}
3762
3763} // namespace smt
3764} // namespace llzk
3765MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVSDivOp)
3766
3767namespace llzk {
3768namespace smt {
3769
3770//===----------------------------------------------------------------------===//
3771// ::llzk::smt::BVSModOp definitions
3772//===----------------------------------------------------------------------===//
3773
3774namespace detail {
3775} // namespace detail
3777
3778::llvm::LogicalResult BVSModOpAdaptor::verify(::mlir::Location loc) {
3779 return ::mlir::success();
3780}
3781
3782void BVSModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3783 odsState.addOperands(lhs);
3784 odsState.addOperands(rhs);
3785 odsState.addTypes(result);
3786}
3787
3788void BVSModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3789 odsState.addOperands(lhs);
3790 odsState.addOperands(rhs);
3791
3792 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3793 if (::mlir::succeeded(BVSModOp::inferReturnTypes(odsBuilder.getContext(),
3794 odsState.location, odsState.operands,
3795 odsState.attributes.getDictionary(odsState.getContext()),
3796 odsState.getRawProperties(),
3797 odsState.regions, inferredReturnTypes)))
3798 odsState.addTypes(inferredReturnTypes);
3799 else
3800 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3801
3802}
3803
3804void BVSModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3805 odsState.addOperands(lhs);
3806 odsState.addOperands(rhs);
3807 assert(resultTypes.size() == 1u && "mismatched number of results");
3808 odsState.addTypes(resultTypes);
3809}
3810
3811void BVSModOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3812 assert(operands.size() == 2u && "mismatched number of parameters");
3813 odsState.addOperands(operands);
3814 odsState.addAttributes(attributes);
3815 assert(resultTypes.size() == 1u && "mismatched number of return types");
3816 odsState.addTypes(resultTypes);
3817}
3818
3819void BVSModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3820 assert(operands.size() == 2u && "mismatched number of parameters");
3821 odsState.addOperands(operands);
3822 odsState.addAttributes(attributes);
3823
3824 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3825 if (::mlir::succeeded(BVSModOp::inferReturnTypes(odsBuilder.getContext(),
3826 odsState.location, operands,
3827 odsState.attributes.getDictionary(odsState.getContext()),
3828 odsState.getRawProperties(),
3829 odsState.regions, inferredReturnTypes))) {
3830 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3831 odsState.addTypes(inferredReturnTypes);
3832 } else {
3833 ::llvm::report_fatal_error("Failed to infer result type(s).");
3834 }
3835}
3836
3837::llvm::LogicalResult BVSModOp::verifyInvariantsImpl() {
3838 {
3839 unsigned index = 0; (void)index;
3840 auto valueGroup0 = getODSOperands(0);
3841
3842 for (auto v : valueGroup0) {
3843 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3844 return ::mlir::failure();
3845 }
3846 auto valueGroup1 = getODSOperands(1);
3847
3848 for (auto v : valueGroup1) {
3849 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
3850 return ::mlir::failure();
3851 }
3852 }
3853 {
3854 unsigned index = 0; (void)index;
3855 auto valueGroup0 = getODSResults(0);
3856
3857 for (auto v : valueGroup0) {
3858 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
3859 return ::mlir::failure();
3860 }
3861 }
3862 return ::mlir::success();
3863}
3864
3865::llvm::LogicalResult BVSModOp::verifyInvariants() {
3866 return verifyInvariantsImpl();
3867}
3868
3869::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) {
3870 inferredReturnTypes.resize(1);
3871 ::mlir::Builder odsBuilder(context);
3872 if (operands.size() <= 0)
3873 return ::mlir::failure();
3874 ::mlir::Type odsInferredType0 = operands[0].getType();
3875 inferredReturnTypes[0] = odsInferredType0;
3876 return ::mlir::success();
3877}
3878
3879::mlir::ParseResult BVSModOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3880 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3881 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3882 (void)lhsOperandsLoc;
3883 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3884 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3885 (void)rhsOperandsLoc;
3886 ::mlir::Type resultRawType{};
3887 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3888
3889 lhsOperandsLoc = parser.getCurrentLocation();
3890 if (parser.parseOperand(lhsRawOperand))
3891 return ::mlir::failure();
3892 if (parser.parseComma())
3893 return ::mlir::failure();
3894
3895 rhsOperandsLoc = parser.getCurrentLocation();
3896 if (parser.parseOperand(rhsRawOperand))
3897 return ::mlir::failure();
3898 {
3899 auto loc = parser.getCurrentLocation();(void)loc;
3900 if (parser.parseOptionalAttrDict(result.attributes))
3901 return ::mlir::failure();
3902 }
3903 if (parser.parseColon())
3904 return ::mlir::failure();
3905
3906 if (parser.parseType(resultRawType))
3907 return ::mlir::failure();
3908 result.addTypes(resultTypes);
3909 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
3910 return ::mlir::failure();
3911 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
3912 return ::mlir::failure();
3913 return ::mlir::success();
3914}
3915
3916void BVSModOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3917 _odsPrinter << ' ';
3918 _odsPrinter << getLhs();
3919 _odsPrinter << ",";
3920 _odsPrinter << ' ';
3921 _odsPrinter << getRhs();
3922 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3923 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3924 _odsPrinter << ' ' << ":";
3925 _odsPrinter << ' ';
3926 _odsPrinter << getResult().getType();
3927}
3928
3929void BVSModOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3930}
3931
3932} // namespace smt
3933} // namespace llzk
3934MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVSModOp)
3935
3936namespace llzk {
3937namespace smt {
3938
3939//===----------------------------------------------------------------------===//
3940// ::llzk::smt::BVSRemOp definitions
3941//===----------------------------------------------------------------------===//
3942
3943namespace detail {
3944} // namespace detail
3946
3947::llvm::LogicalResult BVSRemOpAdaptor::verify(::mlir::Location loc) {
3948 return ::mlir::success();
3949}
3950
3951void BVSRemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3952 odsState.addOperands(lhs);
3953 odsState.addOperands(rhs);
3954 odsState.addTypes(result);
3955}
3956
3957void BVSRemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3958 odsState.addOperands(lhs);
3959 odsState.addOperands(rhs);
3960
3961 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3962 if (::mlir::succeeded(BVSRemOp::inferReturnTypes(odsBuilder.getContext(),
3963 odsState.location, odsState.operands,
3964 odsState.attributes.getDictionary(odsState.getContext()),
3965 odsState.getRawProperties(),
3966 odsState.regions, inferredReturnTypes)))
3967 odsState.addTypes(inferredReturnTypes);
3968 else
3969 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3970
3971}
3972
3973void BVSRemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3974 odsState.addOperands(lhs);
3975 odsState.addOperands(rhs);
3976 assert(resultTypes.size() == 1u && "mismatched number of results");
3977 odsState.addTypes(resultTypes);
3978}
3979
3980void BVSRemOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3981 assert(operands.size() == 2u && "mismatched number of parameters");
3982 odsState.addOperands(operands);
3983 odsState.addAttributes(attributes);
3984 assert(resultTypes.size() == 1u && "mismatched number of return types");
3985 odsState.addTypes(resultTypes);
3986}
3987
3988void BVSRemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3989 assert(operands.size() == 2u && "mismatched number of parameters");
3990 odsState.addOperands(operands);
3991 odsState.addAttributes(attributes);
3992
3993 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3994 if (::mlir::succeeded(BVSRemOp::inferReturnTypes(odsBuilder.getContext(),
3995 odsState.location, operands,
3996 odsState.attributes.getDictionary(odsState.getContext()),
3997 odsState.getRawProperties(),
3998 odsState.regions, inferredReturnTypes))) {
3999 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4000 odsState.addTypes(inferredReturnTypes);
4001 } else {
4002 ::llvm::report_fatal_error("Failed to infer result type(s).");
4003 }
4004}
4005
4006::llvm::LogicalResult BVSRemOp::verifyInvariantsImpl() {
4007 {
4008 unsigned index = 0; (void)index;
4009 auto valueGroup0 = getODSOperands(0);
4010
4011 for (auto v : valueGroup0) {
4012 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4013 return ::mlir::failure();
4014 }
4015 auto valueGroup1 = getODSOperands(1);
4016
4017 for (auto v : valueGroup1) {
4018 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4019 return ::mlir::failure();
4020 }
4021 }
4022 {
4023 unsigned index = 0; (void)index;
4024 auto valueGroup0 = getODSResults(0);
4025
4026 for (auto v : valueGroup0) {
4027 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
4028 return ::mlir::failure();
4029 }
4030 }
4031 return ::mlir::success();
4032}
4033
4034::llvm::LogicalResult BVSRemOp::verifyInvariants() {
4035 return verifyInvariantsImpl();
4036}
4037
4038::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) {
4039 inferredReturnTypes.resize(1);
4040 ::mlir::Builder odsBuilder(context);
4041 if (operands.size() <= 0)
4042 return ::mlir::failure();
4043 ::mlir::Type odsInferredType0 = operands[0].getType();
4044 inferredReturnTypes[0] = odsInferredType0;
4045 return ::mlir::success();
4046}
4047
4048::mlir::ParseResult BVSRemOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4049 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4050 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4051 (void)lhsOperandsLoc;
4052 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4053 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4054 (void)rhsOperandsLoc;
4055 ::mlir::Type resultRawType{};
4056 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
4057
4058 lhsOperandsLoc = parser.getCurrentLocation();
4059 if (parser.parseOperand(lhsRawOperand))
4060 return ::mlir::failure();
4061 if (parser.parseComma())
4062 return ::mlir::failure();
4063
4064 rhsOperandsLoc = parser.getCurrentLocation();
4065 if (parser.parseOperand(rhsRawOperand))
4066 return ::mlir::failure();
4067 {
4068 auto loc = parser.getCurrentLocation();(void)loc;
4069 if (parser.parseOptionalAttrDict(result.attributes))
4070 return ::mlir::failure();
4071 }
4072 if (parser.parseColon())
4073 return ::mlir::failure();
4074
4075 if (parser.parseType(resultRawType))
4076 return ::mlir::failure();
4077 result.addTypes(resultTypes);
4078 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
4079 return ::mlir::failure();
4080 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
4081 return ::mlir::failure();
4082 return ::mlir::success();
4083}
4084
4085void BVSRemOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4086 _odsPrinter << ' ';
4087 _odsPrinter << getLhs();
4088 _odsPrinter << ",";
4089 _odsPrinter << ' ';
4090 _odsPrinter << getRhs();
4091 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4092 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4093 _odsPrinter << ' ' << ":";
4094 _odsPrinter << ' ';
4095 _odsPrinter << getResult().getType();
4096}
4097
4098void BVSRemOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4099}
4100
4101} // namespace smt
4102} // namespace llzk
4103MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVSRemOp)
4104
4105namespace llzk {
4106namespace smt {
4107
4108//===----------------------------------------------------------------------===//
4109// ::llzk::smt::BVShlOp definitions
4110//===----------------------------------------------------------------------===//
4111
4112namespace detail {
4113} // namespace detail
4115
4116::llvm::LogicalResult BVShlOpAdaptor::verify(::mlir::Location loc) {
4117 return ::mlir::success();
4118}
4119
4120void BVShlOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4121 odsState.addOperands(lhs);
4122 odsState.addOperands(rhs);
4123 odsState.addTypes(result);
4124}
4125
4126void BVShlOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
4127 odsState.addOperands(lhs);
4128 odsState.addOperands(rhs);
4129
4130 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4131 if (::mlir::succeeded(BVShlOp::inferReturnTypes(odsBuilder.getContext(),
4132 odsState.location, odsState.operands,
4133 odsState.attributes.getDictionary(odsState.getContext()),
4134 odsState.getRawProperties(),
4135 odsState.regions, inferredReturnTypes)))
4136 odsState.addTypes(inferredReturnTypes);
4137 else
4138 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4139
4140}
4141
4142void BVShlOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4143 odsState.addOperands(lhs);
4144 odsState.addOperands(rhs);
4145 assert(resultTypes.size() == 1u && "mismatched number of results");
4146 odsState.addTypes(resultTypes);
4147}
4148
4149void BVShlOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4150 assert(operands.size() == 2u && "mismatched number of parameters");
4151 odsState.addOperands(operands);
4152 odsState.addAttributes(attributes);
4153 assert(resultTypes.size() == 1u && "mismatched number of return types");
4154 odsState.addTypes(resultTypes);
4155}
4156
4157void BVShlOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4158 assert(operands.size() == 2u && "mismatched number of parameters");
4159 odsState.addOperands(operands);
4160 odsState.addAttributes(attributes);
4161
4162 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4163 if (::mlir::succeeded(BVShlOp::inferReturnTypes(odsBuilder.getContext(),
4164 odsState.location, operands,
4165 odsState.attributes.getDictionary(odsState.getContext()),
4166 odsState.getRawProperties(),
4167 odsState.regions, inferredReturnTypes))) {
4168 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4169 odsState.addTypes(inferredReturnTypes);
4170 } else {
4171 ::llvm::report_fatal_error("Failed to infer result type(s).");
4172 }
4173}
4174
4175::llvm::LogicalResult BVShlOp::verifyInvariantsImpl() {
4176 {
4177 unsigned index = 0; (void)index;
4178 auto valueGroup0 = getODSOperands(0);
4179
4180 for (auto v : valueGroup0) {
4181 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4182 return ::mlir::failure();
4183 }
4184 auto valueGroup1 = getODSOperands(1);
4185
4186 for (auto v : valueGroup1) {
4187 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4188 return ::mlir::failure();
4189 }
4190 }
4191 {
4192 unsigned index = 0; (void)index;
4193 auto valueGroup0 = getODSResults(0);
4194
4195 for (auto v : valueGroup0) {
4196 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
4197 return ::mlir::failure();
4198 }
4199 }
4200 return ::mlir::success();
4201}
4202
4203::llvm::LogicalResult BVShlOp::verifyInvariants() {
4204 return verifyInvariantsImpl();
4205}
4206
4207::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) {
4208 inferredReturnTypes.resize(1);
4209 ::mlir::Builder odsBuilder(context);
4210 if (operands.size() <= 0)
4211 return ::mlir::failure();
4212 ::mlir::Type odsInferredType0 = operands[0].getType();
4213 inferredReturnTypes[0] = odsInferredType0;
4214 return ::mlir::success();
4215}
4216
4217::mlir::ParseResult BVShlOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4218 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4219 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4220 (void)lhsOperandsLoc;
4221 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4222 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4223 (void)rhsOperandsLoc;
4224 ::mlir::Type resultRawType{};
4225 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
4226
4227 lhsOperandsLoc = parser.getCurrentLocation();
4228 if (parser.parseOperand(lhsRawOperand))
4229 return ::mlir::failure();
4230 if (parser.parseComma())
4231 return ::mlir::failure();
4232
4233 rhsOperandsLoc = parser.getCurrentLocation();
4234 if (parser.parseOperand(rhsRawOperand))
4235 return ::mlir::failure();
4236 {
4237 auto loc = parser.getCurrentLocation();(void)loc;
4238 if (parser.parseOptionalAttrDict(result.attributes))
4239 return ::mlir::failure();
4240 }
4241 if (parser.parseColon())
4242 return ::mlir::failure();
4243
4244 if (parser.parseType(resultRawType))
4245 return ::mlir::failure();
4246 result.addTypes(resultTypes);
4247 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
4248 return ::mlir::failure();
4249 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
4250 return ::mlir::failure();
4251 return ::mlir::success();
4252}
4253
4254void BVShlOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4255 _odsPrinter << ' ';
4256 _odsPrinter << getLhs();
4257 _odsPrinter << ",";
4258 _odsPrinter << ' ';
4259 _odsPrinter << getRhs();
4260 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4261 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4262 _odsPrinter << ' ' << ":";
4263 _odsPrinter << ' ';
4264 _odsPrinter << getResult().getType();
4265}
4266
4267void BVShlOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4268}
4269
4270} // namespace smt
4271} // namespace llzk
4272MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVShlOp)
4273
4274namespace llzk {
4275namespace smt {
4276
4277//===----------------------------------------------------------------------===//
4278// ::llzk::smt::BVUDivOp definitions
4279//===----------------------------------------------------------------------===//
4280
4281namespace detail {
4282} // namespace detail
4284
4285::llvm::LogicalResult BVUDivOpAdaptor::verify(::mlir::Location loc) {
4286 return ::mlir::success();
4287}
4288
4289void BVUDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4290 odsState.addOperands(lhs);
4291 odsState.addOperands(rhs);
4292 odsState.addTypes(result);
4293}
4294
4295void BVUDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
4296 odsState.addOperands(lhs);
4297 odsState.addOperands(rhs);
4298
4299 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4300 if (::mlir::succeeded(BVUDivOp::inferReturnTypes(odsBuilder.getContext(),
4301 odsState.location, odsState.operands,
4302 odsState.attributes.getDictionary(odsState.getContext()),
4303 odsState.getRawProperties(),
4304 odsState.regions, inferredReturnTypes)))
4305 odsState.addTypes(inferredReturnTypes);
4306 else
4307 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4308
4309}
4310
4311void BVUDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4312 odsState.addOperands(lhs);
4313 odsState.addOperands(rhs);
4314 assert(resultTypes.size() == 1u && "mismatched number of results");
4315 odsState.addTypes(resultTypes);
4316}
4317
4318void BVUDivOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4319 assert(operands.size() == 2u && "mismatched number of parameters");
4320 odsState.addOperands(operands);
4321 odsState.addAttributes(attributes);
4322 assert(resultTypes.size() == 1u && "mismatched number of return types");
4323 odsState.addTypes(resultTypes);
4324}
4325
4326void BVUDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4327 assert(operands.size() == 2u && "mismatched number of parameters");
4328 odsState.addOperands(operands);
4329 odsState.addAttributes(attributes);
4330
4331 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4332 if (::mlir::succeeded(BVUDivOp::inferReturnTypes(odsBuilder.getContext(),
4333 odsState.location, operands,
4334 odsState.attributes.getDictionary(odsState.getContext()),
4335 odsState.getRawProperties(),
4336 odsState.regions, inferredReturnTypes))) {
4337 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4338 odsState.addTypes(inferredReturnTypes);
4339 } else {
4340 ::llvm::report_fatal_error("Failed to infer result type(s).");
4341 }
4342}
4343
4344::llvm::LogicalResult BVUDivOp::verifyInvariantsImpl() {
4345 {
4346 unsigned index = 0; (void)index;
4347 auto valueGroup0 = getODSOperands(0);
4348
4349 for (auto v : valueGroup0) {
4350 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4351 return ::mlir::failure();
4352 }
4353 auto valueGroup1 = getODSOperands(1);
4354
4355 for (auto v : valueGroup1) {
4356 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4357 return ::mlir::failure();
4358 }
4359 }
4360 {
4361 unsigned index = 0; (void)index;
4362 auto valueGroup0 = getODSResults(0);
4363
4364 for (auto v : valueGroup0) {
4365 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
4366 return ::mlir::failure();
4367 }
4368 }
4369 return ::mlir::success();
4370}
4371
4372::llvm::LogicalResult BVUDivOp::verifyInvariants() {
4373 return verifyInvariantsImpl();
4374}
4375
4376::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) {
4377 inferredReturnTypes.resize(1);
4378 ::mlir::Builder odsBuilder(context);
4379 if (operands.size() <= 0)
4380 return ::mlir::failure();
4381 ::mlir::Type odsInferredType0 = operands[0].getType();
4382 inferredReturnTypes[0] = odsInferredType0;
4383 return ::mlir::success();
4384}
4385
4386::mlir::ParseResult BVUDivOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4387 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4388 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4389 (void)lhsOperandsLoc;
4390 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4391 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4392 (void)rhsOperandsLoc;
4393 ::mlir::Type resultRawType{};
4394 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
4395
4396 lhsOperandsLoc = parser.getCurrentLocation();
4397 if (parser.parseOperand(lhsRawOperand))
4398 return ::mlir::failure();
4399 if (parser.parseComma())
4400 return ::mlir::failure();
4401
4402 rhsOperandsLoc = parser.getCurrentLocation();
4403 if (parser.parseOperand(rhsRawOperand))
4404 return ::mlir::failure();
4405 {
4406 auto loc = parser.getCurrentLocation();(void)loc;
4407 if (parser.parseOptionalAttrDict(result.attributes))
4408 return ::mlir::failure();
4409 }
4410 if (parser.parseColon())
4411 return ::mlir::failure();
4412
4413 if (parser.parseType(resultRawType))
4414 return ::mlir::failure();
4415 result.addTypes(resultTypes);
4416 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
4417 return ::mlir::failure();
4418 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
4419 return ::mlir::failure();
4420 return ::mlir::success();
4421}
4422
4423void BVUDivOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4424 _odsPrinter << ' ';
4425 _odsPrinter << getLhs();
4426 _odsPrinter << ",";
4427 _odsPrinter << ' ';
4428 _odsPrinter << getRhs();
4429 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4430 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4431 _odsPrinter << ' ' << ":";
4432 _odsPrinter << ' ';
4433 _odsPrinter << getResult().getType();
4434}
4435
4436void BVUDivOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4437}
4438
4439} // namespace smt
4440} // namespace llzk
4441MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVUDivOp)
4442
4443namespace llzk {
4444namespace smt {
4445
4446//===----------------------------------------------------------------------===//
4447// ::llzk::smt::BVURemOp definitions
4448//===----------------------------------------------------------------------===//
4449
4450namespace detail {
4451} // namespace detail
4453
4454::llvm::LogicalResult BVURemOpAdaptor::verify(::mlir::Location loc) {
4455 return ::mlir::success();
4456}
4457
4458void BVURemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4459 odsState.addOperands(lhs);
4460 odsState.addOperands(rhs);
4461 odsState.addTypes(result);
4462}
4463
4464void BVURemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
4465 odsState.addOperands(lhs);
4466 odsState.addOperands(rhs);
4467
4468 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4469 if (::mlir::succeeded(BVURemOp::inferReturnTypes(odsBuilder.getContext(),
4470 odsState.location, odsState.operands,
4471 odsState.attributes.getDictionary(odsState.getContext()),
4472 odsState.getRawProperties(),
4473 odsState.regions, inferredReturnTypes)))
4474 odsState.addTypes(inferredReturnTypes);
4475 else
4476 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4477
4478}
4479
4480void BVURemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4481 odsState.addOperands(lhs);
4482 odsState.addOperands(rhs);
4483 assert(resultTypes.size() == 1u && "mismatched number of results");
4484 odsState.addTypes(resultTypes);
4485}
4486
4487void BVURemOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4488 assert(operands.size() == 2u && "mismatched number of parameters");
4489 odsState.addOperands(operands);
4490 odsState.addAttributes(attributes);
4491 assert(resultTypes.size() == 1u && "mismatched number of return types");
4492 odsState.addTypes(resultTypes);
4493}
4494
4495void BVURemOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4496 assert(operands.size() == 2u && "mismatched number of parameters");
4497 odsState.addOperands(operands);
4498 odsState.addAttributes(attributes);
4499
4500 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4501 if (::mlir::succeeded(BVURemOp::inferReturnTypes(odsBuilder.getContext(),
4502 odsState.location, operands,
4503 odsState.attributes.getDictionary(odsState.getContext()),
4504 odsState.getRawProperties(),
4505 odsState.regions, inferredReturnTypes))) {
4506 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4507 odsState.addTypes(inferredReturnTypes);
4508 } else {
4509 ::llvm::report_fatal_error("Failed to infer result type(s).");
4510 }
4511}
4512
4513::llvm::LogicalResult BVURemOp::verifyInvariantsImpl() {
4514 {
4515 unsigned index = 0; (void)index;
4516 auto valueGroup0 = getODSOperands(0);
4517
4518 for (auto v : valueGroup0) {
4519 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4520 return ::mlir::failure();
4521 }
4522 auto valueGroup1 = getODSOperands(1);
4523
4524 for (auto v : valueGroup1) {
4525 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4526 return ::mlir::failure();
4527 }
4528 }
4529 {
4530 unsigned index = 0; (void)index;
4531 auto valueGroup0 = getODSResults(0);
4532
4533 for (auto v : valueGroup0) {
4534 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
4535 return ::mlir::failure();
4536 }
4537 }
4538 return ::mlir::success();
4539}
4540
4541::llvm::LogicalResult BVURemOp::verifyInvariants() {
4542 return verifyInvariantsImpl();
4543}
4544
4545::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) {
4546 inferredReturnTypes.resize(1);
4547 ::mlir::Builder odsBuilder(context);
4548 if (operands.size() <= 0)
4549 return ::mlir::failure();
4550 ::mlir::Type odsInferredType0 = operands[0].getType();
4551 inferredReturnTypes[0] = odsInferredType0;
4552 return ::mlir::success();
4553}
4554
4555::mlir::ParseResult BVURemOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4556 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4557 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4558 (void)lhsOperandsLoc;
4559 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4560 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4561 (void)rhsOperandsLoc;
4562 ::mlir::Type resultRawType{};
4563 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
4564
4565 lhsOperandsLoc = parser.getCurrentLocation();
4566 if (parser.parseOperand(lhsRawOperand))
4567 return ::mlir::failure();
4568 if (parser.parseComma())
4569 return ::mlir::failure();
4570
4571 rhsOperandsLoc = parser.getCurrentLocation();
4572 if (parser.parseOperand(rhsRawOperand))
4573 return ::mlir::failure();
4574 {
4575 auto loc = parser.getCurrentLocation();(void)loc;
4576 if (parser.parseOptionalAttrDict(result.attributes))
4577 return ::mlir::failure();
4578 }
4579 if (parser.parseColon())
4580 return ::mlir::failure();
4581
4582 if (parser.parseType(resultRawType))
4583 return ::mlir::failure();
4584 result.addTypes(resultTypes);
4585 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
4586 return ::mlir::failure();
4587 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
4588 return ::mlir::failure();
4589 return ::mlir::success();
4590}
4591
4592void BVURemOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4593 _odsPrinter << ' ';
4594 _odsPrinter << getLhs();
4595 _odsPrinter << ",";
4596 _odsPrinter << ' ';
4597 _odsPrinter << getRhs();
4598 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4599 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4600 _odsPrinter << ' ' << ":";
4601 _odsPrinter << ' ';
4602 _odsPrinter << getResult().getType();
4603}
4604
4605void BVURemOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4606}
4607
4608} // namespace smt
4609} // namespace llzk
4610MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVURemOp)
4611
4612namespace llzk {
4613namespace smt {
4614
4615//===----------------------------------------------------------------------===//
4616// ::llzk::smt::BVXOrOp definitions
4617//===----------------------------------------------------------------------===//
4618
4619namespace detail {
4620} // namespace detail
4622
4623::llvm::LogicalResult BVXOrOpAdaptor::verify(::mlir::Location loc) {
4624 return ::mlir::success();
4625}
4626
4627void BVXOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4628 odsState.addOperands(lhs);
4629 odsState.addOperands(rhs);
4630 odsState.addTypes(result);
4631}
4632
4633void BVXOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
4634 odsState.addOperands(lhs);
4635 odsState.addOperands(rhs);
4636
4637 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4638 if (::mlir::succeeded(BVXOrOp::inferReturnTypes(odsBuilder.getContext(),
4639 odsState.location, odsState.operands,
4640 odsState.attributes.getDictionary(odsState.getContext()),
4641 odsState.getRawProperties(),
4642 odsState.regions, inferredReturnTypes)))
4643 odsState.addTypes(inferredReturnTypes);
4644 else
4645 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4646
4647}
4648
4649void BVXOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4650 odsState.addOperands(lhs);
4651 odsState.addOperands(rhs);
4652 assert(resultTypes.size() == 1u && "mismatched number of results");
4653 odsState.addTypes(resultTypes);
4654}
4655
4656void BVXOrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4657 assert(operands.size() == 2u && "mismatched number of parameters");
4658 odsState.addOperands(operands);
4659 odsState.addAttributes(attributes);
4660 assert(resultTypes.size() == 1u && "mismatched number of return types");
4661 odsState.addTypes(resultTypes);
4662}
4663
4664void BVXOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4665 assert(operands.size() == 2u && "mismatched number of parameters");
4666 odsState.addOperands(operands);
4667 odsState.addAttributes(attributes);
4668
4669 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4670 if (::mlir::succeeded(BVXOrOp::inferReturnTypes(odsBuilder.getContext(),
4671 odsState.location, operands,
4672 odsState.attributes.getDictionary(odsState.getContext()),
4673 odsState.getRawProperties(),
4674 odsState.regions, inferredReturnTypes))) {
4675 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4676 odsState.addTypes(inferredReturnTypes);
4677 } else {
4678 ::llvm::report_fatal_error("Failed to infer result type(s).");
4679 }
4680}
4681
4682::llvm::LogicalResult BVXOrOp::verifyInvariantsImpl() {
4683 {
4684 unsigned index = 0; (void)index;
4685 auto valueGroup0 = getODSOperands(0);
4686
4687 for (auto v : valueGroup0) {
4688 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4689 return ::mlir::failure();
4690 }
4691 auto valueGroup1 = getODSOperands(1);
4692
4693 for (auto v : valueGroup1) {
4694 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
4695 return ::mlir::failure();
4696 }
4697 }
4698 {
4699 unsigned index = 0; (void)index;
4700 auto valueGroup0 = getODSResults(0);
4701
4702 for (auto v : valueGroup0) {
4703 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
4704 return ::mlir::failure();
4705 }
4706 }
4707 return ::mlir::success();
4708}
4709
4710::llvm::LogicalResult BVXOrOp::verifyInvariants() {
4711 return verifyInvariantsImpl();
4712}
4713
4714::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) {
4715 inferredReturnTypes.resize(1);
4716 ::mlir::Builder odsBuilder(context);
4717 if (operands.size() <= 0)
4718 return ::mlir::failure();
4719 ::mlir::Type odsInferredType0 = operands[0].getType();
4720 inferredReturnTypes[0] = odsInferredType0;
4721 return ::mlir::success();
4722}
4723
4724::mlir::ParseResult BVXOrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4725 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4726 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4727 (void)lhsOperandsLoc;
4728 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4729 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4730 (void)rhsOperandsLoc;
4731 ::mlir::Type resultRawType{};
4732 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
4733
4734 lhsOperandsLoc = parser.getCurrentLocation();
4735 if (parser.parseOperand(lhsRawOperand))
4736 return ::mlir::failure();
4737 if (parser.parseComma())
4738 return ::mlir::failure();
4739
4740 rhsOperandsLoc = parser.getCurrentLocation();
4741 if (parser.parseOperand(rhsRawOperand))
4742 return ::mlir::failure();
4743 {
4744 auto loc = parser.getCurrentLocation();(void)loc;
4745 if (parser.parseOptionalAttrDict(result.attributes))
4746 return ::mlir::failure();
4747 }
4748 if (parser.parseColon())
4749 return ::mlir::failure();
4750
4751 if (parser.parseType(resultRawType))
4752 return ::mlir::failure();
4753 result.addTypes(resultTypes);
4754 if (parser.resolveOperands(lhsOperands, resultTypes[0], lhsOperandsLoc, result.operands))
4755 return ::mlir::failure();
4756 if (parser.resolveOperands(rhsOperands, resultTypes[0], rhsOperandsLoc, result.operands))
4757 return ::mlir::failure();
4758 return ::mlir::success();
4759}
4760
4761void BVXOrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4762 _odsPrinter << ' ';
4763 _odsPrinter << getLhs();
4764 _odsPrinter << ",";
4765 _odsPrinter << ' ';
4766 _odsPrinter << getRhs();
4767 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4768 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4769 _odsPrinter << ' ' << ":";
4770 _odsPrinter << ' ';
4771 _odsPrinter << getResult().getType();
4772}
4773
4774void BVXOrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4775}
4776
4777} // namespace smt
4778} // namespace llzk
4779MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BVXOrOp)
4780
4781namespace llzk {
4782namespace smt {
4783
4784//===----------------------------------------------------------------------===//
4785// ::llzk::smt::BoolConstantOp definitions
4786//===----------------------------------------------------------------------===//
4787
4788namespace detail {
4790
4792 auto attr = getValueAttr();
4793 return attr.getValue();
4794}
4795
4796} // namespace detail
4798
4799::llvm::LogicalResult BoolConstantOpAdaptor::verify(::mlir::Location loc) {
4800 auto tblgen_value = getProperties().value; (void)tblgen_value;
4801 if (!tblgen_value) return emitError(loc, "'smt.constant' op ""requires attribute 'value'");
4802
4803 if (tblgen_value && !((::llvm::isa<::mlir::BoolAttr>(tblgen_value))))
4804 return emitError(loc, "'smt.constant' op ""attribute 'value' failed to satisfy constraint: bool attribute");
4805 return ::mlir::success();
4806}
4807
4808::llvm::LogicalResult BoolConstantOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4809 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
4810 if (!dict) {
4811 emitError() << "expected DictionaryAttr to set properties";
4812 return ::mlir::failure();
4813 }
4814
4815 {
4816 auto &propStorage = prop.value;
4817 auto attr = dict.get("value");
4818 if (attr) {
4819 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
4820 if (convertedAttr) {
4821 propStorage = convertedAttr;
4822 } else {
4823 emitError() << "Invalid attribute `value` in property conversion: " << attr;
4824 return ::mlir::failure();
4825 }
4826 }
4827 }
4828 return ::mlir::success();
4829}
4830
4831::mlir::Attribute BoolConstantOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4832 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4833 ::mlir::Builder odsBuilder{ctx};
4834
4835 {
4836 const auto &propStorage = prop.value;
4837 if (propStorage)
4838 attrs.push_back(odsBuilder.getNamedAttr("value",
4839 propStorage));
4840 }
4841
4842 if (!attrs.empty())
4843 return odsBuilder.getDictionaryAttr(attrs);
4844 return {};
4845}
4846
4848 return llvm::hash_combine(
4849 llvm::hash_value(prop.value.getAsOpaquePointer()));
4850}
4851
4852std::optional<mlir::Attribute> BoolConstantOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4853 if (name == "value")
4854 return prop.value;
4855 return std::nullopt;
4856}
4857
4858void BoolConstantOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4859 if (name == "value") {
4860 prop.value = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.value)>>(value);
4861 return;
4862 }
4863}
4864
4865void BoolConstantOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
4866 if (prop.value) attrs.append("value", prop.value);
4867}
4868
4869::llvm::LogicalResult BoolConstantOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4870 {
4871 ::mlir::Attribute attr = attrs.get(getValueAttrName(opName));
4872 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT4(attr, "value", emitError)))
4873 return ::mlir::failure();
4874 }
4875 return ::mlir::success();
4876}
4877
4878::llvm::LogicalResult BoolConstantOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
4879 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
4880 if (::mlir::failed(reader.readAttribute(prop.value)))
4881 return ::mlir::failure();
4882 return ::mlir::success();
4883}
4884
4885void BoolConstantOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
4886 auto &prop = getProperties(); (void)prop;
4887 writer.writeAttribute(prop.value);
4888}
4889
4891 auto attr = getValueAttr();
4892 return attr.getValue();
4893}
4894
4895void BoolConstantOp::setValue(bool attrValue) {
4896 getProperties().value = ::mlir::Builder((*this)->getContext()).getBoolAttr(attrValue);
4897}
4898
4899void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::BoolAttr value) {
4900 odsState.getOrAddProperties<Properties>().value = value;
4901 odsState.addTypes(result);
4902}
4903
4904void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::BoolAttr value) {
4905 odsState.getOrAddProperties<Properties>().value = value;
4906
4907 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4908 if (::mlir::succeeded(BoolConstantOp::inferReturnTypes(odsBuilder.getContext(),
4909 odsState.location, odsState.operands,
4910 odsState.attributes.getDictionary(odsState.getContext()),
4911 odsState.getRawProperties(),
4912 odsState.regions, inferredReturnTypes)))
4913 odsState.addTypes(inferredReturnTypes);
4914 else
4915 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4916
4917}
4918
4919void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::BoolAttr value) {
4920 odsState.getOrAddProperties<Properties>().value = value;
4921 assert(resultTypes.size() == 1u && "mismatched number of results");
4922 odsState.addTypes(resultTypes);
4923}
4924
4925void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, bool value) {
4926 odsState.getOrAddProperties<Properties>().value = odsBuilder.getBoolAttr(value);
4927 odsState.addTypes(result);
4928}
4929
4930void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, bool value) {
4931 odsState.getOrAddProperties<Properties>().value = odsBuilder.getBoolAttr(value);
4932
4933 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4934 if (::mlir::succeeded(BoolConstantOp::inferReturnTypes(odsBuilder.getContext(),
4935 odsState.location, odsState.operands,
4936 odsState.attributes.getDictionary(odsState.getContext()),
4937 odsState.getRawProperties(),
4938 odsState.regions, inferredReturnTypes)))
4939 odsState.addTypes(inferredReturnTypes);
4940 else
4941 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4942
4943}
4944
4945void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool value) {
4946 odsState.getOrAddProperties<Properties>().value = odsBuilder.getBoolAttr(value);
4947 assert(resultTypes.size() == 1u && "mismatched number of results");
4948 odsState.addTypes(resultTypes);
4949}
4950
4951void BoolConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4952 assert(operands.size() == 0u && "mismatched number of parameters");
4953 odsState.addOperands(operands);
4954 odsState.addAttributes(attributes);
4955 assert(resultTypes.size() == 1u && "mismatched number of return types");
4956 odsState.addTypes(resultTypes);
4957
4958 if (!attributes.empty()) {
4959 ::mlir::OpaqueProperties properties =
4960 &odsState.getOrAddProperties<BoolConstantOp::Properties>();
4961 std::optional<::mlir::RegisteredOperationName> info =
4962 odsState.name.getRegisteredInfo();
4963 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
4964 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
4965 ::llvm::report_fatal_error("Property conversion failed.");
4966 }
4967}
4968
4969void BoolConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4970 assert(operands.size() == 0u && "mismatched number of parameters");
4971 odsState.addOperands(operands);
4972 odsState.addAttributes(attributes);
4973
4974 if (!attributes.empty()) {
4975 ::mlir::OpaqueProperties properties =
4976 &odsState.getOrAddProperties<BoolConstantOp::Properties>();
4977 std::optional<::mlir::RegisteredOperationName> info =
4978 odsState.name.getRegisteredInfo();
4979 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
4980 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
4981 ::llvm::report_fatal_error("Property conversion failed.");
4982 }
4983 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4984 if (::mlir::succeeded(BoolConstantOp::inferReturnTypes(odsBuilder.getContext(),
4985 odsState.location, operands,
4986 odsState.attributes.getDictionary(odsState.getContext()),
4987 odsState.getRawProperties(),
4988 odsState.regions, inferredReturnTypes))) {
4989 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
4990 odsState.addTypes(inferredReturnTypes);
4991 } else {
4992 ::llvm::report_fatal_error("Failed to infer result type(s).");
4993 }
4994}
4995
4997 auto tblgen_value = getProperties().value; (void)tblgen_value;
4998 if (!tblgen_value) return emitOpError("requires attribute 'value'");
4999
5000 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT4(*this, tblgen_value, "value")))
5001 return ::mlir::failure();
5002 {
5003 unsigned index = 0; (void)index;
5004 auto valueGroup0 = getODSResults(0);
5005
5006 for (auto v : valueGroup0) {
5007 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
5008 return ::mlir::failure();
5009 }
5010 }
5011 return ::mlir::success();
5012}
5013
5014::llvm::LogicalResult BoolConstantOp::verifyInvariants() {
5015 return verifyInvariantsImpl();
5016}
5017
5018::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) {
5019 inferredReturnTypes.resize(1);
5020 ::mlir::Builder odsBuilder(context);
5021 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
5022 inferredReturnTypes[0] = odsInferredType0;
5023 return ::mlir::success();
5024}
5025
5026::mlir::ParseResult BoolConstantOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5027 ::mlir::BoolAttr valueAttr;
5028
5029 if (parser.parseCustomAttributeWithFallback(valueAttr, parser.getBuilder().getIntegerType(1))) {
5030 return ::mlir::failure();
5031 }
5032 if (valueAttr) result.getOrAddProperties<BoolConstantOp::Properties>().value = valueAttr;
5033 {
5034 auto loc = parser.getCurrentLocation();(void)loc;
5035 if (parser.parseOptionalAttrDict(result.attributes))
5036 return ::mlir::failure();
5037 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
5038 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
5039 })))
5040 return ::mlir::failure();
5041 }
5042 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
5043 result.addTypes(odsBuildableType0);
5044 return ::mlir::success();
5045}
5046
5047void BoolConstantOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
5048 _odsPrinter << ' ';
5049 _odsPrinter.printAttributeWithoutType(getValueAttr());
5050 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5051 elidedAttrs.push_back("value");
5052 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5053}
5054
5055void BoolConstantOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5056}
5057
5058} // namespace smt
5059} // namespace llzk
5060MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::BoolConstantOp)
5061
5062namespace llzk {
5063namespace smt {
5064
5065//===----------------------------------------------------------------------===//
5066// ::llzk::smt::CheckOp definitions
5067//===----------------------------------------------------------------------===//
5068
5069namespace detail {
5070} // namespace detail
5072
5073::llvm::LogicalResult CheckOpAdaptor::verify(::mlir::Location loc) {
5074 return ::mlir::success();
5075}
5076
5077std::pair<unsigned, unsigned> CheckOp::getODSResultIndexAndLength(unsigned index) {
5078 bool isVariadic[] = {true};
5079 int prevVariadicCount = 0;
5080 for (unsigned i = 0; i < index; ++i)
5081 if (isVariadic[i]) ++prevVariadicCount;
5082
5083 // Calculate how many dynamic values a static variadic operand corresponds to.
5084 // This assumes all static variadic operands have the same dynamic value count.
5085 int variadicSize = (getOperation()->getNumResults() - 0) / 1;
5086 // `index` passed in as the parameter is the static index which counts each
5087 // operand (variadic or not) as size 1. So here for each previous static variadic
5088 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5089 // value pack for this static operand starts.
5090 int start = index + (variadicSize - 1) * prevVariadicCount;
5091 int size = isVariadic[index] ? variadicSize : 1;
5092 return {start, size};
5093}
5094
5095void CheckOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange results) {
5096 (void)odsState.addRegion();
5097 (void)odsState.addRegion();
5098 (void)odsState.addRegion();
5099 odsState.addTypes(results);
5100}
5101
5102void CheckOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5103 assert(operands.size() == 0u && "mismatched number of parameters");
5104 odsState.addOperands(operands);
5105 odsState.addAttributes(attributes);
5106 for (unsigned i = 0; i != 3; ++i)
5107 (void)odsState.addRegion();
5108 odsState.addTypes(resultTypes);
5109}
5110
5111::llvm::LogicalResult CheckOp::verifyInvariantsImpl() {
5112 {
5113 unsigned index = 0; (void)index;
5114 auto valueGroup0 = getODSResults(0);
5115
5116 for (auto v : valueGroup0) {
5117 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT10(*this, v.getType(), "result", index++)))
5118 return ::mlir::failure();
5119 }
5120 }
5121 {
5122 unsigned index = 0; (void)index;
5123
5124 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
5125 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "satRegion", index++)))
5126 return ::mlir::failure();
5127
5128 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(1)))
5129 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "unknownRegion", index++)))
5130 return ::mlir::failure();
5131
5132 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(2)))
5133 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "unsatRegion", index++)))
5134 return ::mlir::failure();
5135 }
5136 return ::mlir::success();
5137}
5138
5139::llvm::LogicalResult CheckOp::verifyInvariants() {
5140 return verifyInvariantsImpl();
5141}
5142
5143::mlir::ParseResult CheckOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5144 std::unique_ptr<::mlir::Region> satRegionRegion = std::make_unique<::mlir::Region>();
5145 std::unique_ptr<::mlir::Region> unknownRegionRegion = std::make_unique<::mlir::Region>();
5146 std::unique_ptr<::mlir::Region> unsatRegionRegion = std::make_unique<::mlir::Region>();
5147 ::llvm::SmallVector<::mlir::Type, 1> resultsTypes;
5148 {
5149 auto loc = parser.getCurrentLocation();(void)loc;
5150 if (parser.parseOptionalAttrDict(result.attributes))
5151 return ::mlir::failure();
5152 }
5153 if (parser.parseKeyword("sat"))
5154 return ::mlir::failure();
5155
5156 if (parser.parseRegion(*satRegionRegion))
5157 return ::mlir::failure();
5158
5159 ensureTerminator(*satRegionRegion, parser.getBuilder(), result.location);
5160 if (parser.parseKeyword("unknown"))
5161 return ::mlir::failure();
5162
5163 if (parser.parseRegion(*unknownRegionRegion))
5164 return ::mlir::failure();
5165
5166 ensureTerminator(*unknownRegionRegion, parser.getBuilder(), result.location);
5167 if (parser.parseKeyword("unsat"))
5168 return ::mlir::failure();
5169
5170 if (parser.parseRegion(*unsatRegionRegion))
5171 return ::mlir::failure();
5172
5173 ensureTerminator(*unsatRegionRegion, parser.getBuilder(), result.location);
5174 if (::mlir::succeeded(parser.parseOptionalArrow())) {
5175
5176 if (parser.parseTypeList(resultsTypes))
5177 return ::mlir::failure();
5178 }
5179 result.addRegion(std::move(satRegionRegion));
5180 result.addRegion(std::move(unknownRegionRegion));
5181 result.addRegion(std::move(unsatRegionRegion));
5182 result.addTypes(resultsTypes);
5183 return ::mlir::success();
5184}
5185
5186void CheckOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
5187 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5188 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5189 _odsPrinter << ' ' << "sat";
5190 _odsPrinter << ' ';
5191
5192 {
5193 bool printTerminator = true;
5194 if (auto *term = getSatRegion().empty() ? nullptr : getSatRegion().begin()->getTerminator()) {
5195 printTerminator = !term->getAttrDictionary().empty() ||
5196 term->getNumOperands() != 0 ||
5197 term->getNumResults() != 0;
5198 }
5199 _odsPrinter.printRegion(getSatRegion(), /*printEntryBlockArgs=*/true,
5200 /*printBlockTerminators=*/printTerminator);
5201 }
5202 _odsPrinter << ' ' << "unknown";
5203 _odsPrinter << ' ';
5204
5205 {
5206 bool printTerminator = true;
5207 if (auto *term = getUnknownRegion().empty() ? nullptr : getUnknownRegion().begin()->getTerminator()) {
5208 printTerminator = !term->getAttrDictionary().empty() ||
5209 term->getNumOperands() != 0 ||
5210 term->getNumResults() != 0;
5211 }
5212 _odsPrinter.printRegion(getUnknownRegion(), /*printEntryBlockArgs=*/true,
5213 /*printBlockTerminators=*/printTerminator);
5214 }
5215 _odsPrinter << ' ' << "unsat";
5216 _odsPrinter << ' ';
5217
5218 {
5219 bool printTerminator = true;
5220 if (auto *term = getUnsatRegion().empty() ? nullptr : getUnsatRegion().begin()->getTerminator()) {
5221 printTerminator = !term->getAttrDictionary().empty() ||
5222 term->getNumOperands() != 0 ||
5223 term->getNumResults() != 0;
5224 }
5225 _odsPrinter.printRegion(getUnsatRegion(), /*printEntryBlockArgs=*/true,
5226 /*printBlockTerminators=*/printTerminator);
5227 }
5228 if (!getResults().empty()) {
5229 _odsPrinter << ' ' << "->";
5230 _odsPrinter << ' ';
5231 _odsPrinter << getResults().getTypes();
5232 }
5233}
5234
5235} // namespace smt
5236} // namespace llzk
5237MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::CheckOp)
5238
5239namespace llzk {
5240namespace smt {
5241
5242//===----------------------------------------------------------------------===//
5243// ::llzk::smt::ConcatOp definitions
5244//===----------------------------------------------------------------------===//
5245
5246namespace detail {
5247} // namespace detail
5249
5250::llvm::LogicalResult ConcatOpAdaptor::verify(::mlir::Location loc) {
5251 return ::mlir::success();
5252}
5253
5254void ConcatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
5255 odsState.addOperands(lhs);
5256 odsState.addOperands(rhs);
5257 odsState.addTypes(result);
5258}
5259
5260void ConcatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
5261 odsState.addOperands(lhs);
5262 odsState.addOperands(rhs);
5263
5264 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5265 if (::mlir::succeeded(ConcatOp::inferReturnTypes(odsBuilder.getContext(),
5266 odsState.location, odsState.operands,
5267 odsState.attributes.getDictionary(odsState.getContext()),
5268 odsState.getRawProperties(),
5269 odsState.regions, inferredReturnTypes)))
5270 odsState.addTypes(inferredReturnTypes);
5271 else
5272 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
5273
5274}
5275
5276void ConcatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
5277 odsState.addOperands(lhs);
5278 odsState.addOperands(rhs);
5279 assert(resultTypes.size() == 1u && "mismatched number of results");
5280 odsState.addTypes(resultTypes);
5281}
5282
5283void ConcatOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5284 assert(operands.size() == 2u && "mismatched number of parameters");
5285 odsState.addOperands(operands);
5286 odsState.addAttributes(attributes);
5287 assert(resultTypes.size() == 1u && "mismatched number of return types");
5288 odsState.addTypes(resultTypes);
5289}
5290
5291void ConcatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5292 assert(operands.size() == 2u && "mismatched number of parameters");
5293 odsState.addOperands(operands);
5294 odsState.addAttributes(attributes);
5295
5296 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5297 if (::mlir::succeeded(ConcatOp::inferReturnTypes(odsBuilder.getContext(),
5298 odsState.location, operands,
5299 odsState.attributes.getDictionary(odsState.getContext()),
5300 odsState.getRawProperties(),
5301 odsState.regions, inferredReturnTypes))) {
5302 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
5303 odsState.addTypes(inferredReturnTypes);
5304 } else {
5305 ::llvm::report_fatal_error("Failed to infer result type(s).");
5306 }
5307}
5308
5309::llvm::LogicalResult ConcatOp::verifyInvariantsImpl() {
5310 {
5311 unsigned index = 0; (void)index;
5312 auto valueGroup0 = getODSOperands(0);
5313
5314 for (auto v : valueGroup0) {
5315 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
5316 return ::mlir::failure();
5317 }
5318 auto valueGroup1 = getODSOperands(1);
5319
5320 for (auto v : valueGroup1) {
5321 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
5322 return ::mlir::failure();
5323 }
5324 }
5325 {
5326 unsigned index = 0; (void)index;
5327 auto valueGroup0 = getODSResults(0);
5328
5329 for (auto v : valueGroup0) {
5330 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
5331 return ::mlir::failure();
5332 }
5333 }
5334 return ::mlir::success();
5335}
5336
5337::llvm::LogicalResult ConcatOp::verifyInvariants() {
5338 return verifyInvariantsImpl();
5339}
5340
5341::mlir::ParseResult ConcatOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5342 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
5343 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
5344 (void)lhsOperandsLoc;
5345 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
5346 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
5347 (void)rhsOperandsLoc;
5348 ::llvm::SmallVector<::mlir::Type, 1> allOperandTypes;
5349
5350 lhsOperandsLoc = parser.getCurrentLocation();
5351 if (parser.parseOperand(lhsRawOperand))
5352 return ::mlir::failure();
5353 if (parser.parseComma())
5354 return ::mlir::failure();
5355
5356 rhsOperandsLoc = parser.getCurrentLocation();
5357 if (parser.parseOperand(rhsRawOperand))
5358 return ::mlir::failure();
5359 {
5360 auto loc = parser.getCurrentLocation();(void)loc;
5361 if (parser.parseOptionalAttrDict(result.attributes))
5362 return ::mlir::failure();
5363 }
5364 if (parser.parseColon())
5365 return ::mlir::failure();
5366
5367 if (parser.parseTypeList(allOperandTypes))
5368 return ::mlir::failure();
5369 if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(lhsOperands, rhsOperands), allOperandTypes, parser.getNameLoc(), result.operands))
5370 return ::mlir::failure();
5371
5372 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
5373 if (::mlir::failed(ConcatOp::inferReturnTypes(parser.getContext(),
5374 result.location, result.operands,
5375 result.attributes.getDictionary(parser.getContext()),
5376 result.getRawProperties(),
5377 result.regions, inferredReturnTypes)))
5378 return ::mlir::failure();
5379 result.addTypes(inferredReturnTypes);
5380 return ::mlir::success();
5381}
5382
5383void ConcatOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
5384 _odsPrinter << ' ';
5385 _odsPrinter << getLhs();
5386 _odsPrinter << ",";
5387 _odsPrinter << ' ';
5388 _odsPrinter << getRhs();
5389 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5390 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5391 _odsPrinter << ' ' << ":";
5392 _odsPrinter << ' ';
5393 _odsPrinter << getOperation()->getOperandTypes();
5394}
5395
5396void ConcatOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5397}
5398
5399} // namespace smt
5400} // namespace llzk
5401MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ConcatOp)
5402
5403namespace llzk {
5404namespace smt {
5405
5406//===----------------------------------------------------------------------===//
5407// ::llzk::smt::DeclareFunOp definitions
5408//===----------------------------------------------------------------------===//
5409
5410namespace detail {
5411DeclareFunOpGenericAdaptorBase::DeclareFunOpGenericAdaptorBase(DeclareFunOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
5412
5413::std::optional< ::llvm::StringRef > DeclareFunOpGenericAdaptorBase::getNamePrefix() {
5414 auto attr = getNamePrefixAttr();
5415 return attr ? ::std::optional< ::llvm::StringRef >(attr.getValue()) : (::std::nullopt);
5416}
5417
5418} // namespace detail
5420
5421::llvm::LogicalResult DeclareFunOpAdaptor::verify(::mlir::Location loc) {
5422 auto tblgen_namePrefix = getProperties().namePrefix; (void)tblgen_namePrefix;
5423
5424 if (tblgen_namePrefix && !((::llvm::isa<::mlir::StringAttr>(tblgen_namePrefix))))
5425 return emitError(loc, "'smt.declare_fun' op ""attribute 'namePrefix' failed to satisfy constraint: string attribute");
5426 return ::mlir::success();
5427}
5428
5429::llvm::LogicalResult DeclareFunOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5430 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
5431 if (!dict) {
5432 emitError() << "expected DictionaryAttr to set properties";
5433 return ::mlir::failure();
5434 }
5435
5436 {
5437 auto &propStorage = prop.namePrefix;
5438 auto attr = dict.get("namePrefix");
5439 if (attr) {
5440 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
5441 if (convertedAttr) {
5442 propStorage = convertedAttr;
5443 } else {
5444 emitError() << "Invalid attribute `namePrefix` in property conversion: " << attr;
5445 return ::mlir::failure();
5446 }
5447 }
5448 }
5449 return ::mlir::success();
5450}
5451
5452::mlir::Attribute DeclareFunOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
5453 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5454 ::mlir::Builder odsBuilder{ctx};
5455
5456 {
5457 const auto &propStorage = prop.namePrefix;
5458 if (propStorage)
5459 attrs.push_back(odsBuilder.getNamedAttr("namePrefix",
5460 propStorage));
5461 }
5462
5463 if (!attrs.empty())
5464 return odsBuilder.getDictionaryAttr(attrs);
5465 return {};
5466}
5467
5469 return llvm::hash_combine(
5470 llvm::hash_value(prop.namePrefix.getAsOpaquePointer()));
5471}
5472
5473std::optional<mlir::Attribute> DeclareFunOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
5474 if (name == "namePrefix")
5475 return prop.namePrefix;
5476 return std::nullopt;
5477}
5478
5479void DeclareFunOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
5480 if (name == "namePrefix") {
5481 prop.namePrefix = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.namePrefix)>>(value);
5482 return;
5483 }
5484}
5485
5486void DeclareFunOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
5487 if (prop.namePrefix) attrs.append("namePrefix", prop.namePrefix);
5488}
5489
5490::llvm::LogicalResult DeclareFunOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5491 {
5492 ::mlir::Attribute attr = attrs.get(getNamePrefixAttrName(opName));
5493 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT5(attr, "namePrefix", emitError)))
5494 return ::mlir::failure();
5495 }
5496 return ::mlir::success();
5497}
5498
5499::llvm::LogicalResult DeclareFunOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
5500 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
5501 if (::mlir::failed(reader.readOptionalAttribute(prop.namePrefix)))
5502 return ::mlir::failure();
5503 return ::mlir::success();
5504}
5505
5506void DeclareFunOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
5507 auto &prop = getProperties(); (void)prop;
5508
5509 writer.writeOptionalAttribute(prop.namePrefix);
5510}
5511
5512::std::optional< ::llvm::StringRef > DeclareFunOp::getNamePrefix() {
5513 auto attr = getNamePrefixAttr();
5514 return attr ? ::std::optional< ::llvm::StringRef >(attr.getValue()) : (::std::nullopt);
5515}
5516
5517void DeclareFunOp::setNamePrefix(::std::optional<::llvm::StringRef> attrValue) {
5518 auto &odsProp = getProperties().namePrefix;
5519 if (attrValue)
5520 odsProp = ::mlir::Builder((*this)->getContext()).getStringAttr(*attrValue);
5521 else
5522 odsProp = nullptr;
5523}
5524
5525void DeclareFunOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Type type) {
5526 build(odsBuilder, odsState, type, nullptr);
5527
5528}
5529
5530void DeclareFunOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, /*optional*/::mlir::StringAttr namePrefix) {
5531 if (namePrefix) {
5532 odsState.getOrAddProperties<Properties>().namePrefix = namePrefix;
5533 }
5534 odsState.addTypes(result);
5535}
5536
5537void DeclareFunOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::StringAttr namePrefix) {
5538 if (namePrefix) {
5539 odsState.getOrAddProperties<Properties>().namePrefix = namePrefix;
5540 }
5541 assert(resultTypes.size() == 1u && "mismatched number of results");
5542 odsState.addTypes(resultTypes);
5543}
5544
5545void DeclareFunOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5546 assert(operands.size() == 0u && "mismatched number of parameters");
5547 odsState.addOperands(operands);
5548 odsState.addAttributes(attributes);
5549 assert(resultTypes.size() == 1u && "mismatched number of return types");
5550 odsState.addTypes(resultTypes);
5551
5552 if (!attributes.empty()) {
5553 ::mlir::OpaqueProperties properties =
5554 &odsState.getOrAddProperties<DeclareFunOp::Properties>();
5555 std::optional<::mlir::RegisteredOperationName> info =
5556 odsState.name.getRegisteredInfo();
5557 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
5558 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
5559 ::llvm::report_fatal_error("Property conversion failed.");
5560 }
5561}
5562
5563::llvm::LogicalResult DeclareFunOp::verifyInvariantsImpl() {
5564 auto tblgen_namePrefix = getProperties().namePrefix; (void)tblgen_namePrefix;
5565
5566 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT5(*this, tblgen_namePrefix, "namePrefix")))
5567 return ::mlir::failure();
5568 {
5569 unsigned index = 0; (void)index;
5570 auto valueGroup0 = getODSResults(0);
5571
5572 for (auto v : valueGroup0) {
5573 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "result", index++)))
5574 return ::mlir::failure();
5575 }
5576 }
5577 return ::mlir::success();
5578}
5579
5580::llvm::LogicalResult DeclareFunOp::verifyInvariants() {
5581 return verifyInvariantsImpl();
5582}
5583
5584::mlir::ParseResult DeclareFunOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5585 ::mlir::StringAttr namePrefixAttr;
5586 ::mlir::Type resultRawType{};
5587 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
5588
5589 ::mlir::OptionalParseResult parseResultnamePrefixAttr =
5590 parser.parseOptionalAttribute(namePrefixAttr, parser.getBuilder().getType<::mlir::NoneType>());
5591 if (parseResultnamePrefixAttr.has_value() && failed(*parseResultnamePrefixAttr))
5592 return ::mlir::failure();
5593 if (parseResultnamePrefixAttr.has_value() && succeeded(*parseResultnamePrefixAttr))
5594 if (namePrefixAttr) result.getOrAddProperties<DeclareFunOp::Properties>().namePrefix = namePrefixAttr;
5595 if (namePrefixAttr) {
5596 }
5597 {
5598 auto loc = parser.getCurrentLocation();(void)loc;
5599 if (parser.parseOptionalAttrDict(result.attributes))
5600 return ::mlir::failure();
5601 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
5602 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
5603 })))
5604 return ::mlir::failure();
5605 }
5606 if (parser.parseColon())
5607 return ::mlir::failure();
5608
5609 if (parser.parseType(resultRawType))
5610 return ::mlir::failure();
5611 result.addTypes(resultTypes);
5612 return ::mlir::success();
5613}
5614
5615void DeclareFunOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
5616 if (getNamePrefixAttr()) {
5617 _odsPrinter << ' ';
5618 _odsPrinter.printAttributeWithoutType(getNamePrefixAttr());
5619 }
5620 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5621 elidedAttrs.push_back("namePrefix");
5622 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5623 _odsPrinter << ' ' << ":";
5624 _odsPrinter << ' ';
5625 _odsPrinter << getResult().getType();
5626}
5627
5628void DeclareFunOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5629 {
5630 auto valueRange = getODSResultIndexAndLength(0);
5631 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
5632 effects.emplace_back(::mlir::MemoryEffects::Allocate::get(), getOperation()->getOpResult(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
5633 }
5634 }
5635}
5636
5637} // namespace smt
5638} // namespace llzk
5639MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::DeclareFunOp)
5640
5641namespace llzk {
5642namespace smt {
5643
5644//===----------------------------------------------------------------------===//
5645// ::llzk::smt::DistinctOp definitions
5646//===----------------------------------------------------------------------===//
5647
5648namespace detail {
5649std::pair<unsigned, unsigned> DistinctOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
5650 bool isVariadic[] = {true};
5651 int prevVariadicCount = 0;
5652 for (unsigned i = 0; i < index; ++i)
5653 if (isVariadic[i]) ++prevVariadicCount;
5654
5655 // Calculate how many dynamic values a static variadic operand corresponds to.
5656 // This assumes all static variadic operands have the same dynamic value count.
5657 int variadicSize = (odsOperandsSize - 0) / 1;
5658 // `index` passed in as the parameter is the static index which counts each
5659 // operand (variadic or not) as size 1. So here for each previous static variadic
5660 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5661 // value pack for this static operand starts.
5662 int start = index + (variadicSize - 1) * prevVariadicCount;
5663 int size = isVariadic[index] ? variadicSize : 1;
5664 return {start, size};
5665}
5666
5667} // namespace detail
5669
5670::llvm::LogicalResult DistinctOpAdaptor::verify(::mlir::Location loc) {
5671 return ::mlir::success();
5672}
5673
5674std::pair<unsigned, unsigned> DistinctOp::getODSOperandIndexAndLength(unsigned index) {
5675 bool isVariadic[] = {true};
5676 int prevVariadicCount = 0;
5677 for (unsigned i = 0; i < index; ++i)
5678 if (isVariadic[i]) ++prevVariadicCount;
5679
5680 // Calculate how many dynamic values a static variadic operand corresponds to.
5681 // This assumes all static variadic operands have the same dynamic value count.
5682 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
5683 // `index` passed in as the parameter is the static index which counts each
5684 // operand (variadic or not) as size 1. So here for each previous static variadic
5685 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5686 // value pack for this static operand starts.
5687 int start = index + (variadicSize - 1) * prevVariadicCount;
5688 int size = isVariadic[index] ? variadicSize : 1;
5689 return {start, size};
5690}
5691
5692::mlir::MutableOperandRange DistinctOp::getInputsMutable() {
5693 auto range = getODSOperandIndexAndLength(0);
5694 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
5695 return mutableRange;
5696}
5697
5698void DistinctOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs) {
5699 build(odsBuilder, odsState, mlir::ValueRange{lhs, rhs});
5700
5701}
5702
5703void DistinctOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
5704 odsState.addOperands(inputs);
5705 odsState.addTypes(result);
5706}
5707
5708void DistinctOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5709 odsState.addOperands(operands);
5710 odsState.addAttributes(attributes);
5711 assert(resultTypes.size() == 1u && "mismatched number of return types");
5712 odsState.addTypes(resultTypes);
5713}
5714
5715void DistinctOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5716 odsState.addOperands(operands);
5717 odsState.addAttributes(attributes);
5718
5719 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5720 if (::mlir::succeeded(DistinctOp::inferReturnTypes(odsBuilder.getContext(),
5721 odsState.location, operands,
5722 odsState.attributes.getDictionary(odsState.getContext()),
5723 odsState.getRawProperties(),
5724 odsState.regions, inferredReturnTypes))) {
5725 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
5726 odsState.addTypes(inferredReturnTypes);
5727 } else {
5728 ::llvm::report_fatal_error("Failed to infer result type(s).");
5729 }
5730}
5731
5732::llvm::LogicalResult DistinctOp::verifyInvariantsImpl() {
5733 {
5734 unsigned index = 0; (void)index;
5735 auto valueGroup0 = getODSOperands(0);
5736
5737 for (auto v : valueGroup0) {
5738 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT4(*this, v.getType(), "operand", index++)))
5739 return ::mlir::failure();
5740 }
5741 }
5742 {
5743 unsigned index = 0; (void)index;
5744 auto valueGroup0 = getODSResults(0);
5745
5746 for (auto v : valueGroup0) {
5747 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
5748 return ::mlir::failure();
5749 }
5750 }
5751 return ::mlir::success();
5752}
5753
5754::llvm::LogicalResult DistinctOp::verifyInvariants() {
5755 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
5756 return ::mlir::success();
5757 return ::mlir::failure();
5758}
5759
5760::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) {
5761 inferredReturnTypes.resize(1);
5762 ::mlir::Builder odsBuilder(context);
5763 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
5764 inferredReturnTypes[0] = odsInferredType0;
5765 return ::mlir::success();
5766}
5767
5768void DistinctOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5769}
5770
5771} // namespace smt
5772} // namespace llzk
5773MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::DistinctOp)
5774
5775namespace llzk {
5776namespace smt {
5777
5778//===----------------------------------------------------------------------===//
5779// ::llzk::smt::EqOp definitions
5780//===----------------------------------------------------------------------===//
5781
5782namespace detail {
5783std::pair<unsigned, unsigned> EqOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
5784 bool isVariadic[] = {true};
5785 int prevVariadicCount = 0;
5786 for (unsigned i = 0; i < index; ++i)
5787 if (isVariadic[i]) ++prevVariadicCount;
5788
5789 // Calculate how many dynamic values a static variadic operand corresponds to.
5790 // This assumes all static variadic operands have the same dynamic value count.
5791 int variadicSize = (odsOperandsSize - 0) / 1;
5792 // `index` passed in as the parameter is the static index which counts each
5793 // operand (variadic or not) as size 1. So here for each previous static variadic
5794 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5795 // value pack for this static operand starts.
5796 int start = index + (variadicSize - 1) * prevVariadicCount;
5797 int size = isVariadic[index] ? variadicSize : 1;
5798 return {start, size};
5799}
5800
5801} // namespace detail
5803
5804::llvm::LogicalResult EqOpAdaptor::verify(::mlir::Location loc) {
5805 return ::mlir::success();
5806}
5807
5808std::pair<unsigned, unsigned> EqOp::getODSOperandIndexAndLength(unsigned index) {
5809 bool isVariadic[] = {true};
5810 int prevVariadicCount = 0;
5811 for (unsigned i = 0; i < index; ++i)
5812 if (isVariadic[i]) ++prevVariadicCount;
5813
5814 // Calculate how many dynamic values a static variadic operand corresponds to.
5815 // This assumes all static variadic operands have the same dynamic value count.
5816 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
5817 // `index` passed in as the parameter is the static index which counts each
5818 // operand (variadic or not) as size 1. So here for each previous static variadic
5819 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5820 // value pack for this static operand starts.
5821 int start = index + (variadicSize - 1) * prevVariadicCount;
5822 int size = isVariadic[index] ? variadicSize : 1;
5823 return {start, size};
5824}
5825
5826::mlir::MutableOperandRange EqOp::getInputsMutable() {
5827 auto range = getODSOperandIndexAndLength(0);
5828 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
5829 return mutableRange;
5830}
5831
5832void EqOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs) {
5833 build(odsBuilder, odsState, mlir::ValueRange{lhs, rhs});
5834
5835}
5836
5837void EqOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
5838 odsState.addOperands(inputs);
5839 odsState.addTypes(result);
5840}
5841
5842void EqOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5843 odsState.addOperands(operands);
5844 odsState.addAttributes(attributes);
5845 assert(resultTypes.size() == 1u && "mismatched number of return types");
5846 odsState.addTypes(resultTypes);
5847}
5848
5849void EqOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5850 odsState.addOperands(operands);
5851 odsState.addAttributes(attributes);
5852
5853 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5854 if (::mlir::succeeded(EqOp::inferReturnTypes(odsBuilder.getContext(),
5855 odsState.location, operands,
5856 odsState.attributes.getDictionary(odsState.getContext()),
5857 odsState.getRawProperties(),
5858 odsState.regions, inferredReturnTypes))) {
5859 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
5860 odsState.addTypes(inferredReturnTypes);
5861 } else {
5862 ::llvm::report_fatal_error("Failed to infer result type(s).");
5863 }
5864}
5865
5866::llvm::LogicalResult EqOp::verifyInvariantsImpl() {
5867 {
5868 unsigned index = 0; (void)index;
5869 auto valueGroup0 = getODSOperands(0);
5870
5871 for (auto v : valueGroup0) {
5872 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT4(*this, v.getType(), "operand", index++)))
5873 return ::mlir::failure();
5874 }
5875 }
5876 {
5877 unsigned index = 0; (void)index;
5878 auto valueGroup0 = getODSResults(0);
5879
5880 for (auto v : valueGroup0) {
5881 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
5882 return ::mlir::failure();
5883 }
5884 }
5885 return ::mlir::success();
5886}
5887
5888::llvm::LogicalResult EqOp::verifyInvariants() {
5889 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
5890 return ::mlir::success();
5891 return ::mlir::failure();
5892}
5893
5894::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) {
5895 inferredReturnTypes.resize(1);
5896 ::mlir::Builder odsBuilder(context);
5897 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
5898 inferredReturnTypes[0] = odsInferredType0;
5899 return ::mlir::success();
5900}
5901
5902void EqOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5903}
5904
5905} // namespace smt
5906} // namespace llzk
5907MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::EqOp)
5908
5909namespace llzk {
5910namespace smt {
5911
5912//===----------------------------------------------------------------------===//
5913// ::llzk::smt::ExistsOp definitions
5914//===----------------------------------------------------------------------===//
5915
5916namespace detail {
5918
5920 auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().weight);
5921 return attr;
5922}
5923
5925 auto attr = getWeightAttr();
5926 return attr.getValue().getZExtValue();
5927}
5928
5930 auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().noPattern);
5931 if (!attr)
5932 attr = ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr);
5933 return attr;
5934}
5935
5937 auto attr = getNoPatternAttr();
5938 if (!attr)
5939 return ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr) != nullptr;
5940 return attr != nullptr;
5941}
5942
5943::std::optional< ::mlir::ArrayAttr > ExistsOpGenericAdaptorBase::getBoundVarNames() {
5944 auto attr = getBoundVarNamesAttr();
5945 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5946}
5947
5948} // namespace detail
5950
5951::llvm::LogicalResult ExistsOpAdaptor::verify(::mlir::Location loc) {
5952 auto tblgen_boundVarNames = getProperties().boundVarNames; (void)tblgen_boundVarNames;
5953 auto tblgen_noPattern = getProperties().noPattern; (void)tblgen_noPattern;
5954 auto tblgen_weight = getProperties().weight; (void)tblgen_weight;
5955
5956 if (tblgen_weight && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_weight))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_weight).getType().isSignlessInteger(32)))))
5957 return emitError(loc, "'smt.exists' op ""attribute 'weight' failed to satisfy constraint: 32-bit signless integer attribute");
5958
5959 if (tblgen_noPattern && !((::llvm::isa<::mlir::UnitAttr>(tblgen_noPattern))))
5960 return emitError(loc, "'smt.exists' op ""attribute 'noPattern' failed to satisfy constraint: unit attribute");
5961
5962 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))); }))))
5963 return emitError(loc, "'smt.exists' op ""attribute 'boundVarNames' failed to satisfy constraint: string array attribute");
5964 return ::mlir::success();
5965}
5966
5967::llvm::LogicalResult ExistsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5968 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
5969 if (!dict) {
5970 emitError() << "expected DictionaryAttr to set properties";
5971 return ::mlir::failure();
5972 }
5973
5974 {
5975 auto &propStorage = prop.boundVarNames;
5976 auto attr = dict.get("boundVarNames");
5977 if (attr) {
5978 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
5979 if (convertedAttr) {
5980 propStorage = convertedAttr;
5981 } else {
5982 emitError() << "Invalid attribute `boundVarNames` in property conversion: " << attr;
5983 return ::mlir::failure();
5984 }
5985 }
5986 }
5987
5988 {
5989 auto &propStorage = prop.noPattern;
5990 auto attr = dict.get("noPattern");
5991 if (attr) {
5992 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
5993 if (convertedAttr) {
5994 propStorage = convertedAttr;
5995 } else {
5996 emitError() << "Invalid attribute `noPattern` in property conversion: " << attr;
5997 return ::mlir::failure();
5998 }
5999 }
6000 }
6001
6002 {
6003 auto &propStorage = prop.weight;
6004 auto attr = dict.get("weight");
6005 if (attr) {
6006 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6007 if (convertedAttr) {
6008 propStorage = convertedAttr;
6009 } else {
6010 emitError() << "Invalid attribute `weight` in property conversion: " << attr;
6011 return ::mlir::failure();
6012 }
6013 }
6014 }
6015 return ::mlir::success();
6016}
6017
6018::mlir::Attribute ExistsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6019 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6020 ::mlir::Builder odsBuilder{ctx};
6021
6022 {
6023 const auto &propStorage = prop.boundVarNames;
6024 if (propStorage)
6025 attrs.push_back(odsBuilder.getNamedAttr("boundVarNames",
6026 propStorage));
6027 }
6028
6029 {
6030 const auto &propStorage = prop.noPattern;
6031 if (propStorage)
6032 attrs.push_back(odsBuilder.getNamedAttr("noPattern",
6033 propStorage));
6034 }
6035
6036 {
6037 const auto &propStorage = prop.weight;
6038 if (propStorage)
6039 attrs.push_back(odsBuilder.getNamedAttr("weight",
6040 propStorage));
6041 }
6042
6043 if (!attrs.empty())
6044 return odsBuilder.getDictionaryAttr(attrs);
6045 return {};
6046}
6047
6048llvm::hash_code ExistsOp::computePropertiesHash(const Properties &prop) {
6049 return llvm::hash_combine(
6050 llvm::hash_value(prop.boundVarNames.getAsOpaquePointer()),
6051 llvm::hash_value(prop.noPattern.getAsOpaquePointer()),
6052 llvm::hash_value(prop.weight.getAsOpaquePointer()));
6053}
6054
6055std::optional<mlir::Attribute> ExistsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6056 if (name == "boundVarNames")
6057 return prop.boundVarNames;
6058
6059 if (name == "noPattern")
6060 return prop.noPattern;
6061
6062 if (name == "weight")
6063 return prop.weight;
6064 return std::nullopt;
6065}
6066
6067void ExistsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
6068 if (name == "boundVarNames") {
6069 prop.boundVarNames = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.boundVarNames)>>(value);
6070 return;
6071 }
6072
6073 if (name == "noPattern") {
6074 prop.noPattern = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noPattern)>>(value);
6075 return;
6076 }
6077
6078 if (name == "weight") {
6079 prop.weight = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.weight)>>(value);
6080 return;
6081 }
6082}
6083
6084void ExistsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
6085 if (prop.boundVarNames) attrs.append("boundVarNames", prop.boundVarNames);
6086
6087 if (prop.noPattern) attrs.append("noPattern", prop.noPattern);
6088
6089 if (prop.weight) attrs.append("weight", prop.weight);
6090}
6091
6092::llvm::LogicalResult ExistsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6093 {
6094 ::mlir::Attribute attr = attrs.get(getBoundVarNamesAttrName(opName));
6095 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT7(attr, "boundVarNames", emitError)))
6096 return ::mlir::failure();
6097 }
6098
6099 {
6100 ::mlir::Attribute attr = attrs.get(getNoPatternAttrName(opName));
6101 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(attr, "noPattern", emitError)))
6102 return ::mlir::failure();
6103 }
6104
6105 {
6106 ::mlir::Attribute attr = attrs.get(getWeightAttrName(opName));
6107 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(attr, "weight", emitError)))
6108 return ::mlir::failure();
6109 }
6110 return ::mlir::success();
6111}
6112
6113::llvm::LogicalResult ExistsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
6114 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
6115 if (::mlir::failed(reader.readOptionalAttribute(prop.boundVarNames)))
6116 return ::mlir::failure();
6117
6118 if (::mlir::failed(reader.readOptionalAttribute(prop.noPattern)))
6119 return ::mlir::failure();
6120
6121 if (::mlir::failed(reader.readOptionalAttribute(prop.weight)))
6122 return ::mlir::failure();
6123 return ::mlir::success();
6124}
6125
6126void ExistsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
6127 auto &prop = getProperties(); (void)prop;
6128
6129 writer.writeOptionalAttribute(prop.boundVarNames);
6130
6131 writer.writeOptionalAttribute(prop.noPattern);
6132
6133 writer.writeOptionalAttribute(prop.weight);
6134}
6135
6137 auto attr = getWeightAttr();
6138 return attr.getValue().getZExtValue();
6139}
6140
6142 auto attr = getNoPatternAttr();
6143 if (!attr)
6144 return ((false) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr) != nullptr;
6145 return attr != nullptr;
6146}
6147
6148::std::optional< ::mlir::ArrayAttr > ExistsOp::getBoundVarNames() {
6149 auto attr = getBoundVarNamesAttr();
6150 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6151}
6152
6153void ExistsOp::setWeight(uint32_t attrValue) {
6154 getProperties().weight = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
6155}
6156
6157void ExistsOp::setNoPattern(bool attrValue) {
6158 auto &odsProp = getProperties().noPattern;
6159 if (attrValue)
6160 odsProp = ((attrValue) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr);
6161 else
6162 odsProp = nullptr;
6163}
6164
6165void ExistsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
6166 ::mlir::Builder odsBuilder(opName.getContext());
6167 if (!properties.weight)
6168 properties.weight = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
6169}
6170
6171::llvm::LogicalResult ExistsOp::verifyInvariantsImpl() {
6172 auto tblgen_boundVarNames = getProperties().boundVarNames; (void)tblgen_boundVarNames;
6173 auto tblgen_noPattern = getProperties().noPattern; (void)tblgen_noPattern;
6174 auto tblgen_weight = getProperties().weight; (void)tblgen_weight;
6175
6176 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(*this, tblgen_weight, "weight")))
6177 return ::mlir::failure();
6178
6179 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(*this, tblgen_noPattern, "noPattern")))
6180 return ::mlir::failure();
6181
6182 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT7(*this, tblgen_boundVarNames, "boundVarNames")))
6183 return ::mlir::failure();
6184 {
6185 unsigned index = 0; (void)index;
6186 auto valueGroup0 = getODSResults(0);
6187
6188 for (auto v : valueGroup0) {
6189 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
6190 return ::mlir::failure();
6191 }
6192 }
6193 {
6194 unsigned index = 0; (void)index;
6195
6196 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
6197 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "body", index++)))
6198 return ::mlir::failure();
6199
6200 for (auto &region : getPatterns())
6201 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "patterns", index++)))
6202 return ::mlir::failure();
6203 }
6204 return ::mlir::success();
6205}
6206
6207::llvm::LogicalResult ExistsOp::verifyInvariants() {
6208 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
6209 return ::mlir::success();
6210 return ::mlir::failure();
6211}
6212
6213::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) {
6214 inferredReturnTypes.resize(1);
6215 ::mlir::Builder odsBuilder(context);
6216 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
6217 inferredReturnTypes[0] = odsInferredType0;
6218 return ::mlir::success();
6219}
6220
6221::mlir::ParseResult ExistsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
6222 ::mlir::ArrayAttr boundVarNamesAttr;
6223 ::mlir::IntegerAttr weightAttr;
6224 std::unique_ptr<::mlir::Region> bodyRegion = std::make_unique<::mlir::Region>();
6225 ::llvm::SmallVector<std::unique_ptr<::mlir::Region>, 2> patternsRegions;
6226
6227 ::mlir::OptionalParseResult parseResultboundVarNamesAttr =
6228 parser.parseOptionalAttribute(boundVarNamesAttr, parser.getBuilder().getType<::mlir::NoneType>());
6229 if (parseResultboundVarNamesAttr.has_value() && failed(*parseResultboundVarNamesAttr))
6230 return ::mlir::failure();
6231 if (parseResultboundVarNamesAttr.has_value() && succeeded(*parseResultboundVarNamesAttr))
6232 if (boundVarNamesAttr) result.getOrAddProperties<ExistsOp::Properties>().boundVarNames = boundVarNamesAttr;
6233 if (boundVarNamesAttr) {
6234 }
6235 if (::mlir::succeeded(parser.parseOptionalKeyword("no_pattern"))) {
6236 result.getOrAddProperties<ExistsOp::Properties>().noPattern = parser.getBuilder().getUnitAttr(); }
6237 if (::mlir::succeeded(parser.parseOptionalKeyword("weight"))) {
6238
6239 if (parser.parseCustomAttributeWithFallback(weightAttr, parser.getBuilder().getIntegerType(32))) {
6240 return ::mlir::failure();
6241 }
6242 if (weightAttr) result.getOrAddProperties<ExistsOp::Properties>().weight = weightAttr;
6243 }
6244 {
6245 auto loc = parser.getCurrentLocation();(void)loc;
6246 if (parser.parseOptionalAttrDictWithKeyword(result.attributes))
6247 return ::mlir::failure();
6248 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
6249 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
6250 })))
6251 return ::mlir::failure();
6252 }
6253
6254 if (parser.parseRegion(*bodyRegion))
6255 return ::mlir::failure();
6256
6257 ensureTerminator(*bodyRegion, parser.getBuilder(), result.location);
6258 if (::mlir::succeeded(parser.parseOptionalKeyword("patterns"))) {
6259
6260 {
6261 std::unique_ptr<::mlir::Region> region;
6262 auto firstRegionResult = parser.parseOptionalRegion(region);
6263 if (firstRegionResult.has_value()) {
6264 if (failed(*firstRegionResult))
6265 return ::mlir::failure();
6266 patternsRegions.emplace_back(std::move(region));
6267
6268 // Parse any trailing regions.
6269 while (succeeded(parser.parseOptionalComma())) {
6270 region = std::make_unique<::mlir::Region>();
6271 if (parser.parseRegion(*region))
6272 return ::mlir::failure();
6273 patternsRegions.emplace_back(std::move(region));
6274 }
6275 }
6276 }
6277
6278 for (auto &region : patternsRegions)
6279 ensureTerminator(*region, parser.getBuilder(), result.location);
6280 }
6281 result.addRegion(std::move(bodyRegion));
6282 result.addRegions(patternsRegions);
6283 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
6284 result.addTypes(odsBuildableType0);
6285 return ::mlir::success();
6286}
6287
6288void ExistsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
6289 if (getBoundVarNamesAttr()) {
6290 _odsPrinter << ' ';
6291 _odsPrinter.printAttributeWithoutType(getBoundVarNamesAttr());
6292 }
6293 if ((getNoPatternAttr() && getNoPatternAttr() != ((false) ? ::mlir::OpBuilder((*this)->getContext()).getUnitAttr() : nullptr))) {
6294 _odsPrinter << ' ' << "no_pattern";
6295 }
6296 if (getWeightAttr() != ::mlir::OpBuilder((*this)->getContext()).getIntegerAttr(::mlir::OpBuilder((*this)->getContext()).getIntegerType(32), 0)) {
6297 _odsPrinter << ' ' << "weight";
6298 _odsPrinter << ' ';
6299 _odsPrinter.printAttributeWithoutType(getWeightAttr());
6300 }
6301 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
6302 elidedAttrs.push_back("boundVarNames");
6303 elidedAttrs.push_back("noPattern");
6304 elidedAttrs.push_back("weight");
6305 {
6306 ::mlir::Builder odsBuilder(getContext());
6307 ::mlir::Attribute attr = getWeightAttr();
6308 if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
6309 elidedAttrs.push_back("weight");
6310 }
6311 {
6312 ::mlir::Builder odsBuilder(getContext());
6313 ::mlir::Attribute attr = getNoPatternAttr();
6314 if(attr && (attr == ((false) ? odsBuilder.getUnitAttr() : nullptr)))
6315 elidedAttrs.push_back("noPattern");
6316 }
6317 _odsPrinter.printOptionalAttrDictWithKeyword((*this)->getAttrs(), elidedAttrs);
6318 _odsPrinter << ' ';
6319
6320 {
6321 bool printTerminator = true;
6322 if (auto *term = getBody().empty() ? nullptr : getBody().begin()->getTerminator()) {
6323 printTerminator = !term->getAttrDictionary().empty() ||
6324 term->getNumOperands() != 0 ||
6325 term->getNumResults() != 0;
6326 }
6327 _odsPrinter.printRegion(getBody(), /*printEntryBlockArgs=*/true,
6328 /*printBlockTerminators=*/printTerminator);
6329 }
6330 if (!getPatterns().empty()) {
6331 _odsPrinter << ' ' << "patterns";
6332 _odsPrinter << ' ';
6333 llvm::interleaveComma(getPatterns(), _odsPrinter, [&](::mlir::Region &region) {
6334
6335 {
6336 bool printTerminator = true;
6337 if (auto *term = region.empty() ? nullptr : region.begin()->getTerminator()) {
6338 printTerminator = !term->getAttrDictionary().empty() ||
6339 term->getNumOperands() != 0 ||
6340 term->getNumResults() != 0;
6341 }
6342 _odsPrinter.printRegion(region, /*printEntryBlockArgs=*/true,
6343 /*printBlockTerminators=*/printTerminator);
6344 }
6345 });
6346 }
6347}
6348
6349} // namespace smt
6350} // namespace llzk
6351MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ExistsOp)
6352
6353namespace llzk {
6354namespace smt {
6355
6356//===----------------------------------------------------------------------===//
6357// ::llzk::smt::ExtractOp definitions
6358//===----------------------------------------------------------------------===//
6359
6360namespace detail {
6361ExtractOpGenericAdaptorBase::ExtractOpGenericAdaptorBase(ExtractOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
6362
6364 auto attr = getLowBitAttr();
6365 return attr.getValue().getZExtValue();
6366}
6367
6368} // namespace detail
6370
6371::llvm::LogicalResult ExtractOpAdaptor::verify(::mlir::Location loc) {
6372 auto tblgen_lowBit = getProperties().lowBit; (void)tblgen_lowBit;
6373 if (!tblgen_lowBit) return emitError(loc, "'smt.bv.extract' op ""requires attribute 'lowBit'");
6374
6375 if (tblgen_lowBit && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_lowBit))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_lowBit).getType().isSignlessInteger(32)))))
6376 return emitError(loc, "'smt.bv.extract' op ""attribute 'lowBit' failed to satisfy constraint: 32-bit signless integer attribute");
6377 return ::mlir::success();
6378}
6379
6380::llvm::LogicalResult ExtractOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6381 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
6382 if (!dict) {
6383 emitError() << "expected DictionaryAttr to set properties";
6384 return ::mlir::failure();
6385 }
6386
6387 {
6388 auto &propStorage = prop.lowBit;
6389 auto attr = dict.get("lowBit");
6390 if (attr) {
6391 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6392 if (convertedAttr) {
6393 propStorage = convertedAttr;
6394 } else {
6395 emitError() << "Invalid attribute `lowBit` in property conversion: " << attr;
6396 return ::mlir::failure();
6397 }
6398 }
6399 }
6400 return ::mlir::success();
6401}
6402
6403::mlir::Attribute ExtractOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6404 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6405 ::mlir::Builder odsBuilder{ctx};
6406
6407 {
6408 const auto &propStorage = prop.lowBit;
6409 if (propStorage)
6410 attrs.push_back(odsBuilder.getNamedAttr("lowBit",
6411 propStorage));
6412 }
6413
6414 if (!attrs.empty())
6415 return odsBuilder.getDictionaryAttr(attrs);
6416 return {};
6417}
6418
6419llvm::hash_code ExtractOp::computePropertiesHash(const Properties &prop) {
6420 return llvm::hash_combine(
6421 llvm::hash_value(prop.lowBit.getAsOpaquePointer()));
6422}
6423
6424std::optional<mlir::Attribute> ExtractOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6425 if (name == "lowBit")
6426 return prop.lowBit;
6427 return std::nullopt;
6428}
6429
6430void ExtractOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
6431 if (name == "lowBit") {
6432 prop.lowBit = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.lowBit)>>(value);
6433 return;
6434 }
6435}
6436
6437void ExtractOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
6438 if (prop.lowBit) attrs.append("lowBit", prop.lowBit);
6439}
6440
6441::llvm::LogicalResult ExtractOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6442 {
6443 ::mlir::Attribute attr = attrs.get(getLowBitAttrName(opName));
6444 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(attr, "lowBit", emitError)))
6445 return ::mlir::failure();
6446 }
6447 return ::mlir::success();
6448}
6449
6450::llvm::LogicalResult ExtractOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
6451 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
6452 if (::mlir::failed(reader.readAttribute(prop.lowBit)))
6453 return ::mlir::failure();
6454 return ::mlir::success();
6455}
6456
6457void ExtractOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
6458 auto &prop = getProperties(); (void)prop;
6459 writer.writeAttribute(prop.lowBit);
6460}
6461
6463 auto attr = getLowBitAttr();
6464 return attr.getValue().getZExtValue();
6465}
6466
6467void ExtractOp::setLowBit(uint32_t attrValue) {
6468 getProperties().lowBit = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
6469}
6470
6471void ExtractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::IntegerAttr lowBit, ::mlir::Value input) {
6472 odsState.addOperands(input);
6473 odsState.getOrAddProperties<Properties>().lowBit = lowBit;
6474 odsState.addTypes(result);
6475}
6476
6477void ExtractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr lowBit, ::mlir::Value input) {
6478 odsState.addOperands(input);
6479 odsState.getOrAddProperties<Properties>().lowBit = lowBit;
6480 assert(resultTypes.size() == 1u && "mismatched number of results");
6481 odsState.addTypes(resultTypes);
6482}
6483
6484void ExtractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, uint32_t lowBit, ::mlir::Value input) {
6485 odsState.addOperands(input);
6486 odsState.getOrAddProperties<Properties>().lowBit = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), lowBit);
6487 odsState.addTypes(result);
6488}
6489
6490void ExtractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t lowBit, ::mlir::Value input) {
6491 odsState.addOperands(input);
6492 odsState.getOrAddProperties<Properties>().lowBit = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), lowBit);
6493 assert(resultTypes.size() == 1u && "mismatched number of results");
6494 odsState.addTypes(resultTypes);
6495}
6496
6497void ExtractOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6498 assert(operands.size() == 1u && "mismatched number of parameters");
6499 odsState.addOperands(operands);
6500 odsState.addAttributes(attributes);
6501 assert(resultTypes.size() == 1u && "mismatched number of return types");
6502 odsState.addTypes(resultTypes);
6503
6504 if (!attributes.empty()) {
6505 ::mlir::OpaqueProperties properties =
6506 &odsState.getOrAddProperties<ExtractOp::Properties>();
6507 std::optional<::mlir::RegisteredOperationName> info =
6508 odsState.name.getRegisteredInfo();
6509 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
6510 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
6511 ::llvm::report_fatal_error("Property conversion failed.");
6512 }
6513}
6514
6515::llvm::LogicalResult ExtractOp::verifyInvariantsImpl() {
6516 auto tblgen_lowBit = getProperties().lowBit; (void)tblgen_lowBit;
6517 if (!tblgen_lowBit) return emitOpError("requires attribute 'lowBit'");
6518
6519 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(*this, tblgen_lowBit, "lowBit")))
6520 return ::mlir::failure();
6521 {
6522 unsigned index = 0; (void)index;
6523 auto valueGroup0 = getODSOperands(0);
6524
6525 for (auto v : valueGroup0) {
6526 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
6527 return ::mlir::failure();
6528 }
6529 }
6530 {
6531 unsigned index = 0; (void)index;
6532 auto valueGroup0 = getODSResults(0);
6533
6534 for (auto v : valueGroup0) {
6535 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
6536 return ::mlir::failure();
6537 }
6538 }
6539 return ::mlir::success();
6540}
6541
6542::llvm::LogicalResult ExtractOp::verifyInvariants() {
6543 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
6544 return ::mlir::success();
6545 return ::mlir::failure();
6546}
6547
6548::mlir::ParseResult ExtractOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
6549 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
6550 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
6551 (void)inputOperandsLoc;
6552 ::mlir::IntegerAttr lowBitAttr;
6553 ::llvm::ArrayRef<::mlir::Type> inputTypes;
6554 ::llvm::ArrayRef<::mlir::Type> resultTypes;
6555
6556 inputOperandsLoc = parser.getCurrentLocation();
6557 if (parser.parseOperand(inputRawOperand))
6558 return ::mlir::failure();
6559 if (parser.parseKeyword("from"))
6560 return ::mlir::failure();
6561
6562 if (parser.parseCustomAttributeWithFallback(lowBitAttr, parser.getBuilder().getIntegerType(32))) {
6563 return ::mlir::failure();
6564 }
6565 if (lowBitAttr) result.getOrAddProperties<ExtractOp::Properties>().lowBit = lowBitAttr;
6566 {
6567 auto loc = parser.getCurrentLocation();(void)loc;
6568 if (parser.parseOptionalAttrDict(result.attributes))
6569 return ::mlir::failure();
6570 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
6571 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
6572 })))
6573 return ::mlir::failure();
6574 }
6575 if (parser.parseColon())
6576 return ::mlir::failure();
6577
6578 ::mlir::FunctionType input__result_functionType;
6579 if (parser.parseType(input__result_functionType))
6580 return ::mlir::failure();
6581 inputTypes = input__result_functionType.getInputs();
6582 resultTypes = input__result_functionType.getResults();
6583 result.addTypes(resultTypes);
6584 if (parser.resolveOperands(inputOperands, inputTypes, inputOperandsLoc, result.operands))
6585 return ::mlir::failure();
6586 return ::mlir::success();
6587}
6588
6589void ExtractOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
6590 _odsPrinter << ' ';
6591 _odsPrinter << getInput();
6592 _odsPrinter << ' ' << "from";
6593 _odsPrinter << ' ';
6594 _odsPrinter.printAttributeWithoutType(getLowBitAttr());
6595 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
6596 elidedAttrs.push_back("lowBit");
6597 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
6598 _odsPrinter << ' ' << ":";
6599 _odsPrinter << ' ';
6600 _odsPrinter.printFunctionalType(::llvm::ArrayRef<::mlir::Type>(getInput().getType()), ::llvm::ArrayRef<::mlir::Type>(getResult().getType()));
6601}
6602
6603void ExtractOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
6604}
6605
6606} // namespace smt
6607} // namespace llzk
6608MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ExtractOp)
6609
6610namespace llzk {
6611namespace smt {
6612
6613//===----------------------------------------------------------------------===//
6614// ::llzk::smt::ForallOp definitions
6615//===----------------------------------------------------------------------===//
6616
6617namespace detail {
6619
6621 auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().weight);
6622 return attr;
6623}
6624
6626 auto attr = getWeightAttr();
6627 return attr.getValue().getZExtValue();
6628}
6629
6631 auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().noPattern);
6632 if (!attr)
6633 attr = ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr);
6634 return attr;
6635}
6636
6638 auto attr = getNoPatternAttr();
6639 if (!attr)
6640 return ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr) != nullptr;
6641 return attr != nullptr;
6642}
6643
6644::std::optional< ::mlir::ArrayAttr > ForallOpGenericAdaptorBase::getBoundVarNames() {
6645 auto attr = getBoundVarNamesAttr();
6646 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6647}
6648
6649} // namespace detail
6651
6652::llvm::LogicalResult ForallOpAdaptor::verify(::mlir::Location loc) {
6653 auto tblgen_boundVarNames = getProperties().boundVarNames; (void)tblgen_boundVarNames;
6654 auto tblgen_noPattern = getProperties().noPattern; (void)tblgen_noPattern;
6655 auto tblgen_weight = getProperties().weight; (void)tblgen_weight;
6656
6657 if (tblgen_weight && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_weight))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_weight).getType().isSignlessInteger(32)))))
6658 return emitError(loc, "'smt.forall' op ""attribute 'weight' failed to satisfy constraint: 32-bit signless integer attribute");
6659
6660 if (tblgen_noPattern && !((::llvm::isa<::mlir::UnitAttr>(tblgen_noPattern))))
6661 return emitError(loc, "'smt.forall' op ""attribute 'noPattern' failed to satisfy constraint: unit attribute");
6662
6663 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))); }))))
6664 return emitError(loc, "'smt.forall' op ""attribute 'boundVarNames' failed to satisfy constraint: string array attribute");
6665 return ::mlir::success();
6666}
6667
6668::llvm::LogicalResult ForallOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6669 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
6670 if (!dict) {
6671 emitError() << "expected DictionaryAttr to set properties";
6672 return ::mlir::failure();
6673 }
6674
6675 {
6676 auto &propStorage = prop.boundVarNames;
6677 auto attr = dict.get("boundVarNames");
6678 if (attr) {
6679 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6680 if (convertedAttr) {
6681 propStorage = convertedAttr;
6682 } else {
6683 emitError() << "Invalid attribute `boundVarNames` in property conversion: " << attr;
6684 return ::mlir::failure();
6685 }
6686 }
6687 }
6688
6689 {
6690 auto &propStorage = prop.noPattern;
6691 auto attr = dict.get("noPattern");
6692 if (attr) {
6693 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6694 if (convertedAttr) {
6695 propStorage = convertedAttr;
6696 } else {
6697 emitError() << "Invalid attribute `noPattern` in property conversion: " << attr;
6698 return ::mlir::failure();
6699 }
6700 }
6701 }
6702
6703 {
6704 auto &propStorage = prop.weight;
6705 auto attr = dict.get("weight");
6706 if (attr) {
6707 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
6708 if (convertedAttr) {
6709 propStorage = convertedAttr;
6710 } else {
6711 emitError() << "Invalid attribute `weight` in property conversion: " << attr;
6712 return ::mlir::failure();
6713 }
6714 }
6715 }
6716 return ::mlir::success();
6717}
6718
6719::mlir::Attribute ForallOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6720 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6721 ::mlir::Builder odsBuilder{ctx};
6722
6723 {
6724 const auto &propStorage = prop.boundVarNames;
6725 if (propStorage)
6726 attrs.push_back(odsBuilder.getNamedAttr("boundVarNames",
6727 propStorage));
6728 }
6729
6730 {
6731 const auto &propStorage = prop.noPattern;
6732 if (propStorage)
6733 attrs.push_back(odsBuilder.getNamedAttr("noPattern",
6734 propStorage));
6735 }
6736
6737 {
6738 const auto &propStorage = prop.weight;
6739 if (propStorage)
6740 attrs.push_back(odsBuilder.getNamedAttr("weight",
6741 propStorage));
6742 }
6743
6744 if (!attrs.empty())
6745 return odsBuilder.getDictionaryAttr(attrs);
6746 return {};
6747}
6748
6749llvm::hash_code ForallOp::computePropertiesHash(const Properties &prop) {
6750 return llvm::hash_combine(
6751 llvm::hash_value(prop.boundVarNames.getAsOpaquePointer()),
6752 llvm::hash_value(prop.noPattern.getAsOpaquePointer()),
6753 llvm::hash_value(prop.weight.getAsOpaquePointer()));
6754}
6755
6756std::optional<mlir::Attribute> ForallOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6757 if (name == "boundVarNames")
6758 return prop.boundVarNames;
6759
6760 if (name == "noPattern")
6761 return prop.noPattern;
6762
6763 if (name == "weight")
6764 return prop.weight;
6765 return std::nullopt;
6766}
6767
6768void ForallOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
6769 if (name == "boundVarNames") {
6770 prop.boundVarNames = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.boundVarNames)>>(value);
6771 return;
6772 }
6773
6774 if (name == "noPattern") {
6775 prop.noPattern = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noPattern)>>(value);
6776 return;
6777 }
6778
6779 if (name == "weight") {
6780 prop.weight = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.weight)>>(value);
6781 return;
6782 }
6783}
6784
6785void ForallOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
6786 if (prop.boundVarNames) attrs.append("boundVarNames", prop.boundVarNames);
6787
6788 if (prop.noPattern) attrs.append("noPattern", prop.noPattern);
6789
6790 if (prop.weight) attrs.append("weight", prop.weight);
6791}
6792
6793::llvm::LogicalResult ForallOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6794 {
6795 ::mlir::Attribute attr = attrs.get(getBoundVarNamesAttrName(opName));
6796 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT7(attr, "boundVarNames", emitError)))
6797 return ::mlir::failure();
6798 }
6799
6800 {
6801 ::mlir::Attribute attr = attrs.get(getNoPatternAttrName(opName));
6802 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(attr, "noPattern", emitError)))
6803 return ::mlir::failure();
6804 }
6805
6806 {
6807 ::mlir::Attribute attr = attrs.get(getWeightAttrName(opName));
6808 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(attr, "weight", emitError)))
6809 return ::mlir::failure();
6810 }
6811 return ::mlir::success();
6812}
6813
6814::llvm::LogicalResult ForallOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
6815 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
6816 if (::mlir::failed(reader.readOptionalAttribute(prop.boundVarNames)))
6817 return ::mlir::failure();
6818
6819 if (::mlir::failed(reader.readOptionalAttribute(prop.noPattern)))
6820 return ::mlir::failure();
6821
6822 if (::mlir::failed(reader.readOptionalAttribute(prop.weight)))
6823 return ::mlir::failure();
6824 return ::mlir::success();
6825}
6826
6827void ForallOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
6828 auto &prop = getProperties(); (void)prop;
6829
6830 writer.writeOptionalAttribute(prop.boundVarNames);
6831
6832 writer.writeOptionalAttribute(prop.noPattern);
6833
6834 writer.writeOptionalAttribute(prop.weight);
6835}
6836
6838 auto attr = getWeightAttr();
6839 return attr.getValue().getZExtValue();
6840}
6841
6843 auto attr = getNoPatternAttr();
6844 if (!attr)
6845 return ((false) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr) != nullptr;
6846 return attr != nullptr;
6847}
6848
6849::std::optional< ::mlir::ArrayAttr > ForallOp::getBoundVarNames() {
6850 auto attr = getBoundVarNamesAttr();
6851 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6852}
6853
6854void ForallOp::setWeight(uint32_t attrValue) {
6855 getProperties().weight = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
6856}
6857
6858void ForallOp::setNoPattern(bool attrValue) {
6859 auto &odsProp = getProperties().noPattern;
6860 if (attrValue)
6861 odsProp = ((attrValue) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr);
6862 else
6863 odsProp = nullptr;
6864}
6865
6866void ForallOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
6867 ::mlir::Builder odsBuilder(opName.getContext());
6868 if (!properties.weight)
6869 properties.weight = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
6870}
6871
6872::llvm::LogicalResult ForallOp::verifyInvariantsImpl() {
6873 auto tblgen_boundVarNames = getProperties().boundVarNames; (void)tblgen_boundVarNames;
6874 auto tblgen_noPattern = getProperties().noPattern; (void)tblgen_noPattern;
6875 auto tblgen_weight = getProperties().weight; (void)tblgen_weight;
6876
6877 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT6(*this, tblgen_weight, "weight")))
6878 return ::mlir::failure();
6879
6880 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT1(*this, tblgen_noPattern, "noPattern")))
6881 return ::mlir::failure();
6882
6883 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT7(*this, tblgen_boundVarNames, "boundVarNames")))
6884 return ::mlir::failure();
6885 {
6886 unsigned index = 0; (void)index;
6887 auto valueGroup0 = getODSResults(0);
6888
6889 for (auto v : valueGroup0) {
6890 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
6891 return ::mlir::failure();
6892 }
6893 }
6894 {
6895 unsigned index = 0; (void)index;
6896
6897 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
6898 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "body", index++)))
6899 return ::mlir::failure();
6900
6901 for (auto &region : getPatterns())
6902 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "patterns", index++)))
6903 return ::mlir::failure();
6904 }
6905 return ::mlir::success();
6906}
6907
6908::llvm::LogicalResult ForallOp::verifyInvariants() {
6909 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
6910 return ::mlir::success();
6911 return ::mlir::failure();
6912}
6913
6914::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) {
6915 inferredReturnTypes.resize(1);
6916 ::mlir::Builder odsBuilder(context);
6917 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
6918 inferredReturnTypes[0] = odsInferredType0;
6919 return ::mlir::success();
6920}
6921
6922::mlir::ParseResult ForallOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
6923 ::mlir::ArrayAttr boundVarNamesAttr;
6924 ::mlir::IntegerAttr weightAttr;
6925 std::unique_ptr<::mlir::Region> bodyRegion = std::make_unique<::mlir::Region>();
6926 ::llvm::SmallVector<std::unique_ptr<::mlir::Region>, 2> patternsRegions;
6927
6928 ::mlir::OptionalParseResult parseResultboundVarNamesAttr =
6929 parser.parseOptionalAttribute(boundVarNamesAttr, parser.getBuilder().getType<::mlir::NoneType>());
6930 if (parseResultboundVarNamesAttr.has_value() && failed(*parseResultboundVarNamesAttr))
6931 return ::mlir::failure();
6932 if (parseResultboundVarNamesAttr.has_value() && succeeded(*parseResultboundVarNamesAttr))
6933 if (boundVarNamesAttr) result.getOrAddProperties<ForallOp::Properties>().boundVarNames = boundVarNamesAttr;
6934 if (boundVarNamesAttr) {
6935 }
6936 if (::mlir::succeeded(parser.parseOptionalKeyword("no_pattern"))) {
6937 result.getOrAddProperties<ForallOp::Properties>().noPattern = parser.getBuilder().getUnitAttr(); }
6938 if (::mlir::succeeded(parser.parseOptionalKeyword("weight"))) {
6939
6940 if (parser.parseCustomAttributeWithFallback(weightAttr, parser.getBuilder().getIntegerType(32))) {
6941 return ::mlir::failure();
6942 }
6943 if (weightAttr) result.getOrAddProperties<ForallOp::Properties>().weight = weightAttr;
6944 }
6945 {
6946 auto loc = parser.getCurrentLocation();(void)loc;
6947 if (parser.parseOptionalAttrDictWithKeyword(result.attributes))
6948 return ::mlir::failure();
6949 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
6950 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
6951 })))
6952 return ::mlir::failure();
6953 }
6954
6955 if (parser.parseRegion(*bodyRegion))
6956 return ::mlir::failure();
6957
6958 ensureTerminator(*bodyRegion, parser.getBuilder(), result.location);
6959 if (::mlir::succeeded(parser.parseOptionalKeyword("patterns"))) {
6960
6961 {
6962 std::unique_ptr<::mlir::Region> region;
6963 auto firstRegionResult = parser.parseOptionalRegion(region);
6964 if (firstRegionResult.has_value()) {
6965 if (failed(*firstRegionResult))
6966 return ::mlir::failure();
6967 patternsRegions.emplace_back(std::move(region));
6968
6969 // Parse any trailing regions.
6970 while (succeeded(parser.parseOptionalComma())) {
6971 region = std::make_unique<::mlir::Region>();
6972 if (parser.parseRegion(*region))
6973 return ::mlir::failure();
6974 patternsRegions.emplace_back(std::move(region));
6975 }
6976 }
6977 }
6978
6979 for (auto &region : patternsRegions)
6980 ensureTerminator(*region, parser.getBuilder(), result.location);
6981 }
6982 result.addRegion(std::move(bodyRegion));
6983 result.addRegions(patternsRegions);
6984 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
6985 result.addTypes(odsBuildableType0);
6986 return ::mlir::success();
6987}
6988
6989void ForallOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
6990 if (getBoundVarNamesAttr()) {
6991 _odsPrinter << ' ';
6992 _odsPrinter.printAttributeWithoutType(getBoundVarNamesAttr());
6993 }
6994 if ((getNoPatternAttr() && getNoPatternAttr() != ((false) ? ::mlir::OpBuilder((*this)->getContext()).getUnitAttr() : nullptr))) {
6995 _odsPrinter << ' ' << "no_pattern";
6996 }
6997 if (getWeightAttr() != ::mlir::OpBuilder((*this)->getContext()).getIntegerAttr(::mlir::OpBuilder((*this)->getContext()).getIntegerType(32), 0)) {
6998 _odsPrinter << ' ' << "weight";
6999 _odsPrinter << ' ';
7000 _odsPrinter.printAttributeWithoutType(getWeightAttr());
7001 }
7002 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7003 elidedAttrs.push_back("boundVarNames");
7004 elidedAttrs.push_back("noPattern");
7005 elidedAttrs.push_back("weight");
7006 {
7007 ::mlir::Builder odsBuilder(getContext());
7008 ::mlir::Attribute attr = getWeightAttr();
7009 if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
7010 elidedAttrs.push_back("weight");
7011 }
7012 {
7013 ::mlir::Builder odsBuilder(getContext());
7014 ::mlir::Attribute attr = getNoPatternAttr();
7015 if(attr && (attr == ((false) ? odsBuilder.getUnitAttr() : nullptr)))
7016 elidedAttrs.push_back("noPattern");
7017 }
7018 _odsPrinter.printOptionalAttrDictWithKeyword((*this)->getAttrs(), elidedAttrs);
7019 _odsPrinter << ' ';
7020
7021 {
7022 bool printTerminator = true;
7023 if (auto *term = getBody().empty() ? nullptr : getBody().begin()->getTerminator()) {
7024 printTerminator = !term->getAttrDictionary().empty() ||
7025 term->getNumOperands() != 0 ||
7026 term->getNumResults() != 0;
7027 }
7028 _odsPrinter.printRegion(getBody(), /*printEntryBlockArgs=*/true,
7029 /*printBlockTerminators=*/printTerminator);
7030 }
7031 if (!getPatterns().empty()) {
7032 _odsPrinter << ' ' << "patterns";
7033 _odsPrinter << ' ';
7034 llvm::interleaveComma(getPatterns(), _odsPrinter, [&](::mlir::Region &region) {
7035
7036 {
7037 bool printTerminator = true;
7038 if (auto *term = region.empty() ? nullptr : region.begin()->getTerminator()) {
7039 printTerminator = !term->getAttrDictionary().empty() ||
7040 term->getNumOperands() != 0 ||
7041 term->getNumResults() != 0;
7042 }
7043 _odsPrinter.printRegion(region, /*printEntryBlockArgs=*/true,
7044 /*printBlockTerminators=*/printTerminator);
7045 }
7046 });
7047 }
7048}
7049
7050} // namespace smt
7051} // namespace llzk
7052MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ForallOp)
7053
7054namespace llzk {
7055namespace smt {
7056
7057//===----------------------------------------------------------------------===//
7058// ::llzk::smt::ImpliesOp definitions
7059//===----------------------------------------------------------------------===//
7060
7061namespace detail {
7062} // namespace detail
7064
7065::llvm::LogicalResult ImpliesOpAdaptor::verify(::mlir::Location loc) {
7066 return ::mlir::success();
7067}
7068
7069void ImpliesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
7070 odsState.addOperands(lhs);
7071 odsState.addOperands(rhs);
7072 odsState.addTypes(result);
7073}
7074
7075void ImpliesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
7076 odsState.addOperands(lhs);
7077 odsState.addOperands(rhs);
7078
7079 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7080 if (::mlir::succeeded(ImpliesOp::inferReturnTypes(odsBuilder.getContext(),
7081 odsState.location, odsState.operands,
7082 odsState.attributes.getDictionary(odsState.getContext()),
7083 odsState.getRawProperties(),
7084 odsState.regions, inferredReturnTypes)))
7085 odsState.addTypes(inferredReturnTypes);
7086 else
7087 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
7088
7089}
7090
7091void ImpliesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
7092 odsState.addOperands(lhs);
7093 odsState.addOperands(rhs);
7094 assert(resultTypes.size() == 1u && "mismatched number of results");
7095 odsState.addTypes(resultTypes);
7096}
7097
7098void ImpliesOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7099 assert(operands.size() == 2u && "mismatched number of parameters");
7100 odsState.addOperands(operands);
7101 odsState.addAttributes(attributes);
7102 assert(resultTypes.size() == 1u && "mismatched number of return types");
7103 odsState.addTypes(resultTypes);
7104}
7105
7106void ImpliesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7107 assert(operands.size() == 2u && "mismatched number of parameters");
7108 odsState.addOperands(operands);
7109 odsState.addAttributes(attributes);
7110
7111 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7112 if (::mlir::succeeded(ImpliesOp::inferReturnTypes(odsBuilder.getContext(),
7113 odsState.location, operands,
7114 odsState.attributes.getDictionary(odsState.getContext()),
7115 odsState.getRawProperties(),
7116 odsState.regions, inferredReturnTypes))) {
7117 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
7118 odsState.addTypes(inferredReturnTypes);
7119 } else {
7120 ::llvm::report_fatal_error("Failed to infer result type(s).");
7121 }
7122}
7123
7124::llvm::LogicalResult ImpliesOp::verifyInvariantsImpl() {
7125 {
7126 unsigned index = 0; (void)index;
7127 auto valueGroup0 = getODSOperands(0);
7128
7129 for (auto v : valueGroup0) {
7130 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "operand", index++)))
7131 return ::mlir::failure();
7132 }
7133 auto valueGroup1 = getODSOperands(1);
7134
7135 for (auto v : valueGroup1) {
7136 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "operand", index++)))
7137 return ::mlir::failure();
7138 }
7139 }
7140 {
7141 unsigned index = 0; (void)index;
7142 auto valueGroup0 = getODSResults(0);
7143
7144 for (auto v : valueGroup0) {
7145 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
7146 return ::mlir::failure();
7147 }
7148 }
7149 return ::mlir::success();
7150}
7151
7152::llvm::LogicalResult ImpliesOp::verifyInvariants() {
7153 return verifyInvariantsImpl();
7154}
7155
7156::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) {
7157 inferredReturnTypes.resize(1);
7158 ::mlir::Builder odsBuilder(context);
7159 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
7160 inferredReturnTypes[0] = odsInferredType0;
7161 return ::mlir::success();
7162}
7163
7164::mlir::ParseResult ImpliesOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7165 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
7166 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
7167 (void)lhsOperandsLoc;
7168 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
7169 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
7170 (void)rhsOperandsLoc;
7171
7172 lhsOperandsLoc = parser.getCurrentLocation();
7173 if (parser.parseOperand(lhsRawOperand))
7174 return ::mlir::failure();
7175 if (parser.parseComma())
7176 return ::mlir::failure();
7177
7178 rhsOperandsLoc = parser.getCurrentLocation();
7179 if (parser.parseOperand(rhsRawOperand))
7180 return ::mlir::failure();
7181 {
7182 auto loc = parser.getCurrentLocation();(void)loc;
7183 if (parser.parseOptionalAttrDict(result.attributes))
7184 return ::mlir::failure();
7185 }
7186 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
7187 result.addTypes(odsBuildableType0);
7188 if (parser.resolveOperands(lhsOperands, odsBuildableType0, lhsOperandsLoc, result.operands))
7189 return ::mlir::failure();
7190 if (parser.resolveOperands(rhsOperands, odsBuildableType0, rhsOperandsLoc, result.operands))
7191 return ::mlir::failure();
7192 return ::mlir::success();
7193}
7194
7195void ImpliesOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7196 _odsPrinter << ' ';
7197 _odsPrinter << getLhs();
7198 _odsPrinter << ",";
7199 _odsPrinter << ' ';
7200 _odsPrinter << getRhs();
7201 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7202 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
7203}
7204
7205void ImpliesOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7206}
7207
7208} // namespace smt
7209} // namespace llzk
7210MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ImpliesOp)
7211
7212namespace llzk {
7213namespace smt {
7214
7215//===----------------------------------------------------------------------===//
7216// ::llzk::smt::Int2BVOp definitions
7217//===----------------------------------------------------------------------===//
7218
7219namespace detail {
7220} // namespace detail
7222
7223::llvm::LogicalResult Int2BVOpAdaptor::verify(::mlir::Location loc) {
7224 return ::mlir::success();
7225}
7226
7227void Int2BVOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
7228 odsState.addOperands(input);
7229 odsState.addTypes(result);
7230}
7231
7232void Int2BVOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
7233 odsState.addOperands(input);
7234 assert(resultTypes.size() == 1u && "mismatched number of results");
7235 odsState.addTypes(resultTypes);
7236}
7237
7238void Int2BVOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7239 assert(operands.size() == 1u && "mismatched number of parameters");
7240 odsState.addOperands(operands);
7241 odsState.addAttributes(attributes);
7242 assert(resultTypes.size() == 1u && "mismatched number of return types");
7243 odsState.addTypes(resultTypes);
7244}
7245
7246::llvm::LogicalResult Int2BVOp::verifyInvariantsImpl() {
7247 {
7248 unsigned index = 0; (void)index;
7249 auto valueGroup0 = getODSOperands(0);
7250
7251 for (auto v : valueGroup0) {
7252 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
7253 return ::mlir::failure();
7254 }
7255 }
7256 {
7257 unsigned index = 0; (void)index;
7258 auto valueGroup0 = getODSResults(0);
7259
7260 for (auto v : valueGroup0) {
7261 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
7262 return ::mlir::failure();
7263 }
7264 }
7265 return ::mlir::success();
7266}
7267
7268::llvm::LogicalResult Int2BVOp::verifyInvariants() {
7269 return verifyInvariantsImpl();
7270}
7271
7272::mlir::ParseResult Int2BVOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7273 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
7274 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
7275 (void)inputOperandsLoc;
7276 ::mlir::Type resultRawType{};
7277 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
7278
7279 inputOperandsLoc = parser.getCurrentLocation();
7280 if (parser.parseOperand(inputRawOperand))
7281 return ::mlir::failure();
7282 {
7283 auto loc = parser.getCurrentLocation();(void)loc;
7284 if (parser.parseOptionalAttrDict(result.attributes))
7285 return ::mlir::failure();
7286 }
7287 if (parser.parseColon())
7288 return ::mlir::failure();
7289
7290 if (parser.parseType(resultRawType))
7291 return ::mlir::failure();
7292 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
7293 result.addTypes(resultTypes);
7294 if (parser.resolveOperands(inputOperands, odsBuildableType0, inputOperandsLoc, result.operands))
7295 return ::mlir::failure();
7296 return ::mlir::success();
7297}
7298
7299void Int2BVOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7300 _odsPrinter << ' ';
7301 _odsPrinter << getInput();
7302 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7303 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
7304 _odsPrinter << ' ' << ":";
7305 _odsPrinter << ' ';
7306 _odsPrinter << getResult().getType();
7307}
7308
7309void Int2BVOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7310}
7311
7312} // namespace smt
7313} // namespace llzk
7314MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::Int2BVOp)
7315
7316namespace llzk {
7317namespace smt {
7318
7319//===----------------------------------------------------------------------===//
7320// ::llzk::smt::IntAbsOp definitions
7321//===----------------------------------------------------------------------===//
7322
7323namespace detail {
7324} // namespace detail
7326
7327::llvm::LogicalResult IntAbsOpAdaptor::verify(::mlir::Location loc) {
7328 return ::mlir::success();
7329}
7330
7331void IntAbsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
7332 odsState.addOperands(input);
7333 odsState.addTypes(result);
7334}
7335
7336void IntAbsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
7337 odsState.addOperands(input);
7338
7339 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7340 if (::mlir::succeeded(IntAbsOp::inferReturnTypes(odsBuilder.getContext(),
7341 odsState.location, odsState.operands,
7342 odsState.attributes.getDictionary(odsState.getContext()),
7343 odsState.getRawProperties(),
7344 odsState.regions, inferredReturnTypes)))
7345 odsState.addTypes(inferredReturnTypes);
7346 else
7347 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
7348
7349}
7350
7351void IntAbsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
7352 odsState.addOperands(input);
7353 assert(resultTypes.size() == 1u && "mismatched number of results");
7354 odsState.addTypes(resultTypes);
7355}
7356
7357void IntAbsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7358 assert(operands.size() == 1u && "mismatched number of parameters");
7359 odsState.addOperands(operands);
7360 odsState.addAttributes(attributes);
7361 assert(resultTypes.size() == 1u && "mismatched number of return types");
7362 odsState.addTypes(resultTypes);
7363}
7364
7365void IntAbsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7366 assert(operands.size() == 1u && "mismatched number of parameters");
7367 odsState.addOperands(operands);
7368 odsState.addAttributes(attributes);
7369
7370 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7371 if (::mlir::succeeded(IntAbsOp::inferReturnTypes(odsBuilder.getContext(),
7372 odsState.location, operands,
7373 odsState.attributes.getDictionary(odsState.getContext()),
7374 odsState.getRawProperties(),
7375 odsState.regions, inferredReturnTypes))) {
7376 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
7377 odsState.addTypes(inferredReturnTypes);
7378 } else {
7379 ::llvm::report_fatal_error("Failed to infer result type(s).");
7380 }
7381}
7382
7383::llvm::LogicalResult IntAbsOp::verifyInvariantsImpl() {
7384 {
7385 unsigned index = 0; (void)index;
7386 auto valueGroup0 = getODSOperands(0);
7387
7388 for (auto v : valueGroup0) {
7389 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
7390 return ::mlir::failure();
7391 }
7392 }
7393 {
7394 unsigned index = 0; (void)index;
7395 auto valueGroup0 = getODSResults(0);
7396
7397 for (auto v : valueGroup0) {
7398 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
7399 return ::mlir::failure();
7400 }
7401 }
7402 return ::mlir::success();
7403}
7404
7405::llvm::LogicalResult IntAbsOp::verifyInvariants() {
7406 return verifyInvariantsImpl();
7407}
7408
7409::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) {
7410 inferredReturnTypes.resize(1);
7411 ::mlir::Builder odsBuilder(context);
7412 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
7413 inferredReturnTypes[0] = odsInferredType0;
7414 return ::mlir::success();
7415}
7416
7417::mlir::ParseResult IntAbsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7418 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
7419 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
7420 (void)inputOperandsLoc;
7421
7422 inputOperandsLoc = parser.getCurrentLocation();
7423 if (parser.parseOperand(inputRawOperand))
7424 return ::mlir::failure();
7425 {
7426 auto loc = parser.getCurrentLocation();(void)loc;
7427 if (parser.parseOptionalAttrDict(result.attributes))
7428 return ::mlir::failure();
7429 }
7430 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
7431 result.addTypes(odsBuildableType0);
7432 if (parser.resolveOperands(inputOperands, odsBuildableType0, inputOperandsLoc, result.operands))
7433 return ::mlir::failure();
7434 return ::mlir::success();
7435}
7436
7437void IntAbsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7438 _odsPrinter << ' ';
7439 _odsPrinter << getInput();
7440 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7441 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
7442}
7443
7444void IntAbsOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7445}
7446
7447} // namespace smt
7448} // namespace llzk
7449MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntAbsOp)
7450
7451namespace llzk {
7452namespace smt {
7453
7454//===----------------------------------------------------------------------===//
7455// ::llzk::smt::IntAddOp definitions
7456//===----------------------------------------------------------------------===//
7457
7458namespace detail {
7459std::pair<unsigned, unsigned> IntAddOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
7460 bool isVariadic[] = {true};
7461 int prevVariadicCount = 0;
7462 for (unsigned i = 0; i < index; ++i)
7463 if (isVariadic[i]) ++prevVariadicCount;
7464
7465 // Calculate how many dynamic values a static variadic operand corresponds to.
7466 // This assumes all static variadic operands have the same dynamic value count.
7467 int variadicSize = (odsOperandsSize - 0) / 1;
7468 // `index` passed in as the parameter is the static index which counts each
7469 // operand (variadic or not) as size 1. So here for each previous static variadic
7470 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
7471 // value pack for this static operand starts.
7472 int start = index + (variadicSize - 1) * prevVariadicCount;
7473 int size = isVariadic[index] ? variadicSize : 1;
7474 return {start, size};
7475}
7476
7477} // namespace detail
7479
7480::llvm::LogicalResult IntAddOpAdaptor::verify(::mlir::Location loc) {
7481 return ::mlir::success();
7482}
7483
7484std::pair<unsigned, unsigned> IntAddOp::getODSOperandIndexAndLength(unsigned index) {
7485 bool isVariadic[] = {true};
7486 int prevVariadicCount = 0;
7487 for (unsigned i = 0; i < index; ++i)
7488 if (isVariadic[i]) ++prevVariadicCount;
7489
7490 // Calculate how many dynamic values a static variadic operand corresponds to.
7491 // This assumes all static variadic operands have the same dynamic value count.
7492 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
7493 // `index` passed in as the parameter is the static index which counts each
7494 // operand (variadic or not) as size 1. So here for each previous static variadic
7495 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
7496 // value pack for this static operand starts.
7497 int start = index + (variadicSize - 1) * prevVariadicCount;
7498 int size = isVariadic[index] ? variadicSize : 1;
7499 return {start, size};
7500}
7501
7502::mlir::MutableOperandRange IntAddOp::getInputsMutable() {
7503 auto range = getODSOperandIndexAndLength(0);
7504 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
7505 return mutableRange;
7506}
7507
7508void IntAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
7509 odsState.addOperands(inputs);
7510 odsState.addTypes(result);
7511}
7512
7513void IntAddOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7514 odsState.addOperands(operands);
7515 odsState.addAttributes(attributes);
7516 assert(resultTypes.size() == 1u && "mismatched number of return types");
7517 odsState.addTypes(resultTypes);
7518}
7519
7520void IntAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7521 odsState.addOperands(operands);
7522 odsState.addAttributes(attributes);
7523
7524 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7525 if (::mlir::succeeded(IntAddOp::inferReturnTypes(odsBuilder.getContext(),
7526 odsState.location, operands,
7527 odsState.attributes.getDictionary(odsState.getContext()),
7528 odsState.getRawProperties(),
7529 odsState.regions, inferredReturnTypes))) {
7530 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
7531 odsState.addTypes(inferredReturnTypes);
7532 } else {
7533 ::llvm::report_fatal_error("Failed to infer result type(s).");
7534 }
7535}
7536
7537::llvm::LogicalResult IntAddOp::verifyInvariantsImpl() {
7538 {
7539 unsigned index = 0; (void)index;
7540 auto valueGroup0 = getODSOperands(0);
7541
7542 for (auto v : valueGroup0) {
7543 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT11(*this, v.getType(), "operand", index++)))
7544 return ::mlir::failure();
7545 }
7546 }
7547 {
7548 unsigned index = 0; (void)index;
7549 auto valueGroup0 = getODSResults(0);
7550
7551 for (auto v : valueGroup0) {
7552 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
7553 return ::mlir::failure();
7554 }
7555 }
7556 return ::mlir::success();
7557}
7558
7559::llvm::LogicalResult IntAddOp::verifyInvariants() {
7560 return verifyInvariantsImpl();
7561}
7562
7563::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) {
7564 inferredReturnTypes.resize(1);
7565 ::mlir::Builder odsBuilder(context);
7566 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
7567 inferredReturnTypes[0] = odsInferredType0;
7568 return ::mlir::success();
7569}
7570
7571::mlir::ParseResult IntAddOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7572 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
7573 ::llvm::SMLoc inputsOperandsLoc;
7574 (void)inputsOperandsLoc;
7575
7576 inputsOperandsLoc = parser.getCurrentLocation();
7577 if (parser.parseOperandList(inputsOperands))
7578 return ::mlir::failure();
7579 {
7580 auto loc = parser.getCurrentLocation();(void)loc;
7581 if (parser.parseOptionalAttrDict(result.attributes))
7582 return ::mlir::failure();
7583 }
7584 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
7585 result.addTypes(odsBuildableType0);
7586 if (parser.resolveOperands(inputsOperands, odsBuildableType0, inputsOperandsLoc, result.operands))
7587 return ::mlir::failure();
7588 return ::mlir::success();
7589}
7590
7591void IntAddOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7592 _odsPrinter << ' ';
7593 _odsPrinter << getInputs();
7594 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7595 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
7596}
7597
7598void IntAddOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7599}
7600
7601} // namespace smt
7602} // namespace llzk
7603MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntAddOp)
7604
7605namespace llzk {
7606namespace smt {
7607
7608//===----------------------------------------------------------------------===//
7609// ::llzk::smt::IntCmpOp definitions
7610//===----------------------------------------------------------------------===//
7611
7612namespace detail {
7613IntCmpOpGenericAdaptorBase::IntCmpOpGenericAdaptorBase(IntCmpOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
7614
7616 auto attr = getPredAttr();
7617 return attr.getValue();
7618}
7619
7620} // namespace detail
7622
7623::llvm::LogicalResult IntCmpOpAdaptor::verify(::mlir::Location loc) {
7624 auto tblgen_pred = getProperties().pred; (void)tblgen_pred;
7625 if (!tblgen_pred) return emitError(loc, "'smt.int.cmp' op ""requires attribute 'pred'");
7626
7627 if (tblgen_pred && !((::llvm::isa<::llzk::smt::IntPredicateAttr>(tblgen_pred))))
7628 return emitError(loc, "'smt.int.cmp' op ""attribute 'pred' failed to satisfy constraint: smt comparison predicate for integers");
7629 return ::mlir::success();
7630}
7631
7632::llvm::LogicalResult IntCmpOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7633 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
7634 if (!dict) {
7635 emitError() << "expected DictionaryAttr to set properties";
7636 return ::mlir::failure();
7637 }
7638
7639 {
7640 auto &propStorage = prop.pred;
7641 auto attr = dict.get("pred");
7642 if (attr) {
7643 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
7644 if (convertedAttr) {
7645 propStorage = convertedAttr;
7646 } else {
7647 emitError() << "Invalid attribute `pred` in property conversion: " << attr;
7648 return ::mlir::failure();
7649 }
7650 }
7651 }
7652 return ::mlir::success();
7653}
7654
7655::mlir::Attribute IntCmpOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
7656 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
7657 ::mlir::Builder odsBuilder{ctx};
7658
7659 {
7660 const auto &propStorage = prop.pred;
7661 if (propStorage)
7662 attrs.push_back(odsBuilder.getNamedAttr("pred",
7663 propStorage));
7664 }
7665
7666 if (!attrs.empty())
7667 return odsBuilder.getDictionaryAttr(attrs);
7668 return {};
7669}
7670
7671llvm::hash_code IntCmpOp::computePropertiesHash(const Properties &prop) {
7672 return llvm::hash_combine(
7673 llvm::hash_value(prop.pred.getAsOpaquePointer()));
7674}
7675
7676std::optional<mlir::Attribute> IntCmpOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
7677 if (name == "pred")
7678 return prop.pred;
7679 return std::nullopt;
7680}
7681
7682void IntCmpOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
7683 if (name == "pred") {
7684 prop.pred = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.pred)>>(value);
7685 return;
7686 }
7687}
7688
7689void IntCmpOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
7690 if (prop.pred) attrs.append("pred", prop.pred);
7691}
7692
7693::llvm::LogicalResult IntCmpOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7694 {
7695 ::mlir::Attribute attr = attrs.get(getPredAttrName(opName));
7696 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT8(attr, "pred", emitError)))
7697 return ::mlir::failure();
7698 }
7699 return ::mlir::success();
7700}
7701
7702::llvm::LogicalResult IntCmpOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
7703 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
7704 if (::mlir::failed(reader.readAttribute(prop.pred)))
7705 return ::mlir::failure();
7706 return ::mlir::success();
7707}
7708
7709void IntCmpOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
7710 auto &prop = getProperties(); (void)prop;
7711 writer.writeAttribute(prop.pred);
7712}
7713
7715 auto attr = getPredAttr();
7716 return attr.getValue();
7717}
7718
7720 getProperties().pred = ::llzk::smt::IntPredicateAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
7721}
7722
7723void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::IntPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7724 odsState.addOperands(lhs);
7725 odsState.addOperands(rhs);
7726 odsState.getOrAddProperties<Properties>().pred = pred;
7727 odsState.addTypes(result);
7728}
7729
7730void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::IntPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7731 odsState.addOperands(lhs);
7732 odsState.addOperands(rhs);
7733 odsState.getOrAddProperties<Properties>().pred = pred;
7734
7735 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7736 if (::mlir::succeeded(IntCmpOp::inferReturnTypes(odsBuilder.getContext(),
7737 odsState.location, odsState.operands,
7738 odsState.attributes.getDictionary(odsState.getContext()),
7739 odsState.getRawProperties(),
7740 odsState.regions, inferredReturnTypes)))
7741 odsState.addTypes(inferredReturnTypes);
7742 else
7743 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
7744
7745}
7746
7747void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::IntPredicateAttr pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7748 odsState.addOperands(lhs);
7749 odsState.addOperands(rhs);
7750 odsState.getOrAddProperties<Properties>().pred = pred;
7751 assert(resultTypes.size() == 1u && "mismatched number of results");
7752 odsState.addTypes(resultTypes);
7753}
7754
7755void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::smt::IntPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7756 odsState.addOperands(lhs);
7757 odsState.addOperands(rhs);
7758 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::IntPredicateAttr::get(odsBuilder.getContext(), pred);
7759 odsState.addTypes(result);
7760}
7761
7762void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::smt::IntPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7763 odsState.addOperands(lhs);
7764 odsState.addOperands(rhs);
7765 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::IntPredicateAttr::get(odsBuilder.getContext(), pred);
7766
7767 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7768 if (::mlir::succeeded(IntCmpOp::inferReturnTypes(odsBuilder.getContext(),
7769 odsState.location, odsState.operands,
7770 odsState.attributes.getDictionary(odsState.getContext()),
7771 odsState.getRawProperties(),
7772 odsState.regions, inferredReturnTypes)))
7773 odsState.addTypes(inferredReturnTypes);
7774 else
7775 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
7776
7777}
7778
7779void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::smt::IntPredicate pred, ::mlir::Value lhs, ::mlir::Value rhs) {
7780 odsState.addOperands(lhs);
7781 odsState.addOperands(rhs);
7782 odsState.getOrAddProperties<Properties>().pred = ::llzk::smt::IntPredicateAttr::get(odsBuilder.getContext(), pred);
7783 assert(resultTypes.size() == 1u && "mismatched number of results");
7784 odsState.addTypes(resultTypes);
7785}
7786
7787void IntCmpOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7788 assert(operands.size() == 2u && "mismatched number of parameters");
7789 odsState.addOperands(operands);
7790 odsState.addAttributes(attributes);
7791 assert(resultTypes.size() == 1u && "mismatched number of return types");
7792 odsState.addTypes(resultTypes);
7793
7794 if (!attributes.empty()) {
7795 ::mlir::OpaqueProperties properties =
7796 &odsState.getOrAddProperties<IntCmpOp::Properties>();
7797 std::optional<::mlir::RegisteredOperationName> info =
7798 odsState.name.getRegisteredInfo();
7799 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
7800 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
7801 ::llvm::report_fatal_error("Property conversion failed.");
7802 }
7803}
7804
7805void IntCmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7806 assert(operands.size() == 2u && "mismatched number of parameters");
7807 odsState.addOperands(operands);
7808 odsState.addAttributes(attributes);
7809
7810 if (!attributes.empty()) {
7811 ::mlir::OpaqueProperties properties =
7812 &odsState.getOrAddProperties<IntCmpOp::Properties>();
7813 std::optional<::mlir::RegisteredOperationName> info =
7814 odsState.name.getRegisteredInfo();
7815 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
7816 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
7817 ::llvm::report_fatal_error("Property conversion failed.");
7818 }
7819 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
7820 if (::mlir::succeeded(IntCmpOp::inferReturnTypes(odsBuilder.getContext(),
7821 odsState.location, operands,
7822 odsState.attributes.getDictionary(odsState.getContext()),
7823 odsState.getRawProperties(),
7824 odsState.regions, inferredReturnTypes))) {
7825 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
7826 odsState.addTypes(inferredReturnTypes);
7827 } else {
7828 ::llvm::report_fatal_error("Failed to infer result type(s).");
7829 }
7830}
7831
7832::llvm::LogicalResult IntCmpOp::verifyInvariantsImpl() {
7833 auto tblgen_pred = getProperties().pred; (void)tblgen_pred;
7834 if (!tblgen_pred) return emitOpError("requires attribute 'pred'");
7835
7836 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT8(*this, tblgen_pred, "pred")))
7837 return ::mlir::failure();
7838 {
7839 unsigned index = 0; (void)index;
7840 auto valueGroup0 = getODSOperands(0);
7841
7842 for (auto v : valueGroup0) {
7843 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
7844 return ::mlir::failure();
7845 }
7846 auto valueGroup1 = getODSOperands(1);
7847
7848 for (auto v : valueGroup1) {
7849 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
7850 return ::mlir::failure();
7851 }
7852 }
7853 {
7854 unsigned index = 0; (void)index;
7855 auto valueGroup0 = getODSResults(0);
7856
7857 for (auto v : valueGroup0) {
7858 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
7859 return ::mlir::failure();
7860 }
7861 }
7862 return ::mlir::success();
7863}
7864
7865::llvm::LogicalResult IntCmpOp::verifyInvariants() {
7866 return verifyInvariantsImpl();
7867}
7868
7869::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) {
7870 inferredReturnTypes.resize(1);
7871 ::mlir::Builder odsBuilder(context);
7872 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
7873 inferredReturnTypes[0] = odsInferredType0;
7874 return ::mlir::success();
7875}
7876
7877::mlir::ParseResult IntCmpOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7879 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
7880 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
7881 (void)lhsOperandsLoc;
7882 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
7883 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
7884 (void)rhsOperandsLoc;
7885
7886 {
7887 ::llvm::StringRef attrStr;
7888 ::mlir::NamedAttrList attrStorage;
7889 auto loc = parser.getCurrentLocation();
7890 if (parser.parseOptionalKeyword(&attrStr, {"lt","le","gt","ge"})) {
7891 ::mlir::StringAttr attrVal;
7892 ::mlir::OptionalParseResult parseResult =
7893 parser.parseOptionalAttribute(attrVal,
7894 parser.getBuilder().getNoneType(),
7895 "pred", attrStorage);
7896 if (parseResult.has_value()) {
7897 if (failed(*parseResult))
7898 return ::mlir::failure();
7899 attrStr = attrVal.getValue();
7900 } else {
7901 return parser.emitError(loc, "expected string or keyword containing one of the following enum values for attribute 'pred' [lt, le, gt, ge]");
7902 }
7903 }
7904 if (!attrStr.empty()) {
7905 auto attrOptional = ::llzk::smt::symbolizeIntPredicate(attrStr);
7906 if (!attrOptional)
7907 return parser.emitError(loc, "invalid ")
7908 << "pred attribute specification: \"" << attrStr << '"';;
7909
7910 predAttr = ::llzk::smt::IntPredicateAttr::get(parser.getBuilder().getContext(), *attrOptional);
7911 result.getOrAddProperties<IntCmpOp::Properties>().pred = predAttr;
7912 }
7913 }
7914
7915 lhsOperandsLoc = parser.getCurrentLocation();
7916 if (parser.parseOperand(lhsRawOperand))
7917 return ::mlir::failure();
7918 if (parser.parseComma())
7919 return ::mlir::failure();
7920
7921 rhsOperandsLoc = parser.getCurrentLocation();
7922 if (parser.parseOperand(rhsRawOperand))
7923 return ::mlir::failure();
7924 {
7925 auto loc = parser.getCurrentLocation();(void)loc;
7926 if (parser.parseOptionalAttrDict(result.attributes))
7927 return ::mlir::failure();
7928 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
7929 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
7930 })))
7931 return ::mlir::failure();
7932 }
7933 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
7934 ::mlir::Type odsBuildableType1 = parser.getBuilder().getType<::llzk::smt::IntType>();
7935 result.addTypes(odsBuildableType0);
7936 if (parser.resolveOperands(lhsOperands, odsBuildableType1, lhsOperandsLoc, result.operands))
7937 return ::mlir::failure();
7938 if (parser.resolveOperands(rhsOperands, odsBuildableType1, rhsOperandsLoc, result.operands))
7939 return ::mlir::failure();
7940 return ::mlir::success();
7941}
7942
7943void IntCmpOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
7944 _odsPrinter << ' ';
7945
7946 {
7947 auto caseValue = getPred();
7948 auto caseValueStr = stringifyIntPredicate(caseValue);
7949 _odsPrinter << caseValueStr;
7950 }
7951 _odsPrinter << ' ';
7952 _odsPrinter << getLhs();
7953 _odsPrinter << ",";
7954 _odsPrinter << ' ';
7955 _odsPrinter << getRhs();
7956 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
7957 elidedAttrs.push_back("pred");
7958 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
7959}
7960
7961void IntCmpOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7962}
7963
7964} // namespace smt
7965} // namespace llzk
7966MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntCmpOp)
7967
7968namespace llzk {
7969namespace smt {
7970
7971//===----------------------------------------------------------------------===//
7972// ::llzk::smt::IntConstantOp definitions
7973//===----------------------------------------------------------------------===//
7974
7975namespace detail {
7977
7979 auto attr = getValueAttr();
7980 return attr.getValue();
7981}
7982
7983} // namespace detail
7985
7986::llvm::LogicalResult IntConstantOpAdaptor::verify(::mlir::Location loc) {
7987 auto tblgen_value = getProperties().value; (void)tblgen_value;
7988 if (!tblgen_value) return emitError(loc, "'smt.int.constant' op ""requires attribute 'value'");
7989
7990 if (tblgen_value && !((::llvm::isa<::mlir::IntegerAttr>(tblgen_value))))
7991 return emitError(loc, "'smt.int.constant' op ""attribute 'value' failed to satisfy constraint: arbitrary integer attribute");
7992 return ::mlir::success();
7993}
7994
7995::llvm::LogicalResult IntConstantOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7996 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
7997 if (!dict) {
7998 emitError() << "expected DictionaryAttr to set properties";
7999 return ::mlir::failure();
8000 }
8001
8002 {
8003 auto &propStorage = prop.value;
8004 auto attr = dict.get("value");
8005 if (attr) {
8006 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
8007 if (convertedAttr) {
8008 propStorage = convertedAttr;
8009 } else {
8010 emitError() << "Invalid attribute `value` in property conversion: " << attr;
8011 return ::mlir::failure();
8012 }
8013 }
8014 }
8015 return ::mlir::success();
8016}
8017
8018::mlir::Attribute IntConstantOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
8019 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
8020 ::mlir::Builder odsBuilder{ctx};
8021
8022 {
8023 const auto &propStorage = prop.value;
8024 if (propStorage)
8025 attrs.push_back(odsBuilder.getNamedAttr("value",
8026 propStorage));
8027 }
8028
8029 if (!attrs.empty())
8030 return odsBuilder.getDictionaryAttr(attrs);
8031 return {};
8032}
8033
8035 return llvm::hash_combine(
8036 llvm::hash_value(prop.value.getAsOpaquePointer()));
8037}
8038
8039std::optional<mlir::Attribute> IntConstantOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
8040 if (name == "value")
8041 return prop.value;
8042 return std::nullopt;
8043}
8044
8045void IntConstantOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
8046 if (name == "value") {
8047 prop.value = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.value)>>(value);
8048 return;
8049 }
8050}
8051
8052void IntConstantOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
8053 if (prop.value) attrs.append("value", prop.value);
8054}
8055
8056::llvm::LogicalResult IntConstantOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8057 {
8058 ::mlir::Attribute attr = attrs.get(getValueAttrName(opName));
8059 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT9(attr, "value", emitError)))
8060 return ::mlir::failure();
8061 }
8062 return ::mlir::success();
8063}
8064
8065::llvm::LogicalResult IntConstantOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
8066 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
8067 if (::mlir::failed(reader.readAttribute(prop.value)))
8068 return ::mlir::failure();
8069 return ::mlir::success();
8070}
8071
8072void IntConstantOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
8073 auto &prop = getProperties(); (void)prop;
8074 writer.writeAttribute(prop.value);
8075}
8076
8078 auto attr = getValueAttr();
8079 return attr.getValue();
8080}
8081
8082void IntConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::IntegerAttr value) {
8083 odsState.getOrAddProperties<Properties>().value = value;
8084 odsState.addTypes(result);
8085}
8086
8087void IntConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr value) {
8088 odsState.getOrAddProperties<Properties>().value = value;
8089
8090 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8091 if (::mlir::succeeded(IntConstantOp::inferReturnTypes(odsBuilder.getContext(),
8092 odsState.location, odsState.operands,
8093 odsState.attributes.getDictionary(odsState.getContext()),
8094 odsState.getRawProperties(),
8095 odsState.regions, inferredReturnTypes)))
8096 odsState.addTypes(inferredReturnTypes);
8097 else
8098 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8099
8100}
8101
8102void IntConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr value) {
8103 odsState.getOrAddProperties<Properties>().value = value;
8104 assert(resultTypes.size() == 1u && "mismatched number of results");
8105 odsState.addTypes(resultTypes);
8106}
8107
8108void IntConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8109 assert(operands.size() == 0u && "mismatched number of parameters");
8110 odsState.addOperands(operands);
8111 odsState.addAttributes(attributes);
8112 assert(resultTypes.size() == 1u && "mismatched number of return types");
8113 odsState.addTypes(resultTypes);
8114
8115 if (!attributes.empty()) {
8116 ::mlir::OpaqueProperties properties =
8117 &odsState.getOrAddProperties<IntConstantOp::Properties>();
8118 std::optional<::mlir::RegisteredOperationName> info =
8119 odsState.name.getRegisteredInfo();
8120 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
8121 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
8122 ::llvm::report_fatal_error("Property conversion failed.");
8123 }
8124}
8125
8126void IntConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8127 assert(operands.size() == 0u && "mismatched number of parameters");
8128 odsState.addOperands(operands);
8129 odsState.addAttributes(attributes);
8130
8131 if (!attributes.empty()) {
8132 ::mlir::OpaqueProperties properties =
8133 &odsState.getOrAddProperties<IntConstantOp::Properties>();
8134 std::optional<::mlir::RegisteredOperationName> info =
8135 odsState.name.getRegisteredInfo();
8136 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
8137 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
8138 ::llvm::report_fatal_error("Property conversion failed.");
8139 }
8140 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8141 if (::mlir::succeeded(IntConstantOp::inferReturnTypes(odsBuilder.getContext(),
8142 odsState.location, operands,
8143 odsState.attributes.getDictionary(odsState.getContext()),
8144 odsState.getRawProperties(),
8145 odsState.regions, inferredReturnTypes))) {
8146 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8147 odsState.addTypes(inferredReturnTypes);
8148 } else {
8149 ::llvm::report_fatal_error("Failed to infer result type(s).");
8150 }
8151}
8152
8154 auto tblgen_value = getProperties().value; (void)tblgen_value;
8155 if (!tblgen_value) return emitOpError("requires attribute 'value'");
8156
8157 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT9(*this, tblgen_value, "value")))
8158 return ::mlir::failure();
8159 {
8160 unsigned index = 0; (void)index;
8161 auto valueGroup0 = getODSResults(0);
8162
8163 for (auto v : valueGroup0) {
8164 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8165 return ::mlir::failure();
8166 }
8167 }
8168 return ::mlir::success();
8169}
8170
8171::llvm::LogicalResult IntConstantOp::verifyInvariants() {
8172 return verifyInvariantsImpl();
8173}
8174
8175::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) {
8176 inferredReturnTypes.resize(1);
8177 ::mlir::Builder odsBuilder(context);
8178 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8179 inferredReturnTypes[0] = odsInferredType0;
8180 return ::mlir::success();
8181}
8182
8183void IntConstantOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8184}
8185
8186} // namespace smt
8187} // namespace llzk
8188MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntConstantOp)
8189
8190namespace llzk {
8191namespace smt {
8192
8193//===----------------------------------------------------------------------===//
8194// ::llzk::smt::IntDivOp definitions
8195//===----------------------------------------------------------------------===//
8196
8197namespace detail {
8198} // namespace detail
8200
8201::llvm::LogicalResult IntDivOpAdaptor::verify(::mlir::Location loc) {
8202 return ::mlir::success();
8203}
8204
8205void IntDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
8206 odsState.addOperands(lhs);
8207 odsState.addOperands(rhs);
8208 odsState.addTypes(result);
8209}
8210
8211void IntDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
8212 odsState.addOperands(lhs);
8213 odsState.addOperands(rhs);
8214
8215 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8216 if (::mlir::succeeded(IntDivOp::inferReturnTypes(odsBuilder.getContext(),
8217 odsState.location, odsState.operands,
8218 odsState.attributes.getDictionary(odsState.getContext()),
8219 odsState.getRawProperties(),
8220 odsState.regions, inferredReturnTypes)))
8221 odsState.addTypes(inferredReturnTypes);
8222 else
8223 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8224
8225}
8226
8227void IntDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
8228 odsState.addOperands(lhs);
8229 odsState.addOperands(rhs);
8230 assert(resultTypes.size() == 1u && "mismatched number of results");
8231 odsState.addTypes(resultTypes);
8232}
8233
8234void IntDivOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8235 assert(operands.size() == 2u && "mismatched number of parameters");
8236 odsState.addOperands(operands);
8237 odsState.addAttributes(attributes);
8238 assert(resultTypes.size() == 1u && "mismatched number of return types");
8239 odsState.addTypes(resultTypes);
8240}
8241
8242void IntDivOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8243 assert(operands.size() == 2u && "mismatched number of parameters");
8244 odsState.addOperands(operands);
8245 odsState.addAttributes(attributes);
8246
8247 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8248 if (::mlir::succeeded(IntDivOp::inferReturnTypes(odsBuilder.getContext(),
8249 odsState.location, operands,
8250 odsState.attributes.getDictionary(odsState.getContext()),
8251 odsState.getRawProperties(),
8252 odsState.regions, inferredReturnTypes))) {
8253 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8254 odsState.addTypes(inferredReturnTypes);
8255 } else {
8256 ::llvm::report_fatal_error("Failed to infer result type(s).");
8257 }
8258}
8259
8260::llvm::LogicalResult IntDivOp::verifyInvariantsImpl() {
8261 {
8262 unsigned index = 0; (void)index;
8263 auto valueGroup0 = getODSOperands(0);
8264
8265 for (auto v : valueGroup0) {
8266 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8267 return ::mlir::failure();
8268 }
8269 auto valueGroup1 = getODSOperands(1);
8270
8271 for (auto v : valueGroup1) {
8272 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8273 return ::mlir::failure();
8274 }
8275 }
8276 {
8277 unsigned index = 0; (void)index;
8278 auto valueGroup0 = getODSResults(0);
8279
8280 for (auto v : valueGroup0) {
8281 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8282 return ::mlir::failure();
8283 }
8284 }
8285 return ::mlir::success();
8286}
8287
8288::llvm::LogicalResult IntDivOp::verifyInvariants() {
8289 return verifyInvariantsImpl();
8290}
8291
8292::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) {
8293 inferredReturnTypes.resize(1);
8294 ::mlir::Builder odsBuilder(context);
8295 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8296 inferredReturnTypes[0] = odsInferredType0;
8297 return ::mlir::success();
8298}
8299
8300::mlir::ParseResult IntDivOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8301 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
8302 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
8303 (void)lhsOperandsLoc;
8304 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
8305 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
8306 (void)rhsOperandsLoc;
8307
8308 lhsOperandsLoc = parser.getCurrentLocation();
8309 if (parser.parseOperand(lhsRawOperand))
8310 return ::mlir::failure();
8311 if (parser.parseComma())
8312 return ::mlir::failure();
8313
8314 rhsOperandsLoc = parser.getCurrentLocation();
8315 if (parser.parseOperand(rhsRawOperand))
8316 return ::mlir::failure();
8317 {
8318 auto loc = parser.getCurrentLocation();(void)loc;
8319 if (parser.parseOptionalAttrDict(result.attributes))
8320 return ::mlir::failure();
8321 }
8322 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
8323 result.addTypes(odsBuildableType0);
8324 if (parser.resolveOperands(lhsOperands, odsBuildableType0, lhsOperandsLoc, result.operands))
8325 return ::mlir::failure();
8326 if (parser.resolveOperands(rhsOperands, odsBuildableType0, rhsOperandsLoc, result.operands))
8327 return ::mlir::failure();
8328 return ::mlir::success();
8329}
8330
8331void IntDivOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
8332 _odsPrinter << ' ';
8333 _odsPrinter << getLhs();
8334 _odsPrinter << ",";
8335 _odsPrinter << ' ';
8336 _odsPrinter << getRhs();
8337 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
8338 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
8339}
8340
8341void IntDivOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8342}
8343
8344} // namespace smt
8345} // namespace llzk
8346MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntDivOp)
8347
8348namespace llzk {
8349namespace smt {
8350
8351//===----------------------------------------------------------------------===//
8352// ::llzk::smt::IntModOp definitions
8353//===----------------------------------------------------------------------===//
8354
8355namespace detail {
8356} // namespace detail
8358
8359::llvm::LogicalResult IntModOpAdaptor::verify(::mlir::Location loc) {
8360 return ::mlir::success();
8361}
8362
8363void IntModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
8364 odsState.addOperands(lhs);
8365 odsState.addOperands(rhs);
8366 odsState.addTypes(result);
8367}
8368
8369void IntModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
8370 odsState.addOperands(lhs);
8371 odsState.addOperands(rhs);
8372
8373 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8374 if (::mlir::succeeded(IntModOp::inferReturnTypes(odsBuilder.getContext(),
8375 odsState.location, odsState.operands,
8376 odsState.attributes.getDictionary(odsState.getContext()),
8377 odsState.getRawProperties(),
8378 odsState.regions, inferredReturnTypes)))
8379 odsState.addTypes(inferredReturnTypes);
8380 else
8381 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8382
8383}
8384
8385void IntModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
8386 odsState.addOperands(lhs);
8387 odsState.addOperands(rhs);
8388 assert(resultTypes.size() == 1u && "mismatched number of results");
8389 odsState.addTypes(resultTypes);
8390}
8391
8392void IntModOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8393 assert(operands.size() == 2u && "mismatched number of parameters");
8394 odsState.addOperands(operands);
8395 odsState.addAttributes(attributes);
8396 assert(resultTypes.size() == 1u && "mismatched number of return types");
8397 odsState.addTypes(resultTypes);
8398}
8399
8400void IntModOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8401 assert(operands.size() == 2u && "mismatched number of parameters");
8402 odsState.addOperands(operands);
8403 odsState.addAttributes(attributes);
8404
8405 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8406 if (::mlir::succeeded(IntModOp::inferReturnTypes(odsBuilder.getContext(),
8407 odsState.location, operands,
8408 odsState.attributes.getDictionary(odsState.getContext()),
8409 odsState.getRawProperties(),
8410 odsState.regions, inferredReturnTypes))) {
8411 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8412 odsState.addTypes(inferredReturnTypes);
8413 } else {
8414 ::llvm::report_fatal_error("Failed to infer result type(s).");
8415 }
8416}
8417
8418::llvm::LogicalResult IntModOp::verifyInvariantsImpl() {
8419 {
8420 unsigned index = 0; (void)index;
8421 auto valueGroup0 = getODSOperands(0);
8422
8423 for (auto v : valueGroup0) {
8424 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8425 return ::mlir::failure();
8426 }
8427 auto valueGroup1 = getODSOperands(1);
8428
8429 for (auto v : valueGroup1) {
8430 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8431 return ::mlir::failure();
8432 }
8433 }
8434 {
8435 unsigned index = 0; (void)index;
8436 auto valueGroup0 = getODSResults(0);
8437
8438 for (auto v : valueGroup0) {
8439 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8440 return ::mlir::failure();
8441 }
8442 }
8443 return ::mlir::success();
8444}
8445
8446::llvm::LogicalResult IntModOp::verifyInvariants() {
8447 return verifyInvariantsImpl();
8448}
8449
8450::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) {
8451 inferredReturnTypes.resize(1);
8452 ::mlir::Builder odsBuilder(context);
8453 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8454 inferredReturnTypes[0] = odsInferredType0;
8455 return ::mlir::success();
8456}
8457
8458::mlir::ParseResult IntModOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8459 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
8460 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
8461 (void)lhsOperandsLoc;
8462 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
8463 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
8464 (void)rhsOperandsLoc;
8465
8466 lhsOperandsLoc = parser.getCurrentLocation();
8467 if (parser.parseOperand(lhsRawOperand))
8468 return ::mlir::failure();
8469 if (parser.parseComma())
8470 return ::mlir::failure();
8471
8472 rhsOperandsLoc = parser.getCurrentLocation();
8473 if (parser.parseOperand(rhsRawOperand))
8474 return ::mlir::failure();
8475 {
8476 auto loc = parser.getCurrentLocation();(void)loc;
8477 if (parser.parseOptionalAttrDict(result.attributes))
8478 return ::mlir::failure();
8479 }
8480 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
8481 result.addTypes(odsBuildableType0);
8482 if (parser.resolveOperands(lhsOperands, odsBuildableType0, lhsOperandsLoc, result.operands))
8483 return ::mlir::failure();
8484 if (parser.resolveOperands(rhsOperands, odsBuildableType0, rhsOperandsLoc, result.operands))
8485 return ::mlir::failure();
8486 return ::mlir::success();
8487}
8488
8489void IntModOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
8490 _odsPrinter << ' ';
8491 _odsPrinter << getLhs();
8492 _odsPrinter << ",";
8493 _odsPrinter << ' ';
8494 _odsPrinter << getRhs();
8495 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
8496 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
8497}
8498
8499void IntModOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8500}
8501
8502} // namespace smt
8503} // namespace llzk
8504MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntModOp)
8505
8506namespace llzk {
8507namespace smt {
8508
8509//===----------------------------------------------------------------------===//
8510// ::llzk::smt::IntMulOp definitions
8511//===----------------------------------------------------------------------===//
8512
8513namespace detail {
8514std::pair<unsigned, unsigned> IntMulOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
8515 bool isVariadic[] = {true};
8516 int prevVariadicCount = 0;
8517 for (unsigned i = 0; i < index; ++i)
8518 if (isVariadic[i]) ++prevVariadicCount;
8519
8520 // Calculate how many dynamic values a static variadic operand corresponds to.
8521 // This assumes all static variadic operands have the same dynamic value count.
8522 int variadicSize = (odsOperandsSize - 0) / 1;
8523 // `index` passed in as the parameter is the static index which counts each
8524 // operand (variadic or not) as size 1. So here for each previous static variadic
8525 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
8526 // value pack for this static operand starts.
8527 int start = index + (variadicSize - 1) * prevVariadicCount;
8528 int size = isVariadic[index] ? variadicSize : 1;
8529 return {start, size};
8530}
8531
8532} // namespace detail
8534
8535::llvm::LogicalResult IntMulOpAdaptor::verify(::mlir::Location loc) {
8536 return ::mlir::success();
8537}
8538
8539std::pair<unsigned, unsigned> IntMulOp::getODSOperandIndexAndLength(unsigned index) {
8540 bool isVariadic[] = {true};
8541 int prevVariadicCount = 0;
8542 for (unsigned i = 0; i < index; ++i)
8543 if (isVariadic[i]) ++prevVariadicCount;
8544
8545 // Calculate how many dynamic values a static variadic operand corresponds to.
8546 // This assumes all static variadic operands have the same dynamic value count.
8547 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
8548 // `index` passed in as the parameter is the static index which counts each
8549 // operand (variadic or not) as size 1. So here for each previous static variadic
8550 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
8551 // value pack for this static operand starts.
8552 int start = index + (variadicSize - 1) * prevVariadicCount;
8553 int size = isVariadic[index] ? variadicSize : 1;
8554 return {start, size};
8555}
8556
8557::mlir::MutableOperandRange IntMulOp::getInputsMutable() {
8558 auto range = getODSOperandIndexAndLength(0);
8559 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
8560 return mutableRange;
8561}
8562
8563void IntMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
8564 odsState.addOperands(inputs);
8565 odsState.addTypes(result);
8566}
8567
8568void IntMulOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8569 odsState.addOperands(operands);
8570 odsState.addAttributes(attributes);
8571 assert(resultTypes.size() == 1u && "mismatched number of return types");
8572 odsState.addTypes(resultTypes);
8573}
8574
8575void IntMulOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8576 odsState.addOperands(operands);
8577 odsState.addAttributes(attributes);
8578
8579 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8580 if (::mlir::succeeded(IntMulOp::inferReturnTypes(odsBuilder.getContext(),
8581 odsState.location, operands,
8582 odsState.attributes.getDictionary(odsState.getContext()),
8583 odsState.getRawProperties(),
8584 odsState.regions, inferredReturnTypes))) {
8585 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8586 odsState.addTypes(inferredReturnTypes);
8587 } else {
8588 ::llvm::report_fatal_error("Failed to infer result type(s).");
8589 }
8590}
8591
8592::llvm::LogicalResult IntMulOp::verifyInvariantsImpl() {
8593 {
8594 unsigned index = 0; (void)index;
8595 auto valueGroup0 = getODSOperands(0);
8596
8597 for (auto v : valueGroup0) {
8598 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT11(*this, v.getType(), "operand", index++)))
8599 return ::mlir::failure();
8600 }
8601 }
8602 {
8603 unsigned index = 0; (void)index;
8604 auto valueGroup0 = getODSResults(0);
8605
8606 for (auto v : valueGroup0) {
8607 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8608 return ::mlir::failure();
8609 }
8610 }
8611 return ::mlir::success();
8612}
8613
8614::llvm::LogicalResult IntMulOp::verifyInvariants() {
8615 return verifyInvariantsImpl();
8616}
8617
8618::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) {
8619 inferredReturnTypes.resize(1);
8620 ::mlir::Builder odsBuilder(context);
8621 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8622 inferredReturnTypes[0] = odsInferredType0;
8623 return ::mlir::success();
8624}
8625
8626::mlir::ParseResult IntMulOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8627 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
8628 ::llvm::SMLoc inputsOperandsLoc;
8629 (void)inputsOperandsLoc;
8630
8631 inputsOperandsLoc = parser.getCurrentLocation();
8632 if (parser.parseOperandList(inputsOperands))
8633 return ::mlir::failure();
8634 {
8635 auto loc = parser.getCurrentLocation();(void)loc;
8636 if (parser.parseOptionalAttrDict(result.attributes))
8637 return ::mlir::failure();
8638 }
8639 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
8640 result.addTypes(odsBuildableType0);
8641 if (parser.resolveOperands(inputsOperands, odsBuildableType0, inputsOperandsLoc, result.operands))
8642 return ::mlir::failure();
8643 return ::mlir::success();
8644}
8645
8646void IntMulOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
8647 _odsPrinter << ' ';
8648 _odsPrinter << getInputs();
8649 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
8650 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
8651}
8652
8653void IntMulOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8654}
8655
8656} // namespace smt
8657} // namespace llzk
8658MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntMulOp)
8659
8660namespace llzk {
8661namespace smt {
8662
8663//===----------------------------------------------------------------------===//
8664// ::llzk::smt::IntNegOp definitions
8665//===----------------------------------------------------------------------===//
8666
8667namespace detail {
8668} // namespace detail
8670
8671::llvm::LogicalResult IntNegOpAdaptor::verify(::mlir::Location loc) {
8672 return ::mlir::success();
8673}
8674
8675void IntNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
8676 odsState.addOperands(input);
8677 odsState.addTypes(result);
8678}
8679
8680void IntNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
8681 odsState.addOperands(input);
8682
8683 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8684 if (::mlir::succeeded(IntNegOp::inferReturnTypes(odsBuilder.getContext(),
8685 odsState.location, odsState.operands,
8686 odsState.attributes.getDictionary(odsState.getContext()),
8687 odsState.getRawProperties(),
8688 odsState.regions, inferredReturnTypes)))
8689 odsState.addTypes(inferredReturnTypes);
8690 else
8691 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8692
8693}
8694
8695void IntNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
8696 odsState.addOperands(input);
8697 assert(resultTypes.size() == 1u && "mismatched number of results");
8698 odsState.addTypes(resultTypes);
8699}
8700
8701void IntNegOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8702 assert(operands.size() == 1u && "mismatched number of parameters");
8703 odsState.addOperands(operands);
8704 odsState.addAttributes(attributes);
8705 assert(resultTypes.size() == 1u && "mismatched number of return types");
8706 odsState.addTypes(resultTypes);
8707}
8708
8709void IntNegOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8710 assert(operands.size() == 1u && "mismatched number of parameters");
8711 odsState.addOperands(operands);
8712 odsState.addAttributes(attributes);
8713
8714 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8715 if (::mlir::succeeded(IntNegOp::inferReturnTypes(odsBuilder.getContext(),
8716 odsState.location, operands,
8717 odsState.attributes.getDictionary(odsState.getContext()),
8718 odsState.getRawProperties(),
8719 odsState.regions, inferredReturnTypes))) {
8720 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8721 odsState.addTypes(inferredReturnTypes);
8722 } else {
8723 ::llvm::report_fatal_error("Failed to infer result type(s).");
8724 }
8725}
8726
8727::llvm::LogicalResult IntNegOp::verifyInvariantsImpl() {
8728 {
8729 unsigned index = 0; (void)index;
8730 auto valueGroup0 = getODSOperands(0);
8731
8732 for (auto v : valueGroup0) {
8733 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8734 return ::mlir::failure();
8735 }
8736 }
8737 {
8738 unsigned index = 0; (void)index;
8739 auto valueGroup0 = getODSResults(0);
8740
8741 for (auto v : valueGroup0) {
8742 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8743 return ::mlir::failure();
8744 }
8745 }
8746 return ::mlir::success();
8747}
8748
8749::llvm::LogicalResult IntNegOp::verifyInvariants() {
8750 return verifyInvariantsImpl();
8751}
8752
8753::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) {
8754 inferredReturnTypes.resize(1);
8755 ::mlir::Builder odsBuilder(context);
8756 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8757 inferredReturnTypes[0] = odsInferredType0;
8758 return ::mlir::success();
8759}
8760
8761::mlir::ParseResult IntNegOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8762 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
8763 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
8764 (void)inputOperandsLoc;
8765
8766 inputOperandsLoc = parser.getCurrentLocation();
8767 if (parser.parseOperand(inputRawOperand))
8768 return ::mlir::failure();
8769 {
8770 auto loc = parser.getCurrentLocation();(void)loc;
8771 if (parser.parseOptionalAttrDict(result.attributes))
8772 return ::mlir::failure();
8773 }
8774 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
8775 result.addTypes(odsBuildableType0);
8776 if (parser.resolveOperands(inputOperands, odsBuildableType0, inputOperandsLoc, result.operands))
8777 return ::mlir::failure();
8778 return ::mlir::success();
8779}
8780
8781void IntNegOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
8782 _odsPrinter << ' ';
8783 _odsPrinter << getInput();
8784 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
8785 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
8786}
8787
8788void IntNegOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8789}
8790
8791} // namespace smt
8792} // namespace llzk
8793MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntNegOp)
8794
8795namespace llzk {
8796namespace smt {
8797
8798//===----------------------------------------------------------------------===//
8799// ::llzk::smt::IntSubOp definitions
8800//===----------------------------------------------------------------------===//
8801
8802namespace detail {
8803} // namespace detail
8805
8806::llvm::LogicalResult IntSubOpAdaptor::verify(::mlir::Location loc) {
8807 return ::mlir::success();
8808}
8809
8810void IntSubOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
8811 odsState.addOperands(lhs);
8812 odsState.addOperands(rhs);
8813 odsState.addTypes(result);
8814}
8815
8816void IntSubOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
8817 odsState.addOperands(lhs);
8818 odsState.addOperands(rhs);
8819
8820 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8821 if (::mlir::succeeded(IntSubOp::inferReturnTypes(odsBuilder.getContext(),
8822 odsState.location, odsState.operands,
8823 odsState.attributes.getDictionary(odsState.getContext()),
8824 odsState.getRawProperties(),
8825 odsState.regions, inferredReturnTypes)))
8826 odsState.addTypes(inferredReturnTypes);
8827 else
8828 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8829
8830}
8831
8832void IntSubOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
8833 odsState.addOperands(lhs);
8834 odsState.addOperands(rhs);
8835 assert(resultTypes.size() == 1u && "mismatched number of results");
8836 odsState.addTypes(resultTypes);
8837}
8838
8839void IntSubOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8840 assert(operands.size() == 2u && "mismatched number of parameters");
8841 odsState.addOperands(operands);
8842 odsState.addAttributes(attributes);
8843 assert(resultTypes.size() == 1u && "mismatched number of return types");
8844 odsState.addTypes(resultTypes);
8845}
8846
8847void IntSubOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8848 assert(operands.size() == 2u && "mismatched number of parameters");
8849 odsState.addOperands(operands);
8850 odsState.addAttributes(attributes);
8851
8852 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8853 if (::mlir::succeeded(IntSubOp::inferReturnTypes(odsBuilder.getContext(),
8854 odsState.location, operands,
8855 odsState.attributes.getDictionary(odsState.getContext()),
8856 odsState.getRawProperties(),
8857 odsState.regions, inferredReturnTypes))) {
8858 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8859 odsState.addTypes(inferredReturnTypes);
8860 } else {
8861 ::llvm::report_fatal_error("Failed to infer result type(s).");
8862 }
8863}
8864
8865::llvm::LogicalResult IntSubOp::verifyInvariantsImpl() {
8866 {
8867 unsigned index = 0; (void)index;
8868 auto valueGroup0 = getODSOperands(0);
8869
8870 for (auto v : valueGroup0) {
8871 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8872 return ::mlir::failure();
8873 }
8874 auto valueGroup1 = getODSOperands(1);
8875
8876 for (auto v : valueGroup1) {
8877 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "operand", index++)))
8878 return ::mlir::failure();
8879 }
8880 }
8881 {
8882 unsigned index = 0; (void)index;
8883 auto valueGroup0 = getODSResults(0);
8884
8885 for (auto v : valueGroup0) {
8886 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT9(*this, v.getType(), "result", index++)))
8887 return ::mlir::failure();
8888 }
8889 }
8890 return ::mlir::success();
8891}
8892
8893::llvm::LogicalResult IntSubOp::verifyInvariants() {
8894 return verifyInvariantsImpl();
8895}
8896
8897::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) {
8898 inferredReturnTypes.resize(1);
8899 ::mlir::Builder odsBuilder(context);
8900 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::IntType>();
8901 inferredReturnTypes[0] = odsInferredType0;
8902 return ::mlir::success();
8903}
8904
8905::mlir::ParseResult IntSubOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8906 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
8907 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
8908 (void)lhsOperandsLoc;
8909 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
8910 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
8911 (void)rhsOperandsLoc;
8912
8913 lhsOperandsLoc = parser.getCurrentLocation();
8914 if (parser.parseOperand(lhsRawOperand))
8915 return ::mlir::failure();
8916 if (parser.parseComma())
8917 return ::mlir::failure();
8918
8919 rhsOperandsLoc = parser.getCurrentLocation();
8920 if (parser.parseOperand(rhsRawOperand))
8921 return ::mlir::failure();
8922 {
8923 auto loc = parser.getCurrentLocation();(void)loc;
8924 if (parser.parseOptionalAttrDict(result.attributes))
8925 return ::mlir::failure();
8926 }
8927 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::IntType>();
8928 result.addTypes(odsBuildableType0);
8929 if (parser.resolveOperands(lhsOperands, odsBuildableType0, lhsOperandsLoc, result.operands))
8930 return ::mlir::failure();
8931 if (parser.resolveOperands(rhsOperands, odsBuildableType0, rhsOperandsLoc, result.operands))
8932 return ::mlir::failure();
8933 return ::mlir::success();
8934}
8935
8936void IntSubOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
8937 _odsPrinter << ' ';
8938 _odsPrinter << getLhs();
8939 _odsPrinter << ",";
8940 _odsPrinter << ' ';
8941 _odsPrinter << getRhs();
8942 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
8943 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
8944}
8945
8946void IntSubOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8947}
8948
8949} // namespace smt
8950} // namespace llzk
8951MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IntSubOp)
8952
8953namespace llzk {
8954namespace smt {
8955
8956//===----------------------------------------------------------------------===//
8957// ::llzk::smt::IteOp definitions
8958//===----------------------------------------------------------------------===//
8959
8960namespace detail {
8961} // namespace detail
8963
8964::llvm::LogicalResult IteOpAdaptor::verify(::mlir::Location loc) {
8965 return ::mlir::success();
8966}
8967
8968void IteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value cond, ::mlir::Value thenValue, ::mlir::Value elseValue) {
8969 odsState.addOperands(cond);
8970 odsState.addOperands(thenValue);
8971 odsState.addOperands(elseValue);
8972 odsState.addTypes(result);
8973}
8974
8975void IteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value cond, ::mlir::Value thenValue, ::mlir::Value elseValue) {
8976 odsState.addOperands(cond);
8977 odsState.addOperands(thenValue);
8978 odsState.addOperands(elseValue);
8979
8980 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8981 if (::mlir::succeeded(IteOp::inferReturnTypes(odsBuilder.getContext(),
8982 odsState.location, odsState.operands,
8983 odsState.attributes.getDictionary(odsState.getContext()),
8984 odsState.getRawProperties(),
8985 odsState.regions, inferredReturnTypes)))
8986 odsState.addTypes(inferredReturnTypes);
8987 else
8988 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
8989
8990}
8991
8992void IteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::mlir::Value thenValue, ::mlir::Value elseValue) {
8993 odsState.addOperands(cond);
8994 odsState.addOperands(thenValue);
8995 odsState.addOperands(elseValue);
8996 assert(resultTypes.size() == 1u && "mismatched number of results");
8997 odsState.addTypes(resultTypes);
8998}
8999
9000void IteOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9001 assert(operands.size() == 3u && "mismatched number of parameters");
9002 odsState.addOperands(operands);
9003 odsState.addAttributes(attributes);
9004 assert(resultTypes.size() == 1u && "mismatched number of return types");
9005 odsState.addTypes(resultTypes);
9006}
9007
9008void IteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9009 assert(operands.size() == 3u && "mismatched number of parameters");
9010 odsState.addOperands(operands);
9011 odsState.addAttributes(attributes);
9012
9013 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
9014 if (::mlir::succeeded(IteOp::inferReturnTypes(odsBuilder.getContext(),
9015 odsState.location, operands,
9016 odsState.attributes.getDictionary(odsState.getContext()),
9017 odsState.getRawProperties(),
9018 odsState.regions, inferredReturnTypes))) {
9019 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
9020 odsState.addTypes(inferredReturnTypes);
9021 } else {
9022 ::llvm::report_fatal_error("Failed to infer result type(s).");
9023 }
9024}
9025
9026::llvm::LogicalResult IteOp::verifyInvariantsImpl() {
9027 {
9028 unsigned index = 0; (void)index;
9029 auto valueGroup0 = getODSOperands(0);
9030
9031 for (auto v : valueGroup0) {
9032 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "operand", index++)))
9033 return ::mlir::failure();
9034 }
9035 auto valueGroup1 = getODSOperands(1);
9036
9037 for (auto v : valueGroup1) {
9038 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
9039 return ::mlir::failure();
9040 }
9041 auto valueGroup2 = getODSOperands(2);
9042
9043 for (auto v : valueGroup2) {
9044 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "operand", index++)))
9045 return ::mlir::failure();
9046 }
9047 }
9048 {
9049 unsigned index = 0; (void)index;
9050 auto valueGroup0 = getODSResults(0);
9051
9052 for (auto v : valueGroup0) {
9053 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT6(*this, v.getType(), "result", index++)))
9054 return ::mlir::failure();
9055 }
9056 }
9057 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()))))
9058 return emitOpError("failed to verify that all of {thenValue, elseValue, result} have same type");
9059 return ::mlir::success();
9060}
9061
9062::llvm::LogicalResult IteOp::verifyInvariants() {
9063 return verifyInvariantsImpl();
9064}
9065
9066::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) {
9067 inferredReturnTypes.resize(1);
9068 ::mlir::Builder odsBuilder(context);
9069 if (operands.size() <= 2)
9070 return ::mlir::failure();
9071 ::mlir::Type odsInferredType0 = operands[2].getType();
9072 inferredReturnTypes[0] = odsInferredType0;
9073 return ::mlir::success();
9074}
9075
9076::mlir::ParseResult IteOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9077 ::mlir::OpAsmParser::UnresolvedOperand condRawOperand{};
9078 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> condOperands(&condRawOperand, 1); ::llvm::SMLoc condOperandsLoc;
9079 (void)condOperandsLoc;
9080 ::mlir::OpAsmParser::UnresolvedOperand thenValueRawOperand{};
9081 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> thenValueOperands(&thenValueRawOperand, 1); ::llvm::SMLoc thenValueOperandsLoc;
9082 (void)thenValueOperandsLoc;
9083 ::mlir::OpAsmParser::UnresolvedOperand elseValueRawOperand{};
9084 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> elseValueOperands(&elseValueRawOperand, 1); ::llvm::SMLoc elseValueOperandsLoc;
9085 (void)elseValueOperandsLoc;
9086 ::mlir::Type resultRawType{};
9087 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
9088
9089 condOperandsLoc = parser.getCurrentLocation();
9090 if (parser.parseOperand(condRawOperand))
9091 return ::mlir::failure();
9092 if (parser.parseComma())
9093 return ::mlir::failure();
9094
9095 thenValueOperandsLoc = parser.getCurrentLocation();
9096 if (parser.parseOperand(thenValueRawOperand))
9097 return ::mlir::failure();
9098 if (parser.parseComma())
9099 return ::mlir::failure();
9100
9101 elseValueOperandsLoc = parser.getCurrentLocation();
9102 if (parser.parseOperand(elseValueRawOperand))
9103 return ::mlir::failure();
9104 {
9105 auto loc = parser.getCurrentLocation();(void)loc;
9106 if (parser.parseOptionalAttrDict(result.attributes))
9107 return ::mlir::failure();
9108 }
9109 if (parser.parseColon())
9110 return ::mlir::failure();
9111
9112 if (parser.parseType(resultRawType))
9113 return ::mlir::failure();
9114 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
9115 result.addTypes(resultTypes);
9116 if (parser.resolveOperands(condOperands, odsBuildableType0, condOperandsLoc, result.operands))
9117 return ::mlir::failure();
9118 if (parser.resolveOperands(thenValueOperands, resultTypes[0], thenValueOperandsLoc, result.operands))
9119 return ::mlir::failure();
9120 if (parser.resolveOperands(elseValueOperands, resultTypes[0], elseValueOperandsLoc, result.operands))
9121 return ::mlir::failure();
9122 return ::mlir::success();
9123}
9124
9125void IteOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9126 _odsPrinter << ' ';
9127 _odsPrinter << getCond();
9128 _odsPrinter << ",";
9129 _odsPrinter << ' ';
9130 _odsPrinter << getThenValue();
9131 _odsPrinter << ",";
9132 _odsPrinter << ' ';
9133 _odsPrinter << getElseValue();
9134 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9135 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9136 _odsPrinter << ' ' << ":";
9137 _odsPrinter << ' ';
9138 _odsPrinter << getResult().getType();
9139}
9140
9141void IteOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9142}
9143
9144} // namespace smt
9145} // namespace llzk
9146MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::IteOp)
9147
9148namespace llzk {
9149namespace smt {
9150
9151//===----------------------------------------------------------------------===//
9152// ::llzk::smt::NotOp definitions
9153//===----------------------------------------------------------------------===//
9154
9155namespace detail {
9156} // namespace detail
9158
9159::llvm::LogicalResult NotOpAdaptor::verify(::mlir::Location loc) {
9160 return ::mlir::success();
9161}
9162
9163void NotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
9164 odsState.addOperands(input);
9165 odsState.addTypes(result);
9166}
9167
9168void NotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input) {
9169 odsState.addOperands(input);
9170
9171 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
9172 if (::mlir::succeeded(NotOp::inferReturnTypes(odsBuilder.getContext(),
9173 odsState.location, odsState.operands,
9174 odsState.attributes.getDictionary(odsState.getContext()),
9175 odsState.getRawProperties(),
9176 odsState.regions, inferredReturnTypes)))
9177 odsState.addTypes(inferredReturnTypes);
9178 else
9179 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
9180
9181}
9182
9183void NotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
9184 odsState.addOperands(input);
9185 assert(resultTypes.size() == 1u && "mismatched number of results");
9186 odsState.addTypes(resultTypes);
9187}
9188
9189void NotOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9190 assert(operands.size() == 1u && "mismatched number of parameters");
9191 odsState.addOperands(operands);
9192 odsState.addAttributes(attributes);
9193 assert(resultTypes.size() == 1u && "mismatched number of return types");
9194 odsState.addTypes(resultTypes);
9195}
9196
9197void NotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9198 assert(operands.size() == 1u && "mismatched number of parameters");
9199 odsState.addOperands(operands);
9200 odsState.addAttributes(attributes);
9201
9202 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
9203 if (::mlir::succeeded(NotOp::inferReturnTypes(odsBuilder.getContext(),
9204 odsState.location, operands,
9205 odsState.attributes.getDictionary(odsState.getContext()),
9206 odsState.getRawProperties(),
9207 odsState.regions, inferredReturnTypes))) {
9208 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
9209 odsState.addTypes(inferredReturnTypes);
9210 } else {
9211 ::llvm::report_fatal_error("Failed to infer result type(s).");
9212 }
9213}
9214
9215::llvm::LogicalResult NotOp::verifyInvariantsImpl() {
9216 {
9217 unsigned index = 0; (void)index;
9218 auto valueGroup0 = getODSOperands(0);
9219
9220 for (auto v : valueGroup0) {
9221 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "operand", index++)))
9222 return ::mlir::failure();
9223 }
9224 }
9225 {
9226 unsigned index = 0; (void)index;
9227 auto valueGroup0 = getODSResults(0);
9228
9229 for (auto v : valueGroup0) {
9230 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
9231 return ::mlir::failure();
9232 }
9233 }
9234 return ::mlir::success();
9235}
9236
9237::llvm::LogicalResult NotOp::verifyInvariants() {
9238 return verifyInvariantsImpl();
9239}
9240
9241::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) {
9242 inferredReturnTypes.resize(1);
9243 ::mlir::Builder odsBuilder(context);
9244 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
9245 inferredReturnTypes[0] = odsInferredType0;
9246 return ::mlir::success();
9247}
9248
9249::mlir::ParseResult NotOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9250 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
9251 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
9252 (void)inputOperandsLoc;
9253
9254 inputOperandsLoc = parser.getCurrentLocation();
9255 if (parser.parseOperand(inputRawOperand))
9256 return ::mlir::failure();
9257 {
9258 auto loc = parser.getCurrentLocation();(void)loc;
9259 if (parser.parseOptionalAttrDict(result.attributes))
9260 return ::mlir::failure();
9261 }
9262 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
9263 result.addTypes(odsBuildableType0);
9264 if (parser.resolveOperands(inputOperands, odsBuildableType0, inputOperandsLoc, result.operands))
9265 return ::mlir::failure();
9266 return ::mlir::success();
9267}
9268
9269void NotOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9270 _odsPrinter << ' ';
9271 _odsPrinter << getInput();
9272 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9273 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9274}
9275
9276void NotOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9277}
9278
9279} // namespace smt
9280} // namespace llzk
9281MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::NotOp)
9282
9283namespace llzk {
9284namespace smt {
9285
9286//===----------------------------------------------------------------------===//
9287// ::llzk::smt::OrOp definitions
9288//===----------------------------------------------------------------------===//
9289
9290namespace detail {
9291std::pair<unsigned, unsigned> OrOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
9292 bool isVariadic[] = {true};
9293 int prevVariadicCount = 0;
9294 for (unsigned i = 0; i < index; ++i)
9295 if (isVariadic[i]) ++prevVariadicCount;
9296
9297 // Calculate how many dynamic values a static variadic operand corresponds to.
9298 // This assumes all static variadic operands have the same dynamic value count.
9299 int variadicSize = (odsOperandsSize - 0) / 1;
9300 // `index` passed in as the parameter is the static index which counts each
9301 // operand (variadic or not) as size 1. So here for each previous static variadic
9302 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
9303 // value pack for this static operand starts.
9304 int start = index + (variadicSize - 1) * prevVariadicCount;
9305 int size = isVariadic[index] ? variadicSize : 1;
9306 return {start, size};
9307}
9308
9309} // namespace detail
9311
9312::llvm::LogicalResult OrOpAdaptor::verify(::mlir::Location loc) {
9313 return ::mlir::success();
9314}
9315
9316std::pair<unsigned, unsigned> OrOp::getODSOperandIndexAndLength(unsigned index) {
9317 bool isVariadic[] = {true};
9318 int prevVariadicCount = 0;
9319 for (unsigned i = 0; i < index; ++i)
9320 if (isVariadic[i]) ++prevVariadicCount;
9321
9322 // Calculate how many dynamic values a static variadic operand corresponds to.
9323 // This assumes all static variadic operands have the same dynamic value count.
9324 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
9325 // `index` passed in as the parameter is the static index which counts each
9326 // operand (variadic or not) as size 1. So here for each previous static variadic
9327 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
9328 // value pack for this static operand starts.
9329 int start = index + (variadicSize - 1) * prevVariadicCount;
9330 int size = isVariadic[index] ? variadicSize : 1;
9331 return {start, size};
9332}
9333
9334::mlir::MutableOperandRange OrOp::getInputsMutable() {
9335 auto range = getODSOperandIndexAndLength(0);
9336 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
9337 return mutableRange;
9338}
9339
9340void OrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs) {
9341 build(odsBuilder, odsState, mlir::ValueRange{lhs, rhs});
9342
9343}
9344
9345void OrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
9346 odsState.addOperands(inputs);
9347 odsState.addTypes(result);
9348}
9349
9350void OrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9351 odsState.addOperands(operands);
9352 odsState.addAttributes(attributes);
9353 assert(resultTypes.size() == 1u && "mismatched number of return types");
9354 odsState.addTypes(resultTypes);
9355}
9356
9357void OrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9358 odsState.addOperands(operands);
9359 odsState.addAttributes(attributes);
9360
9361 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
9362 if (::mlir::succeeded(OrOp::inferReturnTypes(odsBuilder.getContext(),
9363 odsState.location, operands,
9364 odsState.attributes.getDictionary(odsState.getContext()),
9365 odsState.getRawProperties(),
9366 odsState.regions, inferredReturnTypes))) {
9367 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
9368 odsState.addTypes(inferredReturnTypes);
9369 } else {
9370 ::llvm::report_fatal_error("Failed to infer result type(s).");
9371 }
9372}
9373
9374::llvm::LogicalResult OrOp::verifyInvariantsImpl() {
9375 {
9376 unsigned index = 0; (void)index;
9377 auto valueGroup0 = getODSOperands(0);
9378
9379 for (auto v : valueGroup0) {
9380 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT1(*this, v.getType(), "operand", index++)))
9381 return ::mlir::failure();
9382 }
9383 }
9384 {
9385 unsigned index = 0; (void)index;
9386 auto valueGroup0 = getODSResults(0);
9387
9388 for (auto v : valueGroup0) {
9389 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
9390 return ::mlir::failure();
9391 }
9392 }
9393 return ::mlir::success();
9394}
9395
9396::llvm::LogicalResult OrOp::verifyInvariants() {
9397 return verifyInvariantsImpl();
9398}
9399
9400::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) {
9401 inferredReturnTypes.resize(1);
9402 ::mlir::Builder odsBuilder(context);
9403 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
9404 inferredReturnTypes[0] = odsInferredType0;
9405 return ::mlir::success();
9406}
9407
9408::mlir::ParseResult OrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9409 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
9410 ::llvm::SMLoc inputsOperandsLoc;
9411 (void)inputsOperandsLoc;
9412
9413 inputsOperandsLoc = parser.getCurrentLocation();
9414 if (parser.parseOperandList(inputsOperands))
9415 return ::mlir::failure();
9416 {
9417 auto loc = parser.getCurrentLocation();(void)loc;
9418 if (parser.parseOptionalAttrDict(result.attributes))
9419 return ::mlir::failure();
9420 }
9421 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
9422 result.addTypes(odsBuildableType0);
9423 if (parser.resolveOperands(inputsOperands, odsBuildableType0, inputsOperandsLoc, result.operands))
9424 return ::mlir::failure();
9425 return ::mlir::success();
9426}
9427
9428void OrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9429 _odsPrinter << ' ';
9430 _odsPrinter << getInputs();
9431 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9432 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9433}
9434
9435void OrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9436}
9437
9438} // namespace smt
9439} // namespace llzk
9440MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::OrOp)
9441
9442namespace llzk {
9443namespace smt {
9444
9445//===----------------------------------------------------------------------===//
9446// ::llzk::smt::PopOp definitions
9447//===----------------------------------------------------------------------===//
9448
9449namespace detail {
9450PopOpGenericAdaptorBase::PopOpGenericAdaptorBase(PopOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9451
9453 auto attr = getCountAttr();
9454 return attr.getValue().getZExtValue();
9455}
9456
9457} // namespace detail
9459
9460::llvm::LogicalResult PopOpAdaptor::verify(::mlir::Location loc) {
9461 auto tblgen_count = getProperties().count; (void)tblgen_count;
9462 if (!tblgen_count) return emitError(loc, "'smt.pop' op ""requires attribute 'count'");
9463
9464 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()))))
9465 return emitError(loc, "'smt.pop' op ""attribute 'count' failed to satisfy constraint: 32-bit signless integer attribute whose value is non-negative");
9466 return ::mlir::success();
9467}
9468
9469::llvm::LogicalResult PopOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9470 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
9471 if (!dict) {
9472 emitError() << "expected DictionaryAttr to set properties";
9473 return ::mlir::failure();
9474 }
9475
9476 {
9477 auto &propStorage = prop.count;
9478 auto attr = dict.get("count");
9479 if (attr) {
9480 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
9481 if (convertedAttr) {
9482 propStorage = convertedAttr;
9483 } else {
9484 emitError() << "Invalid attribute `count` in property conversion: " << attr;
9485 return ::mlir::failure();
9486 }
9487 }
9488 }
9489 return ::mlir::success();
9490}
9491
9492::mlir::Attribute PopOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9493 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9494 ::mlir::Builder odsBuilder{ctx};
9495
9496 {
9497 const auto &propStorage = prop.count;
9498 if (propStorage)
9499 attrs.push_back(odsBuilder.getNamedAttr("count",
9500 propStorage));
9501 }
9502
9503 if (!attrs.empty())
9504 return odsBuilder.getDictionaryAttr(attrs);
9505 return {};
9506}
9507
9508llvm::hash_code PopOp::computePropertiesHash(const Properties &prop) {
9509 return llvm::hash_combine(
9510 llvm::hash_value(prop.count.getAsOpaquePointer()));
9511}
9512
9513std::optional<mlir::Attribute> PopOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9514 if (name == "count")
9515 return prop.count;
9516 return std::nullopt;
9517}
9518
9519void PopOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9520 if (name == "count") {
9521 prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
9522 return;
9523 }
9524}
9525
9526void PopOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
9527 if (prop.count) attrs.append("count", prop.count);
9528}
9529
9530::llvm::LogicalResult PopOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9531 {
9532 ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
9533 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT10(attr, "count", emitError)))
9534 return ::mlir::failure();
9535 }
9536 return ::mlir::success();
9537}
9538
9539::llvm::LogicalResult PopOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
9540 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
9541 if (::mlir::failed(reader.readAttribute(prop.count)))
9542 return ::mlir::failure();
9543 return ::mlir::success();
9544}
9545
9546void PopOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
9547 auto &prop = getProperties(); (void)prop;
9548 writer.writeAttribute(prop.count);
9549}
9550
9552 auto attr = getCountAttr();
9553 return attr.getValue().getZExtValue();
9554}
9555
9556void PopOp::setCount(uint32_t attrValue) {
9557 getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
9558}
9559
9560void PopOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
9561 odsState.getOrAddProperties<Properties>().count = count;
9562}
9563
9564void PopOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
9565 odsState.getOrAddProperties<Properties>().count = count;
9566 assert(resultTypes.size() == 0u && "mismatched number of results");
9567 odsState.addTypes(resultTypes);
9568}
9569
9570void PopOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t count) {
9571 odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), count);
9572}
9573
9574void PopOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t count) {
9575 odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), count);
9576 assert(resultTypes.size() == 0u && "mismatched number of results");
9577 odsState.addTypes(resultTypes);
9578}
9579
9580void PopOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9581 assert(operands.size() == 0u && "mismatched number of parameters");
9582 odsState.addOperands(operands);
9583 odsState.addAttributes(attributes);
9584 assert(resultTypes.size() == 0u && "mismatched number of return types");
9585 odsState.addTypes(resultTypes);
9586
9587 if (!attributes.empty()) {
9588 ::mlir::OpaqueProperties properties =
9589 &odsState.getOrAddProperties<PopOp::Properties>();
9590 std::optional<::mlir::RegisteredOperationName> info =
9591 odsState.name.getRegisteredInfo();
9592 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
9593 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
9594 ::llvm::report_fatal_error("Property conversion failed.");
9595 }
9596}
9597
9598::llvm::LogicalResult PopOp::verifyInvariantsImpl() {
9599 auto tblgen_count = getProperties().count; (void)tblgen_count;
9600 if (!tblgen_count) return emitOpError("requires attribute 'count'");
9601
9602 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT10(*this, tblgen_count, "count")))
9603 return ::mlir::failure();
9604 return ::mlir::success();
9605}
9606
9607::llvm::LogicalResult PopOp::verifyInvariants() {
9608 return verifyInvariantsImpl();
9609}
9610
9611::mlir::ParseResult PopOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9612 ::mlir::IntegerAttr countAttr;
9613
9614 if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(32))) {
9615 return ::mlir::failure();
9616 }
9617 if (countAttr) result.getOrAddProperties<PopOp::Properties>().count = countAttr;
9618 {
9619 auto loc = parser.getCurrentLocation();(void)loc;
9620 if (parser.parseOptionalAttrDict(result.attributes))
9621 return ::mlir::failure();
9622 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
9623 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
9624 })))
9625 return ::mlir::failure();
9626 }
9627 return ::mlir::success();
9628}
9629
9630void PopOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9631 _odsPrinter << ' ';
9632 _odsPrinter.printAttributeWithoutType(getCountAttr());
9633 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9634 elidedAttrs.push_back("count");
9635 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9636}
9637
9638} // namespace smt
9639} // namespace llzk
9640MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::PopOp)
9641
9642namespace llzk {
9643namespace smt {
9644
9645//===----------------------------------------------------------------------===//
9646// ::llzk::smt::PushOp definitions
9647//===----------------------------------------------------------------------===//
9648
9649namespace detail {
9650PushOpGenericAdaptorBase::PushOpGenericAdaptorBase(PushOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9651
9653 auto attr = getCountAttr();
9654 return attr.getValue().getZExtValue();
9655}
9656
9657} // namespace detail
9659
9660::llvm::LogicalResult PushOpAdaptor::verify(::mlir::Location loc) {
9661 auto tblgen_count = getProperties().count; (void)tblgen_count;
9662 if (!tblgen_count) return emitError(loc, "'smt.push' op ""requires attribute 'count'");
9663
9664 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()))))
9665 return emitError(loc, "'smt.push' op ""attribute 'count' failed to satisfy constraint: 32-bit signless integer attribute whose value is non-negative");
9666 return ::mlir::success();
9667}
9668
9669::llvm::LogicalResult PushOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9670 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
9671 if (!dict) {
9672 emitError() << "expected DictionaryAttr to set properties";
9673 return ::mlir::failure();
9674 }
9675
9676 {
9677 auto &propStorage = prop.count;
9678 auto attr = dict.get("count");
9679 if (attr) {
9680 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
9681 if (convertedAttr) {
9682 propStorage = convertedAttr;
9683 } else {
9684 emitError() << "Invalid attribute `count` in property conversion: " << attr;
9685 return ::mlir::failure();
9686 }
9687 }
9688 }
9689 return ::mlir::success();
9690}
9691
9692::mlir::Attribute PushOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9693 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9694 ::mlir::Builder odsBuilder{ctx};
9695
9696 {
9697 const auto &propStorage = prop.count;
9698 if (propStorage)
9699 attrs.push_back(odsBuilder.getNamedAttr("count",
9700 propStorage));
9701 }
9702
9703 if (!attrs.empty())
9704 return odsBuilder.getDictionaryAttr(attrs);
9705 return {};
9706}
9707
9708llvm::hash_code PushOp::computePropertiesHash(const Properties &prop) {
9709 return llvm::hash_combine(
9710 llvm::hash_value(prop.count.getAsOpaquePointer()));
9711}
9712
9713std::optional<mlir::Attribute> PushOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9714 if (name == "count")
9715 return prop.count;
9716 return std::nullopt;
9717}
9718
9719void PushOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9720 if (name == "count") {
9721 prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
9722 return;
9723 }
9724}
9725
9726void PushOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
9727 if (prop.count) attrs.append("count", prop.count);
9728}
9729
9730::llvm::LogicalResult PushOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9731 {
9732 ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
9733 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT10(attr, "count", emitError)))
9734 return ::mlir::failure();
9735 }
9736 return ::mlir::success();
9737}
9738
9739::llvm::LogicalResult PushOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
9740 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
9741 if (::mlir::failed(reader.readAttribute(prop.count)))
9742 return ::mlir::failure();
9743 return ::mlir::success();
9744}
9745
9746void PushOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
9747 auto &prop = getProperties(); (void)prop;
9748 writer.writeAttribute(prop.count);
9749}
9750
9752 auto attr = getCountAttr();
9753 return attr.getValue().getZExtValue();
9754}
9755
9756void PushOp::setCount(uint32_t attrValue) {
9757 getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
9758}
9759
9760void PushOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
9761 odsState.getOrAddProperties<Properties>().count = count;
9762}
9763
9764void PushOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
9765 odsState.getOrAddProperties<Properties>().count = count;
9766 assert(resultTypes.size() == 0u && "mismatched number of results");
9767 odsState.addTypes(resultTypes);
9768}
9769
9770void PushOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t count) {
9771 odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), count);
9772}
9773
9774void PushOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t count) {
9775 odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), count);
9776 assert(resultTypes.size() == 0u && "mismatched number of results");
9777 odsState.addTypes(resultTypes);
9778}
9779
9780void PushOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9781 assert(operands.size() == 0u && "mismatched number of parameters");
9782 odsState.addOperands(operands);
9783 odsState.addAttributes(attributes);
9784 assert(resultTypes.size() == 0u && "mismatched number of return types");
9785 odsState.addTypes(resultTypes);
9786
9787 if (!attributes.empty()) {
9788 ::mlir::OpaqueProperties properties =
9789 &odsState.getOrAddProperties<PushOp::Properties>();
9790 std::optional<::mlir::RegisteredOperationName> info =
9791 odsState.name.getRegisteredInfo();
9792 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
9793 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
9794 ::llvm::report_fatal_error("Property conversion failed.");
9795 }
9796}
9797
9798::llvm::LogicalResult PushOp::verifyInvariantsImpl() {
9799 auto tblgen_count = getProperties().count; (void)tblgen_count;
9800 if (!tblgen_count) return emitOpError("requires attribute 'count'");
9801
9802 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT10(*this, tblgen_count, "count")))
9803 return ::mlir::failure();
9804 return ::mlir::success();
9805}
9806
9807::llvm::LogicalResult PushOp::verifyInvariants() {
9808 return verifyInvariantsImpl();
9809}
9810
9811::mlir::ParseResult PushOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9812 ::mlir::IntegerAttr countAttr;
9813
9814 if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(32))) {
9815 return ::mlir::failure();
9816 }
9817 if (countAttr) result.getOrAddProperties<PushOp::Properties>().count = countAttr;
9818 {
9819 auto loc = parser.getCurrentLocation();(void)loc;
9820 if (parser.parseOptionalAttrDict(result.attributes))
9821 return ::mlir::failure();
9822 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
9823 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
9824 })))
9825 return ::mlir::failure();
9826 }
9827 return ::mlir::success();
9828}
9829
9830void PushOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9831 _odsPrinter << ' ';
9832 _odsPrinter.printAttributeWithoutType(getCountAttr());
9833 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9834 elidedAttrs.push_back("count");
9835 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9836}
9837
9838} // namespace smt
9839} // namespace llzk
9840MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::PushOp)
9841
9842namespace llzk {
9843namespace smt {
9844
9845//===----------------------------------------------------------------------===//
9846// ::llzk::smt::RepeatOp definitions
9847//===----------------------------------------------------------------------===//
9848
9849namespace detail {
9850} // namespace detail
9852
9853::llvm::LogicalResult RepeatOpAdaptor::verify(::mlir::Location loc) {
9854 return ::mlir::success();
9855}
9856
9857void RepeatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
9858 odsState.addOperands(input);
9859 odsState.addTypes(result);
9860}
9861
9862void RepeatOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
9863 odsState.addOperands(input);
9864 assert(resultTypes.size() == 1u && "mismatched number of results");
9865 odsState.addTypes(resultTypes);
9866}
9867
9868void RepeatOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9869 assert(operands.size() == 1u && "mismatched number of parameters");
9870 odsState.addOperands(operands);
9871 odsState.addAttributes(attributes);
9872 assert(resultTypes.size() == 1u && "mismatched number of return types");
9873 odsState.addTypes(resultTypes);
9874}
9875
9876::llvm::LogicalResult RepeatOp::verifyInvariantsImpl() {
9877 {
9878 unsigned index = 0; (void)index;
9879 auto valueGroup0 = getODSOperands(0);
9880
9881 for (auto v : valueGroup0) {
9882 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "operand", index++)))
9883 return ::mlir::failure();
9884 }
9885 }
9886 {
9887 unsigned index = 0; (void)index;
9888 auto valueGroup0 = getODSResults(0);
9889
9890 for (auto v : valueGroup0) {
9891 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT8(*this, v.getType(), "result", index++)))
9892 return ::mlir::failure();
9893 }
9894 }
9895 return ::mlir::success();
9896}
9897
9898::llvm::LogicalResult RepeatOp::verifyInvariants() {
9899 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
9900 return ::mlir::success();
9901 return ::mlir::failure();
9902}
9903
9904void RepeatOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9905}
9906
9907} // namespace smt
9908} // namespace llzk
9909MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::RepeatOp)
9910
9911namespace llzk {
9912namespace smt {
9913
9914//===----------------------------------------------------------------------===//
9915// ::llzk::smt::ResetOp definitions
9916//===----------------------------------------------------------------------===//
9917
9918namespace detail {
9919} // namespace detail
9921
9922::llvm::LogicalResult ResetOpAdaptor::verify(::mlir::Location loc) {
9923 return ::mlir::success();
9924}
9925
9926void ResetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
9927}
9928
9929void ResetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
9930 assert(resultTypes.size() == 0u && "mismatched number of results");
9931 odsState.addTypes(resultTypes);
9932}
9933
9934void ResetOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9935 assert(operands.size() == 0u && "mismatched number of parameters");
9936 odsState.addOperands(operands);
9937 odsState.addAttributes(attributes);
9938 assert(resultTypes.size() == 0u && "mismatched number of return types");
9939 odsState.addTypes(resultTypes);
9940}
9941
9942::llvm::LogicalResult ResetOp::verifyInvariantsImpl() {
9943 return ::mlir::success();
9944}
9945
9946::llvm::LogicalResult ResetOp::verifyInvariants() {
9947 return verifyInvariantsImpl();
9948}
9949
9950::mlir::ParseResult ResetOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9951 {
9952 auto loc = parser.getCurrentLocation();(void)loc;
9953 if (parser.parseOptionalAttrDict(result.attributes))
9954 return ::mlir::failure();
9955 }
9956 return ::mlir::success();
9957}
9958
9959void ResetOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
9960 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
9961 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
9962}
9963
9964} // namespace smt
9965} // namespace llzk
9966MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::ResetOp)
9967
9968namespace llzk {
9969namespace smt {
9970
9971//===----------------------------------------------------------------------===//
9972// ::llzk::smt::SetLogicOp definitions
9973//===----------------------------------------------------------------------===//
9974
9975namespace detail {
9976SetLogicOpGenericAdaptorBase::SetLogicOpGenericAdaptorBase(SetLogicOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9977
9979 auto attr = getLogicAttr();
9980 return attr.getValue();
9981}
9982
9983} // namespace detail
9985
9986::llvm::LogicalResult SetLogicOpAdaptor::verify(::mlir::Location loc) {
9987 auto tblgen_logic = getProperties().logic; (void)tblgen_logic;
9988 if (!tblgen_logic) return emitError(loc, "'smt.set_logic' op ""requires attribute 'logic'");
9989
9990 if (tblgen_logic && !((::llvm::isa<::mlir::StringAttr>(tblgen_logic))))
9991 return emitError(loc, "'smt.set_logic' op ""attribute 'logic' failed to satisfy constraint: string attribute");
9992 return ::mlir::success();
9993}
9994
9995::llvm::LogicalResult SetLogicOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9996 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
9997 if (!dict) {
9998 emitError() << "expected DictionaryAttr to set properties";
9999 return ::mlir::failure();
10000 }
10001
10002 {
10003 auto &propStorage = prop.logic;
10004 auto attr = dict.get("logic");
10005 if (attr) {
10006 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
10007 if (convertedAttr) {
10008 propStorage = convertedAttr;
10009 } else {
10010 emitError() << "Invalid attribute `logic` in property conversion: " << attr;
10011 return ::mlir::failure();
10012 }
10013 }
10014 }
10015 return ::mlir::success();
10016}
10017
10018::mlir::Attribute SetLogicOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
10019 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
10020 ::mlir::Builder odsBuilder{ctx};
10021
10022 {
10023 const auto &propStorage = prop.logic;
10024 if (propStorage)
10025 attrs.push_back(odsBuilder.getNamedAttr("logic",
10026 propStorage));
10027 }
10028
10029 if (!attrs.empty())
10030 return odsBuilder.getDictionaryAttr(attrs);
10031 return {};
10032}
10033
10034llvm::hash_code SetLogicOp::computePropertiesHash(const Properties &prop) {
10035 return llvm::hash_combine(
10036 llvm::hash_value(prop.logic.getAsOpaquePointer()));
10037}
10038
10039std::optional<mlir::Attribute> SetLogicOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
10040 if (name == "logic")
10041 return prop.logic;
10042 return std::nullopt;
10043}
10044
10045void SetLogicOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
10046 if (name == "logic") {
10047 prop.logic = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.logic)>>(value);
10048 return;
10049 }
10050}
10051
10052void SetLogicOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
10053 if (prop.logic) attrs.append("logic", prop.logic);
10054}
10055
10056::llvm::LogicalResult SetLogicOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10057 {
10058 ::mlir::Attribute attr = attrs.get(getLogicAttrName(opName));
10059 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_SMT5(attr, "logic", emitError)))
10060 return ::mlir::failure();
10061 }
10062 return ::mlir::success();
10063}
10064
10065::llvm::LogicalResult SetLogicOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
10066 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
10067 if (::mlir::failed(reader.readAttribute(prop.logic)))
10068 return ::mlir::failure();
10069 return ::mlir::success();
10070}
10071
10072void SetLogicOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
10073 auto &prop = getProperties(); (void)prop;
10074 writer.writeAttribute(prop.logic);
10075}
10076
10077::llvm::StringRef SetLogicOp::getLogic() {
10078 auto attr = getLogicAttr();
10079 return attr.getValue();
10080}
10081
10082void SetLogicOp::setLogic(::llvm::StringRef attrValue) {
10083 getProperties().logic = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
10084}
10085
10086void SetLogicOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr logic) {
10087 odsState.getOrAddProperties<Properties>().logic = logic;
10088}
10089
10090void SetLogicOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr logic) {
10091 odsState.getOrAddProperties<Properties>().logic = logic;
10092 assert(resultTypes.size() == 0u && "mismatched number of results");
10093 odsState.addTypes(resultTypes);
10094}
10095
10096void SetLogicOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef logic) {
10097 odsState.getOrAddProperties<Properties>().logic = odsBuilder.getStringAttr(logic);
10098}
10099
10100void SetLogicOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef logic) {
10101 odsState.getOrAddProperties<Properties>().logic = odsBuilder.getStringAttr(logic);
10102 assert(resultTypes.size() == 0u && "mismatched number of results");
10103 odsState.addTypes(resultTypes);
10104}
10105
10106void SetLogicOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10107 assert(operands.size() == 0u && "mismatched number of parameters");
10108 odsState.addOperands(operands);
10109 odsState.addAttributes(attributes);
10110 assert(resultTypes.size() == 0u && "mismatched number of return types");
10111 odsState.addTypes(resultTypes);
10112
10113 if (!attributes.empty()) {
10114 ::mlir::OpaqueProperties properties =
10115 &odsState.getOrAddProperties<SetLogicOp::Properties>();
10116 std::optional<::mlir::RegisteredOperationName> info =
10117 odsState.name.getRegisteredInfo();
10118 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
10119 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
10120 ::llvm::report_fatal_error("Property conversion failed.");
10121 }
10122}
10123
10124::llvm::LogicalResult SetLogicOp::verifyInvariantsImpl() {
10125 auto tblgen_logic = getProperties().logic; (void)tblgen_logic;
10126 if (!tblgen_logic) return emitOpError("requires attribute 'logic'");
10127
10128 if (::mlir::failed(__mlir_ods_local_attr_constraint_SMT5(*this, tblgen_logic, "logic")))
10129 return ::mlir::failure();
10130 return ::mlir::success();
10131}
10132
10133::llvm::LogicalResult SetLogicOp::verifyInvariants() {
10134 return verifyInvariantsImpl();
10135}
10136
10137::mlir::ParseResult SetLogicOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10138 ::mlir::StringAttr logicAttr;
10139
10140 if (parser.parseCustomAttributeWithFallback(logicAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
10141 return ::mlir::failure();
10142 }
10143 if (logicAttr) result.getOrAddProperties<SetLogicOp::Properties>().logic = logicAttr;
10144 {
10145 auto loc = parser.getCurrentLocation();(void)loc;
10146 if (parser.parseOptionalAttrDict(result.attributes))
10147 return ::mlir::failure();
10148 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
10149 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
10150 })))
10151 return ::mlir::failure();
10152 }
10153 return ::mlir::success();
10154}
10155
10156void SetLogicOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
10157 _odsPrinter << ' ';
10158 _odsPrinter.printAttributeWithoutType(getLogicAttr());
10159 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
10160 elidedAttrs.push_back("logic");
10161 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
10162}
10163
10164} // namespace smt
10165} // namespace llzk
10166MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::SetLogicOp)
10167
10168namespace llzk {
10169namespace smt {
10170
10171//===----------------------------------------------------------------------===//
10172// ::llzk::smt::SolverOp definitions
10173//===----------------------------------------------------------------------===//
10174
10175namespace detail {
10176std::pair<unsigned, unsigned> SolverOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
10177 bool isVariadic[] = {true};
10178 int prevVariadicCount = 0;
10179 for (unsigned i = 0; i < index; ++i)
10180 if (isVariadic[i]) ++prevVariadicCount;
10181
10182 // Calculate how many dynamic values a static variadic operand corresponds to.
10183 // This assumes all static variadic operands have the same dynamic value count.
10184 int variadicSize = (odsOperandsSize - 0) / 1;
10185 // `index` passed in as the parameter is the static index which counts each
10186 // operand (variadic or not) as size 1. So here for each previous static variadic
10187 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10188 // value pack for this static operand starts.
10189 int start = index + (variadicSize - 1) * prevVariadicCount;
10190 int size = isVariadic[index] ? variadicSize : 1;
10191 return {start, size};
10192}
10193
10194} // namespace detail
10196
10197::llvm::LogicalResult SolverOpAdaptor::verify(::mlir::Location loc) {
10198 return ::mlir::success();
10199}
10200
10201std::pair<unsigned, unsigned> SolverOp::getODSOperandIndexAndLength(unsigned index) {
10202 bool isVariadic[] = {true};
10203 int prevVariadicCount = 0;
10204 for (unsigned i = 0; i < index; ++i)
10205 if (isVariadic[i]) ++prevVariadicCount;
10206
10207 // Calculate how many dynamic values a static variadic operand corresponds to.
10208 // This assumes all static variadic operands have the same dynamic value count.
10209 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
10210 // `index` passed in as the parameter is the static index which counts each
10211 // operand (variadic or not) as size 1. So here for each previous static variadic
10212 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10213 // value pack for this static operand starts.
10214 int start = index + (variadicSize - 1) * prevVariadicCount;
10215 int size = isVariadic[index] ? variadicSize : 1;
10216 return {start, size};
10217}
10218
10219::mlir::MutableOperandRange SolverOp::getInputsMutable() {
10220 auto range = getODSOperandIndexAndLength(0);
10221 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
10222 return mutableRange;
10223}
10224
10225std::pair<unsigned, unsigned> SolverOp::getODSResultIndexAndLength(unsigned index) {
10226 bool isVariadic[] = {true};
10227 int prevVariadicCount = 0;
10228 for (unsigned i = 0; i < index; ++i)
10229 if (isVariadic[i]) ++prevVariadicCount;
10230
10231 // Calculate how many dynamic values a static variadic operand corresponds to.
10232 // This assumes all static variadic operands have the same dynamic value count.
10233 int variadicSize = (getOperation()->getNumResults() - 0) / 1;
10234 // `index` passed in as the parameter is the static index which counts each
10235 // operand (variadic or not) as size 1. So here for each previous static variadic
10236 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10237 // value pack for this static operand starts.
10238 int start = index + (variadicSize - 1) * prevVariadicCount;
10239 int size = isVariadic[index] ? variadicSize : 1;
10240 return {start, size};
10241}
10242
10243void SolverOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10244 odsState.addOperands(operands);
10245 odsState.addAttributes(attributes);
10246 for (unsigned i = 0; i != 1; ++i)
10247 (void)odsState.addRegion();
10248 odsState.addTypes(resultTypes);
10249}
10250
10251::llvm::LogicalResult SolverOp::verifyInvariantsImpl() {
10252 {
10253 unsigned index = 0; (void)index;
10254 auto valueGroup0 = getODSOperands(0);
10255
10256 for (auto v : valueGroup0) {
10257 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT12(*this, v.getType(), "operand", index++)))
10258 return ::mlir::failure();
10259 }
10260 }
10261 {
10262 unsigned index = 0; (void)index;
10263 auto valueGroup0 = getODSResults(0);
10264
10265 for (auto v : valueGroup0) {
10266 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT12(*this, v.getType(), "result", index++)))
10267 return ::mlir::failure();
10268 }
10269 }
10270 {
10271 unsigned index = 0; (void)index;
10272
10273 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
10274 if (::mlir::failed(__mlir_ods_local_region_constraint_SMT1(*this, region, "bodyRegion", index++)))
10275 return ::mlir::failure();
10276 }
10277 return ::mlir::success();
10278}
10279
10280::llvm::LogicalResult SolverOp::verifyInvariants() {
10281 return verifyInvariantsImpl();
10282}
10283
10284::mlir::ParseResult SolverOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10285 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
10286 ::llvm::SMLoc inputsOperandsLoc;
10287 (void)inputsOperandsLoc;
10288 ::llvm::ArrayRef<::mlir::Type> inputsTypes;
10289 ::llvm::ArrayRef<::mlir::Type> resultsTypes;
10290 std::unique_ptr<::mlir::Region> bodyRegionRegion = std::make_unique<::mlir::Region>();
10291 if (parser.parseLParen())
10292 return ::mlir::failure();
10293
10294 inputsOperandsLoc = parser.getCurrentLocation();
10295 if (parser.parseOperandList(inputsOperands))
10296 return ::mlir::failure();
10297 if (parser.parseRParen())
10298 return ::mlir::failure();
10299 {
10300 auto loc = parser.getCurrentLocation();(void)loc;
10301 if (parser.parseOptionalAttrDict(result.attributes))
10302 return ::mlir::failure();
10303 }
10304 if (parser.parseColon())
10305 return ::mlir::failure();
10306
10307 ::mlir::FunctionType inputs__results_functionType;
10308 if (parser.parseType(inputs__results_functionType))
10309 return ::mlir::failure();
10310 inputsTypes = inputs__results_functionType.getInputs();
10311 resultsTypes = inputs__results_functionType.getResults();
10312
10313 if (parser.parseRegion(*bodyRegionRegion))
10314 return ::mlir::failure();
10315
10316 ensureTerminator(*bodyRegionRegion, parser.getBuilder(), result.location);
10317 result.addRegion(std::move(bodyRegionRegion));
10318 result.addTypes(resultsTypes);
10319 if (parser.resolveOperands(inputsOperands, inputsTypes, inputsOperandsLoc, result.operands))
10320 return ::mlir::failure();
10321 return ::mlir::success();
10322}
10323
10324void SolverOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
10325 _odsPrinter << "(";
10326 _odsPrinter << getInputs();
10327 _odsPrinter << ")";
10328 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
10329 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
10330 _odsPrinter << ' ' << ":";
10331 _odsPrinter << ' ';
10332 _odsPrinter.printFunctionalType(getInputs().getTypes(), getResults().getTypes());
10333 _odsPrinter << ' ';
10334
10335 {
10336 bool printTerminator = true;
10337 if (auto *term = getBodyRegion().empty() ? nullptr : getBodyRegion().begin()->getTerminator()) {
10338 printTerminator = !term->getAttrDictionary().empty() ||
10339 term->getNumOperands() != 0 ||
10340 term->getNumResults() != 0;
10341 }
10342 _odsPrinter.printRegion(getBodyRegion(), /*printEntryBlockArgs=*/true,
10343 /*printBlockTerminators=*/printTerminator);
10344 }
10345}
10346
10347} // namespace smt
10348} // namespace llzk
10349MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::SolverOp)
10350
10351namespace llzk {
10352namespace smt {
10353
10354//===----------------------------------------------------------------------===//
10355// ::llzk::smt::XOrOp definitions
10356//===----------------------------------------------------------------------===//
10357
10358namespace detail {
10359std::pair<unsigned, unsigned> XOrOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
10360 bool isVariadic[] = {true};
10361 int prevVariadicCount = 0;
10362 for (unsigned i = 0; i < index; ++i)
10363 if (isVariadic[i]) ++prevVariadicCount;
10364
10365 // Calculate how many dynamic values a static variadic operand corresponds to.
10366 // This assumes all static variadic operands have the same dynamic value count.
10367 int variadicSize = (odsOperandsSize - 0) / 1;
10368 // `index` passed in as the parameter is the static index which counts each
10369 // operand (variadic or not) as size 1. So here for each previous static variadic
10370 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10371 // value pack for this static operand starts.
10372 int start = index + (variadicSize - 1) * prevVariadicCount;
10373 int size = isVariadic[index] ? variadicSize : 1;
10374 return {start, size};
10375}
10376
10377} // namespace detail
10379
10380::llvm::LogicalResult XOrOpAdaptor::verify(::mlir::Location loc) {
10381 return ::mlir::success();
10382}
10383
10384std::pair<unsigned, unsigned> XOrOp::getODSOperandIndexAndLength(unsigned index) {
10385 bool isVariadic[] = {true};
10386 int prevVariadicCount = 0;
10387 for (unsigned i = 0; i < index; ++i)
10388 if (isVariadic[i]) ++prevVariadicCount;
10389
10390 // Calculate how many dynamic values a static variadic operand corresponds to.
10391 // This assumes all static variadic operands have the same dynamic value count.
10392 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
10393 // `index` passed in as the parameter is the static index which counts each
10394 // operand (variadic or not) as size 1. So here for each previous static variadic
10395 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10396 // value pack for this static operand starts.
10397 int start = index + (variadicSize - 1) * prevVariadicCount;
10398 int size = isVariadic[index] ? variadicSize : 1;
10399 return {start, size};
10400}
10401
10402::mlir::MutableOperandRange XOrOp::getInputsMutable() {
10403 auto range = getODSOperandIndexAndLength(0);
10404 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
10405 return mutableRange;
10406}
10407
10408void XOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs) {
10409 build(odsBuilder, odsState, mlir::ValueRange{lhs, rhs});
10410
10411}
10412
10413void XOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs) {
10414 odsState.addOperands(inputs);
10415 odsState.addTypes(result);
10416}
10417
10418void XOrOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10419 odsState.addOperands(operands);
10420 odsState.addAttributes(attributes);
10421 assert(resultTypes.size() == 1u && "mismatched number of return types");
10422 odsState.addTypes(resultTypes);
10423}
10424
10425void XOrOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10426 odsState.addOperands(operands);
10427 odsState.addAttributes(attributes);
10428
10429 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
10430 if (::mlir::succeeded(XOrOp::inferReturnTypes(odsBuilder.getContext(),
10431 odsState.location, operands,
10432 odsState.attributes.getDictionary(odsState.getContext()),
10433 odsState.getRawProperties(),
10434 odsState.regions, inferredReturnTypes))) {
10435 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
10436 odsState.addTypes(inferredReturnTypes);
10437 } else {
10438 ::llvm::report_fatal_error("Failed to infer result type(s).");
10439 }
10440}
10441
10442::llvm::LogicalResult XOrOp::verifyInvariantsImpl() {
10443 {
10444 unsigned index = 0; (void)index;
10445 auto valueGroup0 = getODSOperands(0);
10446
10447 for (auto v : valueGroup0) {
10448 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT1(*this, v.getType(), "operand", index++)))
10449 return ::mlir::failure();
10450 }
10451 }
10452 {
10453 unsigned index = 0; (void)index;
10454 auto valueGroup0 = getODSResults(0);
10455
10456 for (auto v : valueGroup0) {
10457 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT2(*this, v.getType(), "result", index++)))
10458 return ::mlir::failure();
10459 }
10460 }
10461 return ::mlir::success();
10462}
10463
10464::llvm::LogicalResult XOrOp::verifyInvariants() {
10465 return verifyInvariantsImpl();
10466}
10467
10468::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) {
10469 inferredReturnTypes.resize(1);
10470 ::mlir::Builder odsBuilder(context);
10471 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::smt::BoolType>();
10472 inferredReturnTypes[0] = odsInferredType0;
10473 return ::mlir::success();
10474}
10475
10476::mlir::ParseResult XOrOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10477 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> inputsOperands;
10478 ::llvm::SMLoc inputsOperandsLoc;
10479 (void)inputsOperandsLoc;
10480
10481 inputsOperandsLoc = parser.getCurrentLocation();
10482 if (parser.parseOperandList(inputsOperands))
10483 return ::mlir::failure();
10484 {
10485 auto loc = parser.getCurrentLocation();(void)loc;
10486 if (parser.parseOptionalAttrDict(result.attributes))
10487 return ::mlir::failure();
10488 }
10489 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
10490 result.addTypes(odsBuildableType0);
10491 if (parser.resolveOperands(inputsOperands, odsBuildableType0, inputsOperandsLoc, result.operands))
10492 return ::mlir::failure();
10493 return ::mlir::success();
10494}
10495
10496void XOrOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
10497 _odsPrinter << ' ';
10498 _odsPrinter << getInputs();
10499 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
10500 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
10501}
10502
10503void XOrOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
10504}
10505
10506} // namespace smt
10507} // namespace llzk
10508MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::XOrOp)
10509
10510namespace llzk {
10511namespace smt {
10512
10513//===----------------------------------------------------------------------===//
10514// ::llzk::smt::YieldOp definitions
10515//===----------------------------------------------------------------------===//
10516
10517namespace detail {
10518std::pair<unsigned, unsigned> YieldOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
10519 bool isVariadic[] = {true};
10520 int prevVariadicCount = 0;
10521 for (unsigned i = 0; i < index; ++i)
10522 if (isVariadic[i]) ++prevVariadicCount;
10523
10524 // Calculate how many dynamic values a static variadic operand corresponds to.
10525 // This assumes all static variadic operands have the same dynamic value count.
10526 int variadicSize = (odsOperandsSize - 0) / 1;
10527 // `index` passed in as the parameter is the static index which counts each
10528 // operand (variadic or not) as size 1. So here for each previous static variadic
10529 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10530 // value pack for this static operand starts.
10531 int start = index + (variadicSize - 1) * prevVariadicCount;
10532 int size = isVariadic[index] ? variadicSize : 1;
10533 return {start, size};
10534}
10535
10536} // namespace detail
10538
10539::llvm::LogicalResult YieldOpAdaptor::verify(::mlir::Location loc) {
10540 return ::mlir::success();
10541}
10542
10543std::pair<unsigned, unsigned> YieldOp::getODSOperandIndexAndLength(unsigned index) {
10544 bool isVariadic[] = {true};
10545 int prevVariadicCount = 0;
10546 for (unsigned i = 0; i < index; ++i)
10547 if (isVariadic[i]) ++prevVariadicCount;
10548
10549 // Calculate how many dynamic values a static variadic operand corresponds to.
10550 // This assumes all static variadic operands have the same dynamic value count.
10551 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
10552 // `index` passed in as the parameter is the static index which counts each
10553 // operand (variadic or not) as size 1. So here for each previous static variadic
10554 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
10555 // value pack for this static operand starts.
10556 int start = index + (variadicSize - 1) * prevVariadicCount;
10557 int size = isVariadic[index] ? variadicSize : 1;
10558 return {start, size};
10559}
10560
10561::mlir::MutableOperandRange YieldOp::getValuesMutable() {
10562 auto range = getODSOperandIndexAndLength(0);
10563 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
10564 return mutableRange;
10565}
10566
10567void YieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
10568 build(odsBuilder, odsState, {});
10569
10570}
10571
10572void YieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange values) {
10573 odsState.addOperands(values);
10574}
10575
10576void YieldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10577 odsState.addOperands(operands);
10578 odsState.addAttributes(attributes);
10579 assert(resultTypes.size() == 0u && "mismatched number of return types");
10580 odsState.addTypes(resultTypes);
10581}
10582
10583::llvm::LogicalResult YieldOp::verifyInvariantsImpl() {
10584 {
10585 unsigned index = 0; (void)index;
10586 auto valueGroup0 = getODSOperands(0);
10587
10588 for (auto v : valueGroup0) {
10589 if (::mlir::failed(__mlir_ods_local_type_constraint_SMT10(*this, v.getType(), "operand", index++)))
10590 return ::mlir::failure();
10591 }
10592 }
10593 return ::mlir::success();
10594}
10595
10596::llvm::LogicalResult YieldOp::verifyInvariants() {
10597 return verifyInvariantsImpl();
10598}
10599
10600::mlir::ParseResult YieldOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10601 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> valuesOperands;
10602 ::llvm::SMLoc valuesOperandsLoc;
10603 (void)valuesOperandsLoc;
10604 ::llvm::SmallVector<::mlir::Type, 1> valuesTypes;
10605
10606 valuesOperandsLoc = parser.getCurrentLocation();
10607 if (parser.parseOperandList(valuesOperands))
10608 return ::mlir::failure();
10609 if (!valuesOperands.empty()) {
10610 if (parser.parseColon())
10611 return ::mlir::failure();
10612
10613 if (parser.parseTypeList(valuesTypes))
10614 return ::mlir::failure();
10615 }
10616 {
10617 auto loc = parser.getCurrentLocation();(void)loc;
10618 if (parser.parseOptionalAttrDict(result.attributes))
10619 return ::mlir::failure();
10620 }
10621 if (parser.resolveOperands(valuesOperands, valuesTypes, valuesOperandsLoc, result.operands))
10622 return ::mlir::failure();
10623 return ::mlir::success();
10624}
10625
10626void YieldOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
10627 if (!getValues().empty()) {
10628 _odsPrinter << ' ';
10629 _odsPrinter << getValues();
10630 _odsPrinter << ' ' << ":";
10631 _odsPrinter << ' ';
10632 _odsPrinter << getValues().getTypes();
10633 }
10634 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
10635 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
10636}
10637
10638void YieldOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
10639}
10640
10641::mlir::MutableOperandRange YieldOp::getMutableSuccessorOperands(
10642 ::mlir::RegionBranchPoint point) {
10643 return ::mlir::MutableOperandRange(*this);
10644}
10645
10646} // namespace smt
10647} // namespace llzk
10648MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::smt::YieldOp)
10649
10650
10651#endif // GET_OP_CLASSES
10652
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:382
AndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:321
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:381
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:390
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:375
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:498
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:386
::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:470
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:466
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:404
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:505
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs)
Definition SMT.cpp.inc:410
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:444
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:478
ApplyFuncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:449
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:541
ApplyFuncOpAdaptor(ApplyFuncOp op)
Definition SMT.cpp.inc:539
::mlir::MutableOperandRange getArgsMutable()
Definition SMT.cpp.inc:563
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:656
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:624
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value func, ::mlir::ValueRange args)
Definition SMT.cpp.inc:569
::mlir::TypedValue<::llzk::smt::SMTFuncType > getFunc()
Definition SMT.h.inc:513
::mlir::Operation::operand_range getArgs()
Definition SMT.h.inc:517
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:531
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:670
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:728
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:507
::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:660
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:545
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:715
ArrayBroadcastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:594
ArrayBroadcastOpAdaptor(ArrayBroadcastOp op)
Definition SMT.cpp.inc:744
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:746
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:829
::mlir::TypedValue<::mlir::Type > getValue()
Definition SMT.h.inc:657
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:839
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:769
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:797
::mlir::TypedValue<::llzk::smt::ArrayType > getResult()
Definition SMT.h.inc:676
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:793
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value)
Definition SMT.cpp.inc:750
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:670
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:651
ArraySelectOpAdaptor(ArraySelectOp op)
Definition SMT.cpp.inc:855
ArraySelectOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:730
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:857
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:962
::mlir::TypedValue<::mlir::Type > getIndex()
Definition SMT.h.inc:801
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:819
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:1020
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value array, ::mlir::Value index)
Definition SMT.cpp.inc:861
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:791
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1007
::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:952
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:916
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:948
::mlir::TypedValue<::llzk::smt::ArrayType > getArray()
Definition SMT.h.inc:797
ArrayStoreOpAdaptor(ArrayStoreOp op)
Definition SMT.cpp.inc:1036
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:1038
ArrayStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:882
::mlir::TypedValue<::mlir::Type > getValue()
Definition SMT.h.inc:961
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1210
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:947
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:1226
::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:1144
::mlir::TypedValue<::llzk::smt::ArrayType > getArray()
Definition SMT.h.inc:953
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:1154
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:984
::mlir::TypedValue<::mlir::Type > getIndex()
Definition SMT.h.inc:957
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:1100
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:1140
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:1042
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:1244
AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1047
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:1283
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:1266
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1302
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input)
Definition SMT.cpp.inc:1248
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1104
::mlir::TypedValue<::llzk::smt::BoolType > getInput()
Definition SMT.h.inc:1110
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:1279
BV2IntOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1205
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:1340
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:1409
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:1561
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:1599
::mlir::TypedValue<::llzk::smt::BitVectorType > getInput()
Definition SMT.h.inc:1280
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:1418
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:1405
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:1587
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1632
::mlir::UnitAttr getIsSignedAttr()
Definition SMT.h.inc:1312
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:1371
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:1293
::mlir::StringAttr getIsSignedAttrName()
Definition SMT.h.inc:1258
::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:1591
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:1348
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:1652
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:1387
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:1392
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input, ::mlir::UnitAttr is_signed)
Definition SMT.cpp.inc:1446
FoldAdaptor::Properties Properties
Definition SMT.h.inc:1252
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:1425
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1274
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:1398
void setIsSigned(bool attrValue)
Definition SMT.cpp.inc:1438
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:1670
BVAShrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1397
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:1771
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:1486
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:1821
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:1464
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:1757
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:1468
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:1729
::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:1761
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:1674
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1458
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:1492
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1808
BVAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1549
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:1839
::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:1930
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:1977
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:1644
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:1620
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:1926
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:1990
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1610
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:1843
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:1898
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:1616
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:1638
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:1940
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:2008
BVAndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1701
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:1768
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:2109
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:2095
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:2146
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:1772
::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:2099
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:1796
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1762
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:1790
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:2012
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:2067
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:2159
BVCmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1884
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:2184
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:2243
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:2531
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:2426
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:2284
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:2510
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:2438
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:1967
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:2250
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:2232
::mlir::StringAttr getPredAttrName()
Definition SMT.h.inc:1941
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:2270
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:1985
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:2216
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:2254
FoldAdaptor::Properties Properties
Definition SMT.h.inc:1935
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:2393
::llzk::smt::BVCmpPredicate getPred()
Definition SMT.cpp.inc:2275
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:2237
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:1957
::llzk::smt::BVCmpPredicateAttr getPredAttr()
Definition SMT.h.inc:2004
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:2263
::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:2430
void setPred(::llzk::smt::BVCmpPredicate attrValue)
Definition SMT.cpp.inc:2280
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:1963
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:2193
static BVCmpPredicateAttr get(::mlir::MLIRContext *context, BVCmpPredicate val)
BVConstantOpAdaptor(BVConstantOp op)
Definition SMT.cpp.inc:2554
BVConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2114
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:2556
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:2626
::llzk::smt::BitVectorAttr getValue()
Definition SMT.cpp.inc:2647
::llzk::smt::BitVectorAttr getValueAttr()
Definition SMT.h.inc:2208
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2189
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:2753
::mlir::StringAttr getValueAttrName()
Definition SMT.h.inc:2163
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:2615
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:2735
::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:23
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:2642
FoldAdaptor::Properties Properties
Definition SMT.h.inc:2157
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:2609
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:2635
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, const llvm::APInt &value)
Definition SMT.cpp.inc:2652
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:2757
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:2565
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:2604
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:2792
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:2784
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:2588
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:2622
BVLShrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2287
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:2810
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:2869
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:2814
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:2948
::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:2901
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:2382
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2376
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:2897
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:2354
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:2348
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:2911
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:2358
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:2961
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:2979
BVMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2439
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3066
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:2506
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:2534
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2528
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3117
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3080
::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:3070
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:2510
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:2500
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3130
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:2983
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3038
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3148
BVNegOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2591
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3266
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2667
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3204
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:2648
::mlir::TypedValue<::llzk::smt::BitVectorType > getInput()
Definition SMT.h.inc:2654
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3276
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3226
::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:3230
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:2673
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:3152
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3240
BVNotOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2730
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3294
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3372
::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:3376
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:2787
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3386
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3422
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3412
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:2812
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:3298
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2806
::mlir::TypedValue<::llzk::smt::BitVectorType > getInput()
Definition SMT.h.inc:2793
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3350
BVOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2869
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3440
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:2964
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3527
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:2930
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:2936
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3499
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:3444
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:2940
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:2958
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3591
::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:3531
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3578
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3541
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3609
BVSDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3021
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3110
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3668
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3696
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3092
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:3613
::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:3700
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3747
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3710
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3116
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3082
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3760
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3088
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3778
BVSModOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3173
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3262
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:3837
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3240
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3244
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:3865
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:3782
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:3879
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3234
::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:3869
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:3929
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3268
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:3916
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:3947
BVSRemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3325
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3414
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:3951
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3392
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:4098
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:4034
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4006
::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:4038
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:4048
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3396
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3386
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:4085
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3420
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:4116
BVShlOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3477
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3544
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:4267
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4175
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3566
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:4203
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3548
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:4120
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3538
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3572
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:4217
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:4254
::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:4207
BVUDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3629
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:4285
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:4436
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3718
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3690
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:4289
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:4372
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3700
::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:4376
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:4386
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3724
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4344
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:4423
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3696
BVURemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3781
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:4454
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3842
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:3876
::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:4545
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:3848
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:4555
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:3870
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:3852
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:4605
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4513
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:4541
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:4458
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:4592
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:4623
BVXOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:3933
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:4004
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:4627
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:3994
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:4000
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:4724
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4682
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4022
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:4761
::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:4714
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:4028
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:4774
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:4710
BoolConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4116
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:4799
BoolConstantOpAdaptor(BoolConstantOp op)
Definition SMT.cpp.inc:4797
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:4878
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:4858
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:4847
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::BoolAttr value)
Definition SMT.cpp.inc:4899
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:4852
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:5026
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:4996
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4191
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:5055
::mlir::StringAttr getValueAttrName()
Definition SMT.h.inc:4165
FoldAdaptor::Properties Properties
Definition SMT.h.inc:4159
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:4865
void setValue(bool attrValue)
Definition SMT.cpp.inc:4895
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5014
::mlir::BoolAttr getValueAttr()
Definition SMT.h.inc:4210
::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:5018
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:4831
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:5047
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:4885
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:4808
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:4869
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5073
CheckOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4307
::mlir::Region & getUnsatRegion()
Definition SMT.h.inc:4385
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange results)
Definition SMT.cpp.inc:5095
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:5143
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5111
::mlir::Region & getUnknownRegion()
Definition SMT.h.inc:4381
::mlir::Region & getSatRegion()
Definition SMT.h.inc:4377
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5139
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition SMT.cpp.inc:5077
::mlir::Operation::result_range getResults()
Definition SMT.h.inc:4373
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:5186
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4367
ConcatOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4438
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5250
::mlir::TypedValue<::llzk::smt::BitVectorType > getRhs()
Definition SMT.h.inc:4509
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:5396
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5309
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5337
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:4499
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:5341
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:5254
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:5383
::mlir::TypedValue<::llzk::smt::BitVectorType > getLhs()
Definition SMT.h.inc:4505
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4527
::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:175
DeclareFunOpAdaptor(DeclareFunOp op)
Definition SMT.cpp.inc:5419
DeclareFunOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4621
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5421
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:5429
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:5584
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5580
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:5615
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:5506
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:5499
void setNamePrefix(::std::optional<::llvm::StringRef > attrValue)
Definition SMT.cpp.inc:5517
::mlir::StringAttr getNamePrefixAttr()
Definition SMT.h.inc:4715
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:5479
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:5486
::mlir::TypedValue<::mlir::Type > getResult()
Definition SMT.h.inc:4702
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:5473
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:5628
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition SMT.h.inc:4692
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5563
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:5452
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:5468
FoldAdaptor::Properties Properties
Definition SMT.h.inc:4664
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:5490
::std::optional< ::llvm::StringRef > getNamePrefix()
Definition SMT.cpp.inc:5512
::mlir::StringAttr getNamePrefixAttrName()
Definition SMT.h.inc:4670
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Type type)
Definition SMT.cpp.inc:5525
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4696
DistinctOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4793
DistinctOpAdaptor(DistinctOp op)
Definition SMT.cpp.inc:5668
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5670
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:4847
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5754
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4862
::llvm::LogicalResult verify()
Definition SMTOps.cpp:145
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:5674
::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:5760
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5732
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:5692
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs)
Definition SMT.cpp.inc:5698
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:5768
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5804
EqOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4922
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:5888
::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:5894
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:5808
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:5826
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs)
Definition SMT.cpp.inc:5832
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:5866
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:4976
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:5902
::llvm::LogicalResult verify()
Definition SMTOps.cpp:123
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:4991
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:5951
ExistsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5123
::mlir::Region & getBody()
Definition SMT.h.inc:5224
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:6221
FoldAdaptor::Properties Properties
Definition SMT.h.inc:5166
::llvm::LogicalResult verify()
Definition SMTOps.cpp:462
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:6084
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:6055
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:6067
::mlir::StringAttr getNoPatternAttrName()
Definition SMT.h.inc:5180
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:6171
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:6048
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:6113
::mlir::MutableArrayRef<::mlir::Region > getPatterns()
Definition SMT.h.inc:5228
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:6288
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:6207
void setNoPattern(bool attrValue)
Definition SMT.cpp.inc:6157
::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:6213
::mlir::UnitAttr getNoPatternAttr()
Definition SMT.h.inc:5246
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:5214
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition SMT.cpp.inc:6165
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:6018
::mlir::ArrayAttr getBoundVarNamesAttr()
Definition SMT.h.inc:5251
::std::optional< ::mlir::ArrayAttr > getBoundVarNames()
Definition SMT.cpp.inc:6148
::mlir::StringAttr getWeightAttrName()
Definition SMT.h.inc:5188
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:6092
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:6126
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:5967
::mlir::StringAttr getBoundVarNamesAttrName()
Definition SMT.h.inc:5172
::mlir::IntegerAttr getWeightAttr()
Definition SMT.h.inc:5241
uint32_t getWeight()
Definition SMT.cpp.inc:6136
void setWeight(uint32_t attrValue)
Definition SMT.cpp.inc:6153
ExtractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5377
ExtractOpAdaptor(ExtractOp op)
Definition SMT.cpp.inc:6369
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:6371
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:6548
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:6542
::mlir::TypedValue<::llzk::smt::BitVectorType > getInput()
Definition SMT.h.inc:5452
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:5446
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:6441
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:6589
::mlir::StringAttr getLowBitAttrName()
Definition SMT.h.inc:5430
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:6380
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:6403
FoldAdaptor::Properties Properties
Definition SMT.h.inc:5424
void setLowBit(uint32_t attrValue)
Definition SMT.cpp.inc:6467
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:6424
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:5465
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:6419
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::IntegerAttr lowBit, ::mlir::Value input)
Definition SMT.cpp.inc:6471
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:6457
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:6450
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:6437
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:6515
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:6603
::llvm::LogicalResult verify()
Definition SMTOps.cpp:157
::mlir::IntegerAttr getLowBitAttr()
Definition SMT.h.inc:5484
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:5471
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:6430
ForallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5629
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:6652
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:6756
::std::optional< ::mlir::ArrayAttr > getBoundVarNames()
Definition SMT.cpp.inc:6849
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:6989
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:6768
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:6922
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:6785
::mlir::StringAttr getBoundVarNamesAttrName()
Definition SMT.h.inc:5678
::llvm::LogicalResult verify()
Definition SMTOps.cpp:434
::mlir::Region & getBody()
Definition SMT.h.inc:5730
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:6668
::mlir::ArrayAttr getBoundVarNamesAttr()
Definition SMT.h.inc:5757
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:6793
::mlir::IntegerAttr getWeightAttr()
Definition SMT.h.inc:5747
::mlir::StringAttr getWeightAttrName()
Definition SMT.h.inc:5694
uint32_t getWeight()
Definition SMT.cpp.inc:6837
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:6827
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:6749
::mlir::StringAttr getNoPatternAttrName()
Definition SMT.h.inc:5686
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:6872
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:6814
::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:6914
void setWeight(uint32_t attrValue)
Definition SMT.cpp.inc:6854
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:5720
::mlir::UnitAttr getNoPatternAttr()
Definition SMT.h.inc:5752
::mlir::MutableArrayRef<::mlir::Region > getPatterns()
Definition SMT.h.inc:5734
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:6719
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition SMT.cpp.inc:6866
void setNoPattern(bool attrValue)
Definition SMT.cpp.inc:6858
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:6908
FoldAdaptor::Properties Properties
Definition SMT.h.inc:5672
ImpliesOpAdaptor(ImpliesOp op)
Definition SMT.cpp.inc:7063
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7065
ImpliesOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5852
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:7205
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7195
::mlir::TypedValue<::llzk::smt::BoolType > getRhs()
Definition SMT.h.inc:5923
::mlir::TypedValue<::llzk::smt::BoolType > getLhs()
Definition SMT.h.inc:5919
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:7164
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:7069
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:7152
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:7124
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:5913
::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:7156
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:5941
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7223
Int2BVOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6004
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6080
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:7246
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:7268
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7299
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:7227
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:7272
::mlir::TypedValue<::llzk::smt::BitVectorType > getResult()
Definition SMT.h.inc:6086
::mlir::TypedValue<::llzk::smt::IntType > getInput()
Definition SMT.h.inc:6067
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:6061
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:7309
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7327
IntAbsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6140
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7437
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:7417
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:7444
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:7383
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6216
::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:7409
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:7405
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:7331
::mlir::TypedValue<::llzk::smt::IntType > getInput()
Definition SMT.h.inc:6203
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:6197
IntAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6276
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7480
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:6336
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:6330
::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:7563
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs)
Definition SMT.cpp.inc:7508
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:7598
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:7537
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7591
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:7502
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6345
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:7484
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:7559
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:7571
IntCmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6437
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7623
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:6510
::mlir::StringAttr getPredAttrName()
Definition SMT.h.inc:6494
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:7832
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:7723
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:7693
void setPred(::llzk::smt::IntPredicate attrValue)
Definition SMT.cpp.inc:7719
FoldAdaptor::Properties Properties
Definition SMT.h.inc:6488
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:7671
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:7655
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:7961
::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:7869
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:7689
::llzk::smt::IntPredicate getPred()
Definition SMT.cpp.inc:7714
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:7682
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:7676
::mlir::TypedValue<::llzk::smt::IntType > getRhs()
Definition SMT.h.inc:6520
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:7865
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:7632
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:7943
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:7702
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6538
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:7877
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:7709
::mlir::TypedValue<::llzk::smt::IntType > getLhs()
Definition SMT.h.inc:6516
::llzk::smt::IntPredicateAttr getPredAttr()
Definition SMT.h.inc:6557
IntConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6667
IntConstantOpAdaptor(IntConstantOp op)
Definition SMT.cpp.inc:7984
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:7986
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:8065
::mlir::APInt getValue()
Definition SMT.cpp.inc:8077
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:8052
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8171
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:8056
::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:8175
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:8072
FoldAdaptor::Properties Properties
Definition SMT.h.inc:6710
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:8039
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:8018
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:7995
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6742
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:8034
::mlir::IntegerAttr getValueAttr()
Definition SMT.h.inc:6761
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8153
::mlir::StringAttr getValueAttrName()
Definition SMT.h.inc:6716
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::IntegerAttr value)
Definition SMT.cpp.inc:8082
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8183
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:8045
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8201
IntDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6838
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:8300
::mlir::TypedValue<::llzk::smt::IntType > getRhs()
Definition SMT.h.inc:6909
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8341
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8288
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8260
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:8205
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:6927
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:8331
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:6899
::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:8292
::mlir::TypedValue<::llzk::smt::IntType > getLhs()
Definition SMT.h.inc:6905
IntModOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6990
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8359
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:8363
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8446
::mlir::TypedValue<::llzk::smt::IntType > getLhs()
Definition SMT.h.inc:7057
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7051
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8418
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:8458
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7079
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8499
::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:8450
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:8489
::mlir::TypedValue<::llzk::smt::IntType > getRhs()
Definition SMT.h.inc:7061
IntMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7139
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8535
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs)
Definition SMT.cpp.inc:8563
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7208
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:8539
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8614
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:8626
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8653
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:7199
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8592
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:8646
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7193
::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:8618
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:8557
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8671
IntNegOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7269
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:8781
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8788
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8749
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8727
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7326
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:8761
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7345
::mlir::TypedValue<::llzk::smt::IntType > getInput()
Definition SMT.h.inc:7332
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:8675
::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:8753
static IntPredicateAttr get(::mlir::MLIRContext *context, IntPredicate val)
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8806
IntSubOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7408
::mlir::TypedValue<::llzk::smt::IntType > getLhs()
Definition SMT.h.inc:7475
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition SMT.cpp.inc:8810
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:8936
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:8865
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:8946
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7469
::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:8897
::mlir::TypedValue<::llzk::smt::IntType > getRhs()
Definition SMT.h.inc:7479
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7497
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:8905
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:8893
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:8964
IteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7560
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:9141
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9125
::mlir::TypedValue<::mlir::Type > getElseValue()
Definition SMT.h.inc:7639
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7662
::mlir::TypedValue<::mlir::Type > getThenValue()
Definition SMT.h.inc:7635
::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:9066
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9062
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7625
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:8968
::mlir::TypedValue<::mlir::Type > getResult()
Definition SMT.h.inc:7668
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9026
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9076
::mlir::TypedValue<::llzk::smt::BoolType > getCond()
Definition SMT.h.inc:7631
NotOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7725
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9159
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9269
::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:9241
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7801
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9237
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7782
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9215
::mlir::TypedValue<::llzk::smt::BoolType > getInput()
Definition SMT.h.inc:7788
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:9276
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9249
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition SMT.cpp.inc:9163
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9312
OrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7861
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:7930
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9428
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9396
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, mlir::Value lhs, mlir::Value rhs)
Definition SMT.cpp.inc:9340
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9408
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9374
::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:9400
::mlir::MutableOperandRange getInputsMutable()
Definition SMT.cpp.inc:9334
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:9435
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:7915
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:7921
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition SMT.cpp.inc:9316
PopOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8023
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9460
::mlir::StringAttr getCountAttrName()
Definition SMT.h.inc:8072
FoldAdaptor::Properties Properties
Definition SMT.h.inc:8066
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:9539
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:9469
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:9546
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9598
uint32_t getCount()
Definition SMT.cpp.inc:9551
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9630
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:9526
void setCount(uint32_t attrValue)
Definition SMT.cpp.inc:9556
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9611
::mlir::IntegerAttr getCountAttr()
Definition SMT.h.inc:8113
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9607
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:9508
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count)
Definition SMT.cpp.inc:9560
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:9492
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:9513
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:9519
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:9530
PushOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8218
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9660
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9798
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9807
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition SMT.cpp.inc:9719
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition SMT.cpp.inc:9713
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:9730
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count)
Definition SMT.cpp.inc:9760
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition SMT.cpp.inc:9746
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9811
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition SMT.cpp.inc:9692
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9830
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition SMT.cpp.inc:9739
uint32_t getCount()
Definition SMT.cpp.inc:9751
FoldAdaptor::Properties Properties
Definition SMT.h.inc:8261
::mlir::StringAttr getCountAttrName()
Definition SMT.h.inc:8267
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition SMT.cpp.inc:9669
::mlir::IntegerAttr getCountAttr()
Definition SMT.h.inc:8308
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition SMT.cpp.inc:9708
void setCount(uint32_t attrValue)
Definition SMT.cpp.inc:9756
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition SMT.cpp.inc:9726
RepeatOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8382
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9853
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition SMT.cpp.inc:9904
::llvm::LogicalResult verify()
Definition SMTOps.cpp:193
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:8458
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:8439
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9898
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9876
ResetOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8522
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9922
::llvm::LogicalResult verifyInvariants()
Definition SMT.cpp.inc:9946
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition SMT.cpp.inc:9959
::llvm::LogicalResult verifyInvariantsImpl()
Definition SMT.cpp.inc:9942
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
Definition SMT.cpp.inc:9926
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition SMT.cpp.inc:9950
SetLogicOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8671
::llvm::LogicalResult verify(::mlir::Location loc)
Definition SMT.cpp.inc:9986
SetLogicOpAdaptor(SetLogicOp op)
Definition SMT.cpp.inc:9984
::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)
Definition SMT.cpp.inc:9995
::mlir::StringAttr getLogicAttr()
Definition SMT.h.inc:8761
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:8720
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:8714
::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:8840
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:8906
::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:8912
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition SMT.h.inc:8894
void print(::mlir::OpAsmPrinter &_odsPrinter)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Region & getBodyRegion()
Definition SMT.h.inc:8916
::mlir::Operation::operand_range getInputs()
Definition SMT.h.inc:8900
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:8965
::mlir::Operation::result_range getODSResults(unsigned index)
Definition SMT.h.inc:9034
::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:9019
::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:9025
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:9093
::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:9147
::mlir::Operation::operand_range getValues()
Definition SMT.h.inc:9153
::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:361
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:520
BV2IntOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1178
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:1174
::llzk::smt::BVCmpPredicateAttr getPredAttr()
Definition SMT.h.inc:1871
::llzk::smt::BVCmpPredicate getPred()
Definition SMT.cpp.inc:2176
BVCmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:1853
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:1849
::llzk::smt::BitVectorAttr getValueAttr()
Definition SMT.h.inc:2101
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:2079
BVConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:2083
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:4081
BoolConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4085
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:4586
DeclareFunOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:4590
::std::optional< ::llvm::StringRef > getNamePrefix()
Definition SMT.cpp.inc:5413
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:5649
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:5783
::std::optional< ::mlir::ArrayAttr > getBoundVarNames()
Definition SMT.cpp.inc:5943
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:5072
ExistsOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5076
ExtractOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5346
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:5342
::std::optional< ::mlir::ArrayAttr > getBoundVarNames()
Definition SMT.cpp.inc:6644
ForallOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:5582
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:5578
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:7459
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:6402
::llzk::smt::IntPredicateAttr getPredAttr()
Definition SMT.h.inc:6424
IntCmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6406
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:6632
IntConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:6636
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:8514
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition SMT.cpp.inc:9291
PopOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:7992
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:7988
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:8183
PushOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8187
SetLogicOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition SMT.h.inc:8640
::std::optional<::mlir::OperationName > odsOpName
Definition SMT.h.inc:8636
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.