• 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
        • Bv
        • Imp-language
        • Event-macros
        • 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
          • 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-input-processing

    Atj-process-tests

    Process the :tests input.

    Signature
    (atj-process-tests tests targets$ deep$ guards$ ctx state) 
      → 
    (mv erp tests$ state)
    Arguments
    targets$ — Guard (symbol-listp targets$).
    deep$ — Guard (booleanp deep$).
    guards$ — Guard (booleanp guards$).
    ctx — Guard (ctxp ctx).
    Returns
    tests$ — An atj-test-listp.

    After evaluating :tests and ensuring that the result is a list of doublets, we convert it into an alist and we ensure that the keys are unique. Then we process each pair in the alist, via an auxiliary function.

    Definitions and Theorems

    Function: atj-process-tests-aux

    (defun atj-process-tests-aux
           (tests-alist targets$ deep$ guards$ ctx state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (and (alistp tests-alist)
                                  (symbol-listp targets$)
                                  (booleanp deep$)
                                  (booleanp guards$)
                                  (ctxp ctx))))
      (let ((__function__ 'atj-process-tests-aux))
        (declare (ignorable __function__))
        (b* (((when (endp tests-alist)) (value nil))
             ((cons (cons name call) tests-alist)
              tests-alist)
             ((er test$)
              (atj-process-test name
                                call targets$ deep$ guards$ ctx state))
             ((er tests$)
              (atj-process-tests-aux tests-alist
                                     targets$ deep$ guards$ ctx state)))
          (value (cons test$ tests$)))))

    Function: atj-process-tests

    (defun atj-process-tests (tests targets$ deep$ guards$ ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (symbol-listp targets$)
                                 (booleanp deep$)
                                 (booleanp guards$)
                                 (ctxp ctx))))
     (let ((__function__ 'atj-process-tests))
      (declare (ignorable __function__))
      (b*
       (((er (cons & tests))
         (trans-eval tests ctx state nil))
        (description "The :TESTS input")
        ((er &)
         (ensure-doublet-list$ tests description t nil))
        (alist (doublets-to-alist tests))
        (names (strip-cars alist))
        (description
           (msg "The list ~x0 of names of the tests in the :TESTS input"
                names))
        ((er &)
         (ensure-list-has-no-duplicates$ names description t nil)))
       (atj-process-tests-aux alist
                              targets$ deep$ guards$ ctx state))))