• 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
                • Input-files
                • Identifiers
                • Types
                • Struct-init
                • Branch
                • Statements
                • Format-strings
                • Input-syntax-abstraction
                • Expressions
                • Output-files
                • Addresses
                • Literals
                  • Literal
                    • Literal-fix
                    • Literal-case
                    • Literalp
                    • Literal-equiv
                    • Literal-unsigned
                    • Literal-signed
                      • Make-literal-signed
                        • Literal-signed->size
                        • Literal-signed->val
                        • Change-literal-signed
                      • Literal-string
                      • Literal-group
                      • Literal-bool
                      • Literal-address
                      • Literal-scalar
                      • Literal-field
                      • Literal-kind
                    • Coordinate
                    • Group-literal
                    • Literal-result
                    • Group-literal-result
                    • Coordinate-result
                    • Literal-evaluation
                  • 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
    • Literal-signed

    Make-literal-signed

    Basic constructor macro for literal-signed structures.

    Syntax
    (make-literal-signed [:val <val>] 
                         [:size <size>]) 
    

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

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

    Definition

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

    Macro: make-literal-signed

    (defmacro make-literal-signed (&rest args)
      (std::make-aggregate 'literal-signed
                           args '((:val) (:size))
                           'make-literal-signed
                           nil))

    Function: literal-signed

    (defun literal-signed (val size)
      (declare (xargs :guard (and (natp val) (bitsizep size))))
      (declare (xargs :guard t))
      (let ((__function__ 'literal-signed))
        (declare (ignorable __function__))
        (b* ((val (mbe :logic (nfix val) :exec val))
             (size (mbe :logic (bitsize-fix size)
                        :exec size)))
          (cons :signed (list val size)))))