{"id":27429989,"url":"https://github.com/caballa/covenant","last_synced_at":"2025-04-14T14:30:00.274Z","repository":{"id":28654423,"uuid":"32173807","full_name":"caballa/covenant","owner":"caballa","description":"A Tool for Intersecting Context-Free Grammars","archived":false,"fork":false,"pushed_at":"2017-12-19T06:01:15.000Z","size":637,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-02-28T18:15:19.154Z","etag":null,"topics":["concurrent-verification","context-free-grammar","intersection","regular-languages"],"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/caballa.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}},"created_at":"2015-03-13T18:33:30.000Z","updated_at":"2022-02-24T01:23:28.000Z","dependencies_parsed_at":"2022-09-04T07:40:51.325Z","dependency_job_id":null,"html_url":"https://github.com/caballa/covenant","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caballa%2Fcovenant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caballa%2Fcovenant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caballa%2Fcovenant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caballa%2Fcovenant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caballa","download_url":"https://codeload.github.com/caballa/covenant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248896844,"owners_count":21179497,"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":["concurrent-verification","context-free-grammar","intersection","regular-languages"],"created_at":"2025-04-14T14:29:59.593Z","updated_at":"2025-04-14T14:30:00.224Z","avatar_url":"https://github.com/caballa.png","language":"C++","readme":"# Covenant #\r\n\r\nIntersection of Context-Free Languages\r\n\r\n## About ##\r\n\r\nCovenant is a tool for testing emptiness of a set of context free\r\nlanguages (CFLs). Since this problem is undecidable, Covenant\r\nimplements a CEGAR-based schema which might not terminate. Covenant\r\nimplements several refinement techniques. One of these refinements is\r\ncomplete if the CFLs are regularly separable.\r\n\r\nRead this [technical report](http://arxiv.org/abs/1411.5131) for details.\r\n\r\n## Prerequisites ##\r\n\r\n- Boost is required. It is recommended version 1.55 or newer\r\n- Be sure to install the Boost program_options library and set `BOOST_ROOT`\r\n\r\n## Installation ##\r\n\r\n- `mkdir build \u0026\u0026 cd build`\r\n- `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=my_install_dir ..`\r\n- `cmake --build . --target install`\r\n\r\nThe code has been tested only for X86_64 with clang++ 3.2 and g++ 4.8\r\n\r\n## Usage ##\r\n\r\n`my_install_dir/bin/covenant --help` \r\n\r\nWe describe the format of the CFLs through an example:\r\n\r\n    ; this is a comment\r\n\r\n    (  S1 -\u003e [ A B]; \r\n      A  -\u003e [ \"a\" \"b\"]; \r\n      A  -\u003e [ \"b\" \"b\"]; \r\n      A  -\u003e [ \"a\" S1 \"a\", \"b\" S1 \"b\" ]; \r\n      B  -\u003e [ \"a\" \"b\" B]; \r\n      B  -\u003e [ \"a\" \"b\"]  \r\n    )\r\n    \r\n    (  S2 -\u003e [ A B]; \r\n      A  -\u003e [ \"a\" \"a\"]; \r\n      A  -\u003e [ \"b\" \"b\"]; \r\n      A  -\u003e [ \"a\" S2 \"a\", \"b\" S2 \"b\" ]; \r\n      B  -\u003e [ \"b\" \"a\" B];\r\n      B  -\u003e [ \"b\" \"a\"]  \r\n    )  \r\n\r\nThe non-terminal symbol appearing on the left-hand side in the first\r\ngrammar production is considered the start symbol of the grammar. In\r\nthe above example the start symbols are `S1` and `S2`, respectively.\r\n\r\nTerminal symbols must be between double quotes (i.e.,\r\n`\"\"`). Any symbol that is not between double quotes will be\r\ninterpreted as a non-terminal symbol.\r\n\r\nEach grammar production is of the form `A -\u003e [ ... ];` where `A` is a nonterminal \r\nand `...` is a sequence of any nonterminal or terminal symbol separated by one or \r\nmore blanks. We also allow `A -\u003e [ ... , ... ];` to express two grammar\r\nproductions with the same left-hand side A. That is,  `A  -\u003e [ \"a\" S2 \"a\", \"b\" S2 \"b\" ];` \r\nis syntactic sugar for `A  -\u003e [ \"a\" S2 \"a\"]; A -\u003e[ \"b\" S2 \"b\" ];`\r\n \r\nNote that all the right-hand side of the productions must ends up with the symbol `;`\r\nexcept the last one.\r\n\r\nIf we wrap the above example into a file test.cfg and try\r\n`covenant test.cfg`, you should obtain:\r\n\r\n`Finished after 5 cegar iterations.`   \r\n\r\n` UNSAT`\r\n\r\nSince covenant might not terminate, we provide a script `covenant-par`\r\nthat runs in parallel several configurations (i.e., heuristics) and\r\nstops as soon as one of the them terminates:\r\n\r\n`my_install_dir/bin/covenant-par file`\r\n\r\n## Publications ##\r\n\r\n- \"A Tool for Intersecting Context-Free Grammars and Its Applications\". G.Gange , J.A.Navas, P.Schachte, H.Sondergaard, and P.J. Stuckey. [(PDF)](http://www.clip.dia.fi.upm.es/~jorge/docs/cfg_nfm15.pdf) . NFM'15\r\n\r\n- \"A Complete Refinement Procedure for Regular Separability of Context-Free Languages\". G.Gange , J.A.Navas, P.Schachte, H.Sondergaard, and P.J. Stuckey. [(PDF)](http://www.clip.dia.fi.upm.es/~jorge/docs/CFG-TCS-2016.pdf). TCS, 2016.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaballa%2Fcovenant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaballa%2Fcovenant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaballa%2Fcovenant/lists"}