diff --git a/path.go b/path.go index 29574ed..3fd8b5b 100644 --- a/path.go +++ b/path.go @@ -257,6 +257,9 @@ func (w *pathCheck) enter(t *template, rest []string) error { return nil } +// pathCover is coverPath's walk. Where pathCheck walks every variant of a choice, it +// covers the first choice it reaches whole and stops; at a table it follows the route +// and selects no row. type pathCover struct{ into map[node]bool } func (w *pathCover) walk(n node, tail []string) (node, error) { @@ -283,8 +286,9 @@ func (w *pathCover) walk(n node, tail []string) (node, error) { return n, nil } -// pathProbe proves a path resolves without drawing: carriedByAll lets one variant -// of a choice stand for all. It marks in drawn the tables a draw would pin. +// pathProbe proves a path resolves without drawing. Where pathCheck walks every +// variant of a choice, it walks the first, which carriedByAll lets stand for all; at a +// table it selects as pathCheck does and marks in drawn the tables a draw would pin. type pathProbe struct { pins pinSet drawn map[*table]bool @@ -335,6 +339,8 @@ func (w *pathProbe) readRow(t *table, r tableRoute) error { // pathDraw draws the rows and variants a proved path reads, pinning the rows in pins; pins is nil // for a sibling path, which never crosses a table, since a table is only a category. For a held // read, held keeps the variant drawn at each level of a, so paths sharing a prefix share it. +// Where pathCheck walks every variant of a choice, it walks the one drawn; at a table it selects +// as pathCheck does and draws the row the route asks for. type pathDraw struct { s *session pins *pinSet diff --git a/todo.md b/todo.md index d63b1c4..e0f7276 100644 --- a/todo.md +++ b/todo.md @@ -23,8 +23,6 @@ Shape 5.8, Self-sufficiency 5.7), every seat capped by Locality, all nine naming This round, in order: -- Give `pathCover` a doc comment and say in each path walk's comment how it differs from - `pathCheck` at a choice and a table: every seat diffed the four loops by eye. - Make `disagreement` a table keyed by the two datatypes and the proof, dropping the operand swap: six seats still needed a truth table to see which item it blames. - Move `session.trace` and `renderTrace.repeatDepth` off the render path: they serve