{"id":29555785,"url":"https://github.com/catoverflow/robdd","last_synced_at":"2025-07-18T09:30:33.701Z","repository":{"id":46825154,"uuid":"505040562","full_name":"Catoverflow/ROBDD","owner":"Catoverflow","description":"All-in-one proposition to ROBDD constructor, featured by LALR parsing","archived":false,"fork":false,"pushed_at":"2025-04-01T22:31:03.000Z","size":247,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T23:28:55.544Z","etag":null,"topics":["robdd","sat-solver"],"latest_commit_sha":null,"homepage":"","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/Catoverflow.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":"2022-06-19T07:26:10.000Z","updated_at":"2025-04-01T22:31:06.000Z","dependencies_parsed_at":"2022-09-23T05:13:40.122Z","dependency_job_id":null,"html_url":"https://github.com/Catoverflow/ROBDD","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Catoverflow/ROBDD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catoverflow%2FROBDD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catoverflow%2FROBDD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catoverflow%2FROBDD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catoverflow%2FROBDD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Catoverflow","download_url":"https://codeload.github.com/Catoverflow/ROBDD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catoverflow%2FROBDD/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265733673,"owners_count":23819390,"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":["robdd","sat-solver"],"created_at":"2025-07-18T09:30:32.817Z","updated_at":"2025-07-18T09:30:33.691Z","avatar_url":"https://github.com/Catoverflow.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ROBDD Constructor\n\n**An ROBDD constructor and SAT/unSAT solver** written in C++, featured by **LALR** parsing\n\nImplemented as class project, shared with love\n\n\u003cimg src=\"./example.svg\"\u003e\n\n## Requirement\n\n`flex`, `bison` for ROBDD frontend, `graphviz` for image generating.\n\n~~~~mermaid\nflowchart LR\n    subgraph Frontend\n    Flex--\"lexical symbol\"--\u003eBison\n    end\n    subgraph Backend\n    ROBDD\n    end\n    subgraph Visualization\n    Graphviz\n    end\n    Bison\u003c--\"construct \u0026 reduce\\nby LALR\"--\u003eROBDD\n    ROBDD--\"format \u0026\\noutput\"--\u003eGraphviz\n~~~~\n\n## Usage\n\n`make ROBDD` compile to binary first.\n\n~~~~\nUsage: ROBDD [-SscAa] [-o filename]\n -S           - Check if the proposition is All-SAT\n -s           - Check if the proposition is Any-SAT\n -A           - Construct ROBDD under fixed ASCII order,\n                smallest variable at top\n -a (default) - Construct ROBDD under parsing order\n -c           - Return SAT count for the proposition\n -t           - Return ROBDD construction time cost\n -o filename  - Print ROBDD to filename.svg\n~~~~\n\n*Note: `-a` is a heuristic approach, `-A` may result in over-sized ROBDD*\n\nInput your proposition then.\n\n## Syntax\n\n### Variable\n\nFor BDD, we take every variables as bool variables, which means they only take 0 or 1 as assignment. Each variable must start with letter (uppercase or lowercase), and can be a mixture of digits of letter, as regex `[a-zA-Z]+[0-9]*` suggests.\n\n### Operator\n\n| Symbol | Corresponding operation | Example                        | Priority |\n| ------ | ----------------------- | ------------------------------ | -------- |\n| `~`    | $\\neg$ not              | `~a` for $\\neg a$              | 1        |\n| `\u0026`    | $\\wedge$ and            | `a\u0026b` for $a\\wedge b$          | 2        |\n| `\\|`   | $\\vee$ or               | `a\\|b` for $a\\wedge b$         | 2        |\n| `=`    | $\\leftrightarrow$ xnor  | `a=b` for $a\\leftrightarrow b$ | 2        |\n| `!=`   | $\\neq$ xor              | `a!=b` for $a\\neq b$           | 2        |\n| `-\u003e`   | $\\rightarrow$ infer     | `a-\u003eb` for $a\\rightarrow b$    | 3        |\n| `()`   | pair of parentheses     | `(some formula here)`          | 0        |\n\nSmaller number means higher priority.\n\nA valid proposition for example: `Aa\u0026B-\u003eC0|h`\n\n## N Queens\n\nThere is a script  `n_queens_test/nqueens.py`, you can use its output as `ROBDD`'s input to test its correctness:\n\n~~~~bash\npython n_queens_test/nqueens.py 6 | ./ROBDD -Ssc\n~~~~\n\nOr print the output, an example is as below, for n \u003e 6, visualization will take a long time.\n\n__6 queens__\n\n\u003cimg src=\"n_queens_test/6-queens.svg\"\u003e\n\n## Todo\n\n- Short Term\n\n​\tMove print module to visitor pattern, uncouple ROBDD from extensions\n\n- Long Term\n\n​\tUse Bison C++ APIs, introduce `std::shared_ptr` for auto pruning\n\n## Credits\n\nHenrik Reif Andersen, who wrote *[An Introduction to Binary Decision Diagrams](https://www.cs.utexas.edu/~isil/cs389L/bdd.pdf)* and it's my major reference.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatoverflow%2Frobdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatoverflow%2Frobdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatoverflow%2Frobdd/lists"}