• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
          • Scopestack
          • Hid-tools
          • Filtering-by-name
          • Vl-interface-mocktype
          • Stripping-functions
          • Genblob
          • Expr-tools
            • Vl-expr-typedecide
            • Vl-exprlist-resolved->vals
            • Vl-make-idexpr-list
            • Vl-idexprlist->names
            • Vl-expr-selfsize
            • Vl-expr-update-subexprs
            • Vl-exprlist-to-plainarglist
            • Vl-call-namedargs-update-subexprs
            • Vl-valuerangelist-update-subexprs
            • Vl-streamexprlist-update-subexprs
            • Vl-op-p
            • Vl-maybe-exprlist-update-subexprs
            • Vl-evatomlist-update-subexprs
            • Vl-expr-values
            • Vl-keyvallist-update-subexprs
            • Vl-assignpat-update-subexprs
            • Vl-valuerange-update-subexprs
            • Vl-scopeexpr-update-subexprs
            • Vl-partselect-update-subexprs
            • Vl-hidexpr-update-subexprs
            • Vl-expr-add-atts
            • Vl-arrayrange-update-subexprs
            • Vl-streamexpr-update-subexprs
            • Vl-slicesize-update-subexprs
            • Vl-plusminus-update-subexprs
            • Vl-patternkey-update-subexprs
            • Vl-expr-ops
            • Vl-make-integer
            • Vl-range-update-subexprs
            • Vl-idexpr
            • Vl-make-index
            • Vl-expr->subexprs
            • Vl-bitlist-from-nat
            • Vl-pps-expr
              • Vl-maybe-exprlist->subexprs
              • Vl-hidexpr->subexprs
              • Vl-evatomlist->subexprs
              • Vl-call-namedargs->subexprs
              • Vl-valuerangelist->subexprs
              • Vl-streamexprlist->subexprs
              • Vl-keyvallist->subexprs
              • Vl-exprlist-has-ops
              • Vl-expr-resolved-p
              • Vl-valuerange->subexprs
              • Vl-streamexpr->subexprs
              • Vl-slicesize->subexprs
              • Vl-scopeexpr->subexprs
              • Vl-patternkey->subexprs
              • Vl-partselect->subexprs
              • Vl-assignpat->subexprs
              • Vl-arrayrange->subexprs
              • Vl-pps-origexpr
              • Vl-plusminus->subexprs
              • Vl-idscope
              • Vl-idexpr->name
              • Vl-expr-has-ops
              • Vl-resolved->val
              • Vl-range->subexprs
              • Vl-idexpr-p
              • Vl-idexprlist-p
              • Vl-exprlist-resolved-p
              • Vl-idscope->name
              • Vl-idscope-p
              • Vl-zbitlist-p
              • Vl-zatom-p
              • Vl-op-fix
              • Vl-oplist
              • Vl-expr-varnames
              • Vl-one-bit-constants
            • Extract-vl-types
            • Hierarchy
            • Range-tools
            • Finding-by-name
            • Stmt-tools
            • Modnamespace
            • Flat-warnings
            • Reordering-by-name
            • Datatype-tools
            • Syscalls
            • Allexprs
            • Lvalues
            • Port-tools
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Expr-tools
    • Verilog-printing

    Vl-pps-expr

    Pretty-print an expression into a string.

    Signature
    (vl-pps-expr x) → pretty-x
    Arguments
    x — Guard (vl-expr-p x).
    Returns
    pretty-x — Type (stringp pretty-x).

    This pretty-prints an expression "as is," i.e., in its current, possibly transformed state. Depending on what you're trying to do, it may be better to use vl-pps-origexpr instead, which tries to print the "original," pre-transformed version of the expression, as it occurred in the real Verilog file.

    Definitions and Theorems

    Function: vl-pps-expr

    (defun vl-pps-expr (x)
      (declare (xargs :guard (vl-expr-p x)))
      (let ((__function__ 'vl-pps-expr))
        (declare (ignorable __function__))
        (with-local-ps (vl-pp-expr x))))

    Theorem: stringp-of-vl-pps-expr

    (defthm stringp-of-vl-pps-expr
      (b* ((pretty-x (vl-pps-expr x)))
        (stringp pretty-x))
      :rule-classes :type-prescription)

    Theorem: vl-pps-expr-of-vl-expr-fix-x

    (defthm vl-pps-expr-of-vl-expr-fix-x
      (equal (vl-pps-expr (vl-expr-fix x))
             (vl-pps-expr x)))

    Theorem: vl-pps-expr-vl-expr-equiv-congruence-on-x

    (defthm vl-pps-expr-vl-expr-equiv-congruence-on-x
      (implies (vl-expr-equiv x x-equiv)
               (equal (vl-pps-expr x)
                      (vl-pps-expr x-equiv)))
      :rule-classes :congruence)