18#include <llvm/ADT/DenseMap.h>
19#include <llvm/ADT/DynamicAPInt.h>
20#include <llvm/ADT/StringRef.h>
21#include <llvm/Support/Error.h>
32class SymbolTableCollection;
70 llvm::DenseMap<llvm::StringRef, WitnessVal>
records;
76 llvm::DenseMap<llvm::StringRef, WitnessVal>
members;
99 mlir::Type type, mlir::SymbolTableCollection &tables, mlir::Operation *origin,
Information about the prime finite field used for the interval analysis.
llvm::Expected< PodValueRef > asPod(const WitnessVal &value)
Require a POD value from the runtime variant.
llvm::Expected< bool > asBool(const WitnessVal &value)
Require a boolean value from the runtime variant.
UninitializedBehavior
Control how witgen materializes uninitialized/default values.
llvm::Expected< WitnessVal > 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.
std::shared_ptr< ArrayValue > ArrayValueRef
Shared runtime storage for LLZK array values.
std::shared_ptr< PodValue > PodValueRef
Shared runtime storage for LLZK POD values.
llvm::Expected< int64_t > asIndex(const WitnessVal &value)
Require an index value from the runtime variant.
std::variant< std::monostate, bool, int64_t, llvm::DynamicAPInt, ArrayValueRef, PodValueRef, StructValueRef > WitnessVal
Runtime value representation used by the tool-local interpreter.
llvm::Expected< llvm::DynamicAPInt > asFelt(const WitnessVal &value)
Require a felt value from the runtime variant.
std::shared_ptr< StructValue > StructValueRef
Shared runtime storage for LLZK struct values.
llvm::Expected< StructValueRef > asStruct(const WitnessVal &value)
Require a struct value from the runtime variant.
llvm::Expected< ArrayValueRef > asArray(const WitnessVal &value)
Require an array value from the runtime variant.
Materialized array value with flattened element storage.
std::vector< WitnessVal > elements
Materialized POD value keyed by record name.
llvm::DenseMap< llvm::StringRef, WitnessVal > records
Materialized struct value keyed by member name.
llvm::DenseMap< llvm::StringRef, WitnessVal > members
component::StructType type