• 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
        • Syntax-for-tools
        • Atc
        • Language
        • Representation
        • Transformation-tools
          • Simpadd0
          • Splitgso
          • Constant-propagation
          • Split-fn
          • Specialize
          • Split-all-gso
          • Copy-fn
          • Rename
          • Utilities
            • Free-vars
            • Call-graphs
            • Fresh-ident-utility
              • Fresh-numbered-string-wrt
              • Fresh-numbered-string-wrt0
              • Transunit-ensemble-fresh-ident
              • Fresh-idents
                • Fresh-string-wrt
                • Fresh-ident
                • Make-numbered-string
                • Map-ident->unwrap
              • Collect-idents
          • Insertion-sort
          • Pack
        • Farray
        • Rp-rewriter
        • Riscv
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • 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
      • Community
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Fresh-ident-utility

    Fresh-idents

    Signature
    (fresh-idents idents 
                  blacklist &key (number-prefix '"_") 
                  (number-suffix '"")) 
     
      → 
    idents$
    Arguments
    idents — Guard (ident-listp idents).
    blacklist — Guard (ident-setp blacklist).
    number-prefix — Guard (stringp number-prefix).
    number-suffix — Guard (stringp number-suffix).
    Returns
    idents$ — Type (ident-listp idents$).

    Definitions and Theorems

    Function: fresh-idents-fn

    (defun fresh-idents-fn
           (idents blacklist number-prefix number-suffix)
      (declare (xargs :guard (and (ident-listp idents)
                                  (ident-setp blacklist)
                                  (stringp number-prefix)
                                  (stringp number-suffix))))
      (let ((__function__ 'fresh-idents))
        (declare (ignorable __function__))
        (b* (((when (endp idents)) nil)
             (ident$ (fresh-ident (first idents)
                                  blacklist
                                  :number-prefix number-prefix
                                  :number-suffix number-suffix)))
          (cons ident$
                (fresh-idents (rest idents)
                              (insert ident$ blacklist)
                              :number-prefix number-prefix
                              :number-suffix number-suffix)))))

    Theorem: ident-listp-of-fresh-idents

    (defthm ident-listp-of-fresh-idents
     (b* ((idents$
               (fresh-idents-fn idents
                                blacklist number-prefix number-suffix)))
       (ident-listp idents$))
     :rule-classes :rewrite)