• 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
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Riscv
      • 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
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
                • Expression
                • Syntax-abstraction
                • Statement
                • Files
                  • Funparam-list->name-list
                  • Fundecl
                    • Fundecl-fix
                    • Make-fundecl
                      • Fundeclp
                      • Fundecl-equiv
                      • Change-fundecl
                      • Fundecl->finalizer
                      • Fundecl->annotations
                      • Fundecl->inputs
                      • Fundecl->sort
                      • Fundecl->output
                      • Fundecl->name
                      • Fundecl->body
                    • Var/const-sort
                    • Structdecl
                    • File
                    • Finalizer-option
                    • Topdecl
                    • Mappingdecl
                    • Fundecl-option
                    • Finalizer
                    • Funparam
                    • Fun-sort
                    • Programdecl
                    • Compdecl
                    • Var/const-sort-result
                    • Topdecl-list-result
                    • Programdecl-list-result
                    • Importdecl-list-result
                    • Funparam-list-result
                    • Finalizer-option-result
                    • Compdecl-list-result
                    • Topdecl-result
                    • Structdecl-result
                    • Programdecl-result
                    • Mappingdecl-result
                    • Importdecl-result
                    • Importdecl
                    • Funparam-result
                    • Fundecl-result
                    • Fun-sort-result
                    • Finalizer-result
                    • Compdecl-result
                    • File-result
                    • Funparam-list
                    • Programdecl-list
                    • Importdecl-list
                    • Compdecl-list
                    • Var/const-sort-list
                    • Topdecl-list
                    • Fundecl-list
                  • Input-files
                  • Identifiers
                  • Types
                  • Struct-init
                  • Branch
                  • Statements
                  • Format-strings
                  • Input-syntax-abstraction
                  • Expressions
                  • Output-files
                  • Addresses
                  • Literals
                  • Characters
                  • Expression-list
                  • Statement-list
                  • Output-syntax-abstraction
                  • Struct-init-list
                  • Branch-list
                  • Annotations
                  • Abstract-syntax-trees
                  • Symbols
                  • Keywords
                  • Programs
                  • Packages
                  • Bit-sizes
                • Dynamic-semantics
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Fundecl

    Make-fundecl

    Basic constructor macro for fundecl structures.

    Syntax
    (make-fundecl [:annotations <annotations>] 
                  [:sort <sort>] 
                  [:name <name>] 
                  [:inputs <inputs>] 
                  [:output <output>] 
                  [:body <body>] 
                  [:finalizer <finalizer>]) 
    

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

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

    Definition

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

    Macro: make-fundecl

    (defmacro make-fundecl (&rest args)
      (std::make-aggregate 'fundecl
                           args
                           '((:annotations)
                             (:sort)
                             (:name)
                             (:inputs)
                             (:output)
                             (:body)
                             (:finalizer))
                           'make-fundecl
                           nil))

    Function: fundecl

    (defun fundecl (annotations sort name inputs output body finalizer)
      (declare (xargs :guard (and (annotation-listp annotations)
                                  (fun-sortp sort)
                                  (identifierp name)
                                  (funparam-listp inputs)
                                  (typep output)
                                  (statement-listp body)
                                  (finalizer-optionp finalizer))))
      (declare (xargs :guard t))
      (let ((__function__ 'fundecl))
        (declare (ignorable __function__))
        (b* ((annotations (mbe :logic (annotation-list-fix annotations)
                               :exec annotations))
             (sort (mbe :logic (fun-sort-fix sort)
                        :exec sort))
             (name (mbe :logic (identifier-fix name)
                        :exec name))
             (inputs (mbe :logic (funparam-list-fix inputs)
                          :exec inputs))
             (output (mbe :logic (type-fix output)
                          :exec output))
             (body (mbe :logic (statement-list-fix body)
                        :exec body))
             (finalizer (mbe :logic (finalizer-option-fix finalizer)
                             :exec finalizer)))
          (cons :fundecl (list (cons 'annotations annotations)
                               (cons 'sort sort)
                               (cons 'name name)
                               (cons 'inputs inputs)
                               (cons 'output output)
                               (cons 'body body)
                               (cons 'finalizer finalizer))))))