Reference (computer Science) - Formal Representation

Formal Representation

More generally, a reference can be considered as a piece of data that allows unique retrieval of another piece of data. This includes primary keys in databases and keys in an associative array. If we have a set of data D, any well-defined (single-valued) function from D onto D ∪ {null} defines a type of reference, where null is the image of a piece of data not referring to anything meaningful.

An alternative representation of such a function is a directed graph called a reachability graph. Here, each datum is represented by a vertex and there is an edge from u to v if the datum in u refers to the datum in v. The maximum out-degree is one. These graphs are valuable in garbage collection, where they can be used to separate accessible from inaccessible objects.

Read more about this topic:  Reference (computer Science)

Famous quotes containing the word formal:

    The bed is now as public as the dinner table and governed by the same rules of formal confrontation.
    Angela Carter (1940–1992)