|
1 | 1 | # Etch |
2 | 2 |
|
3 | | -This repository implements indexed streams, a way to represent fused |
4 | | -"contraction programs" like those found in sparse tensor algebra and relational |
| 3 | +This repository implements indexed streams, a representation for fused |
| 4 | +*contraction programs* like those found in sparse tensor algebra and relational |
5 | 5 | algebra. |
6 | 6 |
|
7 | | -Correctness proofs are written in [Lean 3][lean3], while the compiler is |
8 | | -written in the [Lean 4][lean4] language. We hope to port the proofs to Lean 4 |
9 | | -soon. |
| 7 | +Correctness proofs and compiler are written in the [Lean 4][lean4] language. |
10 | 8 |
|
11 | | -[lean3]: https://github.com/leanprover-community/lean |
12 | 9 | [lean4]: https://github.com/leanprover/lean4 |
13 | 10 |
|
14 | 11 | ## Directory structure |
15 | 12 |
|
16 | | -### Correctness proofs |
17 | | - |
18 | | -``` |
19 | | -. |
20 | | -└── src |
21 | | - └── verification |
22 | | - ├── code_generation # WIP code generation proofs |
23 | | - │ └── ... |
24 | | - ├── semantics # correctness proofs |
25 | | - │ ├── README.md |
26 | | - │ └── ... |
27 | | - └── test.lean |
28 | | -``` |
29 | | - |
30 | 13 | ### Compiler and benchmarks |
31 | 14 |
|
32 | 15 | ``` |
|
44 | 27 | │ ├── Benchmark.lean # benchmark queries |
45 | 28 | │ ├── Benchmark |
46 | 29 | │ │ └── ... |
| 30 | +│ ├── Verification # stream model formalization |
| 31 | +│ │ └── README.md |
47 | 32 | │ ├── KRelation.lean # work in progress |
48 | 33 | │ ├── Omni.lean |
49 | 34 | │ └── InductiveStream… |
|
60 | 45 | └── taco_kernels.c |
61 | 46 | ``` |
62 | 47 |
|
63 | | -## Build proofs |
64 | | - |
65 | | -First install [Lean 3](https://leanprover-community.github.io/get_started.html). |
66 | | -In the root directory, run |
67 | | -``` |
68 | | -leanproject get-mathlib-cache |
69 | | -leanproject build |
70 | | -``` |
71 | | - |
72 | | -## Build compiler |
| 48 | +## Build compiler and proofs |
73 | 49 |
|
74 | 50 | First install [Lean 4](https://leanprover.github.io/lean4/doc/quickstart.html). |
75 | 51 | In the `etch4` directory, run |
@@ -155,16 +131,34 @@ steps instead. |
155 | 131 |
|
156 | 132 | ## Publications |
157 | 133 |
|
158 | | -This repo implements indexed streams as defined in this paper: |
| 134 | +This repository implements indexed streams as defined in the paper: |
159 | 135 |
|
160 | 136 | > Scott Kovach, Praneeth Kolichala, Tiancheng Gu, and Fredrik Kjolstad. 2023. |
161 | 137 | > Indexed Streams: A Formal Intermediate Representation for Fused Contraction |
162 | 138 | > Programs. To appear in <em><cite>Proc. ACM Program. Lang.</cite></em> 7, |
163 | 139 | > PLDI, Article 154 (June 2023), 25 pages. https://doi.org/10.1145/3591268 |
164 | 140 |
|
165 | | -A preprint is available at https://cutfree.net/PLDI_2023_indexed_streams.pdf. |
| 141 | +## Old Correctness proofs |
| 142 | + |
| 143 | +These were written originally but recently automatically ported to Lean4. |
| 144 | + |
| 145 | +``` |
| 146 | +. |
| 147 | +└── src |
| 148 | + └── verification |
| 149 | + ├── code_generation # WIP code generation proofs |
| 150 | + │ └── ... |
| 151 | + ├── semantics # correctness proofs |
| 152 | + │ ├── README.md |
| 153 | + │ └── ... |
| 154 | + └── test.lean |
| 155 | +``` |
166 | 156 |
|
167 | | -There's also an earlier preprint: |
| 157 | +### Build old proofs |
168 | 158 |
|
169 | | -> Scott Kovach and Fredrik Kjolstad. 2022. Correct Compilation of Semiring |
170 | | -> Contractions. arXiv:[2207.13291](https://arxiv.org/abs/2207.13291) [cs.PL] |
| 159 | +First install [Lean 3](https://leanprover-community.github.io/get_started.html). |
| 160 | +In the root directory, run |
| 161 | +``` |
| 162 | +leanproject get-mathlib-cache |
| 163 | +leanproject build |
| 164 | +``` |
0 commit comments