{"id":18446941,"url":"https://github.com/nmeum/qsym","last_synced_at":"2025-10-09T20:46:11.635Z","repository":{"id":164774122,"uuid":"640204041","full_name":"nmeum/qsym","owner":"nmeum","description":"A symbolic executor for the QBE intermediate language","archived":false,"fork":false,"pushed_at":"2023-06-01T22:00:44.000Z","size":110,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T20:46:11.181Z","etag":null,"topics":["compiler","qbe","symbolic-execution","testing-tools","z3"],"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/nmeum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-05-13T10:21:41.000Z","updated_at":"2024-10-22T00:55:17.000Z","dependencies_parsed_at":"2023-07-20T18:32:23.774Z","dependency_job_id":null,"html_url":"https://github.com/nmeum/qsym","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nmeum/qsym","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmeum%2Fqsym","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmeum%2Fqsym/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmeum%2Fqsym/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmeum%2Fqsym/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nmeum","download_url":"https://codeload.github.com/nmeum/qsym/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmeum%2Fqsym/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001984,"owners_count":26083259,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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":["compiler","qbe","symbolic-execution","testing-tools","z3"],"created_at":"2024-11-06T07:11:25.337Z","updated_at":"2025-10-09T20:46:11.605Z","avatar_url":"https://github.com/nmeum.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Symbolic execution for the QBE IL\n\nqsym is a [symbolic execution][symex wikipedia] tool for the [QBE][qbe web] intermediate language.\nThe tool leverages [Z3][z3 web] to execute QBE IL based on [SMT bitvectors][smt wikipedia].\nThis enables qsym to reason about conditional jumps in the QBE IL, exploring both branches (if feasible under the current constraints).\n\n### Status\n\nqsym is in very early stages of development and presently mostly a proof-of-concept.\nThe underlying parser for the QBE IL ([qbe-reader][qbe-reader github]) is also not yet complete, hence it does not support every syntactically valid QBE IL input yet.\nFurthermore, it is assumed that input programs are well typed, e.g. no type checks are performed for instruction arguments.\nSimple programs generated using a QBE frontend (e.g. [cproc][cproc repo]) can already be explored.\n\n### Installation\n\nClone the repository and run the following command:\n\n    $ cargo install --path .\n\n### Usage Example\n\nPresently, qsym treats the parameters of a selected function as unconstrained symbolic and executes this function.\nConsider the following example:\n\n    $ cat input.qbe\n    function w $main(w %a) {\n    @start\n            %a =w add 0, %a\n            jnz %a, @end1, @end2\n    @end1\n            %exit =w add 0, 1\n            hlt\n    @end2\n            %exit =w add 0, 2\n            hlt\n    }\n    $ qsym input.qbe main\n    [jnz] Exploring path for label 'end1'\n    Halting executing\n    Local variables:\n    \ta = |main:a|\n    \texit = #x00000001\n    Symbolic variable values:\n    \tmain:a -\u003e #x00000002\n\n    [jnz] Exploring path for label 'end2'\n    Halting executing\n    Local variables:\n    \ta = |main:a|\n    \texit = #x00000002\n    Symbolic variable values:\n    \tmain:a -\u003e #x00000000\n\nFor the provided example program, qsym discovers two possible execution paths through the function `main`.\nIn the first execution path the symbolic variable `%a` is zero, in the other it is non-zero.\n\n### License\n\nThis program is free software: you can redistribute it and/or modify it\nunder the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or (at\nyour option) any later version.\n\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\nGeneral Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program. If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\n[qbe web]: https://c9x.me/compile/\n[symex wikipedia]: https://en.wikipedia.org/wiki/Symbolic_execution\n[z3 web]: https://github.com/Z3Prover/z3\n[smt wikipedia]: https://en.wikipedia.org/wiki/Satisfiability_modulo_theories\n[qbe-reader github]: https://github.com/nmeum/qbe-reader\n[cproc repo]: https://sr.ht/~mcf/cproc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmeum%2Fqsym","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmeum%2Fqsym","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmeum%2Fqsym/lists"}