-
Notifications
You must be signed in to change notification settings - Fork 18
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
P2900 R10 Contracts for C++ #1648
Comments
P2900R1 Contracts Working Paper (Joshua Berne) |
P2900R2 Contracts for C++ (Joshua Berne, Timur Doumler, Andrzej Krzemieński) |
P2900R3 Contracts for C++ (Joshua Berne, Timur Doumler, Andrzej Krzemieński) |
P2900R4 Contracts for C++ (Joshua Berne, Timur Doumler, Andrzej Krzemieński) |
P2900R5 Contracts for C++ (Joshua Berne, Timur Doumler, Andrzej Krzemieński) |
EWG discussed this all-day Wednesday in Tokyo. The following polls were taken: The following contracts polls are not meant to be binding, but rather to offer a first set of feedback to the authors. Poll: P2900r6: contracts should have
Poll: P2900r6: contracts in constant expressions should have
Poll: P2900r6: contracts should specify contracts on virtual functions in its Minimal Viable Proposal.
Poll: P2900r6: contracts should specify contracts on function pointers in its Minimal Viable Proposal.
Poll: P2900r6: contracts should specify contracts on coroutines in its Minimal Viable Proposal.
Poll: P2900r6: contracts should not allow throwing exceptions out of a violation handler.
Poll: P2900r6: contracts should not be able to evaluate preconditions/postconditions/assertions more than once per invocation.
Result: Poll: P2900r6: contracts should expose less undefined behavior than regular C++ code does.
Result: Poll: P2900r6: contracts - there should be some usage experience of contracts in an implementation of the STL (without necessarily having a paper to adopt these changes) before contracts can move to plenary.
Poll: P2900r6: contracts - there should be some usage specification of contracts in the STL before contracts can move to plenary.
|
2024-03-18 Library Evolution TokyoP2900R6: Contracts for C++ 2024-03-18 Library Evolution Telecon Minutes Champion: Timur Doumler SummaryPlease add motivation for at least one (in the paper): Add “contracts_ prefix” to “detection_mode”and pull contract_violation and “void invoke_default_contract_violation_handler(const contract_violation&);” out of std::contracts namespace into std:: namespace Leave the
ACTION: Come back with implementation experience ACTION: Renaming requests - attendees asking to modify: “Invoke_default_contract_violation_handler” (by Pablo - “default_contract_violation_handler”?) “Contract_violation (by David) Attendees will suggest names in the reflector, and authors will rename/ leave according to the feedback whatever gets most support. Next StepsP2900 authors will work with Library Implementors to verify the library interface doesn't have extensive overhead. Once finalized, we will see the newly proposed library interface. |
P2900R6 Contracts for C++ (Joshua Berne, Timur Doumler, Andrzej Krzemieński) |
P2900R7 Contracts for C++ (Joshua Berne, Timur Doumler, Andrzej Krzemieński) |
Amendments considered by SG21 in Tokyo (after EWG and LEWG sessions): 2024-03-21, Tokyo For the enums in P2900R6, make the underlying type unspecified; mention in the front matter of P2900 that the design intent is that the underlying type needs to be large enough to hold all possible values, including any vendor-provided ones. We want to rename the terms "contract violation" and "contract violation handler" and their associated library names in P2900 to some other terms that reflect that the situations described by them do not necessarily represent a violation of the plain-language contract of a function. Use two different handlers for a contract predicate that evaluates to false and a contract predicate whose evaluation exits via an exception, respectively. The library facilities proposed in P2900R6 should be in namespace std rather than in a nested namespace std::contracts. In P2900R6, rename enum contract_kind to assertion_kind. In P2900R6, rename enum contract_semantic to evaluation_semantic. Add a contract semantic to P2900R6 where the predicate is evaluated, on contract violation no contract-violation handler is invoked, and the program is stopped in an implementation-defined way. In P2900R6, when the contract-violation handler returns normally and the semantic is enforce, rather than calling abort(), the program should be stopped in an implementation-defined way. In P2900R6, add a recommended practice, that the enforce semantic should call std::abort(). |
Further post-Tokyo amendments considered by SG21: 2024-04-04, Telecon Poll 1: SF F N A SA Poll 2: SF F N A SA Poll 3: SF F N A SA Poll 4: SF F N A SA Poll 5: SF F N A SA Poll 6: SF F N A SA |
Seen in St Louis Monday/Tuesday: Not polled today: Poll: P2900r7: The method for evaluation semantics’ termination should not be implementation defined for | SF | F | N | A | SA | Result: consensus against. Poll: P2900r7: contracts should not be able to evaluate preconditions/postconditions/assertions more than once per invocation. | SF | F | N | A | SA | Consensus against. Poll: P2900r7: contracts should not be able to evaluate preconditions/postconditions/assertions more than twice per invocation. | SF | F | N | A | SA | Consensus against. Poll: P2900r7: Contracts should not allow throwing exceptions out of a violation handler. | SF | F | N | A | SA | Consensus against. Poll: P2900r7: local variables, | SF | F | N | A | SA | No consensus for change, but strong divide. Poll: P2900r7: (We want to leave the door open for contracts, post-MVP, to support | SF | F | N | A | SA | Consensus against. |
P2900R8 Contracts for C++ (Joshua Berne, Timur Doumler, Andrzej Krzemieński) |
P2900R9 Contracts for C++ (Joshua Berne, Timur Doumler, Andrzej Krzemieński) |
P2900R10 Contracts for C++ (Joshua Berne, Timur Doumler, Andrzej Krzemieński) |
P2900R0 Contracts for C++ (Joshua Berne)
The text was updated successfully, but these errors were encountered: