[r6rs-discuss] [Formal] blame assignment for contract
cce at ccs.neu.edu
Tue Oct 31 12:02:00 EST 2006
On 10/31/06, Michael Sperber <sperber at informatik.uni-tuebingen.de> wrote:
> Robby Findler <robby at cs.uchicago.edu> writes:
> > My only point is that "the caller" is not identified. Recording enough
> > information to be able to identify the caller (say, the name of the
> > library where the call was made), seems to require somehow specializing
> > each primitive to the library where it occurs, and I'm not sure how to
> > implement that efficiently.
> > Does that make sense?
> Not at all. As I understand it, PLT contracts are attached to the
> called procedure. When the contract is broken, the caller is blamed.
> (Leaving aside for a moment the various subtleties.) However, the
> caller is not identified explicitly. How is this different from what
> the draft says?
In PLT, contracts require explicit identification of both parties. In
general, contracts are attached to values exported across module
boundaries (though other boundaries are possible). The two sides of
the boundary must be named; in the conventional case, this is the
names of both modules. So if a procedure contract is violated, the
"caller" is the module that imported the function and the "callee" is
the module that exported the function.
More information about the r6rs-discuss