• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
        • Atj
          • Atj-implementation
            • Atj-types
            • Atj-java-primitive-array-model
            • Atj-java-abstract-syntax
            • Atj-input-processing
              • Atj-collect-fns-in-term
              • Atj-worklist-iterate
              • Atj-process-test
              • Atj-process-inputs
                • Atj-process-test-input-jprim-value
                • Atj-process-output-subdir
                • Atj-process-test-input
                • Atj-process-output-dir
                • Atj-process-test-input-jprim-values
                • Atj-fns-to-translate
                • Atj-process-test-inputs
                • Atj-process-tests
                • Atj-process-targets
                • Atj-process-no-aij-types
                • Atj-pkgs-to-translate
                • Atj-process-java-class
                • Atj-process-java-package
                • *atj-default-java-class*
                • *atj-allowed-options*
              • Atj-java-pretty-printer
              • Atj-code-generation
              • 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
        • Taspi
        • Bitcoin
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Atj-input-processing

    Atj-process-inputs

    Process the inputs to atj.

    Signature
    (atj-process-inputs args ctx state) → (mv erp result state)
    Arguments
    args — Guard (true-listp args).
    Returns
    result — A tuple (fns-to-translate call-graph pkgs deep$ guards$ no-aij-types$ java-package$ java-class$ output-subdir output-file$ output-file-env$ output-file-test$ tests$ verbose$) satisfying (typed-tuplep symbol-listp symbol-symbollist-alistp string-listp booleanp booleanp booleanp maybe-stringp stringp stringp stringp maybe-stringp maybe-stringp atj-test-listp booleanp result).

    We also collect, check, and return the functions for which code must be generated. We also collect and return the packages whose representation must be built in Java; for now these are all the current packages, but it might be possible to reduce them to just the ones referenced by the functions.

    Definitions and Theorems

    Function: atj-process-inputs

    (defun atj-process-inputs (args ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (true-listp args)))
     (let ((__function__ 'atj-process-inputs))
      (declare (ignorable __function__))
      (b*
       (((mv erp targets options)
         (partition-rest-and-keyword-args args *atj-allowed-options*))
        ((when erp)
         (er-soft+
          ctx t nil
          "The inputs must be the names of ~
                                  one or more target functions ~
                                  followed by the options ~&0."
          *atj-allowed-options*))
        (deep (cdr (assoc-eq :deep options)))
        (guards (b* ((pair? (assoc-eq :guards options)))
                  (if (consp pair?) (cdr pair?) t)))
        (no-aij-types (cdr (assoc-eq :no-aij-types options)))
        (java-package (cdr (assoc-eq :java-package options)))
        (java-class (cdr (assoc-eq :java-class options)))
        (output-dir (or (cdr (assoc-eq :output-dir options))
                        "."))
        (tests (cdr (assoc-eq :tests options)))
        (ignore-whitelist (cdr (assoc-eq :ignore-whitelist options)))
        (verbose (cdr (assoc-eq :verbose options)))
        ((er &)
         (atj-process-targets targets deep guards ctx state))
        ((er &)
         (ensure-value-is-boolean$ deep "The :DEEP intput" t nil))
        ((er &)
         (ensure-value-is-boolean$ guards "The :GUARDS intput" t nil))
        ((er &)
         (atj-process-no-aij-types no-aij-types deep guards ctx state))
        ((er &)
         (atj-process-java-package java-package ctx state))
        ((er java-class$)
         (atj-process-java-class java-class ctx state))
        ((er tests$)
         (atj-process-tests tests targets deep guards ctx state))
        ((er (list output-subdir output-file$
                   output-file-env$ output-file-test$))
         (atj-process-output-dir output-dir no-aij-types java-package
                                 java-class$ tests$ ctx state))
        ((er &)
         (ensure-value-is-boolean$ ignore-whitelist
                                   "The :IGNORE-WHITELIST input" t nil))
        ((er &)
         (ensure-value-is-boolean$ verbose "The :VERBOSE input" t nil))
        ((er (list fns-to-translate call-graph))
         (atj-fns-to-translate targets deep guards
                               ignore-whitelist verbose ctx state))
        (pkgs (atj-pkgs-to-translate verbose state)))
       (value (list fns-to-translate
                    call-graph pkgs deep guards no-aij-types
                    java-package java-class$ output-subdir
                    output-file$ output-file-env$
                    output-file-test$ tests$ verbose)))))