web/dreamstop.openfp.net · commit
Teach positions, patterns and six kinds, with the corpus v2 pairs
parents: bb0551ecc7
Teach positions, patterns and six kinds, with the corpus v2 pairs Roles are gone. The manual teaches clause positions, kinds as patterns per position, the holder of a DEO clause as a stated limit and questions answered by readers. It covers six kinds, including labels and websites, and fills the pair slots from the 37 accepted pairs of corpus v2 with their sources. The prose check matches every manual clause against the manual kind and every front-page clause against the website kind.
9 files changed
Diff
BUILD.md | 13 +- CONTRIBUTING.md | 8 +- ChangeLog.md | 31 +- dreamstop-openfp-net-web/src/Site/Content.hs | 10 +- dreamstop-openfp-net-web/src/Site/View.hs | 13 +- manual/dreamstop.vx | 459 ++++++++++++++++----------- nix/site.nix | 348 ++++++++++++++++---- prose/front.vx | 36 ++- prose/questions.vx | 4 +- 9 files changed, 633 insertions(+), 289 deletions(-) diff --git a/BUILD.md b/BUILD.md index 5efd8cc..2442176 100644 @@ -40,13 +40,12 @@ JavaScript, hydrate, bundle, card, pins and generated files), with the page's own expected links, text and preview tags. It also runs these: - `prose` checks that every sentence of the manual and of - `prose/front.vx` carries a dreamstop reading in display order under the - rules for manuals, and that each clause keeps the laws one clause can - break: steps and DIR, preconditions, obligation-holders, ONE against - HAB, evidence and the canonical negations. It checks that every step is - followed by a stated result, that every recovery starts from a failed - precondition, that no manual paragraph is unannotated and that neither - file has a semicolon. + `prose/front.vx` carries a dreamstop reading in display order, that + each clause keeps the laws one clause can break, and that each clause + matches a pattern for its position: the manual kind for the manual and + the website kind for the front page. It checks that no manual paragraph + is unannotated, that every procedure has a section for each Manual + question and that neither file has a semicolon. - `manual-says` checks that the manual's HTML says every annotated sentence, and that it does not mention Ithkuil. - The kit's reading-without-JavaScript check is given every sentence of diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 215d0be..fbefb25 100644 @@ -17,9 +17,11 @@ ## Writing prose -Every sentence of the page and the manual is annotated in dreamstop under -the rules for manuals: Assert and Direct only, Direct for steps and Done -for preconditions. In the manual, write each sentence as +Every sentence of the manual is annotated in dreamstop within the +patterns of the manual kind, and every sentence of the front page within +the patterns of the website kind. A subordinate clause records its +position and the number of its parent clause, as in `[ASR·HAB]/rel1`. In +the manual, write each sentence as `s "ANNOTATION" "SENTENCE"`, or `sx "ANNOTATION" [...]` when it holds a link or a reference. When you change a sentence of the front page in `Site.Content` or `Site.View`, change its line in `prose/front.vx`. A diff --git a/ChangeLog.md b/ChangeLog.md deleted file mode 120000 index 22dbf5a..0000000 @@ -1 +0,0 @@ -dreamstop-openfp-net-web/ChangeLog.md \ No newline at end of file diff --git a/ChangeLog.md b/ChangeLog.md new file mode 100644 index 0000000..4f4c08a @@ -0,0 +1,30 @@ +# ChangeLog + +## 0.1.0.0 — 2026-12-06 + +- First version of the dreamstop.openfp.net page, as one design-kit `Site` + in Miso on design-kit 0.4.0 and GHC 10, pre-rendered to `index.html` at + build time and hydrated in the browser. It says that dreamstop is a + language for continuous disambiguation, explains readings and the + verdicts clear, ambiguous and nonsense with an example of each, and + teaches minimal pairs with a pair from the nixlab-shell ChangeLog. +- Added the dreamstop user manual at `/manual/`, with a PDF at + `/manual/dreamstop.pdf`, following the dreamstop specification, + version 2. It explains the one property, clause segmentation, every + three-letter code by layer (force, mood, aspect, phase, modality as + ground and strength, negation scope, bound and evidence), clause + positions, the semantics and laws, verdicts, the questions readers + answer, the patterns of the six document kinds, minimal pairs and the corpus with the 37 accepted pairs of corpus v2, each with its source, and what + codes cannot see. It has procedures for annotating a sentence, writing + a pair and reviewing, each with how to tell that it worked and how to + recover, worked examples from the nixlab-shell and vortex-shell + ChangeLogs, a reference table and a glossary. The source is + `manual/dreamstop.vx`, written in Inkwell. +- Every sentence of the page and the manual carries its dreamstop reading + as data: the manual keeps each beside its sentence, and `prose/front.vx` + holds the page's. The build refuses a reading that is not in display + order, that breaks a clause law or that has a clause outside the + patterns for its position, in the manual kind for the manual and the + website kind for the page. It also refuses a manual paragraph without + readings, a sentence the rendered page or manual does not say, and a + section named in `prose/questions.vx` that the manual lacks. diff --git a/dreamstop-openfp-net-web/src/Site/Content.hs b/dreamstop-openfp-net-web/src/Site/Content.hs index c1898ba..d8af1e8 100644 @@ -59,7 +59,7 @@ verdicts = , MkVerdict "Ambiguous" "Added the review store, which moved reviews out of SQLite." - ["[ASR·PFV] release-action [ASR·PFV·ONE]", "[ASR·PFV] release-action [ASR·HAB]"] + ["[ASR·PFV] [ASR·PFV·ONE]", "[ASR·PFV] [ASR·HAB]"] "Readers find different readings, so the author picks one and rewrites the sentence." , MkVerdict "Nonsense" @@ -78,14 +78,14 @@ data Side = MkSide , sideAnnotation :: MisoString } +-- | A ChangeLog pair from the nixlab-shell 0.122.0.0 ChangeLog: describe the +-- resulting state, not the migration. -- -- @since 0.1.0.0 pair :: [Side] pair = - [ MkSide "Bad" "Added the review store, which moved reviews out of SQLite." "[ASR·PFV] release-action [ASR·PFV·ONE] or [ASR·PFV] release-action [ASR·HAB]" - , MkSide "Good" "Added the review store, which now moves reviews out of SQLite." "[ASR·PFV] release-action [ASR·HAB·INC]" + [ MkSide "Bad" "Added the review store, which moved reviews out of SQLite." "[ASR·PFV] [ASR·PFV·ONE] or [ASR·PFV] [ASR·HAB]" + , MkSide "Good" "Added the review store, which keeps reviews in acid-state." "[ASR·PFV] [ASR·HAB·INC]" ] -- | The pair's question and its edit. diff --git a/dreamstop-openfp-net-web/src/Site/View.hs b/dreamstop-openfp-net-web/src/Site/View.hs index c45b735..f2346c6 100644 @@ -74,7 +74,8 @@ view _ = , p_ [classList ["lead"]] ["dreamstop is a language for continuous disambiguation."] , p_ [] - [ "Its goal is that every question a reader is entitled to ask of a document has exactly one answer. \ + [ "It secures one property. \ + \Every question a reader is entitled to ask of a document has exactly one answer. \ \A reader annotates each clause of a sentence with three-letter codes. \ \Each annotation records one reading of the sentence. \ \A sentence is clear when every reader finds the same single reading. \ @@ -107,14 +108,14 @@ view _ = , p_ [classList ["annotation"]] [text pairSlot] , p_ [] - [ "This pair teaches that a ChangeLog describes new behaviour with HAB and INC. \ - \Each document rule is specified by its pairs. \ - \A rule with no pair is not a rule." + [ "This pair teaches that a ChangeLog describes the resulting state, not the migration. \ + \Each document kind is a set of patterns, specified by its pairs. \ + \A pattern with no pair is not part of the kind." ] , p_ [] - [ "The manual covers every code, the verdicts, the questions, the rules for each kind of document and how reviews use them. " - , "The dreamstop package is being built in dreamstop/dreamstop." + [ "The manual covers every code, the clause positions, the verdicts, the questions, the six document kinds and how reviews use them. " + , "The dreamstop package will be built in dreamstop/dreamstop." ] ] ] diff --git a/manual/dreamstop.vx b/manual/dreamstop.vx index 3b8c8d7..d36c17a 100644 @@ -11,38 +11,40 @@ let c code = [inlineCode Nothing code] t :: String -> [Inline] t phrase = [text phrase] + pairs :: [[[Inline]]] -> Content () + pairs = table [t "Kind", t "Question", t "Bad side", t "Good side", t "Source"] + pair :: String -> String -> String -> String -> String -> String -> String -> [[Inline]] + pair kind question bad badReadings good goodReading source = [t kind, t question, [text bad, text " ", inlineCode Nothing badReadings], [text good, text " ", inlineCode Nothing goodReading], t source] codes :: [[[Inline]]] -> Content () codes = table [t "Code", t "Meaning", t "English cues", t "Example", t "Reading"] code :: String -> String -> String -> String -> String -> [[Inline]] code name meaning cues example reading = [c name, t meaning, t cues, t example, c reading] - pairTable :: String -> String -> String -> String -> String -> String -> Content () - pairTable question bad badReading good goodReading why = table [t "Side", t ("Question: " ++ question), t "Reading"] [[t "Bad", t bad, c badReading], [t "Good", t good, c goodReading], [t "Why", t why, t ""]] in do title [text "dreamstop: a user manual for continuous disambiguation"] section (Identifier "About this manual") [text "About this manual"] $ do - paragraph (s "[ASR·HAB] [ASR·HAB]" "This manual is for people and agents who work on OpenFP documentation." ++ s "[ASR·HAB]" "It teaches dreamstop, a language for continuous disambiguation." ++ s "[ASR·HAB]" "It covers the codes, the semantics, the verdicts, the questions, the document rules and the minimal pairs.") - paragraph (s "[ASR·HAB]" "The manual follows the dreamstop specification, version 2." ++ s "[ASR·PRG]" "The dreamstop Haskell package is being built in the dreamstop/dreamstop repository." ++ s "[ASR·HAB·NEG]" "No step in this manual uses that package.") - paragraph (sx "[ASR·HAB] [ASR·HAB]" [text "The sections from ", reference (Identifier "The one property"), text " to ", reference (Identifier "Roles"), text " introduce the language in the order a reader needs it."] ++ sx "[ASR·HAB]" [text "The sections from ", reference (Identifier "Annotating a sentence"), text " to ", reference (Identifier "Reviewing with dreamstop"), text " are procedures."] ++ sx "[ASR·HAB]" [reference (Identifier "Reference table"), text " and the ", reference (Identifier "Glossary"), text " collect the codes and the terms."]) - paragraph (s "[ASR·HAB]" "Readings appear in monospace, as in [ASR·HAB]." ++ s "[ASR·HAB] [ASR·HAB]" "A pair table gives its question in its heading, its bad side, its good side and the reason the good side settles the question." ++ s "[ASR·HAB] [ASR·HAB]" "Every sentence of this manual carries a dreamstop reading under the Manual rules, and the source keeps each reading beside its sentence." ++ s "[ASR·HAB] [ASR·HAB]" "A quoted example counts as content of the sentence that quotes it.") + paragraph (s "[ASR·HAB] [ASR·HAB]/rel1" "This manual is for people and agents who work on OpenFP documentation." ++ s "[ASR·HAB]" "It teaches dreamstop, a language for continuous disambiguation." ++ s "[ASR·HAB]" "It covers the codes, clause positions, the semantics, verdicts, questions, the six document kinds and minimal pairs.") + paragraph (s "[ASR·HAB]" "The manual follows the dreamstop specification, version 2." ++ s "[ASR·HAB]" "The dreamstop Haskell package lives in the dreamstop/dreamstop repository." ++ s "[ASR·HAB·NEG]" "No step in this manual uses that package.") + paragraph (sx "[ASR·HAB]" [text "The chapters from ", reference (Identifier "The one property"), text " to ", reference (Identifier "Document kinds"), text " introduce the language in order."] ++ sx "[ASR·HAB]" [text "The chapters from ", reference (Identifier "Annotating a sentence"), text " to ", reference (Identifier "Reviewing with dreamstop"), text " are procedures."] ++ sx "[ASR·HAB]" [reference (Identifier "Reference table"), text " and the ", reference (Identifier "Glossary"), text " collect the codes and the terms."]) + paragraph (s "[ASR·HAB]" "Readings appear in monospace, as in [ASR·HAB]." ++ s "[ASR·HAB]" "Every sentence of this manual has a reading under the manual kind, kept beside the sentence in the source." ++ s "[ASR·HAB]" "The source also records each subordinate clause's position and parent after a slash, as in [ASR·HAB]/rel1." ++ s "[ASR·HAB]" "A quoted example counts as content of the sentence around it.") section (Identifier "The one property") [text "The one property"] $ do - paragraph (s "[ASR·HAB]" "dreamstop secures one property." ++ s "[ASR·HAB] [ASR·HAB]" "Every question that a reader is entitled to ask of a document has exactly one answer.") - paragraph (s "[ASR·HAB] [ASR·HAB]" "A document fails this property in two ways, and the two are one failure." ++ s "[ASR·HAB]" "Ambiguity of reading is a sentence with several meanings." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Ambiguity by omission is a clear text that fits several situations that matter to the reader.") + paragraph (s "[ASR·HAB]" "dreamstop secures one property." ++ s "[ASR·HAB]/rel2 [ASR·HAB]" "Every question that a reader is entitled to ask of a document has exactly one answer.") + paragraph (s "[ASR·HAB]" "A document fails this property in two ways." ++ s "[ASR·HAB]" "Ambiguity of reading is a sentence with several meanings." ++ s "[ASR·HAB] [ASR·HAB]/rel1" "Ambiguity by omission is a clear text that fits several situations of concern to the reader." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "Both leave a question with more than one answer, so dreamstop treats them as one failure.") table [t "Failure", t "Example", t "What it leaves open"] [ [t "Ambiguity of reading", t "Added the review store, which moved reviews out of SQLite.", t "whether the move is a one-off import or what the store does"] , [t "Ambiguity by omission", t "Upgraded nixlab-shell from 0.121.0.0 to 0.122.0.0.", t "whether operators must do anything"] ] - paragraph (s "[ASR·HAB]" "Readers make both failures visible by annotating each clause with codes." ++ s "[ASR·HAB] [ASR·HAB]" "A program then computes, from the readings alone, how many answers each question has." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Zero answers is nonsense or contradiction, one answer is resolved, and several answers are ambiguous." ++ s "[ASR·HAB] [ASR·HAB]" "A document passes when every question in its kind's set is resolved.") + paragraph (s "[ASR·HAB]" "Readers make both failures visible by annotating each clause with codes." ++ s "[ASR·HAB]" "A program checks every reading against the document's kind." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "A document passes when every question of its kind has one answer for every reader.") paragraph (s "[ASR·HAB]" "Continuous disambiguation applies this test at every review." ++ s "[ASR·HAB]" "A wrong reading of a ChangeLog entry costs an incident after a release." ++ s "[ASR·HAB]" "The same reading costs one rewrite at review.") section (Identifier "Clauses and segmentation") [text "Clauses and segmentation"] $ do paragraph (s "[ASR·HAB]" "A reading of a sentence is a non-empty list of clauses, in order." ++ s "[ASR·HAB]" "A sentence with several meanings has several readings.") - paragraph (s "[ASR·HAB] [ASR·HAB]" "A clause is one finite verb group with everything it governs." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Five rules settle where clauses begin and end.") + paragraph (s "[ASR·HAB] [ASR·HAB]/rel1" "A clause is one finite verb group with everything it governs." ++ s "[ASR·HAB]" "Five rules settle the boundaries of clauses.") ordered [ paragraph (s "[ASR·HAB]" "A finite verb group is a finite verb with its auxiliaries and modals." ++ s "[ASR·HAB]" "An imperative is finite.") - , paragraph (s "[ASR·HAB]" "Every finite verb group starts a clause, including in relative, reduced relative, temporal and conditional clauses.") - , paragraph (s "[ASR·HAB·NEG]" "Infinitives, participles and verbless adjuncts are not clauses." ++ s "[ASR·HAB] [ASR·HAB]" "They belong to the clause that contains them.") + , paragraph (s "[ASR·HAB]" "Every finite verb group starts a clause, including in relative, temporal and conditional clauses.") + , paragraph (s "[ASR·HAB·NEG]" "Infinitives, participles and verbless adjuncts are not clauses." ++ s "[ASR·HAB] [ASR·HAB]/rel1" "They belong to the clause that contains them.") , paragraph (s "[ASR·HAB]" "Coordinated finite verbs are separate clauses, even with one shared subject.") , paragraph (s "[ASR·HAB]" "Clauses are ordered by the position of their finite verb in the text.") ] @@ -52,19 +54,29 @@ in do , [t "Set metering.vx to raise the fuel default.", t "Set", t "1"] , [t "The children the forge spawns inherit its lock.", t "spawns, inherit", t "2"] ] - paragraph (s "[ASR·HAB]" "Finiteness is a syntactic test." ++ s "[ASR·HAB] [ASR·HAB·NEG]" "Two readers apply it the same way, so segmentation involves no judgement about meaning." ++ s "[ASR·HAB] [ASR·HAB]" "A subordinate clause takes ASR unless it is itself a command, a question or a warning.") + paragraph (s "[ASR·HAB]" "Finiteness is a syntactic test." ++ s "[ASR·HAB] [ASR·HAB·NEG]/adv1" "Two readers apply it the same way, so segmentation involves no judgement about meaning." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "A subordinate clause takes ASR unless it is itself a command, a question or a warning.") + + section (Identifier "Clause positions") [text "Clause positions"] $ do + paragraph (s "[ASR·HAB]" "Segmentation also gives each clause a position." ++ s "[ASR·HAB]" "A clause in any position but main has a parent, the clause around it." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "Position is syntax, so readers agree on it without judgement.") + table [t "Position", t "What it is", t "Cues", t "Example"] + [ [c "Main", t "a clause not inside another", t "", t "Added the review store"] + , [c "Relative", t "describes a noun of its parent", t "which, that, who, or a reduced relative", t "which keeps reviews in acid-state"] + , [c "Adverbial", t "says when, if, until, why or with what result its parent holds", t "when, if, until, after, because, so", t "when the forge has imported the reviews"] + , [c "Complement", t "is the object of its parent's verb", t "that, whether", t "that the lock is inherited"] + ] + paragraph (s "[ASR·HAB]" "Document kinds allow different codes in different positions." ++ sx "[ASR·HAB]" [reference (Identifier "Document kinds"), text " shows the patterns."]) section (Identifier "Codes and their order") [text "Codes and their order"] $ do - paragraph (s "[ASR·HAB]" "Every clause has ten slots." ++ s "[ASR·HAB]" "Force and aspect always have a value." ++ s "[ASR·HAB]" "Mood has the default FAC." ++ s "[ASR·HAB]" "Phase, the two negations, the modal, bound and evidence are optional." ++ s "[ASR·HAB]" "A role sits beside the slots.") - paragraph (s "[ASR·HAB]" "Each code has three letters." ++ s "[ASR·HAB]" "A clause renders as its codes joined by a middle dot inside square brackets, in this fixed order.") + paragraph (s "[ASR·HAB]" "Every clause has ten slots." ++ s "[ASR·HAB]" "Force and aspect always have a value." ++ s "[ASR·HAB]" "Mood has the default FAC." ++ s "[ASR·HAB]" "Phase, the two negations, the modal, bound and evidence are optional.") + paragraph (s "[ASR·HAB]" "Each code has three letters." ++ s "[ASR·HAB]" "A clause renders as its codes in a fixed order, joined by a middle dot inside square brackets.") codeBlock (Language "text") "Force · Mood · Aspect · Phase · NEG · Ground · Strength · NEG · Bound · Evidence" - paragraph (s "[ASR·HAB]" "The block above is a template, not a reading." ++ s "[ASR·HAB·NEG]" "FAC, absent slots and false negations are not rendered." ++ s "[ASR·HAB]" "A clause with no modal has one negation position, after phase." ++ s "[ASR·HAB]" "A role renders after the brackets.") - codeBlock (Language "text") "[ASR·HAB·CSS]\n[ASR·HAB·DEO·NEC] obligation-holder operators\n[ASR·PFV] release-action [ASR·HAB·INC]\n[ASR·PFV] or [ASR·HAB]" + paragraph (s "[ASR·HAB]" "The block above is a template, not a reading." ++ s "[ASR·HAB·NEG]" "FAC, absent slots and false negations are not rendered." ++ s "[ASR·HAB]" "A clause with no modal has one negation position, after phase." ++ s "[ASR·HAB]" "A sentence renders as its clauses separated by spaces.") + codeBlock (Language "text") "[ASR·HAB·CSS]\n[ASR·HAB·DEO·NEC]\n[ASR·PFV] [ASR·HAB·INC]\n[ASR·PFV] or [ASR·HAB]" paragraph (s "[ASR·HAB]" "The block above holds four example readings, one per line." ++ s "[ASR·HAB]" "The third reading has two clauses." ++ s "[ASR·HAB]" "The fourth line joins two readings of one ambiguous sentence with or.") - paragraph (s "[ASR·HAB]" "The fixed order makes equal meanings print equally." ++ sx "[ASR·HAB] [ASR·HAB] [ASR·HAB]" [text "Aspect prints beside force, although it applies first, as ", reference (Identifier "Semantics and laws"), text " explains."]) + paragraph (s "[ASR·HAB]" "The fixed order makes equal meanings print equally." ++ sx "[ASR·HAB] [ASR·HAB]/adv1" [text "Aspect prints beside force, although it applies first, as ", reference (Identifier "Semantics and laws"), text " explains."]) section (Identifier "Force") [text "Force"] $ do - paragraph (s "[ASR·HAB] [ASR·HAB]" "Force says what the speaker does with the clause." ++ s "[ASR·HAB]" "Every clause has exactly one force.") + paragraph (s "[ASR·HAB] [ASR·HAB]/cmp1" "Force says what the speaker does with the clause." ++ s "[ASR·HAB]" "Every clause has exactly one force.") codes [ code "ASR" "assertive: states that p" "declarative sentence" "The shell no longer accepts unsigned commands." "[ASR·HAB·CSS]" , code "DIR" "directive: tells the reader to do something" "imperative" "Upgrade nixlab-shell." "[DIR·PFV]" @@ -75,18 +87,29 @@ in do ] paragraph (s "[ASR·HAB]" "Each force is answered differently." ++ s "[ASR·HAB] [ASR·HAB]" "An assertion is true or false, and a directive is complied with." ++ s "[ASR·HAB] [ASR·HAB]" "A question is answered, and a declaration takes effect by being said." ++ s "[ASR·HAB] [ASR·HAB]" "A warning names a hazard, and a commitment is kept or broken.") paragraph (s "[ASR·HAB]" "Aspect applies under every force." ++ s "[ASR·HAB]" "Upgrade X, read as [DIR·PFV], and Upgraded X, read as [ASR·PFV], differ in force alone.") - paragraph (s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Records state what is true of the software, so their reader checks them." ++ s "[ASR·HAB·NEG]" "A command or a question is not true or false." ++ sx "[ASR·HAB] [ASR·HAB]" [text "Each document kind therefore allows only some forces, as ", reference (Identifier "Document rules"), text " sets out."]) - paragraph (s "[ASR·HAB·NEG]" "No accepted pair for force is in the corpus yet.") + paragraph (s "[ASR·HAB]" "A reader checks a record against the software." ++ s "[ASR·HAB·NEG]" "A command or a question is not true or false." ++ s "[ASR·HAB]" "Each document kind therefore allows only some forces.") + paragraph (s "[ASR·HAB]" "These accepted pairs from corpus v2 teach the force." ++ s "[ASR·HAB]" "Each row records the source of its text.") + pairs + [ pair "Manual" "Does the manual claim that one idea can replace JSON, REST and Bash? (sentence question)" "How can one idea replace and unify all three?" "[IRG·HAB·ABL·POS] or [ASR·HAB·ABL·POS] or [ASR·HAB·NEG·ABL·POS]" "One idea can replace and unify all three." "[ASR·HAB·ABL·POS]" "Kept from v1 P63. The bad side is verbatim, the second half of manual/introduction.typ:11-12 ('JSON, REST and Bash are completely different ideas – how can one idea replace and unify all three?'). The good side is written." + , pair "Issue" "Is the author asking which design holds, or stating that either one is acceptable? (sentence question)" "The rule is always on, or a `merge-gates.vx` setting." "[ASR·HAB] or [IRG·HAB]" "Is the rule always on, or a `merge-gates.vx` setting?" "[IRG·HAB]" "Kept from v1 P67. Written. Neither side is verbatim." + , pair "ChangeLog" "Do the authors commit to removing `seedKeys` and `services`, or only expect them to go? (sentence question, and ChangeLog: what behaves differently now)" "`seedKeys` and `services` will be removed." "[ASR·PFV] or [CMS·PFV]" "`seedKeys` and `services` will be removed in 0.6.0." "[CMS·PFV]" "Written. Based on nixlab-bundle/ChangeLog.md:619-620, where release 0.5.0 deprecates the two names. The release number 0.6.0 is invented. Neither side is verbatim." + , pair "ChangeLog" "what changed" "Split vortex-shell from the vortex repository into its own repository." "[ASR·PFV] or [DIR·PFV]" "Moved vortex-shell from the vortex repository into its own repository." "[ASR·PFV]" "Bad side verbatim: vortex-shell/vortex-shell/ChangeLog.md:321. Good side written." + ] + paragraph (s "[ASR·HAB·NEG]" "No accepted pair for DEC or ADM is in the corpus yet.") section (Identifier "Mood") [text "Mood"] $ do - paragraph (s "[ASR·HAB] [ASR·HAB]" "Mood says whether the clause is put forward as fact.") + paragraph (s "[ASR·HAB] [ASR·HAB]/cmp1" "Mood says whether the clause is put forward as fact.") codes [ code "FAC" "factual, the default, not rendered" "indicative" "The forge restarts the runner." "[ASR·HAB]" , code "HYP" "hypothetical: considered without commitment" "if we, would, suppose" "If we adopt option B, the forge would restart the runner." "[ASR·HYP·PFV] [ASR·HYP·HAB]" , code "COU" "counterfactive: known to be false" "would have, had we" "The law would have caught the race." "[ASR·COU·PFV]" ] - paragraph (s "[ASR·HAB]" "Issues and designs weigh options." ++ s "[ASR·HAB] [ASR·HAB]" "An option that a reader takes for a decision misleads that reader." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "ChangeLogs, READMEs and manuals are FAC throughout, because their reader acts on what they say.") - paragraph (s "[ASR·HAB·NEG]" "No accepted pair for mood is in the corpus yet.") + paragraph (s "[ASR·HAB]" "Issues and designs weigh options." ++ s "[ASR·HAB]" "An option in the place of a decision misleads a reader." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "ChangeLogs, READMEs and manuals are FAC throughout, because their reader acts on them.") + paragraph (s "[ASR·HAB]" "These accepted pairs from corpus v2 teach the mood." ++ s "[ASR·HAB]" "Each row records the source of its text.") + pairs + [ pair "README" "What does it do?" "The forge refuses to import the SQLite tables again, since a token revoked or a key removed since the import would work again." "[ASR·HAB] [ASR·HYP·HAB] (the hazard is only considered) or [ASR·HAB] [ASR·COU·HAB] (it is false that a revoked token works again)" "The forge refuses to import the SQLite tables again, since importing them again makes a token revoked or a key removed since the import work again." "[ASR·HAB] [ASR·HAB]" "The bad side is from nixlab-shell-todos-266/nixlab-shell/README.md:979-982, verbatim from \"refuses\" on, with the subject \"it\" replaced by \"The forge\" and the opening conditional dropped. The good side is written." + , pair "README" "What does it do? Here: which pushes does the forge refuse?" "A push that would give a branch and a tag one name is refused, since git takes such a name for the tag." "[ASR·HYP·HAB] [ASR·HAB] [ASR·HAB] (the push and its effect are only considered) or [ASR·COU·HAB] [ASR·HAB] [ASR·HAB] (the push never gives the name, since it is refused)" "A push that tries to give a branch and a tag one name is refused, since git takes such a name for the tag." "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "The bad side is verbatim from nixlab-shell-todos-266/nixlab-shell/README.md:246-248. The good side is written." + ] section (Identifier "Aspect") [text "Aspect"] $ do paragraph (s "[ASR·HAB]" "Aspect relates the event to the reference time." ++ s "[ASR·HAB]" "Every clause has an aspect.") @@ -96,24 +119,42 @@ in do , code "PRG" "progressive: under way, unfinished" "is …ing, keep" "Keep the guard below armed." "[DIR·PRG]" , code "HAB" "habitual: what the thing is or regularly does" "simple present, states, generic truths" "An Issue carries issueAssignee." "[ASR·HAB]" ] - paragraph (s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Aspect decides whether a clause reports an event or describes behaviour." ++ s "[ASR·HAB]" "The commonest failure in the corpus is moved against moves." ++ s "[ASR·HAB]" "States and generic truths take HAB.") - paragraph (s "[ASR·HAB] [ASR·HAB]" "An imperative takes the aspect of the act it asks for." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "A single act is PFV, a standing practice is HAB, and keeping a state is PRG.") - paragraph (s "[ASR·HAB]" "PRG has an imperfective paradox." ++ s "[ASR·HAB] [ASR·PFV]" "“The forge was importing reviews” leaves open whether the import finished.") - paragraph (s "[ASR·HAB·NEG]" "No accepted pair for aspect is in the corpus yet.") + paragraph (s "[ASR·HAB] [ASR·HAB]/cmp1" "Aspect decides whether a clause reports an event." ++ s "[ASR·HAB]" "The commonest failure in the corpus is moved against moves." ++ s "[ASR·HAB]" "States and generic truths take HAB.") + paragraph (s "[ASR·HAB]" "An imperative takes the aspect of its act." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "A single act is PFV, a standing practice is HAB, and keeping a state is PRG.") + paragraph (s "[ASR·HAB]" "PRG has an imperfective paradox." ++ s "[ASR·HAB] [ASR·PFV]/cmp1" "“The forge was importing reviews” leaves open whether the import finished.") + paragraph (s "[ASR·HAB]" "These accepted pairs from corpus v2 teach the aspect." ++ s "[ASR·HAB]" "Each row records the source of its text.") + pairs + [ pair "ChangeLog" "what behaves differently now (does the review table now hold the book as a settled fact, or is that move still going on?)" "Added `NixLab.ReviewTable`, which is now keeping nixlab-dsl's review book in vortex-table's `Table` over a `Reviews` schema." "[ASR·PFV] [ASR·PRG·INC]" "Added `NixLab.ReviewTable`, which now keeps nixlab-dsl's review book in vortex-table's `Table` over a `Reviews` schema." "[ASR·PFV] [ASR·HAB·INC]" "Good side adapted from nixlab-shell/nixlab-shell/ChangeLog.md, line 24 (\"which keeps nixlab-dsl's review book …\"). \"now\" was added because C5 requires it. The bad side is constructed." + , pair "ChangeLog" "what changed (in release 0.20.0)" "NixLab 0.57.0 replaces 0.55.0, with nixlab-shell 0.121.0.0 and nixlab-web 0.40.0.0." "[ASR·HAB]" "NixLab 0.57.0 replaced 0.55.0, with nixlab-shell 0.121.0.0 and nixlab-web 0.40.0.0." "[ASR·PFV]" "Bad side verbatim from shattrath/ChangeLog.md, 0.20.0. The good side is constructed. \"Upgraded NixLab from 0.55.0 to 0.57.0\", the style of 0.21.0, would also do." + , pair "README" "what does it do (does the documented revision turn the monomorphism restriction off?)" "vortex-elab turned the monomorphism restriction off, so `let cast = roll 100` is accepted." "[ASR·PFV] [ASR·HAB]" "vortex-elab turns the monomorphism restriction off, so `let cast = roll 100` is accepted." "[ASR·HAB] [ASR·HAB]" "Constructed for a README. The good side's wording follows vortex-elab/vortex-elab/ChangeLog.md (\"vortex-elab turns that restriction off, so the binding is accepted\")." + , pair "Manual" "Sentence question: which reading does it have? (Operator: \"From when are `reviews` and `approvals` the only copy, so that the backup must contain them?\")" "Once nixlab-shell 0.122.0.0 imports the reviews and sign-offs, `reviews` and `approvals` are the only copy of them." "[ASR·HAB] [ASR·HAB] or [ASR·PFV] [ASR·HAB]" "Once nixlab-shell 0.122.0.0 has imported the reviews and sign-offs, `reviews` and `approvals` are the only copy of them." "[ASR·PRF] [ASR·HAB]" "Good side verbatim from shattrath/DEPLOY.md, lines 85–86, cut before \"and a restore without either …\". The bad side is constructed." + , pair "ChangeLog" "what changed (in release 0.11.2)" "The app moved to horizon-javascript `snapshots/lts/ghc-10.0.x/3` (f68f45a)." "[ASR·PFV] or [ASR·PFV]" "Moved the app to horizon-javascript `snapshots/lts/ghc-10.0.x/3` (f68f45a)." "[ASR·PFV]" "Bad side from nixlab-web/nixlab-web/ChangeLog.md, 0.11.2: the first clause of the entry, cut before \", the snapshot that fixes the JavaScript code generator\". The good side is constructed." + ] section (Identifier "Phase") [text "Phase"] $ do - paragraph (s "[ASR·HAB]" "Phase is a change in truth across a reference point." ++ s "[ASR·HAB]" "Each document kind fixes its reference point." ++ s "[ASR·HAB] [ASR·HAB]" "A ChangeLog measures from the release, and an issue measures from the time of writing." ++ s "[ASR·HAB·NEG] [ASR·HAB·NEG]" "READMEs and manuals have no reference point, so their clauses carry no phase.") + paragraph (s "[ASR·HAB]" "Phase is a change in truth across a reference point." ++ s "[ASR·HAB]" "Each document kind fixes its reference point." ++ s "[ASR·HAB] [ASR·HAB]" "A ChangeLog measures from the release, and an issue measures from the time of writing." ++ s "[ASR·HAB·NEG] [ASR·HAB·NEG]/adv1" "READMEs and manuals have no reference point, so their kinds allow no phase.") table [t "Code", t "English cue", t "Before p", t "After p", t "Example", t "Reading"] - [ [c "INC", t "now", t "false", t "true", t "Operators must now back up STATE/reviews/.", c "[ASR·HAB·INC·DEO·NEC] obligation-holder operators"] + [ [c "INC", t "now", t "false", t "true", t "Operators must now back up STATE/reviews/.", c "[ASR·HAB·INC·DEO·NEC]"] , [c "CSS", t "no longer", t "true", t "false", t "The shell no longer accepts unsigned commands.", c "[ASR·HAB·CSS]"] , [c "CNT", t "still", t "true", t "true", t "Compiled code that loops without allocating is still uninterruptible.", c "[ASR·HAB] [ASR·HAB·CNT]"] , [c "EXP", t "not yet", t "false", t "false, p expected", t "The forge does not use it yet.", c "[ASR·HAB·EXP]"] ] - paragraph (s "[ASR·HAB] [ASR·HAB]" "The ChangeLog question about what behaves differently asks about truth on either side of a release." ++ s "[ASR·HAB]" "Phase answers that question directly.") - paragraph (s "[ASR·HAB·NEG]" "No accepted pair for phase is in the corpus yet.") + paragraph (s "[ASR·HAB]" "A ChangeLog reader asks about the difference between the two sides of a release." ++ s "[ASR·HAB]" "Phase answers that question directly.") + paragraph (s "[ASR·HAB]" "These accepted pairs from corpus v2 teach the phase." ++ s "[ASR·HAB]" "Each row records the source of its text.") + pairs + [ pair "ChangeLog" "What behaves differently now?" "`/search` is a page of the app." "[ASR·HAB]" "`/search` is now a page of the app." "[ASR·HAB·INC]" "Good side: the first clause of a verbatim sentence in nixlab-shell/nixlab-shell/ChangeLog.md:232 (0.99.0.0). Bad side written by deleting \"now\"." + , pair "ChangeLog" "What behaves differently now?" "A metered block's pure evaluation now spends fuel. Compiled code looping without allocating is uninterruptible." "[ASR·HAB·INC] [ASR·HAB]" "A metered block's pure evaluation now spends fuel. Compiled code looping without allocating is still uninterruptible." "[ASR·HAB·INC] [ASR·HAB·CNT]" "Written from vortex-shell/vortex-shell/ChangeLog.md:5 and :12 (0.7.0.0), whose two bullets are joined into one entry here, with \"now\" and \"still\" added. The second sentence follows the CNT example in spec section 2.7. The source's finite relative clause \"that loops\" became the participle \"looping\": a finite relative clause is itself an ASR clause, and C4 would demand a phase on it too." + , pair "ChangeLog" "What behaves differently now?" "Updated openfp.net from 2.3.19 to 2.3.20, cut on lts/2.3. It serves the Quality Control page at `https://openfp.net/quality-control/`. It still serves handbook edition 0.16.0.0." "[ASR·PFV] [ASR·HAB] [ASR·HAB·CNT]" "Updated openfp.net from 2.3.19 to 2.3.20, cut on lts/2.3. It now serves the Quality Control page at `https://openfp.net/quality-control/`. It still serves handbook edition 0.16.0.0." "[ASR·PFV] [ASR·HAB·INC] [ASR·HAB·CNT]" "Bad side verbatim from systems/skettis/ChangeLog.md:102-107 (0.2.63), trimmed. The trims are the relative clause \"which describes the handbook…\" and the sentence about the home page, each of whose finite verbs would be one more clause for C4 to judge. Good side written." + , pair "ChangeLog" "Which reading does it have? (sentence question)" "A rev-pinned flake input or `fetchgit` still fetches its commit after a later push to the branch." "[ASR·HAB·CNT]: it fetched before this release too, so nothing changed. or [ASR·HAB]: concessive \"still\" (\"even then\"). Concessive \"still\" has no code (Appendix A, 10), which leaves a clause with no phase, so it gives two answers under C4." "A rev-pinned flake input or `fetchgit` now fetches its commit after a later push to the branch." "[ASR·HAB·INC]" "Adapted from nixlab-shell/nixlab-shell/ChangeLog.md:1323 (0.2.1), which says verbatim \"a rev-pinned flake input or `fetchgit` still fetches after its branch moves on\". The temporal clause \"after its branch moves on\" became the verbless adjunct \"after a later push to the branch\": as a finite subordinate clause it is ASR and would need a phase of its own under C4." + , pair "ChangeLog" "Which reading does it have? (sentence question)" "A project or group called `sw.js` is not refused now." "[ASR·HAB·CSS]: INC over the negation, rewritten to CSS by rewrite 3. Such names were refused before and are allowed from this release. or [ASR·HAB·NEG]: \"now\" read as \"at present\". The clause has no phase, so it gives two answers under C4." "A project or group called `sw.js` is not yet refused." "[ASR·HAB·EXP]" "Good side verbatim from nixlab-shell/nixlab-shell/ChangeLog.md:239 (0.98.0.0). Bad side written as a realistic variant." + , pair "ChangeLog" "What behaves differently now?" "The forge imports each book from SQLite once, at its first use." "[ASR·PFV·ONE]" "The forge now imports each book from SQLite once, at its first use." "[ASR·PFV·INC·ONE]" "Good side verbatim from nixlab/ChangeLog.md:5 (0.58.0). Bad side written by deleting \"now\"." + , pair "ChangeLog" "Which reading does it have? (sentence question)" "Added `NixLab.ApprovalTable`. The forge does not use it now." "[ASR·PFV] [ASR·HAB·CSS]: the forge used it before and stops with this release. or [ASR·PFV] [ASR·HAB·NEG]: \"now\" read as \"at present\". The clause has no phase, so it gives two answers under C4." "Added `NixLab.ApprovalTable`. The forge does not use it yet." "[ASR·PFV] [ASR·HAB·EXP]" "Good side adapted from nixlab-shell/nixlab-shell/ChangeLog.md:25 (0.120.0.0). The bullet's middle sentences are trimmed, and its last sentence, \"The forge does not use it yet.\", is verbatim. Bad side written." + , pair "ChangeLog" "ChangeLog: what behaves differently now" "Breaking: callers constructing a `Shell` must add `pageSize = Nothing` to keep the old behaviour." "[ASR·HAB·TEL·NEC]" "Breaking: callers constructing a `Shell` must now add `pageSize = Nothing` to keep the old behaviour." "[ASR·HAB·INC·TEL·NEC]" "vortex-shell/vortex-shell/ChangeLog.md:103. The bad side is verbatim (the entry's first sentence). The good side adds \"now\" and is constructed." + , pair "ChangeLog" "Sentence question: which reading does it have? (Operator: \"Did the import already happen somewhere, or does the forge do it once after this release?\")" "Reviews and sign-offs are now kept in acid-state books under `/var/lib/nixlab/reviews/` and `/var/lib/nixlab/approvals/`, which the forge imported once from SQLite." "[ASR·HAB·INC] [ASR·PFV] or [ASR·HAB·INC] [ASR·PFV·ONE]" "Reviews and sign-offs are now kept in acid-state books under `/var/lib/nixlab/reviews/` and `/var/lib/nixlab/approvals/`, which the forge now imports once from SQLite." "[ASR·HAB·INC] [ASR·PFV·INC·ONE]" "Good side from shattrath/ChangeLog.md, 0.21.0. The real text says \"which the forge imports once\", with no \"now\", which fails C4 under v2, so \"now\" was added. The bad side is constructed." + ] section (Identifier "Modality") [text "Modality: Ground and Strength"] $ do - paragraph (s "[ASR·HAB]" "A modal is one Ground and one Strength, written ground first." ++ s "[ASR·HAB] [ASR·HAB]" "The ground says what makes the modal hold." ++ s "[ASR·HAB] [ASR·HAB]" "The strength says in how many of the admitted situations the content holds.") + paragraph (s "[ASR·HAB]" "A modal is one Ground and one Strength, written ground first." ++ s "[ASR·HAB]" "The ground is the source of the modal." ++ s "[ASR·HAB]" "The strength is the share of admitted situations with the content true.") table [t "Axis", t "Code", t "Meaning", t "Test"] [ [t "Ground", c "DEO", t "a rule or permission", t "the blame test: doing otherwise is possible but blameworthy"] , [t "Ground", c "ABL", t "the nature or capacity of the thing", t "the impossibility test: otherwise is not an option"] @@ -123,41 +164,64 @@ in do , [t "Strength", c "POS", t "possible", t "holds in some situation the ground admits"] ] table [t "English", t "Modal", t "Example", t "Reading"] - [ [t "must", c "DEO·NEC", t "Callers must add pageSize = Nothing.", c "[ASR·HAB·DEO·NEC] obligation-holder callers"] - , [t "should", c "DEO·WNC", t "Operators should rotate the token monthly.", c "[ASR·HAB·DEO·WNC] obligation-holder operators"] - , [t "may, of permission", c "DEO·POS", t "Reviewers may record a review while CI runs.", c "[ASR·HAB·DEO·POS] obligation-holder reviewers [ASR·HAB]"] + [ [t "must", c "DEO·NEC", t "Callers must add pageSize = Nothing.", c "[ASR·HAB·DEO·NEC]"] + , [t "should", c "DEO·WNC", t "Operators should rotate the token monthly.", c "[ASR·HAB·DEO·WNC]"] + , [t "may, of permission", c "DEO·POS", t "Reviewers may record a review while CI runs.", c "[ASR·HAB·DEO·POS] [ASR·HAB]"] , [t "can, of ability, and may, of what might happen", c "ABL·POS", t "The spend can vary by a few units.", c "[ASR·HAB·ABL·POS]"] , [t "inevitably, always by its nature", c "ABL·NEC", t "xs <- … always captures the whole value.", c "[ASR·HAB·ABL·NEC]"] , [t "to do G, you need", c "TEL·NEC", t "To build the manual you need Typst 0.14.", c "[ASR·HAB·TEL·NEC]"] , [t "to do G, you ought to", c "TEL·WNC", t "For reproducible timings you should pin the GPU clock.", c "[ASR·HAB·TEL·WNC]"] ] - paragraph (s "[ASR·HAB]" "The three tests are applied in turn to choose a ground." ++ s "[ASR·HAB]" "The blame test picks DEO." ++ s "[ASR·HAB]" "The impossibility test picks ABL." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "The goal test picks TEL, and TEL applies only when the clause names its goal.") - paragraph (s "[ASR·HAB] [ASR·HAB]" "Every DEO clause carries an obligation-holder, whether its strength is NEC, WNC or POS." ++ s "[ASR·HAB] [ASR·HAB]" "A may of permission therefore names the reader it permits." ++ s "[ASR·HAB] [ASR·HAB]" "The test for may is the question of who is permitted." ++ s "[ASR·HAB·NEG] [ASR·HAB]" "A may that permits nobody is ABL·POS." ++ s "[ASR·HAB·NEG] [ASR·HAB]" "“The spend may vary” permits nobody, so it reads as ABL·POS.") - paragraph (s "[ASR·HAB] [ASR·HAB]" "Must rarely says whether a rule or a goal requires the act." ++ s "[ASR·HAB] [ASR·HAB]" "A clause that names no goal is therefore DEO.") - paragraph (s "[ASR·HAB·NEG]" "dreamstop has no alethic ground." ++ s "[ASR·HAB] [ASR·HAB]" "Necessity fixed by how the system works is ABL.") + paragraph (s "[ASR·HAB]" "The three tests are applied in turn to choose a ground." ++ s "[ASR·HAB]" "The blame test picks DEO." ++ s "[ASR·HAB]" "The impossibility test picks ABL." ++ s "[ASR·HAB] [ASR·HAB]" "The goal test picks TEL, and TEL applies only to a clause with a named goal.") + paragraph (s "[ASR·HAB]" "Must rarely names its source." ++ s "[ASR·HAB]" "A clause without a named goal is therefore DEO.") + paragraph (s "[ASR·HAB·NEG]" "dreamstop has no alethic ground." ++ s "[ASR·HAB]" "Necessity from the workings of the system is ABL.") paragraph (s "[ASR·HAB·NEG]" "Granting a permission to another party is not a modal of its own." ++ s "[ASR·HAB]" "“Guests can be given permission to push” reads as ABL·POS over DEO·POS, with the inner modal as content of the outer clause.") - paragraph (s "[ASR·HAB] [ASR·HAB·NEG]" "Every combination of ground and strength is meaningful, so no reading writes an invalid modal.") - paragraph (s "[ASR·HAB·NEG]" "No accepted pair for modality is in the corpus yet.") + paragraph (s "[ASR·HAB]" "Every combination of ground and strength is meaningful." ++ s "[ASR·HAB·NEG]" "No reading contains an invalid modal.") + section (Identifier "The holder of an obligation") [text "The holder of an obligation"] $ do + paragraph (s "[ASR·HAB·NEG]" "The codes do not record the holder of a DEO clause." ++ s "[ASR·HAB] [ASR·HAB·NEG]" "The holder is a fact about the subject, and the codes see no subjects.") + table [t "Sentence", t "Reading", t "Holder"] + [ [t "« Il faut sauvegarder X. »", c "[ASR·HAB·DEO·NEC]", t "nobody named"] + , [t "« Les opérateurs doivent sauvegarder X. »", c "[ASR·HAB·DEO·NEC]", t "operators"] + ] + paragraph (s "[ASR·HAB]" "Both sentences match the same pattern." ++ s "[ASR·HAB] [ASR·HAB]" "A ChangeLog reader asks about obligations, and readers answer that question from the text." ++ sx "[ASR·HAB]" [reference (Identifier "What codepoints cannot see"), text " lists this limit."]) + paragraph (s "[ASR·HAB]" "These accepted pairs from corpus v2 teach the modality." ++ s "[ASR·HAB]" "Each row records the source of its text.") + pairs + [ pair "Manual" "Manual: how do I know it worked" "Each certificate should name Let's Encrypt as its issuer." "[ASR·HAB·DEO·WNC] or [ASR·HAB·INF]" "Each certificate names Let's Encrypt as its issuer." "[ASR·HAB]" "systems/skettis/DEPLOY.md:166. The bad side is verbatim up to the comma. The source continues \"and www.nixlab.systems's should name www.nixlab.systems as its subject\", which has the same issue. The good side is constructed." + , pair "README" "README: what does it need" "The modules in `scope` must be installed where GHC can find them at run time." "[ASR·HAB·DEO·NEC] [ASR·HAB·ABL·POS] or [ASR·HAB·ABL·NEC] [ASR·HAB·ABL·POS]" "Elaboration needs the modules in `scope` installed where GHC can find them at run time." "[ASR·HAB·TEL·NEC] [ASR·HAB·ABL·POS]" "vortex-shell/vortex-shell/README.md:47-48. The good side is verbatim up to its closing colon, which introduces a code block. The bad side is constructed." + , pair "ChangeLog" "must I do anything, for operators" "The deploy should now wait for an idle planner." "[ASR·HAB·INC·DEO·WNC] or [ASR·HAB·INC·DEO·WNC] or no reading (a deploy is not a reader, so the DEO·WNC clause has no holder and law 13 drops it)" "Operators should now wait for an idle planner before deploying." "[ASR·HAB·INC·DEO·WNC]" "Adapted from nixlab/ChangeLog.md:729-730 (\"That is why the deploy should wait for an idle planner.\"). Both sides written: \"That is why\" was dropped and \"now\" added." + , pair "README" "what does it need" "`chalk` needs typst, FFmpeg and the design kit's fonts at run time." "[ASR·HAB·TEL·NEC] (\"at run time\" taken as the goal) or [ASR·HAB·ABL·NEC] (no goal named, so by its nature)" "To run `chalk` you need typst, FFmpeg and the design kit's fonts." "[ASR·HAB·TEL·NEC]" "Bad side verbatim: chalk/chalk-shell/README.md:153. Good side written." + ] section (Identifier "Negation") [text "Negation scope"] $ do paragraph (s "[ASR·HAB]" "NEG before the modal negates the modal." ++ s "[ASR·HAB]" "NEG after the modal negates the content." ++ s "[ASR·HAB]" "The position of NEG in the reading is its scope.") table [t "Codes", t "Logic", t "English", t "Example", t "Reading"] - [ [c "NEG·DEO·NEC", t "not necessarily p", t "need not", t "Callers need not change their imports.", c "[ASR·HAB·NEG·DEO·NEC] obligation-holder callers"] - , [c "DEO·NEC·NEG", t "necessarily not p", t "must not", t "Agents must not push to main.", c "[ASR·HAB·DEO·NEC·NEG] obligation-holder agents"] + [ [c "NEG·DEO·NEC", t "not necessarily p", t "need not", t "Callers need not change their imports.", c "[ASR·HAB·NEG·DEO·NEC]"] + , [c "DEO·NEC·NEG", t "necessarily not p", t "must not", t "Agents must not push to main.", c "[ASR·HAB·DEO·NEC·NEG]"] , [c "NEG·ABL·POS", t "not possibly p", t "cannot", t "The tag cannot be moved by a later push.", c "[ASR·HAB·NEG·ABL·POS]"] , [c "ABL·POS·NEG", t "possibly not p", t "can refrain, can leave unset", t "You can leave pageSize unset.", c "[ASR·HAB·ABL·POS·NEG]"] ] - paragraph (s "[ASR·HAB]" "“Need not” and “must not” differ only in scope." ++ s "[ASR·HAB] [ASR·HAB]" "The first leaves an act optional, and the second forbids it." ++ s "[ASR·HAB·NEG·ABL·POS] [ASR·HAB]" "A single negation slot cannot tell them apart, so dreamstop has two.") + paragraph (s "[ASR·HAB]" "“Need not” and “must not” differ only in scope." ++ s "[ASR·HAB] [ASR·HAB]" "The first leaves an act optional, and the second forbids it." ++ s "[ASR·HAB·NEG·ABL·POS] [ASR·HAB]/adv1" "A single negation slot cannot tell them apart, so dreamstop has two.") paragraph (s "[ASR·HAB]" "May, in the sense of permission, is DEO·POS." ++ s "[ASR·HAB] [ASR·HAB]" "Its dual form NEG·DEO·NEC·NEG means the same and is rewritten to DEO·POS.") paragraph (s "[ASR·HAB] [ASR·HAB]" "A clause with no modal has one negation position, and NEG there denies the clause.") - paragraph (s "[ASR·HAB·NEG]" "No accepted pair for negation scope is in the corpus yet.") + paragraph (s "[ASR·HAB]" "These accepted pairs from corpus v2 teach the negation scope." ++ s "[ASR·HAB]" "Each row records the source of its text.") + pairs + [ pair "ChangeLog" "must I do anything, for callers" "Callers cannot change their imports when upgrading from version 0.2.1." "[ASR·HAB·NEG·ABL·POS]" "Callers need not change their imports when upgrading from version 0.2.1." "[ASR·HAB·NEG·DEO·NEC]" "Corpus v1 pair P48, both sides kept verbatim. Real house wording of the good shape: nixlab-shell-metering/ChangeLog.md:819, \"the forge need not be redeployed for it\"." + , pair "ChangeLog" "Which reading does it have? (the sentence question, which decides \"must I do anything, for users\")" "Configs need nothing." "[ASR·HAB·NEG·DEO·NEC] or [ASR·HAB·NEG·DEO·NEC] or [ASR·HAB·NEG·DEO·NEC] with no holder: breaks law 13, dropped, so no reading" "Users need not change their configs." "[ASR·HAB·NEG·DEO·NEC]" "Bad side verbatim: strobe/strobe/ChangeLog.md:309 (0.25.0.0 entry). Good side is the smallest rewrite. The same ChangeLog has the house form at strobe/strobe/ChangeLog.md:245: \"Users do not need to change existing configuration programs or files.\"" + , pair "README" "Which reading does it have?" "A store written for one schema may not be opened with a schema that adds, removes or reorders any of them." "[ASR·HAB·NEG·DEO·POS] [ASR·HAB] [ASR·HAB] [ASR·HAB] or [ASR·HAB·ABL·POS·NEG] [ASR·HAB] [ASR·HAB] [ASR·HAB]" "A store written for one schema must not be opened with a schema that adds, removes or reorders any of them." "[ASR·HAB·DEO·NEC·NEG] [ASR·HAB] [ASR·HAB] [ASR·HAB]" "Good side verbatim: vortex-table-acid/vortex-table-acid/README.md:52-54, the clause after \"so\". The bad side is a one-word edit." + , pair "README" "Which reading does it have?" "The tag can not be moved by a later push." "[ASR·HAB·NEG·ABL·POS] or [ASR·HAB·ABL·POS·NEG]" "The tag cannot be moved by a later push." "[ASR·HAB·NEG·ABL·POS]" "Written for this corpus. The good side is the 2.9 example. Not found verbatim under /home/lc/src." + ] section (Identifier "Bound") [text "Bound"] $ do codes [ code "ONE" "happens one time in the program's life, however long it takes" "once, the first time, a one-off" "The store now imports the SQLite review tables once, at its first use." "[ASR·PFV·INC·ONE]" ] - paragraph (s "[ASR·HAB]" "A one-off migration and recurring behaviour call for different action from operators." ++ s "[ASR·HAB] [ASR·HAB]" "ONE excludes HAB, because one time and regularly contradict each other." ++ s "[ASR·HAB]" "Bare HAB already means each occurrence." ++ s "[ASR·HAB]" "Object quantifiers such as each and every are content, not bound.") - paragraph (s "[ASR·HAB·NEG]" "No accepted pair for bound is in the corpus yet.") + paragraph (s "[ASR·HAB]" "A one-off migration and recurring behaviour call for different action from operators." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "ONE excludes HAB, because one time and regularly contradict each other." ++ s "[ASR·HAB]" "Bare HAB already means each occurrence." ++ s "[ASR·HAB]" "Object quantifiers such as each and every are content, not bound.") + paragraph (s "[ASR·HAB]" "These accepted pairs from corpus v2 teach the bound." ++ s "[ASR·HAB]" "Each row records the source of its text.") + pairs + [ pair "ChangeLog" "Sentence question: which reading does it have? (Operator: \"Does each restart open the review store again?\")" "It now holds nixlab-dsl's review book in vortex-table-acid's durable tables under `STATE/reviews/` and its approval book under `STATE/approvals/`, and the server now opens it once." "[ASR·HAB·INC] [ASR·PFV·INC·ONE] or [ASR·HAB·INC] [ASR·HAB·INC]" "It now holds nixlab-dsl's review book in vortex-table-acid's durable tables under `STATE/reviews/` and its approval book under `STATE/approvals/`, and the server now opens it once per start." "[ASR·HAB·INC] [ASR·HAB·INC]" "Bad side verbatim from nixlab-shell/nixlab-shell/ChangeLog.md, 0.122.0.0, line 5 (second sentence of the review-store entry). The good side is constructed." + , pair "Manual" "Sentence question: which reading does it have? (Operator: \"Can this failure appear in the journal more than once?\")" "`MovesNotFollowed` or `CheckpointFailed` after the import is reported once and tried again with the next to-do call." "[ASR·PFV·ONE] [ASR·HAB] or [ASR·HAB] [ASR·HAB]" "`MovesNotFollowed` or `CheckpointFailed` after the import is reported once per failure and tried again with the next to-do call." "[ASR·HAB] [ASR·HAB]" "Bad side verbatim from shattrath/DEPLOY.md, lines 265–267. The good side is constructed." + , pair "ChangeLog" "Which reading does it have?" "The server now opens the review store once." "[ASR·PFV·INC·ONE] or [ASR·HAB·INC]" "The server now opens the review store at each start." "[ASR·HAB·INC]" "Corpus v1 pair P52, kept verbatim. Written for the corpus, not found verbatim under /home/lc/src." + ] section (Identifier "Evidence") [text "Evidence"] $ do paragraph (s "[ASR·HAB]" "Evidence states the basis of an assertion." ++ s "[ASR·HAB]" "It appears on ASR clauses with mood FAC only.") @@ -168,23 +232,16 @@ in do , code "INF" "inferred" "so, must be, probably" "The lock is probably inherited." "[ASR·HAB·INF]" , code "REC" "remembered" "as before, last time" "The import took an hour last time." "[ASR·PFV·REC]" ] - paragraph (s "[ASR·HAB] [ASR·HAB]" "A ChangeLog asks whether any claim is measured." ++ s "[ASR·HAB] [ASR·HAB]" "A claim counts as measured when its evidence is OBS or PUP." ++ s "[ASR·HAB]" "A command or a question has no basis to state." ++ s "[ASR·HAB·NEG] [ASR·HAB·NEG]" "A hypothetical or counterfactual clause commits to nothing, so it has nothing to back.") - paragraph (s "[ASR·HAB·NEG]" "No accepted pair for evidence is in the corpus yet.") - - section (Identifier "Roles") [text "Roles"] $ do - paragraph (s "[ASR·HAB]" "A role records a fact about a clause's place in the document." ++ s "[ASR·HAB·NEG]" "No code carries that fact." ++ s "[ASR·HAB]" "Each clause has at most one role.") - table [t "Role", t "Meaning", t "Used by", t "Fits"] - [ [c "step", t "a thing the reader does, in order", t "manual, README task instructions", t "DIR clauses only"] - , [c "precondition", t "a state that holds before a step", t "manual", t "ASR or IRG clauses with PRF or HAB"] - , [c "release-action", t "the change this release makes: Added, Removed, Upgraded", t "ChangeLog", t "ASR·PFV clauses with no phase"] - , [c "obligation-holder reader", t "the reader a DEO modal binds, such as operators or callers", t "ChangeLog, manual", t "ASR clauses with a DEO modal"] - ] - paragraph (s "[ASR·HAB]" "Every DEO clause carries an obligation-holder." ++ s "[ASR·HAB]" "The ChangeLog question about obligations reads its answer from these roles.") - paragraph (s "[ASR·HAB·NEG]" "No accepted pair for roles is in the corpus yet.") + paragraph (s "[ASR·HAB]" "A ChangeLog reader asks about measured claims." ++ s "[ASR·HAB]" "OBS and PUP mark a claim as measured." ++ s "[ASR·HAB]" "A command or a question has no basis to state." ++ s "[ASR·HAB·NEG] [ASR·HAB·NEG]/adv1" "A hypothetical or counterfactual clause commits to nothing, so it has nothing to back.") + paragraph (s "[ASR·HAB]" "These accepted pairs from corpus v2 teach the evidence." ++ s "[ASR·HAB]" "Each row records the source of its text.") + pairs + [ pair "ChangeLog" "what behaves differently now" "The generation triggers add about 4 µs per written row." "[ASR·HAB]" "Measured on a copy of the live database, the generation triggers add about 4 µs per written row." "[ASR·HAB·OBS]" "Good side verbatim, first clause: nixlab-shell-todos-266/ChangeLog.md:478. The sentence goes on \", so they are unchanged.\" Corpus v1 pair P55." + ] + paragraph (s "[ASR·HAB·NEG]" "No accepted pair for PUP, RPR, INF or REC is in the corpus yet.") section (Identifier "Semantics and laws") [text "Semantics and laws"] $ do section (Identifier "What each layer denotes") [text "What each layer denotes"] $ do - paragraph (s "[ASR·HAB]" "In this section, p is the content of a clause, a proposition about the program or the reader." ++ s "[ASR·HAB]" "Each layer applies to the result of the layer below it.") + paragraph (s "[ASR·HAB]" "In this chapter, p is the content of a clause, a proposition about the program or the reader." ++ s "[ASR·HAB]" "Each layer applies to the result of the layer below it.") codeBlock (Language "text") "denote c = force ∘ evidence ∘ mood ∘ phase ∘ outerNeg ∘ modal ∘ innerNeg ∘ bound ∘ aspect" table [t "Layer", t "What it denotes"] [ [t "Aspect", t "PFV: the event occurs as a whole. PRF: it has occurred and its result holds. PRG: it is under way and may not finish. HAB: it is what the thing typically does, with exceptions allowed."] @@ -197,7 +254,7 @@ in do , [t "Force", t "maps the result into its kind of act: judgements, plans, sets of alternatives, changes made by saying, hazards or commitments."] ] section (Identifier "Normal form") [text "Normal form"] $ do - paragraph (s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "The order is fixed, so two readings mean the same only if they are equal after three rewrites.") + paragraph (s "[ASR·HAB]" "The order is fixed." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "Two readings mean the same only if they are equal after three rewrites.") ordered [ paragraph (s "[ASR·HAB] [ASR·HAB]" "NEG·G·NEC·NEG becomes G·POS, and NEG·G·POS·NEG becomes G·NEC.") , paragraph (s "[ASR·HAB]" "A clause with no modal carries at most one NEG.") @@ -212,90 +269,117 @@ in do , [t "4. Counit", t "only ABL·NEC has a counit: ABL·NEC p implies p. DEO·NEC p does not imply p, because an obligation is not a fact. TEL·NEC p does not either, because a goal may be abandoned."] , [t "5. Unit of ability", t "p implies ABL·POS p: what happens was within capacity"] , [t "6. Phase from Before and After", t "INC p is not Before p and After p. CSS p is Before p and not After p. CNT p is Before p and After p. EXP p is neither, with p expected."] - , [t "7. Phase needs a reference point", t "a clause carries a phase only in a document that has a reference point"] + , [t "7. Phase needs a reference point", t "a kind whose documents have no reference point allows no phase in its patterns"] , [t "8. No phase on DEC or CMS", t "a declaration takes effect at the release and a commitment lies after it"] , [t "9. ONE excludes HAB", t "one time and regularly contradict each other"] , [t "10. Evidence on ASR·FAC only", t "only a factual assertion has a basis to state"] , [t "11. Mood restrictions", t "HYP only on ASR and IRG, COU only on ASR"] , [t "12. TEL names its goal", t "annotators apply this test, and the package cannot check it"] - , [t "13. Roles fit force", t "as the table in Roles gives, and every DEO clause carries an obligation-holder"] ] - paragraph (s "[ASR·HAB]" "Law 4 is the deontic no-counit point." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "A reviewer who reads an obligation as a fact takes a requirement for evidence that it is met.") + paragraph (s "[ASR·HAB]" "Law 4 is the deontic no-counit point." ++ s "[ASR·HAB]/rel2 [ASR·HAB]" "A reviewer who reads an obligation as a fact takes a requirement for evidence of compliance.") section (Identifier "Verdicts") [text "Verdicts"] $ do paragraph (s "[ASR·HAB]" "People or agents produce readings." ++ s "[ASR·HAB·NEG·ABL·POS]" "No program can compute readings from English." ++ s "[ASR·HAB]" "Everything after the readings is computed.") ordered - [ paragraph (s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "The package normalises every reading and drops any reading that breaks a law, as an annotator error.") - , paragraph (s "[ASR·HAB] [ASR·HAB]" "Each reader contributes the set of readings it finds." ++ s "[ASR·HAB·NEG] [ASR·HAB]" "A reader that finds none contributes the token no reading.") - , paragraph (s "[ASR·HAB·NEG] [ASR·HAB]" "If every reader finds no reading, the verdict is Nonsense." ++ s "[ASR·HAB] [ASR·HAB]" "If the union of contributions is one reading, the verdict is Clear." ++ s "[ASR·HAB]" "Otherwise the verdict is Ambiguous, with the readings found.") + [ paragraph (s "[ASR·HAB] [ASR·HAB]" "The package normalises every reading and drops any reading against a law, as an annotator error.") + , paragraph (s "[ASR·HAB] [ASR·HAB]/rel1" "Each reader contributes the set of readings it finds." ++ s "[ASR·HAB·NEG]/rel2 [ASR·HAB]" "A reader that finds none contributes the token no reading.") + , paragraph (s "[ASR·HAB·NEG]/adv2 [ASR·HAB]" "If every reader finds no reading, the verdict is Nonsense." ++ s "[ASR·HAB]/adv2 [ASR·HAB]" "If the union of contributions is one reading, the verdict is Clear." ++ s "[ASR·HAB]" "Otherwise the verdict is Ambiguous, with the readings found.") ] paragraph (s "[ASR·HAB] [ASR·HAB]" "One reader with no reading beside another reader with one reading is a disagreement, and a disagreement is ambiguity.") table [t "Sentence", t "Readings", t "Verdict"] [ [t "The shell no longer accepts unsigned commands.", c "[ASR·HAB·CSS]", t "Clear"] - , [t "Added the review store, which moved reviews out of SQLite.", c "[ASR·PFV] release-action [ASR·PFV·ONE] or [ASR·PFV] release-action [ASR·HAB]", t "Ambiguous"] + , [t "Added the review store, which moved reviews out of SQLite.", c "[ASR·PFV] [ASR·PFV·ONE] or [ASR·PFV] [ASR·HAB]", t "Ambiguous"] , [t "The shell now still accepts unsigned commands.", t "none", t "Nonsense"] ] - section (Identifier "Questions") [text "Questions and the answer function"] $ do - paragraph (s "[ASR·HAB] [ASR·HAB]" "Each document kind has questions that its reader is entitled to have answered." ++ s "[ASR·HAB] [ASR·HAB]" "An answer function takes the clear readings of a document, with their roles and in order, and returns the set of answers." ++ s "[ASR·HAB] [ASR·HAB]" "A question is resolved when the set has exactly one element.") + section (Identifier "Questions") [text "Questions"] $ do + paragraph (s "[ASR·HAB] [ASR·HAB]/rel1" "Each document kind has questions that its reader is entitled to have answered." ++ s "[ASR·HAB]" "A kind's question set is the set of questions in its pairs.") + table [t "Kind", t "Questions"] + [ [t "ChangeLog", t "What changed? What behaves differently now? Must I do anything? Is any claim measured?"] + , [t "README", t "What is this? What does it do? What does it need?"] + , [t "Manual", t "What do I do? In what order? How do I know it worked? How do I recover?"] + , [t "Every kind", t "Which reading does it have?"] + ] section (Identifier "The sentence question") [text "The sentence question"] $ do - paragraph (s "[ASR·HAB] [ASR·HAB]" "Every sentence of every document carries the question of which reading it has." ++ s "[ASR·HAB]" "Its answer is the verdict, resolved when the verdict is Clear." ++ s "[ASR·HAB] [ASR·HAB]" "Document rules apply only to clear sentences, so a rule is a predicate over one reading.") - section (Identifier "ChangeLog questions") [text "ChangeLog questions"] $ do - table [t "Question", t "Answer"] - [ [t "What changed?", t "the list of release-action clauses. An empty list is two answers: nothing changed, or the entry did not say."] - , [t "What behaves differently now?", t "the list of clauses with INC or CSS, plus DEC clauses. A standing claim with no phase, where rule C4 requires one, contributes two answers."] - , [t "Must I do anything, for reader r?", t "the clauses whose role is obligation-holder r. With none for r, the answer is no only if the release names some obligation-holder, otherwise two answers."] - , [t "Is any claim measured?", t "for each ASR clause: measured if its evidence is OBS or PUP."] + paragraph (s "[ASR·HAB]" "Every sentence of every document carries the sentence question." ++ s "[ASR·HAB]" "Its answer is the verdict, resolved only for a Clear verdict." ++ s "[ASR·HAB]" "The sentence question is the only computed question." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "Patterns are checked only on clear sentences, so a pattern meets one reading.") + section (Identifier "Questions answered by readers") [text "Questions answered by readers"] $ do + paragraph (s "[ASR·HAB]" "Readers answer the other questions, in the same way as readings." ++ s "[ASR·HAB]" "Each reader gives the answers of the text." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "A question is resolved when every reader gives the same single answer.") + paragraph (s "[ASR·HAB]" "The holder of an obligation and the result of a step depend on content beyond the codes." ++ s "[ASR·HAB]" "The codes still decide part of each answer." ++ s "[ASR·HAB]" "A clause outside the kind's patterns is rejected before any reader answers." ++ s "[ASR·HAB·NEG·ABL·POS]" "A standing claim without a phase cannot answer the ChangeLog question about differences.") + + section (Identifier "Document kinds") [text "Document kinds"] $ do + paragraph (s "[ASR·HAB]" "A document kind is the set of code patterns it allows for each clause position." ++ s "[ASR·HAB·NEG]" "A kind has nothing else: no header, no name inside the file and no rules beyond the patterns." ++ s "[ASR·HAB·NEG]/rel2 [ASR·HAB]" "A clause that matches no pattern for its position is rejected.") + section (Identifier "Kind repositories") [text "Kind repositories"] $ do + paragraph (s "[ASR·HAB]" "dreamstop owns the document kinds." ++ s "[ASR·HAB]" "Each kind is its own repository under dreamstop/kinds, with its own tags, beside the language package dreamstop/dreamstop." ++ s "[ASR·HAB]" "The kind's name is the repository's name." ++ s "[ASR·HAB]" "The repository holds allowed.vx, the patterns, and pairs.vx, the pairs.") + paragraph (s "[ASR·HAB·ABL·POS]" "Anyone can fork a kind without forking the language." ++ s "[ASR·HAB] [ASR·HAB]" "Quality-control guides and other projects refer to a kind by repository and tag, and render its patterns and pairs from it." ++ s "[ASR·HAB·NEG]" "A guide never restates a kind.") + paragraph (s "[ASR·HAB]" "The repository's flake has one check." ++ s "[ASR·HAB]" "It confirms the three laws for every pair, the patterns on both sides of every pair, and a good side for every pattern.") + section (Identifier "Patterns") [text "Patterns"] $ do + paragraph (s "[ASR·HAB]" "A kind file is a Vortex do-block." ++ s "[ASR·HAB] [ASR·HAB]" "The statement main declares a pattern for main clauses and returns its name." ++ s "[ASR·HAB] [ASR·HAB]" "The statements relative, adverbial and complement declare a pattern for a subordinate clause and name the pattern of its parent." ++ s "[ASR·HAB]" "A pattern is a do-block with one line per slot.") + paragraph (s "[ASR·HAB]" "The block below is part of the ChangeLog kind, not a complete file.") + codeBlock (Language "haskell") "do action <- main $ do\n force [ASR]\n aspect [PFV]\n relative action $ do\n force [ASR]\n aspect [HAB]\n phase [INC, CSS]" + table [t "Line", t "Meaning"] + [ [c "aspect [PFV]", t "the slot holds that code"] + , [c "phase [INC, CSS]", t "the slot holds one of these codes"] + , [c "required phase", t "the slot holds some value, any of them"] + , [c "optional modal", t "the slot holds some value, or is empty"] + , [t "slot not mentioned", t "the slot is empty, and an unmentioned mood is FAC"] ] - section (Identifier "README questions") [text "README questions"] $ do - table [t "Question", t "Answer"] - [ [t "What is this?", t "the first sentence, which is one or more ASR·HAB clauses"] - , [t "What does it do?", t "the ASR·HAB clauses without a modal or with an ABL modal"] - , [t "What does it need?", t "the TEL·NEC clauses. An empty list means nothing only if the README says so in a NEG·TEL·NEC clause."] + paragraph (s "[ASR·HAB]" "A main clause is allowed by a matching main pattern." ++ s "[ASR·HAB]" "A subordinate clause is allowed by a matching subordinate pattern for the pattern of its parent.") + paragraph (s "[ASR·HAB]" "The modal line covers both negations, the ground and the strength." ++ s "[ASR·HAB·NEG]" "Adding a code to a slot changes no kind file." ++ s "[ASR·HAB]" "A slot twice in one pattern is an error." ++ s "[ASR·HAB]" "Shared patterns are ordinary values, bound with let and reused.") + paragraph (s "[ASR·HAB] [ASR·HAB]/cmp1 [ASR·HAB]/adv1" "A kind says what it allows, so a slot left out is forbidden." ++ s "[ASR·HAB·NEG]" "A reader never has to remember a default." ++ s "[ASR·HAB] [ASR·HAB·NEG]/adv1" "Every clause also obeys the laws, so a pattern never allows a breach of a law.") + section (Identifier "The ChangeLog kind") [text "The ChangeLog kind"] $ do + codeBlock (Language "haskell") "do let standing = do\n force [ASR]\n aspect [HAB]\n required phase\n optional modal\n background = do\n force [ASR]\n aspect [PFV, PRF, HAB]\n optional modal\n action <- main $ do\n force [ASR]\n aspect [PFV]\n relative action $ do\n force [ASR]\n aspect [HAB]\n phase [INC, CSS]\n oneOff <- main $ do\n force [ASR]\n aspect [PFV]\n required phase\n bound [ONE]\n measured <- main $ do\n force [ASR]\n aspect [PFV]\n evidence [OBS, PUP]\n claim <- main standing\n declared <- main $ do\n force [DEC]\n aspect [PFV]\n committed <- main $ do\n force [CMS]\n aspect [PFV]\n for_ [oneOff, measured, claim, declared, committed] $ \\parent -> do\n relative parent standing\n adverbial parent background\n complement parent background" + bullets + [ paragraph (s "[ASR·HAB]" "The forces are ASR, DEC and CMS." ++ s "[ASR·HAB] [ASR·HAB]/adv1 [ASR·HAB]/adv1" "A ChangeLog states obligations as assertions, so “Operators must now set metering.config” is allowed and “Set metering.config” is rejected.") + , paragraph (s "[ASR·HAB]" "A PFV main clause with no phase and no bound is the release action, such as Added, Removed or Upgraded." ++ s "[ASR·HAB]" "One-off behaviour of the released program is PFV with ONE and a phase.") + , paragraph (s "[ASR·HAB]/rel2 [ASR·HAB]" "A relative clause that describes a release action is HAB with INC or CSS." ++ s "[ASR·HAB] [ASR·HAB·NEG]/adv1" "The release verb already says the thing is new, so the English needs no now." ++ s "[ASR·HAB]" "“Added the review store, which keeps reviews in acid-state” reads as [ASR·PFV] [ASR·HAB·INC].") + , paragraph (s "[ASR·HAB]" "A ChangeLog describes the resulting state, not the migration." ++ s "[ASR·HAB]" "“Reviews and sign-offs are now kept in acid-state rather than SQLite” is one clause, [ASR·HAB·INC], with both sides of the change." ++ s "[ASR·HAB]/rel2 [ASR·HAB]" "A migration verb in the present, as in “which moves reviews out of SQLite”, leaves open whether the migration happens once or keeps happening." ++ s "[ASR·HAB]" "A real one-off migration takes once and reads as PFV·ONE, as in “On first start the forge imports the SQLite reviews once.”") + , paragraph (s "[ASR·HAB·NEG] [ASR·HAB]/adv1" "The kind has no PRG, because a release is a fixed state.") + , paragraph (s "[ASR·HAB]" "Every standing claim has a phase." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "A measured outcome is exempt, because it states both sides itself.") + , paragraph (s "[ASR·HAB·NEG] [ASR·HAB]/adv1" "No pattern mentions mood, so every clause is FAC.") ] - section (Identifier "Manual questions") [text "Manual questions"] $ do - paragraph (s "[ASR·HAB]" "A procedure is a run of step clauses under one heading.") - table [t "Question", t "Answer"] - [ [t "What do I do?", t "the list of step clauses"] - , [t "In what order?", t "the document order of the steps"] - , [t "How do I know it worked?", t "for each step, the ASR clauses without a role that follow it before the next step"] - , [t "How do I recover?", t "the steps that follow a precondition clause carrying a negation"] + section (Identifier "The README kind") [text "The README kind"] $ do + codeBlock (Language "haskell") "do let description = do\n force [ASR]\n aspect [HAB]\n optional modal\n claim <- main description\n step <- main $ do\n force [DIR]\n aspect [PFV, PRG, HAB]\n optional modal\n for_ [claim, step] $ \\parent -> do\n relative parent description\n complement parent description\n adverbial parent $ do\n force [ASR]\n required aspect\n optional modal" + bullets + [ paragraph (s "[ASR·HAB·NEG] [ASR·HAB·NEG]/adv1" "The kind allows no phase, because a README has no reference point.") + , paragraph (s "[ASR·HAB·NEG] [ASR·HAB]/adv1" "Main and relative assertions allow no PFV or PRF, because release history belongs in the ChangeLog.") + , paragraph (s "[ASR·HAB]" "DIR main clauses carry task steps.") + , paragraph (s "[ASR·HAB]" "Every clause is FAC.") ] - - section (Identifier "Document rules") [text "Document rules"] $ do - paragraph (s "[ASR·HAB]" "dreamstop owns every document kind." ++ s "[ASR·HAB]" "A document kind is a value with five parts: a reference point, the forces and moods it allows, its questions with their answer functions, its rules and its pairs." ++ s "[ASR·HAB] [ASR·HAB]" "Every kind contains the sentence question and rule D1, and adds to them without removing anything." ++ s "[ASR·HAB·NEG]" "Kinds do not inherit from one another.") - paragraph (s "[ASR·HAB]" "Each kind lives in its own repository, such as dreamstop/kinds/changelog, beside the language package dreamstop/dreamstop." ++ s "[ASR·HAB·ABL·POS]" "Anyone can fork a kind without forking the language." ++ s "[ASR·HAB] [ASR·HAB]" "Quality-control guides and other projects refer to a kind by repository and tag, and render its rules and pairs from it." ++ s "[ASR·HAB·NEG] [ASR·HAB·NEG]" "A guide never restates a kind's rules, so it does not drift from the checker.") - paragraph (s "[ASR·HAB]" "Each rule is a predicate over one clear reading, or over the readings of one release, entry or procedure." ++ s "[ASR·HAB]" "An entry is one bullet of a ChangeLog." ++ s "[ASR·HAB]" "The reasons come from the specification.") - table [t "Rule", t "Kind", t "Statement and reason"] - [ [t "D1", t "every document", t "Every sentence is clear, because the sentence question applies everywhere."] - , [t "D2", t "ChangeLog, README, manual", t "FAC throughout, because their reader acts on what they say."] - , [t "C1", t "ChangeLog", t "Force is ASR, DEC or CMS. Obligations are ASR·DEO·NEC with a holder, so the reader sees whom they bind."] - , [t "C2", t "ChangeLog", t "PFV without ONE appears only on release-action clauses. One-off behaviour of the released program is PFV·ONE."] - , [t "C3", t "ChangeLog", t "No PRG, because a release is a fixed state."] - , [t "C4", t "ChangeLog", t "Every ASR clause that is not a release-action carries a phase, unless it has OBS or PUP evidence."] - , [t "C5", t "ChangeLog", t "A HAB clause straight after a release-action in the same sentence counts as new only with INC."] - , [t "C6", t "ChangeLog", t "CNT needs an INC or CSS in the same entry, because still is news only beside a change."] - , [t "C7", t "ChangeLog", t "Every DEO clause, whether must, should or may, carries an obligation-holder."] - , [t "C8", t "ChangeLog", t "An absent obligation is NEG·DEO·NEC, never NEG·ABL·POS."] - , [t "R1", t "README", t "Force is ASR or DIR, with DIR only on step clauses."] - , [t "R2", t "README", t "No phase."] - , [t "R3", t "README", t "No PFV or PRF outside steps, and no release-action."] - , [t "R4", t "README", t "DEO·POS only where a rule grants permission, ABL·POS for what the program can do."] - , [t "M1", t "manual", t "Force is ASR, DIR, ADM or IRG. DIR only on step clauses, IRG only on precondition clauses."] - , [t "M2", t "manual", t "Every DIR clause is a step."] - , [t "M3", t "manual", t "A precondition has aspect PRF or HAB, never PRG."] - , [t "M4", t "manual", t "No phase."] - , [t "M5", t "manual", t "Obligations are ASR·DEO with a holder."] - , [t "I1", t "issue", t "Force is ASR, DIR or IRG, and HYP and COU are allowed. The reference point is the time of writing."] - , [t "U1", t "interface copy", t "Force is ASR or DIR."] - ] - paragraph (s "[ASR·HAB·NEG]" "Issues and interface copy have no ruled question set." ++ s "[ASR·HAB]" "Only the sentence question and rules I1 and U1 apply to them.") - paragraph (s "[ASR·HAB·NEG]" "No accepted pair for any document rule is in the corpus yet.") + section (Identifier "The manual kind") [text "The manual kind"] $ do + codeBlock (Language "haskell") "do let plain = do\n force [ASR]\n required aspect\n optional modal\n step <- main $ do\n force [DIR]\n aspect [PFV, PRG, HAB]\n optional modal\n adverbial step $ do\n force [ASR]\n aspect [PRF, HAB]\n optional modal\n adverbial step $ do\n force [IRG]\n aspect [HAB]\n optional modal\n statement <- main $ do\n force [ASR]\n aspect [PFV, HAB]\n optional modal\n optional evidence\n warning <- main $ do\n force [ADM]\n aspect [PFV, PRG, HAB]\n optional modal\n for_ [step, statement, warning] $ \\parent -> do\n relative parent plain\n complement parent plain\n for_ [statement, warning] $ \\parent ->\n adverbial parent plain" + bullets + [ paragraph (s "[ASR·HAB] [ASR·HAB]" "Steps are DIR main clauses, and warnings are ADM main clauses." ++ s "[ASR·HAB]" "ASR·PFV main clauses state the product of a step, as in “The forge printed its version.”") + , paragraph (s "[ASR·HAB]" "The condition of a step is PRF or HAB, never PRG." ++ s "[ASR·HAB]/rel2 [ASR·HAB·ABL·POS]" "A step that waits on an event under way can run before the end of the event.") + , paragraph (s "[ASR·HAB]" "Questions appear only as the condition of a step.") + , paragraph (s "[ASR·HAB·NEG]" "The kind allows no phase.") + ] + paragraph (s "[ASR·HAB]" "This manual is written in the manual kind." ++ s "[ASR·HAB]" "The build checks every reading in the source against these patterns.") + section (Identifier "Issues and labels") [text "The issue and labels kinds"] $ do + codeBlock (Language "haskell") "-- issue\ndo let open = do\n required mood\n required aspect\n optional phase\n optional modal\n optional bound\n statement <- main $ do\n force [ASR]\n open\n optional evidence\n request <- main $ do\n force [DIR]\n required aspect\n optional modal\n question <- main $ do\n force [IRG]\n open\n for_ [statement, request, question] $ \\parent -> do\n relative parent (force [ASR] >> open >> optional evidence)\n adverbial parent (force [ASR] >> open >> optional evidence)\n complement parent (force [ASR] >> open >> optional evidence)\n\n-- labels\ndo main $ do\n force [ASR]\n aspect [HAB]\n optional modal\n main $ do\n force [DIR]\n aspect [PFV]" + paragraph (s "[ASR·HAB]" "An issue weighs options and open questions." ++ s "[ASR·HAB]" "Its kind allows every mood, aspect, phase and modal, with phase relative to the time of writing." ++ s "[ASR·HAB]" "Labels are the short strings of a user interface, such as buttons, status lines and error messages." ++ s "[ASR·HAB] [ASR·HAB]" "A button names an action, and a status states a fact." ++ s "[ASR·HAB·NEG]" "A label has no subordinate clauses." ++ s "[ASR·HAB·NEG]" "These two kinds have no question set beyond the sentence question.") + section (Identifier "The website kind") [text "The website kind"] $ do + codeBlock (Language "haskell") "do let description = do\n force [ASR]\n aspect [HAB]\n optional modal\n optional evidence\n claim <- main description\n plan <- main $ do\n force [CMS]\n aspect [PFV]\n invitation <- main $ do\n force [DIR]\n aspect [PFV]\n for_ [claim, plan, invitation] $ \\parent -> do\n relative parent description\n complement parent description\n adverbial parent $ do\n force [ASR]\n aspect [PRF, HAB]\n optional modal" + paragraph (s "[ASR·HAB]" "A website page describes the offering to someone deciding whether to use it.") + bullets + [ paragraph (s "[ASR·HAB]" "Standing claims are ASR·HAB, with no phase." ++ s "[ASR·HAB] [ASR·HAB·NEG]/adv1" "A visitor reads the site at an unknown time, so now has no reference point.") + , paragraph (s "[ASR·HAB]" "Plans are CMS·PFV, never HAB." ++ s "[ASR·HAB·NEG]" "A roadmap item is not a released capability.") + , paragraph (s "[ASR·HAB·DEO·POS]" "Claims may carry evidence." ++ s "[ASR·HAB·NEG]" "The codes do not show an absolute claim, so evidence is optional.") + , paragraph (s "[ASR·HAB]" "Calls to action are DIR·PFV main clauses, as in “Read the manual.”") + , paragraph (s "[ASR·HAB]" "Every clause is FAC.") + ] + paragraph (s "[ASR·HAB·NEG]" "The website kind has no ruled question set yet." ++ s "[ASR·HAB]" "The front page of this site is written in the website kind, and the build checks it.") + paragraph (s "[ASR·HAB]" "These accepted pairs from corpus v2 teach the document kinds." ++ s "[ASR·HAB]" "Each row records the source of its text.") + pairs + [ pair "README" "Which reading does it have? (sentence question)" "Projects are still renamed and deleted in SQLite." "[ASR·HAB·CNT]: breaks law 7, so the annotation is dropped and no reading remains (Nonsense)." "Projects are renamed and deleted in SQLite." "[ASR·HAB]" "Bad side verbatim from nixlab-shell/nixlab-shell/README.md:1010-1011, the first clause, with \"so the books follow…\" trimmed. Good side written." + , pair "README" "Which reading does it have? (sentence question)" "Once an hour the forge removes the logs its retention no longer keeps." "[ASR·HAB] [ASR·HAB·CSS]: the reduced relative breaks law 7, so the annotation is dropped and no reading remains (Nonsense)." "Once an hour the forge removes the logs that outlive its retention." "[ASR·HAB] [ASR·HAB]" "Bad side verbatim from nixlab-shell/nixlab-shell/README.md:838, with the list after the colon trimmed. Good side written." + , pair "README" "which reading does it have? (sentence question)" "A changed title, description or target now withdraws approvals, pending automatic merge and rebase intent, and train membership." "no reading ([ASR·HAB·INC] breaks law 7, because a README has no reference point, and is dropped) or [ASR·HAB] (\"now\" read as \"at present\")" "A changed title, description or target withdraws approvals, pending automatic merge and rebase intent, and train membership." "[ASR·HAB]" "Good side verbatim: nixlab-shell/nixlab-shell/README.md:28-30. Bad side written by adding \"now\"." + ] + paragraph (s "[ASR·HAB·NEG]" "No accepted pair for manual steps, labels or websites is in the corpus yet.") section (Identifier "Minimal pairs") [text "Minimal pairs"] $ do - paragraph (s "[ASR·HAB]" "Minimal pairs specify every rule." ++ s "[ASR·HAB·NEG]" "A rule with no pair is not a rule." ++ s "[ASR·HAB]" "dreamstop has one kind of pair.") + paragraph (s "[ASR·HAB]" "Minimal pairs specify every kind." ++ s "[ASR·HAB]" "dreamstop has one kind of pair.") table [t "Part", t "Content"] - [ [t "Question", t "a question from the document kind's set, or the sentence question"] + [ [t "Question", t "a question from the kind's set, or the sentence question"] , [t "Bad side", t "a text and its readings, which leave the question with no answer or several"] , [t "Good side", t "a text and its one reading, which give exactly one answer"] , [t "Edit", t "the difference between the two, derived and never declared"] @@ -304,70 +388,71 @@ in do ordered [ paragraph (s "[ASR·HAB]" "The good side resolves the question.") , paragraph (s "[ASR·HAB·NEG]" "The bad side does not resolve it.") - , paragraph (s "[ASR·HAB] [ASR·HAB·NEG]" "The edit is minimal: no smaller edit to the bad side resolves the question.") + , paragraph (s "[ASR·HAB]" "The edit is minimal." ++ s "[ASR·HAB·NEG]" "No smaller edit to the bad side resolves the question.") ] section (Identifier "Edit size") [text "Edit size"] $ do paragraph (s "[ASR·HAB]" "The package computes the edit from the readings." ++ s "[ASR·HAB]" "A bad side with several readings is compared through its closest reading." ++ s "[ASR·HAB] [ASR·HAB]" "The edit is the set of slot changes, and an inserted or deleted clause counts as all its slots." ++ s "[ASR·HAB]" "Its size is the number of slot changes.") - paragraph (s "[ASR·HAB]" "Law 3 is checked over readings." ++ s "[ASR·HAB] [ASR·HAB]" "The package applies every proper non-empty subset of the slot changes to the bad reading and runs the answer function." ++ s "[ASR·HAB·NEG]" "None of those smaller edits resolves the question." ++ s "[ASR·HAB] [ASR·HAB]" "Annotators judge whether the wording is minimal.") + paragraph (s "[ASR·HAB]" "Law 3 is checked over readings." ++ s "[ASR·HAB]" "The package applies every proper non-empty subset of the slot changes to the bad reading." ++ s "[ASR·HAB·NEG]" "None of those smaller edits resolves the question." ++ s "[ASR·HAB] [ASR·HAB]/cmp1" "Annotators judge whether the wording is minimal.") section (Identifier "The corpus") [text "The corpus"] $ do - paragraph (s "[ASR·HAB]" "The corpus is one Vortex data file, read by the package, the manual and annotating agents." ++ s "[ASR·HAB]" "Each entry holds the kind, the question, the rule, the bad side, the good side, a paragraph of reasons and the source of the text." ++ s "[ASR·HAB·NEG]" "The edit is not stored." ++ s "[ASR·HAB]" "Disputed pairs stay in a separate appendix with both annotators' readings.") - paragraph (s "[ASR·HAB] [ASR·HAB]" "A pair enters the corpus when two independent annotators agree on the good side and on the verdict of the bad side." ++ s "[ASR·HAB]" "The package then confirms the three laws." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Annotating agents are prompted with the pairs for their document kind, so the pairs both calibrate and test them.") + paragraph (s "[ASR·HAB]" "The corpus is Vortex data." ++ s "[ASR·HAB]" "The pairs for a kind live in its repository." ++ s "[ASR·HAB]" "The pairs for the sentence question and the laws live in dreamstop/dreamstop.") + paragraph (s "[ASR·HAB]" "Each entry holds the kind, the question, the rule, the bad side, the good side, a paragraph of reasons and the source of the text." ++ s "[ASR·HAB·NEG]" "The edit is not stored." ++ s "[ASR·HAB]" "Disputed pairs stay in a separate appendix with both annotators' readings.") + paragraph (s "[ASR·HAB]" "Agreement of two independent annotators on the good side and on the verdict of the bad side admits a pair." ++ s "[ASR·HAB]" "The package then confirms the three laws." ++ s "[ASR·HAB] [ASR·HAB]/adv1 [ASR·HAB]/adv1" "Annotating agents receive the pairs for their kind, so the pairs both calibrate and test them.") section (Identifier "Annotating a sentence") [text "Annotating a sentence"] $ do - paragraph (s "[ASR·HAB] [ASR·PRF] precondition" "Before you start, you have read the rules for the sentence's document kind.") ordered - [ stepThen "[DIR·PFV] step" "Mark every finite verb group in the sentence." "[ASR·HAB]" "Each marked group is one clause, in text order." - , stepThen "[DIR·PFV] step" "Choose a force for each clause." "[ASR·HAB]" "Each clause has one of ASR, DIR, IRG, DEC, ADM and CMS." - , stepThen "[DIR·PFV] step" "Choose a mood for each clause." "[ASR·HAB] [ASR·HAB]" "Most clauses take the default FAC, which is not written." - , stepThen "[DIR·PFV] step" "Choose an aspect for each clause." "[ASR·HAB]" "Each clause has one of PFV, PRF, PRG and HAB." - , stepThen "[DIR·PFV] step [ASR·HAB] [ASR·HAB]" "Choose a phase if the document kind has a reference point and the clause compares the two sides of it." "[ASR·HAB]" "The clause has INC, CSS, CNT, EXP or no phase." - , stepThen "[DIR·PFV] step [DIR·PFV] step" "Choose a modal with the blame, impossibility and goal tests, and place each NEG by its scope." "[ASR·HAB]" "The clause has at most one modal and at most two negations." - , stepThen "[DIR·PFV] step [ASR·HAB]" "Add ONE, evidence and a role where the clause carries them." "[ASR·HAB]" "The clause is complete." - , stepThen "[DIR·PFV] step [DIR·PFV] step" "Write the codes in the fixed order, and apply the three rewrites." "[ASR·HAB]" "The reading is in normal form." - , stepThen "[DIR·PFV] step [ASR·HAB] [DIR·PFV] step" "Look for a slot in which another careful reader chooses a different code, and write each such reading." "[ASR·HAB]" "The sentence has one reading or several." + [ stepThen "[ASR·PRF]/adv2 [DIR·PFV]" "When you have read the patterns of the document's kind, mark every finite verb group in the sentence." "[ASR·HAB]" "Each marked group is one clause, in text order." + , stepThen "[DIR·PFV]" "Give each clause its position and parent." "[ASR·HAB]" "Each clause is main, relative, adverbial or complement." + , stepThen "[DIR·PFV]" "Choose a force for each clause." "[ASR·HAB]" "Each clause has one of ASR, DIR, IRG, DEC, ADM and CMS." + , stepThen "[DIR·PFV]" "Choose a mood for each clause." "[ASR·HAB]" "Most clauses take the default FAC." + , stepThen "[DIR·PFV]" "Choose an aspect for each clause." "[ASR·HAB]" "Each clause has one of PFV, PRF, PRG and HAB." + , stepThen "[ASR·HAB]/adv2 [DIR·PFV]" "If the kind has a reference point, choose a phase for each clause." "[ASR·HAB]" "Each clause has INC, CSS, CNT, EXP or no phase." + , stepThen "[DIR·PFV] [DIR·PFV]" "Choose a modal with the blame, impossibility and goal tests, and place each NEG by its scope." "[ASR·HAB]" "Each clause has at most one modal and at most two negations." + , stepThen "[DIR·PFV]" "Add ONE and evidence to the clauses with a bound or a basis." "[ASR·HAB]" "Each clause is complete." + , stepThen "[DIR·PFV] [DIR·PFV]" "Write the codes in the fixed order, and apply the three rewrites." "[ASR·HAB]" "The reading is in normal form." + , stepThen "[DIR·PFV]" "Write a second reading for each slot with a different code from another careful reader." "[ASR·HAB]" "The sentence has one reading or several." ] section (Identifier "Checking a reading") [text "Checking a reading"] $ do - paragraph (s "[ASR·HAB] [ASR·HAB]" "A reading is well formed when every law holds for it." ++ s "[ASR·HAB] [ASR·HAB]" "A sentence is clear when every reader writes the same single reading.") + paragraph (s "[ASR·HAB] [ASR·HAB]/adv1" "A reading is well formed when every law holds for it." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "It fits the kind when every clause matches a pattern for its position." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "A sentence is clear when every reader writes the same single reading.") section (Identifier "When readers disagree") [text "When readers disagree"] $ do - recover "[ASR·HAB·NEG] precondition [DIR·PFV] step [ASR·HAB]" "If two readings do not match, find the first slot in which they differ." - paragraph (s "[ASR·HAB] [ASR·HAB]" "That slot names the question the sentence leaves open.") - recover "[ASR·HAB·NEG] precondition [DIR·PFV] step [ASR·HAB]" "If the slot does not settle by its layer's test, rewrite the sentence so that only one code fits." + recover "[ASR·HAB·NEG]/adv2 [DIR·PFV]" "If two readings do not match, find the first slot with different codes." + paragraph (s "[ASR·HAB]" "That slot names the open question of the sentence.") + recover "[ASR·HAB·NEG]/adv2 [DIR·PFV]" "If the layer's test does not settle the slot, rewrite the sentence for one code." paragraph (s "[ASR·HAB]" "The rewritten sentence returns to the first step.") + recover "[ASR·HAB·NEG]/adv2 [DIR·PFV]" "If a clause matches no pattern, rewrite the clause within the kind." + paragraph (s "[ASR·HAB]" "The rewritten clause returns to the first step.") section (Identifier "Writing a pair") [text "Writing a pair"] $ do - paragraph (s "[ASR·HAB] [ASR·PRF] precondition" "Before you start, a review has found a question with no answer or several.") ordered - [ stepThen "[DIR·PFV] step" "Write the question in its reader's words." "[ASR·HAB]" "The pair has its question." - , stepThen "[DIR·PFV] step [ASR·PFV] [DIR·PFV] step" "Copy the bad side exactly as it appeared, and annotate it." "[ASR·HAB]" "The bad side has its readings." - , stepThen "[DIR·PFV] step [ASR·HAB] [DIR·PFV] step" "Make the smallest edit that gives the question exactly one answer, and annotate the result." "[ASR·HAB]" "The good side has its one reading." - , stepThen "[DIR·PFV] step" "Try every smaller edit to the bad side." "[ASR·HAB·NEG]" "None of them resolves the question." - , stepThen "[DIR·PFV] step" "Record the kind, the rule, a paragraph of reasons and the source." "[ASR·HAB]" "The pair is ready for verification." + [ stepThen "[ASR·PRF]/adv2 [DIR·PFV]" "When a review has found a question with no answer or several, write the question in its reader's words." "[ASR·HAB]" "The pair has its question." + , stepThen "[DIR·PFV] [DIR·PFV]" "Copy the bad side verbatim, and annotate it." "[ASR·HAB]" "The bad side has its readings." + , stepThen "[DIR·PFV] [DIR·PFV]" "Make the smallest edit with exactly one answer to the question, and annotate the result." "[ASR·HAB]" "The good side has its one reading." + , stepThen "[DIR·PFV]" "Try every smaller edit to the bad side." "[ASR·HAB·NEG]" "None of them resolves the question." + , stepThen "[DIR·PFV]" "Record the kind, the rule, a paragraph of reasons and the source." "[ASR·HAB]" "The pair is ready for verification." ] section (Identifier "Checking a pair") [text "Checking a pair"] $ do - paragraph (s "[ASR·HAB] [ASR·HAB]" "A pair is complete when the three laws hold for it." ++ s "[ASR·HAB] [ASR·HAB]" "It is accepted when two independent annotators agree on it.") + paragraph (s "[ASR·HAB] [ASR·HAB]/adv1" "A pair is complete when the three laws hold for it." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "It is accepted when two independent annotators agree on it.") section (Identifier "When a pair cannot be written") [text "When a pair cannot be written"] $ do - recover "[ASR·HAB·NEG] precondition [DIR·PFV] step [ASR·HAB] [ASR·HAB]" "If no code separates the two sides, open an issue that proposes the code or rule they need." + recover "[ASR·HAB·NEG]/adv2 [DIR·PFV]" "If no code separates the two sides, open an issue with a proposal for a new code or pattern." paragraph (s "[ASR·HAB]" "The issue carries both sides and the question.") - recover "[ASR·HAB·NEG] precondition [DIR·PFV] step" "If the annotators do not agree, move the pair to the appendix of disputed pairs with both readings." - paragraph (s "[ASR·HAB] [ASR·HAB]" "The dispute shows where the language is ambiguous.") + recover "[ASR·HAB·NEG]/adv2 [DIR·PFV]" "If the annotators do not agree, move the pair to the appendix of disputed pairs with both readings." + paragraph (s "[ASR·HAB]" "The dispute marks an ambiguity in the language.") section (Identifier "Reviewing with dreamstop") [text "Reviewing with dreamstop"] $ do - paragraph (s "[ASR·HAB] [ASR·HAB] precondition" "Before a review starts, the change under review holds its documentation.") ordered - [ stepThen "[DIR·PFV] step" "Annotate every changed sentence, each reviewer working alone." "[ASR·HAB]" "Each sentence has a verdict." - , stepThen "[DIR·PFV] step" "Run the answer function for each question in the document kind's set." "[ASR·HAB]" "Each question has its set of answers." - , stepThen "[DIR·PFV] step [ASR·HAB·NEG]" "Report each sentence that is not clear, and each question with no answer or several." "[ASR·HAB]" "Each finding names a slot or a question." + [ stepThen "[ASR·HAB]/adv2 [DIR·PFV]" "When the change under review holds its documentation, annotate every changed sentence alone." "[ASR·HAB]" "Each sentence has a verdict." + , stepThen "[DIR·PFV]" "Answer each question of the document's kind from the text." "[ASR·HAB]" "Each question has an answer from each reviewer." + , stepThen "[DIR·PFV]" "Report each unclear sentence, each clause outside the kind and each question with no answer or several." "[ASR·HAB]" "Each finding names a slot, a pattern or a question." ] section (Identifier "Checking a review") [text "Checking a review"] $ do - paragraph (s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "A review passes when every sentence is clear and every question has exactly one answer." ++ s "[ASR·HAB]" "Clause 2, PFV against HAB, is a complete finding.") + paragraph (s "[ASR·HAB] [ASR·HAB]/adv1 [ASR·HAB]/adv1" "A review passes when every sentence is clear and every question has the same single answer from every reviewer." ++ s "[ASR·HAB]" "Clause 2, PFV against HAB, is a complete finding.") section (Identifier "Settling a finding") [text "Settling a finding"] $ do - recover "[ASR·HAB·NEG] precondition [DIR·PFV] step" "If a sentence does not get one reading, rewrite the sentence." - paragraph (s "[ASR·PFV] [ASR·HAB·NEG]" "An explanation of what the author meant does not settle a finding.") - recover "[ASR·HAB·NEG] precondition [DIR·PFV] step [ASR·HAB]" "If a question does not get one answer, add the clause that answers it." + recover "[ASR·HAB·NEG]/adv2 [DIR·PFV]" "If a sentence does not get one reading, rewrite the sentence." + paragraph (s "[ASR·HAB·NEG]" "An explanation of the author's intent does not settle a finding.") + recover "[ASR·HAB·NEG]/adv2 [DIR·PFV]" "If a question does not get one answer, add a clause with the answer." paragraph (s "[ASR·HAB]" "Every settled finding is a candidate pair for the corpus.") section (Identifier "This manual's questions") [text "This manual's questions"] $ do - paragraph (s "[ASR·HAB]" "This manual is held to the Manual questions." ++ s "[ASR·HAB] [ASR·HAB]" "Each step is followed by the sentence that states its result." ++ s "[ASR·HAB] [ASR·HAB]" "Each procedure has a section that starts from a failed check." ++ s "[ASR·HAB] [ASR·HAB]" "The repository keeps this map in prose/questions.vx, and the build checks it.") + paragraph (s "[ASR·HAB]" "This manual answers the manual kind's questions for each procedure." ++ s "[ASR·HAB]" "A sentence with the result follows each step." ++ s "[ASR·HAB]" "Each procedure has a section for a failed check." ++ s "[ASR·HAB] [ASR·HAB]" "The repository keeps this map in prose/questions.vx, and the build checks it.") table [t "Procedure", t "What do I do?", t "In what order?", t "How do I know it worked?", t "How do I recover?"] [ [t "Annotating a sentence", t "its steps", t "their numbers", t "Checking a reading", t "When readers disagree"] , [t "Writing a pair", t "its steps", t "their numbers", t "Checking a pair", t "When a pair cannot be written"] @@ -379,24 +464,25 @@ in do section (Identifier "Example: the review store") [text "The review store"] $ do quotation $ paragraph (t "Added the review store (NixLab.ReviewStore), which moved reviews and sign-offs out of SQLite.") table [t "Reading", t "Codes", t "What a reader takes from it"] - [ [t "1", c "[ASR·PFV] release-action [ASR·PFV·ONE]", t "the release moved the existing reviews one time"] - , [t "2", c "[ASR·PFV] release-action [ASR·HAB]", t "the store is where reviews live"] + [ [t "1", c "[ASR·PFV] [ASR·PFV·ONE]", t "the release moved the existing reviews one time"] + , [t "2", c "[ASR·PFV] [ASR·HAB]", t "the store is the home of reviews"] ] - paragraph (s "[ASR·HAB]" "The sentence is ambiguous in the aspect of clause 2." ++ s "[ASR·HAB·NEG] [ASR·HAB]" "Reading 2 has no phase, so it fails rule C5." ++ s "[ASR·HAB]" "Rule C5 calls for INC on the second clause.") - quotation $ paragraph (t "Added the review store (NixLab.ReviewStore), which now moves reviews and sign-offs out of SQLite.") - paragraph (s "[ASR·HAB]" "The rewrite reads as [ASR·PFV] release-action [ASR·HAB·INC]." ++ s "[ASR·HAB]" "The one-time import has its own sentence in the same entry, with PFV, INC and ONE.") + paragraph (s "[ASR·HAB]" "The sentence is ambiguous in the aspect of clause 2." ++ s "[ASR·HAB·NEG]" "Neither reading fits the ChangeLog kind." ++ s "[ASR·HAB]" "A relative clause on a release action is HAB with INC or CSS.") + paragraph (s "[ASR·HAB]" "A rewrite with now moves keeps the migration verb." ++ s "[ASR·HAB·NEG·ABL·POS] [ASR·HAB]/cmp1" "Readers cannot tell whether the move happens once or at every write.") + quotation $ paragraph (t "Added the review store (NixLab.ReviewStore), which keeps reviews and sign-offs in acid-state rather than SQLite.") + paragraph (s "[ASR·HAB]" "The rewrite describes the resulting state." ++ s "[ASR·HAB]" "It reads as [ASR·PFV] [ASR·HAB·INC], with clause 2 relative to clause 1." ++ s "[ASR·HAB·NEG] [ASR·HAB]/adv1" "Clause 2 needs no now, because the release verb Added supplies the newness." ++ s "[ASR·HAB]" "A real one-time import takes its own sentence in the same entry, with PFV, INC and ONE.") section (Identifier "Example: vortex-shell") [text "vortex-shell and uninterruptible loops"] $ do quotation $ paragraph (t "Compiled code that loops without allocating is neither charged nor interruptible.") - paragraph (s "[ASR·PFV]" "vortex-shell 0.7.0.0 had this entry." ++ s "[ASR·HAB·NEG] [ASR·HAB]" "Its clauses carry no phase, so the entry fails rule C4." ++ s "[ASR·HAB]" "A reader takes the limitation as new or as old.") - paragraph (s "[ASR·PFV]" "vortex-shell 0.7.0.1 corrected the entry with still." ++ s "[ASR·HAB] [ASR·PFV] [ASR·HAB]" "Its CNT is licensed by a CSS in the same entry, because 0.7.0.0 began charging evaluation that allocates.") + paragraph (s "[ASR·PFV]" "vortex-shell 0.7.0.0 had this entry." ++ s "[ASR·HAB·NEG]" "Its main clause has no phase." ++ s "[ASR·HAB·NEG]" "The ChangeLog kind rejects a standing claim without a phase.") + paragraph (s "[ASR·PFV]" "vortex-shell 0.7.0.1 corrected the entry with still.") quotation $ paragraph (t "Compiled code that loops without allocating is still uninterruptible, so the shell cannot stop it.") - paragraph (s "[ASR·HAB]" "The rewrite reads as [ASR·HAB] [ASR·HAB·CNT] [ASR·HAB·NEG·ABL·POS].") + paragraph (s "[ASR·HAB]" "The rewrite reads as [ASR·HAB] [ASR·HAB·CNT] [ASR·HAB·NEG·ABL·POS]." ++ s "[ASR·HAB]" "Still is news only beside a change in the same entry." ++ s "[ASR·HAB·NEG] [ASR·HAB]/adv1" "Patterns do not see the entry, so readers check this.") section (Identifier "Example: operator obligations") [text "Operator obligations"] $ do quotation $ paragraph (t "Operators must now back up STATE/reviews/ and STATE/approvals/ with the rest of the state directory.") - paragraph (s "[ASR·HAB]" "This sentence from nixlab-shell 0.122.0.0 is clear." ++ s "[ASR·HAB]" "It reads as [ASR·HAB·INC·DEO·NEC] obligation-holder operators.") - paragraph (s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Its force is ASR, because the ChangeLog reports that an obligation exists." ++ s "[ASR·HAB] [ASR·HAB]" "Its ground is DEO, because skipping the backup is possible but blameworthy." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Its holder is operators, so the question of what operators do has one answer.") + paragraph (s "[ASR·HAB]" "This sentence from nixlab-shell 0.122.0.0 is clear." ++ s "[ASR·HAB]" "It reads as [ASR·HAB·INC·DEO·NEC].") + paragraph (s "[ASR·HAB]" "Its force is ASR, as for every ChangeLog obligation." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "Its ground is DEO, because skipping the backup is possible but blameworthy." ++ s "[ASR·HAB] [ASR·HAB]/adv1" "Its subject names operators, so readers give one answer to the question about obligations.") quotation $ paragraph (t "After restoring a state directory without them, operators should now restore them.") - paragraph (s "[ASR·HAB]" "The companion sentence reads as [ASR·HAB·INC·DEO·WNC] obligation-holder operators." ++ s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "It recommends where the first sentence obliges, and the strength slot records the difference.") + paragraph (s "[ASR·HAB]" "The companion sentence reads as [ASR·HAB·INC·DEO·WNC]." ++ s "[ASR·HAB]" "The strength slot records the difference between a recommendation and an obligation.") section (Identifier "What codepoints cannot see") [text "What codepoints cannot see"] $ do paragraph (s "[ASR·HAB]" "dreamstop checks the shape of meaning, not its content." ++ s "[ASR·HAB·ABL·POS]" "A passing document can fail its reader through these limits.") @@ -404,8 +490,8 @@ in do [ [t "Annotation is human", t "two annotators can differ for reasons unrelated to the language"] , [t "Content is invisible", t "the package cannot see whether a TEL clause names its goal, whether a figure lacks evidence, or whether two clauses talk about the same thing"] , [t "Synonyms share codes", t "the spend can vary and the spend may vary are both ABL·POS, though a reader might hear permission in may"] - , [t "The reader set is not computed", t "a release that names operators can stay silent about callers"] - , [t "Order inside a sentence", t "do A or B and do A and B in any order look like ordered steps"] + , [t "Who an obligation binds", t "« Il faut sauvegarder X » and « Les opérateurs doivent sauvegarder X » match the same pattern, so readers answer whether they must act"] + , [t "Patterns see a clause and its parent only", t "still beside a change in the same entry, a result after every step and a release action in every release are for readers and pairs"] , [t "Segmentation is syntactic", t "the finiteness rule can split a sentence where meaning does not"] , [t "The weakest boundary", t "PFV against HAB for things that happen once in the program's life split annotators, and ONE should fix most of it"] , [t "The evidence for the aspect set", t "the choice rests on 78 pairs and two annotators per scheme, so it is a decision, not a measurement"] @@ -413,7 +499,7 @@ in do ] section (Identifier "Reference table") [text "Reference table"] $ do - paragraph (s "[ASR·HAB]" "The table lists every code in display order.") + paragraph (s "[ASR·HAB]" "The table lists every code in display order, then the positions.") table [t "Layer", t "Code", t "Meaning"] [ [t "Force", c "ASR", t "states that p"] , [t "Force", c "DIR", t "tells the reader to act"] @@ -445,24 +531,25 @@ in do , [t "Evidence", c "RPR", t "reported by someone else"] , [t "Evidence", c "INF", t "inferred"] , [t "Evidence", c "REC", t "remembered"] - , [t "Role", c "step", t "a thing the reader does"] - , [t "Role", c "precondition", t "a state that holds before a step"] - , [t "Role", c "release-action", t "the change a release makes"] - , [t "Role", c "obligation-holder", t "the reader a DEO modal binds"] + , [t "Position", c "Main", t "not inside another clause"] + , [t "Position", c "Relative", t "describes a noun of its parent"] + , [t "Position", c "Adverbial", t "says when, if, until, why or with what result"] + , [t "Position", c "Complement", t "the object of its parent's verb"] ] section (Identifier "Glossary") [text "Glossary"] $ do glossary - [ definition (Identifier "Term: answer function") [text "Answer function"] $ paragraph (s "[ASR·HAB] [ASR·HAB]" "An answer function is the computation that returns a question's set of answers from a document's clear readings.") - , definition (Identifier "Term: clause") [text "Clause"] $ paragraph (s "[ASR·HAB] [ASR·HAB]" "A clause is one finite verb group with everything that the verb governs.") + [ definition (Identifier "Term: clause") [text "Clause"] $ paragraph (s "[ASR·HAB]" "A clause is one finite verb group with its dependents.") , definition (Identifier "Term: code") [text "Code"] $ paragraph (s "[ASR·HAB]" "A code is one three-letter value of one slot, such as HAB or CSS.") - , definition (Identifier "Term: continuous disambiguation") [text "Continuous disambiguation"] $ paragraph (s "[ASR·HAB] [ASR·HAB]" "Continuous disambiguation is a check at every review that each question has exactly one answer.") - , definition (Identifier "Term: corpus") [text "Corpus"] $ paragraph (s "[ASR·HAB]" "The corpus is the set of verified minimal pairs, kept as one Vortex data file.") - , definition (Identifier "Term: document rule") [text "Document rule"] $ paragraph (s "[ASR·HAB]" "A document rule is a predicate over clear readings for one document kind, specified by its pairs.") - , definition (Identifier "Term: minimal pair") [text "Minimal pair"] $ paragraph (s "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "A minimal pair is a question, a bad side that leaves it unresolved, a good side that resolves it, and the smallest edit between them.") + , definition (Identifier "Term: continuous disambiguation") [text "Continuous disambiguation"] $ paragraph (s "[ASR·HAB]" "Continuous disambiguation is a check at every review for exactly one answer to each question.") + , definition (Identifier "Term: corpus") [text "Corpus"] $ paragraph (s "[ASR·HAB]" "The corpus is the set of verified minimal pairs, kept as Vortex data.") + , definition (Identifier "Term: document kind") [text "Document kind"] $ paragraph (s "[ASR·HAB]" "A document kind is the set of code patterns allowed for each clause position, kept in its own repository with its pairs.") + , definition (Identifier "Term: minimal pair") [text "Minimal pair"] $ paragraph (s "[ASR·HAB]" "A minimal pair is a question, a bad side, a good side and the smallest edit between the sides.") , definition (Identifier "Term: normal form") [text "Normal form"] $ paragraph (s "[ASR·HAB]" "A normal form is a reading in the fixed order after the three rewrites.") + , definition (Identifier "Term: parent") [text "Parent"] $ paragraph (s "[ASR·HAB]" "The parent of a subordinate clause is the clause around it.") + , definition (Identifier "Term: pattern") [text "Pattern"] $ paragraph (s "[ASR·HAB]" "A pattern is a do-block with one line for each allowed slot of a clause in one position.") + , definition (Identifier "Term: position") [text "Position"] $ paragraph (s "[ASR·HAB]" "A position is the syntactic place of a clause: main, relative, adverbial or complement.") , definition (Identifier "Term: reading") [text "Reading"] $ paragraph (s "[ASR·HAB]" "A reading is one meaning of a sentence, written as its clauses' codes in order.") - , definition (Identifier "Term: reference point") [text "Reference point"] $ paragraph (s "[ASR·HAB] [ASR·HAB]" "The reference point is the point that phase compares across.") - , definition (Identifier "Term: role") [text "Role"] $ paragraph (s "[ASR·HAB]" "A role is a fact about a clause's place in the document, written after its brackets.") + , definition (Identifier "Term: reference point") [text "Reference point"] $ paragraph (s "[ASR·HAB]" "The reference point is the point of comparison for phase.") , definition (Identifier "Term: verdict") [text "Verdict"] $ paragraph (s "[ASR·HAB]" "A verdict is the answer to the sentence question: Nonsense, Clear or Ambiguous.") ] diff --git a/nix/site.nix b/nix/site.nix index 766a3e4..65a65f0 100644 @@ -59,83 +59,305 @@ local: sentence = lib.elemAt m 1; }) (captures ''recover "(\[[^"]*)" "([^"]*)"'' ../manual/dreamstop.vx); - # A reading under the Manual rules (specification 5.4): clauses in - # display order, Force · Aspect · NEG · Ground · Strength · NEG · Bound · - # Evidence, each followed by at most one role. Manuals have no reference - # point, so no phase, and are FAC throughout, so no mood is written. - codes = "(ASR|DIR|ADM|IRG)·(PFV|PRF|PRG|HAB)(·NEG)?(·(DEO|ABL|TEL)·(NEC|WNC|POS)(·NEG)?)?(·ONE)?(·(OBS|PUP|RPR|INF|REC))?"; - role = "step|precondition|obligation-holder [a-z-]+"; - clause = "\\[${codes}]( (${role}))?"; + # A reading (specification 2.3): clauses in display order, Force · Mood + # · Aspect · Phase · NEG · Ground · Strength · NEG · Bound · Evidence, + # each subordinate clause followed by its position and the number of + # its parent clause, as in [ASR·HAB]/rel1. + codes = "(ASR|DIR|IRG|DEC|ADM|CMS)(·(HYP|COU))?·(PFV|PRF|PRG|HAB)(·(INC|CSS|CNT|EXP))?(·NEG)?(·(DEO|ABL|TEL)·(NEC|WNC|POS)(·NEG)?)?(·ONE)?(·(OBS|PUP|RPR|INF|REC))?"; + clause = "\\[${codes}](/(rel|adv|cmp)[0-9]+)?"; + slotsOf = + text: + let + g = builtins.match codes text; + at = lib.elemAt g; + in + { + force = at 0; + mood = at 2; + aspect = at 3; + phase = at 5; + modal = + if at 8 == null then + null + else + lib.concatStrings [ + (toString (at 6)) + (at 8) + (at 9) + (toString (at 10)) + ]; + outerNeg = at 6 != null; + innerNeg = at 10 != null; + ground = at 8; + strength = at 9; + bound = at 11; + evidence = at 13; + }; clausesOf = a: map (m: { - codes = lib.elemAt m 0; - role = lib.elemAt m 2; - }) (lib.filter builtins.isList (builtins.split "\\[([^]]*)]( (${role}))?" a)); - has = pattern: x: builtins.match ".*(${pattern}).*" x != null; - # The laws of specification 3.3 that a single manual clause can break, - # each with the message the build prints. + slots = slotsOf (lib.elemAt m 0); + position = + if lib.elemAt m 2 == null then + "main" + else + { + rel = "relative"; + adv = "adverbial"; + cmp = "complement"; + } + .${lib.elemAt m 2}; + parent = if lib.elemAt m 3 == null then null else lib.toInt (lib.elemAt m 3) - 1; + }) (lib.filter builtins.isList (builtins.split "\\[([^]]*)](/(rel|adv|cmp)([0-9]+))?" a)); + + # The laws of specification 3.3 that one clause can break. clauseLaws = [ { - law = "a DIR clause is a step, and a step is DIR (M1, M2, law 13)"; - holds = x: (lib.hasPrefix "DIR" x.codes) == (x.role == "step"); - } - { - law = "IRG only on a precondition (M1)"; - holds = x: !(lib.hasPrefix "IRG" x.codes) || x.role == "precondition"; - } - { - law = "a precondition is ASR or IRG with PRF or HAB (M3, law 13)"; - holds = x: x.role != "precondition" || builtins.match "(ASR|IRG)·(PRF|HAB).*" x.codes != null; - } - { - law = "every DEO clause carries an obligation-holder, and only DEO clauses do (C7, M5, law 13)"; - holds = x: (has "DEO" x.codes) == (x.role != null && lib.hasPrefix "obligation-holder" x.role); + law = "ONE excludes HAB (law 9)"; + holds = x: !(x.bound != null && x.aspect == "HAB"); } { - law = "an obligation-holder is on an ASR clause (law 13)"; - holds = x: !(has "DEO" x.codes) || lib.hasPrefix "ASR" x.codes; + law = "evidence on ASR·FAC only (law 10)"; + holds = x: x.evidence == null || (x.force == "ASR" && x.mood == null); } { - law = "ONE excludes HAB (law 9)"; - holds = x: !(has "ONE" x.codes && has "HAB" x.codes); + law = "HYP only on ASR and IRG, COU only on ASR (law 11)"; + holds = x: x.mood == null || x.force == "ASR" || (x.mood == "HYP" && x.force == "IRG"); } { - law = "evidence only on ASR (law 10)"; - holds = x: !(has "OBS|PUP|RPR|INF|REC" x.codes) || lib.hasPrefix "ASR" x.codes; + law = "no phase on DEC or CMS (law 8)"; + holds = + x: + x.phase == null + || !(lib.elem x.force [ + "DEC" + "CMS" + ]); } { law = "NEG·G·NEC·NEG and NEG·G·POS·NEG are written G·POS and G·NEC (rewrite 1)"; - holds = x: !(has "NEG·(DEO|ABL|TEL)·(NEC|POS)·NEG" x.codes); + holds = x: !(x.outerNeg && x.innerNeg && x.strength != "WNC"); } ]; - readings = - map (x: x.annotation) (manualSentences ++ frontSentences ++ manualRecoveries) + + # Document kinds (specification 5.2): a pattern maps each slot it + # mentions to a list of codes, "required" or "optional". An unmentioned + # slot is empty. A subordinate pattern names its parent main pattern. + slotNames = [ + "force" + "mood" + "aspect" + "phase" + "modal" + "bound" + "evidence" + ]; + matches = + pattern: x: + lib.all ( + n: + let + spec = pattern.${n} or null; + v = x.${n}; + in + if spec == null then + v == null + else if spec == "required" then + v != null + else if spec == "optional" then + true + else + lib.elem v spec + ) slotNames; + allowedBy = + kind: cs: x: + if x.position == "main" then + lib.any (p: matches p x.slots) (lib.attrValues kind.main) + else + x.parent != null + && x.parent < lib.length cs + && (lib.elemAt cs x.parent).position == "main" + && lib.any ( + s: + s.position == x.position + && matches s.pattern x.slots + && matches kind.main.${s.parent} (lib.elemAt cs x.parent).slots + ) kind.subordinate; + manualKind = + let + plain = { + force = [ "ASR" ]; + aspect = "required"; + modal = "optional"; + }; + in + { + main = { + step = { + force = [ "DIR" ]; + aspect = [ + "PFV" + "PRG" + "HAB" + ]; + modal = "optional"; + }; + statement = { + force = [ "ASR" ]; + aspect = [ + "PFV" + "HAB" + ]; + modal = "optional"; + evidence = "optional"; + }; + warning = { + force = [ "ADM" ]; + aspect = [ + "PFV" + "PRG" + "HAB" + ]; + modal = "optional"; + }; + }; + subordinate = [ + { + position = "adverbial"; + parent = "step"; + pattern = { + force = [ "ASR" ]; + aspect = [ + "PRF" + "HAB" + ]; + modal = "optional"; + }; + } + { + position = "adverbial"; + parent = "step"; + pattern = { + force = [ "IRG" ]; + aspect = [ "HAB" ]; + modal = "optional"; + }; + } + ] + ++ + lib.concatMap + (parent: [ + { + position = "relative"; + inherit parent; + pattern = plain; + } + { + position = "complement"; + inherit parent; + pattern = plain; + } + ]) + [ + "step" + "statement" + "warning" + ] + ++ + map + (parent: { + position = "adverbial"; + inherit parent; + pattern = plain; + }) + [ + "statement" + "warning" + ]; + }; + websiteKind = + let + description = { + force = [ "ASR" ]; + aspect = [ "HAB" ]; + modal = "optional"; + evidence = "optional"; + }; + in + { + main = { + claim = description; + plan = { + force = [ "CMS" ]; + aspect = [ "PFV" ]; + }; + invitation = { + force = [ "DIR" ]; + aspect = [ "PFV" ]; + }; + }; + subordinate = + lib.concatMap + (parent: [ + { + position = "relative"; + inherit parent; + pattern = description; + } + { + position = "complement"; + inherit parent; + pattern = description; + } + { + position = "adverbial"; + inherit parent; + pattern = { + force = [ "ASR" ]; + aspect = [ + "PRF" + "HAB" + ]; + modal = "optional"; + }; + } + ]) + [ + "claim" + "plan" + "invitation" + ]; + }; + + manualReadings = + map (x: x.annotation) (manualSentences ++ manualRecoveries) ++ manualMixed ++ lib.concatMap (x: [ x.step x.result ]) manualSteps; - illFormed = lib.filter (a: builtins.match "${clause}( ${clause})*" a == null) readings; + readings = + map (a: { + kind = manualKind; + name = "manual"; + inherit a; + }) manualReadings + ++ map (x: { + kind = websiteKind; + name = "website"; + a = x.annotation; + }) frontSentences; + illFormed = lib.filter (r: builtins.match "${clause}( ${clause})*" r.a == null) readings; broken = lib.concatMap ( - a: - lib.concatMap (x: map (l: "${a}: ${l.law}") (lib.filter (l: !(l.holds x)) clauseLaws)) (clausesOf a) - ) readings; - clauseCount = a: lib.length (clausesOf a); - # The Manual questions (specification 4.3): every step is followed by - # an ASR result with no role, and every recovery starts from a - # precondition that carries a negation and leads to a step. - unanswering = - map (x: "the step has no stated result: ${x.stepSentence}") ( - lib.filter ( - x: - !(has "] step" x.step) - || lib.any (y: !(lib.hasPrefix "ASR" y.codes) || y.role != null) (clausesOf x.result) - ) manualSteps + r: + let + cs = clausesOf r.a; + in + lib.concatMap (x: map (l: "${r.a}: ${l.law}") (lib.filter (l: !(l.holds x.slots)) clauseLaws)) cs + ++ map (_x: "${r.a}: a clause matches no ${r.name} pattern for its position") ( + lib.filter (x: !(allowedBy r.kind cs x)) cs ) - ++ map (x: "the recovery does not start from a failed precondition: ${x.sentence}") ( - lib.filter (x: !(has "NEG] precondition.*] step" x.annotation)) manualRecoveries - ); + ) readings; manual = pkgs.runCommand "dreamstop.openfp.net-manual" @@ -184,9 +406,11 @@ local: touch $out ''; - # Every sentence carries a well-formed reading that keeps the laws of - # the Manual rules, every manual paragraph is annotated and no prose has a - # semicolon, and every procedure resolves the four Manual questions. + # Every sentence carries a well-formed reading that keeps the clause laws + # and the patterns of its kind: the manual kind for the manual, the + # website kind for the front page. Every manual paragraph is annotated, + # no prose has a semicolon, and every procedure has a section for each + # Manual question. # Whether an annotation is the right reading is for review. prose = pkgs.runCommand "dreamstop.openfp.net-prose" @@ -195,14 +419,14 @@ local: LC_ALL = "C.UTF-8"; } '' - ${lib.concatMapStrings (a: '' - echo "prose: not a Manual reading in display order: ${lib.escapeShellArg a}" >&2 + ${lib.concatMapStrings (r: '' + echo "prose: not a reading in display order: ${lib.escapeShellArg r.a}" >&2 '') illFormed} ${lib.optionalString (illFormed != [ ]) "exit 1"} ${lib.concatMapStrings (m: '' echo "prose: ${lib.escapeShellArg m}" >&2 - '') (broken ++ unanswering)} - ${lib.optionalString (broken ++ unanswering != [ ]) "exit 1"} + '') broken} + ${lib.optionalString (broken != [ ]) "exit 1"} ${lib.concatMapStrings (q: '' echo "prose: prose/questions.vx names a section the manual lacks: ${lib.escapeShellArg q}" >&2 '') unanswered} @@ -221,7 +445,7 @@ local: + 2 * lib.length manualSteps ) } manual and ${toString (lib.length frontSentences)} front-page sentences, ${ - toString (lib.foldl' (n: a: n + clauseCount a) 0 readings) + toString (lib.foldl' (n: r: n + lib.length (clausesOf r.a)) 0 readings) } clauses" > $out ''; diff --git a/prose/front.vx b/prose/front.vx index ca4cc5a..3d90024 100644 @@ -1,23 +1,25 @@ -- Every sentence of the dreamstop.openfp.net front page, with its dreamstop +-- reading under the website kind: one clause per finite verb group, codes in +-- display order, and each subordinate clause's position and parent after a +-- slash. Headings, navigation, button labels and the sentences shown as +-- examples are not prose and are not listed. The build checks that each +-- sentence here is on the rendered page and fits the website patterns. do sentence "[ASR·HAB]" "dreamstop is a language for continuous disambiguation." - sentence "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Its goal is that every question a reader is entitled to ask of a document has exactly one answer." + sentence "[ASR·HAB]" "It secures one property." + sentence "[ASR·HAB]/rel2 [ASR·HAB]" "Every question a reader is entitled to ask of a document has exactly one answer." sentence "[ASR·HAB]" "A reader annotates each clause of a sentence with three-letter codes." sentence "[ASR·HAB]" "Each annotation records one reading of the sentence." - sentence "[ASR·HAB] [ASR·HAB]" "A sentence is clear when every reader finds the same single reading." - sentence "[ASR·HAB] [ASR·HAB]" "It is ambiguous when the readings differ." - sentence "[ASR·HAB] [ASR·HAB·NEG]" "It is nonsense when every reader finds no coherent reading." - sentence "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Every review counts the answers to each question, and the author rewrites any text that leaves a question open." + sentence "[ASR·HAB] [ASR·HAB]/adv1" "A sentence is clear when every reader finds the same single reading." + sentence "[ASR·HAB] [ASR·HAB]/adv1" "It is ambiguous when the readings differ." + sentence "[ASR·HAB] [ASR·HAB·NEG]/adv1" "It is nonsense when every reader finds no coherent reading." + sentence "[ASR·HAB] [ASR·HAB] [ASR·HAB]/rel2" "Every review counts the answers to each question, and the author rewrites any text that leaves a question open." sentence "[ASR·HAB]" "The sentence has one reading, the same for every reader." - sentence "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "Readers find different readings, so the author picks one and rewrites the sentence." - sentence "[ASR·HAB·NEG] [ASR·HAB]" "The sentence has no coherent reading, because now and still claim opposite histories." - sentence "[ASR·HAB] [ASR·HAB] [ASR·HAB]" "A minimal pair is a question, a bad side that leaves it open, a good side that answers it, and the smallest edit between them." - sentence "[ASR·HAB] [ASR·HAB]" "This pair teaches that a ChangeLog describes new behaviour with HAB and INC." - sentence "[ASR·HAB]" "Each document rule is specified by its pairs." - sentence "[ASR·HAB·NEG]" "A rule with no pair is not a rule." - sentence "[ASR·HAB] [ASR·HAB]" "The manual covers every code, the verdicts, the questions, the rules for each kind of document and how reviews use them." - sentence "[ASR·PRG]" "The dreamstop package is being built in dreamstop/dreamstop." + sentence "[ASR·HAB] [ASR·HAB]/adv1 [ASR·HAB]/adv1" "Readers find different readings, so the author picks one and rewrites the sentence." + sentence "[ASR·HAB·NEG] [ASR·HAB]/adv1" "The sentence has no coherent reading, because now and still claim opposite histories." + sentence "[ASR·HAB] [ASR·HAB]/rel1 [ASR·HAB]/rel1" "A minimal pair is a question, a bad side that leaves it open, a good side that answers it, and the smallest edit between them." + sentence "[ASR·HAB] [ASR·HAB]/cmp1" "This pair teaches that a ChangeLog describes the resulting state, not the migration." + sentence "[ASR·HAB]" "Each document kind is a set of patterns, specified by its pairs." + sentence "[ASR·HAB·NEG]" "A pattern with no pair is not part of the kind." + sentence "[ASR·HAB] [ASR·HAB]/cmp1" "The manual covers every code, the clause positions, the verdicts, the questions, the six document kinds and how reviews use them." + sentence "[CMS·PFV]" "The dreamstop package will be built in dreamstop/dreamstop." diff --git a/prose/questions.vx b/prose/questions.vx index 06d07c4..ef7bb7f 100644 @@ -1,5 +1,5 @@ +-- The Manual question set for each procedure in the manual: the section a +-- reader answers each question from. The build checks that every section -- named here exists in manual/dreamstop.vx. do procedure "Annotating a sentence"