• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
              • Compilation
              • Static-semantics
              • Concrete-syntax
                • Pretty-printer
                • Grammar
                • Lexing-and-parsing
                  • Lexer
                  • Parser
                  • Token-fringe
                  • Longest-lexp
                  • Parser-interface
                  • Grammar-lexp
                  • Identifier-lexp
                  • Output-file-parsep
                  • Input-file-parsep
                  • File-lex-parse-p
                  • Filter-tokens
                  • Lexp
                  • File-parsep
                  • Input-parser
                    • Parse-public/private/constants/constant/const/main/registers
                    • Parse-public/private/constants/constant/const
                    • Parse-input-item
                    • Parse-input-expression
                    • Parse-input-title
                      • Parse-input-section
                      • Parse-*-input-section
                      • Parse-input-type
                      • Parse-*-input-item
                      • Parse-input-file
                    • Output-file-lex-parse-p
                    • Input-file-lex-parse-p
                    • Parser-abstractor-interface
                    • Identifier-abnf-stringp
                    • Symbol-abnf-stringp
                    • Keyword-abnf-stringp
                    • Output-parser
                    • Tokenizer
                  • Input-pretty-printer
                  • Output-pretty-printer
                  • Unicode-characters
                  • Concrete-syntax-trees
                  • Symbols
                  • Keywords
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Input-parser

    Parse-input-title

    Parse an input-title.

    Signature
    (parse-input-title token input) 
      → 
    (mv tree next-token rest-input)
    Arguments
    token — Guard (abnf::tree-optionp token).
    input — Guard (abnf::tree-listp input).
    Returns
    tree — Type (abnf::tree-resultp tree).
    next-token — Type (abnf::tree-optionp next-token).
    rest-input — Type (abnf::tree-listp rest-input).

    Definitions and Theorems

    Function: parse-input-title

    (defun parse-input-title (token input)
      (declare (xargs :guard (and (abnf::tree-optionp token)
                                  (abnf::tree-listp input))))
      (let ((__function__ 'parse-input-title))
        (declare (ignorable __function__))
        (b* (((pok tree1)
              (parse-symbol "[" token input))
             ((pok tree2)
              (parse-public/private/constants/constant/const/main/registers
                   token input))
             ((pok tree3)
              (parse-symbol "]" token input)))
          (mv (abnf::make-tree-nonleaf
                   :rulename? (abnf::rulename "input-title")
                   :branches (list (list tree1)
                                   (list tree2)
                                   (list tree3)))
              token input))))

    Theorem: tree-resultp-of-parse-input-title.tree

    (defthm tree-resultp-of-parse-input-title.tree
      (b* (((mv ?tree ?next-token ?rest-input)
            (parse-input-title token input)))
        (abnf::tree-resultp tree))
      :rule-classes :rewrite)

    Theorem: tree-optionp-of-parse-input-title.next-token

    (defthm tree-optionp-of-parse-input-title.next-token
      (b* (((mv ?tree ?next-token ?rest-input)
            (parse-input-title token input)))
        (abnf::tree-optionp next-token))
      :rule-classes :rewrite)

    Theorem: tree-listp-of-parse-input-title.rest-input

    (defthm tree-listp-of-parse-input-title.rest-input
      (b* (((mv ?tree ?next-token ?rest-input)
            (parse-input-title token input)))
        (abnf::tree-listp rest-input))
      :rule-classes :rewrite)

    Theorem: parsize-of-parse-input-title-<=

    (defthm parsize-of-parse-input-title-<=
      (b* (((mv ?tree ?next-token ?rest-input)
            (parse-input-title token input)))
        (<= (parsize next-token rest-input)
            (parsize token input)))
      :rule-classes :linear)

    Theorem: parsize-of-parse-input-title-<

    (defthm parsize-of-parse-input-title-<
      (b* (((mv ?tree ?next-token ?rest-input)
            (parse-input-title token input)))
        (implies (not (reserrp tree))
                 (< (parsize next-token rest-input)
                    (parsize token input))))
      :rule-classes :linear)

    Theorem: parse-input-title-of-tree-option-fix-token

    (defthm parse-input-title-of-tree-option-fix-token
      (equal (parse-input-title (abnf::tree-option-fix token)
                                input)
             (parse-input-title token input)))

    Theorem: parse-input-title-tree-option-equiv-congruence-on-token

    (defthm parse-input-title-tree-option-equiv-congruence-on-token
      (implies (abnf::tree-option-equiv token token-equiv)
               (equal (parse-input-title token input)
                      (parse-input-title token-equiv input)))
      :rule-classes :congruence)

    Theorem: parse-input-title-of-tree-list-fix-input

    (defthm parse-input-title-of-tree-list-fix-input
      (equal (parse-input-title token (abnf::tree-list-fix input))
             (parse-input-title token input)))

    Theorem: parse-input-title-tree-list-equiv-congruence-on-input

    (defthm parse-input-title-tree-list-equiv-congruence-on-input
      (implies (abnf::tree-list-equiv input input-equiv)
               (equal (parse-input-title token input)
                      (parse-input-title token input-equiv)))
      :rule-classes :congruence)