Stream: t-compiler/wg-polonius

Topic: meeting 2019.05.14


lqd (May 14 2019 at 19:00, on Zulip):

good evening, friends from @WG-polonius :wave:

lqd (May 14 2019 at 19:01, on Zulip):

probably a shorter one tonight as it's likely going to be just the two of us @Albin Stjerna :)

Albin Stjerna (May 14 2019 at 19:01, on Zulip):

@lqd Hi! That's cool with me

nikomatsakis (May 14 2019 at 19:01, on Zulip):

I'm around-ish

Albin Stjerna (May 14 2019 at 19:01, on Zulip):

I have a rather early morning appointment tomorrow anyway :)

lqd (May 14 2019 at 19:01, on Zulip):

hello :)

lqd (May 14 2019 at 19:02, on Zulip):

our usual roadmap document

Albin Stjerna (May 14 2019 at 19:02, on Zulip):

Oh, right, it might be worth mentioning that I'm away for a wedding (plus preparations) Thursday morning through Monday afternoon, local time

nikomatsakis (May 14 2019 at 19:03, on Zulip):

not yours, I assume

lqd (May 14 2019 at 19:03, on Zulip):

and for once, the minutes from last meeting

Albin Stjerna (May 14 2019 at 19:03, on Zulip):

Not mine, fortunately

Albin Stjerna (May 14 2019 at 19:03, on Zulip):

But at this point I'm very involved since it's two of my best friends getting married

lqd (May 14 2019 at 19:03, on Zulip):

sweet

Albin Stjerna (May 14 2019 at 19:03, on Zulip):

Very

nikomatsakis (May 14 2019 at 19:03, on Zulip):

tell them polonius comes first

nikomatsakis (May 14 2019 at 19:03, on Zulip):

wedding second

Albin Stjerna (May 14 2019 at 19:03, on Zulip):

Absolutely

Albin Stjerna (May 14 2019 at 19:03, on Zulip):

To a nunnery etc

Albin Stjerna (May 14 2019 at 19:04, on Zulip):

(I listened to a terrible Hamlet audiobook)

lqd (May 14 2019 at 19:04, on Zulip):

I've unfortunately not been keeping up with liveness enough as much as I should but I've noticed you two talking about it a lot :)

Albin Stjerna (May 14 2019 at 19:04, on Zulip):

Hoped to get some good chapter quotes for my thesis

Albin Stjerna (May 14 2019 at 19:05, on Zulip):

Ah, yes

Albin Stjerna (May 14 2019 at 19:05, on Zulip):

Ok err what have I actually done

lqd (May 14 2019 at 19:05, on Zulip):

a lot more details about drop and liveness have been discussed iiuc

Albin Stjerna (May 14 2019 at 19:05, on Zulip):

Well, I haven't tested it exhaustively yet, but it seems I have done...liveness

nikomatsakis (May 14 2019 at 19:05, on Zulip):

yeah I think you're basically "done"

nikomatsakis (May 14 2019 at 19:05, on Zulip):

modulo that when you removed the old code, it kind of panicked or something?

Albin Stjerna (May 14 2019 at 19:06, on Zulip):

Yes, but only on a few compile-tests, but I would have to look into that yes

lqd (May 14 2019 at 19:06, on Zulip):

awesome

lqd (May 14 2019 at 19:06, on Zulip):

I think niko is away next week btw right ?

lqd (May 14 2019 at 19:07, on Zulip):

and myself probably the week after that (or the following)

nikomatsakis (May 14 2019 at 19:07, on Zulip):

I think niko is away next week btw right ?

correct

lqd (May 14 2019 at 19:07, on Zulip):

so we'll just test, and validate, review etc liveness and it should be good to go

lqd (May 14 2019 at 19:08, on Zulip):

probably needing a new polonius release at some point so that the rustc pr can at least be tested on ci

nikomatsakis (May 14 2019 at 19:08, on Zulip):

ah yes

nikomatsakis (May 14 2019 at 19:08, on Zulip):

I can certainly do that

nikomatsakis (May 14 2019 at 19:08, on Zulip):

are we ready for that?

nikomatsakis (May 14 2019 at 19:09, on Zulip):

I guess I have to review @Albin Stjerna's PR...

lqd (May 14 2019 at 19:09, on Zulip):

yeah the polonius PR probably needs to be merged first I assume :)

Albin Stjerna (May 14 2019 at 19:09, on Zulip):

I'd like to test it on some more drop-liveness cases, but it seems to me like it's working

Albin Stjerna (May 14 2019 at 19:09, on Zulip):

Yes, because my rustc PR depends on it

lqd (May 14 2019 at 19:09, on Zulip):

right ? the rustc pr depends on new generic parameters etc

nikomatsakis (May 14 2019 at 19:10, on Zulip):

right so we can review, merge, issue a new (breaking change) release

lqd (May 14 2019 at 19:10, on Zulip):

the liveness computation has also been extracted, etc, so at least it seems ready to mostly review, barring the tests and panic etc we mentioned

Albin Stjerna (May 14 2019 at 19:10, on Zulip):

I also think I messed up the polonius main for multiple inputs, heh

Albin Stjerna (May 14 2019 at 19:10, on Zulip):

But I haven't figured out why yet

Albin Stjerna (May 14 2019 at 19:10, on Zulip):

So that's the cli wrapper

lqd (May 14 2019 at 19:11, on Zulip):

in the meantime, lokalmatador has apparently been continuing on the prereq work to do the benchmarking tasks from the roadmap :thumbs_up:

Albin Stjerna (May 14 2019 at 19:11, on Zulip):

I did some weird things to enable comparisons for region_live_at with the calculated counterpart, and I think it's probably best to just remove that

lqd (May 14 2019 at 19:11, on Zulip):

so that's nice as well

Albin Stjerna (May 14 2019 at 19:11, on Zulip):

Ooo, yes!

lqd (May 14 2019 at 19:12, on Zulip):

I myself have finally done the meeting notes :) and have been working on the polonius compare mode tests (there's a topic for that)

Albin Stjerna (May 14 2019 at 19:12, on Zulip):

I saw!

Albin Stjerna (May 14 2019 at 19:12, on Zulip):

I'm looking forward to having better tests for the things I will be working on

Albin Stjerna (May 14 2019 at 19:12, on Zulip):

That will make everything so much less scary

lqd (May 14 2019 at 19:12, on Zulip):

I did a first pass at analysis here

lqd (May 14 2019 at 19:13, on Zulip):

some of those are straightforward, some will need a bit more time to process

lqd (May 14 2019 at 19:13, on Zulip):

but at least this document has — I hope — all the info one'd need to do so, links to test code, nll/polonius outputs, the diff, etc

lqd (May 14 2019 at 19:14, on Zulip):

(I've also added testing, etc to the roadmap as we mentioned last time, even though know we know it's important and talk about it a lot, having it on the roadmap seems important)

nikomatsakis (May 14 2019 at 19:14, on Zulip):

I myself have finally done the meeting notes :) and have been working on the polonius compare mode tests (there's a topic for that)

I have to go double check that, sounds like you got down to a small-ish number of errors?

lqd (May 14 2019 at 19:14, on Zulip):

absolutely yes

nikomatsakis (May 14 2019 at 19:14, on Zulip):

oh, wow

lqd (May 14 2019 at 19:14, on Zulip):

less than 20

nikomatsakis (May 14 2019 at 19:14, on Zulip):

I just clicked the analysis link

nikomatsakis (May 14 2019 at 19:14, on Zulip):

quite detailed

nikomatsakis (May 14 2019 at 19:15, on Zulip):

nice

lqd (May 14 2019 at 19:15, on Zulip):

and among those some are very easy

lqd (May 14 2019 at 19:15, on Zulip):

I try :p

lqd (May 14 2019 at 19:15, on Zulip):

there are a couple where there is definitely a difference between NLL and Polonius

lqd (May 14 2019 at 19:15, on Zulip):

and one of those is the case Albin saw while benchmarking and that I reduced

nikomatsakis (May 14 2019 at 19:16, on Zulip):

ok

lqd (May 14 2019 at 19:16, on Zulip):

I'll continue looking at those for the time being, maybe do the easy tests first

lqd (May 14 2019 at 19:16, on Zulip):

ignoring or blessing them

lqd (May 14 2019 at 19:17, on Zulip):

a lot are about diagnostics, which is still a bit fuzzy to me, how will they interact with polonius, etc

lqd (May 14 2019 at 19:17, on Zulip):

but probably a topic for later

lqd (May 14 2019 at 19:18, on Zulip):

did anyone need/want to talk about something in particular ?

Albin Stjerna (May 14 2019 at 19:19, on Zulip):

Quick follow-up: I verified that my hack to compare region_live_at was the source of the crashes with multiple input

lqd (May 14 2019 at 19:19, on Zulip):

multiple input meaning ?

Albin Stjerna (May 14 2019 at 19:19, on Zulip):

So I'll just remove those bits and everything should work fine

Albin Stjerna (May 14 2019 at 19:19, on Zulip):

Ah, for the Polonius CLI, when one does polonius <several input directories>

lqd (May 14 2019 at 19:20, on Zulip):

we support that ? :joy:

Albin Stjerna (May 14 2019 at 19:20, on Zulip):

...yes

lqd (May 14 2019 at 19:20, on Zulip):

surprising

Albin Stjerna (May 14 2019 at 19:21, on Zulip):

But I don't think I have anything to add

lqd (May 14 2019 at 19:21, on Zulip):

those comparisons are also in tests probably already right ?

Albin Stjerna (May 14 2019 at 19:21, on Zulip):

Not really, but they should be

lqd (May 14 2019 at 19:22, on Zulip):

and some of these rustc facts will disappear eventually

lqd (May 14 2019 at 19:22, on Zulip):

since you're now computing them

Albin Stjerna (May 14 2019 at 19:23, on Zulip):

Cleaning up my Polonius PR, and then removing the calculations for region_live_at in rustc and making sure that doesn't panic anymore along with documenting liveness in my report should keep me busy at least till next week

nikomatsakis (May 14 2019 at 19:23, on Zulip):

so there is one other thing

nikomatsakis (May 14 2019 at 19:23, on Zulip):

but I think it can wait

nikomatsakis (May 14 2019 at 19:23, on Zulip):

in particular, rustc has some optimizations around liveness that were pretty crucial

lqd (May 14 2019 at 19:23, on Zulip):

so I think this week we can try and clean up and finalize liveness, while I continue on the compare-mode thing

nikomatsakis (May 14 2019 at 19:23, on Zulip):

I imagine we may want to do similar things in polonius

nikomatsakis (May 14 2019 at 19:23, on Zulip):

but I suspect we should wait

lqd (May 14 2019 at 19:23, on Zulip):

are those the ones disabled for polonius or are these different optimizations ?

nikomatsakis (May 14 2019 at 19:24, on Zulip):

they are the ones disabled; I thikn there were two sets

nikomatsakis (May 14 2019 at 19:24, on Zulip):

or maybe they are related

nikomatsakis (May 14 2019 at 19:24, on Zulip):

basically we try to avoid computing liveness

lqd (May 14 2019 at 19:25, on Zulip):

(I also remember when we added short-circuiting to speed up tuple-stress with NLLs and wondered how would we do so in polonius)

nikomatsakis (May 14 2019 at 19:25, on Zulip):

I remember one that tried to find all regions that wound up being returned from the fn; in the existing NLL those did not need to track liveness. this is not true for polonius, I don't think.

nikomatsakis (May 14 2019 at 19:26, on Zulip):

the other is that we have no need to compute liveness for variables whose types have no regions

nikomatsakis (May 14 2019 at 19:26, on Zulip):

this is something we could readily implement in polonius I guess, or outside of it.

nikomatsakis (May 14 2019 at 19:26, on Zulip):

I remember one that tried to find all regions that wound up being returned from the fn; in the existing NLL those did not need to track liveness. this is not true for polonius, I don't think.

but maybe we can still find something clever to do :)

Albin Stjerna (May 14 2019 at 19:26, on Zulip):

I guess it would be best to do it as early in the chain as possible, to avoid generating tuples at all

nikomatsakis (May 14 2019 at 19:26, on Zulip):

anyway that's why I say let's leave it for later

nikomatsakis (May 14 2019 at 19:26, on Zulip):

I guess it would be best to do it as early in the chain as possible, to avoid generating tuples at all

yeah confirm

lqd (May 14 2019 at 19:26, on Zulip):

:)

nikomatsakis (May 14 2019 at 19:26, on Zulip):

handling the case of "no regions" is presumably pretty easy

lqd (May 14 2019 at 19:27, on Zulip):

those optimization opportunities will be especially interesting when we also have correctness tests and the benchmark suite we mentioned

Albin Stjerna (May 14 2019 at 19:27, on Zulip):

Err, yes

lqd (May 14 2019 at 19:28, on Zulip):

that's not to say we can't look at those ever before then of course

Albin Stjerna (May 14 2019 at 19:28, on Zulip):

I'm also a bit nervous about some of the compare-tests in Polonius, because if I update the facts for some of the inputs they stop passing

Albin Stjerna (May 14 2019 at 19:28, on Zulip):

And I can't tell if that's spurious because some hard-coded values changed names or if there's an actual problem

lqd (May 14 2019 at 19:29, on Zulip):

Albin do you happen to have a list of things you wanted to finish, polish, clean up, verify, on liveness ?

Albin Stjerna (May 14 2019 at 19:29, on Zulip):

Hm, not exactly, but I should make one up

lqd (May 14 2019 at 19:29, on Zulip):

so that we can at least keep track of them and not forget any, if not split these among different people

Albin Stjerna (May 14 2019 at 19:29, on Zulip):

Sounds good

lqd (May 14 2019 at 19:29, on Zulip):

if that's not too much trouble

lqd (May 14 2019 at 19:30, on Zulip):

otherwise I fear we'd have to look for them in the meeting topics and might miss some of those

Albin Stjerna (May 14 2019 at 19:30, on Zulip):

Ok, so:
1. remove the compare mode from the Polonius CLI

Albin Stjerna (May 14 2019 at 19:30, on Zulip):

(should I add these straight to the Roadmap?)

Albin Stjerna (May 14 2019 at 19:30, on Zulip):

2. remove the region logic from Rust

lqd (May 14 2019 at 19:30, on Zulip):

a comment on the issue could work as wel

Albin Stjerna (May 14 2019 at 19:30, on Zulip):

3. Verify that 2. doesn't break anything in the compiletests

Albin Stjerna (May 14 2019 at 19:31, on Zulip):

0. Test the rest of the drop-live input facts against the region_live_atin rustc

Albin Stjerna (May 14 2019 at 19:32, on Zulip):

...that's it I think?

lqd (May 14 2019 at 19:32, on Zulip):

maybe add some tests using facts from the NLL tests you and niko were talking about earlier ?

Albin Stjerna (May 14 2019 at 19:32, on Zulip):

Yes, definitely that too

lqd (May 14 2019 at 19:33, on Zulip):

alright, thanks a lot; if there's any more I feel they'll come during reviews of your PRs

lqd (May 14 2019 at 19:34, on Zulip):

and I think we're good for the meeting :) right on time

Albin Stjerna (May 14 2019 at 19:34, on Zulip):

:)

lqd (May 14 2019 at 19:34, on Zulip):

thank you for your time everyone, good evening/afternoon :wave:

Albin Stjerna (May 14 2019 at 19:34, on Zulip):

Thanks!

lqd (May 15 2019 at 10:33, on Zulip):

(I added this meeting's notes to compiler-team#91)

Last update: Nov 15 2019 at 21:05UTC