• 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
          • Syntax-for-tools
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
              • Input-files-implementation
                • Input-files-process-inputs
                • Input-files-gen-events
                • Input-files-process-preprocess-args
                  • Input-files-process-inputs-and-gen-events
                  • Input-files-complete-preprocess-extra-args
                  • Input-files-process-ienv
                  • Input-files-fn
                  • Input-files-read-files
                  • Input-files-process-const
                  • String-stringlist-map-map-cons-values
                  • Input-files-process-path
                  • Input-files-process-files
                  • Input-files-process-process
                  • Input-files-preprocess-arg-std
                  • Input-files-process-preprocess
                  • Input-files-process-keep-going
                  • Input-files-process-inputp
                  • Input-files-preprocess-inputp
                  • *input-files-allowed-options*
                  • Input-files-definition
                • Input-files-prog
              • Compilation-database
              • Printer
              • Output-files
              • Abstract-syntax-operations
              • Implementation-environments
              • Abstract-syntax
              • Concrete-syntax
              • Disambiguation
              • Validation
              • Gcc-builtins
              • Preprocessing
              • Parsing
            • Atc
            • Transformation-tools
            • Language
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • 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
    • Input-files-implementation

    Input-files-process-preprocess-args

    Process the :preprocess-args input.

    Signature
    (input-files-process-preprocess-args 
         preprocessor preprocess-args state) 
     
      → 
    (mv erp preprocess-extra-args)
    Arguments
    preprocessor — Guard (string-optionp preprocessor).
    Returns
    preprocess-extra-args — Type (or (string-listp preprocess-extra-args) (acl2::string-stringlist-mapp preprocess-extra-args)) .

    The preprocessor input to this function is the result of processing the :preprocess input. If it is nil, the :preprocess-args input is expected to also be nil.

    If processing of the :preprocess-args input is successful, we return its value, which is either a string list or an omap from strings to string lists. This value is passed as part of the :extra-args input of preprocess-files, which justifies the name of the result.

    Definitions and Theorems

    Function: input-files-process-preprocess-args

    (defun input-files-process-preprocess-args
           (preprocessor preprocess-args state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (string-optionp preprocessor)))
     (declare (ignore state))
     (let ((__function__ 'input-files-process-preprocess-args))
      (declare (ignorable __function__))
      (b*
       (((reterr) nil)
        ((when (and (not preprocessor)
                    preprocess-args))
         (reterr
          (msg
           "Since the :PREPROCESS input is NIL, ~
                          the :PREPROCESS-ARGS input must also be NIL, ~
                          but it is ~x0 instead."
           preprocess-args)))
        ((unless (or (string-listp preprocess-args)
                     (acl2::string-stringlist-mapp preprocess-args)))
         (reterr
          (msg
           "The :PREPROCESS-ARGS input must evaluate to ~
                          a list of strings ~
                          or an omap associating strings to lists of strings, ~
                          but it evaluates to ~x0 instead."
           preprocess-args))))
       (retok preprocess-args))))

    Theorem: return-type-of-input-files-process-preprocess-args.preprocess-extra-args

    (defthm
     return-type-of-input-files-process-preprocess-args.preprocess-extra-args
     (b* (((mv acl2::?erp ?preprocess-extra-args)
           (input-files-process-preprocess-args
                preprocessor preprocess-args state)))
       (or (string-listp preprocess-extra-args)
           (acl2::string-stringlist-mapp preprocess-extra-args)))
     :rule-classes :rewrite)

    Theorem: string-listp-of-input-files-process-preprocess-args.preprocess-extra-args

    (defthm
     string-listp-of-input-files-process-preprocess-args.preprocess-extra-args
     (b* (((mv acl2::?erp ?preprocess-extra-args)
           (input-files-process-preprocess-args
                preprocessor preprocess-args state)))
       (implies
            (not (acl2::string-stringlist-mapp preprocess-extra-args))
            (string-listp preprocess-extra-args))))

    Theorem: string-stringlist-mapp-of-input-files-process-preprocess-args.preprocess-extra-args

    (defthm
     string-stringlist-mapp-of-input-files-process-preprocess-args.preprocess-extra-args
     (b* (((mv acl2::?erp ?preprocess-extra-args)
           (input-files-process-preprocess-args
                preprocessor preprocess-args state)))
       (implies (not (string-listp preprocess-extra-args))
                (acl2::string-stringlist-mapp preprocess-extra-args))))