{"id":27942706,"url":"https://github.com/shovon/grammar-infer","last_synced_at":"2026-04-27T11:31:46.782Z","repository":{"id":146739914,"uuid":"98217019","full_name":"shovon/grammar-infer","owner":"shovon","description":"Infer syntactic context-free grammar of an application's input","archived":false,"fork":false,"pushed_at":"2017-07-27T00:41:19.000Z","size":316,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T19:40:36.988Z","etag":null,"topics":["context-free-grammar","grammar","llvm"],"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/shovon.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":"2017-07-24T17:31:56.000Z","updated_at":"2021-09-09T17:09:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"3efcdeb0-a3c9-4bb9-8cd2-93d95365fc02","html_url":"https://github.com/shovon/grammar-infer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shovon/grammar-infer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shovon%2Fgrammar-infer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shovon%2Fgrammar-infer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shovon%2Fgrammar-infer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shovon%2Fgrammar-infer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shovon","download_url":"https://codeload.github.com/shovon/grammar-infer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shovon%2Fgrammar-infer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":["context-free-grammar","grammar","llvm"],"created_at":"2025-05-07T11:57:47.072Z","updated_at":"2026-04-27T11:31:46.777Z","avatar_url":"https://github.com/shovon.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Syntactic grammar inference\n\n[Read the paper](https://github.com/shovon/grammar-infer/blob/master/paper.pdf).\n\n## Usage\n\n**Note**: only tested (and most likely only works on) LLVM 3.9.x.\n\n```\n# Profiling\nclang -g -c -emit-llvm $SOURCE_FILE.c -o $OUTPUT.bc\n$ABSOLUTE_PATH_TO_GRAMMER_INFER_BUILD $OUTPUT.bc -o $BINARY\n\n# Execute the profiled binary\n`realpath $BINARY` # plus some commands for your program to analyze\n\n# The trace of the profiled binary should now be in `trace.txt`\n\n# Analyzing trace\n$ABSOLUTE_PATH_TO_TRACE_ANALYZER -t $PATH_TO/trace.txt -c $CSV.csv \\\n  -g $GRAMMAR.txt\n```\n\n## Building\n\n```shell\n# Profiler\nmkdir grammar_infer_build\ncd grammar_infer_build\ncmake -DLLVM_DIR=\u003cabsolute/to/LLVM\u003e/lib/cmake/llvm \\\n    \u003cpath/to\u003e/grammar-infer/grammar-infer\nmake\n\n# Trace analyzer\nmkdir trace_build\ncd trace_build\ncmake \u003cpath/to\u003e/trace-analyzer\nmake\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshovon%2Fgrammar-infer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshovon%2Fgrammar-infer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshovon%2Fgrammar-infer/lists"}