{"id":19768202,"url":"https://github.com/squareslab/batfix","last_synced_at":"2025-04-30T16:34:13.289Z","repository":{"id":167962333,"uuid":"643568780","full_name":"squaresLab/BatFix","owner":"squaresLab","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-22T21:55:21.000Z","size":15304,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T03:11:45.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/squaresLab.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-05-21T15:21:59.000Z","updated_at":"2024-08-23T11:57:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"f700a01c-7970-462e-9834-89f31a054f1b","html_url":"https://github.com/squaresLab/BatFix","commit_stats":null,"previous_names":["danieltrt/batfix","squareslab/batfix"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaresLab%2FBatFix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaresLab%2FBatFix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaresLab%2FBatFix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaresLab%2FBatFix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squaresLab","download_url":"https://codeload.github.com/squaresLab/BatFix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251742815,"owners_count":21636515,"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":[],"created_at":"2024-11-12T04:36:09.606Z","updated_at":"2025-04-30T16:34:08.258Z","avatar_url":"https://github.com/squaresLab.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BatFix - TOSEM24\n\n### Note: This replication package is a work in progress. If you need help running the tool, please open an issue\n\n\nThe src contains the code to run BatFix, including CMAKE with all dependencies\nnecessary to run the code. We will eventually provide a docker container and more precise\ninstructions on how to use BatFix and replicate our results.\n\nTo run BatFix compile the code:\n* cmake .\n\nThis should generate a binary named \"Gen\". This is the BatFix executable.\nBatFix takes as input three files. (1) The file containing the functions to be fixed,\nand sample inputs. (2) Control flow of the oracle program, (3) Execution trace of\nthe oracle program in a failing test case:\n\nExample usage:\n```bash\n./Gen\n  -f {buggy transpiled program}\n  -g {control flow graph of the source program}\n  -t {execution trace on a failing test case on the source program}\n```\n### CFG file format\n\n\nThe control-flow graphs files follow a custom format. Each file should be formatted as follows:\n\n\u003e Nodes \\\nnode number; node type; statement; line number; \\\nEdges \\\norigin node - 1; destination node\n\n* Example:\n\n\u003eNodes\\\n1;special;;;\\\n2;statement;return -(~foo_1);14;\\\n3;exit;;;\\\nEdges\\\n0;2;\\\n1;3;\\\n2;\n\n\n### Execution traces format\n\nThe execution traces follow the following format:\n\n\u003e Statement: {statement source code} \\\nLine: {line number} \\\nVar1 = {var1 content} \\\nVar2 = {var2 content}\n\n* Example:\n\n\u003e Statement: int len = N . length ( ) ; \\\nLine: 14 \\\nN = \"ZCoQhuM\" \\\n\\\nStatement: int l = ( len ) / 2 ; \\\nLine: 15 \\\nN = \"ZCoQhuM\" \\\nlen = 7 \\\n\\\nStatement: int count = 0 ; \\\nLine: 16 \\\nN = \"ZCoQhuM\" \\\nlen = 7 \\\nl = 3\n\n\nFor each model there's a folder containing all the buggy translations (separated by syntax\nand semantics as indicated in the paper). Each folder also contains the patched generated by BatFix for\nboth languages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquareslab%2Fbatfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquareslab%2Fbatfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquareslab%2Fbatfix/lists"}