Case macro for the different kinds of outcome 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 outcome structure, or to split into cases based on its type.
In its short form,
(outcome-case x :function-success)
is essentially just a safer alternative to writing:
(equal (outcome-kind x) :function-success)
Why is using outcome-case safer? When we directly inspect the
kind with
In its longer form,
(outcome-case x :function-success ... :type-success ... :specification-success ... :theorem-success ... :transformation-success ... :proof-obligation-failure ... :theorem-failure ... :transformation-failure ... :unexpected-failure ...)
It is also possible to consolidate ``uninteresting'' cases using
For convenience, the case macro automatically binds the fields of