LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.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: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10#ifdef GET_OP_LIST
11#undef GET_OP_LIST
12
31#endif // GET_OP_LIST
32
33#ifdef GET_OP_CLASSES
34#undef GET_OP_CLASSES
35
36
37//===----------------------------------------------------------------------===//
38// Local Utility Method Definitions
39//===----------------------------------------------------------------------===//
40
41
42static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
43 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
44 unsigned valueIndex) {
45 if (!((::llzk::isValidEmitEqType(type)))) {
46 return op->emitOpError(valueKind) << " #" << valueIndex
47 << " must be any LLZK type, excluding struct and string types, but got " << type;
48 }
49 return ::mlir::success();
50}
51
52static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
53 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
54 unsigned valueIndex) {
55 if (!((::llvm::isa<::llzk::felt::FeltType>(type)))) {
56 return op->emitOpError(valueKind) << " #" << valueIndex
57 << " must be finite field element, but got " << type;
58 }
59 return ::mlir::success();
60}
61
62static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops3(
63 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
64 unsigned valueIndex) {
65 if (!((type.isSignlessInteger(1)))) {
66 return op->emitOpError(valueKind) << " #" << valueIndex
67 << " must be 1-bit signless integer, but got " << type;
68 }
69 return ::mlir::success();
70}
71
72static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops4(
73 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
74 unsigned valueIndex) {
75 if (!((::llzk::isValidType(type)))) {
76 return op->emitOpError(valueKind) << " #" << valueIndex
77 << " must be variadic of a valid LLZK type, but got " << type;
78 }
79 return ::mlir::success();
80}
81
82static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops5(
83 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
84 unsigned valueIndex) {
85 if (!((::llvm::isa<::mlir::IndexType>(type)))) {
86 return op->emitOpError(valueKind) << " #" << valueIndex
87 << " must be variadic of index, but got " << type;
88 }
89 return ::mlir::success();
90}
91
92static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops6(
93 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
94 unsigned valueIndex) {
95 if (!((::llzk::isValidType(type)))) {
96 return op->emitOpError(valueKind) << " #" << valueIndex
97 << " must be a valid LLZK type, but got " << type;
98 }
99 return ::mlir::success();
100}
101
102static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops7(
103 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
104 unsigned valueIndex) {
105 if (!((::llvm::isa<mlir::smt::BoolType>(type)))) {
106 return op->emitOpError(valueKind) << " #" << valueIndex
107 << " must be , but got " << type;
108 }
109 return ::mlir::success();
110}
111
112static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
113 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
114 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
115 return emitError() << "attribute '" << attrName
116 << "' failed to satisfy constraint: string attribute";
117 return ::mlir::success();
118}
119static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
120 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
121 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
122 return op->emitOpError();
123 });
124}
125
126static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
127 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
128 if (attr && !((::llvm::isa<::mlir::SymbolRefAttr>(attr))))
129 return emitError() << "attribute '" << attrName
130 << "' failed to satisfy constraint: symbol reference attribute";
131 return ::mlir::success();
132}
133static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
134 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
135 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
136 return op->emitOpError();
137 });
138}
139
140static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
141 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
142 if (attr && !(((::llvm::isa<::mlir::TypeAttr>(attr))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(attr).getValue()))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(attr).getValue())))))
143 return emitError() << "attribute '" << attrName
144 << "' failed to satisfy constraint: type attribute of function type";
145 return ::mlir::success();
146}
147static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
148 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
149 return __mlir_ods_local_attr_constraint_Ops3(attr, attrName, [op]() {
150 return op->emitOpError();
151 });
152}
153
154static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
155 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
156 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
157 return emitError() << "attribute '" << attrName
158 << "' failed to satisfy constraint: Array of dictionary attributes";
159 return ::mlir::success();
160}
161static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
162 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
163 return __mlir_ods_local_attr_constraint_Ops4(attr, attrName, [op]() {
164 return op->emitOpError();
165 });
166}
167
168static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
169 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
170 if (attr && !((::llvm::isa<::mlir::ArrayAttr>(attr))))
171 return emitError() << "attribute '" << attrName
172 << "' failed to satisfy constraint: array attribute";
173 return ::mlir::success();
174}
175static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
176 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
177 return __mlir_ods_local_attr_constraint_Ops5(attr, attrName, [op]() {
178 return op->emitOpError();
179 });
180}
181
182static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
183 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
184 if (attr && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(attr))))
185 return emitError() << "attribute '" << attrName
186 << "' failed to satisfy constraint: i32 dense array attribute";
187 return ::mlir::success();
188}
189static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
190 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
191 return __mlir_ods_local_attr_constraint_Ops6(attr, attrName, [op]() {
192 return op->emitOpError();
193 });
194}
195
196static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops7(
197 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
198 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) { return attr && (((::llvm::isa<::mlir::TypeAttr>(attr))) && ((::llvm::isa<::mlir::Type>(::llvm::cast<::mlir::TypeAttr>(attr).getValue()))) && ((true))); }))))
199 return emitError() << "attribute '" << attrName
200 << "' failed to satisfy constraint: type array attribute";
201 return ::mlir::success();
202}
203static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops7(
204 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
205 return __mlir_ods_local_attr_constraint_Ops7(attr, attrName, [op]() {
206 return op->emitOpError();
207 });
208}
209
210static ::llvm::LogicalResult __mlir_ods_local_region_constraint_Ops1(
211 ::mlir::Operation *op, ::mlir::Region &region, ::llvm::StringRef regionName,
212 unsigned regionIndex) {
213 if (!((true))) {
214 return op->emitOpError("region #") << regionIndex
215 << (regionName.empty() ? " " : " ('" + regionName + "') ")
216 << "failed to verify constraint: any region";
217 }
218 return ::mlir::success();
219}
220
221static ::llvm::LogicalResult __mlir_ods_local_region_constraint_Ops2(
222 ::mlir::Operation *op, ::mlir::Region &region, ::llvm::StringRef regionName,
223 unsigned regionIndex) {
224 if (!((::llvm::hasNItems(region, 1)))) {
225 return op->emitOpError("region #") << regionIndex
226 << (regionName.empty() ? " " : " ('" + regionName + "') ")
227 << "failed to verify constraint: region with 1 blocks";
228 }
229 return ::mlir::success();
230}
231namespace llzk::verif {
232
233
234//===----------------------------------------------------------------------===//
235// ::llzk::verif::AssumeDetOp definitions
236//===----------------------------------------------------------------------===//
237
238namespace detail {
239
240AssumeDetOpGenericAdaptorBase::AssumeDetOpGenericAdaptorBase(AssumeDetOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
241
242
243} // namespace detail
245
246::llvm::LogicalResult AssumeDetOpAdaptor::verify(::mlir::Location loc) {
247 return ::mlir::success();
248}
249
250::llvm::LogicalResult AssumeDetOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
251 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
252 if (!dict) {
253 emitError() << "expected DictionaryAttr to set properties";
254 return ::mlir::failure();
255 }
256 return ::mlir::success();
257}
258
259::mlir::Attribute AssumeDetOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
260 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
261 ::mlir::Builder odsBuilder{ctx};
262
263 if (!attrs.empty())
264 return odsBuilder.getDictionaryAttr(attrs);
265 return {};
266}
267
268llvm::hash_code AssumeDetOp::computePropertiesHash(const Properties &prop) {
269 using llvm::hash_value;
270 return llvm::hash_combine();
271}
272
273std::optional<mlir::Attribute> AssumeDetOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
274 return std::nullopt;
275}
276
277void AssumeDetOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
278}
279
280void AssumeDetOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
281}
282
283::llvm::LogicalResult AssumeDetOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
284 return ::mlir::success();
285}
286
287void AssumeDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value hint) {
288 odsState.addOperands(hint);
289}
290
291AssumeDetOp AssumeDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value hint) {
292 ::mlir::OperationState __state__(location, getOperationName());
293 build(builder, __state__, std::forward<decltype(hint)>(hint));
294 auto __res__ = ::llvm::dyn_cast<AssumeDetOp>(builder.create(__state__));
295 assert(__res__ && "builder didn't return the right type");
296 return __res__;
297}
298
299AssumeDetOp AssumeDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value hint) {
300 return create(builder, builder.getLoc(), std::forward<decltype(hint)>(hint));
301}
302
303void AssumeDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value hint) {
304 odsState.addOperands(hint);
305 assert(resultTypes.size() == 0u && "mismatched number of results");
306 odsState.addTypes(resultTypes);
307}
308
309AssumeDetOp AssumeDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value hint) {
310 ::mlir::OperationState __state__(location, getOperationName());
311 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(hint)>(hint));
312 auto __res__ = ::llvm::dyn_cast<AssumeDetOp>(builder.create(__state__));
313 assert(__res__ && "builder didn't return the right type");
314 return __res__;
315}
316
317AssumeDetOp AssumeDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value hint) {
318 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(hint)>(hint));
319}
320
321void AssumeDetOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
322 assert(operands.size() == 1u && "mismatched number of parameters");
323 odsState.addOperands(operands);
324 odsState.addAttributes(attributes);
325 assert(resultTypes.size() == 0u && "mismatched number of return types");
326 odsState.addTypes(resultTypes);
327}
328
329AssumeDetOp AssumeDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
330 ::mlir::OperationState __state__(location, getOperationName());
331 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
332 auto __res__ = ::llvm::dyn_cast<AssumeDetOp>(builder.create(__state__));
333 assert(__res__ && "builder didn't return the right type");
334 return __res__;
335}
336
337AssumeDetOp AssumeDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
338 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
339}
340
341void AssumeDetOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
342 assert(operands.size() == 1u && "mismatched number of parameters");
343 odsState.addOperands(operands);
344 odsState.useProperties(const_cast<Properties&>(properties));
345 odsState.addAttributes(discardableAttributes);
346 assert(resultTypes.size() == 0u && "mismatched number of return types");
347 odsState.addTypes(resultTypes);
348}
349
350AssumeDetOp AssumeDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
351 ::mlir::OperationState __state__(location, getOperationName());
352 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
353 auto __res__ = ::llvm::dyn_cast<AssumeDetOp>(builder.create(__state__));
354 assert(__res__ && "builder didn't return the right type");
355 return __res__;
356}
357
358AssumeDetOp AssumeDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
359 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
360}
361
362::llvm::LogicalResult AssumeDetOp::verifyInvariantsImpl() {
363 {
364 unsigned index = 0; (void)index;
365 auto valueGroup0 = getODSOperands(0);
366
367 for (auto v : valueGroup0) {
368 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
369 return ::mlir::failure();
370 }
371 }
372 return ::mlir::success();
373}
374
375::llvm::LogicalResult AssumeDetOp::verifyInvariants() {
376 return verifyInvariantsImpl();
377}
378
379::mlir::ParseResult AssumeDetOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
380 ::mlir::OpAsmParser::UnresolvedOperand hintRawOperand{};
381 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> hintOperands(&hintRawOperand, 1); ::llvm::SMLoc hintOperandsLoc;
382 (void)hintOperandsLoc;
383 ::mlir::Type hintRawType{};
384 ::llvm::ArrayRef<::mlir::Type> hintTypes(&hintRawType, 1);
385
386 hintOperandsLoc = parser.getCurrentLocation();
387 if (parser.parseOperand(hintRawOperand))
388 return ::mlir::failure();
389 {
390 auto loc = parser.getCurrentLocation();(void)loc;
391 if (parser.parseOptionalAttrDict(result.attributes))
392 return ::mlir::failure();
393 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
394 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
395 })))
396 return ::mlir::failure();
397 }
398 if (parser.parseColon())
399 return ::mlir::failure();
400
401 {
402 ::mlir::Type type;
403 if (parser.parseCustomTypeWithFallback(type))
404 return ::mlir::failure();
405 hintRawType = type;
406 }
407 if (parser.resolveOperands(hintOperands, hintTypes, hintOperandsLoc, result.operands))
408 return ::mlir::failure();
409 return ::mlir::success();
410}
411
412void AssumeDetOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
413 _odsPrinter << ' ';
414 _odsPrinter << getHint();
415 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
416 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
417 _odsPrinter << ' ' << ":";
418 _odsPrinter << ' ';
419 {
420 auto type = getHint().getType();
421 if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
422 _odsPrinter.printStrippedAttrOrType(validType);
423 else
424 _odsPrinter << type;
425 }
426}
427
428// This side effect models "program termination". Based on
429// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
430static void getEffects(
431 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
432) {
433 effects.emplace_back(::mlir::MemoryEffects::Write::get());
434}
435
436} // namespace llzk::verif
437MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::AssumeDetOp)
438
439namespace llzk::verif {
440
441
442//===----------------------------------------------------------------------===//
443// ::llzk::verif::ContractEndOp definitions
444//===----------------------------------------------------------------------===//
445
446namespace detail {
447
449
450
451} // namespace detail
453
454::llvm::LogicalResult ContractEndOpAdaptor::verify(::mlir::Location loc) {
455 return ::mlir::success();
456}
457
458::llvm::LogicalResult ContractEndOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
459 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
460 if (!dict) {
461 emitError() << "expected DictionaryAttr to set properties";
462 return ::mlir::failure();
463 }
464 return ::mlir::success();
465}
466
467::mlir::Attribute ContractEndOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
468 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
469 ::mlir::Builder odsBuilder{ctx};
470
471 if (!attrs.empty())
472 return odsBuilder.getDictionaryAttr(attrs);
473 return {};
474}
475
477 using llvm::hash_value;
478 return llvm::hash_combine();
479}
480
481std::optional<mlir::Attribute> ContractEndOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
482 return std::nullopt;
483}
484
485void ContractEndOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
486}
487
488void ContractEndOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
489}
490
491::llvm::LogicalResult ContractEndOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
492 return ::mlir::success();
493}
494
495void ContractEndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
496}
497
498ContractEndOp ContractEndOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
499 ::mlir::OperationState __state__(location, getOperationName());
500 build(builder, __state__);
501 auto __res__ = ::llvm::dyn_cast<ContractEndOp>(builder.create(__state__));
502 assert(__res__ && "builder didn't return the right type");
503 return __res__;
504}
505
506ContractEndOp ContractEndOp::create(::mlir::ImplicitLocOpBuilder &builder) {
507 return create(builder, builder.getLoc());
508}
509
510void ContractEndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
511 assert(resultTypes.size() == 0u && "mismatched number of results");
512 odsState.addTypes(resultTypes);
513}
514
515ContractEndOp ContractEndOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
516 ::mlir::OperationState __state__(location, getOperationName());
517 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
518 auto __res__ = ::llvm::dyn_cast<ContractEndOp>(builder.create(__state__));
519 assert(__res__ && "builder didn't return the right type");
520 return __res__;
521}
522
523ContractEndOp ContractEndOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
524 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
525}
526
527void ContractEndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
528 assert(operands.size() == 0u && "mismatched number of parameters");
529 odsState.addOperands(operands);
530 odsState.addAttributes(attributes);
531 assert(resultTypes.size() == 0u && "mismatched number of return types");
532 odsState.addTypes(resultTypes);
533}
534
535ContractEndOp ContractEndOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
536 ::mlir::OperationState __state__(location, getOperationName());
537 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
538 auto __res__ = ::llvm::dyn_cast<ContractEndOp>(builder.create(__state__));
539 assert(__res__ && "builder didn't return the right type");
540 return __res__;
541}
542
543ContractEndOp ContractEndOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
544 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
545}
546
547void ContractEndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
548 assert(operands.size() == 0u && "mismatched number of parameters");
549 odsState.addOperands(operands);
550 odsState.useProperties(const_cast<Properties&>(properties));
551 odsState.addAttributes(discardableAttributes);
552 assert(resultTypes.size() == 0u && "mismatched number of return types");
553 odsState.addTypes(resultTypes);
554}
555
556ContractEndOp ContractEndOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
557 ::mlir::OperationState __state__(location, getOperationName());
558 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
559 auto __res__ = ::llvm::dyn_cast<ContractEndOp>(builder.create(__state__));
560 assert(__res__ && "builder didn't return the right type");
561 return __res__;
562}
563
564ContractEndOp ContractEndOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
565 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
566}
567
568::llvm::LogicalResult ContractEndOp::verifyInvariantsImpl() {
569 return ::mlir::success();
570}
571
572::llvm::LogicalResult ContractEndOp::verifyInvariants() {
573 return verifyInvariantsImpl();
574}
575
576::mlir::ParseResult ContractEndOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
577 {
578 auto loc = parser.getCurrentLocation();(void)loc;
579 if (parser.parseOptionalAttrDict(result.attributes))
580 return ::mlir::failure();
581 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
582 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
583 })))
584 return ::mlir::failure();
585 }
586 return ::mlir::success();
587}
588
589void ContractEndOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
590 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
591 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
592}
593
594void ContractEndOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
595}
596
597
598} // namespace llzk::verif
599MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::ContractEndOp)
600
601namespace llzk::verif {
602
603
604//===----------------------------------------------------------------------===//
605// ::llzk::verif::ContractOp definitions
606//===----------------------------------------------------------------------===//
607
608namespace detail {
609
611
613 auto attr = getSymNameAttr();
614 return attr.getValue();
615}
616
618 auto attr = getTargetAttr();
619 return attr;
620}
621
623 auto attr = getFunctionTypeAttr();
624 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
625}
626
627::std::optional< ::mlir::ArrayAttr > ContractOpGenericAdaptorBase::getArgAttrs() {
628 auto attr = getArgAttrsAttr();
629 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
630}
631
632::std::optional< ::mlir::ArrayAttr > ContractOpGenericAdaptorBase::getResAttrs() {
633 auto attr = getResAttrsAttr();
634 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
635}
636
637
638} // namespace detail
640
641::llvm::LogicalResult ContractOpAdaptor::verify(::mlir::Location loc) {
642 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
643 auto tblgen_function_type = getProperties().function_type; (void)tblgen_function_type;
644 if (!tblgen_function_type) return emitError(loc, "'verif.contract' op requires attribute 'function_type'");
645 auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;
646 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
647 if (!tblgen_sym_name) return emitError(loc, "'verif.contract' op requires attribute 'sym_name'");
648 auto tblgen_target = getProperties().target; (void)tblgen_target;
649 if (!tblgen_target) return emitError(loc, "'verif.contract' op requires attribute 'target'");
650
651 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
652 return emitError(loc, "'verif.contract' op attribute 'sym_name' failed to satisfy constraint: string attribute");
653
654 if (tblgen_target && !((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_target))))
655 return emitError(loc, "'verif.contract' op attribute 'target' failed to satisfy constraint: symbol reference attribute");
656
657 if (tblgen_function_type && !(((::llvm::isa<::mlir::TypeAttr>(tblgen_function_type))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(tblgen_function_type).getValue()))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(tblgen_function_type).getValue())))))
658 return emitError(loc, "'verif.contract' op attribute 'function_type' failed to satisfy constraint: type attribute of function type");
659
660 if (tblgen_arg_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_arg_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_arg_attrs), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
661 return emitError(loc, "'verif.contract' op attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");
662
663 if (tblgen_res_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_res_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_res_attrs), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
664 return emitError(loc, "'verif.contract' op attribute 'res_attrs' failed to satisfy constraint: Array of dictionary attributes");
665 return ::mlir::success();
666}
667
668::llvm::LogicalResult ContractOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
669 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
670 if (!dict) {
671 emitError() << "expected DictionaryAttr to set properties";
672 return ::mlir::failure();
673 }
674
675 {
676 auto &propStorage = prop.arg_attrs;
677 auto attr = dict.get("arg_attrs");
678 if (attr) {
679 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
680 if (convertedAttr) {
681 propStorage = convertedAttr;
682 } else {
683 emitError() << "Invalid attribute `arg_attrs` in property conversion: " << attr;
684 return ::mlir::failure();
685 }
686 }
687 }
688
689 {
690 auto &propStorage = prop.function_type;
691 auto attr = dict.get("function_type");
692 if (attr) {
693 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
694 if (convertedAttr) {
695 propStorage = convertedAttr;
696 } else {
697 emitError() << "Invalid attribute `function_type` in property conversion: " << attr;
698 return ::mlir::failure();
699 }
700 }
701 }
702
703 {
704 auto &propStorage = prop.res_attrs;
705 auto attr = dict.get("res_attrs");
706 if (attr) {
707 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
708 if (convertedAttr) {
709 propStorage = convertedAttr;
710 } else {
711 emitError() << "Invalid attribute `res_attrs` in property conversion: " << attr;
712 return ::mlir::failure();
713 }
714 }
715 }
716
717 {
718 auto &propStorage = prop.sym_name;
719 auto attr = dict.get("sym_name");
720 if (attr) {
721 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
722 if (convertedAttr) {
723 propStorage = convertedAttr;
724 } else {
725 emitError() << "Invalid attribute `sym_name` in property conversion: " << attr;
726 return ::mlir::failure();
727 }
728 }
729 }
730
731 {
732 auto &propStorage = prop.target;
733 auto attr = dict.get("target");
734 if (attr) {
735 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
736 if (convertedAttr) {
737 propStorage = convertedAttr;
738 } else {
739 emitError() << "Invalid attribute `target` in property conversion: " << attr;
740 return ::mlir::failure();
741 }
742 }
743 }
744 return ::mlir::success();
745}
746
747::mlir::Attribute ContractOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
748 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
749 ::mlir::Builder odsBuilder{ctx};
750
751 {
752 const auto &propStorage = prop.arg_attrs;
753 if (propStorage)
754 attrs.push_back(odsBuilder.getNamedAttr("arg_attrs",
755 propStorage));
756 }
757
758 {
759 const auto &propStorage = prop.function_type;
760 if (propStorage)
761 attrs.push_back(odsBuilder.getNamedAttr("function_type",
762 propStorage));
763 }
764
765 {
766 const auto &propStorage = prop.res_attrs;
767 if (propStorage)
768 attrs.push_back(odsBuilder.getNamedAttr("res_attrs",
769 propStorage));
770 }
771
772 {
773 const auto &propStorage = prop.sym_name;
774 if (propStorage)
775 attrs.push_back(odsBuilder.getNamedAttr("sym_name",
776 propStorage));
777 }
778
779 {
780 const auto &propStorage = prop.target;
781 if (propStorage)
782 attrs.push_back(odsBuilder.getNamedAttr("target",
783 propStorage));
784 }
785
786 if (!attrs.empty())
787 return odsBuilder.getDictionaryAttr(attrs);
788 return {};
789}
790
791llvm::hash_code ContractOp::computePropertiesHash(const Properties &prop) {
792 using llvm::hash_value;
793 return llvm::hash_combine(
794 llvm::hash_value(prop.arg_attrs.getAsOpaquePointer()),
795 llvm::hash_value(prop.function_type.getAsOpaquePointer()),
796 llvm::hash_value(prop.res_attrs.getAsOpaquePointer()),
797 llvm::hash_value(prop.sym_name.getAsOpaquePointer()),
798 llvm::hash_value(prop.target.getAsOpaquePointer()));
799}
800
801std::optional<mlir::Attribute> ContractOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
802 if (name == "arg_attrs")
803 return prop.arg_attrs;
804
805 if (name == "function_type")
806 return prop.function_type;
807
808 if (name == "res_attrs")
809 return prop.res_attrs;
810
811 if (name == "sym_name")
812 return prop.sym_name;
813
814 if (name == "target")
815 return prop.target;
816 return std::nullopt;
817}
818
819void ContractOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
820 if (name == "arg_attrs") {
821 prop.arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.arg_attrs)>>(value);
822 return;
823 }
824
825 if (name == "function_type") {
826 prop.function_type = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.function_type)>>(value);
827 return;
828 }
829
830 if (name == "res_attrs") {
831 prop.res_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.res_attrs)>>(value);
832 return;
833 }
834
835 if (name == "sym_name") {
836 prop.sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.sym_name)>>(value);
837 return;
838 }
839
840 if (name == "target") {
841 prop.target = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.target)>>(value);
842 return;
843 }
844}
845
846void ContractOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
847 if (prop.arg_attrs) attrs.append("arg_attrs", prop.arg_attrs);
848
849 if (prop.function_type) attrs.append("function_type", prop.function_type);
850
851 if (prop.res_attrs) attrs.append("res_attrs", prop.res_attrs);
852
853 if (prop.sym_name) attrs.append("sym_name", prop.sym_name);
854
855 if (prop.target) attrs.append("target", prop.target);
856}
857
858::llvm::LogicalResult ContractOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
859 {
860 ::mlir::Attribute attr = attrs.get(getArgAttrsAttrName(opName));
861 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr, "arg_attrs", emitError)))
862 return ::mlir::failure();
863 }
864
865 {
866 ::mlir::Attribute attr = attrs.get(getFunctionTypeAttrName(opName));
867 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr, "function_type", emitError)))
868 return ::mlir::failure();
869 }
870
871 {
872 ::mlir::Attribute attr = attrs.get(getResAttrsAttrName(opName));
873 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr, "res_attrs", emitError)))
874 return ::mlir::failure();
875 }
876
877 {
878 ::mlir::Attribute attr = attrs.get(getSymNameAttrName(opName));
879 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr, "sym_name", emitError)))
880 return ::mlir::failure();
881 }
882
883 {
884 ::mlir::Attribute attr = attrs.get(getTargetAttrName(opName));
885 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr, "target", emitError)))
886 return ::mlir::failure();
887 }
888 return ::mlir::success();
889}
890
891::llvm::LogicalResult ContractOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
892 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
893 if (::mlir::failed(reader.readOptionalAttribute(prop.arg_attrs)))
894 return ::mlir::failure();
895
896 if (::mlir::failed(reader.readAttribute(prop.function_type)))
897 return ::mlir::failure();
898
899 if (::mlir::failed(reader.readOptionalAttribute(prop.res_attrs)))
900 return ::mlir::failure();
901
902 if (::mlir::failed(reader.readAttribute(prop.sym_name)))
903 return ::mlir::failure();
904
905 if (::mlir::failed(reader.readAttribute(prop.target)))
906 return ::mlir::failure();
907 return ::mlir::success();
908}
909
910void ContractOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
911 auto &prop = getProperties(); (void)prop;
912
913 writer.writeOptionalAttribute(prop.arg_attrs);
914 writer.writeAttribute(prop.function_type);
915
916 writer.writeOptionalAttribute(prop.res_attrs);
917 writer.writeAttribute(prop.sym_name);
918 writer.writeAttribute(prop.target);
919}
920
921::llvm::StringRef ContractOp::getSymName() {
922 auto attr = getSymNameAttr();
923 return attr.getValue();
924}
925
926::mlir::SymbolRefAttr ContractOp::getTarget() {
927 auto attr = getTargetAttr();
928 return attr;
929}
930
931::mlir::FunctionType ContractOp::getFunctionType() {
932 auto attr = getFunctionTypeAttr();
933 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
934}
935
936::std::optional< ::mlir::ArrayAttr > ContractOp::getArgAttrs() {
937 auto attr = getArgAttrsAttr();
938 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
939}
940
941::std::optional< ::mlir::ArrayAttr > ContractOp::getResAttrs() {
942 auto attr = getResAttrsAttr();
943 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
944}
945
946void ContractOp::setSymName(::llvm::StringRef attrValue) {
947 getProperties().sym_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
948}
949
950void ContractOp::setFunctionType(::mlir::FunctionType attrValue) {
951 getProperties().function_type = ::mlir::TypeAttr::get(attrValue);
952}
953
954void ContractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
955 build(odsBuilder, odsState, ::mlir::TypeRange {}, sym_name, target, function_type, arg_attrs,
956 res_attrs);
957
958}
959
960ContractOp ContractOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
961 ::mlir::OperationState __state__(location, getOperationName());
962 build(builder, __state__, std::forward<decltype(sym_name)>(sym_name), std::forward<decltype(target)>(target), std::forward<decltype(function_type)>(function_type), std::forward<decltype(arg_attrs)>(arg_attrs), std::forward<decltype(res_attrs)>(res_attrs));
963 auto __res__ = ::llvm::dyn_cast<ContractOp>(builder.create(__state__));
964 assert(__res__ && "builder didn't return the right type");
965 return __res__;
966}
967
968ContractOp ContractOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
969 return create(builder, builder.getLoc(), std::forward<decltype(sym_name)>(sym_name), std::forward<decltype(target)>(target), std::forward<decltype(function_type)>(function_type), std::forward<decltype(arg_attrs)>(arg_attrs), std::forward<decltype(res_attrs)>(res_attrs));
970}
971
972void ContractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
973 odsState.getOrAddProperties<Properties>().sym_name = sym_name;
974 odsState.getOrAddProperties<Properties>().target = target;
975 odsState.getOrAddProperties<Properties>().function_type = function_type;
976 if (arg_attrs) {
977 odsState.getOrAddProperties<Properties>().arg_attrs = arg_attrs;
978 }
979 if (res_attrs) {
980 odsState.getOrAddProperties<Properties>().res_attrs = res_attrs;
981 }
982 initializeEmptyBody(
983 odsBuilder, odsState, ::llvm::cast<::mlir::FunctionType>(function_type.getValue())
984 );
985 assert(resultTypes.size() == 0u && "mismatched number of results");
986 odsState.addTypes(resultTypes);
987
988}
989
990ContractOp ContractOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
991 ::mlir::OperationState __state__(location, getOperationName());
992 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(sym_name)>(sym_name), std::forward<decltype(target)>(target), std::forward<decltype(function_type)>(function_type), std::forward<decltype(arg_attrs)>(arg_attrs), std::forward<decltype(res_attrs)>(res_attrs));
993 auto __res__ = ::llvm::dyn_cast<ContractOp>(builder.create(__state__));
994 assert(__res__ && "builder didn't return the right type");
995 return __res__;
996}
997
998ContractOp ContractOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
999 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(sym_name)>(sym_name), std::forward<decltype(target)>(target), std::forward<decltype(function_type)>(function_type), std::forward<decltype(arg_attrs)>(arg_attrs), std::forward<decltype(res_attrs)>(res_attrs));
1000}
1001
1002void ContractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1003 build(odsBuilder, odsState, ::mlir::TypeRange {}, sym_name, target, function_type, arg_attrs,
1004 res_attrs);
1005
1006}
1007
1008ContractOp ContractOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1009 ::mlir::OperationState __state__(location, getOperationName());
1010 build(builder, __state__, std::forward<decltype(sym_name)>(sym_name), std::forward<decltype(target)>(target), std::forward<decltype(function_type)>(function_type), std::forward<decltype(arg_attrs)>(arg_attrs), std::forward<decltype(res_attrs)>(res_attrs));
1011 auto __res__ = ::llvm::dyn_cast<ContractOp>(builder.create(__state__));
1012 assert(__res__ && "builder didn't return the right type");
1013 return __res__;
1014}
1015
1016ContractOp ContractOp::create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1017 return create(builder, builder.getLoc(), std::forward<decltype(sym_name)>(sym_name), std::forward<decltype(target)>(target), std::forward<decltype(function_type)>(function_type), std::forward<decltype(arg_attrs)>(arg_attrs), std::forward<decltype(res_attrs)>(res_attrs));
1018}
1019
1020void ContractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1021 odsState.getOrAddProperties<Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1022 odsState.getOrAddProperties<Properties>().target = target;
1023 odsState.getOrAddProperties<Properties>().function_type = ::mlir::TypeAttr::get(function_type);
1024 if (arg_attrs) {
1025 odsState.getOrAddProperties<Properties>().arg_attrs = arg_attrs;
1026 }
1027 if (res_attrs) {
1028 odsState.getOrAddProperties<Properties>().res_attrs = res_attrs;
1029 }
1030 initializeEmptyBody(odsBuilder, odsState, function_type);
1031 assert(resultTypes.size() == 0u && "mismatched number of results");
1032 odsState.addTypes(resultTypes);
1033
1034}
1035
1036ContractOp ContractOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1037 ::mlir::OperationState __state__(location, getOperationName());
1038 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(sym_name)>(sym_name), std::forward<decltype(target)>(target), std::forward<decltype(function_type)>(function_type), std::forward<decltype(arg_attrs)>(arg_attrs), std::forward<decltype(res_attrs)>(res_attrs));
1039 auto __res__ = ::llvm::dyn_cast<ContractOp>(builder.create(__state__));
1040 assert(__res__ && "builder didn't return the right type");
1041 return __res__;
1042}
1043
1044ContractOp ContractOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1045 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(sym_name)>(sym_name), std::forward<decltype(target)>(target), std::forward<decltype(function_type)>(function_type), std::forward<decltype(arg_attrs)>(arg_attrs), std::forward<decltype(res_attrs)>(res_attrs));
1046}
1047
1048ContractOp ContractOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef name, llvm::StringRef target) {
1049 ::mlir::OperationState __state__(location, getOperationName());
1050 build(builder, __state__, std::forward<decltype(name)>(name), std::forward<decltype(target)>(target));
1051 auto __res__ = ::llvm::dyn_cast<ContractOp>(builder.create(__state__));
1052 assert(__res__ && "builder didn't return the right type");
1053 return __res__;
1054}
1055
1056ContractOp ContractOp::create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef name, llvm::StringRef target) {
1057 return create(builder, builder.getLoc(), std::forward<decltype(name)>(name), std::forward<decltype(target)>(target));
1058}
1059
1060ContractOp ContractOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef name, ::mlir::SymbolRefAttr target) {
1061 ::mlir::OperationState __state__(location, getOperationName());
1062 build(builder, __state__, std::forward<decltype(name)>(name), std::forward<decltype(target)>(target));
1063 auto __res__ = ::llvm::dyn_cast<ContractOp>(builder.create(__state__));
1064 assert(__res__ && "builder didn't return the right type");
1065 return __res__;
1066}
1067
1068ContractOp ContractOp::create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef name, ::mlir::SymbolRefAttr target) {
1069 return create(builder, builder.getLoc(), std::forward<decltype(name)>(name), std::forward<decltype(target)>(target));
1070}
1071
1072::llvm::LogicalResult ContractOp::verifyInvariantsImpl() {
1073 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
1074 auto tblgen_function_type = getProperties().function_type; (void)tblgen_function_type;
1075 if (!tblgen_function_type) return emitOpError("requires attribute 'function_type'");
1076 auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;
1077 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
1078 if (!tblgen_sym_name) return emitOpError("requires attribute 'sym_name'");
1079 auto tblgen_target = getProperties().target; (void)tblgen_target;
1080 if (!tblgen_target) return emitOpError("requires attribute 'target'");
1081
1082 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*this, tblgen_sym_name, "sym_name")))
1083 return ::mlir::failure();
1084
1085 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*this, tblgen_target, "target")))
1086 return ::mlir::failure();
1087
1088 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*this, tblgen_function_type, "function_type")))
1089 return ::mlir::failure();
1090
1091 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*this, tblgen_arg_attrs, "arg_attrs")))
1092 return ::mlir::failure();
1093
1094 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*this, tblgen_res_attrs, "res_attrs")))
1095 return ::mlir::failure();
1096 {
1097 unsigned index = 0; (void)index;
1098
1099 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
1100 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops1(*this, region, "body", index++)))
1101 return ::mlir::failure();
1102 }
1103 return ::mlir::success();
1104}
1105
1106::llvm::LogicalResult ContractOp::verifyInvariants() {
1107 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
1108 return ::mlir::success();
1109 return ::mlir::failure();
1110}
1111
1112::llvm::LogicalResult ContractOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1113 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1114 if (!dict) {
1115 emitError() << "expected DictionaryAttr to set properties";
1116 return ::mlir::failure();
1117 }
1118 // keep track of used keys in the input dictionary to be able to error out
1119 // if there are some unknown ones.
1120 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
1121 ::mlir::MLIRContext *ctx = dict.getContext();
1122 (void)ctx;
1123 {
1124
1125 auto &propStorage = prop.sym_name;
1126 auto sym_nameAttrName = ::mlir::StringAttr::get(ctx, "sym_name");
1127 auto attr = dict.get(sym_nameAttrName);
1128 usedKeys.insert(sym_nameAttrName);
1129 if (attr || /*isRequired=*/true) {
1130 if (!attr) {
1131 emitError() << "expected key entry for sym_name in DictionaryAttr to set "
1132 "Properties.";
1133 return ::mlir::failure();
1134 }
1135 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1136 if (convertedAttr) {
1137 propStorage = convertedAttr;
1138 } else {
1139 emitError() << "Invalid attribute `sym_name` in property conversion: " << attr;
1140 return ::mlir::failure();
1141 }
1142 }
1143 }
1144 {
1145
1146 auto &propStorage = prop.target;
1147 auto targetAttrName = ::mlir::StringAttr::get(ctx, "target");
1148 auto attr = dict.get(targetAttrName);
1149 usedKeys.insert(targetAttrName);
1150 if (attr || /*isRequired=*/true) {
1151 if (!attr) {
1152 emitError() << "expected key entry for target in DictionaryAttr to set "
1153 "Properties.";
1154 return ::mlir::failure();
1155 }
1156 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1157 if (convertedAttr) {
1158 propStorage = convertedAttr;
1159 } else {
1160 emitError() << "Invalid attribute `target` in property conversion: " << attr;
1161 return ::mlir::failure();
1162 }
1163 }
1164 }
1165 {
1166
1167 auto &propStorage = prop.function_type;
1168 auto function_typeAttrName = ::mlir::StringAttr::get(ctx, "function_type");
1169 auto attr = dict.get(function_typeAttrName);
1170 usedKeys.insert(function_typeAttrName);
1171 if (attr || /*isRequired=*/true) {
1172 if (!attr) {
1173 emitError() << "expected key entry for function_type in DictionaryAttr to set "
1174 "Properties.";
1175 return ::mlir::failure();
1176 }
1177 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1178 if (convertedAttr) {
1179 propStorage = convertedAttr;
1180 } else {
1181 emitError() << "Invalid attribute `function_type` in property conversion: " << attr;
1182 return ::mlir::failure();
1183 }
1184 }
1185 }
1186 {
1187
1188 auto &propStorage = prop.arg_attrs;
1189 auto arg_attrsAttrName = ::mlir::StringAttr::get(ctx, "arg_attrs");
1190 auto attr = dict.get(arg_attrsAttrName);
1191 usedKeys.insert(arg_attrsAttrName);
1192 if (attr || /*isRequired=*/false) {
1193 if (!attr) {
1194 emitError() << "expected key entry for arg_attrs in DictionaryAttr to set "
1195 "Properties.";
1196 return ::mlir::failure();
1197 }
1198 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1199 if (convertedAttr) {
1200 propStorage = convertedAttr;
1201 } else {
1202 emitError() << "Invalid attribute `arg_attrs` in property conversion: " << attr;
1203 return ::mlir::failure();
1204 }
1205 }
1206 }
1207 {
1208
1209 auto &propStorage = prop.res_attrs;
1210 auto res_attrsAttrName = ::mlir::StringAttr::get(ctx, "res_attrs");
1211 auto attr = dict.get(res_attrsAttrName);
1212 usedKeys.insert(res_attrsAttrName);
1213 if (attr || /*isRequired=*/false) {
1214 if (!attr) {
1215 emitError() << "expected key entry for res_attrs in DictionaryAttr to set "
1216 "Properties.";
1217 return ::mlir::failure();
1218 }
1219 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1220 if (convertedAttr) {
1221 propStorage = convertedAttr;
1222 } else {
1223 emitError() << "Invalid attribute `res_attrs` in property conversion: " << attr;
1224 return ::mlir::failure();
1225 }
1226 }
1227 }
1228
1229 for (::mlir::NamedAttribute attr : dict) {
1230 if (!usedKeys.contains(attr.getName()))
1231 return emitError() << "unknown key '" << attr.getName() <<
1232 "' when parsing properties dictionary";
1233 }
1234 return ::mlir::success();
1235}
1236
1237
1238} // namespace llzk::verif
1239MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::ContractOp)
1241
1242namespace llzk::verif {
1243
1244
1245//===----------------------------------------------------------------------===//
1246// ::llzk::verif::DecreasesOp definitions
1247//===----------------------------------------------------------------------===//
1248
1249namespace detail {
1250
1251DecreasesOpGenericAdaptorBase::DecreasesOpGenericAdaptorBase(DecreasesOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
1252
1253
1254} // namespace detail
1256
1257::llvm::LogicalResult DecreasesOpAdaptor::verify(::mlir::Location loc) {
1258 return ::mlir::success();
1259}
1260
1261::llvm::LogicalResult DecreasesOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1262 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1263 if (!dict) {
1264 emitError() << "expected DictionaryAttr to set properties";
1265 return ::mlir::failure();
1266 }
1267 return ::mlir::success();
1268}
1269
1270::mlir::Attribute DecreasesOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1271 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1272 ::mlir::Builder odsBuilder{ctx};
1273
1274 if (!attrs.empty())
1275 return odsBuilder.getDictionaryAttr(attrs);
1276 return {};
1277}
1278
1280 using llvm::hash_value;
1281 return llvm::hash_combine();
1282}
1283
1284std::optional<mlir::Attribute> DecreasesOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1285 return std::nullopt;
1286}
1287
1288void DecreasesOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1289}
1290
1291void DecreasesOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
1292}
1293
1294::llvm::LogicalResult DecreasesOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1295 return ::mlir::success();
1296}
1297
1298void DecreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
1299 odsState.addOperands(value);
1300}
1301
1302DecreasesOp DecreasesOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value) {
1303 ::mlir::OperationState __state__(location, getOperationName());
1304 build(builder, __state__, std::forward<decltype(value)>(value));
1305 auto __res__ = ::llvm::dyn_cast<DecreasesOp>(builder.create(__state__));
1306 assert(__res__ && "builder didn't return the right type");
1307 return __res__;
1308}
1309
1310DecreasesOp DecreasesOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value) {
1311 return create(builder, builder.getLoc(), std::forward<decltype(value)>(value));
1312}
1313
1314void DecreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
1315 odsState.addOperands(value);
1316 assert(resultTypes.size() == 0u && "mismatched number of results");
1317 odsState.addTypes(resultTypes);
1318}
1319
1320DecreasesOp DecreasesOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
1321 ::mlir::OperationState __state__(location, getOperationName());
1322 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(value)>(value));
1323 auto __res__ = ::llvm::dyn_cast<DecreasesOp>(builder.create(__state__));
1324 assert(__res__ && "builder didn't return the right type");
1325 return __res__;
1326}
1327
1328DecreasesOp DecreasesOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
1329 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(value)>(value));
1330}
1331
1332void DecreasesOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1333 assert(operands.size() == 1u && "mismatched number of parameters");
1334 odsState.addOperands(operands);
1335 odsState.addAttributes(attributes);
1336 assert(resultTypes.size() == 0u && "mismatched number of return types");
1337 odsState.addTypes(resultTypes);
1338}
1339
1340DecreasesOp DecreasesOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1341 ::mlir::OperationState __state__(location, getOperationName());
1342 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
1343 auto __res__ = ::llvm::dyn_cast<DecreasesOp>(builder.create(__state__));
1344 assert(__res__ && "builder didn't return the right type");
1345 return __res__;
1346}
1347
1348DecreasesOp DecreasesOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1349 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
1350}
1351
1352void DecreasesOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1353 assert(operands.size() == 1u && "mismatched number of parameters");
1354 odsState.addOperands(operands);
1355 odsState.useProperties(const_cast<Properties&>(properties));
1356 odsState.addAttributes(discardableAttributes);
1357 assert(resultTypes.size() == 0u && "mismatched number of return types");
1358 odsState.addTypes(resultTypes);
1359}
1360
1361DecreasesOp DecreasesOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1362 ::mlir::OperationState __state__(location, getOperationName());
1363 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
1364 auto __res__ = ::llvm::dyn_cast<DecreasesOp>(builder.create(__state__));
1365 assert(__res__ && "builder didn't return the right type");
1366 return __res__;
1367}
1368
1369DecreasesOp DecreasesOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1370 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
1371}
1372
1373::llvm::LogicalResult DecreasesOp::verifyInvariantsImpl() {
1374 {
1375 unsigned index = 0; (void)index;
1376 auto valueGroup0 = getODSOperands(0);
1377
1378 for (auto v : valueGroup0) {
1379 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
1380 return ::mlir::failure();
1381 }
1382 }
1383 return ::mlir::success();
1384}
1385
1386::llvm::LogicalResult DecreasesOp::verifyInvariants() {
1387 return verifyInvariantsImpl();
1388}
1389
1390::mlir::ParseResult DecreasesOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1391 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
1392 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
1393 (void)valueOperandsLoc;
1394
1395 valueOperandsLoc = parser.getCurrentLocation();
1396 if (parser.parseOperand(valueRawOperand))
1397 return ::mlir::failure();
1398 {
1399 auto loc = parser.getCurrentLocation();(void)loc;
1400 if (parser.parseOptionalAttrDict(result.attributes))
1401 return ::mlir::failure();
1402 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
1403 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
1404 })))
1405 return ::mlir::failure();
1406 }
1407 ::mlir::Type odsBuildableType0 = ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
1408 if (parser.resolveOperands(valueOperands, odsBuildableType0, valueOperandsLoc, result.operands))
1409 return ::mlir::failure();
1410 return ::mlir::success();
1411}
1412
1413void DecreasesOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1414 _odsPrinter << ' ';
1415 _odsPrinter << getValue();
1416 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1417 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1418}
1419
1420// This side effect models "program termination". Based on
1421// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
1423 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
1424) {
1425 effects.emplace_back(::mlir::MemoryEffects::Write::get());
1426}
1427
1428} // namespace llzk::verif
1429MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::DecreasesOp)
1430
1431namespace llzk::verif {
1432
1433
1434//===----------------------------------------------------------------------===//
1435// ::llzk::verif::EnsureComputeOp definitions
1436//===----------------------------------------------------------------------===//
1437
1438namespace detail {
1439
1441
1442
1443} // namespace detail
1445
1446::llvm::LogicalResult EnsureComputeOpAdaptor::verify(::mlir::Location loc) {
1447 return ::mlir::success();
1448}
1449
1450::llvm::LogicalResult EnsureComputeOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1451 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1452 if (!dict) {
1453 emitError() << "expected DictionaryAttr to set properties";
1454 return ::mlir::failure();
1455 }
1456 return ::mlir::success();
1457}
1458
1459::mlir::Attribute EnsureComputeOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1460 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1461 ::mlir::Builder odsBuilder{ctx};
1462
1463 if (!attrs.empty())
1464 return odsBuilder.getDictionaryAttr(attrs);
1465 return {};
1466}
1467
1469 using llvm::hash_value;
1470 return llvm::hash_combine();
1471}
1472
1473std::optional<mlir::Attribute> EnsureComputeOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1474 return std::nullopt;
1475}
1476
1477void EnsureComputeOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1478}
1479
1480void EnsureComputeOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
1481}
1482
1483::llvm::LogicalResult EnsureComputeOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1484 return ::mlir::success();
1485}
1486
1487void EnsureComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
1488 odsState.addOperands(condition);
1489}
1490
1491EnsureComputeOp EnsureComputeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition) {
1492 ::mlir::OperationState __state__(location, getOperationName());
1493 build(builder, __state__, std::forward<decltype(condition)>(condition));
1494 auto __res__ = ::llvm::dyn_cast<EnsureComputeOp>(builder.create(__state__));
1495 assert(__res__ && "builder didn't return the right type");
1496 return __res__;
1497}
1498
1499EnsureComputeOp EnsureComputeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value condition) {
1500 return create(builder, builder.getLoc(), std::forward<decltype(condition)>(condition));
1501}
1502
1503void EnsureComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
1504 odsState.addOperands(condition);
1505 assert(resultTypes.size() == 0u && "mismatched number of results");
1506 odsState.addTypes(resultTypes);
1507}
1508
1509EnsureComputeOp EnsureComputeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
1510 ::mlir::OperationState __state__(location, getOperationName());
1511 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
1512 auto __res__ = ::llvm::dyn_cast<EnsureComputeOp>(builder.create(__state__));
1513 assert(__res__ && "builder didn't return the right type");
1514 return __res__;
1515}
1516
1517EnsureComputeOp EnsureComputeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
1518 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
1519}
1520
1521void EnsureComputeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1522 assert(operands.size() == 1u && "mismatched number of parameters");
1523 odsState.addOperands(operands);
1524 odsState.addAttributes(attributes);
1525 assert(resultTypes.size() == 0u && "mismatched number of return types");
1526 odsState.addTypes(resultTypes);
1527}
1528
1529EnsureComputeOp EnsureComputeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1530 ::mlir::OperationState __state__(location, getOperationName());
1531 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
1532 auto __res__ = ::llvm::dyn_cast<EnsureComputeOp>(builder.create(__state__));
1533 assert(__res__ && "builder didn't return the right type");
1534 return __res__;
1535}
1536
1537EnsureComputeOp EnsureComputeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1538 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
1539}
1540
1541void EnsureComputeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1542 assert(operands.size() == 1u && "mismatched number of parameters");
1543 odsState.addOperands(operands);
1544 odsState.useProperties(const_cast<Properties&>(properties));
1545 odsState.addAttributes(discardableAttributes);
1546 assert(resultTypes.size() == 0u && "mismatched number of return types");
1547 odsState.addTypes(resultTypes);
1548}
1549
1550EnsureComputeOp EnsureComputeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1551 ::mlir::OperationState __state__(location, getOperationName());
1552 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
1553 auto __res__ = ::llvm::dyn_cast<EnsureComputeOp>(builder.create(__state__));
1554 assert(__res__ && "builder didn't return the right type");
1555 return __res__;
1556}
1557
1558EnsureComputeOp EnsureComputeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1559 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
1560}
1561
1563 {
1564 unsigned index = 0; (void)index;
1565 auto valueGroup0 = getODSOperands(0);
1566
1567 for (auto v : valueGroup0) {
1568 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
1569 return ::mlir::failure();
1570 }
1571 }
1572 return ::mlir::success();
1573}
1574
1575::llvm::LogicalResult EnsureComputeOp::verifyInvariants() {
1576 return verifyInvariantsImpl();
1577}
1578
1579::mlir::ParseResult EnsureComputeOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1580 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
1581 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
1582 (void)conditionOperandsLoc;
1583
1584 conditionOperandsLoc = parser.getCurrentLocation();
1585 if (parser.parseOperand(conditionRawOperand))
1586 return ::mlir::failure();
1587 {
1588 auto loc = parser.getCurrentLocation();(void)loc;
1589 if (parser.parseOptionalAttrDict(result.attributes))
1590 return ::mlir::failure();
1591 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
1592 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
1593 })))
1594 return ::mlir::failure();
1595 }
1596 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1597 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
1598 return ::mlir::failure();
1599 return ::mlir::success();
1600}
1601
1602void EnsureComputeOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1603 _odsPrinter << ' ';
1604 _odsPrinter << getCondition();
1605 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1606 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1607}
1608
1609// This side effect models "program termination". Based on
1610// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
1612 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
1613) {
1614 effects.emplace_back(::mlir::MemoryEffects::Write::get());
1615}
1616
1617} // namespace llzk::verif
1618MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::EnsureComputeOp)
1619
1620namespace llzk::verif {
1621
1622
1623//===----------------------------------------------------------------------===//
1624// ::llzk::verif::EnsureConstrainOp definitions
1625//===----------------------------------------------------------------------===//
1626
1627namespace detail {
1628
1630
1631
1632} // namespace detail
1634
1635::llvm::LogicalResult EnsureConstrainOpAdaptor::verify(::mlir::Location loc) {
1636 return ::mlir::success();
1637}
1638
1639::llvm::LogicalResult EnsureConstrainOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1640 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1641 if (!dict) {
1642 emitError() << "expected DictionaryAttr to set properties";
1643 return ::mlir::failure();
1644 }
1645 return ::mlir::success();
1646}
1647
1648::mlir::Attribute EnsureConstrainOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1649 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1650 ::mlir::Builder odsBuilder{ctx};
1651
1652 if (!attrs.empty())
1653 return odsBuilder.getDictionaryAttr(attrs);
1654 return {};
1655}
1656
1658 using llvm::hash_value;
1659 return llvm::hash_combine();
1660}
1661
1662std::optional<mlir::Attribute> EnsureConstrainOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1663 return std::nullopt;
1664}
1665
1666void EnsureConstrainOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1667}
1668
1669void EnsureConstrainOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
1670}
1671
1672::llvm::LogicalResult EnsureConstrainOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1673 return ::mlir::success();
1674}
1675
1676void EnsureConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
1677 odsState.addOperands(condition);
1678}
1679
1680EnsureConstrainOp EnsureConstrainOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition) {
1681 ::mlir::OperationState __state__(location, getOperationName());
1682 build(builder, __state__, std::forward<decltype(condition)>(condition));
1683 auto __res__ = ::llvm::dyn_cast<EnsureConstrainOp>(builder.create(__state__));
1684 assert(__res__ && "builder didn't return the right type");
1685 return __res__;
1686}
1687
1688EnsureConstrainOp EnsureConstrainOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value condition) {
1689 return create(builder, builder.getLoc(), std::forward<decltype(condition)>(condition));
1690}
1691
1692void EnsureConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
1693 odsState.addOperands(condition);
1694 assert(resultTypes.size() == 0u && "mismatched number of results");
1695 odsState.addTypes(resultTypes);
1696}
1697
1698EnsureConstrainOp EnsureConstrainOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
1699 ::mlir::OperationState __state__(location, getOperationName());
1700 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
1701 auto __res__ = ::llvm::dyn_cast<EnsureConstrainOp>(builder.create(__state__));
1702 assert(__res__ && "builder didn't return the right type");
1703 return __res__;
1704}
1705
1706EnsureConstrainOp EnsureConstrainOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
1707 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
1708}
1709
1710void EnsureConstrainOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1711 assert(operands.size() == 1u && "mismatched number of parameters");
1712 odsState.addOperands(operands);
1713 odsState.addAttributes(attributes);
1714 assert(resultTypes.size() == 0u && "mismatched number of return types");
1715 odsState.addTypes(resultTypes);
1716}
1717
1718EnsureConstrainOp EnsureConstrainOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1719 ::mlir::OperationState __state__(location, getOperationName());
1720 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
1721 auto __res__ = ::llvm::dyn_cast<EnsureConstrainOp>(builder.create(__state__));
1722 assert(__res__ && "builder didn't return the right type");
1723 return __res__;
1724}
1725
1726EnsureConstrainOp EnsureConstrainOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1727 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
1728}
1729
1730void EnsureConstrainOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1731 assert(operands.size() == 1u && "mismatched number of parameters");
1732 odsState.addOperands(operands);
1733 odsState.useProperties(const_cast<Properties&>(properties));
1734 odsState.addAttributes(discardableAttributes);
1735 assert(resultTypes.size() == 0u && "mismatched number of return types");
1736 odsState.addTypes(resultTypes);
1737}
1738
1739EnsureConstrainOp EnsureConstrainOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1740 ::mlir::OperationState __state__(location, getOperationName());
1741 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
1742 auto __res__ = ::llvm::dyn_cast<EnsureConstrainOp>(builder.create(__state__));
1743 assert(__res__ && "builder didn't return the right type");
1744 return __res__;
1745}
1746
1747EnsureConstrainOp EnsureConstrainOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1748 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
1749}
1750
1752 {
1753 unsigned index = 0; (void)index;
1754 auto valueGroup0 = getODSOperands(0);
1755
1756 for (auto v : valueGroup0) {
1757 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
1758 return ::mlir::failure();
1759 }
1760 }
1761 return ::mlir::success();
1762}
1763
1765 return verifyInvariantsImpl();
1766}
1767
1768::mlir::ParseResult EnsureConstrainOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1769 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
1770 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
1771 (void)conditionOperandsLoc;
1772
1773 conditionOperandsLoc = parser.getCurrentLocation();
1774 if (parser.parseOperand(conditionRawOperand))
1775 return ::mlir::failure();
1776 {
1777 auto loc = parser.getCurrentLocation();(void)loc;
1778 if (parser.parseOptionalAttrDict(result.attributes))
1779 return ::mlir::failure();
1780 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
1781 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
1782 })))
1783 return ::mlir::failure();
1784 }
1785 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1786 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
1787 return ::mlir::failure();
1788 return ::mlir::success();
1789}
1790
1791void EnsureConstrainOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1792 _odsPrinter << ' ';
1793 _odsPrinter << getCondition();
1794 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1795 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1796}
1797
1798// This side effect models "program termination". Based on
1799// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
1801 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
1802) {
1803 effects.emplace_back(::mlir::MemoryEffects::Write::get());
1804}
1805
1806} // namespace llzk::verif
1807MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::EnsureConstrainOp)
1808
1809namespace llzk::verif {
1810
1811
1812//===----------------------------------------------------------------------===//
1813// ::llzk::verif::IncludeOp definitions
1814//===----------------------------------------------------------------------===//
1815
1816namespace detail {
1817
1818IncludeOpGenericAdaptorBase::IncludeOpGenericAdaptorBase(IncludeOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
1819
1820std::pair<unsigned, unsigned> IncludeOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1821 ::llvm::ArrayRef<int32_t> sizeAttr = getProperties().operandSegmentSizes;
1822
1823 unsigned start = 0;
1824 for (unsigned i = 0; i < index; ++i)
1825 start += sizeAttr[i];
1826 return {start, sizeAttr[index]};
1827}
1828
1830 auto attr = getCalleeAttr();
1831 return attr;
1832}
1833
1834::std::optional< ::mlir::ArrayAttr > IncludeOpGenericAdaptorBase::getTemplateParams() {
1835 auto attr = getTemplateParamsAttr();
1836 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1837}
1838
1840 auto attr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
1841 return attr;
1842}
1843
1845 auto attr = getNumDimsPerMapAttr();
1846 return attr;
1847}
1848
1850 auto attr = getMapOpGroupSizesAttr();
1851 return attr;
1852}
1853
1854::std::optional< ::mlir::ArrayAttr > IncludeOpGenericAdaptorBase::getArgAttrs() {
1855 auto attr = getArgAttrsAttr();
1856 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1857}
1858
1859::std::optional< ::mlir::ArrayAttr > IncludeOpGenericAdaptorBase::getResAttrs() {
1860 auto attr = getResAttrsAttr();
1861 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1862}
1863
1864
1865} // namespace detail
1867
1868::llvm::LogicalResult IncludeOpAdaptor::verify(::mlir::Location loc) {
1869 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
1870 auto tblgen_callee = getProperties().callee; (void)tblgen_callee;
1871 if (!tblgen_callee) return emitError(loc, "'verif.include' op requires attribute 'callee'");
1872 auto tblgen_mapOpGroupSizes = getProperties().mapOpGroupSizes; (void)tblgen_mapOpGroupSizes;
1873 if (!tblgen_mapOpGroupSizes) return emitError(loc, "'verif.include' op requires attribute 'mapOpGroupSizes'");
1874 auto tblgen_numDimsPerMap = getProperties().numDimsPerMap; (void)tblgen_numDimsPerMap;
1875 auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;
1876 auto tblgen_templateParams = getProperties().templateParams; (void)tblgen_templateParams;
1877
1878 if (tblgen_callee && !((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_callee))))
1879 return emitError(loc, "'verif.include' op attribute 'callee' failed to satisfy constraint: symbol reference attribute");
1880
1881 if (tblgen_templateParams && !((::llvm::isa<::mlir::ArrayAttr>(tblgen_templateParams))))
1882 return emitError(loc, "'verif.include' op attribute 'templateParams' failed to satisfy constraint: array attribute");
1883
1884 if (tblgen_numDimsPerMap && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_numDimsPerMap))))
1885 return emitError(loc, "'verif.include' op attribute 'numDimsPerMap' failed to satisfy constraint: i32 dense array attribute");
1886
1887 if (tblgen_mapOpGroupSizes && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_mapOpGroupSizes))))
1888 return emitError(loc, "'verif.include' op attribute 'mapOpGroupSizes' failed to satisfy constraint: i32 dense array attribute");
1889
1890 if (tblgen_arg_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_arg_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_arg_attrs), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
1891 return emitError(loc, "'verif.include' op attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");
1892
1893 if (tblgen_res_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_res_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_res_attrs), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
1894 return emitError(loc, "'verif.include' op attribute 'res_attrs' failed to satisfy constraint: Array of dictionary attributes");
1895 return ::mlir::success();
1896}
1897
1898std::pair<unsigned, unsigned> IncludeOp::getODSOperandIndexAndLength(unsigned index) {
1899 ::llvm::ArrayRef<int32_t> sizeAttr = getProperties().operandSegmentSizes;
1900
1901 unsigned start = 0;
1902 for (unsigned i = 0; i < index; ++i)
1903 start += sizeAttr[i];
1904 return {start, sizeAttr[index]};
1905}
1906
1907::mlir::MutableOperandRange IncludeOp::getArgOperandsMutable() {
1908 auto range = getODSOperandIndexAndLength(0);
1909 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(0u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
1910 return mutableRange;
1911}
1912
1913::mlir::MutableOperandRangeRange IncludeOp::getMapOperandsMutable() {
1914 auto range = getODSOperandIndexAndLength(1);
1915 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(1u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
1916 return mutableRange.split(*(*this)->getAttrDictionary().getNamed(getMapOpGroupSizesAttrName()));
1917}
1918
1919::llvm::LogicalResult IncludeOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1920 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1921 if (!dict) {
1922 emitError() << "expected DictionaryAttr to set properties";
1923 return ::mlir::failure();
1924 }
1925
1926 {
1927 auto &propStorage = prop.arg_attrs;
1928 auto attr = dict.get("arg_attrs");
1929 if (attr) {
1930 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1931 if (convertedAttr) {
1932 propStorage = convertedAttr;
1933 } else {
1934 emitError() << "Invalid attribute `arg_attrs` in property conversion: " << attr;
1935 return ::mlir::failure();
1936 }
1937 }
1938 }
1939
1940 {
1941 auto &propStorage = prop.callee;
1942 auto attr = dict.get("callee");
1943 if (attr) {
1944 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1945 if (convertedAttr) {
1946 propStorage = convertedAttr;
1947 } else {
1948 emitError() << "Invalid attribute `callee` in property conversion: " << attr;
1949 return ::mlir::failure();
1950 }
1951 }
1952 }
1953
1954 {
1955 auto &propStorage = prop.mapOpGroupSizes;
1956 auto attr = dict.get("mapOpGroupSizes");
1957 if (attr) {
1958 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1959 if (convertedAttr) {
1960 propStorage = convertedAttr;
1961 } else {
1962 emitError() << "Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
1963 return ::mlir::failure();
1964 }
1965 }
1966 }
1967
1968 {
1969 auto &propStorage = prop.numDimsPerMap;
1970 auto attr = dict.get("numDimsPerMap");
1971 if (attr) {
1972 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1973 if (convertedAttr) {
1974 propStorage = convertedAttr;
1975 } else {
1976 emitError() << "Invalid attribute `numDimsPerMap` in property conversion: " << attr;
1977 return ::mlir::failure();
1978 }
1979 }
1980 }
1981
1982 {
1983 auto &propStorage = prop.res_attrs;
1984 auto attr = dict.get("res_attrs");
1985 if (attr) {
1986 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1987 if (convertedAttr) {
1988 propStorage = convertedAttr;
1989 } else {
1990 emitError() << "Invalid attribute `res_attrs` in property conversion: " << attr;
1991 return ::mlir::failure();
1992 }
1993 }
1994 }
1995
1996 {
1997 auto &propStorage = prop.templateParams;
1998 auto attr = dict.get("templateParams");
1999 if (attr) {
2000 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
2001 if (convertedAttr) {
2002 propStorage = convertedAttr;
2003 } else {
2004 emitError() << "Invalid attribute `templateParams` in property conversion: " << attr;
2005 return ::mlir::failure();
2006 }
2007 }
2008 }
2009{
2010
2011 auto setFromAttr = [] (auto &propStorage, ::mlir::Attribute propAttr,
2012 ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) -> ::mlir::LogicalResult {
2013 return convertFromAttribute(propStorage, propAttr, emitError);
2014 };
2015 auto attr = dict.get("operandSegmentSizes"); if (!attr) attr = dict.get("operand_segment_sizes");;
2016;
2017 if (attr && ::mlir::failed(setFromAttr(prop.operandSegmentSizes, attr, [&]() {
2018 return emitError() << "for `operandSegmentSizes`: ";
2019 })))
2020 return ::mlir::failure();
2021 }
2022 return ::mlir::success();
2023}
2024
2025::mlir::Attribute IncludeOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2026 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2027 ::mlir::Builder odsBuilder{ctx};
2028
2029 {
2030 const auto &propStorage = prop.arg_attrs;
2031 if (propStorage)
2032 attrs.push_back(odsBuilder.getNamedAttr("arg_attrs",
2033 propStorage));
2034 }
2035
2036 {
2037 const auto &propStorage = prop.callee;
2038 if (propStorage)
2039 attrs.push_back(odsBuilder.getNamedAttr("callee",
2040 propStorage));
2041 }
2042
2043 {
2044 const auto &propStorage = prop.mapOpGroupSizes;
2045 if (propStorage)
2046 attrs.push_back(odsBuilder.getNamedAttr("mapOpGroupSizes",
2047 propStorage));
2048 }
2049
2050 {
2051 const auto &propStorage = prop.numDimsPerMap;
2052 if (propStorage)
2053 attrs.push_back(odsBuilder.getNamedAttr("numDimsPerMap",
2054 propStorage));
2055 }
2056
2057 {
2058 const auto &propStorage = prop.res_attrs;
2059 if (propStorage)
2060 attrs.push_back(odsBuilder.getNamedAttr("res_attrs",
2061 propStorage));
2062 }
2063
2064 {
2065 const auto &propStorage = prop.templateParams;
2066 if (propStorage)
2067 attrs.push_back(odsBuilder.getNamedAttr("templateParams",
2068 propStorage));
2069 }
2070
2071 {
2072 const auto &propStorage = prop.operandSegmentSizes;
2073 auto attr = [&]() -> ::mlir::Attribute {
2074 return ::mlir::DenseI32ArrayAttr::get(ctx, propStorage);
2075 }();
2076 attrs.push_back(odsBuilder.getNamedAttr("operandSegmentSizes", attr));
2077 }
2078
2079 if (!attrs.empty())
2080 return odsBuilder.getDictionaryAttr(attrs);
2081 return {};
2082}
2083
2084llvm::hash_code IncludeOp::computePropertiesHash(const Properties &prop) {
2085 auto hash_operandSegmentSizes_ = [] (const auto &propStorage) -> llvm::hash_code {
2086 using ::llvm::hash_value;
2087 return ::llvm::hash_combine_range(std::begin(propStorage), std::end(propStorage));;
2088 };
2089 using llvm::hash_value;
2090 return llvm::hash_combine(
2091 llvm::hash_value(prop.arg_attrs.getAsOpaquePointer()),
2092 llvm::hash_value(prop.callee.getAsOpaquePointer()),
2093 llvm::hash_value(prop.mapOpGroupSizes.getAsOpaquePointer()),
2094 llvm::hash_value(prop.numDimsPerMap.getAsOpaquePointer()),
2095 llvm::hash_value(prop.res_attrs.getAsOpaquePointer()),
2096 llvm::hash_value(prop.templateParams.getAsOpaquePointer()),
2097 hash_operandSegmentSizes_(prop.operandSegmentSizes));
2098}
2099
2100std::optional<mlir::Attribute> IncludeOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2101 if (name == "arg_attrs")
2102 return prop.arg_attrs;
2103
2104 if (name == "callee")
2105 return prop.callee;
2106
2107 if (name == "mapOpGroupSizes")
2108 return prop.mapOpGroupSizes;
2109
2110 if (name == "numDimsPerMap")
2111 return prop.numDimsPerMap;
2112
2113 if (name == "res_attrs")
2114 return prop.res_attrs;
2115
2116 if (name == "templateParams")
2117 return prop.templateParams;
2118 if (name == "operand_segment_sizes" || name == "operandSegmentSizes") return [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.operandSegmentSizes); }();
2119 return std::nullopt;
2120}
2121
2122void IncludeOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2123 if (name == "arg_attrs") {
2124 prop.arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.arg_attrs)>>(value);
2125 return;
2126 }
2127
2128 if (name == "callee") {
2129 prop.callee = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.callee)>>(value);
2130 return;
2131 }
2132
2133 if (name == "mapOpGroupSizes") {
2134 prop.mapOpGroupSizes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.mapOpGroupSizes)>>(value);
2135 return;
2136 }
2137
2138 if (name == "numDimsPerMap") {
2139 prop.numDimsPerMap = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.numDimsPerMap)>>(value);
2140 return;
2141 }
2142
2143 if (name == "res_attrs") {
2144 prop.res_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.res_attrs)>>(value);
2145 return;
2146 }
2147
2148 if (name == "templateParams") {
2149 prop.templateParams = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.templateParams)>>(value);
2150 return;
2151 }
2152 if (name == "operand_segment_sizes" || name == "operandSegmentSizes") {
2153 auto arrAttr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(value);
2154 if (!arrAttr) return;
2155 if (arrAttr.size() != sizeof(prop.operandSegmentSizes) / sizeof(int32_t))
2156 return;
2157 llvm::copy(arrAttr.asArrayRef(), prop.operandSegmentSizes.begin());
2158 return;
2159 }
2160}
2161
2162void IncludeOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
2163 if (prop.arg_attrs) attrs.append("arg_attrs", prop.arg_attrs);
2164
2165 if (prop.callee) attrs.append("callee", prop.callee);
2166
2167 if (prop.mapOpGroupSizes) attrs.append("mapOpGroupSizes", prop.mapOpGroupSizes);
2168
2169 if (prop.numDimsPerMap) attrs.append("numDimsPerMap", prop.numDimsPerMap);
2170
2171 if (prop.res_attrs) attrs.append("res_attrs", prop.res_attrs);
2172
2173 if (prop.templateParams) attrs.append("templateParams", prop.templateParams);
2174 attrs.append("operandSegmentSizes", [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.operandSegmentSizes); }());
2175}
2176
2177::llvm::LogicalResult IncludeOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2178 {
2179 ::mlir::Attribute attr = attrs.get(getArgAttrsAttrName(opName));
2180 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr, "arg_attrs", emitError)))
2181 return ::mlir::failure();
2182 }
2183
2184 {
2185 ::mlir::Attribute attr = attrs.get(getCalleeAttrName(opName));
2186 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr, "callee", emitError)))
2187 return ::mlir::failure();
2188 }
2189
2190 {
2191 ::mlir::Attribute attr = attrs.get(getMapOpGroupSizesAttrName(opName));
2192 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr, "mapOpGroupSizes", emitError)))
2193 return ::mlir::failure();
2194 }
2195
2196 {
2197 ::mlir::Attribute attr = attrs.get(getNumDimsPerMapAttrName(opName));
2198 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr, "numDimsPerMap", emitError)))
2199 return ::mlir::failure();
2200 }
2201
2202 {
2203 ::mlir::Attribute attr = attrs.get(getResAttrsAttrName(opName));
2204 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr, "res_attrs", emitError)))
2205 return ::mlir::failure();
2206 }
2207
2208 {
2209 ::mlir::Attribute attr = attrs.get(getTemplateParamsAttrName(opName));
2210 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(attr, "templateParams", emitError)))
2211 return ::mlir::failure();
2212 }
2213 return ::mlir::success();
2214}
2215
2216::llvm::LogicalResult IncludeOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
2217 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
2218 if (::mlir::failed(reader.readOptionalAttribute(prop.arg_attrs)))
2219 return ::mlir::failure();
2220
2221 if (::mlir::failed(reader.readAttribute(prop.callee)))
2222 return ::mlir::failure();
2223
2224 if (::mlir::failed(reader.readAttribute(prop.mapOpGroupSizes)))
2225 return ::mlir::failure();
2226
2227 if (::mlir::failed(reader.readOptionalAttribute(prop.numDimsPerMap)))
2228 return ::mlir::failure();
2229
2230 if (reader.getBytecodeVersion() < /*kNativePropertiesODSSegmentSize=*/6) {
2231 auto &propStorage = prop.operandSegmentSizes;
2232 ::mlir::DenseI32ArrayAttr attr;
2233 if (::mlir::failed(reader.readAttribute(attr))) return ::mlir::failure();
2234 if (attr.size() > static_cast<int64_t>(sizeof(propStorage) / sizeof(int32_t))) {
2235 reader.emitError("size mismatch for operand/result_segment_size");
2236 return ::mlir::failure();
2237 }
2238 ::llvm::copy(::llvm::ArrayRef<int32_t>(attr), propStorage.begin());
2239 }
2240
2241 if (::mlir::failed(reader.readOptionalAttribute(prop.res_attrs)))
2242 return ::mlir::failure();
2243
2244 if (::mlir::failed(reader.readOptionalAttribute(prop.templateParams)))
2245 return ::mlir::failure();
2246
2247 {
2248 auto &propStorage = prop.operandSegmentSizes;
2249 auto readProp = [&]() {
2250
2251 if (reader.getBytecodeVersion() >= /*kNativePropertiesODSSegmentSize=*/6)
2252 return reader.readSparseArray(::llvm::MutableArrayRef(propStorage));
2253;
2254 return ::mlir::success();
2255 };
2256 if (::mlir::failed(readProp()))
2257 return ::mlir::failure();
2258 }
2259 return ::mlir::success();
2260}
2261
2262void IncludeOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
2263 auto &prop = getProperties(); (void)prop;
2264
2265 writer.writeOptionalAttribute(prop.arg_attrs);
2266 writer.writeAttribute(prop.callee);
2267 writer.writeAttribute(prop.mapOpGroupSizes);
2268
2269 writer.writeOptionalAttribute(prop.numDimsPerMap);
2270
2271if (writer.getBytecodeVersion() < /*kNativePropertiesODSSegmentSize=*/6) {
2272 auto &propStorage = prop.operandSegmentSizes;
2273 writer.writeAttribute(::mlir::DenseI32ArrayAttr::get(this->getContext(), propStorage));
2274}
2275
2276 writer.writeOptionalAttribute(prop.res_attrs);
2277
2278 writer.writeOptionalAttribute(prop.templateParams);
2279
2280 {
2281 auto &propStorage = prop.operandSegmentSizes;
2282
2283 if (writer.getBytecodeVersion() >= /*kNativePropertiesODSSegmentSize=*/6)
2284 writer.writeSparseArray(::llvm::ArrayRef(propStorage));
2285;
2286 }
2287}
2288
2289::mlir::SymbolRefAttr IncludeOp::getCallee() {
2290 auto attr = getCalleeAttr();
2291 return attr;
2292}
2293
2294::std::optional< ::mlir::ArrayAttr > IncludeOp::getTemplateParams() {
2295 auto attr = getTemplateParamsAttr();
2296 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
2297}
2298
2299::llvm::ArrayRef<int32_t> IncludeOp::getNumDimsPerMap() {
2300 auto attr = getNumDimsPerMapAttr();
2301 return attr;
2302}
2303
2304::llvm::ArrayRef<int32_t> IncludeOp::getMapOpGroupSizes() {
2305 auto attr = getMapOpGroupSizesAttr();
2306 return attr;
2307}
2308
2309::std::optional< ::mlir::ArrayAttr > IncludeOp::getArgAttrs() {
2310 auto attr = getArgAttrsAttr();
2311 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
2312}
2313
2314::std::optional< ::mlir::ArrayAttr > IncludeOp::getResAttrs() {
2315 auto attr = getResAttrsAttr();
2316 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
2317}
2318
2319void IncludeOp::setNumDimsPerMap(::llvm::ArrayRef<int32_t> attrValue) {
2320 getProperties().numDimsPerMap = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
2321}
2322
2323void IncludeOp::setMapOpGroupSizes(::llvm::ArrayRef<int32_t> attrValue) {
2324 getProperties().mapOpGroupSizes = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
2325}
2326
2327IncludeOp IncludeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2328 ::mlir::OperationState __state__(location, getOperationName());
2329 build(builder, __state__, std::forward<decltype(callee)>(callee), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2330 auto __res__ = ::llvm::dyn_cast<IncludeOp>(builder.create(__state__));
2331 assert(__res__ && "builder didn't return the right type");
2332 return __res__;
2333}
2334
2335IncludeOp IncludeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2336 return create(builder, builder.getLoc(), std::forward<decltype(callee)>(callee), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2337}
2338
2339IncludeOp IncludeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2340 ::mlir::OperationState __state__(location, getOperationName());
2341 build(builder, __state__, std::forward<decltype(callee)>(callee), std::forward<decltype(mapOperands)>(mapOperands), std::forward<decltype(numDimsPerMap)>(numDimsPerMap), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2342 auto __res__ = ::llvm::dyn_cast<IncludeOp>(builder.create(__state__));
2343 assert(__res__ && "builder didn't return the right type");
2344 return __res__;
2345}
2346
2347IncludeOp IncludeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2348 return create(builder, builder.getLoc(), std::forward<decltype(callee)>(callee), std::forward<decltype(mapOperands)>(mapOperands), std::forward<decltype(numDimsPerMap)>(numDimsPerMap), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2349}
2350
2351void IncludeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2352 build(odsBuilder, odsState, callee, mapOperands,
2353 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap),
2354 argOperands, templateParams);
2355
2356}
2357
2358IncludeOp IncludeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2359 ::mlir::OperationState __state__(location, getOperationName());
2360 build(builder, __state__, std::forward<decltype(callee)>(callee), std::forward<decltype(mapOperands)>(mapOperands), std::forward<decltype(numDimsPerMap)>(numDimsPerMap), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2361 auto __res__ = ::llvm::dyn_cast<IncludeOp>(builder.create(__state__));
2362 assert(__res__ && "builder didn't return the right type");
2363 return __res__;
2364}
2365
2366IncludeOp IncludeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2367 return create(builder, builder.getLoc(), std::forward<decltype(callee)>(callee), std::forward<decltype(mapOperands)>(mapOperands), std::forward<decltype(numDimsPerMap)>(numDimsPerMap), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2368}
2369
2370void IncludeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::verif::ContractOp callee, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2371 build(odsBuilder, odsState,
2372 callee.getFullyQualifiedName(false),
2373 argOperands, templateParams);
2374
2375}
2376
2377IncludeOp IncludeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::verif::ContractOp callee, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2378 ::mlir::OperationState __state__(location, getOperationName());
2379 build(builder, __state__, std::forward<decltype(callee)>(callee), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2380 auto __res__ = ::llvm::dyn_cast<IncludeOp>(builder.create(__state__));
2381 assert(__res__ && "builder didn't return the right type");
2382 return __res__;
2383}
2384
2385IncludeOp IncludeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::verif::ContractOp callee, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2386 return create(builder, builder.getLoc(), std::forward<decltype(callee)>(callee), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2387}
2388
2389void IncludeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::verif::ContractOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2390 build(odsBuilder, odsState,
2391 callee.getFullyQualifiedName(false), mapOperands, numDimsPerMap,
2392 argOperands, templateParams);
2393
2394}
2395
2396IncludeOp IncludeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::verif::ContractOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2397 ::mlir::OperationState __state__(location, getOperationName());
2398 build(builder, __state__, std::forward<decltype(callee)>(callee), std::forward<decltype(mapOperands)>(mapOperands), std::forward<decltype(numDimsPerMap)>(numDimsPerMap), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2399 auto __res__ = ::llvm::dyn_cast<IncludeOp>(builder.create(__state__));
2400 assert(__res__ && "builder didn't return the right type");
2401 return __res__;
2402}
2403
2404IncludeOp IncludeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::verif::ContractOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2405 return create(builder, builder.getLoc(), std::forward<decltype(callee)>(callee), std::forward<decltype(mapOperands)>(mapOperands), std::forward<decltype(numDimsPerMap)>(numDimsPerMap), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2406}
2407
2408void IncludeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::verif::ContractOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2409 build(odsBuilder, odsState, callee, mapOperands,
2410 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap),
2411 argOperands, templateParams);
2412
2413}
2414
2415IncludeOp IncludeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::verif::ContractOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2416 ::mlir::OperationState __state__(location, getOperationName());
2417 build(builder, __state__, std::forward<decltype(callee)>(callee), std::forward<decltype(mapOperands)>(mapOperands), std::forward<decltype(numDimsPerMap)>(numDimsPerMap), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2418 auto __res__ = ::llvm::dyn_cast<IncludeOp>(builder.create(__state__));
2419 assert(__res__ && "builder didn't return the right type");
2420 return __res__;
2421}
2422
2423IncludeOp IncludeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::verif::ContractOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
2424 return create(builder, builder.getLoc(), std::forward<decltype(callee)>(callee), std::forward<decltype(mapOperands)>(mapOperands), std::forward<decltype(numDimsPerMap)>(numDimsPerMap), std::forward<decltype(argOperands)>(argOperands), std::forward<decltype(templateParams)>(templateParams));
2425}
2426
2427void IncludeOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
2428 ::mlir::Builder odsBuilder(opName.getContext());
2429 if (!properties.numDimsPerMap)
2430 properties.numDimsPerMap = odsBuilder.getDenseI32ArrayAttr({});
2431}
2432
2433::llvm::LogicalResult IncludeOp::verifyInvariantsImpl() {
2434 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
2435 auto tblgen_callee = getProperties().callee; (void)tblgen_callee;
2436 if (!tblgen_callee) return emitOpError("requires attribute 'callee'");
2437 auto tblgen_mapOpGroupSizes = getProperties().mapOpGroupSizes; (void)tblgen_mapOpGroupSizes;
2438 if (!tblgen_mapOpGroupSizes) return emitOpError("requires attribute 'mapOpGroupSizes'");
2439 auto tblgen_numDimsPerMap = getProperties().numDimsPerMap; (void)tblgen_numDimsPerMap;
2440 auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;
2441 auto tblgen_templateParams = getProperties().templateParams; (void)tblgen_templateParams;
2442
2443 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*this, tblgen_callee, "callee")))
2444 return ::mlir::failure();
2445
2446 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(*this, tblgen_templateParams, "templateParams")))
2447 return ::mlir::failure();
2448
2449 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*this, tblgen_numDimsPerMap, "numDimsPerMap")))
2450 return ::mlir::failure();
2451
2452 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*this, tblgen_mapOpGroupSizes, "mapOpGroupSizes")))
2453 return ::mlir::failure();
2454
2455 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*this, tblgen_arg_attrs, "arg_attrs")))
2456 return ::mlir::failure();
2457
2458 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*this, tblgen_res_attrs, "res_attrs")))
2459 return ::mlir::failure();
2460 {
2461 unsigned index = 0; (void)index;
2462 auto valueGroup0 = getODSOperands(0);
2463
2464 for (auto v : valueGroup0) {
2465 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*this, v.getType(), "operand", index++)))
2466 return ::mlir::failure();
2467 }
2468 auto valueGroup1 = getODSOperands(1);
2469 if (::mlir::failed(::mlir::OpTrait::impl::verifyValueSizeAttr(*this, "mapOpGroupSizes", "mapOperands", valueGroup1.size())))
2470 return ::mlir::failure();
2471
2472 for (auto v : valueGroup1) {
2473 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops5(*this, v.getType(), "operand", index++)))
2474 return ::mlir::failure();
2475 }
2476 }
2477 return ::mlir::success();
2478}
2479
2480::llvm::LogicalResult IncludeOp::verifyInvariants() {
2481 return verifyInvariantsImpl();
2482}
2483
2484::mlir::ParseResult IncludeOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2485 ::mlir::SymbolRefAttr calleeAttr;
2486 ::mlir::ArrayAttr templateParamsAttr;
2487 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argOperandsOperands;
2488 ::llvm::SMLoc argOperandsOperandsLoc;
2489 (void)argOperandsOperandsLoc;
2490 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> mapOperandsOperands;
2491 llvm::SmallVector<int32_t> mapOperandsOperandGroupSizes;
2492 ::llvm::SMLoc mapOperandsOperandsLoc;
2493 (void)mapOperandsOperandsLoc;
2494 ::mlir::DenseI32ArrayAttr numDimsPerMapAttr;
2495 ::llvm::ArrayRef<::mlir::Type> argOperandsTypes;
2496 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
2497
2498 if (parser.parseCustomAttributeWithFallback(calleeAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
2499 return ::mlir::failure();
2500 }
2501 if (calleeAttr) result.getOrAddProperties<IncludeOp::Properties>().callee = calleeAttr;
2502 if (::mlir::succeeded(parser.parseOptionalLess())) {
2503 {
2504 auto odsResult = parseTemplateParams(parser, templateParamsAttr);
2505 if (odsResult) return ::mlir::failure();
2506 if (templateParamsAttr)
2507 result.getOrAddProperties<IncludeOp::Properties>().templateParams = templateParamsAttr;
2508 }
2509 if (parser.parseGreater())
2510 return ::mlir::failure();
2511 }
2512 if (parser.parseLParen())
2513 return ::mlir::failure();
2514
2515 argOperandsOperandsLoc = parser.getCurrentLocation();
2516 if (parser.parseOperandList(argOperandsOperands))
2517 return ::mlir::failure();
2518 if (parser.parseRParen())
2519 return ::mlir::failure();
2520 if (::mlir::succeeded(parser.parseOptionalLBrace())) {
2521 {
2522 mapOperandsOperandsLoc = parser.getCurrentLocation();
2523 ::llvm::SmallVector<::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand>> mapOperandsOperandGroups;
2524 auto odsResult = parseMultiDimAndSymbolList(parser, mapOperandsOperandGroups, numDimsPerMapAttr);
2525 if (odsResult) return ::mlir::failure();
2526 for (const auto &subRange : mapOperandsOperandGroups) {
2527 mapOperandsOperands.append(subRange.begin(), subRange.end());
2528 mapOperandsOperandGroupSizes.push_back(subRange.size());
2529 }
2530 if (numDimsPerMapAttr)
2531 result.getOrAddProperties<IncludeOp::Properties>().numDimsPerMap = numDimsPerMapAttr;
2532 }
2533 if (parser.parseRBrace())
2534 return ::mlir::failure();
2535 }
2536 if (parser.parseColon())
2537 return ::mlir::failure();
2538
2539 ::mlir::FunctionType argOperands__allResult_functionType;
2540 if (parser.parseType(argOperands__allResult_functionType))
2541 return ::mlir::failure();
2542 argOperandsTypes = argOperands__allResult_functionType.getInputs();
2543 allResultTypes = argOperands__allResult_functionType.getResults();
2544 {
2545 auto odsResult = parseAttrDictWithWarnings(parser, result.attributes, result);
2546 if (odsResult) return ::mlir::failure();
2547 }
2548::llvm::copy(::llvm::ArrayRef<int32_t>({static_cast<int32_t>(argOperandsOperands.size()), static_cast<int32_t>(mapOperandsOperands.size())}), result.getOrAddProperties<IncludeOp::Properties>().operandSegmentSizes.begin());
2549 result.getOrAddProperties<IncludeOp::Properties>().mapOpGroupSizes = parser.getBuilder().getDenseI32ArrayAttr(mapOperandsOperandGroupSizes);
2550 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIndexType();
2551 result.addTypes(allResultTypes);
2552 if (parser.resolveOperands(argOperandsOperands, argOperandsTypes, argOperandsOperandsLoc, result.operands))
2553 return ::mlir::failure();
2554 if (parser.resolveOperands(mapOperandsOperands, odsBuildableType0, mapOperandsOperandsLoc, result.operands))
2555 return ::mlir::failure();
2556 return ::mlir::success();
2557}
2558
2559::llvm::LogicalResult IncludeOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2560 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2561 if (!dict) {
2562 emitError() << "expected DictionaryAttr to set properties";
2563 return ::mlir::failure();
2564 }
2565 // keep track of used keys in the input dictionary to be able to error out
2566 // if there are some unknown ones.
2567 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
2568 ::mlir::MLIRContext *ctx = dict.getContext();
2569 (void)ctx;
2570 {
2571
2572 auto &propStorage = prop.mapOpGroupSizes;
2573 auto mapOpGroupSizesAttrName = ::mlir::StringAttr::get(ctx, "mapOpGroupSizes");
2574 auto attr = dict.get(mapOpGroupSizesAttrName);
2575 usedKeys.insert(mapOpGroupSizesAttrName);
2576 if (attr || /*isRequired=*/true) {
2577 if (!attr) {
2578 emitError() << "expected key entry for mapOpGroupSizes in DictionaryAttr to set "
2579 "Properties.";
2580 return ::mlir::failure();
2581 }
2582 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
2583 if (convertedAttr) {
2584 propStorage = convertedAttr;
2585 } else {
2586 emitError() << "Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
2587 return ::mlir::failure();
2588 }
2589 }
2590 }
2591 {
2592
2593 auto &propStorage = prop.arg_attrs;
2594 auto arg_attrsAttrName = ::mlir::StringAttr::get(ctx, "arg_attrs");
2595 auto attr = dict.get(arg_attrsAttrName);
2596 usedKeys.insert(arg_attrsAttrName);
2597 if (attr || /*isRequired=*/false) {
2598 if (!attr) {
2599 emitError() << "expected key entry for arg_attrs in DictionaryAttr to set "
2600 "Properties.";
2601 return ::mlir::failure();
2602 }
2603 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
2604 if (convertedAttr) {
2605 propStorage = convertedAttr;
2606 } else {
2607 emitError() << "Invalid attribute `arg_attrs` in property conversion: " << attr;
2608 return ::mlir::failure();
2609 }
2610 }
2611 }
2612 {
2613
2614 auto &propStorage = prop.res_attrs;
2615 auto res_attrsAttrName = ::mlir::StringAttr::get(ctx, "res_attrs");
2616 auto attr = dict.get(res_attrsAttrName);
2617 usedKeys.insert(res_attrsAttrName);
2618 if (attr || /*isRequired=*/false) {
2619 if (!attr) {
2620 emitError() << "expected key entry for res_attrs in DictionaryAttr to set "
2621 "Properties.";
2622 return ::mlir::failure();
2623 }
2624 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
2625 if (convertedAttr) {
2626 propStorage = convertedAttr;
2627 } else {
2628 emitError() << "Invalid attribute `res_attrs` in property conversion: " << attr;
2629 return ::mlir::failure();
2630 }
2631 }
2632 }
2633
2634 for (::mlir::NamedAttribute attr : dict) {
2635 if (!usedKeys.contains(attr.getName()))
2636 return emitError() << "unknown key '" << attr.getName() <<
2637 "' when parsing properties dictionary";
2638 }
2639 return ::mlir::success();
2640}
2641
2642void IncludeOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2643 _odsPrinter << ' ';
2644 _odsPrinter.printAttributeWithoutType(getCalleeAttr());
2645 if (((getTemplateParamsAttr()))) {
2646 _odsPrinter << "<";
2647 printTemplateParams(_odsPrinter, *this, getTemplateParamsAttr());
2648 _odsPrinter << ">";
2649 }
2650 _odsPrinter << "(";
2651 _odsPrinter << getArgOperands();
2652 _odsPrinter << ")";
2653 if (((!getMapOperands().empty()) || (getNumDimsPerMapAttr() != ::mlir::OpBuilder((*this)->getContext()).getDenseI32ArrayAttr({})))) {
2654 _odsPrinter << ' ' << "{";
2656 _odsPrinter << "}";
2657 }
2658 _odsPrinter << ' ' << ":";
2659 _odsPrinter << ' ';
2660 _odsPrinter.printFunctionalType(getArgOperands().getTypes(), getOperation()->getResultTypes());
2661 _odsPrinter << ' ';
2662 printAttrDictWithWarnings(_odsPrinter, *this, getOperation()->getAttrDictionary(), getProperties());
2663}
2664
2665
2666} // namespace llzk::verif
2667MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::IncludeOp)
2669
2670namespace llzk::verif {
2671
2672
2673//===----------------------------------------------------------------------===//
2674// ::llzk::verif::IncreasesOp definitions
2675//===----------------------------------------------------------------------===//
2676
2677namespace detail {
2678
2679IncreasesOpGenericAdaptorBase::IncreasesOpGenericAdaptorBase(IncreasesOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
2680
2681
2682} // namespace detail
2684
2685::llvm::LogicalResult IncreasesOpAdaptor::verify(::mlir::Location loc) {
2686 return ::mlir::success();
2687}
2688
2689::llvm::LogicalResult IncreasesOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2690 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2691 if (!dict) {
2692 emitError() << "expected DictionaryAttr to set properties";
2693 return ::mlir::failure();
2694 }
2695 return ::mlir::success();
2696}
2697
2698::mlir::Attribute IncreasesOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2699 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2700 ::mlir::Builder odsBuilder{ctx};
2701
2702 if (!attrs.empty())
2703 return odsBuilder.getDictionaryAttr(attrs);
2704 return {};
2705}
2706
2708 using llvm::hash_value;
2709 return llvm::hash_combine();
2710}
2711
2712std::optional<mlir::Attribute> IncreasesOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2713 return std::nullopt;
2714}
2715
2716void IncreasesOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2717}
2718
2719void IncreasesOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
2720}
2721
2722::llvm::LogicalResult IncreasesOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2723 return ::mlir::success();
2724}
2725
2726void IncreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
2727 odsState.addOperands(value);
2728}
2729
2730IncreasesOp IncreasesOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value) {
2731 ::mlir::OperationState __state__(location, getOperationName());
2732 build(builder, __state__, std::forward<decltype(value)>(value));
2733 auto __res__ = ::llvm::dyn_cast<IncreasesOp>(builder.create(__state__));
2734 assert(__res__ && "builder didn't return the right type");
2735 return __res__;
2736}
2737
2738IncreasesOp IncreasesOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value) {
2739 return create(builder, builder.getLoc(), std::forward<decltype(value)>(value));
2740}
2741
2742void IncreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
2743 odsState.addOperands(value);
2744 assert(resultTypes.size() == 0u && "mismatched number of results");
2745 odsState.addTypes(resultTypes);
2746}
2747
2748IncreasesOp IncreasesOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
2749 ::mlir::OperationState __state__(location, getOperationName());
2750 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(value)>(value));
2751 auto __res__ = ::llvm::dyn_cast<IncreasesOp>(builder.create(__state__));
2752 assert(__res__ && "builder didn't return the right type");
2753 return __res__;
2754}
2755
2756IncreasesOp IncreasesOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
2757 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(value)>(value));
2758}
2759
2760void IncreasesOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2761 assert(operands.size() == 1u && "mismatched number of parameters");
2762 odsState.addOperands(operands);
2763 odsState.addAttributes(attributes);
2764 assert(resultTypes.size() == 0u && "mismatched number of return types");
2765 odsState.addTypes(resultTypes);
2766}
2767
2768IncreasesOp IncreasesOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2769 ::mlir::OperationState __state__(location, getOperationName());
2770 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
2771 auto __res__ = ::llvm::dyn_cast<IncreasesOp>(builder.create(__state__));
2772 assert(__res__ && "builder didn't return the right type");
2773 return __res__;
2774}
2775
2776IncreasesOp IncreasesOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2777 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
2778}
2779
2780void IncreasesOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2781 assert(operands.size() == 1u && "mismatched number of parameters");
2782 odsState.addOperands(operands);
2783 odsState.useProperties(const_cast<Properties&>(properties));
2784 odsState.addAttributes(discardableAttributes);
2785 assert(resultTypes.size() == 0u && "mismatched number of return types");
2786 odsState.addTypes(resultTypes);
2787}
2788
2789IncreasesOp IncreasesOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2790 ::mlir::OperationState __state__(location, getOperationName());
2791 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
2792 auto __res__ = ::llvm::dyn_cast<IncreasesOp>(builder.create(__state__));
2793 assert(__res__ && "builder didn't return the right type");
2794 return __res__;
2795}
2796
2797IncreasesOp IncreasesOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2798 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
2799}
2800
2801::llvm::LogicalResult IncreasesOp::verifyInvariantsImpl() {
2802 {
2803 unsigned index = 0; (void)index;
2804 auto valueGroup0 = getODSOperands(0);
2805
2806 for (auto v : valueGroup0) {
2807 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
2808 return ::mlir::failure();
2809 }
2810 }
2811 return ::mlir::success();
2812}
2813
2814::llvm::LogicalResult IncreasesOp::verifyInvariants() {
2815 return verifyInvariantsImpl();
2816}
2817
2818::mlir::ParseResult IncreasesOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2819 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
2820 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
2821 (void)valueOperandsLoc;
2822
2823 valueOperandsLoc = parser.getCurrentLocation();
2824 if (parser.parseOperand(valueRawOperand))
2825 return ::mlir::failure();
2826 {
2827 auto loc = parser.getCurrentLocation();(void)loc;
2828 if (parser.parseOptionalAttrDict(result.attributes))
2829 return ::mlir::failure();
2830 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
2831 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
2832 })))
2833 return ::mlir::failure();
2834 }
2835 ::mlir::Type odsBuildableType0 = ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
2836 if (parser.resolveOperands(valueOperands, odsBuildableType0, valueOperandsLoc, result.operands))
2837 return ::mlir::failure();
2838 return ::mlir::success();
2839}
2840
2841void IncreasesOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2842 _odsPrinter << ' ';
2843 _odsPrinter << getValue();
2844 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2845 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2846}
2847
2848// This side effect models "program termination". Based on
2849// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
2851 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2852) {
2853 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2854}
2855
2856} // namespace llzk::verif
2857MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::IncreasesOp)
2858
2859namespace llzk::verif {
2860
2861
2862//===----------------------------------------------------------------------===//
2863// ::llzk::verif::InvariantOp definitions
2864//===----------------------------------------------------------------------===//
2865
2866namespace detail {
2867
2869
2871 auto attr = getLoopNameAttr();
2872 return attr.getValue();
2873}
2874
2876 auto attr = getLoopArgTypesAttr();
2877 return attr;
2878}
2879
2880
2881} // namespace detail
2883
2884::llvm::LogicalResult InvariantOpAdaptor::verify(::mlir::Location loc) {
2885 auto tblgen_loop_arg_types = getProperties().loop_arg_types; (void)tblgen_loop_arg_types;
2886 if (!tblgen_loop_arg_types) return emitError(loc, "'verif.invariant' op requires attribute 'loop_arg_types'");
2887 auto tblgen_loop_name = getProperties().loop_name; (void)tblgen_loop_name;
2888 if (!tblgen_loop_name) return emitError(loc, "'verif.invariant' op requires attribute 'loop_name'");
2889
2890 if (tblgen_loop_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_loop_name))))
2891 return emitError(loc, "'verif.invariant' op attribute 'loop_name' failed to satisfy constraint: string attribute");
2892
2893 if (tblgen_loop_arg_types && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_loop_arg_types))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_loop_arg_types), [&](::mlir::Attribute attr) { return attr && (((::llvm::isa<::mlir::TypeAttr>(attr))) && ((::llvm::isa<::mlir::Type>(::llvm::cast<::mlir::TypeAttr>(attr).getValue()))) && ((true))); }))))
2894 return emitError(loc, "'verif.invariant' op attribute 'loop_arg_types' failed to satisfy constraint: type array attribute");
2895 return ::mlir::success();
2896}
2897
2898::llvm::LogicalResult InvariantOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2899 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2900 if (!dict) {
2901 emitError() << "expected DictionaryAttr to set properties";
2902 return ::mlir::failure();
2903 }
2904
2905 {
2906 auto &propStorage = prop.loop_arg_types;
2907 auto attr = dict.get("loop_arg_types");
2908 if (attr) {
2909 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
2910 if (convertedAttr) {
2911 propStorage = convertedAttr;
2912 } else {
2913 emitError() << "Invalid attribute `loop_arg_types` in property conversion: " << attr;
2914 return ::mlir::failure();
2915 }
2916 }
2917 }
2918
2919 {
2920 auto &propStorage = prop.loop_name;
2921 auto attr = dict.get("loop_name");
2922 if (attr) {
2923 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
2924 if (convertedAttr) {
2925 propStorage = convertedAttr;
2926 } else {
2927 emitError() << "Invalid attribute `loop_name` in property conversion: " << attr;
2928 return ::mlir::failure();
2929 }
2930 }
2931 }
2932 return ::mlir::success();
2933}
2934
2935::mlir::Attribute InvariantOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2936 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2937 ::mlir::Builder odsBuilder{ctx};
2938
2939 {
2940 const auto &propStorage = prop.loop_arg_types;
2941 if (propStorage)
2942 attrs.push_back(odsBuilder.getNamedAttr("loop_arg_types",
2943 propStorage));
2944 }
2945
2946 {
2947 const auto &propStorage = prop.loop_name;
2948 if (propStorage)
2949 attrs.push_back(odsBuilder.getNamedAttr("loop_name",
2950 propStorage));
2951 }
2952
2953 if (!attrs.empty())
2954 return odsBuilder.getDictionaryAttr(attrs);
2955 return {};
2956}
2957
2959 using llvm::hash_value;
2960 return llvm::hash_combine(
2961 llvm::hash_value(prop.loop_arg_types.getAsOpaquePointer()),
2962 llvm::hash_value(prop.loop_name.getAsOpaquePointer()));
2963}
2964
2965std::optional<mlir::Attribute> InvariantOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2966 if (name == "loop_arg_types")
2967 return prop.loop_arg_types;
2968
2969 if (name == "loop_name")
2970 return prop.loop_name;
2971 return std::nullopt;
2972}
2973
2974void InvariantOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2975 if (name == "loop_arg_types") {
2976 prop.loop_arg_types = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.loop_arg_types)>>(value);
2977 return;
2978 }
2979
2980 if (name == "loop_name") {
2981 prop.loop_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.loop_name)>>(value);
2982 return;
2983 }
2984}
2985
2986void InvariantOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
2987 if (prop.loop_arg_types) attrs.append("loop_arg_types", prop.loop_arg_types);
2988
2989 if (prop.loop_name) attrs.append("loop_name", prop.loop_name);
2990}
2991
2992::llvm::LogicalResult InvariantOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2993 {
2994 ::mlir::Attribute attr = attrs.get(getLoopArgTypesAttrName(opName));
2995 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops7(attr, "loop_arg_types", emitError)))
2996 return ::mlir::failure();
2997 }
2998
2999 {
3000 ::mlir::Attribute attr = attrs.get(getLoopNameAttrName(opName));
3001 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr, "loop_name", emitError)))
3002 return ::mlir::failure();
3003 }
3004 return ::mlir::success();
3005}
3006
3007::llvm::LogicalResult InvariantOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
3008 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
3009 if (::mlir::failed(reader.readAttribute(prop.loop_arg_types)))
3010 return ::mlir::failure();
3011
3012 if (::mlir::failed(reader.readAttribute(prop.loop_name)))
3013 return ::mlir::failure();
3014 return ::mlir::success();
3015}
3016
3017void InvariantOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
3018 auto &prop = getProperties(); (void)prop;
3019 writer.writeAttribute(prop.loop_arg_types);
3020 writer.writeAttribute(prop.loop_name);
3021}
3022
3023::llvm::StringRef InvariantOp::getLoopName() {
3024 auto attr = getLoopNameAttr();
3025 return attr.getValue();
3026}
3027
3028::mlir::ArrayAttr InvariantOp::getLoopArgTypes() {
3029 auto attr = getLoopArgTypesAttr();
3030 return attr;
3031}
3032
3033void InvariantOp::setLoopName(::llvm::StringRef attrValue) {
3034 getProperties().loop_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
3035}
3036
3037InvariantOp InvariantOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringRef loop_name, ::llvm::ArrayRef<::mlir::Type> loop_arg_types, ::llvm::ArrayRef<::mlir::Location> loop_arg_locs) {
3038 ::mlir::OperationState __state__(location, getOperationName());
3039 build(builder, __state__, std::forward<decltype(loop_name)>(loop_name), std::forward<decltype(loop_arg_types)>(loop_arg_types), std::forward<decltype(loop_arg_locs)>(loop_arg_locs));
3040 auto __res__ = ::llvm::dyn_cast<InvariantOp>(builder.create(__state__));
3041 assert(__res__ && "builder didn't return the right type");
3042 return __res__;
3043}
3044
3045InvariantOp InvariantOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::StringRef loop_name, ::llvm::ArrayRef<::mlir::Type> loop_arg_types, ::llvm::ArrayRef<::mlir::Location> loop_arg_locs) {
3046 return create(builder, builder.getLoc(), std::forward<decltype(loop_name)>(loop_name), std::forward<decltype(loop_arg_types)>(loop_arg_types), std::forward<decltype(loop_arg_locs)>(loop_arg_locs));
3047}
3048
3049::llvm::LogicalResult InvariantOp::verifyInvariantsImpl() {
3050 auto tblgen_loop_arg_types = getProperties().loop_arg_types; (void)tblgen_loop_arg_types;
3051 if (!tblgen_loop_arg_types) return emitOpError("requires attribute 'loop_arg_types'");
3052 auto tblgen_loop_name = getProperties().loop_name; (void)tblgen_loop_name;
3053 if (!tblgen_loop_name) return emitOpError("requires attribute 'loop_name'");
3054
3055 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*this, tblgen_loop_name, "loop_name")))
3056 return ::mlir::failure();
3057
3058 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops7(*this, tblgen_loop_arg_types, "loop_arg_types")))
3059 return ::mlir::failure();
3060 {
3061 unsigned index = 0; (void)index;
3062
3063 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
3064 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops2(*this, region, "region", index++)))
3065 return ::mlir::failure();
3066 }
3067 return ::mlir::success();
3068}
3069
3070::llvm::LogicalResult InvariantOp::verifyInvariants() {
3071 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
3072 return ::mlir::success();
3073 return ::mlir::failure();
3074}
3075
3076::llvm::LogicalResult InvariantOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3077 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
3078 if (!dict) {
3079 emitError() << "expected DictionaryAttr to set properties";
3080 return ::mlir::failure();
3081 }
3082 // keep track of used keys in the input dictionary to be able to error out
3083 // if there are some unknown ones.
3084 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
3085 ::mlir::MLIRContext *ctx = dict.getContext();
3086 (void)ctx;
3087 {
3088
3089 auto &propStorage = prop.loop_name;
3090 auto loop_nameAttrName = ::mlir::StringAttr::get(ctx, "loop_name");
3091 auto attr = dict.get(loop_nameAttrName);
3092 usedKeys.insert(loop_nameAttrName);
3093 if (attr || /*isRequired=*/true) {
3094 if (!attr) {
3095 emitError() << "expected key entry for loop_name in DictionaryAttr to set "
3096 "Properties.";
3097 return ::mlir::failure();
3098 }
3099 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
3100 if (convertedAttr) {
3101 propStorage = convertedAttr;
3102 } else {
3103 emitError() << "Invalid attribute `loop_name` in property conversion: " << attr;
3104 return ::mlir::failure();
3105 }
3106 }
3107 }
3108 {
3109
3110 auto &propStorage = prop.loop_arg_types;
3111 auto loop_arg_typesAttrName = ::mlir::StringAttr::get(ctx, "loop_arg_types");
3112 auto attr = dict.get(loop_arg_typesAttrName);
3113 usedKeys.insert(loop_arg_typesAttrName);
3114 if (attr || /*isRequired=*/true) {
3115 if (!attr) {
3116 emitError() << "expected key entry for loop_arg_types in DictionaryAttr to set "
3117 "Properties.";
3118 return ::mlir::failure();
3119 }
3120 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
3121 if (convertedAttr) {
3122 propStorage = convertedAttr;
3123 } else {
3124 emitError() << "Invalid attribute `loop_arg_types` in property conversion: " << attr;
3125 return ::mlir::failure();
3126 }
3127 }
3128 }
3129
3130 for (::mlir::NamedAttribute attr : dict) {
3131 if (!usedKeys.contains(attr.getName()))
3132 return emitError() << "unknown key '" << attr.getName() <<
3133 "' when parsing properties dictionary";
3134 }
3135 return ::mlir::success();
3136}
3137
3138
3139} // namespace llzk::verif
3140MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::InvariantOp)
3142
3143namespace llzk::verif {
3144
3145
3146//===----------------------------------------------------------------------===//
3147// ::llzk::verif::OldOp definitions
3148//===----------------------------------------------------------------------===//
3149
3150namespace detail {
3151
3152OldOpGenericAdaptorBase::OldOpGenericAdaptorBase(OldOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
3153
3154
3155} // namespace detail
3157
3158::llvm::LogicalResult OldOpAdaptor::verify(::mlir::Location loc) {
3159 return ::mlir::success();
3160}
3161
3162::llvm::LogicalResult OldOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3163 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
3164 if (!dict) {
3165 emitError() << "expected DictionaryAttr to set properties";
3166 return ::mlir::failure();
3167 }
3168 return ::mlir::success();
3169}
3170
3171::mlir::Attribute OldOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
3172 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3173 ::mlir::Builder odsBuilder{ctx};
3174
3175 if (!attrs.empty())
3176 return odsBuilder.getDictionaryAttr(attrs);
3177 return {};
3178}
3179
3180llvm::hash_code OldOp::computePropertiesHash(const Properties &prop) {
3181 using llvm::hash_value;
3182 return llvm::hash_combine();
3183}
3184
3185std::optional<mlir::Attribute> OldOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
3186 return std::nullopt;
3187}
3188
3189void OldOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
3190}
3191
3192void OldOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
3193}
3194
3195::llvm::LogicalResult OldOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3196 return ::mlir::success();
3197}
3198
3199void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value) {
3200 odsState.addOperands(value);
3201 odsState.addTypes(result);
3202}
3203
3204OldOp OldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value value) {
3205 ::mlir::OperationState __state__(location, getOperationName());
3206 build(builder, __state__, std::forward<decltype(result)>(result), std::forward<decltype(value)>(value));
3207 auto __res__ = ::llvm::dyn_cast<OldOp>(builder.create(__state__));
3208 assert(__res__ && "builder didn't return the right type");
3209 return __res__;
3210}
3211
3212OldOp OldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value value) {
3213 return create(builder, builder.getLoc(), std::forward<decltype(result)>(result), std::forward<decltype(value)>(value));
3214}
3215
3216void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
3217 odsState.addOperands(value);
3218
3219 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3220 if (::mlir::succeeded(OldOp::inferReturnTypes(odsBuilder.getContext(),
3221 odsState.location, odsState.operands,
3222 odsState.attributes.getDictionary(odsState.getContext()),
3223 odsState.getRawProperties(),
3224 odsState.regions, inferredReturnTypes)))
3225 odsState.addTypes(inferredReturnTypes);
3226 else
3227 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3228
3229}
3230
3231OldOp OldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value) {
3232 ::mlir::OperationState __state__(location, getOperationName());
3233 build(builder, __state__, std::forward<decltype(value)>(value));
3234 auto __res__ = ::llvm::dyn_cast<OldOp>(builder.create(__state__));
3235 assert(__res__ && "builder didn't return the right type");
3236 return __res__;
3237}
3238
3239OldOp OldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value) {
3240 return create(builder, builder.getLoc(), std::forward<decltype(value)>(value));
3241}
3242
3243void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
3244 odsState.addOperands(value);
3245 assert(resultTypes.size() == 1u && "mismatched number of results");
3246 odsState.addTypes(resultTypes);
3247}
3248
3249OldOp OldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
3250 ::mlir::OperationState __state__(location, getOperationName());
3251 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(value)>(value));
3252 auto __res__ = ::llvm::dyn_cast<OldOp>(builder.create(__state__));
3253 assert(__res__ && "builder didn't return the right type");
3254 return __res__;
3255}
3256
3257OldOp OldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
3258 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(value)>(value));
3259}
3260
3261void OldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3262 assert(operands.size() == 1u && "mismatched number of parameters");
3263 odsState.addOperands(operands);
3264 odsState.addAttributes(attributes);
3265 assert(resultTypes.size() == 1u && "mismatched number of return types");
3266 odsState.addTypes(resultTypes);
3267}
3268
3269OldOp OldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3270 ::mlir::OperationState __state__(location, getOperationName());
3271 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
3272 auto __res__ = ::llvm::dyn_cast<OldOp>(builder.create(__state__));
3273 assert(__res__ && "builder didn't return the right type");
3274 return __res__;
3275}
3276
3277OldOp OldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3278 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
3279}
3280
3281void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3282 assert(operands.size() == 1u && "mismatched number of parameters");
3283 odsState.addOperands(operands);
3284 odsState.addAttributes(attributes);
3285
3286 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3287 if (::mlir::succeeded(OldOp::inferReturnTypes(odsBuilder.getContext(),
3288 odsState.location, operands,
3289 odsState.attributes.getDictionary(odsState.getContext()),
3290 odsState.getRawProperties(),
3291 odsState.regions, inferredReturnTypes))) {
3292 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3293 odsState.addTypes(inferredReturnTypes);
3294 } else {
3295 ::llvm::report_fatal_error("Failed to infer result type(s).");
3296 }
3297}
3298
3299OldOp OldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3300 ::mlir::OperationState __state__(location, getOperationName());
3301 build(builder, __state__, std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
3302 auto __res__ = ::llvm::dyn_cast<OldOp>(builder.create(__state__));
3303 assert(__res__ && "builder didn't return the right type");
3304 return __res__;
3305}
3306
3307OldOp OldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3308 return create(builder, builder.getLoc(), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
3309}
3310
3311void OldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3312 assert(operands.size() == 1u && "mismatched number of parameters");
3313 odsState.addOperands(operands);
3314 odsState.useProperties(const_cast<Properties&>(properties));
3315 odsState.addAttributes(discardableAttributes);
3316 assert(resultTypes.size() == 1u && "mismatched number of return types");
3317 odsState.addTypes(resultTypes);
3318}
3319
3320OldOp OldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3321 ::mlir::OperationState __state__(location, getOperationName());
3322 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
3323 auto __res__ = ::llvm::dyn_cast<OldOp>(builder.create(__state__));
3324 assert(__res__ && "builder didn't return the right type");
3325 return __res__;
3326}
3327
3328OldOp OldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3329 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
3330}
3331
3332void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3333 assert(operands.size() == 1u && "mismatched number of parameters");
3334 odsState.addOperands(operands);
3335 odsState.useProperties(const_cast<Properties &>(properties));
3336 odsState.addAttributes(discardableAttributes);
3337
3338 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3339 if (::mlir::succeeded(OldOp::inferReturnTypes(odsBuilder.getContext(),
3340 odsState.location, operands,
3341 odsState.attributes.getDictionary(odsState.getContext()),
3342 odsState.getRawProperties(),
3343 odsState.regions, inferredReturnTypes))) {
3344 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3345 odsState.addTypes(inferredReturnTypes);
3346 } else {
3347 ::llvm::report_fatal_error("Failed to infer result type(s).");
3348 }
3349}
3350
3351OldOp OldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3352 ::mlir::OperationState __state__(location, getOperationName());
3353 build(builder, __state__, std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
3354 auto __res__ = ::llvm::dyn_cast<OldOp>(builder.create(__state__));
3355 assert(__res__ && "builder didn't return the right type");
3356 return __res__;
3357}
3358
3359OldOp OldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3360 return create(builder, builder.getLoc(), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
3361}
3362
3363::llvm::LogicalResult OldOp::verifyInvariantsImpl() {
3364 {
3365 unsigned index = 0; (void)index;
3366 auto valueGroup0 = getODSOperands(0);
3367
3368 for (auto v : valueGroup0) {
3369 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops6(*this, v.getType(), "operand", index++)))
3370 return ::mlir::failure();
3371 }
3372 }
3373 {
3374 unsigned index = 0; (void)index;
3375 auto valueGroup0 = getODSResults(0);
3376
3377 for (auto v : valueGroup0) {
3378 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops6(*this, v.getType(), "result", index++)))
3379 return ::mlir::failure();
3380 }
3381 }
3382 if (!((((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()) && ((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()))))
3383 return emitOpError("failed to verify that all of {value, result} have same type");
3384 return ::mlir::success();
3385}
3386
3387::llvm::LogicalResult OldOp::verifyInvariants() {
3388 return verifyInvariantsImpl();
3389}
3390
3391::llvm::LogicalResult OldOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
3392 inferredReturnTypes.resize(1);
3393 ::mlir::Builder odsBuilder(context);
3394 if (operands.size() <= 0)
3395 return ::mlir::failure();
3396 ::mlir::Type odsInferredType0 = operands[0].getType();
3397 inferredReturnTypes[0] = odsInferredType0;
3398 return ::mlir::success();
3399}
3400
3401::mlir::ParseResult OldOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3402 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
3403 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
3404 (void)valueOperandsLoc;
3405 ::mlir::Type resultRawType{};
3406 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
3407
3408 valueOperandsLoc = parser.getCurrentLocation();
3409 if (parser.parseOperand(valueRawOperand))
3410 return ::mlir::failure();
3411 if (parser.parseColon())
3412 return ::mlir::failure();
3413
3414 {
3415 ::mlir::Type type;
3416 if (parser.parseCustomTypeWithFallback(type))
3417 return ::mlir::failure();
3418 resultRawType = type;
3419 }
3420 {
3421 auto loc = parser.getCurrentLocation();(void)loc;
3422 if (parser.parseOptionalAttrDict(result.attributes))
3423 return ::mlir::failure();
3424 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
3425 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
3426 })))
3427 return ::mlir::failure();
3428 }
3429 result.addTypes(resultTypes);
3430 if (parser.resolveOperands(valueOperands, resultTypes[0], valueOperandsLoc, result.operands))
3431 return ::mlir::failure();
3432 return ::mlir::success();
3433}
3434
3435void OldOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3436 _odsPrinter << ' ';
3437 _odsPrinter << getValue();
3438 _odsPrinter << ' ' << ":";
3439 _odsPrinter << ' ';
3440 {
3441 auto type = getResult().getType();
3442 if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
3443 _odsPrinter.printStrippedAttrOrType(validType);
3444 else
3445 _odsPrinter << type;
3446 }
3447 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3448 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3449}
3450
3451void OldOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3452}
3453
3454
3455} // namespace llzk::verif
3456MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::OldOp)
3457
3458namespace llzk::verif {
3459
3460
3461//===----------------------------------------------------------------------===//
3462// ::llzk::verif::ProveDetOp definitions
3463//===----------------------------------------------------------------------===//
3464
3465namespace detail {
3466
3467ProveDetOpGenericAdaptorBase::ProveDetOpGenericAdaptorBase(ProveDetOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
3468
3469
3470} // namespace detail
3472
3473::llvm::LogicalResult ProveDetOpAdaptor::verify(::mlir::Location loc) {
3474 return ::mlir::success();
3475}
3476
3477::llvm::LogicalResult ProveDetOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3478 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
3479 if (!dict) {
3480 emitError() << "expected DictionaryAttr to set properties";
3481 return ::mlir::failure();
3482 }
3483 return ::mlir::success();
3484}
3485
3486::mlir::Attribute ProveDetOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
3487 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3488 ::mlir::Builder odsBuilder{ctx};
3489
3490 if (!attrs.empty())
3491 return odsBuilder.getDictionaryAttr(attrs);
3492 return {};
3493}
3494
3495llvm::hash_code ProveDetOp::computePropertiesHash(const Properties &prop) {
3496 using llvm::hash_value;
3497 return llvm::hash_combine();
3498}
3499
3500std::optional<mlir::Attribute> ProveDetOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
3501 return std::nullopt;
3502}
3503
3504void ProveDetOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
3505}
3506
3507void ProveDetOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
3508}
3509
3510::llvm::LogicalResult ProveDetOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3511 return ::mlir::success();
3512}
3513
3514void ProveDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value condition) {
3515 odsState.addOperands(condition);
3516 odsState.addTypes(result);
3517}
3518
3519ProveDetOp ProveDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value condition) {
3520 ::mlir::OperationState __state__(location, getOperationName());
3521 build(builder, __state__, std::forward<decltype(result)>(result), std::forward<decltype(condition)>(condition));
3522 auto __res__ = ::llvm::dyn_cast<ProveDetOp>(builder.create(__state__));
3523 assert(__res__ && "builder didn't return the right type");
3524 return __res__;
3525}
3526
3527ProveDetOp ProveDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value condition) {
3528 return create(builder, builder.getLoc(), std::forward<decltype(result)>(result), std::forward<decltype(condition)>(condition));
3529}
3530
3531void ProveDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
3532 odsState.addOperands(condition);
3533
3534 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3535 if (::mlir::succeeded(ProveDetOp::inferReturnTypes(odsBuilder.getContext(),
3536 odsState.location, odsState.operands,
3537 odsState.attributes.getDictionary(odsState.getContext()),
3538 odsState.getRawProperties(),
3539 odsState.regions, inferredReturnTypes)))
3540 odsState.addTypes(inferredReturnTypes);
3541 else
3542 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3543
3544}
3545
3546ProveDetOp ProveDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition) {
3547 ::mlir::OperationState __state__(location, getOperationName());
3548 build(builder, __state__, std::forward<decltype(condition)>(condition));
3549 auto __res__ = ::llvm::dyn_cast<ProveDetOp>(builder.create(__state__));
3550 assert(__res__ && "builder didn't return the right type");
3551 return __res__;
3552}
3553
3554ProveDetOp ProveDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value condition) {
3555 return create(builder, builder.getLoc(), std::forward<decltype(condition)>(condition));
3556}
3557
3558void ProveDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
3559 odsState.addOperands(condition);
3560 assert(resultTypes.size() == 1u && "mismatched number of results");
3561 odsState.addTypes(resultTypes);
3562}
3563
3564ProveDetOp ProveDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
3565 ::mlir::OperationState __state__(location, getOperationName());
3566 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
3567 auto __res__ = ::llvm::dyn_cast<ProveDetOp>(builder.create(__state__));
3568 assert(__res__ && "builder didn't return the right type");
3569 return __res__;
3570}
3571
3572ProveDetOp ProveDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
3573 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
3574}
3575
3576void ProveDetOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3577 assert(operands.size() == 1u && "mismatched number of parameters");
3578 odsState.addOperands(operands);
3579 odsState.addAttributes(attributes);
3580 assert(resultTypes.size() == 1u && "mismatched number of return types");
3581 odsState.addTypes(resultTypes);
3582}
3583
3584ProveDetOp ProveDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3585 ::mlir::OperationState __state__(location, getOperationName());
3586 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
3587 auto __res__ = ::llvm::dyn_cast<ProveDetOp>(builder.create(__state__));
3588 assert(__res__ && "builder didn't return the right type");
3589 return __res__;
3590}
3591
3592ProveDetOp ProveDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3593 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
3594}
3595
3596void ProveDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3597 assert(operands.size() == 1u && "mismatched number of parameters");
3598 odsState.addOperands(operands);
3599 odsState.addAttributes(attributes);
3600
3601 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3602 if (::mlir::succeeded(ProveDetOp::inferReturnTypes(odsBuilder.getContext(),
3603 odsState.location, operands,
3604 odsState.attributes.getDictionary(odsState.getContext()),
3605 odsState.getRawProperties(),
3606 odsState.regions, inferredReturnTypes))) {
3607 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3608 odsState.addTypes(inferredReturnTypes);
3609 } else {
3610 ::llvm::report_fatal_error("Failed to infer result type(s).");
3611 }
3612}
3613
3614ProveDetOp ProveDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3615 ::mlir::OperationState __state__(location, getOperationName());
3616 build(builder, __state__, std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
3617 auto __res__ = ::llvm::dyn_cast<ProveDetOp>(builder.create(__state__));
3618 assert(__res__ && "builder didn't return the right type");
3619 return __res__;
3620}
3621
3622ProveDetOp ProveDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3623 return create(builder, builder.getLoc(), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
3624}
3625
3626void ProveDetOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3627 assert(operands.size() == 1u && "mismatched number of parameters");
3628 odsState.addOperands(operands);
3629 odsState.useProperties(const_cast<Properties&>(properties));
3630 odsState.addAttributes(discardableAttributes);
3631 assert(resultTypes.size() == 1u && "mismatched number of return types");
3632 odsState.addTypes(resultTypes);
3633}
3634
3635ProveDetOp ProveDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3636 ::mlir::OperationState __state__(location, getOperationName());
3637 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
3638 auto __res__ = ::llvm::dyn_cast<ProveDetOp>(builder.create(__state__));
3639 assert(__res__ && "builder didn't return the right type");
3640 return __res__;
3641}
3642
3643ProveDetOp ProveDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3644 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
3645}
3646
3647void ProveDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3648 assert(operands.size() == 1u && "mismatched number of parameters");
3649 odsState.addOperands(operands);
3650 odsState.useProperties(const_cast<Properties &>(properties));
3651 odsState.addAttributes(discardableAttributes);
3652
3653 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3654 if (::mlir::succeeded(ProveDetOp::inferReturnTypes(odsBuilder.getContext(),
3655 odsState.location, operands,
3656 odsState.attributes.getDictionary(odsState.getContext()),
3657 odsState.getRawProperties(),
3658 odsState.regions, inferredReturnTypes))) {
3659 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3660 odsState.addTypes(inferredReturnTypes);
3661 } else {
3662 ::llvm::report_fatal_error("Failed to infer result type(s).");
3663 }
3664}
3665
3666ProveDetOp ProveDetOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3667 ::mlir::OperationState __state__(location, getOperationName());
3668 build(builder, __state__, std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
3669 auto __res__ = ::llvm::dyn_cast<ProveDetOp>(builder.create(__state__));
3670 assert(__res__ && "builder didn't return the right type");
3671 return __res__;
3672}
3673
3674ProveDetOp ProveDetOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3675 return create(builder, builder.getLoc(), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
3676}
3677
3678::llvm::LogicalResult ProveDetOp::verifyInvariantsImpl() {
3679 {
3680 unsigned index = 0; (void)index;
3681 auto valueGroup0 = getODSOperands(0);
3682
3683 for (auto v : valueGroup0) {
3684 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
3685 return ::mlir::failure();
3686 }
3687 }
3688 {
3689 unsigned index = 0; (void)index;
3690 auto valueGroup0 = getODSResults(0);
3691
3692 for (auto v : valueGroup0) {
3693 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "result", index++)))
3694 return ::mlir::failure();
3695 }
3696 }
3697 return ::mlir::success();
3698}
3699
3700::llvm::LogicalResult ProveDetOp::verifyInvariants() {
3701 return verifyInvariantsImpl();
3702}
3703
3704::llvm::LogicalResult ProveDetOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
3705 inferredReturnTypes.resize(1);
3706 ::mlir::Builder odsBuilder(context);
3707 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
3708 inferredReturnTypes[0] = odsInferredType0;
3709 return ::mlir::success();
3710}
3711
3712::mlir::ParseResult ProveDetOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3713 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
3714 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
3715 (void)conditionOperandsLoc;
3716 ::mlir::Type conditionRawType{};
3717 ::llvm::ArrayRef<::mlir::Type> conditionTypes(&conditionRawType, 1);
3718
3719 conditionOperandsLoc = parser.getCurrentLocation();
3720 if (parser.parseOperand(conditionRawOperand))
3721 return ::mlir::failure();
3722 {
3723 auto loc = parser.getCurrentLocation();(void)loc;
3724 if (parser.parseOptionalAttrDict(result.attributes))
3725 return ::mlir::failure();
3726 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
3727 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
3728 })))
3729 return ::mlir::failure();
3730 }
3731 if (parser.parseColon())
3732 return ::mlir::failure();
3733
3734 {
3735 ::mlir::Type type;
3736 if (parser.parseCustomTypeWithFallback(type))
3737 return ::mlir::failure();
3738 conditionRawType = type;
3739 }
3740 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
3741 result.addTypes(odsBuildableType0);
3742 if (parser.resolveOperands(conditionOperands, conditionTypes, conditionOperandsLoc, result.operands))
3743 return ::mlir::failure();
3744 return ::mlir::success();
3745}
3746
3747void ProveDetOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3748 _odsPrinter << ' ';
3749 _odsPrinter << getCondition();
3750 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3751 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3752 _odsPrinter << ' ' << ":";
3753 _odsPrinter << ' ';
3754 {
3755 auto type = getCondition().getType();
3756 if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
3757 _odsPrinter.printStrippedAttrOrType(validType);
3758 else
3759 _odsPrinter << type;
3760 }
3761}
3762
3763
3764} // namespace llzk::verif
3765MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::ProveDetOp)
3766
3767namespace llzk::verif {
3768
3769
3770//===----------------------------------------------------------------------===//
3771// ::llzk::verif::RequireComputeOp definitions
3772//===----------------------------------------------------------------------===//
3773
3774namespace detail {
3775
3777
3778
3779} // namespace detail
3781
3782::llvm::LogicalResult RequireComputeOpAdaptor::verify(::mlir::Location loc) {
3783 return ::mlir::success();
3784}
3785
3786::llvm::LogicalResult RequireComputeOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3787 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
3788 if (!dict) {
3789 emitError() << "expected DictionaryAttr to set properties";
3790 return ::mlir::failure();
3791 }
3792 return ::mlir::success();
3793}
3794
3795::mlir::Attribute RequireComputeOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
3796 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3797 ::mlir::Builder odsBuilder{ctx};
3798
3799 if (!attrs.empty())
3800 return odsBuilder.getDictionaryAttr(attrs);
3801 return {};
3802}
3803
3805 using llvm::hash_value;
3806 return llvm::hash_combine();
3807}
3808
3809std::optional<mlir::Attribute> RequireComputeOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
3810 return std::nullopt;
3811}
3812
3813void RequireComputeOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
3814}
3815
3816void RequireComputeOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
3817}
3818
3819::llvm::LogicalResult RequireComputeOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3820 return ::mlir::success();
3821}
3822
3823void RequireComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
3824 odsState.addOperands(condition);
3825}
3826
3827RequireComputeOp RequireComputeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition) {
3828 ::mlir::OperationState __state__(location, getOperationName());
3829 build(builder, __state__, std::forward<decltype(condition)>(condition));
3830 auto __res__ = ::llvm::dyn_cast<RequireComputeOp>(builder.create(__state__));
3831 assert(__res__ && "builder didn't return the right type");
3832 return __res__;
3833}
3834
3835RequireComputeOp RequireComputeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value condition) {
3836 return create(builder, builder.getLoc(), std::forward<decltype(condition)>(condition));
3837}
3838
3839void RequireComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
3840 odsState.addOperands(condition);
3841 assert(resultTypes.size() == 0u && "mismatched number of results");
3842 odsState.addTypes(resultTypes);
3843}
3844
3845RequireComputeOp RequireComputeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
3846 ::mlir::OperationState __state__(location, getOperationName());
3847 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
3848 auto __res__ = ::llvm::dyn_cast<RequireComputeOp>(builder.create(__state__));
3849 assert(__res__ && "builder didn't return the right type");
3850 return __res__;
3851}
3852
3853RequireComputeOp RequireComputeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
3854 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
3855}
3856
3857void RequireComputeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3858 assert(operands.size() == 1u && "mismatched number of parameters");
3859 odsState.addOperands(operands);
3860 odsState.addAttributes(attributes);
3861 assert(resultTypes.size() == 0u && "mismatched number of return types");
3862 odsState.addTypes(resultTypes);
3863}
3864
3865RequireComputeOp RequireComputeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3866 ::mlir::OperationState __state__(location, getOperationName());
3867 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
3868 auto __res__ = ::llvm::dyn_cast<RequireComputeOp>(builder.create(__state__));
3869 assert(__res__ && "builder didn't return the right type");
3870 return __res__;
3871}
3872
3873RequireComputeOp RequireComputeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3874 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
3875}
3876
3877void RequireComputeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3878 assert(operands.size() == 1u && "mismatched number of parameters");
3879 odsState.addOperands(operands);
3880 odsState.useProperties(const_cast<Properties&>(properties));
3881 odsState.addAttributes(discardableAttributes);
3882 assert(resultTypes.size() == 0u && "mismatched number of return types");
3883 odsState.addTypes(resultTypes);
3884}
3885
3886RequireComputeOp RequireComputeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3887 ::mlir::OperationState __state__(location, getOperationName());
3888 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
3889 auto __res__ = ::llvm::dyn_cast<RequireComputeOp>(builder.create(__state__));
3890 assert(__res__ && "builder didn't return the right type");
3891 return __res__;
3892}
3893
3894RequireComputeOp RequireComputeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3895 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
3896}
3897
3899 {
3900 unsigned index = 0; (void)index;
3901 auto valueGroup0 = getODSOperands(0);
3902
3903 for (auto v : valueGroup0) {
3904 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
3905 return ::mlir::failure();
3906 }
3907 }
3908 return ::mlir::success();
3909}
3910
3911::llvm::LogicalResult RequireComputeOp::verifyInvariants() {
3912 return verifyInvariantsImpl();
3913}
3914
3915::mlir::ParseResult RequireComputeOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3916 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
3917 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
3918 (void)conditionOperandsLoc;
3919
3920 conditionOperandsLoc = parser.getCurrentLocation();
3921 if (parser.parseOperand(conditionRawOperand))
3922 return ::mlir::failure();
3923 {
3924 auto loc = parser.getCurrentLocation();(void)loc;
3925 if (parser.parseOptionalAttrDict(result.attributes))
3926 return ::mlir::failure();
3927 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
3928 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
3929 })))
3930 return ::mlir::failure();
3931 }
3932 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
3933 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
3934 return ::mlir::failure();
3935 return ::mlir::success();
3936}
3937
3938void RequireComputeOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3939 _odsPrinter << ' ';
3940 _odsPrinter << getCondition();
3941 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3942 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3943}
3944
3945// This side effect models "program termination". Based on
3946// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
3948 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
3949) {
3950 effects.emplace_back(::mlir::MemoryEffects::Write::get());
3951}
3952
3953} // namespace llzk::verif
3954MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::RequireComputeOp)
3955
3956namespace llzk::verif {
3957
3958
3959//===----------------------------------------------------------------------===//
3960// ::llzk::verif::RequireConstrainOp definitions
3961//===----------------------------------------------------------------------===//
3962
3963namespace detail {
3964
3966
3967
3968} // namespace detail
3970
3971::llvm::LogicalResult RequireConstrainOpAdaptor::verify(::mlir::Location loc) {
3972 return ::mlir::success();
3973}
3974
3975::llvm::LogicalResult RequireConstrainOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3976 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
3977 if (!dict) {
3978 emitError() << "expected DictionaryAttr to set properties";
3979 return ::mlir::failure();
3980 }
3981 return ::mlir::success();
3982}
3983
3984::mlir::Attribute RequireConstrainOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
3985 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3986 ::mlir::Builder odsBuilder{ctx};
3987
3988 if (!attrs.empty())
3989 return odsBuilder.getDictionaryAttr(attrs);
3990 return {};
3991}
3992
3994 using llvm::hash_value;
3995 return llvm::hash_combine();
3996}
3997
3998std::optional<mlir::Attribute> RequireConstrainOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
3999 return std::nullopt;
4000}
4001
4002void RequireConstrainOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4003}
4004
4005void RequireConstrainOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
4006}
4007
4008::llvm::LogicalResult RequireConstrainOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4009 return ::mlir::success();
4010}
4011
4012void RequireConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
4013 odsState.addOperands(condition);
4014}
4015
4016RequireConstrainOp RequireConstrainOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition) {
4017 ::mlir::OperationState __state__(location, getOperationName());
4018 build(builder, __state__, std::forward<decltype(condition)>(condition));
4019 auto __res__ = ::llvm::dyn_cast<RequireConstrainOp>(builder.create(__state__));
4020 assert(__res__ && "builder didn't return the right type");
4021 return __res__;
4022}
4023
4024RequireConstrainOp RequireConstrainOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value condition) {
4025 return create(builder, builder.getLoc(), std::forward<decltype(condition)>(condition));
4026}
4027
4028void RequireConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4029 odsState.addOperands(condition);
4030 assert(resultTypes.size() == 0u && "mismatched number of results");
4031 odsState.addTypes(resultTypes);
4032}
4033
4034RequireConstrainOp RequireConstrainOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4035 ::mlir::OperationState __state__(location, getOperationName());
4036 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
4037 auto __res__ = ::llvm::dyn_cast<RequireConstrainOp>(builder.create(__state__));
4038 assert(__res__ && "builder didn't return the right type");
4039 return __res__;
4040}
4041
4042RequireConstrainOp RequireConstrainOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4043 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
4044}
4045
4046void RequireConstrainOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4047 assert(operands.size() == 1u && "mismatched number of parameters");
4048 odsState.addOperands(operands);
4049 odsState.addAttributes(attributes);
4050 assert(resultTypes.size() == 0u && "mismatched number of return types");
4051 odsState.addTypes(resultTypes);
4052}
4053
4054RequireConstrainOp RequireConstrainOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4055 ::mlir::OperationState __state__(location, getOperationName());
4056 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4057 auto __res__ = ::llvm::dyn_cast<RequireConstrainOp>(builder.create(__state__));
4058 assert(__res__ && "builder didn't return the right type");
4059 return __res__;
4060}
4061
4062RequireConstrainOp RequireConstrainOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4063 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4064}
4065
4066void RequireConstrainOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4067 assert(operands.size() == 1u && "mismatched number of parameters");
4068 odsState.addOperands(operands);
4069 odsState.useProperties(const_cast<Properties&>(properties));
4070 odsState.addAttributes(discardableAttributes);
4071 assert(resultTypes.size() == 0u && "mismatched number of return types");
4072 odsState.addTypes(resultTypes);
4073}
4074
4075RequireConstrainOp RequireConstrainOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4076 ::mlir::OperationState __state__(location, getOperationName());
4077 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
4078 auto __res__ = ::llvm::dyn_cast<RequireConstrainOp>(builder.create(__state__));
4079 assert(__res__ && "builder didn't return the right type");
4080 return __res__;
4081}
4082
4083RequireConstrainOp RequireConstrainOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4084 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
4085}
4086
4088 {
4089 unsigned index = 0; (void)index;
4090 auto valueGroup0 = getODSOperands(0);
4091
4092 for (auto v : valueGroup0) {
4093 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
4094 return ::mlir::failure();
4095 }
4096 }
4097 return ::mlir::success();
4098}
4099
4101 return verifyInvariantsImpl();
4102}
4103
4104::mlir::ParseResult RequireConstrainOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4105 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
4106 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
4107 (void)conditionOperandsLoc;
4108
4109 conditionOperandsLoc = parser.getCurrentLocation();
4110 if (parser.parseOperand(conditionRawOperand))
4111 return ::mlir::failure();
4112 {
4113 auto loc = parser.getCurrentLocation();(void)loc;
4114 if (parser.parseOptionalAttrDict(result.attributes))
4115 return ::mlir::failure();
4116 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
4117 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
4118 })))
4119 return ::mlir::failure();
4120 }
4121 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
4122 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
4123 return ::mlir::failure();
4124 return ::mlir::success();
4125}
4126
4127void RequireConstrainOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4128 _odsPrinter << ' ';
4129 _odsPrinter << getCondition();
4130 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4131 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4132}
4133
4134// This side effect models "program termination". Based on
4135// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
4137 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
4138) {
4139 effects.emplace_back(::mlir::MemoryEffects::Write::get());
4140}
4141
4142} // namespace llzk::verif
4143MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::RequireConstrainOp)
4144
4145namespace llzk::verif {
4146
4147
4148//===----------------------------------------------------------------------===//
4149// ::llzk::verif::StepOp definitions
4150//===----------------------------------------------------------------------===//
4151
4152namespace detail {
4153
4155
4156
4157} // namespace detail
4159
4160::llvm::LogicalResult StepOpAdaptor::verify(::mlir::Location loc) {
4161 return ::mlir::success();
4162}
4163
4164::llvm::LogicalResult StepOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4165 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
4166 if (!dict) {
4167 emitError() << "expected DictionaryAttr to set properties";
4168 return ::mlir::failure();
4169 }
4170 return ::mlir::success();
4171}
4172
4173::mlir::Attribute StepOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4174 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4175 ::mlir::Builder odsBuilder{ctx};
4176
4177 if (!attrs.empty())
4178 return odsBuilder.getDictionaryAttr(attrs);
4179 return {};
4180}
4181
4182llvm::hash_code StepOp::computePropertiesHash(const Properties &prop) {
4183 using llvm::hash_value;
4184 return llvm::hash_combine();
4185}
4186
4187std::optional<mlir::Attribute> StepOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4188 return std::nullopt;
4189}
4190
4191void StepOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4192}
4193
4194void StepOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
4195}
4196
4197::llvm::LogicalResult StepOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4198 return ::mlir::success();
4199}
4200
4201void StepOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
4202 (void)odsState.addRegion();
4203}
4204
4205StepOp StepOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
4206 ::mlir::OperationState __state__(location, getOperationName());
4207 build(builder, __state__);
4208 auto __res__ = ::llvm::dyn_cast<StepOp>(builder.create(__state__));
4209 assert(__res__ && "builder didn't return the right type");
4210 return __res__;
4211}
4212
4213StepOp StepOp::create(::mlir::ImplicitLocOpBuilder &builder) {
4214 return create(builder, builder.getLoc());
4215}
4216
4217void StepOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
4218 (void)odsState.addRegion();
4219 assert(resultTypes.size() == 0u && "mismatched number of results");
4220 odsState.addTypes(resultTypes);
4221}
4222
4223StepOp StepOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
4224 ::mlir::OperationState __state__(location, getOperationName());
4225 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
4226 auto __res__ = ::llvm::dyn_cast<StepOp>(builder.create(__state__));
4227 assert(__res__ && "builder didn't return the right type");
4228 return __res__;
4229}
4230
4231StepOp StepOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
4232 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
4233}
4234
4235void StepOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4236 assert(operands.size() == 0u && "mismatched number of parameters");
4237 odsState.addOperands(operands);
4238 odsState.addAttributes(attributes);
4239 for (unsigned i = 0; i != 1; ++i)
4240 (void)odsState.addRegion();
4241 assert(resultTypes.size() == 0u && "mismatched number of return types");
4242 odsState.addTypes(resultTypes);
4243}
4244
4245StepOp StepOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4246 ::mlir::OperationState __state__(location, getOperationName());
4247 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4248 auto __res__ = ::llvm::dyn_cast<StepOp>(builder.create(__state__));
4249 assert(__res__ && "builder didn't return the right type");
4250 return __res__;
4251}
4252
4253StepOp StepOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4254 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4255}
4256
4257void StepOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4258 assert(operands.size() == 0u && "mismatched number of parameters");
4259 odsState.addOperands(operands);
4260 odsState.useProperties(const_cast<Properties&>(properties));
4261 odsState.addAttributes(discardableAttributes);
4262 for (unsigned i = 0; i != 1; ++i)
4263 (void)odsState.addRegion();
4264 assert(resultTypes.size() == 0u && "mismatched number of return types");
4265 odsState.addTypes(resultTypes);
4266}
4267
4268StepOp StepOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4269 ::mlir::OperationState __state__(location, getOperationName());
4270 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
4271 auto __res__ = ::llvm::dyn_cast<StepOp>(builder.create(__state__));
4272 assert(__res__ && "builder didn't return the right type");
4273 return __res__;
4274}
4275
4276StepOp StepOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4277 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
4278}
4279
4280::llvm::LogicalResult StepOp::verifyInvariantsImpl() {
4281 {
4282 unsigned index = 0; (void)index;
4283
4284 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
4285 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops2(*this, region, "region", index++)))
4286 return ::mlir::failure();
4287 }
4288 return ::mlir::success();
4289}
4290
4291::llvm::LogicalResult StepOp::verifyInvariants() {
4292 return verifyInvariantsImpl();
4293}
4294
4295::mlir::ParseResult StepOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4296 std::unique_ptr<::mlir::Region> regionRegion = std::make_unique<::mlir::Region>();
4297
4298 if (parser.parseRegion(*regionRegion))
4299 return ::mlir::failure();
4300
4301 if (regionRegion->empty()) regionRegion->emplaceBlock();
4302 {
4303 auto loc = parser.getCurrentLocation();(void)loc;
4304 if (parser.parseOptionalAttrDict(result.attributes))
4305 return ::mlir::failure();
4306 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
4307 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
4308 })))
4309 return ::mlir::failure();
4310 }
4311 result.addRegion(std::move(regionRegion));
4312 return ::mlir::success();
4313}
4314
4315void StepOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4316 _odsPrinter << ' ';
4317 _odsPrinter.printRegion(getRegion());
4318 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4319 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4320}
4321
4322// This side effect models "program termination". Based on
4323// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
4325 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
4326) {
4327 effects.emplace_back(::mlir::MemoryEffects::Write::get());
4328}
4329
4330} // namespace llzk::verif
4331MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::StepOp)
4332
4333namespace llzk::verif {
4334
4335
4336//===----------------------------------------------------------------------===//
4337// ::llzk::verif::StepYieldOp definitions
4338//===----------------------------------------------------------------------===//
4339
4340namespace detail {
4341
4342StepYieldOpGenericAdaptorBase::StepYieldOpGenericAdaptorBase(StepYieldOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
4343
4344
4345} // namespace detail
4347
4348::llvm::LogicalResult StepYieldOpAdaptor::verify(::mlir::Location loc) {
4349 return ::mlir::success();
4350}
4351
4352::llvm::LogicalResult StepYieldOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4353 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
4354 if (!dict) {
4355 emitError() << "expected DictionaryAttr to set properties";
4356 return ::mlir::failure();
4357 }
4358 return ::mlir::success();
4359}
4360
4361::mlir::Attribute StepYieldOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4362 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4363 ::mlir::Builder odsBuilder{ctx};
4364
4365 if (!attrs.empty())
4366 return odsBuilder.getDictionaryAttr(attrs);
4367 return {};
4368}
4369
4371 using llvm::hash_value;
4372 return llvm::hash_combine();
4373}
4374
4375std::optional<mlir::Attribute> StepYieldOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4376 return std::nullopt;
4377}
4378
4379void StepYieldOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4380}
4381
4382void StepYieldOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
4383}
4384
4385::llvm::LogicalResult StepYieldOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4386 return ::mlir::success();
4387}
4388
4389void StepYieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
4390 odsState.addOperands(value);
4391}
4392
4393StepYieldOp StepYieldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value) {
4394 ::mlir::OperationState __state__(location, getOperationName());
4395 build(builder, __state__, std::forward<decltype(value)>(value));
4396 auto __res__ = ::llvm::dyn_cast<StepYieldOp>(builder.create(__state__));
4397 assert(__res__ && "builder didn't return the right type");
4398 return __res__;
4399}
4400
4401StepYieldOp StepYieldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value) {
4402 return create(builder, builder.getLoc(), std::forward<decltype(value)>(value));
4403}
4404
4405void StepYieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
4406 odsState.addOperands(value);
4407 assert(resultTypes.size() == 0u && "mismatched number of results");
4408 odsState.addTypes(resultTypes);
4409}
4410
4411StepYieldOp StepYieldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
4412 ::mlir::OperationState __state__(location, getOperationName());
4413 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(value)>(value));
4414 auto __res__ = ::llvm::dyn_cast<StepYieldOp>(builder.create(__state__));
4415 assert(__res__ && "builder didn't return the right type");
4416 return __res__;
4417}
4418
4419StepYieldOp StepYieldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
4420 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(value)>(value));
4421}
4422
4423void StepYieldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4424 assert(operands.size() == 1u && "mismatched number of parameters");
4425 odsState.addOperands(operands);
4426 odsState.addAttributes(attributes);
4427 assert(resultTypes.size() == 0u && "mismatched number of return types");
4428 odsState.addTypes(resultTypes);
4429}
4430
4431StepYieldOp StepYieldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4432 ::mlir::OperationState __state__(location, getOperationName());
4433 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4434 auto __res__ = ::llvm::dyn_cast<StepYieldOp>(builder.create(__state__));
4435 assert(__res__ && "builder didn't return the right type");
4436 return __res__;
4437}
4438
4439StepYieldOp StepYieldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4440 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4441}
4442
4443void StepYieldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4444 assert(operands.size() == 1u && "mismatched number of parameters");
4445 odsState.addOperands(operands);
4446 odsState.useProperties(const_cast<Properties&>(properties));
4447 odsState.addAttributes(discardableAttributes);
4448 assert(resultTypes.size() == 0u && "mismatched number of return types");
4449 odsState.addTypes(resultTypes);
4450}
4451
4452StepYieldOp StepYieldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4453 ::mlir::OperationState __state__(location, getOperationName());
4454 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
4455 auto __res__ = ::llvm::dyn_cast<StepYieldOp>(builder.create(__state__));
4456 assert(__res__ && "builder didn't return the right type");
4457 return __res__;
4458}
4459
4460StepYieldOp StepYieldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4461 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
4462}
4463
4464::llvm::LogicalResult StepYieldOp::verifyInvariantsImpl() {
4465 {
4466 unsigned index = 0; (void)index;
4467 auto valueGroup0 = getODSOperands(0);
4468
4469 for (auto v : valueGroup0) {
4470 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
4471 return ::mlir::failure();
4472 }
4473 }
4474 return ::mlir::success();
4475}
4476
4477::llvm::LogicalResult StepYieldOp::verifyInvariants() {
4478 return verifyInvariantsImpl();
4479}
4480
4481::mlir::ParseResult StepYieldOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4482 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
4483 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
4484 (void)valueOperandsLoc;
4485
4486 valueOperandsLoc = parser.getCurrentLocation();
4487 if (parser.parseOperand(valueRawOperand))
4488 return ::mlir::failure();
4489 {
4490 auto loc = parser.getCurrentLocation();(void)loc;
4491 if (parser.parseOptionalAttrDict(result.attributes))
4492 return ::mlir::failure();
4493 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
4494 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
4495 })))
4496 return ::mlir::failure();
4497 }
4498 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
4499 if (parser.resolveOperands(valueOperands, odsBuildableType0, valueOperandsLoc, result.operands))
4500 return ::mlir::failure();
4501 return ::mlir::success();
4502}
4503
4504void StepYieldOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4505 _odsPrinter << ' ';
4506 _odsPrinter << getValue();
4507 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4508 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4509}
4510
4511
4512} // namespace llzk::verif
4513MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::StepYieldOp)
4514
4515namespace llzk::verif {
4516
4517
4518//===----------------------------------------------------------------------===//
4519// ::llzk::verif::VerifAssertOp definitions
4520//===----------------------------------------------------------------------===//
4521
4522namespace detail {
4523
4525
4526
4527} // namespace detail
4529
4530::llvm::LogicalResult VerifAssertOpAdaptor::verify(::mlir::Location loc) {
4531 return ::mlir::success();
4532}
4533
4534::llvm::LogicalResult VerifAssertOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4535 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
4536 if (!dict) {
4537 emitError() << "expected DictionaryAttr to set properties";
4538 return ::mlir::failure();
4539 }
4540 return ::mlir::success();
4541}
4542
4543::mlir::Attribute VerifAssertOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4544 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4545 ::mlir::Builder odsBuilder{ctx};
4546
4547 if (!attrs.empty())
4548 return odsBuilder.getDictionaryAttr(attrs);
4549 return {};
4550}
4551
4553 using llvm::hash_value;
4554 return llvm::hash_combine();
4555}
4556
4557std::optional<mlir::Attribute> VerifAssertOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4558 return std::nullopt;
4559}
4560
4561void VerifAssertOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4562}
4563
4564void VerifAssertOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
4565}
4566
4567::llvm::LogicalResult VerifAssertOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4568 return ::mlir::success();
4569}
4570
4571void VerifAssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
4572 odsState.addOperands(condition);
4573}
4574
4575VerifAssertOp VerifAssertOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition) {
4576 ::mlir::OperationState __state__(location, getOperationName());
4577 build(builder, __state__, std::forward<decltype(condition)>(condition));
4578 auto __res__ = ::llvm::dyn_cast<VerifAssertOp>(builder.create(__state__));
4579 assert(__res__ && "builder didn't return the right type");
4580 return __res__;
4581}
4582
4583VerifAssertOp VerifAssertOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value condition) {
4584 return create(builder, builder.getLoc(), std::forward<decltype(condition)>(condition));
4585}
4586
4587void VerifAssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4588 odsState.addOperands(condition);
4589 assert(resultTypes.size() == 0u && "mismatched number of results");
4590 odsState.addTypes(resultTypes);
4591}
4592
4593VerifAssertOp VerifAssertOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4594 ::mlir::OperationState __state__(location, getOperationName());
4595 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
4596 auto __res__ = ::llvm::dyn_cast<VerifAssertOp>(builder.create(__state__));
4597 assert(__res__ && "builder didn't return the right type");
4598 return __res__;
4599}
4600
4601VerifAssertOp VerifAssertOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4602 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
4603}
4604
4605void VerifAssertOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4606 assert(operands.size() == 1u && "mismatched number of parameters");
4607 odsState.addOperands(operands);
4608 odsState.addAttributes(attributes);
4609 assert(resultTypes.size() == 0u && "mismatched number of return types");
4610 odsState.addTypes(resultTypes);
4611}
4612
4613VerifAssertOp VerifAssertOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4614 ::mlir::OperationState __state__(location, getOperationName());
4615 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4616 auto __res__ = ::llvm::dyn_cast<VerifAssertOp>(builder.create(__state__));
4617 assert(__res__ && "builder didn't return the right type");
4618 return __res__;
4619}
4620
4621VerifAssertOp VerifAssertOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4622 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4623}
4624
4625void VerifAssertOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4626 assert(operands.size() == 1u && "mismatched number of parameters");
4627 odsState.addOperands(operands);
4628 odsState.useProperties(const_cast<Properties&>(properties));
4629 odsState.addAttributes(discardableAttributes);
4630 assert(resultTypes.size() == 0u && "mismatched number of return types");
4631 odsState.addTypes(resultTypes);
4632}
4633
4634VerifAssertOp VerifAssertOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4635 ::mlir::OperationState __state__(location, getOperationName());
4636 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
4637 auto __res__ = ::llvm::dyn_cast<VerifAssertOp>(builder.create(__state__));
4638 assert(__res__ && "builder didn't return the right type");
4639 return __res__;
4640}
4641
4642VerifAssertOp VerifAssertOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4643 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
4644}
4645
4647 {
4648 unsigned index = 0; (void)index;
4649 auto valueGroup0 = getODSOperands(0);
4650
4651 for (auto v : valueGroup0) {
4652 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
4653 return ::mlir::failure();
4654 }
4655 }
4656 return ::mlir::success();
4657}
4658
4659::llvm::LogicalResult VerifAssertOp::verifyInvariants() {
4660 return verifyInvariantsImpl();
4661}
4662
4663::mlir::ParseResult VerifAssertOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4664 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
4665 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
4666 (void)conditionOperandsLoc;
4667
4668 conditionOperandsLoc = parser.getCurrentLocation();
4669 if (parser.parseOperand(conditionRawOperand))
4670 return ::mlir::failure();
4671 {
4672 auto loc = parser.getCurrentLocation();(void)loc;
4673 if (parser.parseOptionalAttrDict(result.attributes))
4674 return ::mlir::failure();
4675 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
4676 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
4677 })))
4678 return ::mlir::failure();
4679 }
4680 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
4681 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
4682 return ::mlir::failure();
4683 return ::mlir::success();
4684}
4685
4686void VerifAssertOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4687 _odsPrinter << ' ';
4688 _odsPrinter << getCondition();
4689 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4690 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4691}
4692
4693// This side effect models "program termination". Based on
4694// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
4696 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
4697) {
4698 effects.emplace_back(::mlir::MemoryEffects::Write::get());
4699}
4700
4701} // namespace llzk::verif
4702MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::VerifAssertOp)
4703
4704namespace llzk::verif {
4705
4706
4707//===----------------------------------------------------------------------===//
4708// ::llzk::verif::VerifProveOp definitions
4709//===----------------------------------------------------------------------===//
4710
4711namespace detail {
4712
4713VerifProveOpGenericAdaptorBase::VerifProveOpGenericAdaptorBase(VerifProveOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
4714
4715
4716} // namespace detail
4718
4719::llvm::LogicalResult VerifProveOpAdaptor::verify(::mlir::Location loc) {
4720 return ::mlir::success();
4721}
4722
4723::llvm::LogicalResult VerifProveOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4724 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
4725 if (!dict) {
4726 emitError() << "expected DictionaryAttr to set properties";
4727 return ::mlir::failure();
4728 }
4729 return ::mlir::success();
4730}
4731
4732::mlir::Attribute VerifProveOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4733 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4734 ::mlir::Builder odsBuilder{ctx};
4735
4736 if (!attrs.empty())
4737 return odsBuilder.getDictionaryAttr(attrs);
4738 return {};
4739}
4740
4742 using llvm::hash_value;
4743 return llvm::hash_combine();
4744}
4745
4746std::optional<mlir::Attribute> VerifProveOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4747 return std::nullopt;
4748}
4749
4750void VerifProveOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4751}
4752
4753void VerifProveOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
4754}
4755
4756::llvm::LogicalResult VerifProveOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4757 return ::mlir::success();
4758}
4759
4760void VerifProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
4761 odsState.addOperands(condition);
4762}
4763
4764VerifProveOp VerifProveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition) {
4765 ::mlir::OperationState __state__(location, getOperationName());
4766 build(builder, __state__, std::forward<decltype(condition)>(condition));
4767 auto __res__ = ::llvm::dyn_cast<VerifProveOp>(builder.create(__state__));
4768 assert(__res__ && "builder didn't return the right type");
4769 return __res__;
4770}
4771
4772VerifProveOp VerifProveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value condition) {
4773 return create(builder, builder.getLoc(), std::forward<decltype(condition)>(condition));
4774}
4775
4776void VerifProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4777 odsState.addOperands(condition);
4778 assert(resultTypes.size() == 0u && "mismatched number of results");
4779 odsState.addTypes(resultTypes);
4780}
4781
4782VerifProveOp VerifProveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4783 ::mlir::OperationState __state__(location, getOperationName());
4784 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
4785 auto __res__ = ::llvm::dyn_cast<VerifProveOp>(builder.create(__state__));
4786 assert(__res__ && "builder didn't return the right type");
4787 return __res__;
4788}
4789
4790VerifProveOp VerifProveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4791 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
4792}
4793
4794void VerifProveOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4795 assert(operands.size() == 1u && "mismatched number of parameters");
4796 odsState.addOperands(operands);
4797 odsState.addAttributes(attributes);
4798 assert(resultTypes.size() == 0u && "mismatched number of return types");
4799 odsState.addTypes(resultTypes);
4800}
4801
4802VerifProveOp VerifProveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4803 ::mlir::OperationState __state__(location, getOperationName());
4804 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4805 auto __res__ = ::llvm::dyn_cast<VerifProveOp>(builder.create(__state__));
4806 assert(__res__ && "builder didn't return the right type");
4807 return __res__;
4808}
4809
4810VerifProveOp VerifProveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4811 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4812}
4813
4814void VerifProveOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4815 assert(operands.size() == 1u && "mismatched number of parameters");
4816 odsState.addOperands(operands);
4817 odsState.useProperties(const_cast<Properties&>(properties));
4818 odsState.addAttributes(discardableAttributes);
4819 assert(resultTypes.size() == 0u && "mismatched number of return types");
4820 odsState.addTypes(resultTypes);
4821}
4822
4823VerifProveOp VerifProveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4824 ::mlir::OperationState __state__(location, getOperationName());
4825 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
4826 auto __res__ = ::llvm::dyn_cast<VerifProveOp>(builder.create(__state__));
4827 assert(__res__ && "builder didn't return the right type");
4828 return __res__;
4829}
4830
4831VerifProveOp VerifProveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4832 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
4833}
4834
4835::llvm::LogicalResult VerifProveOp::verifyInvariantsImpl() {
4836 {
4837 unsigned index = 0; (void)index;
4838 auto valueGroup0 = getODSOperands(0);
4839
4840 for (auto v : valueGroup0) {
4841 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
4842 return ::mlir::failure();
4843 }
4844 }
4845 return ::mlir::success();
4846}
4847
4848::llvm::LogicalResult VerifProveOp::verifyInvariants() {
4849 return verifyInvariantsImpl();
4850}
4851
4852::mlir::ParseResult VerifProveOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4853 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
4854 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
4855 (void)conditionOperandsLoc;
4856
4857 conditionOperandsLoc = parser.getCurrentLocation();
4858 if (parser.parseOperand(conditionRawOperand))
4859 return ::mlir::failure();
4860 {
4861 auto loc = parser.getCurrentLocation();(void)loc;
4862 if (parser.parseOptionalAttrDict(result.attributes))
4863 return ::mlir::failure();
4864 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
4865 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
4866 })))
4867 return ::mlir::failure();
4868 }
4869 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
4870 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
4871 return ::mlir::failure();
4872 return ::mlir::success();
4873}
4874
4875void VerifProveOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4876 _odsPrinter << ' ';
4877 _odsPrinter << getCondition();
4878 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4879 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4880}
4881
4882// This side effect models "program termination". Based on
4883// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
4885 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
4886) {
4887 effects.emplace_back(::mlir::MemoryEffects::Write::get());
4888}
4889
4890} // namespace llzk::verif
4891MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::VerifProveOp)
4892
4893namespace llzk::verif {
4894
4895
4896//===----------------------------------------------------------------------===//
4897// ::llzk::verif::VerifSMTProveOp definitions
4898//===----------------------------------------------------------------------===//
4899
4900namespace detail {
4901
4903
4904
4905} // namespace detail
4907
4908::llvm::LogicalResult VerifSMTProveOpAdaptor::verify(::mlir::Location loc) {
4909 return ::mlir::success();
4910}
4911
4912::llvm::LogicalResult VerifSMTProveOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4913 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
4914 if (!dict) {
4915 emitError() << "expected DictionaryAttr to set properties";
4916 return ::mlir::failure();
4917 }
4918 return ::mlir::success();
4919}
4920
4921::mlir::Attribute VerifSMTProveOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4922 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4923 ::mlir::Builder odsBuilder{ctx};
4924
4925 if (!attrs.empty())
4926 return odsBuilder.getDictionaryAttr(attrs);
4927 return {};
4928}
4929
4931 using llvm::hash_value;
4932 return llvm::hash_combine();
4933}
4934
4935std::optional<mlir::Attribute> VerifSMTProveOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4936 return std::nullopt;
4937}
4938
4939void VerifSMTProveOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4940}
4941
4942void VerifSMTProveOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
4943}
4944
4945::llvm::LogicalResult VerifSMTProveOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4946 return ::mlir::success();
4947}
4948
4949void VerifSMTProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
4950 odsState.addOperands(condition);
4951}
4952
4953VerifSMTProveOp VerifSMTProveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition) {
4954 ::mlir::OperationState __state__(location, getOperationName());
4955 build(builder, __state__, std::forward<decltype(condition)>(condition));
4956 auto __res__ = ::llvm::dyn_cast<VerifSMTProveOp>(builder.create(__state__));
4957 assert(__res__ && "builder didn't return the right type");
4958 return __res__;
4959}
4960
4961VerifSMTProveOp VerifSMTProveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value condition) {
4962 return create(builder, builder.getLoc(), std::forward<decltype(condition)>(condition));
4963}
4964
4965void VerifSMTProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4966 odsState.addOperands(condition);
4967 assert(resultTypes.size() == 0u && "mismatched number of results");
4968 odsState.addTypes(resultTypes);
4969}
4970
4971VerifSMTProveOp VerifSMTProveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4972 ::mlir::OperationState __state__(location, getOperationName());
4973 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
4974 auto __res__ = ::llvm::dyn_cast<VerifSMTProveOp>(builder.create(__state__));
4975 assert(__res__ && "builder didn't return the right type");
4976 return __res__;
4977}
4978
4979VerifSMTProveOp VerifSMTProveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
4980 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(condition)>(condition));
4981}
4982
4983void VerifSMTProveOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4984 assert(operands.size() == 1u && "mismatched number of parameters");
4985 odsState.addOperands(operands);
4986 odsState.addAttributes(attributes);
4987 assert(resultTypes.size() == 0u && "mismatched number of return types");
4988 odsState.addTypes(resultTypes);
4989}
4990
4991VerifSMTProveOp VerifSMTProveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4992 ::mlir::OperationState __state__(location, getOperationName());
4993 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
4994 auto __res__ = ::llvm::dyn_cast<VerifSMTProveOp>(builder.create(__state__));
4995 assert(__res__ && "builder didn't return the right type");
4996 return __res__;
4997}
4998
4999VerifSMTProveOp VerifSMTProveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5000 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
5001}
5002
5003void VerifSMTProveOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5004 assert(operands.size() == 1u && "mismatched number of parameters");
5005 odsState.addOperands(operands);
5006 odsState.useProperties(const_cast<Properties&>(properties));
5007 odsState.addAttributes(discardableAttributes);
5008 assert(resultTypes.size() == 0u && "mismatched number of return types");
5009 odsState.addTypes(resultTypes);
5010}
5011
5012VerifSMTProveOp VerifSMTProveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5013 ::mlir::OperationState __state__(location, getOperationName());
5014 build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
5015 auto __res__ = ::llvm::dyn_cast<VerifSMTProveOp>(builder.create(__state__));
5016 assert(__res__ && "builder didn't return the right type");
5017 return __res__;
5018}
5019
5020VerifSMTProveOp VerifSMTProveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5021 return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
5022}
5023
5025 {
5026 unsigned index = 0; (void)index;
5027 auto valueGroup0 = getODSOperands(0);
5028
5029 for (auto v : valueGroup0) {
5030 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops7(*this, v.getType(), "operand", index++)))
5031 return ::mlir::failure();
5032 }
5033 }
5034 return ::mlir::success();
5035}
5036
5037::llvm::LogicalResult VerifSMTProveOp::verifyInvariants() {
5038 return verifyInvariantsImpl();
5039}
5040
5041::mlir::ParseResult VerifSMTProveOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5042 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
5043 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
5044 (void)conditionOperandsLoc;
5045
5046 conditionOperandsLoc = parser.getCurrentLocation();
5047 if (parser.parseOperand(conditionRawOperand))
5048 return ::mlir::failure();
5049 {
5050 auto loc = parser.getCurrentLocation();(void)loc;
5051 if (parser.parseOptionalAttrDict(result.attributes))
5052 return ::mlir::failure();
5053 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
5054 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
5055 })))
5056 return ::mlir::failure();
5057 }
5058 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<mlir::smt::BoolType>();
5059 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
5060 return ::mlir::failure();
5061 return ::mlir::success();
5062}
5063
5064void VerifSMTProveOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
5065 _odsPrinter << ' ';
5066 _odsPrinter << getCondition();
5067 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5068 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5069}
5070
5071
5072} // namespace llzk::verif
5073MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::VerifSMTProveOp)
5074
5075
5076#endif // GET_OP_CLASSES
5077
static FeltType get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName)
Definition Types.cpp.inc:69
AssumeDetOpAdaptor(AssumeDetOp op)
Definition Ops.cpp.inc:244
AssumeDetOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:305
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:246
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:250
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:366
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:280
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:259
::mlir::TypedValue<::mlir::Type > getHint()
Definition Ops.h.inc:372
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:412
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:273
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:358
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:283
FoldAdaptor::Properties Properties
Definition Ops.h.inc:353
static AssumeDetOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value hint)
Definition Ops.cpp.inc:291
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:375
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:379
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:277
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:362
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:268
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value hint)
Definition Ops.cpp.inc:287
ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:464
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:454
ContractEndOpAdaptor(ContractEndOp op)
Definition Ops.cpp.inc:452
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:512
FoldAdaptor::Properties Properties
Definition Ops.h.inc:507
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:576
static ContractEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location)
Definition Ops.cpp.inc:498
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:488
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:568
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:572
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:458
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:491
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
Definition Ops.cpp.inc:495
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:485
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:481
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:589
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:594
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:476
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:467
ContractOpAdaptor(ContractOp op)
Definition Ops.cpp.inc:639
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:641
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:711
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:858
::mlir::StringAttr getFunctionTypeAttrName()
Definition Ops.h.inc:768
::mlir::StringAttr getResAttrsAttrName()
Definition Ops.h.inc:776
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:819
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:801
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:791
::std::optional< ::mlir::ArrayAttr > getResAttrs()
Definition Ops.cpp.inc:941
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:800
::mlir::StringAttr getTargetAttrName()
Definition Ops.h.inc:792
void setFunctionType(::mlir::FunctionType attrValue)
Definition Ops.cpp.inc:950
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:837
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1106
::llvm::LogicalResult verify()
Definition Ops.cpp:610
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs={}, ::mlir::ArrayAttr res_attrs={})
Definition Ops.cpp.inc:954
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1112
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
Definition Ops.cpp.inc:936
::mlir::FunctionType getFunctionType()
Definition Ops.cpp.inc:931
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:784
::mlir::StringAttr getArgAttrsAttrName()
Definition Ops.h.inc:760
::mlir::TypeAttr getFunctionTypeAttr()
Definition Ops.h.inc:847
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:747
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:846
::mlir::SymbolRefAttr getTargetAttr()
Definition Ops.h.inc:842
::mlir::SymbolRefAttr getFullyQualifiedName(bool requireParent=true)
Return the full name for this contract from the root module, including all surrounding symbol table n...
Definition Ops.cpp:391
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1072
::mlir::ArrayAttr getArgAttrsAttr()
Definition Ops.h.inc:852
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:910
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:946
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:668
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:891
::mlir::SymbolRefAttr getTarget()
Definition Ops.cpp.inc:926
FoldAdaptor::Properties Properties
Definition Ops.h.inc:754
static ContractOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs={}, ::mlir::ArrayAttr res_attrs={})
Definition Ops.cpp.inc:960
::mlir::ArrayAttr getResAttrsAttr()
Definition Ops.h.inc:857
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:921
DecreasesOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1082
DecreasesOpAdaptor(DecreasesOp op)
Definition Ops.cpp.inc:1255
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1257
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1130
::mlir::TypedValue<::llzk::felt::FeltType > getValue()
Definition Ops.h.inc:1149
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1422
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1390
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1135
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1284
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
Definition Ops.cpp.inc:1298
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1270
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1373
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1143
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1294
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1291
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1279
static DecreasesOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value)
Definition Ops.cpp.inc:1302
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1386
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1261
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1288
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1413
EnsureComputeOpAdaptor(EnsureComputeOp op)
Definition Ops.cpp.inc:1444
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1446
EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1243
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1579
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1450
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1611
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1575
static EnsureComputeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition)
Definition Ops.cpp.inc:1491
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1296
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1602
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1477
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1304
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1291
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1483
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1468
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:1487
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1562
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1473
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1459
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1480
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:1310
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1635
EnsureConstrainOpAdaptor(EnsureConstrainOp op)
Definition Ops.cpp.inc:1633
EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1404
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1465
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1800
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1457
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1764
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1662
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1672
static EnsureConstrainOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition)
Definition Ops.cpp.inc:1680
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1791
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1639
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1751
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1452
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1648
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:1676
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1669
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1657
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1768
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1666
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:1471
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1868
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1680
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:2319
::mlir::MutableOperandRange getArgOperandsMutable()
Definition Ops.cpp.inc:1907
::mlir::ArrayAttr getTemplateParamsAttr()
Definition Ops.h.inc:1855
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:2025
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2433
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:2084
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1815
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:2216
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:2323
::mlir::OperandRangeRange getMapOperands()
Definition Ops.h.inc:1825
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2559
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2484
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1898
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2177
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:2304
::std::optional< ::mlir::ArrayAttr > getResAttrs()
Definition Ops.cpp.inc:2314
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:2262
::mlir::SymbolRefAttr getCalleeAttr()
Definition Ops.h.inc:1850
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1741
::mlir::StringAttr getResAttrsAttrName()
Definition Ops.h.inc:1786
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:2100
::mlir::Operation::operand_range getArgOperands()
Definition Ops.h.inc:1821
::mlir::StringAttr getArgAttrsAttrName()
Definition Ops.h.inc:1754
::mlir::ArrayAttr getResAttrsAttr()
Definition Ops.h.inc:1875
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:2162
::mlir::SymbolRefAttr getCallee()
Definition Ops.cpp.inc:2289
::mlir::StringAttr getCalleeAttrName()
Definition Ops.h.inc:1762
::mlir::StringAttr getMapOpGroupSizesAttrName()
Definition Ops.h.inc:1770
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
Definition Ops.cpp.inc:2309
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1919
::mlir::MutableOperandRangeRange getMapOperandsMutable()
Definition Ops.cpp.inc:1913
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
Definition Ops.cpp.inc:2294
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:2122
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands={}, ::llvm::ArrayRef<::mlir::Attribute > templateParams={})
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2642
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:2427
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:2299
static IncludeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands={}, ::llvm::ArrayRef<::mlir::Attribute > templateParams={})
Definition Ops.cpp.inc:2327
::mlir::StringAttr getNumDimsPerMapAttrName()
Definition Ops.h.inc:1778
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.h.inc:1860
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2480
::mlir::ArrayAttr getArgAttrsAttr()
Definition Ops.h.inc:1870
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1810
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:1865
::mlir::StringAttr getTemplateParamsAttrName()
Definition Ops.h.inc:1794
IncreasesOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2025
IncreasesOpAdaptor(IncreasesOp op)
Definition Ops.cpp.inc:2683
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2685
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:2719
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2818
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:2707
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2078
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2689
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2814
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2841
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2801
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2722
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
Definition Ops.cpp.inc:2726
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:2712
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2086
static IncreasesOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value)
Definition Ops.cpp.inc:2730
::mlir::TypedValue<::llzk::felt::FeltType > getValue()
Definition Ops.h.inc:2092
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2850
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2073
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:2716
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:2698
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2884
InvariantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2235
InvariantOpAdaptor(InvariantOp op)
Definition Ops.cpp.inc:2882
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2992
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:2974
::mlir::StringAttr getLoopArgTypesAttrName()
Definition Ops.h.inc:2284
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2300
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:3017
void setLoopName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:3033
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:2965
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3076
::mlir::ArrayAttr getLoopArgTypesAttr()
Definition Ops.h.inc:2342
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:2935
::mlir::ArrayAttr getLoopArgTypes()
Definition Ops.cpp.inc:3028
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:2958
static InvariantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringRef loop_name, ::llvm::ArrayRef<::mlir::Type > loop_arg_types={}, ::llvm::ArrayRef<::mlir::Location > loop_arg_locs={})
Definition Ops.cpp.inc:3037
::mlir::StringAttr getLoopNameAttr()
Definition Ops.h.inc:2337
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:3007
::llvm::StringRef getLoopName()
Definition Ops.cpp.inc:3023
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringRef loop_name, ::llvm::ArrayRef<::mlir::Type > loop_arg_types={}, ::llvm::ArrayRef<::mlir::Location > loop_arg_locs={})
Definition Ops.cpp:916
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2278
::llvm::LogicalResult verify()
Definition Ops.cpp:966
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:2986
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:3049
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:3070
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2898
::mlir::StringAttr getLoopNameAttrName()
Definition Ops.h.inc:2292
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:3158
OldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2434
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3195
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:3391
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:3435
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2487
static OldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value value)
Definition Ops.cpp.inc:3204
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:3189
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:3363
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:3180
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2482
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:3185
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:3192
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:3171
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:3401
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2495
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:2520
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:3387
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:3451
::mlir::TypedValue<::mlir::Type > getValue()
Definition Ops.h.inc:2501
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3162
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2514
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value)
Definition Ops.cpp.inc:3199
ProveDetOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2609
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:3473
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:3678
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:3704
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:3507
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2662
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value condition)
Definition Ops.cpp.inc:3514
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:3486
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:3495
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:3747
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:3712
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3477
static ProveDetOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value condition)
Definition Ops.cpp.inc:3519
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3510
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2657
::mlir::TypedValue<::mlir::Type > getCondition()
Definition Ops.h.inc:2676
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2689
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:3504
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:3500
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2670
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:3700
RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2783
RequireComputeOpAdaptor(RequireComputeOp op)
Definition Ops.cpp.inc:3780
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:3782
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:3809
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3786
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:3804
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2836
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:3795
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:3816
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:3898
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:3947
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3819
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:3911
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:3813
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:3915
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:2850
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2844
static RequireComputeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition)
Definition Ops.cpp.inc:3827
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:3823
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:3938
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2831
RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2944
RequireConstrainOpAdaptor(RequireConstrainOp op)
Definition Ops.cpp.inc:3969
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:3971
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2992
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:3998
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:3984
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:4100
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:3011
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4008
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:4136
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3975
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:4002
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:4087
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:4012
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:3993
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:4104
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2997
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3005
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:4127
static RequireConstrainOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition)
Definition Ops.cpp.inc:4016
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:4005
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:4160
StepOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3112
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:4182
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:4194
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:4295
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:4280
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:4173
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:4291
static StepOp create(::mlir::OpBuilder &builder, ::mlir::Location location)
Definition Ops.cpp.inc:4205
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:4324
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:3160
::mlir::Region & getRegion()
Definition Ops.h.inc:3184
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:4187
FoldAdaptor::Properties Properties
Definition Ops.h.inc:3155
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:4315
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4197
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:4191
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
Definition Ops.cpp.inc:4201
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4164
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:4348
StepYieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3263
StepYieldOpAdaptor(StepYieldOp op)
Definition Ops.cpp.inc:4346
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:3316
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:4382
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4352
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4385
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:4370
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:4361
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
Definition Ops.cpp.inc:4389
::mlir::TypedValue<::mlir::IntegerType > getValue()
Definition Ops.h.inc:3330
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:4481
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:4379
static StepYieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value)
Definition Ops.cpp.inc:4393
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:4464
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:4375
FoldAdaptor::Properties Properties
Definition Ops.h.inc:3311
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3324
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:4477
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:4504
VerifAssertOpAdaptor(VerifAssertOp op)
Definition Ops.cpp.inc:4528
VerifAssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3423
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:4530
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:3490
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:4646
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4534
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:4552
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:3476
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:4543
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3484
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:4695
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:4663
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:4557
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:4686
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:4564
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:4561
static VerifAssertOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition)
Definition Ops.cpp.inc:4575
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:4659
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:4571
FoldAdaptor::Properties Properties
Definition Ops.h.inc:3471
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4567
VerifProveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3584
VerifProveOpAdaptor(VerifProveOp op)
Definition Ops.cpp.inc:4717
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:4719
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:3651
static VerifProveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition)
Definition Ops.cpp.inc:4764
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:4852
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:4750
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:4835
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:4848
FoldAdaptor::Properties Properties
Definition Ops.h.inc:3632
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:3637
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4756
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:4746
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:4884
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:4753
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:4732
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3645
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4723
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:4741
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:4760
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:4875
VerifSMTProveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3745
VerifSMTProveOpAdaptor(VerifSMTProveOp op)
Definition Ops.cpp.inc:4906
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:4908
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:4949
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3806
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:5041
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:5037
FoldAdaptor::Properties Properties
Definition Ops.h.inc:3793
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:5024
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:4942
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:4930
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:4939
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:4921
::mlir::TypedValue< mlir::smt::BoolType > getCondition()
Definition Ops.h.inc:3812
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:4935
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:3798
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4912
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4945
static VerifSMTProveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value condition)
Definition Ops.cpp.inc:4953
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:5064
AssumeDetOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:278
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:274
ContractEndOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:438
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:434
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:643
ContractOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:647
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
Definition Ops.cpp.inc:627
::std::optional< ::mlir::ArrayAttr > getResAttrs()
Definition Ops.cpp.inc:632
DecreasesOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1055
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1051
EnsureComputeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1216
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1212
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1373
EnsureConstrainOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1377
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:1844
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.cpp.inc:1839
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1619
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:1820
::std::optional< ::mlir::ArrayAttr > getResAttrs()
Definition Ops.cpp.inc:1859
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
Definition Ops.cpp.inc:1854
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:1849
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
Definition Ops.cpp.inc:1834
IncludeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1623
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:1652
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1994
IncreasesOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1998
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:2185
InvariantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2189
OldOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2407
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:2403
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:2578
ProveDetOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2582
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:2752
RequireComputeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2756
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:2913
RequireConstrainOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2917
StepOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3078
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:3074
StepYieldOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3236
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:3232
VerifAssertOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3396
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:3392
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:3553
VerifProveOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3557
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:3714
VerifSMTProveOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3718
Common interface for constant parameter-like symbol operations that can be defined within a TemplateO...
Common interface for precondition and postcondition operations.
void printTemplateParams(mlir::AsmPrinter &printer, mlir::ArrayAttr value)
Definition OpHelpers.h:198
mlir::ParseResult parseAttrDictWithWarnings(mlir::OpAsmParser &parser, mlir::NamedAttrList &extraAttrs, mlir::OperationState &state)
Definition OpHelpers.h:151
bool isValidEmitEqType(Type type)
bool isValidType(Type type)
void printMultiDimAndSymbolList(mlir::OpAsmPrinter &printer, mlir::Operation *op, mlir::OperandRangeRange multiMapOperands, mlir::DenseI32ArrayAttr numDimsPerMap)
Definition OpHelpers.h:144
void printAttrDictWithWarnings(mlir::OpAsmPrinter &printer, ConcreteOp op, mlir::DictionaryAttr extraAttrs, typename mlir::PropertiesSelector< ConcreteOp >::type state)
Definition OpHelpers.h:158
mlir::ParseResult parseTemplateParams(mlir::AsmParser &parser, mlir::ArrayAttr &value)
Definition OpHelpers.h:165
mlir::ParseResult parseMultiDimAndSymbolList(mlir::OpAsmParser &parser, mlir::SmallVector< mlir::SmallVector< mlir::OpAsmParser::UnresolvedOperand > > &multiMapOperands, mlir::DenseI32ArrayAttr &numDimsPerMap)
Definition OpHelpers.h:136