mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
add more doc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
5a5758baaa
commit
90ba225ae3
|
@ -5,14 +5,41 @@ Module Name:
|
||||||
|
|
||||||
propagate_values2_tactic.h
|
propagate_values2_tactic.h
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Tactic for propagating equalities (= t v) where v is a value
|
|
||||||
|
|
||||||
Author:
|
Author:
|
||||||
|
|
||||||
Nikolaj Bjorner (nbjorner) 2022-11-24
|
Nikolaj Bjorner (nbjorner) 2022-11-24
|
||||||
|
|
||||||
|
Tactic Documentation:
|
||||||
|
|
||||||
|
## Tactic propagate-values
|
||||||
|
|
||||||
|
### Short Description:
|
||||||
|
|
||||||
|
Tactic for propagating equalities `(= t v)` where `v` is a value
|
||||||
|
|
||||||
|
### Long Description
|
||||||
|
|
||||||
|
In a context where terms are equated to constants it is invariably beneficial to
|
||||||
|
replace terms, that can be compound, with the constants and then simplify the resulting formulas.
|
||||||
|
The propagate-values tactic accomplishes the task of replacing such terms.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```z3
|
||||||
|
(declare-const x Int)
|
||||||
|
(declare-const y Int)
|
||||||
|
(declare-fun f (Int) Int)
|
||||||
|
(assert (= 1 (f (+ x y))))
|
||||||
|
(assert (= 2 x))
|
||||||
|
(assert (> (f (+ 2 y)) y))
|
||||||
|
(apply propagate-values)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
* supports unsat cores
|
||||||
|
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,37 @@ Author:
|
||||||
|
|
||||||
Leonardo (leonardo) 2011-11-20
|
Leonardo (leonardo) 2011-11-20
|
||||||
|
|
||||||
Notes:
|
Tactic Documentation:
|
||||||
|
|
||||||
|
## Tactic simplify
|
||||||
|
|
||||||
|
### Short Description:
|
||||||
|
|
||||||
|
The tactic performs algebraic simplifcations on formulas
|
||||||
|
|
||||||
|
### Long Description
|
||||||
|
|
||||||
|
The simplify tactic invokes z3's main rewriting engine.
|
||||||
|
The rewriting engine contains support for theory specific simplifications.
|
||||||
|
The set of simplifications invoked is open ended. Useful algebraic simplifications
|
||||||
|
are added to the rewrite engine as they are discovered to be useful.
|
||||||
|
|
||||||
|
Note that the simplifier does not ensure that equivalent formulas are simplified to the same form.
|
||||||
|
In other words it does not guarantee canonicity. This contrasts with BDD packages where BDDs constructed
|
||||||
|
from two equivalent formulas are guaranteed to be equal.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```z3
|
||||||
|
(declare-const x Int)
|
||||||
|
(declare-const y Int)
|
||||||
|
(assert (> x (+ x y)))
|
||||||
|
(apply simplify)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
* supports unsat cores, proof terms
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
Loading…
Reference in a new issue