dreamstop.openfp.net, the website and user manual of dreamstop, a language for continuous disambiguation
git clone git@nixlab.openfp.net:web/dreamstop.openfp.net.git#import "style.typ": a, entry, readings, rewrites, source
= Verdicts and minimal pairs
== Verdicts
The annotator gives every reading it finds for a sentence, or says that it finds no reading. Several annotators can read the same sentence. Their readings are normalised (see below), any reading that breaks a law of the language is dropped as an annotator's mistake, and the rest give one of three verdicts.
#table(
columns: (auto, 1fr),
table.header([*Verdict*], [*When*]),
[Clear], [all the annotators together found exactly one reading.],
[Ambiguous], [they found more than one, or one annotator found no reading while another found one.],
[Nonsense], [every annotator found no reading.],
)
Only a clear sentence goes on to be checked against its document kind. An ambiguous sentence has already failed, so there is no need to ask whether the kind would accept each of its readings.
=== Nonsense
#entry[Added `nixlab-metering-check`, which still checks the `metering.vx` in its working directory.]
"Still" says the check ran before the release, and "Added" says the program did not exist before it. No annotator finds a coherent reading, so the verdict is Nonsense.
#rewrites(
("[ASR·PFV] [ASR·HAB]/rel1", [Added `nixlab-metering-check`, which now checks the `metering.vx` in its working directory.]),
)
The codes cannot see the contradiction between "Added" and "still". Only an annotator that reads the words can.
#source[ChangeLog kind.]
A sentence with no finite verb is not a clause, so it has no reading. Headings and buttons often have none:
#table(
columns: (1fr, auto, 1fr),
table.header([*No reading*], [*Rewrite annotation*], [*Rewrite*]),
[To restore onto a machine deployed with the same configuration:], a("[DIR·PFV]"), [To restore onto a machine deployed with the same configuration, run:],
[Our open source], a("[DIR·PFV]"), [Browse our open source],
[Building with `nix build` and testing with `nix flake check`.], a("[DIR·PFV] [DIR·PFV]"), [Build with `nix build` and test with `nix flake check`.],
)
#source[Manual, website and README kinds. Each step and button now tells the reader what to do.]
=== No reading beside a reading
When one annotator finds no reading and another finds one, the annotators disagree, and that is ambiguity, not clarity.
#entry[The libraries the horizon toolchain uses to generate package sets.]
The only finite verb, "uses", sits in a relative clause with nothing to attach to. A strict annotator finds no reading. A looser one promotes "uses" to a main clause.
#readings(
("no reading", [the relative clause has no parent.]),
("[ASR·HAB]", ["uses" read as a main clause, which says what the toolchain uses, not what the package is.]),
)
#rewrites(
("[ASR·HAB] [ASR·HAB]/rel1", [horizon-core provides the libraries the horizon toolchain uses to generate package sets.]),
)
#source[README kind. The bad side is the first line of horizon-core's README. On a button, "Open merge request" reads as an imperative or as a phrase naming the merge requests that are open, and "Open this merge request" leaves only the imperative.]
== Minimal pairs
A minimal pair is two sentences that differ by the smallest possible edit that makes the sentence clear. The bad side has several readings, or none, or one reading that its document kind rejects. The good side has one reading, and its kind accepts it. Every rule in dreamstop is specified by such pairs, and a rule with no pair is not a rule.
A pair obeys three laws:
+ The good side is clear, and its kind accepts it.
+ The bad side is not.
+ The edit is minimal: no smaller edit to the bad side makes it clear and accepted.
The edit is computed, never declared. dreamstop compares the good reading with each bad reading, takes the closest, and counts the slots that differ. A clause inserted or deleted counts as all its slots. To check the third law it applies every smaller part of the edit to the bad reading and confirms that none of them is enough. Whether the wording itself could be shorter is left to the annotators.
For example, "A project or group called `sw.js` is not refused now." becomes "A project or group called `sw.js` is not yet refused." The closest bad reading is #a("[ASR·HAB·CSS]") and the good one #a("[ASR·HAB·EXP]"): one slot, the phase, so there is no smaller edit to try.
An edit can also change no slot at all. "The store now imports the SQLite review and sign-off tables." has a reading equal to its rewrite's, #a("[ASR·PFV·INC·ONE]"), and the words "once, at its first use" only remove the other reading.
A pair can be marked as a limit pair. Its two sides share their codes on purpose, to show something the codes cannot see. The laws skip it, and this manual shows such pairs in the chapter on limits.
== Neutral and significant slots
Readings are compared by what they mean, not by their code strings. A document kind can mark a slot neutral in a pattern, and two readings that differ only in slots neutral wherever their clause is allowed count as one reading.
The README and manual kinds mark the aspect of an instruction neutral. "Keep the guard below armed until the new system has been checked." asks the reader to do the same thing whether "Keep" is read as one act, `DIR·PFV`, or as keeping a state, `DIR·PRG`.
The labels kind does not, and there the difference matters:
#entry[Keep branch]
#readings(
("[DIR·PFV]", [a single act: choose not to delete the branch.]),
("[DIR·PRG]", [keep the branch where it is.]),
)
The button looks like it holds the branch in place now, but it switches off deletion after merge.
#rewrites(
("[DIR·PFV] {deletion: BSC}", [Cancel branch deletion]),
)
#source[Labels kind and manual kind.]
Act and product codes are neutral unless a kind declares nouns significant. The ChangeLog and issue kinds do, because their pairs show the act and the product giving different meanings: the backup procedure against the backup file. In the other kinds the annotator still writes `BSC` or `OBJ`, but a difference in them alone does not make a sentence ambiguous.
== Normalisation
Some meanings can be written in more than one way. Before readings are compared, dreamstop rewrites each into one normal form, so that equal meanings print equally.
+ A modal negated on both sides becomes its dual without negations: `NEG·G·NEC·NEG` becomes `G·POS`, and `NEG·G·POS·NEG` becomes `G·NEC`, for any ground `G`.
+ With no modal, a clause has at most one `NEG`.
+ `INC` directly over a negation becomes `CSS` on the positive, and `CSS` over a negation becomes `INC`. "Now cannot" is therefore written "can no longer". `CNT` and `EXP` keep a negation beneath them.
The kinds' pairs show the third rule. In "A project or group called `sw.js` is not yet refused, and its page can no longer be reached at `/sw.js`.", the second clause is #a("[ASR·HAB·CSS·ABL·POS]"), the normal form of "now cannot be reached". "The shell still cannot stop such a loop." keeps its negation under `CNT`: #a("[ASR·HAB·CNT·NEG·ABL·POS]"). And "not yet" is `EXP` with no `NEG`, because `EXP` holds its own negations.
#source[ChangeLog kind.]