1//===-- OpInterfaces.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_FELT_OP_INTERFACES
11#define LLZK_FELT_OP_INTERFACES
13include "llzk/Dialect/Felt/IR/Types.td"
15include "mlir/IR/Interfaces.td"
16include "mlir/Interfaces/SideEffectInterfaces.td"
17include "mlir/Interfaces/MemorySlotInterfaces.td"
19def FeltBinaryOpInterface : OpInterface<"FeltBinaryOpInterface"> {
21 Common interface for binary arithmetic operations on felts
24 let cppNamespace = "::llzk::felt";
27 // Requires implementors to have '$lhs' and '$rhs' arguments.
28 InterfaceMethod<[{Gets the left operand.}], "::mlir::Value", "getLhs",
30 InterfaceMethod<[{Gets the right operand.}], "::mlir::Value", "getRhs",
34#endif // LLZK_FELT_OP_INTERFACES