• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Soft
        • C
          • Syntax-for-tools
            • Disambiguator
            • Abstract-syntax
            • Parser
            • Validator
            • Printer
            • Formalized-subset
              • Expr-pure-formalp
              • Type-spec-list-integer-formalp
              • Stmts/blocks-formalp
              • Extdecl-formalp
              • Ident-formalp
              • Type-spec-list-formalp
              • Tyname-formalp
              • Pointers-formalp
                • Dirdeclor-obj-formalp
                • Desiniter-formalp
                • Fundef-formalp
                • Decl-obj-formalp
                • Decl-block-formalp
                • Initdeclor-obj-formalp
                • Expr-asg-formalp
                • Structdecl-formalp
                • Initdeclor-block-formalp
                • Decl-struct-formalp
                • Dirdeclor-fun-formalp
                • Dirdeclor-block-formalp
                • Initdeclor-fun-formalp
                • Transunit-ensemble-formalp
                • Param-declor-formalp
                • Initer-formalp
                • Expr-call-formalp
                • Declor-obj-formalp
                • Decl-fun-formalp
                • Param-declon-formalp
                • Structdeclor-formalp
                • Stor-spec-list-formalp
                • Declor-fun-formalp
                • Declor-block-formalp
                • Strunispec-formalp
                • Structdecl-list-formalp
                • Param-declon-list-formalp
                • Desiniter-list-formalp
                • Extdecl-list-formalp
                • Expr-list-pure-formalp
                • Transunit-formalp
                • Const-formalp
                • Stmt-formalp
                • Block-item-list-formalp
                • Block-item-formalp
              • Mapping-to-language-definition
              • Input-files
              • Defpred
              • Output-files
              • Abstract-syntax-operations
              • Validation-information
              • Implementation-environments
              • Concrete-syntax
              • Unambiguity
              • Ascii-identifiers
              • Preprocessing
              • Abstraction-mapping
            • Atc
            • Language
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Formalized-subset

    Pointers-formalp

    Check if a list of pointers has formal dynamic semantics.

    Signature
    (pointers-formalp pointers) → yes/no
    Arguments
    pointers — Guard (typequal/attribspec-list-listp pointers).
    Returns
    yes/no — Type (booleanp yes/no).

    Here `pointers' refers to the constructs that may precede a direct declarator to form a declarator, or a direct abstract declarator to form an abstract declarator. Currently only (non-abstract) declarators are supported, so for now we are only interested in the pointers in them. We support any number of pointers, but without type qualifiers or attribute specifiers. So we just check that each inner list is empty. Refer declor for an explanation of how pointers are modeled.

    Definitions and Theorems

    Function: pointers-formalp

    (defun pointers-formalp (pointers)
      (declare (xargs :guard (typequal/attribspec-list-listp pointers)))
      (let ((__function__ 'pointers-formalp))
        (declare (ignorable __function__))
        (or (endp pointers)
            (and (endp (car pointers))
                 (pointers-formalp (cdr pointers))))))

    Theorem: booleanp-of-pointers-formalp

    (defthm booleanp-of-pointers-formalp
      (b* ((yes/no (pointers-formalp pointers)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: pointers-formalp-of-typequal/attribspec-list-list-fix-pointers

    (defthm
         pointers-formalp-of-typequal/attribspec-list-list-fix-pointers
     (equal
         (pointers-formalp (typequal/attribspec-list-list-fix pointers))
         (pointers-formalp pointers)))

    Theorem: pointers-formalp-typequal/attribspec-list-list-equiv-congruence-on-pointers

    (defthm
     pointers-formalp-typequal/attribspec-list-list-equiv-congruence-on-pointers
     (implies
          (typequal/attribspec-list-list-equiv pointers pointers-equiv)
          (equal (pointers-formalp pointers)
                 (pointers-formalp pointers-equiv)))
     :rule-classes :congruence)