• 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
        • 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-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-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
          • 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-code-generation

    Atj-gen-output-subdir

    Generate the output subdirectory where the Java files go, if needed.

    Signature
    (atj-gen-output-subdir output-subdir java-package$ ctx state) 
      → 
    (mv erp _ state)
    Arguments
    output-subdir — Guard (stringp output-subdir).
    java-package$ — Guard (maybe-stringp java-package$).
    ctx — Guard (ctxp ctx).
    Returns
    _ — Type (null _).

    If the subdirectory is the same as :output-dir, which happens when there is no named Java package, no subdirectories need to be generated.

    Definitions and Theorems

    Function: atj-gen-output-subdir

    (defun atj-gen-output-subdir (output-subdir java-package$ ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (stringp output-subdir)
                                 (maybe-stringp java-package$)
                                 (ctxp ctx))))
     (let ((__function__ 'atj-gen-output-subdir))
      (declare (ignorable __function__))
      (b*
       (((when (not java-package$)) (value nil))
        ((mv successp state)
         (oslib::mkdir output-subdir))
        ((unless successp)
         (er-soft+ ctx t nil
                   "The creation of the output subdirectory ~x0 failed."
                   output-subdir)))
       (value nil))))

    Theorem: null-of-atj-gen-output-subdir._

    (defthm null-of-atj-gen-output-subdir._
      (b*
       (((mv ?erp ?_ acl2::?state)
         (atj-gen-output-subdir output-subdir java-package$ ctx state)))
       (null _))
      :rule-classes :rewrite)