LLZK 2.1.1
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Interpreter.h
Go to the documentation of this file.
1//===-- Interpreter.h - llzk-witgen compute interpreter ---------*- 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#pragma once
11
12#include "ValueModel.h"
13
15
16#include <mlir/IR/BuiltinOps.h>
17
18#include <llvm/ADT/SmallVector.h>
19
20#include <random>
21
22namespace llzk::witgen {
23
26public:
29 mlir::ModuleOp moduleOp, mlir::SymbolTableCollection &tables, const llzk::Field &field,
30 UninitializedBehavior uninitializedBehavior, std::mt19937_64 rng
31 );
32
34 llvm::Expected<llvm::SmallVector<WitnessVal>>
35 run(llzk::function::FuncDefOp funcOp, mlir::ArrayRef<WitnessVal> args);
36
37private:
38 mlir::ModuleOp moduleOp;
39 mlir::SymbolTableCollection &tables;
40 const llzk::Field &field;
42 std::mt19937_64 rng;
43};
44
45} // namespace llzk::witgen
Information about the prime finite field used for the interval analysis.
Definition Field.h:36
llvm::Expected< llvm::SmallVector< WitnessVal > > run(llzk::function::FuncDefOp funcOp, mlir::ArrayRef< WitnessVal > args)
Run a function with concrete arguments and return its result values.
FunctionInterpreter(mlir::ModuleOp moduleOp, mlir::SymbolTableCollection &tables, const llzk::Field &field, UninitializedBehavior uninitializedBehavior, std::mt19937_64 rng)
Build an interpreter for one module and field configuration.
UninitializedBehavior
Control how witgen materializes uninitialized/default values.
Definition ValueModel.h:55