LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
OpTraits.td
Go to the documentation of this file.
1//===-- OpTraits.td ----------------------------------------*- tablegen -*-===//
2//
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
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LLZK_FUNCTION_TRAITS
11#define LLZK_FUNCTION_TRAITS
12
13include "mlir/IR/OpBase.td"
14
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";
19}
20
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";
25}
26
27#endif // LLZK_FUNCTION_TRAITS