• 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
        • Svstmt
        • Sv-tutorial
        • Expressions
          • Rewriting
          • Svex
          • Bit-blasting
          • Functions
          • 4vmask
          • Why-infinite-width
          • Svex-vars
          • Evaluation
          • Values
            • 4vec
              • 4vec-operations
              • 4vec-p
              • S4vecs
              • 4vec-examples
              • Maybe-4vec
                • Maybe-4vec-fix
                • Maybe-4vec-case
                  • Maybe-4vec-equiv
                  • Maybe-4vec-some
                  • Maybe-4vec-p
                  • Maybe-4vec-none
                • 4vec-equiv
                • Make-4vec
                • 4vec->upper
                • 4vec->lower
                • 4veclist
                • 4vec-fix
                • Make-honsed-4vec
                • 4vec-index-p
              • 4vec-<<=
              • 3vec
              • 2vec
              • 2vecx
              • 2vecnatx
              • 4vec-x
              • 4vec-1x
              • 4vec-1z
              • 4vec-z
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Maybe-4vec

    Maybe-4vec-case

    Case macro for the different kinds of maybe-4vec structures.

    This is an fty sum-type case macro, typically introduced by defflexsum or deftagsum. It allows you to safely check the type of a maybe-4vec structure, or to split into cases based on its type.

    Short Form

    In its short form, maybe-4vec-case allows you to safely check the type of a maybe-4vec structure. For example:

    (maybe-4vec-case x :none)

    can be used to determine whether x is a none instead of some other kind of maybe-4vec structure.

    Long Form

    In its longer form, maybe-4vec-case allows you to split into cases based on the kind of structure you are looking at. A typical example would be:

    (maybe-4vec-case x
      :none ...
      :some ...)

    It is also possible to consolidate ``uninteresting'' cases using :otherwise.

    For convenience, the case macro automatically binds the fields of x for you, as appropriate for each case. That is, in the :none case, you can use defprod-style foo.bar style accessors for x without having to explicitly add a none b* binder.