• 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
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • 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-gen-test-method
                • Atj-shallow-code-generation
                • Atj-common-code-generation
                • Atj-shallow-quoted-constant-generation
                • Atj-pre-translation
                • Atj-gen-everything
                • Atj-name-translation
                • Atj-gen-test-cunit
                • Atj-gen-test-class
                • Atj-gen-main-file
                • Atj-post-translation
                • Atj-deep-code-generation
                  • Atj-gen-deep-term-fns
                  • Atj-gen-deep-test-code
                  • Atj-gen-deep-fndef-method
                  • Atj-gen-deep-fnapp
                  • Atj-gen-deep-env-class
                  • Atj-gen-deep-env-cunit
                  • Atj-gen-deep-lambda
                  • Atj-gen-deep-qconst
                    • Atj-gen-deep-main-class
                    • Atj-gen-deep-term
                    • Atj-gen-deep-terms
                    • Atj-gen-deep-build-method
                    • Atj-gen-deep-call-method
                    • Atj-gen-deep-main-cunit
                    • Atj-gen-deep-fndef-method-name
                    • Atj-gen-deep-fndef-methods
                    • Atj-gen-deep-fndefs
                    • Atj-gen-deep-formals
                    • Atj-gen-deep-var
                  • Atj-gen-test-methods
                  • Atj-gen-test-file
                  • Atj-gen-env-file
                  • Atj-gen-output-subdir
                • Atj-java-primitives
                • Atj-java-primitive-arrays
                • Atj-type-macros
                • Atj-java-syntax-operations
                • Atj-fn
                • Atj-library-extensions
                • Atj-java-input-types
                • Atj-test-structures
                • Aij-notions
                • Atj-macro-definition
              • Atj-tutorial
            • Aij
            • Language
          • 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
    • Atj-deep-code-generation

    Atj-gen-deep-qconst

    Generate Java code to build a deeply embedded ACL2 quoted constant.

    Signature
    (atj-gen-deep-qconst qconst jvar-value-base jvar-value-index) 
      → 
    (mv block expr new-jvar-value-index)
    Arguments
    qconst — (Unquoted) value of the ACL2 quoted constant.
    jvar-value-base — Guard (stringp jvar-value-base).
    jvar-value-index — Guard (posp jvar-value-index).
    Returns
    block — Type (jblockp block).
    expr — Type (jexprp expr).
    new-jvar-value-index — Type (posp new-jvar-value-index), given (posp jvar-value-index).

    Definitions and Theorems

    Function: atj-gen-deep-qconst

    (defun atj-gen-deep-qconst (qconst jvar-value-base jvar-value-index)
      (declare (xargs :guard (and (stringp jvar-value-base)
                                  (posp jvar-value-index))))
      (let ((__function__ 'atj-gen-deep-qconst))
        (declare (ignorable __function__))
        (b* (((mv value-block value-expr jvar-value-index)
              (atj-gen-value qconst
                             jvar-value-base jvar-value-index t nil))
             (block value-block)
             (expr (jexpr-smethod *aij-type-qconst*
                                  "make" (list value-expr))))
          (mv block expr jvar-value-index))))

    Theorem: jblockp-of-atj-gen-deep-qconst.block

    (defthm jblockp-of-atj-gen-deep-qconst.block
      (b* (((mv common-lisp::?block
                ?expr ?new-jvar-value-index)
            (atj-gen-deep-qconst qconst
                                 jvar-value-base jvar-value-index)))
        (jblockp block))
      :rule-classes :rewrite)

    Theorem: jexprp-of-atj-gen-deep-qconst.expr

    (defthm jexprp-of-atj-gen-deep-qconst.expr
      (b* (((mv common-lisp::?block
                ?expr ?new-jvar-value-index)
            (atj-gen-deep-qconst qconst
                                 jvar-value-base jvar-value-index)))
        (jexprp expr))
      :rule-classes :rewrite)

    Theorem: posp-of-atj-gen-deep-qconst.new-jvar-value-index

    (defthm posp-of-atj-gen-deep-qconst.new-jvar-value-index
     (implies
          (posp jvar-value-index)
          (b* (((mv common-lisp::?block
                    ?expr ?new-jvar-value-index)
                (atj-gen-deep-qconst qconst
                                     jvar-value-base jvar-value-index)))
            (posp new-jvar-value-index)))
     :rule-classes :rewrite)