rems-project / cn-tutorial

7 stars 8 forks source link

Directory structure rationalization #43

Open septract opened 1 month ago

septract commented 1 month ago

We should reorganize the directory structure to be more reasonable. Currently it looks like this:

cn-tutorial/
├─ check.sh
├─ Makefile
├─ src/
│  ├─ tutorial.adoc
│  ├─ examples/
│  │  ├─ 3.c
│  │  ├─ ...
│  ├─ example-archive/
│  │  ├─ check-all.sh
│  │  ├─ check.sh
│  │  ├─ simple-examples/
│  │  │  ├─ working/
│  │  │  ├─ broken/
│  │  ├─ .../

Some anomalies:

@bcpierce00

thatplguy commented 1 month ago

Perhaps we can move example-archive into the CN repo, once it's split from the Cerberus repo? As remarked in the past, the example archive is less about teaching CN to new users and more for characterizing CN capabilities for us (tool developers) and for regression testing.

I hear from @dc-mak that the CN/Cerberus repo split is underway and will hopefully be complete in the not too distant future.

bcpierce00 commented 1 month ago

That would make sense. It might lead to a bit of duplication, though, since I guess we'll want to have many of the same (larger) examples in both places...

On Mon, Jul 15, 2024 at 4:24 PM Cole Schlesinger @.***> wrote:

Perhaps we can move example-archive into the CN repo, once it's split from the Cerberus repo? As remarked in the past, the example archive is less about teaching CN to new users and more for characterizing CN capabilities for us (tool developers) and for regression testing.

I hear from @dc-mak https://urldefense.com/v3/__https://github.com/dc-mak__;!!IBzWLUs!UvVlT0Iw0Tvg-TCe7AIvRd9Etqg3LGSjJJkbD_v4l7DSNQ60iLPTJayaeYzXVZDKhUL-DafEBiWHE2Vyr94vUTrRZ3mM$ that the CN/Cerberus repo split is underway and will hopefully be complete in the not too distant future.

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/rems-project/cn-tutorial/issues/43*issuecomment-2229336053__;Iw!!IBzWLUs!UvVlT0Iw0Tvg-TCe7AIvRd9Etqg3LGSjJJkbD_v4l7DSNQ60iLPTJayaeYzXVZDKhUL-DafEBiWHE2Vyr94vUUhEpYdF$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABVQQCZOFY3SROBWSPJZ5ETZMQVW7AVCNFSM6AAAAABK5EEXUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRZGMZTMMBVGM__;!!IBzWLUs!UvVlT0Iw0Tvg-TCe7AIvRd9Etqg3LGSjJJkbD_v4l7DSNQ60iLPTJayaeYzXVZDKhUL-DafEBiWHE2Vyr94vUTkYhzKe$ . You are receiving this because you were mentioned.Message ID: @.***>

thatplguy commented 1 month ago

I think some duplication is OK? I don't think it's a problem if the tutorial examples change independently of the example archive (e.g. improving readability, adding comments, etc.), and any structural changes we need to make, like syntax changes, will be more painful due to the number of examples in the archive rather than the relatively small bit of duplication.

bcpierce00 commented 1 month ago

Agreed. The advantages of splitting are more than the slight pain of duplication.

On Mon, Jul 15, 2024 at 4:56 PM Cole Schlesinger @.***> wrote:

I think some duplication is OK? I don't think it's a problem if the tutorial examples change independently of the example archive (e.g. improving readability, adding comments, etc.), and any structural changes we need to make, like syntax changes, will be more painful due to the number of examples in the archive rather than the relatively small bit of duplication.

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/rems-project/cn-tutorial/issues/43*issuecomment-2229418080__;Iw!!IBzWLUs!TTN0xEqZZn9quCs7SrvwXoxbPKwneBPYAh0O1qNflc9hU_wpRZH6VJePzUb84XkeJ8ETBA10--CIFNuc6Dh160CjTgTd$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABVQQC2MADFID76RNJOCARTZMQZQRAVCNFSM6AAAAABK5EEXUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRZGQYTQMBYGA__;!!IBzWLUs!TTN0xEqZZn9quCs7SrvwXoxbPKwneBPYAh0O1qNflc9hU_wpRZH6VJePzUb84XkeJ8ETBA10--CIFNuc6Dh167hlfhLU$ . You are receiving this because you were mentioned.Message ID: @.***>

septract commented 1 month ago

Agree. We should probably colocate example-archive with the CN test-cases that are already in the cerberus repo here.

bcpierce00 commented 1 month ago

One other potential downside is that keeping examples in two places may make it slightly more difficult / slightly less automatic for people changing CN to check for regressions in the tutorial. But maybe then the answer is actually to move the tutorial into the CN repo as well...

- B

On Mon, Jul 15, 2024 at 5:11 PM Mike Dodds @.***> wrote:

Agree. We should probably colocate example-archive with the CN test-cases that are already in the cerberus repo here https://urldefense.com/v3/__https://github.com/rems-project/cerberus/tree/master/tests/cn__;!!IBzWLUs!VZ3qUqclaiLjh9F9zc_oKHAoMqgcM5VjDj1ABjGUyr1mEW8YZfdmqlEn_9L-iBVjJXmjdo4ms48Asl6xwMFiD_7NKaXm$ .

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/rems-project/cn-tutorial/issues/43*issuecomment-2229447676__;Iw!!IBzWLUs!VZ3qUqclaiLjh9F9zc_oKHAoMqgcM5VjDj1ABjGUyr1mEW8YZfdmqlEn_9L-iBVjJXmjdo4ms48Asl6xwMFiD3B8M4iR$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABVQQC3EVDW5BGUM2PCHS53ZMQ3JDAVCNFSM6AAAAABK5EEXUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRZGQ2DONRXGY__;!!IBzWLUs!VZ3qUqclaiLjh9F9zc_oKHAoMqgcM5VjDj1ABjGUyr1mEW8YZfdmqlEn_9L-iBVjJXmjdo4ms48Asl6xwMFiD7FgPNQ4$ . You are receiving this because you were mentioned.Message ID: @.***>

cp526 commented 1 month ago

That's what I was thinking too: having everything, including the tutorial, in one place will make the CI setup smoother.