{"id":39288689,"url":"https://github.com/meelgroup/arjun","last_synced_at":"2026-04-06T17:03:52.729Z","repository":{"id":51448841,"uuid":"206988318","full_name":"meelgroup/arjun","owner":"meelgroup","description":"CNF minimizer and minimal independent set minimizer","archived":false,"fork":false,"pushed_at":"2026-04-02T22:51:14.000Z","size":1839,"stargazers_count":26,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-04-03T04:51:42.419Z","etag":null,"topics":["cnf","dimacs-cnf","model-counting","simplifier"],"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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-07T15:33:27.000Z","updated_at":"2026-04-02T22:51:16.000Z","dependencies_parsed_at":"2023-02-14T01:00:46.968Z","dependency_job_id":"4ad6fcb7-b178-4a38-bce3-48a5e5cf891a","html_url":"https://github.com/meelgroup/arjun","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/meelgroup/arjun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meelgroup%2Farjun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meelgroup%2Farjun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meelgroup%2Farjun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meelgroup%2Farjun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meelgroup","download_url":"https://codeload.github.com/meelgroup/arjun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meelgroup%2Farjun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31481238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T14:34:32.243Z","status":"ssl_error","status_checked_at":"2026-04-06T14:34:31.723Z","response_time":112,"last_error":"SSL_read: 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","dimacs-cnf","model-counting","simplifier"],"created_at":"2026-01-18T01:14:11.150Z","updated_at":"2026-04-06T17:03:52.723Z","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![build](https://github.com/meelgroup/arjun/workflows/build/badge.svg)\n\n# Arjun\nA minimal independent set calculator and CNF minimizer that uses a combination\nof steps to simplify a CNF such that its count stays the same. Name is taken\nfrom the Hindu myth where [Arjun](https://en.wikipedia.org/wiki/Arjuna) is\nknown for being the \"one who concentrates the most\". This system is also used\nas a preprocessor for our tool\n[ApproxMC](https://github.com/meelgroup/ApproxMC) and should be used in front\nof [GANAK](https://github.com/meelgroup/ganak). For the paper, see\n[here](http://www.msoos.org/wordpress/wp-content/uploads/2022/08/arjun.pdf).\n\nNote that the simplification part of Arjun contains code from SharpSAT-td by\nTuukka Korhonen and Matti Jarvisalo, see [this\nPDF](https://raw.githubusercontent.com/Laakeri/sharpsat-td/main/description.pdf)\nand [this code](https://github.com/Laakeri/sharpsat-td) for details. Note that\ntreewidth-decomposition is _not_ part of Arjun.\n\n## How to Build\nIt is strongly recommended to not build, but to use the precompiled\nbinaries as in our [release](https://github.com/meelgroup/arjun/releases).\nThe second best thing to use is Nix. Simply [install\nnix](https://nixos.org/download/) and then:\n```shell\nnix shell github:meelgroup/arjun\n```\n\nThen you will have `arjun` binary available and ready to use.\n\n### Building from source\n\nArjun depends on [CaDiCaL](https://github.com/meelgroup/cadical),\n[CryptoMiniSat](https://github.com/meelgroup/cryptominisat),\n[SBVA](https://github.com/meelgroup/SBVA), and\n[treedecomp](https://github.com/meelgroup/treedecomp).\n\n**Automatic download and build (easiest):** if you do not specify where any\ndependency lives, CMake will automatically clone and build it inside the `deps/`\nsubdirectory of your build directory:\n\n```shell\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake -j8\n```\n\n**Using pre-built dependencies:** pass `-D\u003cdep\u003e_DIR=\u003cpath\u003e` for any dependency\nyou have already built. CMake will then use that copy instead of fetching it:\n\n```shell\nmkdir build \u0026\u0026 cd build\ncmake .. \\\n    -Dcadical_DIR=/path/to/cadical/build \\\n    -Dcryptominisat5_DIR=/path/to/cryptominisat/build \\\n    -Dsbva_DIR=/path/to/sbva/build \\\n    -Dtreedecomp_DIR=/path/to/treedecomp/build\nmake -j8\n```\n\nYou can mix and match: omit any `-D\u003cdep\u003e_DIR` flag and that dependency will be\nfetched and built automatically.\n\nFor CaDiCaL you can also set `-Dcadical_SRC_DIR=\u003cpath\u003e` to point to the\nCaDiCaL source directory (needed for `cadical.hpp`) if it differs from\n`\u003ccadical_DIR\u003e/../src`.\n\n### Building statically\n\nTo build a static binary, you first need to build GMP with static library support:\n\n```shell\nwget https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz\ntar xf gmp-6.3.0.tar.xz\ncd gmp-6.3.0\n./configure --enable-static --enable-cxx --enable-shared --with-pic\nmake -j8\nsudo make install\ncd ..\n```\n\nThen point CMake to the installed GMP static libraries (note: use `/usr/local/lib/`,\nnot a custom build directory, as those may be compiled for the wrong architecture):\n\n```shell\nmkdir build \u0026\u0026 cd build\ncmake -DBUILD_SHARED_LIBS=OFF \\\n    -DGMPXX_LIBRARY=/usr/local/lib/libgmpxx.a \\\n    -DGMP_INCLUDE_DIR=/usr/local/include \\\n    ..\nmake -j8\n```\n\n## How to Use\nRun it on your instance and it will give you a reduced independent set:\n\n```plain\n$ ./arjun input.cnf output.cnf\nc [arjun] original sampling set size: 500\nc ind 1 4 5 20 31 0\n[...]\nc [arjun] Done dumping. T: 1.0406\n```\nThis means that your input independent set of your input formula `input.cnf`,\nwhich had a size of 500 has been reduced to 5, which is ony 1% of the original\nset. The simplified formula with the smaller independent set has been output to\n`output.cnf`. The final simplified will contain a line such as:\n```plain\nc MUST MULTIPLY BY 1024\n```\n\nThis means that the final count of the CNF must be multiplied by 2^10 (i.e.\n1024) in order to get the correct count. Note that if you forget to multiply,\nthe count will be wrong. So you must multiply.\n\n## Only extracting independent set\nIn case you are only interested in a reduced independent set, use:\n```plain\n$ ./arjun input.cnf\nc [arjun] original sampling set size: 500\nc ind 1 4 5 20 31 0\n```\n\nThis will not write an output file, but only display the reduced independent set.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeelgroup%2Farjun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeelgroup%2Farjun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeelgroup%2Farjun/lists"}