• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
          • Check-tree-nonleaf-num-range-4
          • Check-tree-nonleaf-num-range-3
          • Check-tree-num-range-4
          • Check-tree-nonleaf-num-range-2
          • Check-tree-num-range-3
          • Check-tree-num-range-2
          • Tree-list-tuple10
          • Check-tree-nonleaf-num-range
          • Tree-list-tuple9
          • Tree-list-tuple8
          • Tree-list-tuple7
          • Tree-list-tuple6
          • Check-tree-nonleaf-num-seq
          • Check-tree-num-range
          • Tree-list-tuple5
          • Check-tree-nonleaf-10
          • Check-tree-nonleaf-9
          • Check-tree-nonleaf-8
          • Check-tree-nonleaf-7
          • Check-tree-list-list-10
          • Tree-list-tuple4
          • Check-tree-nonleaf-6
          • Check-tree-nonleaf-5
          • Check-tree-list-list-9
          • Check-tree-nonleaf-4
          • Check-tree-nonleaf-3
          • Check-tree-nonleaf-2
          • Check-tree-nonleaf
          • Check-tree-list-list-8
          • Check-tree-nonleaf-1-1
          • Check-tree-nonleaf-1
          • Check-tree-list-list-7
          • Tree-list-tuple3
          • Pass
          • Check-tree-list-list-6
          • Check-tree-list-list-5
          • Tree=>string
          • Tree-list-tuple2
          • Check-tree-list-list-4
          • Check-tree-list-list-3
          • Check-tree-ichars
          • Check-tree-schars
          • Check-tree-num-seq
          • Check-tree-list-list-2
          • Tree-list-tuple9-result
          • Tree-list-tuple8-result
          • Tree-list-tuple7-result
          • Tree-list-tuple6-result
          • Tree-list-tuple5-result
          • Tree-list-tuple4-result
          • Tree-list-tuple3-result
          • Tree-list-tuple2-result
          • Tree-list-tuple10-result
          • Pass-result
          • Check-tree-list-list-1
          • Tree-info-for-error
          • Check-tree-list-1
          • Check-tree-nonleaf?
          • Check-tree-leafterm
        • Notation
        • Grammar-parser
        • Meta-circular-validation
        • Parsing-primitives-defresult
        • Parsing-primitives-seq
        • Operations
        • 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
  • Abnf

Tree-utilities

Some utilities to manipulate ABNF trees.

We provide utilities to manipulate ABNF trees, more specifically to check and decompose them.

Subtopics

