mirror of
https://github.com/Z3Prover/z3
synced 2026-02-16 22:01:44 +00:00
Fix variable naming: tmpFile -> tempFile for Go conventions
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
c99baf45d0
commit
5dad1247de
2 changed files with 5 additions and 6 deletions
|
|
@ -5,4 +5,3 @@ go 1.20
|
|||
require github.com/Z3Prover/z3/src/api/go v0.0.0
|
||||
|
||||
replace github.com/Z3Prover/z3/src/api/go => ../../src/api/go
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ func main() {
|
|||
fmt.Println("\nExample 3: FromFile() - Load SMT-LIB2 from file")
|
||||
|
||||
// Create a temporary SMT-LIB2 file
|
||||
tmpFile, err := os.CreateTemp("", "test-*.smt2")
|
||||
tempFile, err := os.CreateTemp("", "test-*.smt2")
|
||||
if err != nil {
|
||||
fmt.Println("Error creating temp file:", err)
|
||||
} else {
|
||||
|
|
@ -62,14 +62,14 @@ func main() {
|
|||
(assert (or p q))
|
||||
(assert (or (not p) (not q)))`
|
||||
|
||||
_, err = tmpFile.WriteString(content)
|
||||
tmpFile.Close()
|
||||
_, err = tempFile.WriteString(content)
|
||||
tempFile.Close()
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("Error writing temp file:", err)
|
||||
} else {
|
||||
solver3 := ctx.NewSolver()
|
||||
solver3.FromFile(tmpFile.Name())
|
||||
solver3.FromFile(tempFile.Name())
|
||||
fmt.Println("Loaded SMT-LIB2 assertions from file")
|
||||
|
||||
status3 := solver3.Check()
|
||||
|
|
@ -78,7 +78,7 @@ func main() {
|
|||
fmt.Println("Found satisfying assignment")
|
||||
}
|
||||
}
|
||||
os.Remove(tmpFile.Name()) // Clean up
|
||||
os.Remove(tempFile.Name()) // Clean up
|
||||
}
|
||||
|
||||
// Example 4: Parameter configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue