• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
        • Grammar-parser
        • Meta-circular-validation
        • Parsing-primitives-defresult
        • Parsing-primitives-seq
        • Operations
          • In-terminal-set
          • Well-formedness
          • Closure
            • Calc-trans-rules-of-names
            • Rules-of-name
            • Rulelist-unused-rules
            • Trans-rules-of-names
            • Rulelist-called-rules
            • Rulelist-defined-rules
            • Rulelist-closedp
            • Rule-called-rules
            • Element-called-rules
            • Concatenation-called-rules
            • Alternation-called-rules
            • Repetition-called-rules
          • Plugging
          • Ambiguity
          • Renaming
          • Numeric-range-retrieval
          • Rule-utilities
          • Removal
          • Character-value-retrieval
        • Examples
        • Differences-with-paper
        • Constructor-utilities
        • Grammar-printer
        • Parsing-tools
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Operations

Closure

Closure in ABNF grammars.

A rule's definiens may reference (i.e. ``call'') other rules. Those rules may in turn call further rules, and so on until a ``closed'' set of rules is reached.

When grammars are modularly defined, a grammar may not be closed, but after the modules are composed into one grammar for parsing, the resulting grammar should be closed. When composing grammars, sometimes only a portion of a grammar is selected, consisting of a subset of its rules (perhaps called by other grammars) along with their closure.

Subtopics

Calc-trans-rules-of-names
Calculate the rules from a list of rules that transitively define names in a list of rule names, collecting them into an accumulator (list of rules).
Rules-of-name
Separate from some rules the ones that define a rule name.
Rulelist-unused-rules
Rule names that are defined in a list of rules but not used anywhere in those rules.
Trans-rules-of-names
Find the rules from a list of rules that transitively define the names in a list of rule names.
Rulelist-called-rules
Rule names that occur in (the definientia of) a list of rules.
Rulelist-defined-rules
Rule names that are defined in a list of rules.
Rulelist-closedp
A rule list is closed iff it defines all the rules that it calls.
Rule-called-rules
Rule names that occur in (the definiens of) a rule.
Element-called-rules
Rule names that occur in an element.
Concatenation-called-rules
Rule names that occur in a concatenation.
Alternation-called-rules
Rule names that occur in an alternation.
Repetition-called-rules
Rule names that occur in a repetition.