I wrote my master's thesis on this in 1985. Back then there was a branch of the AI research community that was hung up on the following problem: John knows Mary's phone number. Mary and Bill have the same phone number, but John doesn't know this. If we translate this into formal logic in the straightforward manner it seems we can draw the false conclusion that John knows Bill's phone number:<p>Knows(John, Phone(Mary))<p>Phone(Mary) = Phone(Bill)<p>Therefore: Knows(John, Phone(Bill)) by substitution of equals<p>How do we prevent this? The answer, of course, is to distinguish between Phone(Mary) and "Phone(Mary)". When we say that John knows Mary's phone number what we really mean is that John knows that "Mary's phone number" denotes X for some particular X, i.e.<p>Exists(x): Knows(John, denotes("Phone(Mary)", x))<p>Because "Phone(Mary)" != "Phone(Bill)" (despite the fact that Phone(Mary) = Phone(Bill)) you can no longer draw the false conclusion.<p>I once had the opportunity to chat with John McCarthy and I presented this solution to him and he said (I'm paraphrasing), "Yes, that's what makes QUOTE in Lisp such a cool idea."
Heavily influential to all of this was Frege's 'on Sense and Reference'.
Best link I can give from my mobile is to a search, where you can find pdfs and the helpful wiki entry: <a href="https://www.google.com/search?q=on+sense+and+reference" rel="nofollow">https://www.google.com/search?q=on+sense+and+reference</a>