web/dreamstop.openfp.net · commit
Rewrite the manual and front page to the dreamstop specification, version 2
parents: eb0282d9f9
Rewrite the manual and front page to the dreamstop specification, version 2 The manual teaches the three-letter codes by layer, clause segmentation, display order, the semantics and laws, verdicts, questions and answer functions, document kinds and rules, minimal pairs and the limits of the codes. Every sentence is re-annotated in v2 codes, and the build checks each clause against the Manual rules and the clause laws, and each procedure against the Manual questions.
8 files changed
Diff
BUILD.md | 10 +- dreamstop-openfp-net-web/ChangeLog.md | 37 +- dreamstop-openfp-net-web/src/Site/Content.hs | 15 +- dreamstop-openfp-net-web/src/Site/View.hs | 20 +- manual/dreamstop.vx | 734 +++++++++++++++------------ nix/site.nix | 126 ++++- prose/front.vx | 42 +- prose/questions.vx | 8 +- 8 files changed, 577 insertions(+), 415 deletions(-) diff --git a/BUILD.md b/BUILD.md index a071383..5efd8cc 100644 @@ -40,9 +40,13 @@ 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 annotation well formed under the - rules for manuals, with its codepoints in slot order, that no manual - paragraph is unannotated, and that neither has a semicolon. + `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. - `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/dreamstop-openfp-net-web/ChangeLog.md b/dreamstop-openfp-net-web/ChangeLog.md index 97cf160..9a1fe61 100644 @@ -9,20 +9,23 @@ 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`. It explains continuous disambiguation, readings, - annotations and clauses, every codepoint layer by layer with a minimal - pair for each, negation before and after the modality, tense, aspect and - phase, force, modality, verdicts, the rules for each kind of document, - the question set of each kind, minimal pairs and the corpus, how to - annotate a sentence and how reviews use dreamstop, with worked examples - from the nixlab-shell and vortex-shell ChangeLogs, a reference table and - a glossary. Each procedure says how to tell that it worked and how to - recover. The source is `manual/dreamstop.vx`, written in Inkwell. -- Every sentence of the page and the manual carries its dreamstop - annotation as data: the manual keeps each beside its sentence, and - `prose/front.vx` holds the page's. The build refuses an annotation that - is not well formed under the rules for manuals, a manual paragraph without - annotations and a sentence the rendered page or manual does not say. - `prose/questions.vx` maps each procedure to the sections that answer - the four questions of a manual, and the build refuses a section the - manual lacks. + `/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, evidence and roles), the + semantics and laws, verdicts, questions and their answer functions, the + rules for each kind of document, minimal pairs and the corpus, 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 under the rules for manuals or that breaks a clause law, a step + with no stated result, a recovery that does not start from a failed + precondition, a manual paragraph without readings and a sentence the + rendered page or manual does not say. `prose/questions.vx` maps each + procedure to the sections that answer the four questions of a manual, + and the build refuses a section the manual lacks. diff --git a/dreamstop-openfp-net-web/src/Site/Content.hs b/dreamstop-openfp-net-web/src/Site/Content.hs index 6f9a513..c1898ba 100644 @@ -54,12 +54,12 @@ verdicts = [ MkVerdict "Clear" "The shell no longer accepts unsigned commands." - ["[Assert·Does·Gone]"] + ["[ASR·HAB·CSS]"] "The sentence has one reading, the same for every reader." , MkVerdict "Ambiguous" "Added the review store, which moved reviews out of SQLite." - ["[Assert·Did] [Assert·Did]", "[Assert·Did] [Assert·Does]"] + ["[ASR·PFV] release-action [ASR·PFV·ONE]", "[ASR·PFV] release-action [ASR·HAB]"] "Readers find different readings, so the author picks one and rewrites the sentence." , MkVerdict "Nonsense" @@ -78,17 +78,18 @@ data Side = MkSide , sideAnnotation :: MisoString } +-- | The pair for rule C5 of the specification, from the nixlab-shell +-- 0.122.0.0 ChangeLog. -- -- @since 0.1.0.0 pair :: [Side] pair = - [ MkSide "Bad" "Added the review store, which moved reviews out of SQLite." "[Assert·Did] [Assert·Did]" - , MkSide "Good" "Added the review store, which moves reviews out of SQLite." "[Assert·Did] [Assert·Does]" + [ 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]" ] +-- | The pair's question and its edit. -- -- @since 0.1.0.0 pairSlot :: MisoString -pairSlot = "Clause 2, aspect: Did against Does" +pairSlot = "Question: what does clause 2 assert? Edit: clause 2, PFV·ONE or HAB against HAB·INC" diff --git a/dreamstop-openfp-net-web/src/Site/View.hs b/dreamstop-openfp-net-web/src/Site/View.hs index d5b7e7c..c45b735 100644 @@ -74,12 +74,13 @@ view _ = , p_ [classList ["lead"]] ["dreamstop is a language for continuous disambiguation."] , p_ [] - [ "A reader annotates each sentence with codepoints, one vector per clause. \ + [ "Its goal is that 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 exactly one reading. \ + \A sentence is clear when every reader finds the same single reading. \ \It is ambiguous when the readings differ. \ - \It is nonsense when no reader finds a coherent reading. \ - \Every review compares the readings, and the author rewrites any sentence that is not clear." + \It is nonsense when every reader finds no coherent reading. \ + \Every review counts the answers to each question, and the author rewrites any text that leaves a question open." ] , p_ [classList ["actions"]] @@ -101,21 +102,18 @@ view _ = [ h2_ [classList ["section-title"], fontDisplay] ["Minimal pairs"] , p_ [] - [ "A minimal pair is a bad sentence and a good sentence that differ in one place. \ - \Their annotations differ in exactly one slot of one clause, and that slot is what the pair teaches." - ] + [ "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." ] , ul_ [classList ["readings"]] (map side pair) , p_ [classList ["annotation"]] [text pairSlot] , p_ [] - [ "This pair teaches that a ChangeLog keeps Did for the release action and describes the store with Does. \ + [ "This pair teaches that a ChangeLog describes new behaviour with HAB and INC. \ \Each document rule is specified by its pairs. \ - \The rule rejects every bad side and accepts every good side. \ - \A rule with no pairs is not a rule." + \A rule with no pair is not a rule." ] , p_ [] - [ "The manual covers every codepoint, the verdicts, the rules for each kind of document and how reviews use them. " + [ "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." ] ] diff --git a/manual/dreamstop.vx b/manual/dreamstop.vx index eba946c..3b8c8d7 100644 @@ -3,406 +3,466 @@ let s annotation sentence = [text (sentence ++ " ")] sx :: String -> [Inline] -> [Inline] sx annotation inlines = inlines ++ [text " "] + stepThen :: String -> String -> String -> String -> Content () + stepThen stepAnnotation stepSentence resultAnnotation resultSentence = paragraph (s stepAnnotation stepSentence ++ s resultAnnotation resultSentence) + recover :: String -> String -> Content () + recover annotation sentence = paragraph (s annotation sentence) c :: String -> [Inline] c code = [inlineCode Nothing code] t :: String -> [Inline] t phrase = [text phrase] - codepoints :: [[[Inline]]] -> Content () - codepoints = table [t "Codepoint", t "Meaning", t "Example", t "Algebra"] - cp :: String -> String -> String -> String -> [[Inline]] - cp code meaning example algebra = [c code, t meaning, t example, t algebra] - pairs :: String -> [[[Inline]]] -> Content () - pairs question = table [t "Side", t ("Question: " ++ question), t "Annotation"] - bad :: String -> String -> [[Inline]] - bad sentence annotation = [t "Bad", t sentence, c annotation] - good :: String -> String -> [[Inline]] - good sentence annotation = [t "Good", t sentence, c annotation] - readingTable :: [[[Inline]]] -> Content () - readingTable = table [t "Reading", t "Annotation", t "What a reader takes from it"] + 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 "[Assert·Does]" "This manual is for people and agents who write, annotate or review OpenFP documentation." ++ s "[Assert·Does]" "It teaches dreamstop, a language for continuous disambiguation." ++ s "[Assert·Does]" "Its scope is the language: its codepoints, its verdicts, its questions, its document rules and its minimal pairs.") - paragraph (s "[Assert·Does·Neg]" "The manual does not describe a program." ++ s "[Assert·Doing]" "The dreamstop Haskell package is being built in the dreamstop/dreamstop repository." ++ s "[Assert·Does] [Assert·Does·Neg]" "Every annotation in this manual is written by hand, and no step needs that package.") - paragraph (s "[Assert·Does]" "The sections build on each other in order." ++ sx "[Direct·Did]" [text "Read ", reference (Identifier "Continuous disambiguation"), text ", ", reference (Identifier "Readings, annotations and clauses"), text " and ", reference (Identifier "Verdicts"), text " first."] ++ sx "[Assert·Does]" [text "The sections from ", reference (Identifier "Force"), text " to ", reference (Identifier "Evidence"), text " are a reference to look codepoints up in."] ++ sx "[Assert·Does]" [reference (Identifier "Annotating a sentence"), text " is a procedure, and ", reference (Identifier "Worked examples"), text " applies it to real ChangeLog sentences."] ++ sx "[Assert·Does]" [text "Terms are defined where they first appear and are collected in the ", reference (Identifier "Glossary"), text "."]) - paragraph (s "[Assert·Does]" "Sentences under study appear as quotations or in tables." ++ s "[Assert·Does]" "Annotations appear in monospace, as in [Assert·Does]." ++ s "[Assert·Does]" "A pair table gives its question in the heading and marks its bad side Bad and its good side Good." ++ s "[Assert·Does]" "The prose of this manual is itself annotated in dreamstop under the rules for manuals, and its source keeps each sentence beside its annotation.") + 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.") - section (Identifier "Continuous disambiguation") [text "Continuous disambiguation"] $ do - paragraph (s "[Assert·Does]" "A sentence is ambiguous when two careful readers take different meanings from it." ++ s "[Assert·Does] [Assert·Does]" "Grammar checks miss this, because an ambiguous sentence is usually grammatical." ++ s "[Assert·Does]" "A review that checks only English form passes such a sentence under either meaning.") - paragraph (s "[Assert·Does]" "Disambiguation is the work of finding a sentence's meanings and rewriting it until only one remains." ++ s "[Assert·Does]" "Continuous disambiguation does that work on every change, in the way that continuous integration builds every change." ++ s "[Assert·Does] [Assert·Does]" "Every review compares the readings of each sentence, and the author rewrites any sentence that is not clear.") - paragraph (s "[Assert·Does]" "The reason is cost." ++ s "[Assert·Does]" "A reader who acts on the wrong reading of a ChangeLog entry restarts a service needlessly, or relies on a fix that was never made." ++ s "[Assert·Does] [Assert·Does]" "Finding the second reading at review costs one rewrite, and finding it after a release costs an incident.") - paragraph (s "[Assert·Does]" "dreamstop gives disambiguation a written form." ++ s "[Assert·Does]" "A reader records each meaning as an annotation, a short row of codepoints." ++ s "[Assert·Does]" "Two readings that differ show up as two annotations that differ in a named slot." ++ s "[Assert·Does]" "A disagreement about meaning becomes a disagreement about one codepoint, which a review settles.") - paragraph (s "[Assert·Does]" "The goal is that every question a reader is entitled to ask of a document has exactly one answer." ++ s "[Assert·Does]" "A question goes unresolved in two ways." ++ s "[Assert·Does]" "Ambiguity of reading is a sentence with several meanings." ++ s "[Assert·Does]" "Ambiguity by omission is a clear text that fits several situations that matter to the reader." ++ s "[Assert·Does]" "Both leave a question with more than one answer, so dreamstop treats them as one failure.") - - section (Identifier "Readings, annotations and clauses") [text "Readings, annotations and clauses"] $ do - paragraph (s "[Assert·Does]" "A reading is one meaning that a reader finds in a sentence." ++ s "[Assert·Does]" "An annotation records one reading." ++ s "[Assert·Does]" "It lists the sentence's clauses in order, and gives each clause one vector of codepoints.") - paragraph (s "[Assert·Does]" "A clause is a part of a sentence that makes one claim, gives one instruction or asks one question." ++ s "[Assert·Does]" "“Added the review store, which moves reviews out of SQLite” has two clauses." ++ s "[Assert·Does]" "The first reports the release action and the second describes the store.") - paragraph (s "[Assert·Does]" "A vector has eight slots, and each slot is called a layer." ++ s "[Assert·Does]" "Force and aspect always have a value." ++ s "[Assert·Does]" "Phase, outer negation, modality, inner negation, bound and evidence are optional.") - paragraph (s "[Assert·Does]" "A vector is written as its codepoints joined by a middle dot, inside square brackets." ++ s "[Assert·Does]" "The codepoints follow a fixed order: force, aspect, phase, outer negation, modality, inner negation, bound and evidence." ++ s "[Assert·Does·Neg]" "An absent optional slot is not written." ++ s "[Assert·Does]" "An annotation writes its vectors one after another, separated by a space.") - codeBlock (Language "text") "[Assert·Did] [Assert·Does]\n[Assert·Does·Gone]\n[Assert·Does·Kept] [Assert·Does·Neg·Can]" - paragraph (s "[Assert·Does]" "The block above is three annotations, one per line, not a program." ++ s "[Assert·Does]" "The first has two clauses and the others have one and two.") - paragraph (s "[Assert·Does]" "The fixed order makes the vector a normal form." ++ s "[Assert·Does]" "Two readers who agree on a meaning write the same characters." ++ s "[Assert·Does]" "The order also says how the layers combine: force applies last, and aspect applies first, to the bare proposition.") - paragraph (s "[Assert·Does]" "The block below sets out the same structure in Haskell notation." ++ s "[Assert·Does·Neg]" "It is an explanatory fragment, not a program to compile.") - codeBlock (Language "haskell") "type Annotation = NonEmpty Clause\n\ndata Verdict = Nonsense | Clear Annotation | Ambiguous [Annotation]\n\ndata Clause = Clause\n { force :: Force -- Assert | Direct | Ask\n , aspect :: Aspect -- Did | Done | Doing | Does\n , phase :: Maybe Phase -- New | Gone | Kept | Due\n , modality :: Maybe Modality -- Must | Should | Can | Nec | Poss\n , outerNeg :: Bool -- negates the modality: need not, cannot\n , innerNeg :: Bool -- negates the content: must not, can refrain\n , bound :: Maybe Bound -- Once | Each\n , evidence :: Maybe Evidence -- Measured | Claimed\n }" - paragraph (s "[Assert·Does]" "Annotation is a person's or an agent's work." ++ s "[Assert·Does·Neg·Can]" "No program can compute a sentence's readings from English." ++ s "[Assert·Does]" "Tools check annotations against document rules and against each other.") - - section (Identifier "The codepoints") [text "The codepoints"] $ do - paragraph (s "[Assert·Does]" "This section gives every codepoint, one layer at a time." ++ s "[Assert·Does]" "Each table gives the codepoint, its meaning, an English example that carries it and its algebraic behaviour." ++ s "[Assert·Does]" "Each layer ends with a minimal pair that turns on that layer.") - paragraph (s "[Assert·Does]" "Two algebraic terms recur." ++ s "[Assert·Does]" "An operator is monotone when a stronger proposition inside it gives a stronger result." ++ s "[Assert·Does]" "“It happened that the build passed every test” implies “it happened that the build passed a test”, so Did is monotone." ++ s "[Assert·Does]" "An operator is non-monotone when that inference fails.") - - section (Identifier "Force") [text "Force"] $ do - paragraph (s "[Assert·Does]" "Force says what a clause does for its reader." ++ s "[Assert·Does]" "It is the outermost layer.") - codepoints - [ cp "Assert" "states that something holds, truly or falsely" "The shell no longer accepts unsigned commands." "not an operator on propositions: the clause becomes a judgement" - , cp "Direct" "tells a reader to do something, whether or not they comply" "Back up the state directory." "the clause becomes a plan" - , cp "Ask" "asks which of several alternatives holds" "Which revision did the build use?" "the clause becomes a set of alternatives" - ] - paragraph (s "[Assert·Does·Neg]" "Force is not a function from propositions to propositions." ++ s "[Assert·Does]" "An asserted clause is true or false, a directed clause is complied with or not, and a question is answered." ++ s "[Assert·Does]" "Those are three different kinds of result, so force is the layer that decides the kind.") - pairs "does the sentence describe the software or instruct the reader?" - [ bad "Set metering.config to raise the fuel default." "[Direct·Did]" - , good "Setting metering.config raises the fuel default." "[Assert·Does]" - ] - paragraph (s "[Assert·Does]" "The pair differs in the force of clause 1." ++ s "[Assert·Does]" "In a ChangeLog the bad side fails, because a ChangeLog allows only Assert.") + 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.") + 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]" "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 "Aspect") [text "Aspect"] $ do - paragraph (s "[Assert·Does]" "Aspect says how the clause views its event: as a whole, by its result, under way or as a habit." ++ s "[Assert·Does]" "It is the innermost layer and applies to the bare proposition.") - codepoints - [ cp "Did" "the event happened, viewed as a whole (perfective)" "Added the review store." "monotone" - , cp "Done" "the event happened and its result holds (perfect)" "The import has finished." "monotone, from an event to a state" - , cp "Doing" "the event is under way and unfinished (progressive)" "The forge is importing reviews." "non-monotone: the imperfective paradox" - , cp "Does" "what a thing does typically (habitual or generic)" "The store holds the review book." "tolerates exceptions" - ] - paragraph (s "[Assert·Does]" "Doing is non-monotone because of the imperfective paradox." ++ s "[Assert·Does] [Assert·Does·Neg]" "“The forge was importing reviews” is true of an import that crashed, but “the forge imported reviews” is not." ++ s "[Assert·Does]" "Does tolerates exceptions in the way that “the shell answers every call” survives one dropped connection.") - pairs "what does clause 2 assert?" - [ bad "Added the review store, which moved reviews out of SQLite." "[Assert·Did] [Assert·Did]" - , good "Added the review store, which moves reviews out of SQLite." "[Assert·Did] [Assert·Does]" - ] - paragraph (s "[Assert·Does]" "The pair differs in the aspect of clause 2, Did against Does." ++ s "[Assert·Does]" "The bad side reads either as a past move or as what the store does, and the good side reads only as what the store does.") + 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.") + 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]" "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.") + ] + table [t "Sentence", t "Finite verb groups", t "Clauses"] + [ [t "The store removes the table and adds a log.", t "removes, adds", t "2"] + , [t "Keep the guard armed until the import has finished.", t "Keep, has finished", t "2"] + , [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.") - section (Identifier "Phase") [text "Phase"] $ do - paragraph (s "[Assert·Does]" "Phase says how a clause's truth changes across a release." ++ s "[Assert·Does]" "It compares the proposition before the release with the proposition after it.") - codepoints - [ cp "New" "false before the release and true after it (prose “now”)" "Operators must now back up STATE/reviews." "non-monotone" - , cp "Gone" "true before the release and false after it (prose “no longer”)" "The shell no longer accepts unsigned commands." "non-monotone" - , cp "Kept" "true before the release and true after it (prose “still”)" "Compiled loops are still uninterruptible." "monotone" - , cp "Due" "false before and after the release, and expected later (prose “not yet”)" "The importer does not yet read approvals." "non-monotone" - ] - paragraph (s "[Assert·Does]" "Kept is monotone, because truth on both sides of the release survives a weaker proposition." ++ s "[Assert·Does]" "New, Gone and Due each assert a falsehood on one side, and a stronger proposition is false more often, so the inference fails.") - pairs "what behaves differently after the release?" - [ bad "The shell accepts unsigned commands." "[Assert·Does]" - , good "The shell no longer accepts unsigned commands." "[Assert·Does·Gone]" - ] - paragraph (s "[Assert·Does]" "The pair differs in the phase of clause 1." ++ s "[Assert·Does]" "In a ChangeLog every standing claim needs a phase, so the bad side fails.") + 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.") + 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 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."]) - section (Identifier "Modality") [text "Modality"] $ do - paragraph (s "[Assert·Does]" "Modality says whether the clause is about obligation, recommendation, ability, necessity or possibility.") - codepoints - [ cp "Must" "obligation (deontic)" "Operators must back up STATE/reviews." "functor with no counit: an obligation is not a fact" - , cp "Should" "recommendation, a weak obligation" "Operators should restore STATE/reviews." "functor with no counit" - , cp "Can" "ability (dynamic)" "The shell can stop a block that allocates." "functor" - , cp "Nec" "necessarily, always (alethic box)" "A failed import is necessarily retried." "comonad" - , cp "Poss" "possibly, may happen (diamond)" "A block's spend may vary by a few units." "monad, with Poss p equal to Not (Nec (Not p))" - ] - paragraph (sx "[Assert·Does]" [reference (Identifier "Modality as functors and comonads"), text " explains the algebra column."]) - pairs "must operators do anything?" - [ bad "Operators now back up STATE/reviews." "[Assert·Does·New]" - , good "Operators must now back up STATE/reviews." "[Assert·Does·New·Must]" - ] - paragraph (s "[Assert·Does]" "The pair differs in the modality of clause 1." ++ s "[Assert·Does]" "The bad side claims that operators make backups, which no release can make true.") + 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.") + 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]" + , code "IRG" "interrogative: asks which alternative holds" "question mark, inversion" "Does healthz answer?" "[IRG·HAB]" + , code "DEC" "declarative: the utterance makes it so" "this release deprecates, is hereby" "This release deprecates oldApi." "[DEC·PFV]" + , code "ADM" "admonitive: warns of a risk" "do not, never, be careful, with a hazard" "Do not run this against production." "[ADM·PFV·NEG]" + , code "CMS" "commissive: commits the author to a future act" "will with the author as agent, is scheduled for" "oldApi will be removed in 0.25." "[CMS·PFV]" + ] + 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.") - section (Identifier "Negation") [text "Negation"] $ do - paragraph (s "[Assert·Does]" "Negation has two positions, one on each side of the modality." ++ s "[Assert·Does]" "Outer negation denies the modality itself, as in need not and cannot." ++ s "[Assert·Does]" "Inner negation denies the content under the modality, as in must not and can refrain." ++ s "[Assert·Does]" "The position of Neg in the codepoint string is its scope.") - paragraph (s "[Assert·Does]" "A clause with no modality has only one position, and Neg there simply denies the clause." ++ s "[Assert·Does]" "Neg reverses monotonicity, so a weaker proposition gives the stronger denial.") - table [t "Codepoints", t "Logic", t "English", t "Example"] - [ [c "Neg·Must", t "not O p", t "need not: not obligatory", t "Operators need not restart the forge."] - , [c "Must·Neg", t "O not p", t "must not: forbidden", t "Operators must not edit STATE/reviews by hand."] - , [c "Neg·Must·Neg", t "not O not p", t "may: permitted", t "Operators may delete the SQLite tables."] - , [c "Neg·Can", t "not Can p", t "cannot: unable", t "The shell cannot stop the loop."] - , [c "Can·Neg", t "Can not p", t "can refrain, can leave unset", t "Operators can leave metering.vx unset."] - , [c "Neg·Can·Neg", t "not Can not p", t "cannot avoid, has to", t "The forge cannot avoid reading the books."] - ] - paragraph (s "[Assert·Does]" "May is Neg·Must·Neg, because a permission is the absence of an obligation not to act." ++ s "[Assert·Does]" "That reading makes the may of permission separate from the may of possibility, which is Poss.") - pairs "must operators restart the forge?" - [ bad "Operators must not restart the forge." "[Assert·Does·Must·Neg]" - , good "Operators need not restart the forge." "[Assert·Does·Neg·Must]" - ] - paragraph (s "[Assert·Does]" "Need not and must not differ only in where Neg stands." ++ s "[Assert·Does]" "The first leaves the restart optional and the second forbids it, so a reader who confuses them either restarts needlessly or breaks a rule.") - pairs "are operators allowed to delete the SQLite tables?" - [ bad "Operators must not delete the SQLite tables." "[Assert·Does·Must·Neg]" - , good "Operators may delete the SQLite tables." "[Assert·Does·Neg·Must·Neg]" - ] - paragraph (s "[Assert·Does]" "Adding the outer Neg turns a prohibition into a permission.") - pairs "is the restart possible but optional?" - [ bad "The shell cannot restart the forge." "[Assert·Does·Neg·Can]" - , good "Operators need not restart the forge." "[Assert·Does·Neg·Must]" - ] - paragraph (s "[Assert·Does]" "Cannot and need not share their outer Neg and differ in the modality: one denies an ability and the other denies an obligation.") - pairs "does the forge work without metering.vx?" - [ bad "Operators cannot leave metering.vx unset." "[Assert·Does·Neg·Can]" - , good "Operators can leave metering.vx unset." "[Assert·Does·Can·Neg]" - ] - paragraph (s "[Assert·Does]" "Moving Neg from outside Can to inside it turns an inability into an option.") + section (Identifier "Mood") [text "Mood"] $ do + paragraph (s "[ASR·HAB] [ASR·HAB]" "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.") - section (Identifier "Bound") [text "Bound"] $ do - paragraph (s "[Assert·Does]" "Bound says whether the clause is about one bounded event or about each occurrence.") - codepoints - [ cp "Once" "a single bounded event" "The forge imports every review once." "fixes one occurrence" - , cp "Each" "every occurrence, one by one" "Each verdict moves the merge request's last touch." "distributes over occurrences" - ] - pairs "does a later start import the reviews again?" - [ bad "On first start the forge now imports every review." "[Assert·Did·New]" - , good "On first start the forge now imports every review once." "[Assert·Did·New·Once]" - ] - paragraph (s "[Assert·Does]" "The pair differs in the bound of clause 1." ++ s "[Assert·Does]" "The bad side leaves open whether a later start imports the reviews again.") + 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.") + codes + [ code "PFV" "perfective: the event as a whole" "simple past, a single imperative act" "Added the review store." "[ASR·PFV]" + , code "PRF" "perfect: it happened and its result holds" "has, have, had with a participle" "When the forge has imported the reviews, back up STATE/reviews/." "[ASR·PRF] [DIR·PFV]" + , 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.") - section (Identifier "Evidence") [text "Evidence"] $ do - paragraph (s "[Assert·Does]" "Evidence says where a claim comes from.") - codepoints - [ cp "Measured" "the claim rests on a measurement or a test" "Large imports used 40 per cent less memory in the regression test." "names a checkable source" - , cp "Claimed" "the claim rests on the writer's word or reasoning" "The change removes a likely cause of the leak." "names no checkable source" - ] - paragraph (s "[Assert·Does]" "A ChangeLog may use the past tense for a Measured outcome, because a measurement is an event that happened.") - pairs "is the claim measured?" - [ bad "Large imports used 40 per cent less memory." "[Assert·Did]" - , good "Large imports used 40 per cent less memory in the regression test." "[Assert·Did·Measured]" - ] - paragraph (s "[Assert·Does]" "The pair differs in the evidence of clause 1." ++ s "[Assert·Does]" "In a ChangeLog the bad side fails, because its past tense is licensed only by a Measured outcome.") + 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.") + 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 "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.") - section (Identifier "Tense, aspect and phase compared") [text "Tense, aspect and phase compared"] $ do - paragraph (s "[Assert·Does]" "Three layers of English grammar deal with time, and dreamstop keeps them apart.") - bullets - [ paragraph (s "[Assert·Does]" "Tense relates the reference time to the release.") - , paragraph (s "[Assert·Does]" "Aspect relates the event to the reference time.") - , paragraph (s "[Assert·Does]" "Phase is a change in truth across the release.") + 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.") + 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"] + , [t "Ground", c "TEL", t "what a named goal requires", t "the goal test: doing otherwise fails the goal, and nobody is to blame"] + , [t "Strength", c "NEC", t "necessary", t "holds in every situation the ground admits"] + , [t "Strength", c "WNC", t "weakly necessary", t "holds in every best situation the ground admits"] + , [t "Strength", c "POS", t "possible", t "holds in some situation the ground admits"] ] - paragraph (s "[Assert·Does]" "Phase is defined from two functors, Before p and After p, which give the truth of p on either side of the release." ++ s "[Assert·Does]" "They are functors because they only reindex p to a different time and preserve every inference inside it." ++ s "[Assert·Does]" "New is Not (Before p) and After p, Gone is Before p and Not (After p), Kept is Before p and After p, and Due is Not (Before p) and Not (After p) with p expected.") - paragraph (s "[Assert·Does·Neg]" "dreamstop has no tense codepoint." ++ s "[Assert·Does]" "A ChangeLog fixes the reference time at the release, so tense carries no information that phase and aspect lack." ++ s "[Assert·Does]" "English tense is still a clue when annotating, and past tense is the commonest sign of a Did that should be a Does.") - table [t "Sentence", t "Aspect", t "Phase"] - [ [t "The shell accepts unsigned commands.", c "Does", t "none"] - , [t "The shell no longer accepts unsigned commands.", c "Does", c "Gone"] - , [t "The shell accepted an unsigned command.", c "Did", t "none"] - , [t "The forge is importing reviews.", c "Doing", t "none"] + 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 "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·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.") - section (Identifier "Force and records") [text "Force, and why records are Assert-only"] $ do - paragraph (s "[Assert·Does]" "Force corresponds to grammatical mood: declaratives assert, imperatives direct and interrogatives ask." ++ s "[Assert·Does]" "Mood is only a clue, because an English imperative can assert.") - paragraph (s "[Assert·Does]" "“Configure backups to expire after 30 days” reads as Assert in a commit subject, reporting what the release does." ++ s "[Assert·Does]" "The same words read as Direct in an upgrade note, telling operators what to do." ++ s "[Assert·Does]" "That sentence is ambiguous in force, and the rewrite names either the software or the reader as the subject.") - paragraph (s "[Assert·Does]" "A record, such as a ChangeLog or a README, states what is true of the software." ++ s "[Assert·Does]" "Its value is that a reader can check it." ++ s "[Assert·Does]" "A direction cannot be true or false, and a question asserts nothing, so a record that contains them stops being checkable in those places." ++ s "[Assert·Does]" "Records therefore allow Assert only.") - paragraph (s "[Assert·Does]" "An obligation in a record is asserted, not directed." ++ s "[Assert·Does·New·Must]" "“Operators must now back up STATE/reviews” asserts that an obligation holds from this release." ++ s "[Assert·Does]" "That is a fact about the release, so it is true or false, and it names the reader who carries the obligation.") + 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·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]" "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.") - section (Identifier "Modality as functors and comonads") [text "Modality as functors and comonads"] $ do - paragraph (s "[Assert·Does]" "Each modality is an operator M on propositions." ++ s "[Assert·Does]" "Its algebra says which inferences survive inside it.") - paragraph (s "[Assert·Does]" "Every modality is a functor." ++ s "[Assert·Does]" "If p implies q, then M p implies M q." ++ s "[Assert·Does]" "If operators must back up every state directory, then they must back up the state directory of this forge.") - paragraph (s "[Assert·Does]" "Nec is a comonad." ++ s "[Assert·Does]" "Its counit says that Nec p implies p: what holds necessarily holds." ++ s "[Assert·Does]" "Its comultiplication says that Nec p implies Nec (Nec p).") - paragraph (s "[Assert·Does]" "Poss is a monad, the dual of Nec." ++ s "[Assert·Does]" "Its unit says that p implies Poss p: what holds is possible." ++ s "[Assert·Does]" "Poss p equals Not (Nec (Not p)).") - paragraph (s "[Assert·Does]" "Must and Should are functors with no counit." ++ s "[Assert·Does·Neg]" "Must p does not imply p." ++ s "[Assert·Does] [Assert·Does·Neg]" "Operators must back up STATE/reviews, and that does not mean that any operator has done so." ++ s "[Assert·Does]" "This is the deontic no-counit point: an obligation is not a fact.") - paragraph (s "[Assert·Does]" "The point matters at review." ++ s "[Assert·Does]" "A reviewer who reads an obligation as a fact takes a requirement for evidence that it is met." ++ s "[Assert·Does]" "dreamstop marks the difference in the modality slot, so the two readings cannot share an annotation.") - paragraph (s "[Assert·Does]" "Can is a functor." ++ s "[Assert·Does·Neg]" "Ability does not imply the event either, because a shell that can stop a block may not have stopped it.") + 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.") - section (Identifier "Verdicts") [text "Verdicts"] $ do - paragraph (s "[Assert·Does]" "A verdict gathers the readings that a set of readers finds in a sentence." ++ s "[Assert·Does]" "Each reader gives every reading they find, and the verdict removes duplicates.") - table [t "Readings", t "Verdict", t "What happens"] - [ [t "none", c "Nonsense", t "the author rewrites the sentence so that it says something"] - , [t "exactly one", c "Clear", t "the sentence stays, with its one annotation"] - , [t "two or more", c "Ambiguous", t "the author picks a reading and rewrites the sentence to carry only that one"] + 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.") + codes + [ code "OBS" "observed or measured directly by the author" "we measured, on our machine" "Startup took 200 ms on an RTX 3060." "[ASR·PFV·OBS]" + , code "PUP" "a verifiable third-party record, such as CI" "in the recorded benchmark, CI shows" "Median startup fell from 800 ms to 200 ms in the recorded benchmark." "[ASR·PFV·PUP]" + , code "RPR" "reported by someone else" "according to, reported in" "Users report that the page loads twice." "[ASR·HAB·RPR] [ASR·HAB]" + , 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 "[Assert·Does]" "A sentence is clear when every reader finds the same single reading." ++ s "[Assert·Does]" "It is ambiguous when the readings differ." ++ s "[Assert·Does]" "It is nonsense when no reader finds a coherent reading.") - paragraph (s "[Assert·Does]" "“The shell now still accepts unsigned commands” is nonsense." ++ s "[Assert·Does]" "Now is New, which says the claim was false before the release, and still is Kept, which says it was true before." ++ s "[Assert·Does·Neg]" "No single phase satisfies both, so the sentence has no reading.") - paragraph (s "[Assert·Does]" "A document rule also removes readings." ++ s "[Assert·Does]" "A reading that breaks the rules for its document does not count." ++ s "[Assert·Does]" "A ChangeLog sentence whose only reading is Direct therefore has no admissible reading.") + 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 "Document rules") [text "Document rules"] $ do - paragraph (s "[Assert·Does]" "A document rule is a predicate over annotations." ++ s "[Assert·Does]" "Each kind of document has its own rules.") - table [t "Document", t "Force", t "Constraints"] - [ [t "ChangeLog", t "Assert only", t "Did only on the release action. Descriptions use Does. Every standing claim has a phase. Kept needs a New or Gone in the same entry. No Doing. No counterfactuals in behaviour. Obligations are Assert·Must or Assert·Should with a named reader. Past tense allowed for removed components, superseded behaviour with “previously”, and Measured outcomes."] - , [t "README", t "Assert only", t "Does and states, with no phase: it describes the program, not a release."] - , [t "Manual", t "Assert and Direct", t "Direct for steps, Done for preconditions."] - , [t "Issue", t "Assert, Direct and Ask", t "Counterfactuals allowed for options."] - , [t "Interface copy", t "Assert and Direct", t "Buttons Direct, status Assert."] + 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 "[Assert·Does]" "A ChangeLog keeps Did for the release action because the release is the one event the entry reports." ++ s "[Assert·Does]" "Everything else in the entry describes the software after the release, so it takes Does.") - paragraph (s "[Assert·Does]" "Kept needs a New or Gone in the same entry because “still” only informs a reader beside a change." ++ s "[Assert·Does·Kept] [Assert·Does·Neg·Can]" "“Compiled code that loops without allocating is still uninterruptible, so the shell cannot stop it” belongs in the entry that changes what the shell charges.") - paragraph (s "[Assert·Does]" "An indicative conditional sits inside Does as content." ++ s "[Assert·Does]" "“If one book has imported and the other has not, every call is refused” is Does applied to the whole conditional." ++ s "[Assert·Does]" "A counterfactual such as “had the import run, the call would have passed” belongs only in hypothetical passages such as issues and design notes.") - section (Identifier "Pairs per document") [text "Pairs per document"] $ do - paragraph (s "[Assert·Does]" "Each rule comes with its pairs.") - pairs "what does the program do?" - [ bad "README: The shell no longer accepts unsigned commands." "[Assert·Does·Gone]" - , good "README: The shell refuses unsigned commands." "[Assert·Does]" + 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.") + + 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.") + 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."] + , [t "Bound", t "ONE: the event occurs exactly one time in the program's life."] + , [t "Modal", t "the ground selects the situations that count. NEC: p in all of them. WNC: p in all the best of them. POS: p in some."] + , [t "Negation", t "classical negation at its position."] + , [t "Phase", t "defined from Before p and After p, the truth of p in the predecessor revision and in the documented revision."] + , [t "Mood", t "FAC commits to p. HYP considers p without commitment. COU considers p and commits to not p."] + , [t "Evidence", t "annotates the commitment with its basis and leaves p unchanged."] + , [t "Force", t "maps the result into its kind of act: judgements, plans, sets of alternatives, changes made by saying, hazards or commitments."] ] - paragraph (s "[Assert·Does]" "A README describes the program and has no release to compare with, so the bad side fails on its phase.") - pairs "what do I do?" - [ bad "Manual: You restart the forge." "[Assert·Does]" - , good "Manual: Restart the forge." "[Direct·Did]" + 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.") + 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.") + , paragraph (s "[ASR·HAB] [ASR·HAB]" "INC directly over a negation becomes CSS on the positive, and CSS over a negation becomes INC." ++ s "[ASR·HAB]" "CNT and EXP keep a negation beneath them.") ] - paragraph (s "[Assert·Does]" "A step in a manual is Direct, so the bad side fails on its force.") - pairs "what does the button do?" - [ bad "Interface copy, a button: Manual" "[Assert·Does]" - , good "Interface copy, a button: Read the manual" "[Direct·Did]" + section (Identifier "Laws") [text "Laws"] $ do + paragraph (s "[ASR·HAB]" "The package checks each law on every reading or on every pair.") + table [t "Law", t "Statement"] + [ [t "1. Well-formed", t "every clause has a force and an aspect"] + , [t "2. Strength order", t "G·NEC p implies G·WNC p, which implies G·POS p, within a ground"] + , [t "3. Duality", t "G·POS equals NEG·G·NEC·NEG within a ground. WNC has no dual code."] + , [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 "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 "[Assert·Does]" "A button is Direct, so a button that only names a thing fails on its force.") + 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.") - section (Identifier "Questions") [text "Questions"] $ do - paragraph (s "[Assert·Does]" "Every kind of document has questions that its reader is entitled to have answered." ++ s "[Assert·Does]" "These questions are the specification of the document kind." ++ s "[Assert·Does]" "dreamstop writes each one as an Ask with its alternatives.") - table [t "Document", t "Questions its reader is entitled to ask"] - [ [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 sentence", t "Which reading does it have?"] + 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 "[Assert·Does]" "For each question, the text determines some number of answers.") - table [t "Answers", t "Resolution"] - [ [t "none", t "a contradiction, or nonsense"] - , [t "exactly one", t "resolved"] - , [t "several", t "ambiguous, because a sentence has several readings or because nothing addresses the question"] + 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 "The shell now still accepts unsigned commands.", t "none", t "Nonsense"] ] - paragraph (s "[Assert·Does]" "A document passes when every question in its set is resolved." ++ sx "[Assert·Does]" [text "A verdict on a sentence, as in ", reference (Identifier "Verdicts"), text ", is the resolution of the question that every sentence carries: which reading does it have?"]) - paragraph (s "[Assert·Does]" "A ChangeLog entry can be clear in every sentence and still fail." ++ s "[Assert·Does]" "An entry that adds the review store and says nothing about backups leaves “must I do anything?” with two answers." ++ s "[Assert·Does]" "Readers who assume yes and readers who assume no both find the text consistent, so the question is ambiguous by omission.") - section (Identifier "Minimal pairs") [text "Minimal pairs"] $ do - paragraph (s "[Assert·Does]" "Minimal pairs drive dreamstop, and there is one kind of pair." ++ s "[Assert·Does]" "A pair is a question, a bad side that leaves the question with no answer or several, a good side that gives it exactly one, and a minimal edit between them.") - section (Identifier "How pairs define rules") [text "How pairs define rules"] $ do - paragraph (s "[Assert·Does]" "A document's question set is its specification, and its pairs are the examples that pin each question down." ++ s "[Assert·Does]" "Every pair obeys three laws.") - ordered - [ paragraph (s "[Assert·Does]" "The good side resolves the question.") - , paragraph (s "[Assert·Does·Neg]" "The bad side does not resolve it.") - , paragraph (s "[Assert·Does·Neg]" "The edit is minimal: no smaller edit to the bad side resolves the question.") + 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 "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 "[Assert·Does]" "Whether the edit changes one slot, one clause or one word is derived from the codepoints of the two sides." ++ s "[Assert·Does·Neg]" "A pair never declares it." ++ s "[Assert·Does]" "Most pairs in this manual change one slot of one clause, and the sentence after each pair names that slot.") - table [t "Pair", t "Question", t "Bad side answers", t "Good side answers"] - [ [t "“moved” against “moves”", t "What does clause 2 assert?", t "Did or Does", t "Does"] - , [t "a missing backup obligation", t "Must operators do anything?", t "yes or no", t "yes, back up STATE/reviews"] - , [t "“should” against “must”", t "Is restoring optional?", t "no consistent answer", t "no"] + 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 "[Assert·Does]" "The second pair adds a whole sentence, “Operators must now back up STATE/reviews”, because no smaller edit gives the question one answer.") - section (Identifier "Writing a pair") [text "Writing a pair"] $ do - paragraph (s "[Assert·Done]" "Before you start, a review has found a question that a text leaves with no answer or several.") - ordered - [ paragraph (s "[Direct·Did]" "Write the question as its reader would ask it, with its alternatives.") - , paragraph (s "[Direct·Did]" "Copy the bad side exactly as it appeared.") - , paragraph (s "[Direct·Did]" "Annotate the bad side, and list the answers it allows.") - , paragraph (s "[Direct·Did]" "Make the smallest edit that leaves the question exactly one answer.") - , paragraph (s "[Direct·Did]" "Annotate the good side, and confirm that it allows that one answer.") - , paragraph (s "[Direct·Did]" "Try each smaller edit to the bad side." ++ s "[Direct·Did]" "If one of them resolves the question, take it as the good side and return to step 5.") - , paragraph (s "[Direct·Did]" "Name the document kind the pair belongs to.") + 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 "Checking a pair") [text "Checking a pair"] $ do - paragraph (s "[Assert·Does]" "The pair is complete when the good side gives the question one answer, the bad side gives none or several, and no smaller edit resolves it.") - section (Identifier "When a pair cannot be written") [text "When a pair cannot be written"] $ do - paragraph (s "[Assert·Does]" "Sometimes the annotations of the two sides are identical even though their answers differ." ++ s "[Assert·Does]" "No codepoint separates them, so dreamstop lacks a distinction." ++ s "[Direct·Did]" "Record the pair with both sentences and the question, and open an issue proposing the codepoint or rule that would separate them.") + + 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 "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.") + table [t "Part", t "Content"] + [ [t "Question", t "a question from the document 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"] + ] + paragraph (s "[ASR·HAB]" "Every pair obeys three laws.") + 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.") + ] + 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.") section (Identifier "The corpus") [text "The corpus"] $ do - paragraph (s "[Assert·Does]" "Pairs live as data." ++ s "[Assert·Does]" "Each entry is a Vortex value holding the document kind, the question, both sides, both annotations and the edit." ++ s "[Assert·Does]" "Guides render their examples from the corpus, so the handbook and the checker share one source of truth.") - paragraph (s "[Assert·Does]" "Agents that annotate are prompted with the pairs for the document kind." ++ s "[Assert·Does]" "The pairs both calibrate annotators and test them." ++ s "[Assert·Does·Neg]" "An annotator that misreads either side of a pair is not trusted.") - paragraph (s "[Assert·Does]" "Every new ambiguity the owner catches becomes a new pair." ++ s "[Assert·Does]" "If no existing codepoint separates the two sides, the pair adds a codepoint, a rule or a question." ++ s "[Assert·Does]" "The minimal pair is how dreamstop learns.") + 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.") section (Identifier "Annotating a sentence") [text "Annotating a sentence"] $ do - paragraph (s "[Assert·Done]" "Before you start, you know the kind of document the sentence belongs to." ++ sx "[Assert·Done]" [text "You have also read the pairs for that kind in ", reference (Identifier "Pairs per document"), text "."]) + paragraph (s "[ASR·HAB] [ASR·PRF] precondition" "Before you start, you have read the rules for the sentence's document kind.") ordered - [ paragraph (s "[Direct·Did]" "Split the sentence into clauses." ++ s "[Direct·Did]" "Treat a relative clause such as “which moves reviews out of SQLite” as a clause of its own.") - , paragraph (s "[Direct·Did]" "For each clause, choose its force: Assert, Direct or Ask.") - , paragraph (s "[Direct·Did]" "Choose its aspect: Did, Done, Doing or Does." ++ s "[Direct·Did]" "Ask whether the clause reports an event or describes what something does.") - , paragraph (s "[Direct·Did]" "Choose its phase, if the clause compares the software before and after a release." ++ s "[Direct·Did]" "Look for now, no longer, still and not yet.") - , paragraph (s "[Direct·Did]" "Choose its negation: Neg before the modality denies the modality, and Neg after it denies the content.") - , paragraph (s "[Direct·Did]" "Choose its modality, if the clause is about obligation, recommendation, ability, necessity or possibility.") - , paragraph (s "[Direct·Did]" "Choose its bound and its evidence, if the clause turns on them.") - , paragraph (s "[Direct·Did]" "Write the vector in slot order and the annotation in clause order.") - , paragraph (s "[Direct·Did]" "Ask whether another careful reader would choose a different codepoint in any slot." ++ s "[Direct·Did]" "If so, write that reading as a second annotation.") - , paragraph (s "[Direct·Did]" "Check every annotation against the document rules, and drop the readings that break them.") + [ 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." ] - section (Identifier "Checking an annotation") [text "Checking an annotation"] $ do - paragraph (s "[Assert·Does]" "The result is a verdict." ++ s "[Assert·Does]" "One remaining annotation means the sentence is clear, several mean it is ambiguous, and none means it is nonsense." ++ s "[Assert·Does]" "An annotation is correct when another reader, working alone, writes the same characters.") + 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.") section (Identifier "When readers disagree") [text "When readers disagree"] $ do - paragraph (s "[Direct·Did]" "Find the first slot in which the two annotations differ." ++ s "[Direct·Did]" "Look that slot up in its layer's section and read its pair." ++ s "[Assert·Does]" "If both readings remain admissible, the sentence is ambiguous, and the author rewrites it." ++ s "[Direct·Did]" "Annotate the rewrite from step 1.") + 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." + paragraph (s "[ASR·HAB]" "The rewritten sentence returns to the first step.") - section (Identifier "How reviews use dreamstop") [text "How reviews use dreamstop"] $ do - paragraph (s "[Assert·Done]" "Before a review starts, the change under review has its documentation in place.") + 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 - [ paragraph (s "[Direct·Did]" "Annotate every changed sentence, each reviewer working alone.") - , paragraph (s "[Direct·Did]" "Compare the annotations sentence by sentence.") - , paragraph (s "[Direct·Did]" "For each question in the document's set, find the sentences that answer it, and count the answers.") - , paragraph (s "[Direct·Did]" "Report each question with no answer or several, and each sentence whose annotations differ, naming the slot and the readings on each side.") + [ 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." + ] + 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.") + 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." + 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.") + + 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." ] section (Identifier "Checking a review") [text "Checking a review"] $ do - paragraph (s "[Assert·Does]" "The review passes when every sentence has a single admissible annotation and every question in the set has exactly one answer." ++ s "[Assert·Does]" "A finding names a question or a slot, so it is short." ++ s "[Assert·Does]" "“Clause 2: Did against Does” tells the author where to look and what to choose between.") + 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.") section (Identifier "Settling a finding") [text "Settling a finding"] $ do - paragraph (s "[Assert·Does]" "The author answers a finding by rewriting the text." ++ s "[Assert·Does·Neg]" "A reply that explains what the author meant does not settle the finding." ++ s "[Direct·Did]" "Review the rewritten text from step 1." ++ s "[Assert·Does]" "Every finding that a review settles is a candidate pair for the corpus.") + 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." + 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 "[Assert·Does]" "This manual is held to its own question set." ++ s "[Assert·Does]" "Each procedure answers the four questions a manual's reader is entitled to ask, in the sections below." ++ s "[Assert·Does]" "The repository keeps this map as data in prose/questions.vx, and the build checks that every section it names exists.") + 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.") 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 "Annotating a sentence", t "its numbered steps", t "Checking an annotation", t "When readers disagree"] - , [t "Writing a pair", t "Writing a pair", t "its numbered steps", t "Checking a pair", t "When a pair cannot be written"] - , [t "Reviewing", t "How reviews use dreamstop", t "its numbered steps", t "Checking a review", t "Settling a finding"] + [ [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"] + , [t "Reviewing with dreamstop", t "its steps", t "their numbers", t "Checking a review", t "Settling a finding"] ] section (Identifier "Worked examples") [text "Worked examples"] $ do - paragraph (s "[Assert·Does]" "These sentences come from the ChangeLogs of nixlab-shell 0.122.0.0 and vortex-shell 0.7.0.0 and 0.7.0.1." ++ s "[Assert·Does]" "Each example quotes the sentence, gives its readings and settles it under the ChangeLog rules.") + paragraph (s "[ASR·HAB]" "These sentences come from the ChangeLogs of nixlab-shell 0.122.0.0 and vortex-shell 0.7.0.0 and 0.7.0.1.") 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.") - readingTable - [ [t "1", c "[Assert·Did] [Assert·Did]", t "the release moved the existing reviews once"] - , [t "2", c "[Assert·Did] [Assert·Does]", t "the store is where reviews live from this release"] + 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"] ] - paragraph (s "[Assert·Does]" "The sentence is ambiguous in the aspect of clause 2." ++ s "[Assert·Does]" "Reading 1 breaks the ChangeLog rule that keeps Did for the release action." ++ s "[Assert·Does]" "The rewrite gives clause 2 the present tense, so only reading 2 remains.") - quotation $ paragraph (t "Added the review store (NixLab.ReviewStore), which moves reviews and sign-offs out of SQLite.") - paragraph (s "[Assert·Does]" "The same entry says that the forge imports the SQLite tables once, at first use." ++ s "[Assert·Does]" "That sentence carries New and Once, and it holds the one-time event that reading 1 was reaching for.") + 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.") 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. Nothing in the shell stops it.") - paragraph (s "[Assert·Does]" "vortex-shell 0.7.0.0 had this entry." ++ s "[Assert·Does] [Assert·Does]" "Without a phase it reads as a change, as though 0.7.0.0 introduced the limitation." ++ s "[Assert·Does]" "That breaks the rule that every standing claim has a phase.") - readingTable - [ [t "1", c "[Assert·Does·New·Neg]", t "this release made such loops uninterruptible"] - , [t "2", c "[Assert·Does·Kept·Neg]", t "such loops were uninterruptible before and remain so"] - ] - paragraph (s "[Assert·Does]" "0.7.0.1 corrected the entry." ++ s "[Assert·Does]" "Reading 2 was meant, and its Kept is licensed by the New in the same entry: 0.7.0.0 began charging evaluation that allocates.") + 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.") quotation $ paragraph (t "Compiled code that loops without allocating is still uninterruptible, so the shell cannot stop it.") - paragraph (s "[Assert·Does]" "The rewrite annotates as [Assert·Does·Kept] [Assert·Does·Neg·Can].") + paragraph (s "[ASR·HAB]" "The rewrite reads as [ASR·HAB] [ASR·HAB·CNT] [ASR·HAB·NEG·ABL·POS].") 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 "[Assert·Does]" "This sentence from nixlab-shell 0.122.0.0 is clear." ++ s "[Assert·Does]" "It annotates as [Assert·Does·New·Must].") - paragraph (s "[Assert·Does]" "Its force is Assert, because the ChangeLog reports that an obligation exists." ++ s "[Assert·Does]" "Its modality is Must and it names the reader, operators, as the rule for obligations requires." ++ s "[Assert·Does]" "Its phase is New, because the obligation did not exist before the release.") - paragraph (s "[Assert·Does·Neg]" "The obligation is not a fact about backups." ++ s "[Assert·Does]" "A reviewer who reads it as evidence that backups exist has applied a counit that Must lacks.") + 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.") quotation $ paragraph (t "After restoring a state directory without them, operators should now restore them.") - paragraph (s "[Assert·Does]" "The companion sentence annotates as [Assert·Does·New·Should]." ++ s "[Assert·Does]" "It recommends where the first sentence obliges, and the modality slot records that difference.") + 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.") + + 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.") + table [t "Limit", t "What it means"] + [ [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 "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"] + , [t "One reference point per document", t "a phase measured from another point, such as since the token rotated, cannot be written"] + ] section (Identifier "Reference table") [text "Reference table"] $ do - paragraph (s "[Assert·Does]" "The table lists every codepoint in slot order.") - table [t "Layer", t "Codepoint", t "Meaning", t "Algebra"] - [ [t "Force", c "Assert", t "states that p", t "judgement"] - , [t "Force", c "Direct", t "tells a reader to act", t "plan"] - , [t "Force", c "Ask", t "asks which alternative holds", t "set of alternatives"] - , [t "Aspect", c "Did", t "happened, as a whole", t "monotone"] - , [t "Aspect", c "Done", t "happened, result holds", t "monotone, event to state"] - , [t "Aspect", c "Doing", t "under way", t "non-monotone"] - , [t "Aspect", c "Does", t "typically", t "tolerates exceptions"] - , [t "Phase", c "New", t "false before, true after", t "non-monotone"] - , [t "Phase", c "Gone", t "true before, false after", t "non-monotone"] - , [t "Phase", c "Kept", t "true before and after", t "monotone"] - , [t "Phase", c "Due", t "false before and after, expected", t "non-monotone"] - , [t "Outer negation", c "Neg", t "denies the modality, or the clause", t "reverses monotonicity"] - , [t "Modality", c "Must", t "obligation", t "functor, no counit"] - , [t "Modality", c "Should", t "recommendation", t "functor, no counit"] - , [t "Modality", c "Can", t "ability", t "functor"] - , [t "Modality", c "Nec", t "necessarily", t "comonad"] - , [t "Modality", c "Poss", t "possibly", t "monad"] - , [t "Inner negation", c "Neg", t "denies the content under the modality", t "reverses monotonicity"] - , [t "Bound", c "Once", t "one bounded event", t ""] - , [t "Bound", c "Each", t "each occurrence", t ""] - , [t "Evidence", c "Measured", t "rests on a measurement", t ""] - , [t "Evidence", c "Claimed", t "rests on the writer's word", t ""] + paragraph (s "[ASR·HAB]" "The table lists every code in display order.") + 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"] + , [t "Force", c "IRG", t "asks which alternative holds"] + , [t "Force", c "DEC", t "makes it so by saying"] + , [t "Force", c "ADM", t "warns of a risk"] + , [t "Force", c "CMS", t "commits the author"] + , [t "Mood", c "FAC", t "factual, not rendered"] + , [t "Mood", c "HYP", t "considered without commitment"] + , [t "Mood", c "COU", t "known to be false"] + , [t "Aspect", c "PFV", t "the event as a whole"] + , [t "Aspect", c "PRF", t "happened, result holds"] + , [t "Aspect", c "PRG", t "under way"] + , [t "Aspect", c "HAB", t "typically, or a state"] + , [t "Phase", c "INC", t "false before, true after"] + , [t "Phase", c "CSS", t "true before, false after"] + , [t "Phase", c "CNT", t "true before and after"] + , [t "Phase", c "EXP", t "false before and after, expected"] + , [t "Negation", c "NEG", t "before the modal: negates the modal. After it: negates the content."] + , [t "Ground", c "DEO", t "a rule or permission"] + , [t "Ground", c "ABL", t "the nature or capacity of the thing"] + , [t "Ground", c "TEL", t "what a named goal requires"] + , [t "Strength", c "NEC", t "in every admitted situation"] + , [t "Strength", c "WNC", t "in every best admitted situation"] + , [t "Strength", c "POS", t "in some admitted situation"] + , [t "Bound", c "ONE", t "one time in the program's life"] + , [t "Evidence", c "OBS", t "observed by the author"] + , [t "Evidence", c "PUP", t "a verifiable third-party record"] + , [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"] ] section (Identifier "Glossary") [text "Glossary"] $ do glossary - [ definition (Identifier "Term: annotation") [text "Annotation"] $ paragraph (s "[Assert·Does]" "One reading of a sentence, written as one vector of codepoints per clause.") - , definition (Identifier "Term: clause") [text "Clause"] $ paragraph (s "[Assert·Does]" "A part of a sentence that makes one claim, gives one instruction or asks one question.") - , definition (Identifier "Term: codepoint") [text "Codepoint"] $ paragraph (s "[Assert·Does]" "One value of one layer, such as Does or Gone.") - , definition (Identifier "Term: continuous disambiguation") [text "Continuous disambiguation"] $ paragraph (s "[Assert·Does]" "Comparing readings at every review and rewriting every sentence that is not clear.") - , definition (Identifier "Term: corpus") [text "Corpus"] $ paragraph (s "[Assert·Does]" "The minimal pairs kept as Vortex data, from which guides render their examples.") - , definition (Identifier "Term: document rule") [text "Document rule"] $ paragraph (s "[Assert·Does]" "A predicate over annotations for one kind of document, specified by its pairs.") - , definition (Identifier "Term: layer") [text "Layer"] $ paragraph (s "[Assert·Does]" "One slot of a vector: force, aspect, phase, outer negation, modality, inner negation, bound or evidence.") - , definition (Identifier "Term: minimal pair") [text "Minimal pair"] $ paragraph (s "[Assert·Does]" "A bad and a good sentence whose annotations differ in exactly one slot of one clause.") - , definition (Identifier "Term: monotone") [text "Monotone"] $ paragraph (s "[Assert·Does]" "Said of an operator that turns a stronger proposition into a stronger result.") - , definition (Identifier "Term: reading") [text "Reading"] $ paragraph (s "[Assert·Does]" "One meaning that a reader finds in a sentence.") - , definition (Identifier "Term: release") [text "Release"] $ paragraph (s "[Assert·Does]" "The event a ChangeLog entry reports, and the point that phase compares across.") - , definition (Identifier "Term: vector") [text "Vector"] $ paragraph (s "[Assert·Does]" "The codepoints of one clause, written in slot order inside square brackets.") - , definition (Identifier "Term: verdict") [text "Verdict"] $ paragraph (s "[Assert·Does]" "Nonsense, clear or ambiguous: the result of gathering every reader's readings.") + [ 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: 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: 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: 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: 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 29b4cbc..766a3e4 100644 @@ -48,15 +48,94 @@ local: sentence = lib.elemAt m 1; }) (captures ''sentence "(\[[^"]*])" "([^"]*)"'' ../prose/front.vx); - # One clause vector in slot order: force, aspect, phase, outer negation, - # modality, inner negation, bound, evidence. The Manual rules allow only Assert and - # Direct, and the front page is held to the same rules. - vector = "\\[(Assert|Direct)·(Did|Done|Doing|Does)(·(New|Gone|Kept|Due))?(·Neg)?(·(Must|Should|Can|Nec|Poss)(·Neg)?)?(·(Once|Each))?(·(Measured|Claimed))?]"; - wellFormed = a: builtins.match "${vector}( ${vector})*" a != null; - clauseCount = a: lib.length (lib.filter builtins.isList (builtins.split "\\[" a)); - illFormed = lib.filter (a: !wellFormed a) ( - map (x: x.annotation) (manualSentences ++ frontSentences) ++ manualMixed - ); + manualSteps = map (m: { + step = lib.elemAt m 0; + stepSentence = lib.elemAt m 1; + result = lib.elemAt m 2; + resultSentence = lib.elemAt m 3; + }) (captures ''stepThen "(\[[^"]*)" "([^"]*)" "(\[[^"]*)" "([^"]*)"'' ../manual/dreamstop.vx); + manualRecoveries = map (m: { + annotation = lib.elemAt m 0; + 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}))?"; + 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. + 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 = "an obligation-holder is on an ASR clause (law 13)"; + holds = x: !(has "DEO" x.codes) || lib.hasPrefix "ASR" x.codes; + } + { + law = "ONE excludes HAB (law 9)"; + holds = x: !(has "ONE" x.codes && has "HAB" x.codes); + } + { + law = "evidence only on ASR (law 10)"; + holds = x: !(has "OBS|PUP|RPR|INF|REC" x.codes) || lib.hasPrefix "ASR" x.codes; + } + { + 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); + } + ]; + readings = + map (x: x.annotation) (manualSentences ++ frontSentences ++ manualRecoveries) + ++ manualMixed + ++ lib.concatMap (x: [ + x.step + x.result + ]) manualSteps; + illFormed = lib.filter (a: builtins.match "${clause}( ${clause})*" 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 + ) + ++ map (x: "the recovery does not start from a failed precondition: ${x.sentence}") ( + lib.filter (x: !(has "NEG] precondition.*] step" x.annotation)) manualRecoveries + ); manual = pkgs.runCommand "dreamstop.openfp.net-manual" @@ -89,7 +168,15 @@ local: while IFS= read -r t; do grep -qF -- "$t" manual.txt || { echo "manual: the HTML does not say: $t" >&2; exit 1; } done < ${ - pkgs.writeText "manual-sentences" (lib.concatMapStrings (x: x.sentence + "\n") manualSentences) + pkgs.writeText "manual-sentences" ( + lib.concatMapStrings (x: x + "\n") ( + map (x: x.sentence) (manualSentences ++ manualRecoveries) + ++ lib.concatMap (x: [ + x.stepSentence + x.resultSentence + ]) manualSteps + ) + ) } for t in Ithkuil Quijada; do if grep -qiF "$t" manual.txt; then echo "manual: it names $t" >&2; exit 1; fi @@ -97,8 +184,8 @@ local: touch $out ''; - # Every sentence carries a well-formed annotation under the Manual - # rules, every manual paragraph is annotated and no prose has a + # 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. # Whether an annotation is the right reading is for review. prose = @@ -109,9 +196,13 @@ local: } '' ${lib.concatMapStrings (a: '' - echo "prose: not a Manual annotation in slot order: ${lib.escapeShellArg a}" >&2 + echo "prose: not a Manual reading in display order: ${lib.escapeShellArg 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"} ${lib.concatMapStrings (q: '' echo "prose: prose/questions.vx names a section the manual lacks: ${lib.escapeShellArg q}" >&2 '') unanswered} @@ -123,9 +214,14 @@ local: echo "prose: no semicolons" >&2; exit 1 fi echo "prose: ${ - toString (lib.length manualSentences + lib.length manualMixed) + toString ( + lib.length manualSentences + + lib.length manualMixed + + lib.length manualRecoveries + + 2 * lib.length manualSteps + ) } manual and ${toString (lib.length frontSentences)} front-page sentences, ${ - toString (lib.foldl' (n: x: n + clauseCount x.annotation) 0 (manualSentences ++ frontSentences)) + toString (lib.foldl' (n: a: n + clauseCount a) 0 readings) } clauses" > $out ''; diff --git a/prose/front.vx b/prose/front.vx index b161fdf..ca4cc5a 100644 @@ -1,23 +1,23 @@ -- Every sentence of the dreamstop.openfp.net front page, with its dreamstop +-- reading under the Manual rules: one clause per finite verb group, codes in +-- display order. 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. do - sentence "[Assert·Does]" "dreamstop is a language for continuous disambiguation." - sentence "[Assert·Does]" "A reader annotates each sentence with codepoints, one vector per clause." - sentence "[Assert·Does]" "Each annotation records one reading of the sentence." - sentence "[Assert·Does]" "A sentence is clear when every reader finds exactly one reading." - sentence "[Assert·Does]" "It is ambiguous when the readings differ." - sentence "[Assert·Does]" "It is nonsense when no reader finds a coherent reading." - sentence "[Assert·Does] [Assert·Does]" "Every review compares the readings, and the author rewrites any sentence that is not clear." - sentence "[Assert·Does]" "The sentence has one reading, the same for every reader." - sentence "[Assert·Does]" "Readers find different readings, so the author picks one and rewrites the sentence." - sentence "[Assert·Does]" "The sentence has no coherent reading, because now and still claim opposite histories." - sentence "[Assert·Does]" "A minimal pair is a bad sentence and a good sentence that differ in one place." - sentence "[Assert·Does]" "Their annotations differ in exactly one slot of one clause, and that slot is what the pair teaches." - sentence "[Assert·Does]" "This pair teaches that a ChangeLog keeps Did for the release action and describes the store with Does." - sentence "[Assert·Does]" "Each document rule is specified by its pairs." - sentence "[Assert·Does] [Assert·Does]" "The rule rejects every bad side and accepts every good side." - sentence "[Assert·Does·Neg]" "A rule with no pairs is not a rule." - sentence "[Assert·Does]" "The manual covers every codepoint, the verdicts, the rules for each kind of document and how reviews use them." - sentence "[Assert·Doing]" "The dreamstop package is being built in dreamstop/dreamstop." + 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]" "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]" "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." diff --git a/prose/questions.vx b/prose/questions.vx index 977da86..06d07c4 100644 @@ -5,15 +5,15 @@ do procedure "Annotating a sentence" (answers "What do I do?" "Annotating a sentence") (answers "In what order?" "Annotating a sentence") - (answers "How do I know it worked?" "Checking an annotation") + (answers "How do I know it worked?" "Checking a reading") (answers "How do I recover?" "When readers disagree") procedure "Writing a pair" (answers "What do I do?" "Writing a pair") (answers "In what order?" "Writing a pair") (answers "How do I know it worked?" "Checking a pair") (answers "How do I recover?" "When a pair cannot be written") - procedure "Reviewing" - (answers "What do I do?" "How reviews use dreamstop") - (answers "In what order?" "How reviews use dreamstop") + procedure "Reviewing with dreamstop" + (answers "What do I do?" "Reviewing with dreamstop") + (answers "In what order?" "Reviewing with dreamstop") (answers "How do I know it worked?" "Checking a review") (answers "How do I recover?" "Settling a finding")