RFR: 8314480: Memory ordering spec updates in java.lang.ref [v13]
Stuart Marks
smarks at openjdk.org
Tue Mar 19 22:29:23 UTC 2024
On Tue, 19 Mar 2024 22:19:50 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> In fact, it appears as if the problem is with the use of "any", which is universal in strength, whereas the intention here is existential in strength (as suggested by. my wording). Indeed, you might achieve the same effect by replacing "any" with "some" so that:
>>
>> "An object is reachable if it can be accessed in some continuing computation from some live thread."
>>
>> You needn't even say live because dead threads can neither take steps nor continue participating in the computation nor can they "access" objects for whatever informal notion of access. The "some continuing computation" subsumes "potential" (as in a possible future) so potential can be dropped.
>
> I think you are overthinking this somewhat Ramki. I don't see a practical (non discrete-math) distinction between "some" and "any", so would not object to that single word change if it helps. But "potential" should remain as it covers branching in the program whereby if we proceed down one branch an object remains reachable, whereas if we precede down another then it may not.
I don't think changing "any" to "some" is helpful. I think "any" is ambiguous regarding meaning universal or existential strength. The sense used here is, considering the possible future execution paths of a thread, if any of them accesses the object, that object is reachable. In other words, it means "any one" and not "all".
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16644#discussion_r1531198317
More information about the core-libs-dev
mailing list