1//===-- OpTraits.td ----------------------------------------*- tablegen -*-===//
3// Part of the LLZK Project, under the Apache License v2.0.
4// See LICENSE.txt for license information.
5// Copyright 2025 Veridise Inc.
6// SPDX-License-Identifier: Apache-2.0
8//===----------------------------------------------------------------------===//
10#ifndef LLZK_FUNCTION_TRAITS
11#define LLZK_FUNCTION_TRAITS
13include "mlir/IR/OpBase.td"
15/// Marker for ops that are specific to witness generation. Op classes with
16/// this trait are valid only in functions that have the `AllowWitnessAttr`.
17def WitnessGen : NativeOpTrait<"WitnessGen">, StructuralOpTrait {
18 string cppNamespace = "::llzk::function";
21/// Marker for ops that are specific to constraint generation. Op classes with
22/// this trait are valid only in functions that have the `AllowConstraintAttr`.
23def ConstraintGen : NativeOpTrait<"ConstraintGen">, StructuralOpTrait {
24 string cppNamespace = "::llzk::function";
27#endif // LLZK_FUNCTION_TRAITS