Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A case study with null-terminated strings. Includes a CN datatype for string buffers (
cn_types.h
), logical CN specification functions (spec_funs.h
), a few trusted lemmas (trusted.h
), a few lemmas proven in CN (lemmas.c
), a utility function (util.c
), and a toy example (example.c
).I also included
more_lemmas.broken.c
, which contains in-progress CN versions of the trusted lemmas (these got stuck on the issue of having no equivalent of Rocq'sintro x
), andunused.c,
which has a few lemmas I did not end up using for this example but that may be useful for future work with strings. I'm happy to remove these two files if that's cleaner. For the broken lemmas, it's not clear to me whether it's preferable to prove them in CN; as is, the fact that the lemmas inlemmas.c
are proven in CN means that CN re-verifies all of the lemmas inlemmas.c
every time it verifiesexample.c
, which gets slow. (@dc-mak is there any way to prevent CN from re-verifying code that has not changed?)