{"id":13749351,"url":"https://github.com/alegnani/verifactory","last_synced_at":"2026-03-02T22:36:19.719Z","repository":{"id":200045356,"uuid":"681546040","full_name":"alegnani/verifactory","owner":"alegnani","description":"A verifier for Factorio blueprints, enabling one to automatically check logical properties","archived":false,"fork":false,"pushed_at":"2024-06-13T11:05:45.000Z","size":2541,"stargazers_count":22,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-03T07:03:18.458Z","etag":null,"topics":["factorio","rust","sat","verifier"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alegnani.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":"2023-08-22T08:45:34.000Z","updated_at":"2024-08-03T07:03:28.472Z","dependencies_parsed_at":"2023-11-07T03:24:26.311Z","dependency_job_id":"3689f888-235d-40a1-97e0-a580f0498213","html_url":"https://github.com/alegnani/verifactory","commit_stats":null,"previous_names":["alegnani/factorio_verify","alegnani/verifactory"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alegnani%2Fverifactory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alegnani%2Fverifactory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alegnani%2Fverifactory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alegnani%2Fverifactory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alegnani","download_url":"https://codeload.github.com/alegnani/verifactory/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224863108,"owners_count":17382279,"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":["factorio","rust","sat","verifier"],"created_at":"2024-08-03T07:00:59.903Z","updated_at":"2026-03-02T22:36:14.691Z","avatar_url":"https://github.com/alegnani.png","language":"Rust","funding_links":[],"categories":["Unclassified"],"sub_categories":["Libraries"],"readme":"# VeriFactory\n![](teaser.png)\n\nVeriFactory is a verifier for Factorio blueprints, enabling you to automatically check logical properties on a blueprint.\nCurrently this is limited to checking whether or not a belt-balancer works and if the inputs get all drained the same, leading to no imbalances.\n\n## How it works\n - A blueprint is loaded via **File \u003e Open blueprint**, **File \u003e Open blueprint file** or by pasting with the `Ctrl+V` shortcut.\n - Automatically added inputs/outputs should be removed accordingly (Every belt or splitter ending or starting from nothing gets flagged as input/output).\n - Every entity of the blueprint is then transformed into one or more nodes in a graph (using an intermediate representation).\n - The graph is simplified and the throughputs of the different edges are minimized as much as possible.\n - Using a SAT solver, like z3, the graph is turned into a series of logical formulas and constraints.\n - These constraints can then be used to prove or disprove certain logical properties.\n\n## Performance\n\nAlthough no optimizations have been made the verifier is extremely performant. This is due to the fact that the verifier does not need to try all the combinations of inputs and simulate the actual blueprint, relying instead on the resolution of logical formulas using a SAT solver.\n\nTake for example the following [64x64 belt balancer](https://fbe.teoxoy.com/?source=https://www.factorio.school/api/blueprintData/322abb92820177a1d15d3d7dea13353bae52a723/position/14). To load and verify both belt-balancing and equal-drain properties it takes less then 1 second! With any other tool this would take considerably longer.\n\n\n## Features and Todos\n\n - Standard properties:\n   - [x] Belt balancing\n   - [x] Equal input drain\n   - [x] Throughput unlimited\n   - [x] Universal balancer\n - [x] Counter example generation \n - [ ] Correct colors for the different belts\n - [ ] Find a nice way to visualize or export a counter example\n - [ ] Resizable and movable canvas\n - [ ] Support for dual-lane belts\n - [ ] Resizable and movable canvas\n - [ ] Support for inserters and assemblers\n - [ ] Custom language to express arbitrary properties\n - [ ] DOCS!\n\n## Installation\n\nThe latest version of the program can be found [here](https://github.com/alegnani/verifactory/releases) for both Windows and Linux. \nThis option ships VeriFactory bundled with z3.\n\n### Building from source\n\n`VeriFactory` can be compiled either with `z3` bundled with it or needing a valid installation of it on the system. For Windows it is recommended to go for the bundled version.\n\n#### Building the standalone version\n\nTo build: `cargo build --release`. To run: `cargo run --release`.\nExecutable can be found in `target/release`.\n\n#### Building the bundled version\nTo build: `cargo build --release --features build_z3`. To run: `cargo run --release --features --build_z3`.\nExecutable can be found in `target/release`.\n\n## Contributing\n\n\u003e **Warning!**\n\u003e The project is still in a very early stage, thus lots of design choices are still open and the code quality is very low\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Note that documentation is non-existant and the design document is mostly incomplete.\nBug reports are greatly appreciated. :)\n\n## Design Document\n\nMore information about how the project is structured can be found under this [link](design_doc/design_doc.md).\nThis includes the design document specifying how the underlying conversion from Factorio blueprints to the z3 model works.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falegnani%2Fverifactory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falegnani%2Fverifactory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falegnani%2Fverifactory/lists"}