Opaque context

An opaque context or referentially opaque context is a linguistic context in which it is not always possible to substitute "co-referential" expressions (expressions referring to the same object) without altering the truth of sentences. The expressions involved are usually grammatically singular terms. So, substitution of co-referential expressions into an opaque context does not always preserve truth. For example, "Lois believes x is a hero" is an opaque context because "Lois believes Superman is a hero" is true while "Lois believes Clark Kent is a hero" is false, even though 'Superman' and 'Clark Kent' are co-referential expressions.
Usage.
The term is used in philosophical theories of reference, and is to be contrasted with referentially transparent context. In rough outline:
Similar usage of the term applies for artificial languages such as programming languages and logics. The Cicero–Tully example above can be easily adapted. Use the notation formula_1 as a quotation that mentions a term formula_2. Define a predicate formula_3 which is true for terms six letters long. Then formula_4 induces an opaque context, or is referentially opaque, because formula_5 is true while formula_6 is false. Programming languages often have richer semantics than logics' semantics of truth and falsity, and so an operator such as formula_4 may fail to be referentially transparent for other reasons as well.