|
LLZK 0.1.0
Veridise's ZK Language IR
|
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, llvm::SMTExprRef exprRef) | |
| ExpressionValue (const Field &f, llvm::SMTExprRef exprRef, const llvm::DynamicAPInt &singleVal) | |
| ExpressionValue (llvm::SMTExprRef exprRef, const Interval &interval) | |
| llvm::SMTExprRef | getExpr () const |
| const Interval & | getInterval () 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 & | join (const ExpressionValue &) |
| Fold two expressions together when overapproximating array elements. | |
| bool | operator== (const ExpressionValue &rhs) const |
| bool | isBoolSort (llvm::SMTSolverRef solver) const |
| void | print (mlir::raw_ostream &os) const |
Friends | |
| ExpressionValue | intersection (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 (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 (llvm::SMTSolverRef solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | sub (llvm::SMTSolverRef solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | mul (llvm::SMTSolverRef solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | div (llvm::SMTSolverRef solver, felt::DivFeltOp op, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | mod (llvm::SMTSolverRef solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | bitAnd (llvm::SMTSolverRef solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | shiftLeft (llvm::SMTSolverRef solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | shiftRight (llvm::SMTSolverRef solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | cmp (llvm::SMTSolverRef solver, boolean::CmpOp op, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | boolAnd (llvm::SMTSolverRef solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | boolOr (llvm::SMTSolverRef solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | boolXor (llvm::SMTSolverRef solver, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| ExpressionValue | fallbackBinaryOp (llvm::SMTSolverRef solver, mlir::Operation *op, const ExpressionValue &lhs, const ExpressionValue &rhs) |
| Computes a solver expression based on the operation, but computes a fallback interval (which is just Entire, or unknown). | |
| ExpressionValue | neg (llvm::SMTSolverRef solver, const ExpressionValue &val) |
| ExpressionValue | notOp (llvm::SMTSolverRef solver, const ExpressionValue &val) |
| ExpressionValue | boolNot (llvm::SMTSolverRef solver, const ExpressionValue &val) |
| ExpressionValue | fallbackUnaryOp (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 45 of file IntervalAnalysis.h.
|
inline |
Definition at line 48 of file IntervalAnalysis.h.
|
inlineexplicit |
Definition at line 50 of file IntervalAnalysis.h.
|
inline |
Definition at line 53 of file IntervalAnalysis.h.
|
inline |
Definition at line 56 of file IntervalAnalysis.h.
|
inline |
Definition at line 59 of file IntervalAnalysis.h.
|
inline |
Definition at line 63 of file IntervalAnalysis.h.
|
inline |
Definition at line 61 of file IntervalAnalysis.h.
|
inline |
Definition at line 86 of file IntervalAnalysis.h.
|
inline |
Fold two expressions together when overapproximating array elements.
Definition at line 79 of file IntervalAnalysis.h.
| bool llzk::ExpressionValue::operator== | ( | const ExpressionValue & | rhs | ) | const |
Definition at line 33 of file IntervalAnalysis.cpp.
| void llzk::ExpressionValue::print | ( | mlir::raw_ostream & | os | ) | const |
Definition at line 268 of file IntervalAnalysis.cpp.
|
inline |
Return the current expression with a new SMT expression.
Definition at line 73 of file IntervalAnalysis.h.
|
inline |
Return the current expression with a new interval.
| newInterval |
Definition at line 68 of file IntervalAnalysis.h.
|
friend |
Definition at line 59 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 110 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 173 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 232 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 181 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 189 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 134 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 83 of file IntervalAnalysis.cpp.
|
friend |
Computes a solver expression based on the operation, but computes a fallback interval (which is just Entire, or unknown).
Used for currently unsupported compute-only operations.
| solver | |
| op | |
| lhs | |
| rhs |
|
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 52 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 102 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 75 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 218 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 225 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 174 of file IntervalAnalysis.h.
|
friend |
Definition at line 118 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 126 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 67 of file IntervalAnalysis.cpp.