{"id":15168722,"url":"https://github.com/deividrvale/nijn-coq-script-generation","last_synced_at":"2026-01-24T03:08:02.797Z","repository":{"id":64447714,"uuid":"566366739","full_name":"deividrvale/nijn-coq-script-generation","owner":"deividrvale","description":"OCaml module of Nijn to generate coq scripts for checking termination proofs of higher-order rewriting systems.","archived":false,"fork":false,"pushed_at":"2025-04-09T23:52:08.000Z","size":505,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T00:31:38.220Z","etag":null,"topics":["coq","termination-checking"],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/deividrvale.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":"2022-11-15T14:23:41.000Z","updated_at":"2023-01-03T15:07:52.000Z","dependencies_parsed_at":"2024-09-14T02:09:39.078Z","dependency_job_id":null,"html_url":"https://github.com/deividrvale/nijn-coq-script-generation","commit_stats":{"total_commits":58,"total_committers":1,"mean_commits":58.0,"dds":0.0,"last_synced_commit":"e8d5294e89f01d76a7a9ffa88c625849ee873ed5"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividrvale%2Fnijn-coq-script-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividrvale%2Fnijn-coq-script-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividrvale%2Fnijn-coq-script-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividrvale%2Fnijn-coq-script-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deividrvale","download_url":"https://codeload.github.com/deividrvale/nijn-coq-script-generation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819353,"owners_count":21166474,"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":["coq","termination-checking"],"created_at":"2024-09-27T06:41:01.564Z","updated_at":"2026-01-24T03:08:02.769Z","avatar_url":"https://github.com/deividrvale.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ONijn - Coq Proof Script Generation\n\nA persistent version of this artifact is\navailable at Zenodo with the link below.\n[![DOI](https://zenodo.org/badge/566366739.svg)](https://zenodo.org/badge/latestdoi/566366739)\n\nONijn is an OCaml module of\n[Nijn](https://github.com/nmvdw/Nijn).\nIt is intended to be used as a tool to generate Coq termination certification\nscripts from the output of termination tools.\n\nThe current version of (O)Nijn supports higher-order polynomials in applicative format.\nEssentially,\nthis is the higher-order interpretation method described in\n[Fuhs-Kop](https://drops.dagstuhl.de/opus/volltexte/2012/3492/)'s paper.\n\nCheck the [ONijn API](https://deividrvale.github.io/nijn-coq-script-generation/onijn/index.html) for more details.\n\n## Build Instructions (Linux/macOS)\n\nWe use [opam](https://opam.ocaml.org/doc/Install.html) to build ONijn.\nMake sure it is installed on your system before proceeding.\n\nHere's the **dependency** list,\nwhich can be installed using opam.\n\n- **opam** v2.1.3 or higher.\n  - See [opam](https://opam.ocaml.org/doc/Install.html) for installation instructions.\n- **ocaml** v4.14.0 or higher.\n- **dune** v3.5.0 or higher.\n- **menhir** v2.1 or higher.\n- **coq.8.16.1** is needed for formal verification.\n\n### Managing opam switches\n\nIf your current ``opam switch``\ndoesn't have OCaml v4.14.0 or higher,\nwe recommend creating a fresh ``opam switch``:\n\n```bash\nopam switch create nijn-onijn 4.14.1\neval $(opam env)\nopam install dune menhir coq.8.16.1\n```\n\nTo see the list of switches, use\n\n```bash\nopam switch\n```\n\nand switching to a new switch is simple.\nFor instance\n\n```bash\nopam switch nijn-onijn\n```\n\nRun\n\n```bash\ndune build\n```\n\nto build the package from source.\n\n```bash\nopam install dune menhir\n```\n\nTo build documentation, we use ``odoc``.\n\n```bash\nopam install odoc\n```\n\n### Installing binaries locally\n\nRun\n\n```ocaml\ndune install\n```\n\nto install ONijn binaries locally.\nThis allows one to invoke the ``onijn``\nbinary from anywhere.\n\n## How to use it\n\nONijn receives as input a file describing the term rewriting system and an interpretation of each function symbol in its\nsignature.\nThis file is called *proof trace*.\nUsually, this is a file in the format ``\u003cfile_name\u003e.onijn``.\nThe file format is explained in the [API](https://deividrvale.github.io/nijn-coq-script-generation/onijn/index.html#input-file-format).\n\nWith ONijn installed,\nyou run it by providing an input file and an output file with the ``-o`` option.\n\n```bash\nonijn \u003cinput_file\u003e -o \u003coutput_file.v\u003e\n```\n\nThe output is a Coq proof script asserting the termination\nof the term rewriting system described in the input file.\nThis coq proof script can then be verified by coq,\nand for that one needs to install the [Nijn](https://github.com/nmvdw/Nijn) coq library.\n\n## Running Experiments\n\nWe provide some experiment files in the folder ``./experiments/ho_poly``.\n\n**Important:** to run the experiments make sure the\n``timeout`` utility is installed on your system.\nOn macOS, it is available with ``coreutils`` formulae in brew.\n\n```bash\nbrew install coreutils\n```\n\nMost Linux systems come with timeout by default.\n\nIn order to locally run the experiments, run:\n\n```bash\nmake\n```\n\nthis will build and install [Nijn](https://github.com/nmvdw/Nijn) on your system.\n\nThe batch of experiments can be run from the script\n``run_experiments.sh`` provided at the root of the project.\n\nNext, we set executable permission to the ``run_experiments.sh`` file.\n\n```bash\nchmod oug+x run_experiments.sh\n```\n\nFinally, execute the ``run_experiments.sh`` file to run the experiments.\n\n```bash\n./run_experiments.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeividrvale%2Fnijn-coq-script-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeividrvale%2Fnijn-coq-script-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeividrvale%2Fnijn-coq-script-generation/lists"}