Document Number: P1335R0
"Avoiding undefined behavior in contracts" [P1290R0] Explained
John Lakos - jlakos@Bloomberg.net
Revised Monday, November 26, 2018
ABSTRACT
========
DISCLAIMER: This is NOT a (new) proposal for C++20.
This paper provide an attempt at explaining, in terms of the
framework describe by Bloomberg in P1333R0, the proposal J.
Daniel Garcia has provided in P1290R0 to address problems
discovered in the WP -- e.g., see P1321R0). Note that this
is a last minute addition, and only a rough draft. Any
errors or misrepresentation, albeit inadvertent, is entirely
the responsibility of this author.
Table Of Contents
=================
1. Table Characterizing Combinations of Level Semantics in R1290R0
1. Table Characterizing Combinations of Level Semantics in R1290R0
==================================================================
In this section we simply fill in the table as suggested in section 5 of
R1333R0 for the proposed required semantics of paper P01290R0 as we
understand it today. The purpose here is simply to provide clarity and to
facilitate informed discussion, nothing further is expressed or implied.
G = Garcia's Paper R1290R0 (assuming no fifth individual CCS semantic).
R1290R0 requires six more combinations out of fifty and (known through direct
communication with its author) 4 additional combinations are acceptable. Note
that conforming implementations for any proposal are (of course) permitted, but
not (necessarily) required, to support all fifty level-assignment combinations.
UNKNOWN
REQUIRED |
ALLOWED | |
PROSCRIBED | | |
Row | | | |
# 'default' 'audit' 'axiom' | | | |
-- ----------------------- --------------------- ------ | | | |
0 ignore ignore ignore [ ] [ ] [G] [ ]
1 assume ignore ignore [G] [ ] [ ] [ ]
2 check (never continue) ignore ignore [ ] [G] [ ] [ ]
3 check (maybe continue) ignore ignore [ ] [G] [ ] [ ]
4 check (always continue) ignore ignore [-] [-] [-] [-]
5 ignore assume ignore [G] [ ] [ ] [ ]
6 assume assume ignore [G] [ ] [ ] [ ]
7 check (never continue) assume ignore [G] [ ] [ ] [ ]
8 check (maybe continue) assume ignore [G] [ ] [ ] [ ]
9 check (always continue) assume ignore [-] [-] [-] [-]
10 ignore check (never continue) ignore [G] [ ] [ ] [ ]
11 assume check (never continue) ignore [G] [ ] [ ] [ ]
12 check (never continue) check (never continue) ignore [ ] [G] [ ] [ ]
13 check (maybe continue) check (never continue) ignore [G] [ ] [ ] [ ]
14 check (always continue) check (never continue) ignore [-] [-] [-] [-]
15 ignore check (maybe continue) ignore [G] [ ] [ ] [ ]
16 assume check (maybe continue) ignore [G] [ ] [ ] [ ]
17 check (never continue) check (maybe continue) ignore [G] [ ] [ ] [ ]
18 check (maybe continue) check (maybe continue) ignore [ ] [G] [ ] [ ]
19 check (always continue) check (maybe continue) ignore [-] [-] [-] [-]
20 ignore check (always continue) ignore [-] [-] [-] [-]
21 assume check (always continue) ignore [-] [-] [-] [-]
22 check (never continue) check (always continue) ignore [-] [-] [-] [-]
23 check (maybe continue) check (always continue) ignore [-] [-] [-] [-]
24 check (always continue) check (always continue) ignore [-] [-] [-] [-]
25 ignore ignore assume [ ] [ ] [G] [ ]
26 assume ignore assume [G] [ ] [ ] [ ]
27 check (never continue) ignore assume [ ] [ ] [G] [ ]
28 check (maybe continue) ignore assume [ ] [ ] [G] [ ]
29 check (always continue) ignore assume [-] [-] [-] [-]
30 ignore assume assume [G] [ ] [ ] [ ]
31 assume assume assume [G] [ ] [ ] [ ]
32 check (never continue) assume assume [G] [ ] [ ] [ ]
33 check (maybe continue) assume assume [G] [ ] [ ] [ ]
34 check (always continue) assume assume [-] [-] [-] [-]
35 ignore check (never continue) assume [G] [ ] [ ] [ ]
36 assume check (never continue) assume [G] [ ] [ ] [ ]
37 check (never continue) check (never continue) assume [ ] [ ] [G] [ ]
38 check (maybe continue) check (never continue) assume [G] [ ] [ ] [ ]
39 check (always continue) check (never continue) assume [-] [-] [-] [-]
40 ignore check (maybe continue) assume [G] [ ] [ ] [ ]
41 assume check (maybe continue) assume [G] [ ] [ ] [ ]
42 check (never continue) check (maybe continue) assume [G] [ ] [ ] [ ]
43 check (maybe continue) check (maybe continue) assume [G] [ ] [G] [ ]
44 check (always continue) check (maybe continue) assume [-] [-] [-] [-]
45 ignore check (always continue) assume [-] [-] [-] [-]
46 assume check (always continue) assume [-] [-] [-] [-]
47 check (never continue) check (always continue) assume [-] [-] [-] [-]
48 check (maybe continue) check (always continue) assume [-] [-] [-] [-]
49 check (always continue) check (always continue) assume [-] [-] [-] [-]