|
LLZK 2.1.1
An open-source IR for Zero Knowledge (ZK) circuits
|
Tracks a solver expression and an interval range for that expression. More...
#include <IntervalAnalysis.h>
Classes | |
| struct | Hash |
Public Member Functions | |
| ExpressionValue () | |
| ExpressionValue (const Field &f) | |
| ExpressionValue (const Field &f, llvm::SMTExprRef exprRef) | |
| ExpressionValue (const Field &f, llvm::SMTExprRef exprRef, const llvm::DynamicAPInt &singleVal) | |
| ExpressionValue (llvm::SMTExprRef exprRef, const Interval &interval, std::optional< UnreducedInterval > unreducedInterval=std::nullopt) | |
| llvm::SMTExprRef | getExpr () const |
| const Interval & | getInterval () const |
| bool | hasUnreducedInterval () const |
| const std::optional< UnreducedInterval > & | getOptionalUnreducedInterval () const |
| const UnreducedInterval & | getUnreducedInterval () const |
| const Field & | getField () const |
| ExpressionValue | withInterval (const Interval &newInterval) const |
| Return the current expression with a new interval. | |
| ExpressionValue | withExpression (const llvm::SMTExprRef &newExpr) const |
| Return the current expression with a new SMT expression. | |
| ExpressionValue | withUnreducedInterval (const UnreducedInterval &newUnreducedInterval) const |
| ExpressionValue | withOptionalUnreducedInterval (std::optional< UnreducedInterval > newUnreducedInterval) const |
| ExpressionValue | dropUnreducedInterval () const |
| ExpressionValue & | join (const ExpressionValue &) |
| Fold two expressions together when overapproximating array elements. | |
| bool | operator== (const ExpressionValue &rhs) const |
| bool | isBoolSort (const llvm::SMTSolverRef &solver) const |
| void | print (mlir::raw_ostream &os) const |
Friends | |
| ExpressionValue | intersection (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| Compute the intersection of the lhs and rhs intervals, and create a solver expression that constrains both sides to be equal. | |
| ExpressionValue | join (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| Compute the union of the lhs and rhs intervals, and create a solver expression that constrains both sides to be equal. | |
| ExpressionValue | add (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | sub (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | mul (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | div (const llvm::SMTSolverRef &solver, mlir::Operation *op, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | uintDiv (const llvm::SMTSolverRef &solver, mlir::Operation *op, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | sintDiv (const llvm::SMTSolverRef &solver, mlir::Operation *op, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | mod (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | bitAnd (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | bitOr (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | bitXor (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | shiftLeft (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | shiftRight (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | cmp (const llvm::SMTSolverRef &solver, boolean::CmpOp op, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | boolAnd (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | boolOr (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | boolXor (const llvm::SMTSolverRef &solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | neg (const llvm::SMTSolverRef &solver, const ExpressionValue &val) |
| ExpressionValue | notOp (const llvm::SMTSolverRef &solver, const ExpressionValue &val) |
| ExpressionValue | boolNot (const llvm::SMTSolverRef &solver, const ExpressionValue &val) |
| ExpressionValue | fallbackUnaryOp (const llvm::SMTSolverRef &solver, mlir::Operation *op, const ExpressionValue &val) |
| mlir::raw_ostream & | operator<< (mlir::raw_ostream &os, const ExpressionValue &e) |
Tracks a solver expression and an interval range for that expression.
Used as a scalar lattice value.
Definition at line 49 of file IntervalAnalysis.h.
|
inline |
Definition at line 52 of file IntervalAnalysis.h.
|
inlineexplicit |
Definition at line 54 of file IntervalAnalysis.h.
|
inline |
Definition at line 57 of file IntervalAnalysis.h.
|
inline |
Definition at line 60 of file IntervalAnalysis.h.
|
inline |
Definition at line 63 of file IntervalAnalysis.h.
|
inline |
Definition at line 105 of file IntervalAnalysis.h.
|
inline |
Definition at line 69 of file IntervalAnalysis.h.
|
inline |
Definition at line 82 of file IntervalAnalysis.h.
|
inline |
Definition at line 71 of file IntervalAnalysis.h.
|
inline |
Definition at line 75 of file IntervalAnalysis.h.
|
inline |
Definition at line 77 of file IntervalAnalysis.h.
|
inline |
Definition at line 73 of file IntervalAnalysis.h.
|
inline |
Definition at line 117 of file IntervalAnalysis.h.
|
inline |
Fold two expressions together when overapproximating array elements.
Definition at line 109 of file IntervalAnalysis.h.
| bool llzk::ExpressionValue::operator== | ( | const ExpressionValue & | rhs | ) | const |
Definition at line 248 of file IntervalAnalysis.cpp.
| void llzk::ExpressionValue::print | ( | mlir::raw_ostream & | os | ) | const |
Definition at line 621 of file IntervalAnalysis.cpp.
|
inline |
Return the current expression with a new SMT expression.
Definition at line 92 of file IntervalAnalysis.h.
|
inline |
Return the current expression with a new interval.
| newInterval |
Definition at line 87 of file IntervalAnalysis.h.
|
inline |
Definition at line 101 of file IntervalAnalysis.h.
|
inline |
Definition at line 96 of file IntervalAnalysis.h.
|
friend |
Definition at line 308 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 431 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 439 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 447 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 542 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 588 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 551 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 560 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 477 of file IntervalAnalysis.cpp.
|
friend |
|
friend |
|
friend |
Compute the intersection of the lhs and rhs intervals, and create a solver expression that constrains both sides to be equal.
| solver | |
| lhs | |
| rhs |
Definition at line 299 of file IntervalAnalysis.cpp.
|
friend |
Compute the union of the lhs and rhs intervals, and create a solver expression that constrains both sides to be equal.
| solver | |
| lhs | |
| rhs |
|
friend |
Definition at line 415 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 326 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 571 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 581 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 212 of file IntervalAnalysis.h.
|
friend |
Definition at line 458 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 467 of file IntervalAnalysis.cpp.
|
friend |
|
friend |
Definition at line 317 of file IntervalAnalysis.cpp.
|
friend |