• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
          • Atj
            • Atj-implementation
              • Atj-types
              • Atj-java-primitive-array-model
              • Atj-java-abstract-syntax
              • Atj-input-processing
              • Atj-java-pretty-printer
              • Atj-code-generation
              • Atj-java-primitives
              • Atj-java-primitive-arrays
              • Atj-type-macros
              • Atj-java-syntax-operations
                • Jstatems+jblocks-count-ifs
                • Negate-boolean-jexpr
                • Unmake-right-assoc-condand
                • Jstatems+jblocks-methods
                  • Jstatem-methods
                  • Jblock-methods
                • Mergesort-jmethods
                • Mergesort-jfields
                • Make-right-assoc-condand
                • Merge-jmethods
                • Merge-jfields
                • Jexpr-vars
                • Jexpr-methods
              • Atj-fn
              • Atj-library-extensions
              • Atj-java-input-types
              • Atj-test-structures
              • Aij-notions
              • Atj-macro-definition
            • Atj-tutorial
          • Aij
          • Language
        • 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
  • Atj-java-syntax-operations

Jstatems+jblocks-methods

Method names in a statement or block.

We return all the methods names in expressions.

Definitions and Theorems

Function: jstatem-methods

(defun jstatem-methods (statem)
 (declare (xargs :guard (jstatemp statem)))
 (let ((__function__ 'jstatem-methods))
  (declare (ignorable __function__))
  (jstatem-case
    statem
    :locvar nil
    :expr (jexpr-methods statem.get)
    :return (and statem.expr?
                 (jexpr-methods statem.expr?))
    :throw (jexpr-methods statem.expr)
    :break nil
    :continue nil
    :if (union-equal (jexpr-methods statem.test)
                     (jblock-methods statem.then))
    :ifelse (union-equal (jexpr-methods statem.test)
                         (union-equal (jblock-methods statem.then)
                                      (jblock-methods statem.else)))
    :while (union-equal (jexpr-methods statem.test)
                        (jblock-methods statem.body))
    :do (union-equal (jblock-methods statem.body)
                     (jexpr-methods statem.test))
    :for (union-equal
              (union-equal (union-equal (jexpr-methods statem.init)
                                        (jexpr-methods statem.test))
                           (jexpr-methods statem.update))
              (jblock-methods statem.body)))))

Function: jblock-methods

(defun jblock-methods (block)
  (declare (xargs :guard (jblockp block)))
  (let ((__function__ 'jblock-methods))
    (declare (ignorable __function__))
    (cond ((endp block) nil)
          (t (union-equal (jstatem-methods (car block))
                          (jblock-methods (cdr block)))))))

Theorem: return-type-of-jstatem-methods.methods

(defthm return-type-of-jstatem-methods.methods
  (b* ((?methods (jstatem-methods statem)))
    (string-listp methods))
  :rule-classes :rewrite)

Theorem: return-type-of-jblock-methods.methods

(defthm return-type-of-jblock-methods.methods
  (b* ((?methods (jblock-methods block)))
    (string-listp methods))
  :rule-classes :rewrite)

Subtopics

Jstatem-methods
Jblock-methods