|
3 | 3 | [#746](https://github.com/asc-community/AngouriMath/issues/746) tier 1 asks for two things this |
4 | 4 | file is: a written specification of what canonical means for each node class, and **a stated |
5 | 5 | distinction between canonical and "simplest"**. Its item 65 says to take a position, write it down, |
6 | | -and let the engine be checked against it. The checking is `work/canoncheck`, and every number below |
| 6 | +and let the engine be checked against it. The checking is `Sources/Tests/Harnesses/CanonCheck`, and every number below |
7 | 7 | came out of it rather than out of an argument. |
8 | 8 |
|
9 | 9 | Read [SimplificationContract.md](SimplificationContract.md) first if you are changing a rewrite. |
@@ -60,7 +60,7 @@ Three properties, each of which a canonical form must have and none of which nee |
60 | 60 | - **order independence** — the operands of a commutative operator may be written either way round; |
61 | 61 | - **agreement** — two writings of one expression reach the same form. |
62 | 62 |
|
63 | | -`work/canoncheck` measures all three against each candidate, comparing **entities and not printed |
| 63 | +`Sources/Tests/Harnesses/CanonCheck` measures all three against each candidate, comparing **entities and not printed |
64 | 64 | strings**. The figures below are on `master` with the two defects of the following subsection fixed |
65 | 65 | — [#929](https://github.com/asc-community/AngouriMath/issues/929) and |
66 | 66 | [#930](https://github.com/asc-community/AngouriMath/issues/930), each landing separately. Without |
@@ -269,12 +269,17 @@ The one thing it *is* required to be is sound, which is [SimplificationContract. |
269 | 269 |
|
270 | 270 | ## 7. How this is checked |
271 | 271 |
|
272 | | -`work/canoncheck`. It builds expressions by growing a small grammar, then checks idempotence and |
273 | | -order independence generatively and a listed set of agreements by hand. It runs all three over each |
274 | | -of the three candidate forms — `InnerSimplified`, `CanonicalOrderExact` followed by |
275 | | -`InnerSimplified`, and `Simplify` — because the interesting facts are the differences between the |
276 | | -columns rather than any one number. The listed pairs are each a claim this file makes or disclaims, |
277 | | -so a disagreement there is a decision to take rather than necessarily a defect. |
| 272 | +`Sources/Tests/Harnesses/CanonCheck`. It builds expressions by growing a small grammar, then |
| 273 | +checks idempotence and order independence generatively and a listed set of agreements by hand. It |
| 274 | +runs all three over each candidate form, because the interesting facts are the differences between |
| 275 | +the columns rather than any one number. The candidates are `InnerSimplified`, `CanonicalOrderExact` |
| 276 | +followed by `InnerSimplified`, the same sort after the normalisation, and `Simplify`. The listed |
| 277 | +pairs are each a claim this file makes or disclaims, so a disagreement there is a decision to take |
| 278 | +rather than necessarily a defect. |
| 279 | + |
| 280 | +CI runs it on every change to the library. Its findings are listed in `canoncheck-baseline.tsv` |
| 281 | +beside it, and the run fails when that list changes, so a change to what is canonical is recorded |
| 282 | +in the commit that makes it. |
278 | 283 |
|
279 | 284 | It compares entities. Nothing in it reads a printed form, which is deliberate: the associativity |
280 | 285 | finding in §3 is invisible to a string comparison and is the single most likely thing to be got |
|
0 commit comments