{"id":21676919,"url":"https://github.com/uwplse/fix-to-elim","last_synced_at":"2025-04-12T05:02:34.195Z","repository":{"id":47335752,"uuid":"198720589","full_name":"uwplse/fix-to-elim","owner":"uwplse","description":"Fixpoint to eliminator translation in Coq","archived":false,"fork":false,"pushed_at":"2024-07-04T21:05:27.000Z","size":144,"stargazers_count":3,"open_issues_count":6,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T00:35:10.430Z","etag":null,"topics":["coq","coq-plugin","eliminators","fixpoints","induction-principles","pumpkin-patch"],"latest_commit_sha":null,"homepage":null,"language":"Coq","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/uwplse.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":"2019-07-24T23:02:41.000Z","updated_at":"2022-09-27T21:14:31.000Z","dependencies_parsed_at":"2023-01-21T08:04:43.452Z","dependency_job_id":"7c2611d8-7fe1-4dd5-8db1-5a1a9aaee964","html_url":"https://github.com/uwplse/fix-to-elim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwplse%2Ffix-to-elim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwplse%2Ffix-to-elim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwplse%2Ffix-to-elim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwplse%2Ffix-to-elim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uwplse","download_url":"https://codeload.github.com/uwplse/fix-to-elim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519463,"owners_count":21117757,"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","coq-plugin","eliminators","fixpoints","induction-principles","pumpkin-patch"],"created_at":"2024-11-25T14:16:51.406Z","updated_at":"2025-04-12T05:02:34.145Z","avatar_url":"https://github.com/uwplse.png","language":"Coq","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository contains the `Preprocess` command, which does simple match and fixpoint to eliminator (induction principle) translation for certain terms, as described in the [DEVOID paper](http://tlringer.github.io/pdf/ornpaper.pdf). This command is a part of the [PUMPKIN PATCH](https://github.com/uwplse/PUMPKIN-PATCH) plugin suite. Here it exists as a standalone plugin so that others can build on it as desired.\n\nThis plugin depends on Coq 8.9.1 and our [Coq plugin library](https://github.com/uwplse/coq-plugin-lib).\nThe library is included automatically.\nTo build the standalone plugin, run:\n\n```\ncd plugin\n./build.sh\n```\n\nFor examples of using this plugin within another plugin,\nsee [PUMPKIN PATCH](https://github.com/uwplse/PUMPKIN-PATCH) and [DEVOID](https://github.com/uwplse/ornamental-search).\nFor examples of using this command directly, see the [coq](/plugin/coq) directory.\n\n## Troubleshooting\n\nError messaging for this plugin is really difficult. Here are some quick guidelines:\n\n### Errors about Induction Principles\n\nIf you get an error message about not being able to find an induction principle `Foo_ind`, `Foo_rec`, or `Foo_rect`,\nyou need to tell Coq to define an induction principle for that type. First, run this command:\n\n```\nCheck Foo.\n```\n\nDetermine if your type is in `Prop` or not. If it is in `Prop`, then run these commands:\n\n```\nScheme Minimality for Foo Sort Prop.\nScheme Induction for Foo Sort Set.\nScheme Induction for Foo Sort Type.\n```\n\nOtherwise, run these commands:\n\n```\nScheme Induction for Foo Sort Prop.\nScheme Induction for Foo Sort Set.\nScheme Induction for Foo Sort Type.\n```\n\nThis will tell Coq to generate induction principles. See [this command](https://coq.inria.fr/refman/user-extensions/proof-schemes.html) for more information.\n\n### Handling Unsupported Terms\n\nIf a module you are processing includes or depends on an unsupported term, like one that uses mutual recursion,\nyou can use the `opaque` option to tell `Preprocess Module` to ignore it. For example, if you want to ignore `Bar.bar` and\n`Baz.baz` when preprocessing the module `Baz`, you can write this:\n\n```\nPreprocess Module Baz as Baz' { opaque Bar.bar Baz.baz }.\n```\n\nYou can also tell `Preprocess Module` to ignore entire module, for example all definitions from the module `Bar` and its dependencies:\n\n```\nPreprocess Module Baz as Baz' { opaque Bar }.\n```\n\nDo note, however, that you may run into issues with later definitions that depend on the definitions you ignore.\nSo you may have to list several definitions to treat as opaque.\nSee [PreprocessModule.v](coq/PreprocessModule.v) for an example of this.\n\nIf you'd rather have `Preprocess Module` treat all dependencies as opaque by default, you can set the option:\n\n```\nSet Preprocess default opaque.\n```\n\nYou can then whitelist using `transparent` instead of `opaque`, for example:\n\n```\nPreprocess Module List as List' { transparent\n  (* list append and induction *)\n  Coq.Init.Datatypes\n}.\n```\n\nSee [DefaultOpaque.v](coq/DefaultOpaque.v) for an example of this.\n\n### Working around Bugs\n\nIf you encounter an issue you can't solve, or you don't know why something isn't working, then please look\nat the output up to that error. It will print all of the definitions up until the one that it failed to process.\nYou can then try to set that as opaque and continue, if you do not need it to use eliminators later on.\n\n### Reporting Bugs\n\nIf you can't set a term as opaque or don't know why it isn't working but would like for it to work, then \nwhen you report a bug, please include enough information to reproduce the bug, as well as the name of the\nlast definition `Preprocess Module` tries before failing. If you see a type error, please also include the\ntype error.\n\n## Guide\n\n* [LICENSE](/LICENSE): License\n* [README.md](/README.md): You are here!\n* [plugin](/plugin): Main plugin directory\n  - [build.sh](/plugin/build.sh): Build script\n  - [test.sh](/plugin/test.sh): Test script\n  - [coq](/plugin/coq): Examples and tests using Preprocess\n  - [theories](/plugin/theories): Coq theories to load plugin\n  - [src](/plugin/src): Main source directory\n    - [fixtoelim.mlpack](/plugin/src/fixtoelim.mlpack)\n    - [options.ml](/plugin/src/options.ml) and [options.mli](/plugin/src/options.mli): Options for **Preprocess**\n    - [fixtranslation.ml4](/plugin/src/fixtranslation.ml4): **Preprocess** top-level\n    - [automation](/plugin/src/automation): **Preprocess** implementation\n    - [usability](/plugin/src/usability): Error messages and other usability bits and pieces\n    - [components](/plugin/src/components): Components in the style of [PUMPKIN PATCH](https://github.com/uwplse/PUMPKIN-PATCH)\n    - [coq-plugin-lib](/plugin/src/coq-plugin-lib): [Coq plugin library](https://github.com/uwplse/coq-plugin-lib)\n\n## Contributors\n\nThe original plugin was written by [Nate Yazdani](https://github.com/nateyazdani). Talia Ringer mostly ported it to a plugin and wrote a lot of library functions, then fixed some bugs later and added better error messaging and so on.\nGithub history is not accurate here.\n\n## Licensing\n\nWe use the MIT license because we think Coq plugins have a right not to use GPL. If this is wrong, please let us know kindly so we can fix this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwplse%2Ffix-to-elim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuwplse%2Ffix-to-elim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwplse%2Ffix-to-elim/lists"}