mirror of
https://github.com/Z3Prover/z3
synced 2026-02-19 07:04:22 +00:00
Add safety comment and improve test documentation
- Add comment about safety of &levels[0] after n > 0 check - Improve test documentation about SimpleSolver limitations - Clarify that Units/NonUnits are more reliable for general use Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
b799238fe8
commit
87812a99c0
2 changed files with 10 additions and 5 deletions
|
|
@ -44,11 +44,15 @@ func main() {
|
|||
fmt.Printf(" NonUnit %d: %s\n", i, nu.String())
|
||||
}
|
||||
|
||||
// Note: Trail() and TrailLevels() work primarily with SimpleSolver.
|
||||
// With default solvers (created with NewSolver()), they may return
|
||||
// errors like "cannot retrieve trail from solvers created using tactics".
|
||||
// For those use cases, Units() and NonUnits() provide similar diagnostic info.
|
||||
fmt.Println("Note: Trail() and TrailLevels() work primarily with SimpleSolver")
|
||||
// Note: Trail() and TrailLevels() work primarily with SimpleSolver,
|
||||
// which is used internally by Z3 but not directly exposed in the Go API.
|
||||
// With default solvers (created with NewSolver()), they return errors like
|
||||
// "cannot retrieve trail from solvers created using tactics".
|
||||
// Units() and NonUnits() provide similar diagnostic information without
|
||||
// this limitation and work with all solver types.
|
||||
fmt.Println("\nNote: Trail() and TrailLevels() work primarily with SimpleSolver")
|
||||
fmt.Println(" These functions may return errors with default solvers")
|
||||
fmt.Println(" For general diagnostic purposes, Units() and NonUnits() are more reliable")
|
||||
}
|
||||
|
||||
// Test congruence closure APIs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue