-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
splitting the repository #78
Comments
The best way to split this would be to keep only bedrock2 language and semantics in this repo. RISC-V semantics should be completely orthogonal to bedrock2 semantics (for instance bedrock2 should be compilable on intel CPUs too). There must be a separate repository that combines the compiler to RISC-V. I think there must be a third repository that proves the equivalence of the RISC-V compiler semantics and the RISC-V hardware semantics in Kami. @samuelgruetter @andres-erbsen @vmurali @sifive-emarzion @andres-erbsen-sifive |
If this project is successful to the best of our hopes, the maximal splitting (and perhaps ideal) that I see is as follows:
As for what would make sense to do right now, I would like to suggest the following policy: |
I agree with @andres-erbsen-sifive |
I also agree to the repository policy that @andres-erbsen-sifive suggested. |
I agree with Andres' overall splitting strategy. However, I still think it is a good idea to do the splitting that I mentioned, namely the compiler to machine code and the connection with hardware spec. This would make development much more easier on both MIT Kami and SiFive Kami, without having to do extra work each time someone wants to clone something. Andres' also mentioned the bedrock2 to C compiler, which SiFive could potentially work on - connecting SiFive Kami's semantics to VST/Compcert. That means, we might write a verified a non-optimizing compiler from bedrock2 to VST (with Andres' help/insights while he's here). Keeping all this together is definitely a hindrance requiring a hard fork that gets more and more painful to merge later on. |
Could you please elaborate on the extra work hinderance you see in keeping the parts that are currently together as they are? |
What is the current status of this issue? |
We haven't done much on this front. The rupicola repository uses https://github.com/mit-plv/bedrock2/blob/master/bedrock2/src/bedrock2/ToCString.v instead of the RISC-V backend, but I think having a separate Makefile target for the relevant parts is enough for that. We do not have a use case for connecting to VST or CompCert right now. As far as performance is concerned, we either reall want evey last percent (so gcc or clang), or don't care at all (so bedrock2 RISC-V backend is fine). I also don't expect particularly convenient interoperability for proofs because VST and CompCert insist on the distinction between pointers and integers (https://stackoverflow.com/a/63743244) whereas bedrock2 nonchalantly mixes the two, relying on implementation-defined behavior of gcc and clang in the current C backend. I do expect that some connection could be made, but it might come down to mapping all bedrock2 memory accesses to indexing into the same array, so currently we lack enthusiasm to pursue this connection. |
As discussed with @vmurali and @sifive-emarzion, it would be nice to eventually split this repository in a way that allows for the sifive end-to-end repository to include bedrock2 (and probably the compiler) but not mit mit-plv/kami.
The text was updated successfully, but these errors were encountered: