mirror of
https://github.com/Z3Prover/z3
synced 2025-09-05 09:37:44 +00:00
more tactic descriptions
This commit is contained in:
parent
0d8a472aac
commit
c07b6ab38f
10 changed files with 233 additions and 46 deletions
|
@ -13,7 +13,45 @@ Author:
|
|||
|
||||
Christoph (cwinter) 2012-10-26
|
||||
|
||||
Notes:
|
||||
Tactic Description
|
||||
|
||||
## Tactic macro-finder
|
||||
|
||||
### Short Description
|
||||
|
||||
Identifies and applies macros.
|
||||
|
||||
### Long Description
|
||||
|
||||
It finds implicit macro definitions in quantifiers.
|
||||
A main instance of a macro an equality that defines a function `f` using some term `t` that does not contain `f`.
|
||||
Other instances of macros are also recognized by the macro finder.
|
||||
|
||||
* `(forall (x) (= (f x) t))`
|
||||
|
||||
* `not (= (p x) t)` is recognized as `(p x) = (not t)`
|
||||
|
||||
* `(iff (= (f x) t) cond)` rewrites to `(f x) = (if cond t else (k x))`
|
||||
* add clause `(not (= (k x) t))`
|
||||
|
||||
* `(= (+ (f x) s) t)` becomes `(= (f x) (- t s))`
|
||||
|
||||
* `(= (+ (* -1 (f x)) x) t)` becomes `(= (f x) (- (- t s)))`
|
||||
|
||||
### Example
|
||||
|
||||
```z3
|
||||
(declare-fun f (Int) Int)
|
||||
(declare-fun p (Int) Bool)
|
||||
|
||||
(assert (forall ((x Int)) (= (+ (f x) x) 3)))
|
||||
(assert (p (f 8)))
|
||||
(apply macro-finder)
|
||||
```
|
||||
|
||||
### Notes
|
||||
|
||||
* Supports proofs, unsat cores, but not goals with recursive function definitions.
|
||||
|
||||
--*/
|
||||
#pragma once
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue