{"id":16390082,"url":"https://github.com/r2dev2/veribool","last_synced_at":"2025-03-26T16:15:08.875Z","repository":{"id":249609570,"uuid":"828068192","full_name":"r2dev2/veribool","owner":"r2dev2","description":"Verify properties of boolean expressions using a concise DSL.","archived":false,"fork":false,"pushed_at":"2024-07-22T07:31:50.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T08:18:46.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/r2dev2.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-13T03:22:20.000Z","updated_at":"2024-07-22T07:33:50.000Z","dependencies_parsed_at":"2024-07-22T07:46:57.118Z","dependency_job_id":null,"html_url":"https://github.com/r2dev2/veribool","commit_stats":null,"previous_names":["r2dev2/veribool"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r2dev2%2Fveribool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r2dev2%2Fveribool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r2dev2%2Fveribool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r2dev2%2Fveribool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r2dev2","download_url":"https://codeload.github.com/r2dev2/veribool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245689514,"owners_count":20656417,"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-10-11T04:34:54.784Z","updated_at":"2025-03-26T16:15:08.847Z","avatar_url":"https://github.com/r2dev2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VeriBool\n\nVerify properties of boolean expressions using a concise DSL.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./assets/logo.webp\" alt=\"logo\" /\u003e\n\u003c/p\u003e\n\n\u003e I _know_ you just want to press that button\n\n## Installation\n\n```shell\npython3 -m pip install veribool\n```\n\n## Usage\n\n```\n# directly compile the expression to a python lambda expression\n# add the -i/--interactive flag to drop into a python interpreter with\n# fn = \u003cthe boolean expression as a lambda\u003e\n$: veribool compile \"x'y' + x'z + xyz\"\nlambda x, y, z, **_kwargs: (((not x) and (not y)) or (((not x) and z) or (x and y and z)))\n\n# find a diverging input for two boolean expressions\n$: veribool diff \"x xnor (yz)\" \"x'y' + x'z + xyz\"\n[0, 1, 0] - True vs False\n\n# $? == 0 if expressions match\n$: veribool diff \"x xnor (yz)\" \"x'y' + x'z' + xyz\" \u0026\u0026 echo equal\nequal\n\n# generate truth table\n$: veribool truth \"x xnor (yz)\"\n[0, 0, 0] - True\n[0, 0, 1] - True\n[0, 1, 0] - True\n[0, 1, 1] - False\n[1, 0, 0] - False\n[1, 0, 1] - False\n[1, 1, 0] - False\n[1, 1, 1] - True\n```\n\n### DSL\n\nThis project implements a compiler for a boolean expression DSL closely modeling mathematical\nboolean algebra notation.\n\nRules:\n* each variable is 1 case-sensitive alphabetical character\n* parenthesis exist\n* `x'` is the complement of `x`\n* `xy` is the `and` of `x` and `y`\n* `x + y` is the `or` of `x` and `y`\n* `x ^ y` and `x xor y` are the `xor` of `x` and `y`\n* `x xnor y` is the `xnor` of `x` and `y`\n* order of operations is: `parenthesis`, `not`, `and` followed by the rest of the operators\n\n## Roadmap\n\n- [ ] use z3 as a backend\n- [ ] add some basic simplifications\n- [ ] output to verilog / other languages\n\n\n## Developers\n\nDeveloped by [Ronak Badhe](https://github.com/r2dev2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr2dev2%2Fveribool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr2dev2%2Fveribool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr2dev2%2Fveribool/lists"}