• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
        • Proof-support
        • Semantics
        • Lifting
        • R1cs-subset
        • Well-formedness
        • Abstract-syntax
          • Syntax-abstraction
          • Abstract-syntax-trees
          • Abstract-syntax-operations
          • Convenience-constructors
            • Constraint/constraintlist-p
            • Pfdef
            • Constraint/constraintlist-listp
            • Pfname
              • Yyyjoin
              • Pf+
              • Pf*
              • Pfnames
              • Pfmon
              • Pf=
              • Pfconst
              • Pfcall
              • Pfvar
          • Concrete-syntax
          • R1cs-bridge
          • Parser-interface
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Riscv
        • 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
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Convenience-constructors

    Pfname

    Construct a name.

    This macro accepts one or two arguments. If one argument is passed, it must be a string, and the macro returns a simple name containing that string. If two arguments are passed, they must be a string and a natural number, and the macro returns an indexed name containing the string and natural number.

    Macro: pfname

    (defmacro pfname (&rest args)
      (declare (xargs :guard (and (consp args)
                                  (or (endp (cdr args))
                                      (and (consp (cdr args))
                                           (endp (cddr args)))))))
      (if (consp (cdr args))
          (cons 'name-indexed
                (cons (car args)
                      (cons (cadr args) 'nil)))
        (cons 'name-simple
              (cons (car args) 'nil))))