• 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
            • Expression
            • Name
              • Name-case
              • Name-fix
              • Namep
              • Name-equiv
              • Name-indexed
                • Make-name-indexed
                  • Name-indexed->string
                  • Name-indexed->index
                  • Change-name-indexed
                • Name-simple
                • Name-kind
              • Definition
              • Constraint
              • Definition-option
              • System
              • System-result
              • Name-list-result
              • Expression-result
              • Expression-list-result
              • Definition-result
              • Definition-list-result
              • Constraint-result
              • Constraint-list-result
              • Name-result
              • Expression-list
              • Definition-list
              • Constraint-list
              • Name-set
              • Name-list
            • Abstract-syntax-operations
            • Convenience-constructors
          • 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
    • Name-indexed

    Make-name-indexed

    Basic constructor macro for name-indexed structures.

    Syntax
    (make-name-indexed [:string <string>] 
                       [:index <index>]) 
    

    This is the usual way to construct name-indexed structures. It simply conses together a structure with the specified fields.

    This macro generates a new name-indexed structure from scratch. See also change-name-indexed, which can "change" an existing structure, instead.

    Definition

    This is an ordinary make- macro introduced by fty::defprod.

    Macro: make-name-indexed

    (defmacro make-name-indexed (&rest args)
      (std::make-aggregate 'name-indexed
                           args '((:string) (:index))
                           'make-name-indexed
                           nil))

    Function: name-indexed

    (defun name-indexed (string index)
      (declare (xargs :guard (and (stringp string) (natp index))))
      (declare (xargs :guard t))
      (let ((__function__ 'name-indexed))
        (declare (ignorable __function__))
        (b* ((string (mbe :logic (str-fix string)
                          :exec string))
             (index (mbe :logic (nfix index) :exec index)))
          (cons :indexed (list string index)))))