Included Books
other
(in-package "ACL2")
include-book
(include-book "std/util/define" :dir :system)
include-book
(include-book "xdoc/constructors" :dir :system)
other
(define number-of-results ((fn symbolp) (wrld plist-worldp)) :guard (not (member-eq fn *stobjs-out-invalid*)) :returns (n natp "Actually always a @(tsee posp).") :parents (std/system/function-queries) :short "Number of values returned by a named function." :long (topstring (p "This is 1, unless the function uses @(tsee mv) (directly, or indirectly by calling another function that does) to return multiple values.") (p "The number of results of the function is the length of its @(tsee stobjs-out) list.") (p "The function must not be in @('*stobjs-out-invalid*'), because in that case the number of its results depends on how it is called.") (p "See @(tsee number-of-results+) for an enhanced variant of this utility.")) (len (stobjs-out fn wrld)))