• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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
          • Syntax-for-tools
            • Disambiguator
            • Abstract-syntax
            • Parser
            • Validator
            • Printer
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
              • Input-files-implementation
              • Input-files-prog
                • Input-files-prog-fn
                • Input-files-prog-definition
            • Defpred
            • Output-files
            • Abstract-syntax-operations
            • Validation-information
            • Implementation-environments
            • Concrete-syntax
            • Ascii-identifiers
            • Unambiguity
            • Preprocessing
            • Abstraction-mapping
          • Atc
          • Language
          • Representation
          • Transformation-tools
          • Insertion-sort
          • Pack
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • 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
  • Input-files

Input-files-prog

Programmatic interface to input-files.

This (non-event) macro provides a programmatic interface to the functionality of input-files. It has the form:

(input-files-prog :files             ...  ; required
                  :path              ...  ; default "."
                  :preprocess        ...  ; default nil
                  :preprocess-args   ...  ; no default
                  :process           ...  ; default :validate
                  :gcc               ...  ; default nil
                  :short-bytes       ...  ; default 2
                  :int-bytes         ...  ; default 4
                  :long-bytes        ...  ; default 8
                  :long-long-bytes   ...  ; default 8
                  :plain-char-signed ...  ; default nil
  )

This is the same as input-files, except that there is no :const input, because this macro does not generate any events. Instead, it returns an error-value tuple consisting of the value that input-files would assign to the generated named constant. These are the results of the error-value tuple, in order:

  • tunits: the translation unit ensemble (a value of type transunit-ensemble) resulting from processing, according to the :process input, the files read from the paths specified by :files (if :preprocess is nil) or the files resulting from their preprocessing (if :preprocess is not nil.
  • state: the ACL2 state.

Note that the macro implicitly takes state, so it must be used in a context where state is available.

Subtopics

Input-files-prog-fn
Implementation of input-files-prog.
Input-files-prog-definition
Definition of the input-files-prog macro.