{"id":18008030,"url":"https://github.com/luizzak/swift-z3","last_synced_at":"2025-03-26T12:32:02.039Z","repository":{"id":53614806,"uuid":"238067756","full_name":"LuizZak/swift-z3","owner":"LuizZak","description":"A Swift wrapper over Microsoft's Z3 Theorem Prover","archived":false,"fork":false,"pushed_at":"2024-11-25T16:14:09.000Z","size":122435,"stargazers_count":12,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T19:03:44.952Z","etag":null,"topics":["swift","swift-wrapper","z3","z3-smt-solver"],"latest_commit_sha":null,"homepage":"https://LuizZak.github.io/swift-z3/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LuizZak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-03T21:41:37.000Z","updated_at":"2025-03-17T14:45:05.000Z","dependencies_parsed_at":"2024-04-30T16:17:38.251Z","dependency_job_id":null,"html_url":"https://github.com/LuizZak/swift-z3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuizZak%2Fswift-z3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuizZak%2Fswift-z3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuizZak%2Fswift-z3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuizZak%2Fswift-z3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LuizZak","download_url":"https://codeload.github.com/LuizZak/swift-z3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245654283,"owners_count":20650837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["swift","swift-wrapper","z3","z3-smt-solver"],"created_at":"2024-10-30T01:16:52.063Z","updated_at":"2025-03-26T12:32:00.788Z","avatar_url":"https://github.com/LuizZak.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftZ3\n\n[![Swift](https://github.com/LuizZak/swift-z3/actions/workflows/swift.yml/badge.svg)](https://github.com/LuizZak/swift-z3/actions/workflows/swift.yml)\n\nA Swift wrapper over Microsoft's [Z3 Theorem Prover](https://github.com/Z3Prover/z3)\n\nThe aim is to wrap the entire C API layer into Swift types, with many conveniences and type safety sprinkled on top.\n\nExample:\n\n```swift\nlet config = Z3Config()\nconfig.setParameter(name: \"model\", value: \"true\")\n\nlet context = Z3Context(configuration: config)\n\nlet left: Z3Float = context.makeConstant(name: \"left\")\nlet width: Z3Float = context.makeConstant(name: \"width\")\nlet right: Z3Float = context.makeConstant(name: \"right\")\n\nlet lValue = left == 50.0\nlet wValue = width == 100.0\n\nlet rightEq = right == left + width\n\nlet solver = context.makeSolver()\n\nsolver.assert([lValue, wValue, rightEq])\nXCTAssertEqual(solver.check(), .satisfiable)\n\nif let model = solver.getModel() {\n    XCTAssertEqual(model.double(right), 150)\n} else {\n    XCTFail(\"Failed to get expected model\")\n}\n```\n\nDevelopment is ongoing and the public API might change at any time without notice.\n\n### Requirements\n\nSwift 5.4, macOS 10.13+\n\n### Installation\n\nSwiftZ3 is available to Swift Package Manager:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/LuizZak/swift-z3.git\", .branch(\"master\"))\n]\n```\n\nSpecific tagged versions of Z3 are available as branches instead of tags in this repository. This allows base Swift API updates on master to be merged into different release versions of Z3 without requiring rewriting tags:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/LuizZak/swift-z3.git\", .branch(\"4.11.2\")) // Pulls 4.11.2 branch, with latest 'z3-4.11.2' source code + any API updates from master\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluizzak%2Fswift-z3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluizzak%2Fswift-z3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluizzak%2Fswift-z3/lists"}