forked from checkedc/checkedc-clang
-
Notifications
You must be signed in to change notification settings - Fork 5
3C documentation update pass 2021-02 #438
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
34ab06c
WIP updates to clang/docs/checkedc/3C
mattmccutchen-cci c5c8b44
First stab at updating `3c` usage documentation
mattmccutchen-cci 4071724
Small fix to clang/docs/checkedc/3C/README.md
mattmccutchen-cci ed94fc1
CONTRIBUTING.md: Minor edits, update testing instructions
mattmccutchen-cci 4f7c5f8
Further minor edits to testing instructions
mattmccutchen-cci bc47083
Minor edit to INSTALL.md
mattmccutchen-cci 375ff58
INSTALL.md: Point to 3c usage instructions
mattmccutchen-cci 50b20f9
Document -DLLVM_APPEND_VC_REV=OFF.
mattmccutchen-cci aaca6c6
Finish revising clang/tools/3c/README.md
mattmccutchen-cci 842740f
Give example of what we mean by compiler options.
mattmccutchen-cci 3b15e91
Address Mike's review comments.
mattmccutchen-cci 4f9ea8f
Delete mention of mixing checkedc-clang repositories per Mike.
mattmccutchen-cci File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,28 +23,93 @@ some point. | |
|
|
||
| ## What 3C users should know about the development process | ||
|
|
||
| Development of 3C is led by [Correct Computation, | ||
| Inc.](https://correctcomputation.com/) (CCI) in the | ||
| Checked C development as a whole is led by Microsoft in the | ||
| https://github.com/microsoft/checkedc-clang repository. 3C is included | ||
| in the Checked C codebase, but 3C development is led by [Correct | ||
| Computation, Inc.](https://correctcomputation.com/) (CCI) in the | ||
| https://github.com/correctcomputation/checkedc-clang repository, which | ||
| is a fork of Microsoft's Checked C repository | ||
| (https://github.com/microsoft/checkedc-clang). Issues and pull | ||
| requests related to 3C should be submitted to the CCI repository; see | ||
| [CONTRIBUTING.md](CONTRIBUTING.md) for more information. Changes are | ||
| merged frequently from Microsoft's repository to CCI's and less | ||
| frequently in the opposite direction. While some automated tests of 3C | ||
| are run in Microsoft's repository, the coverage of these tests is | ||
| currently mediocre, so changes to Microsoft's repository may break | ||
| some functionality of its copy of 3C. Thus, users of 3C can choose | ||
| either CCI's repository (for the latest 3C with a somewhat older | ||
| Checked C) or Microsoft's (for the latest Checked C with 3C that is | ||
| significantly older and possibly broken). This workflow may change in | ||
| the future. | ||
|
|
||
| As of November 2020, 3C is pre-alpha quality and we are just starting | ||
| is a fork of Microsoft's repository; changes are periodically merged | ||
| back and forth. (That is, CCI plays roughly the role of a ["subsystem | ||
| maintainer"](https://www.kernel.org/doc/html/latest/process/2.Process.html#how-patches-get-into-the-kernel) | ||
| for 3C, for those familiar with that term from Linux kernel | ||
| development.) Both 3C and the rest of the Checked C tools (including | ||
| the compiler) are available in both repositories, but the repositories | ||
| will generally have different versions of different parts of the code | ||
| at any given time, so [you'll have to decide which repository is more | ||
| suitable for your work](#which-checkedc-clang-repository-to-use). | ||
|
|
||
| Issues and pull requests related to 3C should be submitted to CCI's | ||
| repository; see [CONTRIBUTING.md](CONTRIBUTING.md) for more | ||
| information. | ||
|
|
||
| As of March 2021, 3C is pre-alpha quality and we are just starting | ||
| to establish its public presence and processes. CCI is also working on | ||
| a proprietary extension of 3C called 5C ("**C**orrect | ||
| **C**omputation's **C**hecked-**C**-**C**onvert"). Our current plan is | ||
| that 3C will contain the core inference logic, while 5C will add | ||
| features to enhance developer productivity. If you'd like more | ||
| information about 5C, please contact us at | ||
| [email protected]. | ||
|
|
||
| ### Which `checkedc-clang` repository to use? | ||
|
|
||
| We typically recommend that serious 3C users use CCI's repository to | ||
| get 3C fixes and enhancements sooner, but in some scenarios, you may | ||
| be better off with Microsoft's repository. Here, in detail, are the | ||
| factors we can think of that might affect your decision (as of | ||
| March 2021): | ||
|
|
||
| - CCI strives to merge changes reasonably quickly from Microsoft's | ||
| repository to CCI's, but most 3C-specific changes are made first in | ||
| CCI's repository and merged to Microsoft's in batches every few | ||
| months. Thus, CCI's repository typically gives you a significantly | ||
| newer version of 3C, while Microsoft's repository typically gives | ||
| you a somewhat newer version of the rest of the Checked C codebase, | ||
| including some shared code used by 3C. The implication of that last | ||
| point is that a fix to the shared code in Microsoft's repository | ||
| would benefit Microsoft's copy of 3C immediately but would not take | ||
| effect on CCI's copy until the next merge from Microsoft to CCI, so | ||
| CCI's copy of 3C is not always newer in _all_ respects. | ||
|
|
||
| - While the [3C regression tests](CONTRIBUTING.md#testing) are run on | ||
| every change to either repository, CCI's copy of 3C undergoes | ||
| additional testing: a set of "benchmark" tests that run nightly, | ||
| plus manual use by CCI engineers. If a change to CCI's repository | ||
| passes the regression tests but breaks the additional tests, we will | ||
| generally fix the problem quickly. But if the same happens in | ||
| Microsoft's repository, functionality of Microsoft's copy of 3C that | ||
| is not covered by the regression tests could remain broken for some | ||
| time. The problem would likely be detected the next time CCI tries | ||
| to merge from Microsoft, in which case we would try to get a fix | ||
| into Microsoft's repository reasonably quickly. | ||
|
|
||
| - The 3C regression tests are run regularly on Windows on Microsoft's | ||
| repository but not on CCI's. A change that breaks the regression | ||
| tests on Windows generally won't be made to Microsoft's repository, | ||
| but such a change could be made to CCI's and the problem may not be | ||
| detected until the next time CCI tries to merge to Microsoft (or a | ||
| user reports the problem to us). So you're less likely to encounter | ||
| Windows-specific problems with Microsoft's repository. | ||
|
|
||
| - On the other hand, some CCI engineers work on Mac OS X and | ||
| frequently run the regression tests and other manual tests on CCI's | ||
| copy of 3C on Mac OS X, while we are unaware of any testing of | ||
| Microsoft's copy of 3C on Mac OS X. So you may be less | ||
| likely to encounter Mac-specific problems with CCI's repository. But | ||
| so far, when we've seen Mac-specific problems, we've usually gotten | ||
| a fix into Microsoft's repository reasonably quickly. | ||
|
|
||
| You can potentially use some tools from one repository and some from | ||
| the other (for example, the Checked C compiler from Microsoft's | ||
| repository and 3C from CCI's), though neither CCI nor Microsoft tests | ||
| this configuration. | ||
mattmccutchen-cci marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| As noted in the [setup instructions](INSTALL.md#basics), both 3C and | ||
| the Checked C compiler depend on the Checked C system headers, which | ||
| Microsoft maintains in [a subdirectory of a separate repository named | ||
| `checkedc`](https://github.com/microsoft/checkedc/tree/master/include). | ||
| CCI has [a fork of this | ||
| repository](https://github.com/correctcomputation/checkedc), but | ||
| currently it is used only for submitting changes to Microsoft. All | ||
| users should use Microsoft's `checkedc` repository regardless of which | ||
| `checkedc-clang` repository they use. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.