On Thu, Mar 31, 2022 at 10:01 AM Toon Knapen <toon.kna...@gmail.com> wrote:

> but that would enable or disable _all_ precondition checks.

Sure, that's the point. Henry used the +build debug mechanism, so the
checks would be disabled in production. If one wants the checks to be
always present there's no need to use a debug build tag nor to wrap
the checks in a condition.

> What I am looking for is soth. smart enough that deduces that the 
> precondition checks in `mul` and `add` can be removed because of the 
> precondition check in `Muladd`.

What you need is a prover that understands the facts holding up the
callers' stack and can statically detect tautologies in the calees
checks. Not trivial, but I believe it would be a ton of fun to write
;-)

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-X7L2UnGTburbZEmWaCX1WEnU8J%3DoH8XjLVCG3f%3DfoFkw%40mail.gmail.com.

Reply via email to