An enhanced variant of defconst that lets you use state and other ACL2::stobjs, and directly supports calling mv-returning functions to define multiple constants.
Examples:
(include-book "std/util/defconsts" :dir :system) (defconsts *foo* 1) (defconsts (*foo*) 1) (defconsts (*foo* *bar*) (mv 1 2)) (defconsts (*foo* *bar* &) (mv 1 2 3)) (defconsts (& *shell* state) (getenv$ "SHELL" state)) (defconsts (*hundred* state) (mv-let (col state) (fmt "Hello, world!" nil *standard-co* state nil) (declare (ignore col)) (mv 100 state)))
General form:
(defconsts names body)
where
Each symbol in
We introduce a defconst form that binds each starred name to the
corresponding value returned by
This has some performance implications: