Skip to content

Commit

Permalink
add section about scopes
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <[email protected]>
  • Loading branch information
NikolajBjorner committed Nov 15, 2018
1 parent 92304a7 commit 1f45978
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions programmingz3/code/fp.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from z3 import *
x = FP('x', FPSort(3, 4))
print(10 + x)

y = FP('y', FPSort(3, 4))
solve(10 * x == y, x != 0)

13 changes: 12 additions & 1 deletion programmingz3/programmingz3.mdk
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,17 @@ retracted when the scope is popped. In this section we describe the interface
to solvers. The next section describes the main solver instances the support
the Solver interface.

## Incrementality
Solvers can be used to check satisfiability of assertions in an incremental way.
An initial set of assertions can be checked for satisiability followed
by additional assertions and checks. Assertions can be retracted using
scopes that are pushed and popped. Under the hood, Z3 uses a one-shot solver
during the first check. If further calls are made into the solver, the default
behavior is to switch to an _incremental_ solver. The incremental solver
uses the SMT core, see [#sec-smt-core], by default. For use-cases that don't
require all features by the SMT core, it may be beneficiary to use specialized
solvers, such as solvers for finite domains (bit-vectors, enumeration types, bounded integers, and Booleans)
as specified using the `QF_FD`{language:smt} logic.

## Scopes
The operations `push`{language:python} and `pop`{language:python} create, respectively revert,
Expand Down Expand Up @@ -1527,7 +1538,7 @@ The SMT Solver is a general purpose solver that covers a wide range of supported
It is supplemented with specialized solvers for SAT formulas, polynomial arithmetic,
Horn clauses and quantified formulas over theories that admit quantifier-elimination.

## SMT Core
## SMT Core { #sec-smt-core }

The SMT Solver is a general purpose solver that covers a wide range of
supported theories. It is built around a CDCL(T) architecture where theory
Expand Down

0 comments on commit 1f45978

Please sign in to comment.