{"id":14966297,"url":"https://github.com/uwplse/pumpkin-pi","last_synced_at":"2026-04-02T02:07:39.851Z","repository":{"id":46103326,"uuid":"120383901","full_name":"uwplse/pumpkin-pi","owner":"uwplse","description":"An extension to PUMPKIN PATCH with support for proof repair across type equivalences.","archived":false,"fork":false,"pushed_at":"2025-06-23T09:23:23.000Z","size":3617,"stargazers_count":49,"open_issues_count":29,"forks_count":9,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-06-23T10:28:54.796Z","etag":null,"topics":["algebraic-ornaments","coq","coq-plugin","dependent-types","devoid","equivalences","ornaments","proof-assistants","proof-refactoring","proof-repair","proof-reuse","pumpkin-patch","pumpkin-pi","refactoring","repair","transport"],"latest_commit_sha":null,"homepage":"","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":"2018-02-06T01:19:18.000Z","updated_at":"2025-03-28T05:01:12.000Z","dependencies_parsed_at":"2023-11-21T11:29:12.131Z","dependency_job_id":"b792d4e3-1655-4cb8-bf51-bc05eb0918bc","html_url":"https://github.com/uwplse/pumpkin-pi","commit_stats":{"total_commits":2265,"total_committers":8,"mean_commits":283.125,"dds":"0.48476821192052977","last_synced_commit":"a7743d4665d8c7a0ebfd9d39e1247ee7804d402b"},"previous_names":["uwplse/ornamental-search"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/uwplse/pumpkin-pi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwplse%2Fpumpkin-pi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwplse%2Fpumpkin-pi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwplse%2Fpumpkin-pi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwplse%2Fpumpkin-pi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uwplse","download_url":"https://codeload.github.com/uwplse/pumpkin-pi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwplse%2Fpumpkin-pi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31294398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:43:37.129Z","status":"online","status_checked_at":"2026-04-02T02:00:08.535Z","response_time":89,"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":["algebraic-ornaments","coq","coq-plugin","dependent-types","devoid","equivalences","ornaments","proof-assistants","proof-refactoring","proof-repair","proof-reuse","pumpkin-patch","pumpkin-pi","refactoring","repair","transport"],"created_at":"2024-09-24T13:36:10.805Z","updated_at":"2026-04-02T02:07:39.822Z","avatar_url":"https://github.com/uwplse.png","language":"Coq","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Coming here from the latest PLDI 2021 draft? The documentation below is meant for users and is a bit out of date. The PLDI 2021 draft code guide can be found [here](./GUIDE.md).**\n\nThis is PUMPKIN Pi (formerly DEVOID), a plugin for automatic discovery of and lifting across equivalences between types in Coq.\nPUMPKIN Pi is a part of the [PUMPKIN PATCH](https://github.com/uwplse/PUMPKIN-PATCH) \nproof repair plugin suite, and is included as a dependency of PUMPKIN PATCH\nstarting with release 0.1.\n\nPUMPKIN Pi began as DEVOID, the artifact for the ITP paper [Ornaments for Proof Reuse in Coq](http://tlringer.github.io/pdf/ornpaper.pdf).\nIt has since been extended. A version of PUMPKIN Pi that corresponds to the\nITP camera-ready can be found in [this release](http://github.com/uwplse/ornamental-search/releases/tag/itp+equiv).\nA pre-print of our PLDI 2021 paper [here](https://arxiv.org/abs/2010.00774).\n\nGiven two types A and B that are related in certain ways, PUMPKIN Pi can search for\nand prove the relation between those types, then lift functions and proofs between them.\nThe following relations are currently supported automatically:\n\n1. **Algebraic Ornaments**: the type B (like `vector`) is the type A (like `list`) indexed by a fold\nover A (like `length`)\n2. **Records and Tuples**: the type A is a nested tuple of the form `x * (y * ...)`, and the type B is\na record with the same number of fields that have the same types\n3. **Swapping and Renaming Constructors**: the types A and B are two inductive types that are equal up to\nswapping constructor order and renaming constructors\n4. **Escaping Sigma Types**: the type B (like `vector T n`) is the type A (like `{ s : sigT (vector T) \u0026 projT1 s = n}`) \nescaping the sigma type\n\nIt then ports functions and proofs across those equivalences.\nFor changes that don't fall into the above four buckets, you need to supply the equivalence yourself in a deconstructed form called a *configuration*.\nIf you need help with this, please check out two examples: switching between unary and binary natural numbers [here](/plugin/coq/nonorn.v),\nand an easier refactoring of constructors [here](/plugin/coq/playground/constr_refactor.v).\nAlso check out the PLDI 2021 draft [here](https://arxiv.org/abs/2010.00774).\n\n# Getting Started\n\nThis section of the README is a getting started guide for users.\nPlease report any issues you encounter to GitHub issues, and please feel free to reach out with questions.\n\n## Building PUMPKIN Pi\n\nThe only dependency you need to install yourself is Coq 8.9.1. \nPUMPKIN Pi also depends on a\n[Coq plugin library](https://github.com/uwplse/coq-plugin-lib) which is included\nas a submodule automatically in the build script,\nand on the [fix-to-elim](https://github.com/uwplse/fix-to-elim) plugin, which is also included. To build PUMPKIN Pi, run these commands:\n\n```\ncd plugin\n./build.sh\n```\n\n## Using PUMPKIN Pi\n\nFor an overview of how to use the tool, see [Example.v](/plugin/coq/examples/Example.v)\nand [minimal_records.v](/plugin/coq/minimal_records.v).\n\n### Overview\n\nAt a high level, there are two main commands: `Find ornament` to search for equivalences (misleadingly named as an artifact of history and time constraints),\nand `Lift` (or `Repair` for tactic support) to lift along those equivalences. `Find ornament` supports two additional options\nto increase user confidence and to make the functions that it generates more useful.\nIf you skip running the `Find ornament` command and just run `Lift` or `Repair`,\nthen PUMPKIN Pi will run `Find ornament` for you automatically first.\n\nIn addition, there are a few commands that help make PUMPKIN Pi more useful: `Preprocess`\nfor pattern matching and fixpoint support, and `Unpack` to help recover more user-friendly types.\nThe `Preprocess` command comes from our plugin\n[fix-to-elim](https://github.com/uwplse/fix-to-elim).\n\n#### Search\n\nSee [Search.v](/plugin/coq/examples/Search.v) for an example of search.\n\n##### Command\n\n```\nFind ornament A B as A_to_B.\n```\n\nThis command searches for the equivalence that describes the change from A to B, when the change is supported by automatic configuration.\n\n##### Outputs \n\nFor algebraic ornaments, `Find ornament` returns three functions if successful: \n\n1. `A_to_B`,\n2. `A_to_B_inv`, and \n3. `A_to_B_index`.\n\n`A_to_B` and `A_to_B_inv` form a specific equivalence, with `A_to_B_index` describing the fold over `A`.\n\nFor other kinds of equivalences, `Find ornament` returns only the first two of these.\n\n##### Options for Correctness\n\n`Find ornament` supports two options. \nBy default, these options are disabled.\nTogether, setting these two options tells `Find ornament` to prove that its outputs are correct.\n(Also as an artifact of time constraints, the options use the old name, DEVOID.)\n\n```\nSet DEVOID search prove coherence.\n```\n\nFor algebraic ornaments, this option tells `Find ornament` to additionally generate a proof `A_to_B_coh` that shows that\n`A_to_B_index` computes the left projection of applying `A_to_B`.\n\n```\nSet DEVOID search prove equivalence.\n```\n\nThis option tells `Find ornament` to generate proofs `A_to_B_section` and `A_to_B_retraction` that\nprove that `A_to_B` and `A_to_B_inv` form an equivalence.\n\n##### Using Custom Equivalences with Automatic Configuration\n\nIf `Find ornament` fails for an automatic configuration or you would like to use an existing equivalence, you can run this\ncommand before lifting (still misleadingly named as an artifact of history and time constraints):\n\n```\nSave ornament A B { promote = f; forget = g}. \n```\n\nwhere `f` and `g` form an equivalence that describes one of the supported relations between `A` and `B`.\nNote that support for this is extremely experimental, and will not yet work if you try this with changes\nnot supported by automatic configuration (you will need manual configuration for that; more below).\nYou can find an example in [TestLift.v](/plugin/coq/TestLift.v).\n\nYou can also use this to substitute in a different equivalence for an existing equivalence, but again there\nare some restrictions here on what is possible. See [ListToVectCustom.v](/plugin/coq/examples/ListToVectCustom.v)\nfor more information.\n\nYou can also skip one of promote or forget, provide just one, and let PUMPKIN Pi find the other for certain automatic configurations, for example:\n\n```\nSave ornament A B { promote = f }.\n```\n\nThis is especially useful when there are many possible equivalences and you'd like to use a particular one,\nbut let PUMPKIN Pi figure out the rest. See [Swap.v](/plugin/coq/Swap.v) for examples of this.\n\n##### Using Custom Equivalences with Manual Configuration\n\nTo use a custom equivalence not at all supported by one of the four search procedures, like switching between unary and binary natural numbers,\ncheck out two examples [here](/plugin/coq/nonorn.v) and [here](https://github.com/uwplse/ornamental-search/blob/master/plugin/coq/playground/constr_refactor.v).\nThese examples set manual configuration and essentially skip the search procedure.\nWe will document them soon!\nThe arXiv paper says a lot about these but the examples are the best place to look for now.\n\n##### Ambiguity \n\nSometimes, automatic configuration of PUMPKIN Pi finds multiple possible equivalences. With swapping constructors in particular, there can\nbe an exponential number of possible equivalences.\n\nIn the case of ambiguity, PUMPKIN Pi presents up to the first 50 possible\noptions for the user (in a smart order), presents this as an error, and gives instructions for the user to\nprovide more information to `Find ornament` in the next iteration. If the equivalence you want is not in the\nfirst 50 candidates, please use `Save ornament`. See [Swap.v](/plugin/coq/Swap.v) for examples of both of these.\n\n##### Tactic Support\n\nPUMPKIN Pi produces tactic suggestions for all proofs that `Find ornament` finds.\nThese are experimental, especially with dependent types, but may help you work with tactic proofs about equivalences.\nYou should think of these as suggestions to tweak.\nImproving the decompiler to both be sound and produce intuitive tactics that match common proof engineering styles is an ongoing project!\n\n#### Lift and Repair\n\nSee [Example.v](/plugin/coq/examples/Example.v), [minimal_records.v](/plugin/coq/minimal_records.v),\nand [Swap.v](/plugin/coq/Swap.v) for examples of lifting.\n\n##### Command\n\n```\nLift A B in f as g. (* no tactic suggestions *)\nRepair A B in f as g. (* tactic suggestions *)\n``` \n\nThis command lifts a function or proof `f` along the configured equivalence.\nIf you have already called `Find ornament` on `A` and `B`,\nit will use the discovered equivalence.\nIf you have used manual configuration, it will use that configuration.\nOtherwise, it will search for an equivalence first.\n\n##### Outputs\n\n`Lift` or `Repair` produces a term `g` which is the analogue of `f`, but refers to `B` in place of `A`.\n\n##### Alternate Syntax\n\nYou can run this with an alternate syntax as well:\n\n\n```\nLift A B in f as ..suffix.\nRepair A B in f as ..suffix.\n``` \n\nThis will name the result `f_suffix`.\n\n##### Whole Module Lifting\n\nYou can lift an endure module across an ornament all at the same time by running\nthis command:\n\n```\nLift Module A B in Foo as Bar. (* no tactic suggestions *)\nRepair Module A B in Foo as Bar. (* tactic suggestions *)\n```\n\nThis will create a new module `Bar` with all of the liftings from `Foo`.\n\n##### Tactic Support\n\nUsing `Repair` instead of `Lift` in thte above commands gives you tactic suggestions.\nThese tactic suggestions are experimental, but may help you with workflow integration.\n\nTo suggest decision procedures to try to improve tactic output, you can pass the `hint` option, like:\n\n```\nRepair Module A B in Foo as Bar { hint : \"ring\" \"auto\" }\n```\nThis option comes after `opaque`, like:\n\n```\nRepair Module A B in Foo as Bar { opaque : A_rect B_rect; hint : \"ring\" \"auto\" }\n```\nAt some point, we hope to make it possible to reuse the tactics from the original proof script easily,\neven when they are not decision procedures.\n\n##### Prettier Types\n\nBy default, PUMPKIN Pi lets Coq infer the types of lifted terms. You can \ninstead tell PUMPKIN Pi to lift the types (these are typically prettier)\nif you set the following function:\n\n```\nSet DEVOID lift type.\n```\n\n##### Opaque Terms\n\nIf you'd like, you can tell the `Lift` or `Repair` command to treat certain terms as opaque\nwhen you are positive that lifting them will have no effect:\n\n```\nLift A B in f as g { opaque constant1 constant2 ... }.\nRepair A B in f as g  { opaque constant1 constant2 ... }.\n``` \n\nThis can make lifting much faster.\nIt is **strongly advisable** to do this for certain terms that you know PUMPKIN Pi\nshould never reduce.\nHowever, this can also cause unpredictable errors if your assumption is incorrect,\nso be careful about your assumption.\n\nYou can also set a term to be globally opaque every time you lift between A and B\nby using the following command:\n\n```\nConfigure Lift A B { opaque constant1 constant2 ... }.\n```\n\nYou can find an example of this in [more_records.v](/plugin/coq/more_records.v).\n\n##### Caching\n\nPUMPKIN Pi by default caches all lifted terms it encounters as it goes in order to save time.\nYou can disable this if you'd like by running this command:\n\n```\nUnset DEVOID smart cache. \n```\n\n#### Additional Functionality\n\nThis functionality is demonstrated in [Example.v](/plugin/coq/examples/Example.v).\n\n##### Preprocess\n\nThe `Lift` command does not support pattern matching and fixpoints directly.\nTo lift a function `f'` that uses pattern matching and (certain) fixpoints, run:\n\n```\nPreprocess f' as f.\n```\n\nThen, run:\n\n```\nLift A B in f as g.\n```\n\nYou can also run `Preprocess` on an entire module; see [ListToVect.v](/plugin/coq/examples/ListToVect.v)\nfor an example of this. See the [fix-to-elim](https://github.com/uwplse/fix-to-elim) plugin\nfor more functionality for `Preprocess`.\n\n##### Bonus Features for Algebraic Ornaments\n\nWhen lifting across algebraic ornaments, to recover a slightly more user-friendly type for a lifted term `g`\nwith very little extra work, run:\n\n```\nUnpack g as g_u.\n```\n\nThe type after `Unpack` still may not be very user-friendly.\nIf you would like to put in a little more work to get back types\nthat are very user friendly, check out the methodology in\n[Example.v](/plugin/coq/examples/Example.v). The key is to\nset the following option:\n\n```\nSet DEVOID search smart eliminators.\n```\n\nThis generates a useful induction principle. Using that induction princple and composing\nthis by lifting across another equivalence, you can get from your unlifted type A to B at a\nparticular index, with much nicer type signatures.\n\n##### Assumptions for Automatic Configuration with Algebraic Ornaments\n\nPUMPKIN Pi makes some assumptions about your terms and types for now (described in Section 3 of the ITP 2019 paper).\n[Assumptions.v](/plugin/coq/examples/Assumptions.v) describes these assumptions in more detail\nand gives examples of unsupported terms and types.\nNote that the assumptions for records and tuples are not yet documented, since\nsupport for those types is brand new.\n\nThese assumptions are mostly to simplify search. We hope to loosen them eventually.\nIf any are an immediate inconvenience to you, then please cut a GitHub issue with an example\nyou would like to see supported so that we can prioritize accordingly.\n\n### Known Issues\n\nPlease see our GitHub [issues](https://github.com/uwplse/ornamental-search/issues) before reporting a bug\n(though please do report any bugs not listed there).\n\nOne outstanding issue (an unimplemented optimization) has consequences for how we lift and unpack large\nconstants compositionally. For now, for large constants, you should prefer lifting several times and then unpacking\nthe result several times over iteratively lifting and unpacking. See [this issue](https://github.com/uwplse/ornamental-search/issues/44).\n\nThere are also still some open questions about eta expansion and definitional equality. Practically, from a user's perspective,\nthat means that lifting may sometimes fail with mysterious type errors for types that look almost but not quite correct.\nRest assured, we are working on fixing this, or at the least understanding why it happens well enough to significantly improve\nerror messaging and rule out invalid inputs.\n\n# Examples\n\nThis part of the README explains some examples and how they correspond to the ITP 2019 paper.\nYou may find these useful as a user, as a reader, or as a developer.\n\n## ITP 2019 Paper Examples\n\nThe example from the paper are in the [examples](/plugin/coq/examples) directory.\nHere is an overview of the examples, in order of relevance to the paper:\n\n* [Intro.v](/plugin/coq/examples/Intro.v): Examples from Section 1 of the paper\n* [Example.v](/plugin/coq/examples/Example.v): Motivating example from Section 2 of the paper\n* [Assumptions.v](/plugin/coq/examples/Assumptions.v): Assumptions from Section 3 of the paper\n* [LiftSpec.v](/plugin/coq/examples/LiftSpec.v): Intuition for lifting from Section 3 of the paper\n* [Search.v](/plugin/coq/examples/Search.v): Search examples from Section 4 of the paper\n* [Lift.v](/plugin/coq/examples/Lift.v): Lifting examples from Section 4 of the paper\n* [ListToVect.v](/plugin/coq/examples/ListToVect.v): Example of preprocessing a module from Section 5 of the paper\n* [Projections.v](/plugin/coq/examples/Projections.v): Evidence for non-primitive projection claims from Section 5 of the paper\n\n## Tuple and Record Examples\n\nThe most useful examples of lifting between tuples and records are in [minimal_records.v](/plugin/coq/minimal_records.v)\nand [more_records.v](/plugin/coq/more_records.v).\n\n## Swapping and Renaming Constructors Examples\n\nThe most useful examples of swapping and renaming constructors are in [Swap.v](/plugin/coq/Swap.v).\n\n## Other Examples\n\nThe [coq](/plugin/coq) directory has more examples, including regression tests and examples from the arXiv paper.\n\nThe [eval](/plugin/eval) directory has examples from the case study from Section 6 of the ITP 2019 paper.\nThey may be a bit hard to read since there is some scripting going on.\nThey may still be interesting to you whether or not you want to actually run the case study.\n\n# ITP 2019 Case Study\n\nThis section of the README describes how to reproduce the case study from Section 4 of the ITP 2019 paper.\nThe case study is in the [eval](/plugin/eval) directory.\nWe support the case study scripts on only Linux right now.\n\n## Building the Case Study Code\n\nTo run the case study code, you need the following additional dependencies:\n* The Equivalences for Free! [univalent parametricity framework](https://github.com/CoqHott/univalent_parametricity) (hereon EFF)\n* [Datamash](https://www.gnu.org/software/datamash/)\n\nRun the following to make EFF:\n\n```\ncd \u003cpath-to-EFF\u003e\nmake \u0026\u0026 make install\n```\n\nDatamash should install in a straightforward way from a package manager using the link above.\n\n## Reproducing the Paper Case Study\n\nThe particular commit for EFF used for the results in the paper is [this commit](https://github.com/CoqHott/univalent_parametricity/tree/02383400c2711a1de1581e62e0a463759211d4df). We have rerun the experiments using \n[this commit](https://github.com/CoqHott/univalent_parametricity/tree/993ec06760953331c588b47ba4ad423f7d2c0c46), \nthe newest commit at the time of release, and there results have not changed significantly. Results are not guaranteed to\nbe the same for different commits of EFF, especially later ones which may include optimizations not yet implemented\nat the time of writing. Similarly, on different architectures, the numbers may be slightly different; the orders of \nmagnitude should be comparable.\n\nEnter the [eval](/plugin/eval) directory:\n\n```\ncd eval\n```\n\nIncrease your stack size:\n\n```\nulimit -s 100000\n```\n\nRun the following script:\n\n```\n./together.sh\n```\n\nThe script takes a while, as it runs each function ten times each\non large data both for PUMPKIN Pi and for EFF.\nWhen it is done, check the `results` folder for the median runtimes as well as the size of reduced functions.\nThis also does a sanity check to make sure both versions of the code produce the same output.\nIt does not yet try to reduce the proof of `pre_permutes` using EFF,\notherwise the case study would take a very long time to run.\nTo run this just once, enter the [equiv4free](/plugin/eval/equiv4free) directory:\n\n```\ncd equiv4free\n```\n\nIn that directory, uncomment the following line in [main.v](/plugin/eval/equiv4free/main.v):\n\n```\n(*Redirect \"../out/normalized/pre_permutes-sizedEFFequiv\" Eval compute in pre_permutes'.*)\n```\n\nThen run the following script, which runs the EFF code just once:\n\n```\n./prepermutes.sh\n```\n\nThis should take a while (how long depends on your architecture) and produce a very large term.\n\n## Understanding the Case Study Code\n\nThe code for the case study is in the [eval](/plugin/eval) folder.\nThe case study uses the same exact input datatypes for both PUMPKIN Pi and EFF,\ncopying and pasting in the inputs, lifted functions, and equivalences PUMPKIN Pi produces to run on the dependencies of EFF.\nThe reasons for copying the inputs are that EFF has different\nCoq dependencies, so the base functions perform differently. In addition, lifting constants with EFF additionally slows down \nperformance, and we would like to control for only the performance of lifted functions, which is easiest to understand.\n\nThere is one other thing worth understanding about the case study code.\nWe used to use this command to measure the performance of `foo`:\n\n```\nEval vm_compute in foo.\n```\n\nAn ITP reviewer noted that this includes the amount of time to print `foo`. This is a lot of\noverhead that clouds the usefulness of the data. The reviewer suggested writing:\n\n```\nEval vm_compute in (let _ := foo in tt).\n```\n\nUnfortunately, Coq seems to be a bit too smart for that; it doesn't actually bother computing `foo`\nif you do that. Instead, we now write:\n\n```\nEval vm_compute in (List.tl [foo]).\n```\n\nThis forces Coq to compute `foo`, but ultimately prints `[]`, thereby not adding printing time.\nIt does add the time to run `List.tl`, but this overhead is very minimal on a list of a single element\n(much more minimal than the overhead of printing).\n\n# Implementation and Development\n\nTransparency is very important to me and my coauthors. My goal is not just to produce a useful a tool,\nbut also to demonstrate ideas that other people can use in their tools.\n\nSome information for transparency is in the paper:\nSection 4 discusses the core algorithms that PUMPKIN Pi implements, and\nsection 5 discusses a sample of implementation challenges.\n\nThis part of the README is here to complement that. It describes the structure of the code a bit. It should also help if you are interested in contributing\nto PUMPKIN Pi, or if you are interested in using some of the libraries from PUMPKIN Pi in your code.\n\n## Understanding the Code\n\nThis is an outline of the structure of the code. Please cut an issue if you are confused about anything here.\nPlease also feel free to ask if you are confused about anything that the code does.\n\n* [LICENSE](/LICENSE): License\n* [plugin](/plugin): Main directory for the plugin\n  - [build.sh](/plugin/coq/build.sh): Build script\n  - [test.sh](/plugin/coq/test.sh): Test script\n  - [coq](/plugin/coq): Tests and paper examples\n    - [examples](/plugin/coq/examples): Paper examples (see paper examples section of this document for details)\n    - [playground](/plugin/coq/playground): Preliminary thoughts on useful theory for later extensions to PUMPKIN Pi\n    - [Indtype.v](/plugin/coq/Indtype.v): Lifting tests for inductive relations\n    - [Infrastructure.v](/plugin/coq/Infrastructure.v): Testing infrastructure\n    - [ShouldFail.v](/plugin/coq/ShouldFail.v): Tests that should currently fail\n    - [Test.v](/plugin/coq/Test.v): Tests for search for algebraic ornaments\n    - [TestLift.v](/plugin/coq/TestLift.v): Tests for lifting across algebraic ornaments\n    - [TestUnpack.v](/plugin/coq/TestUnpack.v): Tests for unpacking indexed types\n    - [minimal_records.v](/plugin/coq/minimal_records.v): Basic tests for products and records\n    - [more_records.v](/plugin/coq/more_records.v): More advanced tests for products and records\n    - [NoSmartCache.v](/plugin/coq/NoSmartCache.v): Disabling the smart cache\n    - [SmartCache.v](/plugin/coq/SmartCache.v): Keeping the smart cache enabled\n    - [prod_rect.v](/plugin/coq/prod_rect.v): Test functionality that produces prettier terms\n  - [eval](/plugin/eval): Case study code and dependencies\n    - [equiv4free](/plugin/eval/equiv4free): EFF case study code and depedencies\n      - [Makefile](/plugin/eval/equiv4free/Makefile)\n      - [cast.v](/plugin/eval/equiv4free/cast.v)\n      - [lemmas.v](/plugin/eval/equiv4free/lemmas.v)\n      - [list.v](/plugin/eval/equiv4free/list.v)\n      - [main.v](/plugin/eval/equiv4free): Main EFF case study code\n      - [perm.v](/plugin/eval/equiv4free)\n      - [prepermutes.sh](/plugin/eval/equiv4free/prepermutes.sh): Script to normalize `pre_permutes`\n    - [Makefile](/plugin/eval/Makefile)\n    - [cast.v](/plugin/eval/cast.v)\n    - [lemmas.v](/plugin/eval/lemmas.v)\n    - [main.v](/plugin/eval/main.v): Main ITP 2019 case study code\n    - [times.sed](/plugin/eval/times.sed): Script to format times\n    - [together.sh](/plugin/eval/together.sh): Main case study script\n  - [deps](/plugin/deps): Depedencies\n    - [fix-to-elim](/plugin/deps/fix-to-elim): **Preprocessing** with the [fix-to-elim](https://github.com/uwplse/fix-to-elim) plugin\n  - [src](/plugin/src): Source directory\n    - [coq-plugin-lib](/plugin/src/coq-plugin-lib): [Coq plugin library](https://github.com/uwplse/coq-plugin-lib)\n    - [lib](/plugin/src/lib): Internal library\n    - [automation](/plugin/src/automation): Automation directory\n      - [search](/plugin/src/automation/search): **Search**\n      - [lift](/plugin/src/automation/lift): **Lifting**\n      - [unpack.ml](/plugin/src/automation/unpack.ml) and [unpack.mli](/plugin/src/automation/unpack.mli): Converting the unpacking tactic to a command\n      - [depelim.ml](/plugin/src/automation/depelim.ml) and [depelim.mli](/plugin/src/automation/depelim.mli): Automation for non-primitive projections\n    - [cache](/plugin/src/cache): Caching ornaments and lifted terms\n      - [caching.ml](/plugin/src/cache/caching.ml) and [caching.mli](/plugin/src/cache/caching.mli)\n    - [components](/plugin/src/components): Components in the style of [PUMPKIN PATCH](http://tlringer.github.io/pdf/pumpkinpaper.pdf)\n      - [abstraction.ml](/plugin/src/components/abstraction.ml) and [abstraction.mli](/plugin/src/components/abstraction.mli): \n      - [differencing.ml](differencing.ml) and [differencing.mli](/plugin/src/components/differencing.mli): \n      - [factoring.ml](/plugin/src/components/factoring.ml) and [factoring.mli](/plugin/src/components/factoring.mli): \n      - [specialization.ml](/plugin/src/components/specialization.ml) and [specialization.mli](/plugin/src/components/specialization.mli): \n    - [ornaments](/plugin/src/ornaments): Internal representations and configuration\n    - [frontend.ml](/plugin/src/frontend.ml) and [frontend.mli](/plugin/src/frontend.mli): Main functionality for commands\n    - [options.ml](/plugin/src/options.ml) and [options.mli](/plugin/src/options.mli): Definitions of and access to options\n    - [ornamental.ml4](/plugin/src/ornamental.ml4): **Top-level source file**\n    - [ornaments.mlpack](/plugin/src/ornaments.mlpack)\n  - [theories](/plugin/theories): PUMPKIN Pi theories\n    - [Adjoint.v](/plugin/theories/Adjoint.v): Turning equivalences into adjoint equivalences\n    - [Prod.v](/plugin/theories/Prod.v): Preprocessed projections of pairs\n    - [Eliminators.v](/plugin/theories/Eliminators.v): **Generalized smart eliminators for user-friendly types**\n    - [Ornaments.v](/plugin/theories/Ornaments.v): Loader theory for PUMPKIN Pi\n    - [Unpack.v](/plugin/theories/Unpack.v): **Unpacking terms** (Ltac tactic)\n* [.gitignore](/.gitignore)\n* [README.md](/README.md)\n\n## Regression Testing\n\nThe test script in the [plugin](/plugin) directory runs all of the regression tests:\n\n```\n./test.sh\n```\n\nAfter making a change to PUMPKIN Pi, you should always run this. You should\nalso run the case study scripts to check performance.\n\n## Licensing and Attribution\n\nPUMPKIN Pi is MIT licensed, since I have a very strong preference for the MIT license and\nsince I believe I do not need to use Coq's LGPL when writing language plugins.\nThis interpretation might be wrong, though, so I suppose you should tread lightly.\nIf you are an expert in licensing, definitely let me know if this is wrong.\n\nRegardless, I would like PUMPKIN Pi to be used freely by anyone for any purpose.\nAll I ask for is attribution, especially in any papers that you publish that use PUMPKIN Pi\nor any of its code. Please cite the ITP paper or the arXiv paper when referring to PUMPKIN Pi in those papers.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwplse%2Fpumpkin-pi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuwplse%2Fpumpkin-pi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwplse%2Fpumpkin-pi/lists"}