• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
          • Scopestack
          • Filtering-by-name
          • Vl-namefactory
          • Substitution
          • Allexprs
          • Hid-tools
          • Vl-consteval
          • Range-tools
          • Lvalexprs
          • Hierarchy
          • Finding-by-name
          • Expr-tools
          • Expr-slicing
          • Stripping-functions
          • Stmt-tools
          • Modnamespace
          • Vl-parse-expr-from-str
          • Welltyped
          • Reordering-by-name
          • Flat-warnings
          • Genblob
          • Expr-building
          • Datatype-tools
          • Syscalls
            • Vl-syscall->returninfo
            • Vl-*ary-syscall-p
            • Vl-unary-syscall-p
            • Vl-0ary-syscall-p
            • Vl-sysfun-should-size-args-p
              • Vl-$random-expr-p
              • Vl-sysfunexpr->name
              • Vl-sysfunexpr-p
              • Vl-unary-syscall->arg
            • Relocate
            • Expr-cleaning
            • Namemangle
            • Caremask
            • Port-tools
            • Lvalues
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Syscalls

    Vl-sysfun-should-size-args-p

    Should we size the arguments to this system call?

    Signature
    (vl-sysfun-should-size-args-p name) → bool
    Arguments
    name — E.g., $bits.
        Guard (stringp name).

    This is used among functions like vl-expr-expandsizes and our notion of welltyped expressions to decide whether calls of system functions should have their arguments sized normally.

    Motivation: consider the system function $bits, which can take either a type or an expression as its argument. We don't want to size $bits normally because we don't normally have types in expressions.

    However, for functions like $clog2 or $random, we should go ahead and size the arguments.

    Definitions and Theorems

    Function: vl-sysfun-should-size-args-p

    (defun vl-sysfun-should-size-args-p (name)
      (declare (xargs :guard (stringp name)))
      (let ((__function__ 'vl-sysfun-should-size-args-p))
        (declare (ignorable __function__))
        (let ((name (string-fix name)))
          (not (equal name "$bits")))))

    Theorem: vl-sysfun-should-size-args-p-of-str-fix-name

    (defthm vl-sysfun-should-size-args-p-of-str-fix-name
      (equal (vl-sysfun-should-size-args-p (str-fix name))
             (vl-sysfun-should-size-args-p name)))

    Theorem: vl-sysfun-should-size-args-p-streqv-congruence-on-name

    (defthm vl-sysfun-should-size-args-p-streqv-congruence-on-name
      (implies (streqv name name-equiv)
               (equal (vl-sysfun-should-size-args-p name)
                      (vl-sysfun-should-size-args-p name-equiv)))
      :rule-classes :congruence)