The spec reads...
The main paragraph starting "Retrieves a parameter..." can, in my opinion, be reconciled with the description of the "exists" flag. But the interpretation I derive isn't the behavior I actually see using Blender and OSL. I believe the actual behavior matches the description of the "exists" flag, but contradicts the paragraph starting "Retrieves a parameter...".
Maybe that is the intention. In my opinion it results in slightly uglier and less safe code. For example, currently I think you can't tell the difference between does not exist and exists but is not a readable texture. But if the current behavior is what everyone expects and is using then I suggest the spec should be clarified. Maybe even add a canonical example.
I can post my detailed analysis, code samples, and suggested spec re-wording here (or you can see it all
here).
Actually, my personal preference, assuming my analysis is correct, would be to implement this the way I analyse it, and clarify the spec to make my interpretation clear, and the current behavior clearly incorrect. I realize that might break some exist code. But actually I think the two versions would be such that existing code would still work because I'm guessing all existing code doesn't care about the subtle difference between does not exist and exists but is not a readable texture.
Stephen