|
LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
|
Namespaces | |
| namespace | detail |
Classes | |
| class | CallOp |
| class | CallOpAdaptor |
| class | CallOpGenericAdaptor |
| class | ConstraintGen |
| Marker for ops that are specific to constraint generation. More... | |
| class | FuncDefOp |
| class | FuncDefOpAdaptor |
| class | FuncDefOpGenericAdaptor |
| class | FunctionDialect |
| class | NotFieldNative |
| Marker for ops over llzk.felt type operands that are not native to finite field arithmetic. More... | |
| class | ReturnOp |
| class | ReturnOpAdaptor |
| class | ReturnOpGenericAdaptor |
| struct | Verification |
| Marker for ops in the verif dialect that can be inlined inside functions. More... | |
| struct | Verification<> |
| class | WitnessGen |
| Marker for ops that are specific to witness generation. More... | |
Enumerations | |
| enum class | FunctionKind : std::uint8_t { StructCompute , StructConstrain , StructProduct , Free } |
| Kinds of functions in LLZK. More... | |
Functions | |
| FunctionKind | fnNameToKind (mlir::StringRef name) |
| Given a function name, return the corresponding FunctionKind. | |
| LogicalResult | verifyConstraintGenTraitImpl (Operation *op) |
| LogicalResult | verifyWitnessGenTraitImpl (Operation *op) |
| LogicalResult | verifyNotFieldNativeTraitImpl (Operation *op) |
| LogicalResult | verifyVerificationTraitImpl (Operation *op, llvm::function_ref< LogicalResult()> check) |
| mlir::LogicalResult | verifyConstraintGenTraitImpl (mlir::Operation *op) |
| mlir::LogicalResult | verifyWitnessGenTraitImpl (mlir::Operation *op) |
| mlir::LogicalResult | verifyNotFieldNativeTraitImpl (mlir::Operation *op) |
| mlir::LogicalResult | verifyVerificationTraitImpl (mlir::Operation *op, llvm::function_ref< mlir::LogicalResult()>) |
| Implementation of the Verification trait's validation check. | |
Variables | |
| constexpr char | ARG_NAME_ATTR_NAME [] = "function.arg_name" |
| Attribute name for source-level function argument names. | |
| constexpr char | RES_NAME_ATTR_NAME [] = "function.res_name" |
| Attribute name for source-level function result names. | |
|
strong |
Kinds of functions in LLZK.
| Enumerator | |
|---|---|
| StructCompute | Function within a struct named FUNC_NAME_COMPUTE. |
| StructConstrain | Function within a struct named FUNC_NAME_CONSTRAIN. |
| StructProduct | Function within a struct named FUNC_NAME_PRODUCT. |
| Free | Function that is not within a struct. |
| FunctionKind llzk::function::fnNameToKind | ( | mlir::StringRef | name | ) |
Given a function name, return the corresponding FunctionKind.
One caveat to note is that this cannot check if the function is actually within a struct (it only checks if the name is one of the special names for struct functions defined in include/llzk/Util/Constants.h) so, regardless of the FunctionKind returned, the function may still be a free function and additional checks may be necessary.
| mlir::LogicalResult llzk::function::verifyConstraintGenTraitImpl | ( | mlir::Operation * | op | ) |
| LogicalResult llzk::function::verifyConstraintGenTraitImpl | ( | Operation * | op | ) |
Definition at line 50 of file OpTraits.cpp.
| mlir::LogicalResult llzk::function::verifyNotFieldNativeTraitImpl | ( | mlir::Operation * | op | ) |
| LogicalResult llzk::function::verifyNotFieldNativeTraitImpl | ( | Operation * | op | ) |
Definition at line 66 of file OpTraits.cpp.
| mlir::LogicalResult llzk::function::verifyVerificationTraitImpl | ( | mlir::Operation * | op, |
| llvm::function_ref< mlir::LogicalResult()> | ) |
Implementation of the Verification trait's validation check.
Takes a callback that is used to do additional checks iff the operation is inside a function.def operation.
For example, Verification<WitnessGen> will call this function passing a callback that runs WitnessGen::verifyTrait if the op is inside a function.def operation.
| LogicalResult llzk::function::verifyVerificationTraitImpl | ( | Operation * | op, |
| llvm::function_ref< LogicalResult()> | check ) |
Definition at line 73 of file OpTraits.cpp.
| mlir::LogicalResult llzk::function::verifyWitnessGenTraitImpl | ( | mlir::Operation * | op | ) |
| LogicalResult llzk::function::verifyWitnessGenTraitImpl | ( | Operation * | op | ) |
Definition at line 58 of file OpTraits.cpp.
|
constexpr |