LLZK 2.1.1
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
ValueModel.cpp File Reference
#include "ValueModel.h"
#include "Errors.h"
#include "WitgenUtils.h"
#include "llzk/Dialect/Felt/IR/Types.h"
#include "llzk/Dialect/POD/IR/Attrs.h"
#include <mlir/IR/Operation.h>
#include <llvm/ADT/TypeSwitch.h>
Include dependency graph for ValueModel.cpp:

Go to the source code of this file.

Namespaces

namespace  llzk
namespace  llzk::witgen

Functions

llvm::Expected< bool > llzk::witgen::asBool (const WitnessVal &value)
 Require a boolean value from the runtime variant.
llvm::Expected< int64_t > llzk::witgen::asIndex (const WitnessVal &value)
 Require an index value from the runtime variant.
llvm::Expected< llvm::DynamicAPInt > llzk::witgen::asFelt (const WitnessVal &value)
 Require a felt value from the runtime variant.
llvm::Expected< ArrayValueRefllzk::witgen::asArray (const WitnessVal &value)
 Require an array value from the runtime variant.
llvm::Expected< PodValueRefllzk::witgen::asPod (const WitnessVal &value)
 Require a POD value from the runtime variant.
llvm::Expected< StructValueRefllzk::witgen::asStruct (const WitnessVal &value)
 Require a struct value from the runtime variant.
llvm::Expected< WitnessValllzk::witgen::defaultValue (Type type, SymbolTableCollection &tables, Operation *origin, const Field &field, UninitializedBehavior behavior, std::mt19937_64 *rng)
 Build a default value for a supported LLZK type.