Exporting objects by reference can be problematic since the
receivers can use the received reference to perform state changing operations
on the referenced object. This can lead to errors if the referenced
object is a subobject of a compound object not anticipating the change.
We propose an extension of a type system with a read-only construct
that can be used to control access to state changing methods. We formulate
and prove a read-only theorem for read-only references stating that
a read-only reference cannot be used to perform operations that change
its referenced object state.
Berlin: Springer Berlin/Heidelberg, 2002. 457-472 p.