LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Architecture

Project Overview

The LLZK project consists of three main components:

  1. LLZK IR Dialects, which define the types, attributes, and operations that are composed to define an LLZK IR program.
  2. Passes, which analyze or transform the IR.
  3. Backends, which process LLZK IR into another destination format (e.g., R1CS constraints) or analyze the IR to identify bugs or verify properties of the source language.

The general workflow of using LLZK is as follows:

  1. Translate the source ZK language into LLZK IR using a frontend tool.
  2. Use the llzk-opt tool to perform any transformations using LLZK's pass infrastructure.
  3. Provide the transformed IR to a backend for further analysis or use.

LLZK IR Dialects

The types, attributes, and operations that make up LLZK IR are logically grouped into several dialects defined via MLIR. The dialects can be further grouped into a few categories:

For the complete specification of all dialects, see LLZK IR Dialects.

Several builtin MLIR dialects are also supported in LLZK IR:

Frontends

Frontends are not contained within the LLZK repository, but are instead maintained in separate repositories, using LLZK-lib as a dependency.

The LLZK project currently maintains the following frontends:

For information on how to create a new frontend, please refer to the Translation Guidelines.

Passes

LLZK provides three types of passes:

  1. Analysis passes, which compute useful information about the IR (typically used to implement other passes or backends).
  2. Transformation passes, which restructure or optimize the IR.
  3. Validation passes, which ensure the IR has certain required properties.

Documentation on how to use these passes is provided in Tool Guides.

Developer documentation can be found:

Backends

The LLZK project currently maintains the following backends:

Veridise also maintains a Picus Constraint Language backend that allows LLZK to be lowered to PCL for use with the Picus verifier.

Previous Next
Overview Setup