• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Abnf
          • Defdefparse
          • Deftreeops
          • Defgrammar
          • Notation
          • Grammar-parser
          • Meta-circular-validation
          • Parsing-primitives-defresult
          • Parsing-primitives-seq
          • Operations
            • In-terminal-set
            • 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
            • Well-formedness
            • Plugging
            • Ambiguity
            • Renaming
            • Rule-utilities
            • Removal
          • Examples
          • Differences-with-paper
          • Grammar-printer
          • Parsing-tools
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Pfcs
        • Soft
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • C
        • Syntheto
        • File-io-light
        • Number-theory
        • Cryptography
        • Lists-light
        • Json
        • Axe
        • Builtins
        • Solidity
        • Std-extensions
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • 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.