LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
Attrs.td
Go to the documentation of this file.
1//===-- Attrs.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_FELT_ATTRS
11#define LLZK_FELT_ATTRS
12
13include "llzk/Dialect/Felt/IR/Dialect.td"
14include "llzk/Dialect/LLZK/IR/AttributeHelper.td"
15
16include "mlir/IR/AttrTypeBase.td"
17include "mlir/IR/BuiltinAttributeInterfaces.td"
18
19def LLZK_FeltConstAttr
20 : AttrDef<FeltDialect, "FeltConst", [TypedAttrInterface]> {
21 let mnemonic = "felt.const";
22 let summary = "finite field element";
23 let description = [{
24 A felt attribute represents a finite field element.
25 }];
26
27 let parameters = (ins APIntParameter<"The felt constant value">:$value);
28
29 let assemblyFormat = [{ $value }];
30
31 let extraClassDeclaration = [{
32 ::mlir::Type getType() const;
33 }];
34}
35
36#endif // LLZK_FELT_ATTRS