Check-tree-nonleaf-num-range-4
Check if an ABNF tree is a non-leaf tree with a given optional rule name or no rule name as root and a list of one list of one subtree, where the subtree is a leaf tree with a single natural number in one of four given ranges, returning that natural number if successful.
Check-tree-nonleaf-num-range-3
Check if an ABNF tree is a non-leaf tree with a given optional rule name or no rule name as root and a list of one list of one subtree, where the subtree is a leaf tree with a single natural number in one of three given ranges, returning that natural number if successful.
Check-tree-num-range-4
Check if an ABNF is a leaf tree with a single natural number in one of four given ranges, returning that natural number if successful.
Check-tree-nonleaf-num-range-2
Check if an ABNF tree is a non-leaf tree with a given optional rule name or no rule name as root and a list of one list of one subtree, where the subtree is a leaf tree with a single natural number in one of two given ranges, returning that natural number if successful.
Check-tree-num-range-3
Check if an ABNF is a leaf tree with a single natural number in one of three given ranges, returning that natural number if successful.
Check-tree-num-range-2
Check if an ABNF is a leaf tree with a single natural number in one of two given ranges, returning that natural number if successful.
Tree-list-tuple10
Fixtype of 10-tuples of lists of ABNF trees.
Check-tree-nonleaf-num-range
Check if an ABNF tree is a non-leaf tree with a given optional rule name or no rule name as root and a list of one list of one subtree, where the subtree is a leaf tree with a single natural number in a range, returning that natural number if successful.
Tree-list-tuple9
Fixtype of 9-tuples of lists of ABNF trees.
Tree-list-tuple8
Fixtype of 8-tuples of lists of ABNF trees.
Tree-list-tuple7
Fixtype of 7-tuples of lists of ABNF trees.
Tree-list-tuple6
Fixtype of 6-tuples of lists of ABNF trees.
Check-tree-nonleaf-num-seq
Check if an ABNF tree is a non-leaf tree with a given optional rule name or no rule name as root and a list of one list of one subtree, where the subtree is a leaf tree whose natural numbers match a given sequence of natural numbers.
Check-tree-num-range
Check if an ABNF is a leaf tree with a single natural number in a given range, returning that natural number if successful.
Tree-list-tuple5
Fixtype of 5-tuples of lists of ABNF trees.
Check-tree-nonleaf-10
Check if an ABNF tree has a given rule name or no rule name as root and a list of ten lists of subtrees, returning those lists of subtrees if successful.
Check-tree-nonleaf-9
Check if an ABNF tree has a given rule name or no rule name as root and a list of nine lists of subtrees, returning those lists of subtrees if successful.
Check-tree-nonleaf-8
Check if an ABNF tree has a given rule name or no rule name as root and a list of eight lists of subtrees, returning those lists of subtrees if successful.
Check-tree-nonleaf-7
Check if an ABNF tree has a given rule name or no rule name as root and a list of seven lists of subtrees, returning those lists of subtrees if successful.
Check-tree-list-list-10
Check if a list of lists of ABNF trees consists of ten lists of subtrees, returning those lists of subtrees if successful.
Tree-list-tuple4
Fixtype of 4-tuples of lists of ABNF trees.
Check-tree-nonleaf-6
Check if an ABNF tree has a given rule name or no rule name as root and a list of six lists of subtrees, returning those lists of subtrees if successful.
Check-tree-nonleaf-5
Check if an ABNF tree has a given rule name or no rule name as root and a list of five lists of subtrees, returning those lists of subtrees if successful.
Check-tree-list-list-9
Check if a list of lists of ABNF trees consists of nine lists of subtrees, returning those lists of subtrees if successful.
Check-tree-nonleaf-4
Check if an ABNF tree has a given rule name or no rule name as root and a list of four lists of subtrees, returning those lists of subtrees if successful.
Check-tree-nonleaf-3
Check if an ABNF tree has a given rule name or no rule name as root and a list of three lists of subtrees, returning those lists of subtrees if successful.
Check-tree-nonleaf-2
Check if an ABNF tree has a given rule name or no rule name as root and a list of two lists of subtrees, returning those lists of subtrees if successful.
Check-tree-nonleaf
Check if an ABNF tree has a given rule name or no rule name as root, returning the list of lists of subtrees if successful.
Check-tree-list-list-8
Check if a list of lists of ABNF trees consists of eight lists of subtrees, returning those lists of subtrees if successful.
Check-tree-nonleaf-1-1
Check if an ABNF tree has a given rule name or no rule name as root and a list of one list of one subtree, returning the subtree if successful.
Check-tree-nonleaf-1
Check if an ABNF tree has a given rule name or no rule name as root and a list of one list of subtrees, returning the list of subtrees if successful.
Check-tree-list-list-7
Check if a list of lists of ABNF trees consists of seven lists of subtrees, returning those lists of subtrees if successful.
Tree-list-tuple3
Fixtype of 3-tuples of lists of ABNF trees.
Pass
Fixtype consisting of a single `pass' indicator.
Check-tree-list-list-6
Check if a list of lists of ABNF trees consists of six lists of subtrees, returning those lists of subtrees if successful.
Check-tree-list-list-5
Check if a list of lists of ABNF trees consists of five lists of subtrees, returning those lists of subtrees if successful.
Tree=>string
ACL2 string from the fringe of the ABNF tree.
Tree-list-tuple2
Fixtype of 2-tuples of lists of ABNF trees.
Check-tree-list-list-4
Check if a list of lists of ABNF trees consists of four lists of subtrees, returning those lists of subtrees if successful.
Check-tree-list-list-3
Check if a list of lists of ABNF trees consists of three lists of subtrees, returning those lists of subtrees if successful.
Check-tree-ichars
Check if an ABNF tree is a leaf tree whose natural numbers case-insensitively match a string of ACL2 characters.
Check-tree-schars
Check if an ABNF tree is a leaf tree whose natural numbers case-sensitively match a string of ACL2 characters.
Check-tree-num-seq
Check if an ABNF tree is a leaf tree whose natural numbers match a given sequence of natural numbers.
Check-tree-list-list-2
Check if a list of lists of ABNF trees consists of two lists of subtrees, returning those lists of subtrees if successful.
Tree-list-tuple9-result
Fixtype of errors and 9-tuples of lists of ABNF trees.
Tree-list-tuple8-result
Fixtype of errors and 8-tuples of lists of ABNF trees.
Tree-list-tuple7-result
Fixtype of errors and 7-tuples of lists of ABNF trees.
Tree-list-tuple6-result
Fixtype of errors and 6-tuples of lists of ABNF trees.
Tree-list-tuple5-result
Fixtype of errors and 5-tuples of lists of ABNF trees.
Tree-list-tuple4-result
Fixtype of errors and 4-tuples of lists of ABNF trees.
Tree-list-tuple3-result
Fixtype of errors and 3-tuples of lists of ABNF trees.
Tree-list-tuple2-result
Fixtype of errors and 2-tuples of lists of ABNF trees.
Tree-list-tuple10-result
Fixtype of errors and 10-tuples of lists of ABNF trees.
Pass-result
Fixtype of errors and the `pass' indicator.
Check-tree-list-list-1
Check if a list of lists of ABNF trees consists of one list of subtrees, returning that list of subtrees if successful.
Tree-info-for-error
Information about a tree for an error result.
Check-tree-list-1
Check if a list of ABNF trees consists of one subtree, returning that subtree if successful.
Check-tree-nonleaf?
Check if an ABNF tree is a non-leaf tree, returning its rule name (or nil if absent) if successful.
Check-tree-leafterm
Check if an ABNF tree is a leaf tree, returning its list of natural numbers if sucessful.