{"id":20009810,"url":"https://github.com/plsyssec/haskell-boolector","last_synced_at":"2025-05-04T19:35:56.480Z","repository":{"id":56843009,"uuid":"127247451","full_name":"PLSysSec/haskell-boolector","owner":"PLSysSec","description":"Haskell bindings for the Boolector SMT solver","archived":false,"fork":false,"pushed_at":"2020-08-18T21:45:12.000Z","size":1133,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-19T06:19:59.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://hackage.haskell.org/package/boolector","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PLSysSec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-29T06:33:22.000Z","updated_at":"2024-04-04T13:35:40.000Z","dependencies_parsed_at":"2022-09-01T06:32:22.115Z","dependency_job_id":null,"html_url":"https://github.com/PLSysSec/haskell-boolector","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLSysSec%2Fhaskell-boolector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLSysSec%2Fhaskell-boolector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLSysSec%2Fhaskell-boolector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLSysSec%2Fhaskell-boolector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PLSysSec","download_url":"https://codeload.github.com/PLSysSec/haskell-boolector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252390739,"owners_count":21740376,"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":[],"created_at":"2024-11-13T07:17:09.291Z","updated_at":"2025-05-04T19:35:56.046Z","avatar_url":"https://github.com/PLSysSec.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Hackage](https://img.shields.io/hackage/v/boolector.svg)](https://hackage.haskell.org/package/boolector)\n\n# Haskell binding for the Boolector SMT Solver\n\nThis is a simple library for writing SMT queries against the Boolector SMT\nsolver.\n\n## Installing Boolector and this library\n\n1. Install the Boolector library from \u003chttps://github.com/Boolector/boolector\u003e.\n\n   On Arch Linux, you can install Boolector (and the Lingeling SAT solver)\n   with: `yaourt -S boolector-git`\n\n2. `cabal install boolector`\n\n## Example\n\nThis program (`test/API_Usage_Examples.hs`) shows basic API usage:\n\n```haskell\nimport qualified Boolector as B\n\nimport Control.Monad.IO.Class\nimport Control.Exception (assert)\nimport Control.Concurrent\n\nmain :: IO ()\nmain = do\n  -- Create new Boolector state with a 1000ms timeout\n  bs \u003c- B.newBoolectorState (Just 1000)\n  B.evalBoolector bs $ do\n    -- Create a 8-bit bit-vector\n    u8 \u003c- B.bitvecSort 8\n    \n    -- Create a constant value and two variables of sort u8\n    c \u003c- B.unsignedInt 35 u8\n    x \u003c- B.var u8 \"x\"\n    y \u003c- B.var u8 \"y\"\n\n    -- Perofmr some operations on the values\n    p  \u003c- B.mul x y\n    o  \u003c- B.umulo x y\n    no \u003c- B.not o\n    e  \u003c- B.eq c p\n\n    -- Make some assertions\n    B.assert =\u003c\u003c B.and no e\n    one \u003c- B.one u8\n    B.assert =\u003c\u003c B.ugt x one\n    B.assert =\u003c\u003c B.ugt y one\n\n    -- Dump the corresponding SMT Lib 2 to a file\n    B.dump B.DumpSMT2 \"dump_example.smt2\"\n\n    -- Check satisfiability\n    B.Sat \u003c- B.sat\n\n    -- Get model\n    mx \u003c- B.unsignedBvAssignment x\n    my \u003c- B.unsignedBvAssignment y\n    assert (mx == 7) $ return ()\n    assert (my == 5) $ return ()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplsyssec%2Fhaskell-boolector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplsyssec%2Fhaskell-boolector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplsyssec%2Fhaskell-boolector/lists"}