Commit 2cadde8
authored
feat: Tighten specifications on Strings standard library (#4868)
### Description
As follow-up from the initial review, this adds a bodiless
`CharsConsistent` lemma to the abstract
`Std.Strings.ParametricConversion` module that ensures `chars` and
`charsToDigits` are consistent, which is necessary but not sufficient to
prove that `forall n :: ToInt(OfInt(n)) == n`.
Also makes some documentation and naming improvements, adding an
`IsDigitChar` predicate for better readability than `c in charsToDigit`
(which is slightly different from `c in chars`) and merges the two
confusingly-named `ToNumberStr` and `OfNumberStr` predicate into one
`IsNumberStr` (with the definition of the former, weaker predicate).
### How has this been tested?
Existing tests + verification.1 parent f735fd9 commit 2cadde8
File tree
11 files changed
+40
-20
lines changed- Source/DafnyStandardLibraries
- binaries
- src/Std
- JSON
11 files changed
+40
-20
lines changedBinary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
0 commit comments