• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
          • Syntax-for-tools
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Compilation-database
            • Printer
            • Output-files
            • Abstract-syntax-operations
            • Implementation-environments
            • Abstract-syntax
            • Concrete-syntax
            • Disambiguation
            • Validation
            • Gcc-builtins
            • Preprocessing
              • Preprocessor
                • Preprocessor-states
                  • Plexeme
                    • Plexeme-fix
                    • Plexemep
                    • Plexeme-case
                    • Plexeme-equiv
                    • Plexeme-kind
                    • Plexeme-string
                    • Plexeme-spaces
                    • Plexeme-punctuator
                      • Plexeme-punctuator->punctuator
                        • Make-plexeme-punctuator
                        • Change-plexeme-punctuator
                      • Plexeme-other
                      • Plexeme-number
                      • Plexeme-newline
                      • Plexeme-line-comment
                      • Plexeme-ident
                      • Plexeme-header
                      • Plexeme-char
                      • Plexeme-block-comment
                      • Plexeme-vertical-tab
                      • Plexeme-horizontal-tab
                      • Plexeme-form-feed
                    • Ppstate
                    • Pnumber
                    • Macro-info
                    • Macro-add
                    • Init-ppstate
                    • Plexeme-token/newline-p
                    • Newline
                    • Plexeme-option
                    • Macro-info-option
                    • Macro-table
                    • Plexeme+span
                    • Update-ppstate->lexemes-unread
                    • Update-ppstate->lexemes-read
                    • Update-ppstate->lexemes-length
                    • Update-ppstate->chars-unread
                    • Update-ppstate->chars-read
                    • Update-ppstate->version
                    • Update-ppstate->position
                    • Update-ppstate->macros
                    • Update-ppstate->chars-length
                    • Macro-lookup
                    • Update-ppstate->bytes
                    • Update-ppstate->size
                    • Plexeme-token/space-p
                    • Plexeme-tokenp
                    • Ppstate->gcc
                    • Plexeme-list-token/space-p
                    • Ppstate->size
                    • Ppstate->lexemes-unread
                    • Ppstate->lexemes-read
                    • Ppstate->lexemes-length
                    • Ppstate->chars-unread
                    • Ppstate->bytes
                    • Plexeme-list-token/newline-p
                    • Plexeme-list-not-token/newline-p
                    • Ident-macroinfo-alist
                    • Update-ppstate->lexeme
                    • Update-ppstate->char
                    • Ppstate->version
                    • Ppstate->macros
                    • Ppstate->chars-read
                    • Ppstate->chars-length
                    • Plexeme-list-tokenp
                    • Plexeme-list-not-tokenp
                    • Macro-table-init
                    • Ppstate->lexeme
                    • Ppstate->char
                    • Ppstate-fix
                    • Plexeme+span-list
                    • Plexeme-list
                    • Irr-pnumber
                    • Irr-plexeme
                    • Irr-macro-table
                    • Ppstate->position
                  • Preprocessor-printer
                  • Pread-token/newline
                  • Pread-token
                  • Preprocessor-lexer
                  • Pproc-files
                  • Pproc-file
                  • Filepath-plexeme-list-alist-to-filepath-filedata-map
                  • Filepath-plexeme-list-alist
                  • Preprocessor-reader
                  • Preprocessor-messages
                • External-preprocessing
              • Parsing
            • Atc
            • Transformation-tools
            • Language
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Plexeme-punctuator

    Plexeme-punctuator->punctuator

    Get the punctuator field from a plexeme-punctuator.

    Signature
    (plexeme-punctuator->punctuator x) → punctuator
    Arguments
    x — Guard (plexemep x).
    Returns
    punctuator — Type (stringp punctuator).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: plexeme-punctuator->punctuator$inline

    (defun plexeme-punctuator->punctuator$inline (x)
      (declare (xargs :guard (plexemep x)))
      (declare (xargs :guard (equal (plexeme-kind x) :punctuator)))
      (mbe :logic
           (b* ((x (and (equal (plexeme-kind x) :punctuator)
                        x)))
             (acl2::str-fix (std::da-nth 0 (cdr x))))
           :exec (std::da-nth 0 (cdr x))))

    Theorem: stringp-of-plexeme-punctuator->punctuator

    (defthm stringp-of-plexeme-punctuator->punctuator
      (b* ((punctuator (plexeme-punctuator->punctuator$inline x)))
        (stringp punctuator))
      :rule-classes :rewrite)

    Theorem: plexeme-punctuator->punctuator$inline-of-plexeme-fix-x

    (defthm plexeme-punctuator->punctuator$inline-of-plexeme-fix-x
      (equal (plexeme-punctuator->punctuator$inline (plexeme-fix x))
             (plexeme-punctuator->punctuator$inline x)))

    Theorem: plexeme-punctuator->punctuator$inline-plexeme-equiv-congruence-on-x

    (defthm
     plexeme-punctuator->punctuator$inline-plexeme-equiv-congruence-on-x
     (implies (plexeme-equiv x x-equiv)
              (equal (plexeme-punctuator->punctuator$inline x)
                     (plexeme-punctuator->punctuator$inline x-equiv)))
     :rule-classes :congruence)

    Theorem: plexeme-punctuator->punctuator-when-wrong-kind

    (defthm plexeme-punctuator->punctuator-when-wrong-kind
      (implies (not (equal (plexeme-kind x) :punctuator))
               (equal (plexeme-punctuator->punctuator x)
                      (acl2::str-fix nil))))