{"id":29195853,"url":"https://github.com/komorra/satstreams","last_synced_at":"2026-05-18T04:01:28.493Z","repository":{"id":302303771,"uuid":"1011935265","full_name":"komorra/SATStreams","owner":"komorra","description":"SATStreams SAT solving library and CLI solver","archived":false,"fork":false,"pushed_at":"2025-07-03T16:42:51.000Z","size":958,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-20T03:00:33.875Z","etag":null,"topics":["boolean-algebra","boolean-logic","cli","cnf","console-app","console-application","csharp","dotnet","library","satisfiability","satisfiability-solver","satsolver","z3"],"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/komorra.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}},"created_at":"2025-07-01T14:54:05.000Z","updated_at":"2025-07-03T16:42:54.000Z","dependencies_parsed_at":"2025-07-01T17:04:01.299Z","dependency_job_id":null,"html_url":"https://github.com/komorra/SATStreams","commit_stats":null,"previous_names":["komorra/satstreams"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/komorra/SATStreams","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komorra%2FSATStreams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komorra%2FSATStreams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komorra%2FSATStreams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komorra%2FSATStreams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/komorra","download_url":"https://codeload.github.com/komorra/SATStreams/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komorra%2FSATStreams/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33164672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"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":["boolean-algebra","boolean-logic","cli","cnf","console-app","console-application","csharp","dotnet","library","satisfiability","satisfiability-solver","satsolver","z3"],"created_at":"2025-07-02T05:06:30.443Z","updated_at":"2026-05-18T04:01:28.474Z","avatar_url":"https://github.com/komorra.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SATStreams\n\n![Screenshot from running CLI tool](github/satstreams.png)\n\n## Overview\n\n**SATStreams** is a concurrent SAT‑solving library and command‑line solver written in modern C# (.NET 8). It treats each partial assignment as a lightweight **stream** and explores them in parallel while leveraging the **Z3** SMT back‑end for fast satisfiable/unsatisfiable checks. The project provides both a reusable library and a ready‑to‑use CLI tool.\n\n## Key Features\n\n- **DIMACS CNF parser** – load standard `.cnf` files with a single call.\n- **Multi‑threaded search** using independent *streams* that merge, branch, and prune dynamically to accelerate convergence.\n- **Incremental unit propagation** and fast Boolean constraint propagation implemented in pure C#.\n- **Integration with Z3** for efficient consistency checking of candidate assignments.\n- **Checkpointing** – the solver automatically writes checkpoints every 5 min and at exit, so long‑running jobs can be resumed later.\n- **Optional visualisation server** (`localhost:8888`) that exposes solver state as JSON and launches an HTML dashboard.\n- **Colourised progress logging** with deletions, merges, and branching stats.\n- **MIT‑licensed** and cross‑platform (.NET 8).\n\n## Repository Layout\n\n| Path                | Description                                         |\n| ------------------- | --------------------------------------------------- |\n| `SATStreams/`       | Core library (CNF parser, `SATSolver`, utilities).  |\n| `SATStreamsSolver/` | CLI front‑end using **clipr** for argument parsing. |\n| `HTML/`             | Single‑page dashboard for real‑time visualisation.  |\n| `checkpoints/`      | Created at runtime to store solver states.          |\n\n## Building\n\n```bash\n# Clone \u0026 restore NuGet packages\ngit clone https://github.com/komorra/SATStreams.git\ncd SATStreams\n\n# Build everything (Release)\ndotnet build -c Release\n```\n\n## Running the CLI Solver\n\n```bash\n# Solve a DIMACS file in place\ndotnet run --project SATStreamsSolver -- sample.cnf\n```\n\nWhile running you will see colourised logs and a progress bar. If `--visual` is enabled (default), your browser opens the dashboard.\n\n### CLI Options\n\n| Flag               | Default      | Purpose                                   |\n| ------------------ | ------------ | ----------------------------------------- |\n| `-i, --input`      | *(required)* | Path to `.cnf` file.                      |\n| `--no-checkpoints` | false        | Disable writing checkpoints.              |\n| `--no-visual`      | false        | Do not start the visualisation server.    |\n| `--fast-threads`   | 4            | Count of fast Z3 threads (short timeout). |\n| `--slow-threads`   | 1            | Count of slow Z3 threads (long timeout).  |\n\n## Using the Library\n\n```csharp\nvar cnf = Utils.FromFile(\"samples/uf20-01.cnf\");\nvar solver = new SATSolver(cnf)\n{\n    HostVisualisationServer = false,\n    UseCheckpoints = true\n};\nvar solution = solver.Solve();\nif (solution != null)\n{\n    Console.WriteLine($\"Solved! {string.Join(\" \", solution)}\");\n}\n```\n\n## Checkpoint Format\n\nEach checkpoint directory is named after the SHA‑256 hash of the input CNF. It contains one `.cnf` file per active stream, a `solution.cnf` with the currently agreed literals, and an `activeids.txt` listing still‑alive stream IDs.\n\n## Contributing\n\n1. **Fork** the repo and create a feature branch.\n2. Write unit or integration tests where possible.\n3. Follow the existing code style (nullable enabled, `var` when obvious).\n4. Submit a pull request – all PRs are welcome!\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n---\n\nMade with ❤️ by Komorra\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomorra%2Fsatstreams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkomorra%2Fsatstreams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomorra%2Fsatstreams/lists"}