Skip to content

Commit

Permalink
add more doc
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Dec 6, 2022
1 parent 5a5758b commit 90ba225
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 5 deletions.
35 changes: 31 additions & 4 deletions src/tactic/core/propagate_values2_tactic.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,41 @@ Module Name:
propagate_values2_tactic.h
Abstract:
Tactic for propagating equalities (= t v) where v is a value
Author:
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

Expand Down
32 changes: 31 additions & 1 deletion src/tactic/core/simplify_tactic.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,37 @@ Module Name:
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
Expand Down

0 comments on commit 90ba225

Please sign in to comment.