#include <analyzer.h>
|
| void | Bind (const Var &var, const Range &new_range, bool allow_override=false) |
| | Update binding of var to a new expression. More...
|
| |
| void | Bind (const Var &var, const PrimExpr &expr, bool allow_override=false) |
| | Update binding of var to a new expression. More...
|
| |
| bool | IsEnabled () const |
| | Whether the Z3 backend is compiled into this build (USE_Z3=ON). More...
|
| |
| bool | CanProve (const PrimExpr &expr) |
| | Whether can we prove expr is always true. More...
|
| |
| std::function< void()> | EnterConstraint (const PrimExpr &constraint) |
| | Update the internal state to enter constraint. More...
|
| |
| ffi::String | GetSMTLIB2 (const ffi::Optional< PrimExpr > expr) |
| | Get the SMTLIB2 representation of the current context. More...
|
| |
| ffi::String | GetStats () |
| | Get statistics about Z3 prover. More...
|
| |
| void | SetTimeoutMs (unsigned timeout_ms) |
| | Set timeout in milliseconds for Z3 prover. More...
|
| |
| void | SetRLimit (unsigned rlimit) |
| | Set resource limitation for Z3 prover. More...
|
| |
| ffi::String | GetModel (const PrimExpr &expr) |
| | Get the Z3 model for the given expression if satisfiable. More...
|
| |
| int64_t | CountSatisfyingValues (const Var &var, int64_t max_count=2048, int64_t min_consecutive=1) |
| | Count the number of integer values that satisfy the current constraints. More...
|
| |
◆ Bind() [1/2]
| void tvm::arith::Z3Prover::Bind |
( |
const Var & |
var, |
|
|
const PrimExpr & |
expr, |
|
|
bool |
allow_override = false |
|
) |
| |
Update binding of var to a new expression.
- Parameters
-
| var | The variable of interest. |
| expr | The bound expression. |
| allow_override | whether we allow override of existing information. |
◆ Bind() [2/2]
| void tvm::arith::Z3Prover::Bind |
( |
const Var & |
var, |
|
|
const Range & |
new_range, |
|
|
bool |
allow_override = false |
|
) |
| |
Update binding of var to a new expression.
- Parameters
-
| var | The variable of interest. |
| new_range | The range of allowed values for this var. |
| allow_override | whether we allow override of existing information. |
◆ CanProve()
| bool tvm::arith::Z3Prover::CanProve |
( |
const PrimExpr & |
expr | ) |
|
Whether can we prove expr is always true.
- Parameters
-
- Returns
- Whether we can prove it.
◆ CountSatisfyingValues()
| int64_t tvm::arith::Z3Prover::CountSatisfyingValues |
( |
const Var & |
var, |
|
|
int64_t |
max_count = 2048, |
|
|
int64_t |
min_consecutive = 1 |
|
) |
| |
Count the number of integer values that satisfy the current constraints.
This method uses Z3's model enumeration to count how many distinct values of the given variable satisfy all current constraints.
- Parameters
-
| var | The variable to count satisfying values for. |
| max_count | Maximum number of solutions to enumerate. |
| min_consecutive | Minimum consecutive count requirement. |
- Returns
- The number of distinct values that satisfy the constraints, or a negative error code.
◆ EnterConstraint()
| std::function<void()> tvm::arith::Z3Prover::EnterConstraint |
( |
const PrimExpr & |
constraint | ) |
|
Update the internal state to enter constraint.
- Parameters
-
| constraint | A constraint expression. |
- Returns
- an exit function that must be called to cleanup the constraint can be nullptr.
◆ GetModel()
| ffi::String tvm::arith::Z3Prover::GetModel |
( |
const PrimExpr & |
expr | ) |
|
Get the Z3 model for the given expression if satisfiable.
- Parameters
-
| expr | The expression to get the model for. |
- Returns
- The model as a string.
◆ GetSMTLIB2()
| ffi::String tvm::arith::Z3Prover::GetSMTLIB2 |
( |
const ffi::Optional< PrimExpr > |
expr | ) |
|
Get the SMTLIB2 representation of the current context.
- Parameters
-
| expr | The optional expression to check. |
- Returns
- The SMTLIB2 string.
◆ GetStats()
| ffi::String tvm::arith::Z3Prover::GetStats |
( |
| ) |
|
Get statistics about Z3 prover.
- Returns
- The statistics string.
◆ IsEnabled()
| bool tvm::arith::Z3Prover::IsEnabled |
( |
| ) |
const |
Whether the Z3 backend is compiled into this build (USE_Z3=ON).
- Returns
- true if the real Z3 prover is available, false for the stub.
◆ SetRLimit()
| void tvm::arith::Z3Prover::SetRLimit |
( |
unsigned |
rlimit | ) |
|
Set resource limitation for Z3 prover.
- Parameters
-
| rlimit | the resource limitation. |
◆ SetTimeoutMs()
| void tvm::arith::Z3Prover::SetTimeoutMs |
( |
unsigned |
timeout_ms | ) |
|
Set timeout in milliseconds for Z3 prover.
- Parameters
-
| timeout_ms | The timeout in milliseconds. |
◆ Analyzer
◆ AnalyzerObj
The documentation for this class was generated from the following file: