LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Verif.h
Go to the documentation of this file.
1//===-- Verif.h - C API for Verif dialect -------------------------*- C -*-===//
2//
3// Part of the LLZK Project, under the Apache License v2.0.
4// See LICENSE.txt for license information.
5// Copyright 2026 Project LLZK
6// SPDX-License-Identifier: Apache-2.0
7//
8//===----------------------------------------------------------------------===//
9//
10// This header declares the C interface for registering and accessing the
11// Verif dialect. A dialect should be registered with a context to make it
12// available to users of the context. These users must load the dialect
13// before using any of its attributes, operations, or types. Parser and pass
14// manager can load registered dialects automatically.
15//
16//===----------------------------------------------------------------------===//
17
18#ifndef LLZK_C_DIALECT_VERIF_H
19#define LLZK_C_DIALECT_VERIF_H
20
21#include "llzk-c/Support.h"
22
23#include <mlir-c/IR.h>
24#include <mlir-c/Support.h>
25
26// Include the generated CAPI
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
35
39MLIR_CAPI_EXPORTED void llzkVerif_attachInterfaces(MlirContext context);
40
41//===----------------------------------------------------------------------===//
42// ContractOp
43//===----------------------------------------------------------------------===//
44
47 Verif, ContractOp, MlirIdentifier sym_name, MlirAttribute target, MlirAttribute function_type,
48 MlirAttribute arg_attrs
49);
50
53 Verif, ContractOp, FromTargetIdentifier, MlirIdentifier sym_name, MlirIdentifier target
54);
55
58 Verif, ContractOp, FromTargetAttr, MlirIdentifier sym_name, MlirAttribute target
59);
60
61//===----------------------------------------------------------------------===//
62// IncludeOp
63//===----------------------------------------------------------------------===//
64
68 Verif, IncludeOp, MlirAttribute callee, MlirValueRange argOperands, MlirAttribute templateParams
69);
70
74MLIR_CAPI_EXPORTED MlirType llzkVerif_IncludeOpGetTypeSignature(MlirOperation inp);
75
76//===----------------------------------------------------------------------===//
77// InvariantOp
78//===----------------------------------------------------------------------===//
79
84 Verif, InvariantOp, MlirStringRef loopName, intptr_t numArgs, MlirType const *types,
85 MlirLocation const *locs
86);
87
89MLIR_CAPI_EXPORTED MlirBlock llzkVerif_InvariantOpGetBody(MlirOperation op);
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif // LLZK_C_DIALECT_VERIF_H
MLIR_CAPI_EXPORTED void llzkVerif_attachInterfaces(MlirContext context)
Attaches the interfaces defined by the verif dialect to upstream IR elements.
Definition Verif.cpp:31
MLIR_CAPI_EXPORTED MlirBlock llzkVerif_InvariantOpGetBody(MlirOperation op)
Returns the body of the invariant operation.
Definition Verif.cpp:126
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Verif, llzk__verif)
Get reference to the LLZK verif dialect.
MLIR_CAPI_EXPORTED MlirType llzkVerif_IncludeOpGetTypeSignature(MlirOperation inp)
Return the FunctionType inferred from the arg operands of this CallOp.
Definition Verif.cpp:103
#define LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD(dialect, op, suffix,...)
Definition Support.h:33
#define LLZK_DECLARE_OP_BUILD_METHOD(dialect, op,...)
Definition Support.h:38
Representation of an mlir::ValueRange.
Definition Support.h:47