• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
          • Address
          • Wire
          • Module
          • Lhs
            • Lhs.lisp
            • Lhs-p
            • Lhs-fix
            • Lhrange
              • Lhrange-fix
              • Lhrange-equiv
              • Lhrange-p
              • Make-lhrange
                • Lhrange-eval
                • Lhrange->atom
                • Lhrange->w
                • Change-lhrange
                • Lhrange->svex
              • Lhs-eval-zx
              • Lhs-equiv
              • Lhs-eval
              • Lhs->svex
            • Path
            • Svar-add-namespace
            • Design
            • Modinst
            • Lhs-add-namespace
            • Modalist
            • Path-add-namespace
            • Modname->submodnames
            • Name
            • Constraintlist-addr-p
            • Svex-alist-addr-p
            • Svar-map-addr-p
            • Lhspairs-addr-p
            • Modname
            • Assigns-addr-p
            • Lhs-addr-p
            • Lhatom-addr-p
            • Modhier-list-measure
            • Attributes
            • Modhier-measure
            • Modhier-list-measure-aux
            • Modhier-loopfreelist-p
            • Modhier-loopfree-p
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Lhrange

    Make-lhrange

    Basic constructor macro for lhrange structures.

    Syntax
    (make-lhrange [:w <w>] 
                  [:atom <atom>]) 
    

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

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

    Definition

    This is an ordinary make- macro introduced by defprod.

    Macro: make-lhrange

    (defmacro make-lhrange (&rest args)
      (std::make-aggregate 'lhrange
                           args '((:w) (:atom))
                           'make-lhrange
                           nil))

    Function: lhrange

    (defun lhrange (w atom)
      (declare (xargs :guard (and (posp w) (lhatom-p atom))))
      (declare (xargs :guard t))
      (let ((__function__ 'lhrange))
        (declare (ignorable __function__))
        (b* ((w (mbe :logic (pos-fix w) :exec w))
             (atom (mbe :logic (lhatom-fix atom)
                        :exec atom)))
          (if (eql w 1) atom (cons w atom)))))