• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
        • Grammar-parser
        • Meta-circular-validation
        • Parsing-primitives-defresult
        • Parsing-primitives-seq
        • Operations
          • In-terminal-set
          • Well-formedness
          • Closure
          • Plugging
          • Ambiguity
          • Renaming
          • Numeric-range-retrieval
            • Num-range
              • Num-range-fix
              • Num-range-equiv
              • Make-num-range
                • Change-num-range
                • Num-range->min
                • Num-range->max
                • Num-range->base
                • Num-range-p
              • Num-val-num-ranges
              • Rulelist-num-ranges
              • Rule-num-ranges
              • Element-num-ranges
              • Num-range-set
              • Alternation-num-ranges
              • Concatenation-num-ranges
              • Repetition-num-ranges
            • Rule-utilities
            • Removal
            • Character-value-retrieval
          • Examples
          • Differences-with-paper
          • Constructor-utilities
          • Grammar-printer
          • Parsing-tools
        • 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
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Num-range

    Make-num-range

    Basic constructor macro for num-range structures.

    Syntax
    (make-num-range [:base <base>] 
                    [:min <min>] 
                    [:max <max>]) 
    

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

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

    Definition

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

    Macro: make-num-range

    (defmacro make-num-range (&rest args)
      (std::make-aggregate 'num-range
                           args '((:base) (:min) (:max))
                           'make-num-range
                           nil))

    Function: num-range

    (defun num-range (base min max)
      (declare (xargs :guard (and (num-base-p base)
                                  (natp min)
                                  (natp max))))
      (declare (xargs :guard t))
      (let ((__function__ 'num-range))
        (declare (ignorable __function__))
        (b* ((base (mbe :logic (num-base-fix base)
                        :exec base))
             (min (mbe :logic (nfix min) :exec min))
             (max (mbe :logic (nfix max) :exec max)))
          (list (cons 'base base)
                (cons 'min min)
                (cons 'max max)))))