• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-fixpoint-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Moddb
        • Svex-compilation
        • Svmods
        • Svstmt
        • Sv-tutorial
        • Expressions
          • Rewriting
          • Svex
            • Svar
            • Least-fixpoint
            • Svex-p
            • Svex-select
            • Svex-alist
            • Svex-equiv
            • Svexlist
            • Svex-call
            • Fnsym
            • Svex-quote
            • Svex-var
            • Svcall-rw
            • Svcall
              • Svex-kind
              • Svcall*
              • Svex-fix
              • Svex-count
              • Svex-1z
              • Svex-1x
              • Svex-z
              • Svex-x
            • Bit-blasting
            • Functions
            • 4vmask
            • Why-infinite-width
            • Svex-vars
            • Evaluation
            • Values
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Svex

    Svcall

    Safely construct an svex for a function call.

    (call svcall) just constructs an svex that applies fn to the given args. This macro is ``safe'' in that, at compile time, it ensures that fn is one of the known functions and that it is being given the right number of arguments.

    Macro: svcall

    (defmacro svcall (fn &rest args)
              (svcall-fn fn args))

    Definitions and Theorems

    Function: svcall-fn

    (defun svcall-fn (fn args)
           (declare (xargs :guard t))
           (b* ((look (assoc fn *svex-op-table*))
                ((unless look)
                 (er hard? 'svcall
                     "Svex function doesn't exist: ~x0" fn))
                (formals (third look))
                ((unless (eql (len formals) (len args)))
                 (er hard? 'svcall
                     "Wrong arity for call of ~x0" fn)))
               (cons 'svex-call
                     (cons (cons 'quote (cons fn 'nil))
                           (cons (cons 'list args) 'nil)))))