• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Aleobft
        • Aleobft-static
        • Aleobft-stake2
        • Aleobft-dynamic
        • Aleobft-stake
          • Correctness
          • Definition
            • Initialization
            • Transitions
            • States
              • Committees
              • System-states
              • Certificates
                • Certificate-set-unequivocalp
                • Certificate-sets-unequivocalp
                • Cert-with-author+round
                • Certificate
                  • Certificatep
                  • Certificate-fix
                  • Make-certificate
                    • Certificate-equiv
                    • Certificate->transactions
                    • Change-certificate
                    • Certificate->round
                    • Certificate->previous
                    • Certificate->endorsers
                    • Certificate->author
                  • Certs-with-authors+round
                  • Certs-with-author
                  • Certs-with-round
                  • Unequivocal-certs-with-authors+round
                  • Unequivocal-cert-with-author+round
                  • Certificate-option
                  • Certs-with-authors
                  • Certificates-ordered-even-p
                  • Certs-with-signer
                  • Cert-set->author-set
                  • Cert-set->round-set
                  • Certificate->signers
                  • Certificate-set
                  • Certificate-list
                • Messages
                • Validator-states
                • Transactions
                • Blocks
                • Addresses
              • Events
          • Aleobft-proposals
          • Library-extensions
        • Acre
        • Milawa
        • Smtlink
        • Abnf
        • Vwsim
        • Isar
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
        • Solidity
        • Leo
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Certificate

    Make-certificate

    Basic constructor macro for certificate structures.

    Syntax
    (make-certificate [:author <author>] 
                      [:round <round>] 
                      [:transactions <transactions>] 
                      [:previous <previous>] 
                      [:endorsers <endorsers>]) 
    

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

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

    Definition

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

    Macro: make-certificate

    (defmacro make-certificate (&rest args)
      (std::make-aggregate 'certificate
                           args
                           '((:author)
                             (:round)
                             (:transactions)
                             (:previous)
                             (:endorsers))
                           'make-certificate
                           nil))

    Function: certificate

    (defun certificate (author round transactions previous endorsers)
     (declare (xargs :guard (and (addressp author)
                                 (posp round)
                                 (transaction-listp transactions)
                                 (address-setp previous)
                                 (address-setp endorsers))))
     (declare (xargs :guard t))
     (let ((__function__ 'certificate))
      (declare (ignorable __function__))
      (b* ((author (mbe :logic (address-fix author)
                        :exec author))
           (round (mbe :logic (pos-fix round)
                       :exec round))
           (transactions (mbe :logic (transaction-list-fix transactions)
                              :exec transactions))
           (previous (mbe :logic (address-set-fix previous)
                          :exec previous))
           (endorsers (mbe :logic (address-set-fix endorsers)
                           :exec endorsers)))
        (list (cons 'author author)
              (cons 'round round)
              (cons 'transactions transactions)
              (cons 'previous previous)
              (cons 'endorsers endorsers)))))