{"id":13993226,"url":"https://github.com/opencompl/lean-mlir","last_synced_at":"2025-07-22T17:31:27.292Z","repository":{"id":73376887,"uuid":"603407164","full_name":"opencompl/lean-mlir","owner":"opencompl","description":"A minimal development of SSA theory","archived":false,"fork":false,"pushed_at":"2024-10-29T11:51:46.000Z","size":60242,"stargazers_count":82,"open_issues_count":53,"forks_count":10,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-29T13:32:00.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MLIR","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencompl.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":"2023-02-18T12:18:37.000Z","updated_at":"2024-10-28T16:41:24.000Z","dependencies_parsed_at":"2024-02-04T17:19:01.923Z","dependency_job_id":"a3e9f470-6295-4f54-8021-4c34d61cc6e3","html_url":"https://github.com/opencompl/lean-mlir","commit_stats":null,"previous_names":["opencompl/ssa","opencompl/lean-mlir"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencompl%2Flean-mlir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencompl%2Flean-mlir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencompl%2Flean-mlir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencompl%2Flean-mlir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencompl","download_url":"https://codeload.github.com/opencompl/lean-mlir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227143429,"owners_count":17737158,"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":[],"created_at":"2024-08-09T14:02:17.211Z","updated_at":"2025-07-22T17:31:27.282Z","avatar_url":"https://github.com/opencompl.png","language":"MLIR","funding_links":[],"categories":["Lean","MLIR"],"sub_categories":[],"readme":"\u003ch1\u003e\nLean-MLIR\n\u003cimg src=\"./images/logo.png\"\n     alt=\"LeanMLIR\" title=\"LeanMLIR\"\n     class=\"center\"\n     width=80 height=80\n     style=\"width: 2.5em; height: 2.5em\"/\u003e\n\n\u003cimg src=\"https://github.com/opencompl/lean-mlir/actions/workflows/ci.yml/badge.svg\" /\u003e\n\u003c/h1\u003e\n     \nTheory of static single assignment developed in the Lean proof assistant.\nWe also build a wealth of tooling to interact closely with the [MLIR compiler ecosystem](https://mlir.llvm.org/),\nto enable workflows that include formal verification in the day-to-day of MLIR development.\n\n#### Documentation\n\n- **Publication: [Verifying Peephole Rewriting In SSA Compiler IRs](https://arxiv.org/abs/2407.03685)**\n- [API Documentation (auto-generated)](https://opencompl.github.io/lean-mlir/)\n- Playground at [lean-mlir.grosser.es](https://lean-mlir.grosser.es)\n\n#### Installation\n\n- First, setup the Lean toolchain with [elan](https://github.com/leanprover/elan?tab=readme-ov-file#installation).\n- Next, run:\n\n```\ngit clone https://github.com/opencompl/lean-mlir.git \u0026\u0026 cd lean-mlir \u0026\u0026 lake exe cache get \u0026\u0026 lake build\n```\n\n#### Core theorems\n\n- The proof that rewrites preserve semantics is found at `denote_rewritePeepholeAt`.\n- All core theorems are guarded by `#guard_msgs in #print axioms` to make sure that we never use `sorry` as an axiom to prove\n  a core theorem of the framework.\n\n#### Directory Structure\n\nThis directory structure is heavily inspired by the [Research Codebase Manifesto](https://www.moderndescartes.com/essays/research_code/).\n\n#### `SSA/Core`: \n\n\u003e Libraries for reusable components. Code is reviewed to\n\u003e engineering standards. Code is tested, covered by continuous integration, and\n\u003e should never be broken. Very low tolerance for tech debt.\n\u003e Breaking changes to core code should be accompanied by fixes to affected\n\u003e project code. The project owner should assist in identifying potential\n\u003e breakage. No need to fix experimental code.\n\n##### `SSA/Projects`: \n\n\u003e A top-level folder for each major effort (rough criteria: a project represents 1-6 months of work).\n\u003e   - Code is reviewed for correctness. Testing is recommended but optional, as\n\u003e     is continuous integration.\n\u003e   - No cross-project dependencies. If you need code from a different project,\n\u003e     either go through the effort of polishing the code into core, or clone\n\u003e     the code.\n\n##### `SSA/Experimental`:\n\n\u003e Anything goes. Recommend namespacing by time (e.g. a new directory every month).\n\u003e     - Rubber-stamp approvals. Code review is optional and comments may be\n\u003e       ignored without justification. Do not plug this into continuous\n\u003e       integration.\n\u003e     - The goal of this directory is to create a safe space for researchers so\n\u003e       that they do not need to hide their work. By passively observing research\n\u003e       code “in the wild”, engineers can understand research pain points.\n\n##### - `related-work/`: \n\n\u003e Top-level folder for research dependencies.\n\n##### `artifact-evaluation/`:\n\n\u003e Docker container build for the current version of the library.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencompl%2Flean-mlir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencompl%2Flean-mlir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencompl%2Flean-mlir/lists"}