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, llvm::APSInt singleVal) | |
ExpressionValue (llvm::SMTExprRef exprRef, 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 & | join (const ExpressionValue &rhs) |
Fold two expressions together when overapproximating array elements. | |
bool | operator== (const ExpressionValue &rhs) 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 | cmp (llvm::SMTSolverRef solver, boolean::CmpOp op, 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 | 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 431 of file IntervalAnalysis.h.
|
inline |
Definition at line 434 of file IntervalAnalysis.h.
|
inlineexplicit |
Definition at line 436 of file IntervalAnalysis.h.
|
inline |
Definition at line 439 of file IntervalAnalysis.h.
|
inline |
Definition at line 442 of file IntervalAnalysis.h.
|
inline |
Definition at line 444 of file IntervalAnalysis.h.
|
inline |
Definition at line 448 of file IntervalAnalysis.h.
|
inline |
Definition at line 446 of file IntervalAnalysis.h.
|
inline |
Fold two expressions together when overapproximating array elements.
Definition at line 459 of file IntervalAnalysis.h.
bool llzk::ExpressionValue::operator== | ( | const ExpressionValue & | rhs | ) | const |
Definition at line 468 of file IntervalAnalysis.cpp.
void llzk::ExpressionValue::print | ( | mlir::raw_ostream & | os | ) | const |
Definition at line 636 of file IntervalAnalysis.cpp.
|
inline |
Return the current expression with a new interval.
newInterval |
Definition at line 453 of file IntervalAnalysis.h.
|
friend |
Definition at line 486 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 536 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 510 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 479 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 528 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 502 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 585 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 592 of file IntervalAnalysis.cpp.
|
friend |
Definition at line 530 of file IntervalAnalysis.h.
|
friend |
Definition at line 494 of file IntervalAnalysis.cpp.