-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace fallback clauses with projection-equality vs normalization #75
Merged
Commits on Jan 19, 2018
-
add
info!
to let us follow progress in a less noisy fashionNot really the ideal solution, but helpful. It'd be nice to record all the data and be able to expand after the fact.
Configuration menu - View commit details
-
Copy full SHA for bb7a585 - Browse repository at this point
Copy the full SHA bb7a585View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22374b4 - Browse repository at this point
Copy the full SHA 22374b4View commit details
Commits on Jan 20, 2018
-
Configuration menu - View commit details
-
Copy full SHA for d1dfe25 - Browse repository at this point
Copy the full SHA d1dfe25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9304e7f - Browse repository at this point
Copy the full SHA 9304e7fView commit details -
replace fallback clauses with
ProjectionEq
/Normalize
Instead of having "fallback clauses" to handle projection, we now have `ProjectionEq(<T as Trait>::Bar = U)`, which can be proven either by normalizing *or* by skolemizing. This required adjusting how we handle elaboration. That is, we now "expand" a `T: Trait<Bar = U>` (which is the user syntax for projection equality) into `T: Trait` as well, which in turn expands into `WF(T: Trait)`. We do this instead of having a clause like: > `(T: Trait) :- exists<U> { (T: Trait<Bar = U>) }` This is because that clause caused issues for the recursive solver; in particular, `exists<U> { (T: Trait<Bar = U>) }` always resolves to an ambiguous result, since there is no unique `U`. This PR adjusts the tests appropriately. Mostly we add normalize and projection. In a few cases, the SLG solver doesn't work yet; those are tagged with FIXME (and fixed in a later commit).
Configuration menu - View commit details
-
Copy full SHA for c92c25d - Browse repository at this point
Copy the full SHA c92c25dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0029fc8 - Browse repository at this point
Copy the full SHA 0029fc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 563a8b0 - Browse repository at this point
Copy the full SHA 563a8b0View commit details -
substitute answers into pending goals without using unification
This is not only more efficient, but it also sidesteps the problems that led to the SLG solver recursing infinitely when unifying goals involving projections. This also uncovers a potential flaw with the truncation operation, in that it does not concern itself with internal binders. For example, we might truncate a type like `for<'a> fn(Vec<&'a u32>)` into `for<'a> fn(?X)`. This is problematic because there is no value of `?X` that could reference `'a`. For now, the SLG solver will panic in this scenario, but probably truncation needs to truncate the binder as well.
Configuration menu - View commit details
-
Copy full SHA for 4ddc058 - Browse repository at this point
Copy the full SHA 4ddc058View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.