• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
          • Deftreeops-implementation
            • Deftreeops-event-generation
            • Deftreeops-info
            • Deftreeops-process-inputs-and-gen-everything
            • Deftreeops-fn
            • Deftreeops-table
              • Deftreeops-table-value
              • Deftreeops-table-value-option
                • Deftreeops-table-value-option-fix
                • Deftreeops-table-value-option-equiv
                • Deftreeops-table-value-option-case
                  • Deftreeops-table-value-option-some
                  • Deftreeops-table-value-option-none
                  • Deftreeops-table-value-optionp
                • Deftreeops-table-lookup
                • Deftreeops-table-add
                • Deftreeops-table-definition
              • Deftreeops-input-processing
              • Deftreeops-macro-definition
            • Deftreeops-show-event
            • Deftreeops-show-info
          • Defdefparse
          • Defgrammar
          • Tree-utilities
          • Notation
          • Grammar-parser
          • Meta-circular-validation
          • Parsing-primitives-defresult
          • Parsing-primitives-seq
          • Operations
          • Examples
          • Differences-with-paper
          • Constructor-utilities
          • Grammar-printer
          • Parsing-tools
        • Vwsim
        • Isar
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • C
        • Proof-checker-array
        • Soft
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Ethereum
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Deftreeops-table-value-option

    Deftreeops-table-value-option-case

    Case macro for the different kinds of deftreeops-table-value-option structures.

    This is an ACL2::fty sum-type case macro, typically introduced by fty::defflexsum or fty::deftagsum. It allows you to safely check the type of a deftreeops-table-value-option structure, or to split into cases based on its type.

    Short Form

    In its short form, deftreeops-table-value-option-case allows you to safely check the type of a deftreeops-table-value-option structure. For example:

    (deftreeops-table-value-option-case x :none)

    can be used to determine whether x is a none instead of some other kind of deftreeops-table-value-option structure.

    Long Form

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

    (deftreeops-table-value-option-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 fty::defprod-style foo.bar style accessors for x without having to explicitly add a none b* binder.