Consensys / corset

4 stars 12 forks source link

Unexpected Implementation of `stamp-constancy` ? #66

Closed DavePearce closed 4 months ago

DavePearce commented 4 months ago

The current implementation of stamp-constancy is this:

(defpurefun (stamp-constancy STAMP C)
            (if (will-remain-constant! STAMP)
                (will-remain-constant! C)))

I am confused about this implementation as I was expecting loobean semantics (i.e. if! not if). It seem this change occurred in this commit. I don't understand what is going on here, but I can see that plateau-constraint is being changed in a similar fashion.

Overall, it looks like if! is being dropped altogether? Then I guess that means if always takes on loobean semantics for its conditional?

DavePearce commented 4 months ago

Ok, this is not an issue. Rather if! has been dropped and, instead, type inference is being used to distinguish loob from bool cases.