-
Notifications
You must be signed in to change notification settings - Fork 1k
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
CC: Drop special handling in recheckApplication #21659
base: main
Are you sure you want to change the base?
Commits on Sep 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 74b6bf6 - Browse repository at this point
Copy the full SHA 74b6bf6View commit details -
Configuration menu - View commit details
-
Copy full SHA for ddba608 - Browse repository at this point
Copy the full SHA ddba608View commit details -
Add alternative subsumes implementations
This is done for comparing old with new
Configuration menu - View commit details
-
Copy full SHA for 440c053 - Browse repository at this point
Copy the full SHA 440c053View commit details -
Revert to previous subsumes scheme
Add the path cases without changing the whole logic
Configuration menu - View commit details
-
Copy full SHA for 45df152 - Browse repository at this point
Copy the full SHA 45df152View commit details -
Add logic to mark paths as used
If we refer to a path `a.b`, we should mark `a.b` as used, which is better than marking `a`.
Configuration menu - View commit details
-
Copy full SHA for 263d6eb - Browse repository at this point
Copy the full SHA 263d6ebView commit details -
Tweaks to path checking and massage tests
Needed to make stdlib2-cc go through. There were two errors. One in LayListIterable required a type annotation and a tweak to markFree. The other in Vieew.scala required a cast, but this could be fixed with better handling of pattern matching. path-patmat-should-be-pos.scala is a minimization.
Configuration menu - View commit details
-
Copy full SHA for 152710b - Browse repository at this point
Copy the full SHA 152710bView commit details
Commits on Sep 27, 2024
-
Drop special handling in recheckApplication
In recheckApplication we implemented a rule that computed the capture set of an application `f(a)` by being the "better" of either the capture set of `f` union capture set of `a` or the capture set of the result type of `f(a)`. This relies on capture monotinicity, which we try to get away from. Also, it's semantically dubious if the type of the argument `a` is a type variable that can be instantiated to a capturing type as in the following example: ```scala trait Iterator[+A] ... def flatMap[B](f: A => IterableOnce[B]^): Iterator[B]^{this, f} ``` Here, we account for every capability in `IterableOnce[B]^` already in `f`. But those capabilities could also come from `A` if `A` is instantiated in the actual function argument to a capturing type. There was extensive breakage once the special handling was dropped. One example is the `flatMap` definition above. We leave that as a potential soundness hold for now, but the right way to fix `flatMap` would be by adding a capture set variable: ```scala def flatMap[B, C^](f: A => IterableOnce[B]^{C^}): Iterator[B]^{this, f, C^} ``` The problem is that this currently cannot be done in a way that allows flatMap to be called as before, passing a single type argument for `B`. We'd have to change the system to either allow curried type parameters or optional type parameters for capture sets. Another issue is that now more reach capabilities are registered as used by the enclosing method. An example is lazylist-exceptions.scala, which has been moved to pending. Here, the use is spurious because it happens inside an anonymous class creation on the right hand side of the method. With refined use checking, the use would not propagate to the method, so the reach capability should not be leaking. But to get there we need to implement refined use checking first.
Configuration menu - View commit details
-
Copy full SHA for cfb8314 - Browse repository at this point
Copy the full SHA cfb8314View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03b444d - Browse repository at this point
Copy the full SHA 03b444dView commit details