• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
          • Ps
          • Verilog-printing
          • Basic-printing
          • Printing-locally
          • Formatted-printing
            • Vl-basic-fmt
            • Vl-basic-cw-obj
            • Vl-basic-cw
          • Accessing-printed-output
          • Json-printing
          • Vl-printedlist
        • Kit
        • Mlib
        • Transforms
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Testing-utilities
    • Math
  • Printer

Formatted-printing

Higher-level routines for printing objects with a fmt- or cw-like feel.

We implement limited versions of fmt and cw. The following ACL2-style directives are supported and behave similarly as those described in ":doc fmt."

  • ~~, prints a tilde
  • ~%, prints a newline
  • ~|, prints a newline if we are not already on column 0
  • ~[space], prints a space
  • ~[newline], skips subsequent whitespace
  • ~xi, pretty-print an object.
  • ~si, prints a string verbatim, or acts like ~xi when given any non-string object.
  • ~&i, print a list, separated by commas, with the word "and" preceeding the final element.

Note: although other ACL2-style directives are not yet supported, we may eventually extend the printer to allow them.

Subtopics

Vl-basic-fmt
Basic fmt-like printing function for ps.
Vl-basic-cw-obj
Like vl-basic-cw, but reads its format string from an object.
Vl-basic-cw
Basic cw-like printing function for ps.