{"id":39288041,"url":"https://github.com/meelgroup/gaussmaxhs","last_synced_at":"2026-01-18T01:12:57.418Z","repository":{"id":91142402,"uuid":"128038486","full_name":"meelgroup/gaussmaxhs","owner":"meelgroup","description":"GaussMaxHS, a CNF+XOR MaxSAT solver","archived":false,"fork":false,"pushed_at":"2024-01-23T20:10:28.000Z","size":314,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-26T12:56:07.930Z","etag":null,"topics":["cnf","gauss-elimination","gauss-jordan","maxsat","xor"],"latest_commit_sha":null,"homepage":"","language":"C++","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/meelgroup.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}},"created_at":"2018-04-04T09:19:06.000Z","updated_at":"2024-05-07T05:08:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"1b126be4-1c8e-4a50-a44d-8fced042f2e4","html_url":"https://github.com/meelgroup/gaussmaxhs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meelgroup/gaussmaxhs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meelgroup%2Fgaussmaxhs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meelgroup%2Fgaussmaxhs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meelgroup%2Fgaussmaxhs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meelgroup%2Fgaussmaxhs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meelgroup","download_url":"https://codeload.github.com/meelgroup/gaussmaxhs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meelgroup%2Fgaussmaxhs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28525783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"ssl_error","status_checked_at":"2026-01-18T00:39:39.467Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cnf","gauss-elimination","gauss-jordan","maxsat","xor"],"created_at":"2026-01-18T01:12:55.047Z","updated_at":"2026-01-18T01:12:57.403Z","avatar_url":"https://github.com/meelgroup.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# GaussMaxHS, a CNF-XOR MaxSAT solver based on MaxHS\n\nThe code uses [MiniSat](https://github.com/niklasso/minisat) as the SAT solver, [CPLEX](https://community.ibm.com/community/user/datascience/blogs/xavier-nodet1/2020/07/09/cplex-free-for-students?mhsrc=ibmsearch_a\u0026mhq=cplex) from IBM as the MIPS solver, [MaxHS](https://github.com/fbacchus/MaxHS) for MaxSAT solving, and a version of Gauss-Jordan elimination to perform CDCL(T). For our research paper PDF, see [here](https://proceedings.kr.org/2021/55/kr2021-0055-soos-et-al.pdf), published at Knowledge Representation and Reasoning (KR) 2021 ([Bibtex](https://proceedings.kr.org/2021/55/bibtex/))\n\n\n## Building and installing\n### Get CPLEX\n\nYou need the CPLEX static libraries to link against. CPLEX is\navailable from IBM under their academic Initiative program. It is\nfree to faculty members and graduate students in academia, see [here](https://community.ibm.com/community/user/datascience/blogs/xavier-nodet1/2020/07/09/cplex-free-for-students?mhsrc=ibmsearch_a\u0026mhq=cplex).\n\nYou can apply for their academic initiative program and then then you\ncan download CPLEX and other IBM software.\n\n### Configure and Build\nUse `make config VAR=defn` or edit `config.mk` directly. Required variable settings:\n\n- Linux: `LINUX_CPLEXLIBDIR=\u003cpath to CPLEX library\u003e` the directory on your linux system that contains libcplex.a and libilocplex.a (the makefile does a static build). `LINUX_CPLEXINCDIR=\u003cpath to CPLEX headers\u003e`\n- MacOS: `DARWIN_CPLEXLIBDIR=\u003cpath to CPLEX library\u003e` the directory on your MAC system that contains libcplex.a and libilocplex.a (the makefile does a static build), `DARWIN_CPLEXINCDIR=\u003cpath to CPLEX headers\u003e`\n\n\nAfter the above configuration, you can:\n```\nmake install\n```\n\n## How to Run\n\nThe system expects a CNF-XOR input, which is the same as the [WDIMACS](http://www.maxhs.org/docs/wdimacs.html) format with the extension that you can add XOR constraints just like with [CryptoMiniSat](https://github.com/msoos/cryptominisat), and the weight must be provided after the 'x'. Note that all XOR constraints must be hard constraints. Furthermore, XOR constraints must be at least 3-long, as 2-long XORs are trivial to write in CNF as two binary constraints.\n\nFor example, let's take the following input file:\n\n```\np wcnf 4 6 10\n5 1 2 -3 0\n5 1 -2 3 0\n5 -1 2 3 0\n5 -1 -2 -3 0\nx 10 1 2 3 0\nx 10 -1 3 4 0\n```\n\nThis file contains four variables and six constraints, and promises to give\nweights with a hard constraint having a weight of 10 (hence the header `p wcnf\n4 6 10`). The first four constraints say that `v1 or v2 or NOT v3 = true`,\n`v1 or NOT v2 or v3 = true`, etc. all being soft constraint with a\nweight of 5. The last two lines say that `v1 XOR x2 = true` and\n`v1 XOR v3 XOR v4 = false`, both of which have a\nweight of 10, and are hard constraints.\n\nWhen you run the tool on the problem above, you get the following output:\n\n```\ngit clone https://github.com/meelgroup/gaussmaxhs\ncd gaussmaxhs\nmake\ncd build/bin/release\n./maxhs input.wcnf\n[...]\no 5\ns OPTIMUM FOUND\nv -1 -2 3 4\n[...]\n```\n\nThis indicates that the lowest cost has been found, and it's the solution `v1=false, v2=false, v3=true, v4=true`. The cost of this solution is 5, because one of the soft constraints had to be violated, as together they clash with the first XOR constraint.\n\n\n## Generating Spin Glass and Network Reliability problems\nYou will find `generate-netrel.sh` and `generate-spin.sh` problem generators under the default binary location `build/release/bin`. You can run these scripts to generate example [Spin Glass](https://cs.stanford.edu/~ermon/papers/rademacher-aaai2018.pdf) and [Network Reliability problems](https://www.comp.nus.edu.sg/~meel/Papers/AAAI17.pdf) for you.\n\nTo run the `generate-netrel.sh` script, you will need to extract the files from `build/release/bin/network-reliability/net-rel.tar.gz` first. The files should all be extracted under `build/release/bin/network-reliability/`, e.g. one file should be `build/release/bin/network-reliability/Net27_90_22_count_118.cnf`.\n\n\n## Fuzzing\nYou can find various fuzzers for the GaussMaxHS system under `build/release/bin`, the default binary location. You can run `fuzz.sh` to fuzz the system against MaxHS without Gauss-Jordan elimination. While this fuzzing is incomplete, it should find most bugs. You will need [CryptoMiniSat5](https;//github.com/msoos/cryptominisat) installed, as the script uses CryptoMiniSat to check for errors with GJE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeelgroup%2Fgaussmaxhs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeelgroup%2Fgaussmaxhs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeelgroup%2Fgaussmaxhs/lists"}