Re: [racket-dev] Machinery for eliding contracts

2014-06-10 Thread Matthias Felleisen

On Jun 9, 2014, at 6:02 PM, Eric Dobson eric.n.dob...@gmail.com wrote:

 
 Eric, are you talking about changing the proxy values that wrap HO/mutable
 contracted values?
 Yes. I want the proxy values to include information about who agreed
 to the contract in addition to the contract agreed to.
 
 I actually realize that I might need more than just the contract
 agreed to because of how TR changes the generated contract to remove
 checks for what it guarantees, so that info is not in the contract.
 But I believe that can be added back as a structure property on the
 contract.


Would some form of hash-consing contracts work here? -- Matthias



smime.p7s
Description: S/MIME cryptographic signature
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Machinery for eliding contracts

2014-06-10 Thread Eric Dobson
On Tue, Jun 10, 2014 at 6:15 AM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 On Jun 9, 2014, at 6:02 PM, Eric Dobson eric.n.dob...@gmail.com wrote:


 Eric, are you talking about changing the proxy values that wrap HO/mutable
 contracted values?
 Yes. I want the proxy values to include information about who agreed
 to the contract in addition to the contract agreed to.

 I actually realize that I might need more than just the contract
 agreed to because of how TR changes the generated contract to remove
 checks for what it guarantees, so that info is not in the contract.
 But I believe that can be added back as a structure property on the
 contract.


 Would some form of hash-consing contracts work here? -- Matthias


I don't think so. But not sure exactly what you are proposing.

The issue is that there are 4 contracts here and 2 of them currently
do not exist at runtime. The 4 are TRs checks/promises on an
export/import. (Using import for a value flowing into an exported
function). The promise contracts do not currently exist as removing
them was my previous optimization (They never fail). What I want to do
is change the check on import from (array/c symbol?) to (if/c
(protected? (array/c symbol?)) any/c (array/c symbol?)). Where
(protected? x/c) checks if TR already promised something stronger
than x/c.

I believe that you are proposing that we can use the identity of the
contract returned by value-contract to determine what the promised
contract would have been. This does not work as (Array Symbol) and
(Array Float) both get translated to (array/c any/c) for export, and
we would want to lookup different promised contracts for them. We
could use weak hash map as an extra field but that seems like it would
be slow.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Machinery for eliding contracts

2014-06-10 Thread Matthias Felleisen

I was thinking of associating the contract with the type from which it comes 
and no that's not hash-consing. And if it's slower, too bad. -- Matthias





On Jun 10, 2014, at 12:47 PM, Eric Dobson eric.n.dob...@gmail.com wrote:

 On Tue, Jun 10, 2014 at 6:15 AM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 On Jun 9, 2014, at 6:02 PM, Eric Dobson eric.n.dob...@gmail.com wrote:
 
 
 Eric, are you talking about changing the proxy values that wrap HO/mutable
 contracted values?
 Yes. I want the proxy values to include information about who agreed
 to the contract in addition to the contract agreed to.
 
 I actually realize that I might need more than just the contract
 agreed to because of how TR changes the generated contract to remove
 checks for what it guarantees, so that info is not in the contract.
 But I believe that can be added back as a structure property on the
 contract.
 
 
 Would some form of hash-consing contracts work here? -- Matthias
 
 
 I don't think so. But not sure exactly what you are proposing.
 
 The issue is that there are 4 contracts here and 2 of them currently
 do not exist at runtime. The 4 are TRs checks/promises on an
 export/import. (Using import for a value flowing into an exported
 function). The promise contracts do not currently exist as removing
 them was my previous optimization (They never fail). What I want to do
 is change the check on import from (array/c symbol?) to (if/c
 (protected? (array/c symbol?)) any/c (array/c symbol?)). Where
 (protected? x/c) checks if TR already promised something stronger
 than x/c.
 
 I believe that you are proposing that we can use the identity of the
 contract returned by value-contract to determine what the promised
 contract would have been. This does not work as (Array Symbol) and
 (Array Float) both get translated to (array/c any/c) for export, and
 we would want to lookup different promised contracts for them. We
 could use weak hash map as an extra field but that seems like it would
 be slow.


_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] fresh install ends in

2014-06-10 Thread Matthias Felleisen

 raco setup: package declares no dependencies: txexpr
 raco setup: package declares no dependencies: sugar
 hash-ref: no value found for key
   key: racket
   context...:
/Users/matthias/plt/racket/collects/setup/private/pkg-deps.rkt:227:8: 
 for-loop
/Users/matthias/plt/racket/collects/racket/private/map.rkt:21:13: map
/Users/matthias/plt/racket/collects/setup/private/pkg-deps.rkt:415:2: 
 for-loop
/Users/matthias/plt/racket/collects/setup/private/pkg-deps.rkt:24:0: 
 check-package-dependencies
/Users/matthias/plt/racket/collects/setup/setup-core.rkt:61:0: setup-core
/Users/matthias/plt/racket/collects/setup/setup-go.rkt: [running body]
/Users/matthias/plt/racket/collects/setup/main.rkt: [running body]
/Users/matthias/plt/racket/collects/raco/main.rkt: [running body]
 make[1]: *** [plain-in-place] Error 1
 make: *** [in-place] Error 2

_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] fresh install ends in

2014-06-10 Thread Matthew Flatt
I've pushed a repair.

At Tue, 10 Jun 2014 13:04:30 -0400, Matthias Felleisen wrote:
   
  raco setup: package declares no dependencies: txexpr
  raco setup: package declares no dependencies: sugar
  hash-ref: no value found for key
key: racket
context...:
 /Users/matthias/plt/racket/collects/setup/private/pkg-deps.rkt:227:8: 
 for-loop
 /Users/matthias/plt/racket/collects/racket/private/map.rkt:21:13: map
 /Users/matthias/plt/racket/collects/setup/private/pkg-deps.rkt:415:2: 
 for-loop
 /Users/matthias/plt/racket/collects/setup/private/pkg-deps.rkt:24:0: 
 check-package-dependencies
 /Users/matthias/plt/racket/collects/setup/setup-core.rkt:61:0: setup-core
 /Users/matthias/plt/racket/collects/setup/setup-go.rkt: [running body]
 /Users/matthias/plt/racket/collects/setup/main.rkt: [running body]
 /Users/matthias/plt/racket/collects/raco/main.rkt: [running body]
  make[1]: *** [plain-in-place] Error 1
  make: *** [in-place] Error 2
 
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev