Stream: wg-traits

Topic: salsa in chalk


tmandry (Jan 14 2019 at 20:32, on Zulip):

@nikomatsakis I opened https://github.com/rust-lang-nursery/chalk/issues/201, let me know if you see anything missing

tmandry (Jan 16 2019 at 21:41, on Zulip):

@nikomatsakis I went ahead and rebased your salsaify branch after merging in rustfmt

tmandry (Jan 16 2019 at 21:59, on Zulip):

okay, apparently I keep screwing up this rebase, sorry

nikomatsakis (Jan 17 2019 at 14:10, on Zulip):

@tmandry cool thanks

nikomatsakis (Jan 17 2019 at 14:14, on Zulip):

OK I landed https://github.com/rust-lang-nursery/chalk/pull/197, at least

tmandry (Jan 19 2019 at 00:40, on Zulip):

@nikomatsakis I'm thinking of making solver_choice a global in salsa btw, I can't think of a reason not to at least

tmandry (Jan 19 2019 at 23:18, on Zulip):

I opened this WIP PR with my progress so far

tmandry (Jan 19 2019 at 23:20, on Zulip):

So now I have an environment query for the whole program

tmandry (Jan 19 2019 at 23:20, on Zulip):

I'm thinking the next step then is to create a program_clauses_for_trait(def_id) query that gets used in the environment() query

tmandry (Jan 19 2019 at 23:21, on Zulip):

And then we can cut a branch there for specialization work to pick up

tmandry (Jan 19 2019 at 23:21, on Zulip):

or @nikomatsakis do we need fine-grained queries besides that for the specialization work?

tmandry (Jan 19 2019 at 23:27, on Zulip):

it's not clear to me how specialization will decide which traits it needs program clauses for

tmandry (Jan 20 2019 at 01:15, on Zulip):

(oops, I mean impls, not traits)

nikomatsakis (Jan 22 2019 at 17:34, on Zulip):

I'm thinking of making solver_choice a global in salsa btw, I can't think of a reason not to at least

if we're adopting salsa, it could plausibly be an "input" to the salsa database

nikomatsakis (Jan 22 2019 at 17:35, on Zulip):

...and you already did that

nikomatsakis (Jan 22 2019 at 17:39, on Zulip):

it's not clear to me how specialization will decide which traits it needs program clauses for

the idea is roughly that we uncover this "dynamically" -- i.e., in order to determine whether an impl A specializes another impl B, we have to test the two predicates, so we need some way to get the rules we need to evaluate the predicates from impl B, which will wind up invoking program_clauses_for_trait for the stuff that appears there etc

nikomatsakis (Jan 22 2019 at 17:40, on Zulip):

anyway, this branch seems like a good start

nikomatsakis (Jan 22 2019 at 17:40, on Zulip):

I feel like just adopting the database is already kind of nice

Last update: Nov 12 2019 at 15:30UTC