• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Soft
        • C
          • Syntax-for-tools
            • Disambiguator
            • Abstract-syntax
              • Expr
              • Exprs/decls/stmts
                • Expr
                • Type-spec
                • Stmt
                • Amb-expr/tyname
                • Dirdeclor
                • Asm-stmt
                • Attrib
                • Amb-decl/stmt
                • Dirabsdeclor
                • Decl-spec
                • Structdecl
                • Amb-declor/absdeclor
                • Param-declor
                • Declor
                • Absdeclor
                • Strunispec
                • Align-spec
                • Label
                • Expr-option
                • Spec/qual
                • Desiniter
                • Tyname
                • Dirabsdeclor-option
                • Initdeclor
                • Const-expr-option
                • Attrib-spec
                • Structdeclor
                • Decl
                • Absdeclor-option
                • Statassert
                • Param-declon
                • Member-designor
                • Initer-option
                • Initer
                • Enumspec
                  • Enumspecp
                  • Enumspec-equiv
                  • Make-enumspec
                    • Enumspec->final-comma
                    • Change-enumspec
                    • Enumspec->name
                    • Enumspec->list
                    • Enumspec-fix
                    • Enumspec-count
                  • Declor-option
                  • Const-expr
                  • Block-item
                  • Genassoc
                  • Asm-output
                  • Asm-input
                  • Enumer
                  • Designor
                  • Typequal/attribspec
                  • Typequal/attribspec-list
                  • Decl-spec-list
                  • Spec/qual-list
                  • Desiniter-list
                  • Param-declon-list
                  • Decl-list
                  • Block-item-list
                  • Typequal/attribspec-list-list
                  • Structdeclor-list
                  • Structdecl-list
                  • Initdeclor-list
                  • Genassoc-list
                  • Expr-list
                  • Enumer-list
                  • Attrib-spec-list
                  • Asm-output-list
                  • Asm-input-list
                  • Designor-list
                  • Attrib-list
                • Type-spec
                • Binop
                • Stmt
                • Amb-expr/tyname
                • Dirdeclor
                • Unop
                • Asm-stmt
                • Dec/oct/hex-const
                • Simple-escape
                • Attrib
                • Ident
                • Amb-decl/stmt
                • Dirabsdeclor
                • Decl-spec
                • Structdecl
                • Fundef
                • Transunit-ensemble
                • Asm-name-spec
                • Amb-declor/absdeclor
                • Param-declor
                • Declor
                • Type-qual
                • Absdeclor
                • Strunispec
                • Stor-spec
                • Keyword-uscores
                • Align-spec
                • Label
                • Expr-option
                • Spec/qual
                • Lsuffix
                • Hex-frac-const
                • Desiniter
                • Tyname
                • Iconst
                • Dirabsdeclor-option
                • Dec-frac-const
                • Dec-core-fconst
                • Extdecl
                • Amb?-declor/absdeclor
                • Isuffix
                • Initdeclor
                • Hex-core-fconst
                • Const-expr-option
                • Attrib-spec
                • Structdeclor
                • Escape
                • Decl
                • Amb?-expr/tyname
                • Ident-option
                • Bin-expo
                • Absdeclor-option
                • Statassert
                • Param-declon
                • Member-designor
                • Initer-option
                • Initer
                • Fsuffix
                • Enumspec
                  • Enumspecp
                  • Enumspec-equiv
                  • Make-enumspec
                    • Enumspec->final-comma
                    • Change-enumspec
                    • Enumspec->name
                    • Enumspec->list
                    • Enumspec-fix
                    • Enumspec-count
                  • Declor-option
                  • Const
                  • Hex-quad
                  • Eprefix
                  • Const-expr
                  • Block-item
                  • Oct-escape
                  • Inc/dec-op
                  • Fun-spec
                  • Dec-expo
                  • Cprefix-option
                  • Asm-name-spec-option
                  • Amb?-decl/stmt
                  • S-char
                  • Isuffix-option
                  • Genassoc
                  • Fundef-option
                  • Fsuffix-option
                  • Fconst
                  • Eprefix-option
                  • Dec-expo-option
                  • Cprefix
                  • C-char
                  • Type-spec-option
                  • Sign-option
                  • Iconst-option
                  • Asm-output
                  • Asm-input
                  • Const-option
                  • Usuffix
                  • Univ-char-name
                  • Transunit
                  • Hprefix
                  • Enumer
                  • Designor
                  • Attrib-name
                  • Sign
                  • Asm-qual
                  • Typequal/attribspec
                  • Dec-expo-prefix
                  • Bin-expo-prefix
                  • Stringlit
                  • Cconst
                  • Expr/tyname
                  • Decl/stmt
                  • Declor/absdeclor
                  • Asm-clobber
                  • Typequal/attribspec-list
                  • Decl-spec-list
                  • Stringlit-list
                  • Spec/qual-list
                  • Inc/dec-op-list
                  • Desiniter-list
                  • S-char-list
                  • Param-declon-list
                  • Decl-list
                  • C-char-list
                  • Block-item-list
                  • Typequal/attribspec-list-list
                  • Structdeclor-list
                  • Structdecl-list
                  • Initdeclor-list
                  • Genassoc-list
                  • Filepath-transunit-map
                  • Extdecl-list
                  • Expr-list
                  • Enumer-list
                  • Attrib-spec-list
                  • Type-spec-list
                  • Ident-list
                  • Asm-qual-list
                  • Asm-output-list
                  • Asm-input-list
                  • Asm-clobber-list
                  • Stor-spec-list
                  • Ident-set
                  • Ident-option-set
                  • Eprefix-option-list
                  • Designor-list
                  • Attrib-list
                • Parser
                • Validator
                • Printer
                • Formalized-subset
                • Mapping-to-language-definition
                • Input-files
                • Defpred
                • Output-files
                • Abstract-syntax-operations
                • Validation-information
                • Implementation-environments
                • Concrete-syntax
                • Unambiguity
                • Ascii-identifiers
                • 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
      • Enumspec

      Make-enumspec

      Basic constructor macro for enumspec structures.

      Syntax
      (make-enumspec [:name <name>] 
                     [:list <list>] 
                     [:final-comma <final-comma>]) 
      

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

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

      Definition

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

      Macro: make-enumspec

      (defmacro make-enumspec (&rest args)
        (std::make-aggregate 'enumspec
                             args '((:name) (:list) (:final-comma))
                             'make-enumspec
                             nil))

      Function: enumspec

      (defun enumspec (name list final-comma)
        (declare (xargs :guard (and (ident-optionp name)
                                    (enumer-listp list)
                                    (booleanp final-comma))))
        (declare (xargs :guard t))
        (let ((__function__ 'enumspec))
          (declare (ignorable __function__))
          (b* ((name (mbe :logic (ident-option-fix name)
                          :exec name))
               (list (mbe :logic (enumer-list-fix list)
                          :exec list))
               (final-comma (mbe :logic (bool-fix final-comma)
                                 :exec final-comma)))
            (list (cons 'name name)
                  (cons 'list list)
                  (cons 'final-comma final-comma)))))