Stream: t-compiler/wg-polonius

Topic: placeholder loans


lqd (Oct 17 2019 at 18:03, on Zulip):

I’ve been reimplementing illegal subset errors using placeholder loans, and it seems to work in tiny tests. Only in the Naive variant for now but this will work equally with DatafrogOpt (since it’s not using the full subset TC like the previous PR used to). I assumed we wanted to materialize those loans at the root of the cfg, but that’s not an information we currently have, so in the couple tests I was using the lowest point in the sorted cfg edges relation, is that sensible ? (with interning and the existing fact files it might not always work though)

lqd (Oct 17 2019 at 22:34, on Zulip):

(and it kinda throws a wrench into the LocationInsensitive variant as a quick filter pre-pass idea)

lqd (Oct 18 2019 at 18:11, on Zulip):

(I mean illegal subset errors in general — not placeholder loans — aren't taken into account by the LocationInsensitive and thus Hybrid variants, and may always require running the full analysis if we can't approximate their absence quickly ?)

nikomatsakis (Oct 22 2019 at 19:09, on Zulip):

I've been wanting to revisit that blog post for a while now

nikomatsakis (Oct 22 2019 at 19:09, on Zulip):

I'm definitely convinced we want to take the "placeholder loan" approach--

nikomatsakis (Oct 22 2019 at 19:09, on Zulip):

if for no other reason than that I think you should be able to stop at any point and replace all the "origins" with sets of loans

nikomatsakis (Oct 22 2019 at 19:09, on Zulip):

without losing any information

nikomatsakis (Oct 22 2019 at 19:09, on Zulip):

but without placeholder loans, you can't do that

lqd (Oct 22 2019 at 19:11, on Zulip):

yeah it seems like the way to go indeed; wondering about how to pass the cfg root (if I've understood correctly) to "seed" them, and then eventually how to create those placeholder loans in rustc

lqd (Oct 22 2019 at 20:32, on Zulip):

besides the common thought of "all the origins" vs "the ones interacting with potential errors", I wonder if this "stop at any point" thought is related to incr. or the query system, eg if we could avoid borrowck-ing a MIR which hasn't incrementally changed (eg in an IDE context; but outside of that, iirc just changing some comments today would mark everything as needing to be recompiled) or reconsidering our roots in Frank's work and looking at rustc sessions as the source of differential datalog updates

lqd (Nov 12 2019 at 01:30, on Zulip):

as I may still be on the road back from rustfest at the time of the meeting tomorrow, and Niko preferred a WIP PR for placeholder loans here it is so we can discuss more easily https://github.com/rust-lang/polonius/pull/137

Last update: Nov 15 2019 at 20:15UTC