{"id":22822999,"url":"https://github.com/haskell-github-trust/smt2-parser","last_synced_at":"2026-05-29T08:03:21.579Z","repository":{"id":56878289,"uuid":"240431887","full_name":"haskell-github-trust/smt2-parser","owner":"haskell-github-trust","description":"Parse smt2 in Haskell","archived":false,"fork":false,"pushed_at":"2022-10-08T09:29:11.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-20T03:16:59.334Z","etag":null,"topics":["haskell","parser","smt","smt-lib","smt2"],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/smt2-parser","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haskell-github-trust.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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":"2020-02-14T05:01:10.000Z","updated_at":"2024-02-05T17:47:58.000Z","dependencies_parsed_at":"2022-08-20T11:40:29.283Z","dependency_job_id":null,"html_url":"https://github.com/haskell-github-trust/smt2-parser","commit_stats":null,"previous_names":["crvdgc/smt2-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/haskell-github-trust/smt2-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-github-trust%2Fsmt2-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-github-trust%2Fsmt2-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-github-trust%2Fsmt2-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-github-trust%2Fsmt2-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haskell-github-trust","download_url":"https://codeload.github.com/haskell-github-trust/smt2-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-github-trust%2Fsmt2-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33642318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["haskell","parser","smt","smt-lib","smt2"],"created_at":"2024-12-12T16:13:56.422Z","updated_at":"2026-05-29T08:03:21.563Z","avatar_url":"https://github.com/haskell-github-trust.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smt2-parser\n\nA Haskell parser for [SMT-LIB](http://smtlib.cs.uiowa.edu/) version 2.6 [^1]. [The language reference](http://smtlib.cs.uiowa.edu/language.shtml) is available in [pdf](http://smtlib.cs.uiowa.edu/papers/smt-lib-reference-v2.6-r2017-07-18.pdf).\n\n## Usage\n\nRun a parser with an input string:\n\n```hs\n-- parseStringEof :: Parser a -\u003e T.Text -\u003e Either ParseError a\n\nparseStringEof numeral \"0\" === Right (\"0\" :: Numeral)\nparseStringEof identifier \"(_ BitVec 32)\" === Right (IdIndexed (\"BitVec\" :: Symbol) (fromList [IxNumeral \"32\"]))\n```\n\nRun a parser from a file string, possibly leading and trailing by spaces and having comments\n\n```hs\n-- parseFileMsg :: Parser a -\u003e T.Text -\u003e Either T.Text a\n\u003e\u003e\u003e parseFileMsg script (T.pack \"(set-logic HORN)\\n\\n(declare-fun |sum$unknown:2|\\n  ( Int Int ) Bool\\n)\\n(assert\\n  (forall ( (|$V-reftype:10| Int) (|$alpha-1:n| Int) (|$knormal:1| Int) (|$knormal:2| Int) (|$knormal:3| Int) )\\n    (=\u003e\\n      ( and (= |$knormal:2| (- |$alpha-1:n| 1)) (= (not (= 0 |$knormal:1|)) (\u003c= |$alpha-1:n| 0)) (= |$V-reftype:10| (+ |$alpha-1:n| |$knormal:3|)) (not (not (= 0 |$knormal:1|))) (|sum$unknown:2| |$knormal:3| |$knormal:2|) true )\\n      (|sum$unknown:2| |$V-reftype:10| |$alpha-1:n|)\\n    )\\n  )\\n)(check-sat)\")\n\nRight [ SetLogic \"HORN\"\n      , DeclareFun \"sum$unknown:2\" [SortSymbol (IdSymbol \"Int\"),...] (SortSymbol (IdSymbol \"Bool\"))\n      , Assert (TermForall ...)\n      , CheckSat\n      ]\n```\n\n## Known Issue\n\n`removeComment` may cause performance issue. Use `parseCommentFreeFileMsg` on a preprocessed comment-free file instead.\n\n[^1]: Barrett, Clarke, Pascal Fontaine and Cesare Tinelli. The SMT-LIB Standard: Version 2.6. Technical Report BarFT-RR-17, Department of Computer Science, The University of Iowa, 2017. Available at www.SMT-LIB.org\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskell-github-trust%2Fsmt2-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaskell-github-trust%2Fsmt2-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskell-github-trust%2Fsmt2-parser/lists"}