Reification (computer science)

From Wikipedia, the free encyclopedia

Jump to: navigation, search

Reification is a process through which a computable/addressable object - a resource - is created in a system, as a proxy for a non computable/addressable object. By means of reification something that was previously implicit, unexpressed and possibly unexpressible is explicitly formulated and made available to conceptual (logical or computational) manipulation. Informally, reification is often referred to as "making something a first-class citizen" within the scope of a particular system. Some aspect of a system can be reified at language design time - this is related to reflection in programming languages; reification can be applied as a stepwise refinement step at system design time; reification is one of the most frequently used techniques of conceptual analysis and knowledge representation.

The etymology of the term reification is from Latin res (thing) + facere (to make). Reification can be 'translated' as thing-making; the turning of something abstract into a concrete thing or object.

In linguistics, reification corresponds to a well-known phenomenon called nominalization, which consists in turning a verb into a noun, for example "move"->"movement", "be a member" -> "membership". Nominalization often makes it easier to supply additional clauses to the verb.

Contents

[edit] Reification and Reflective Programming Languages

In the context of programming languages reification is the process by which a user program or any aspect of a programming language, which were implicit in the translated program and the run-time system, are expressed in the language itself and made available to the program, which can inspect them as ordinary data. In reflective languages reification data is causally connected to the related reified aspect such that a modification to one of them affects the other. Therefore, the reification data is always a faithful representation of the related reified aspect. Reification data is often said to be made first class object. Reification, at least partially, has been experienced in many languages to date: in early Lisp dialects and in current Prolog dialects, programs have been treated as data, although the causal connection has often been left to the responsibility of the programmer. In Smalltalk-80, the compiler from the source text to bytecode has been part of the run-time system since the very first implementations of the language[1].

Many programming language designs encapsulate the details of memory allocation in the compiler and the run-time system. In the design of the C programming language, the memory address is reified and is available for direct manipulation by other language constructs. For example, the following code may be used when implementing a memory-mapped device driver. The buffer pointer is a proxy for the memory address 0xB800000.
char* buffer = (char*)0xB800000;
buffer[0] = 10; 

[edit] Data Reification vs Data Refinement

Data reification (stepwise refinement) involves finding a more concrete representation of the abstract data types used in a formal specification.

Data reification is the terminology of the Vienna Development Method (VDM) for what most other people would call data refinement - that is, the taking of a step towards an implementation by replacing a data representation without a counterpart in the intended implementation language (such as sets) by one that does have a counterpart (such as maps with fixed domains, which can be implemented by arrays), or at least one which is closer to having a counterpart, such as sequences. The VDM community prefers the word "reification" over "refinement" because the process has more to do with making an idea concrete than with making it more refined [3].

For similar usages see Reification (linguistics)

[edit] Reification in Conceptual Modeling

Reification is widely used in conceptual modeling[4] Reifying a relationship consists in viewing it as an entity. The purpose of reifying a relationship is to make it explicit, when additional information needs to be added to it. Consider the relationship type IsMemberOf (member:Person, Committee). An instance of IsMemberOf is a relationship that represents the fact that a person is a member of a committee. The figure below shows an example population of IsMemberOf relationship is tabular form. Person P1 is a member of committees C1 and C2. Person P2 is a member of committee C1 only.

The same fact, however, could also be viewed as an entity. When we view a relationship as an entity, we say that the entity reifies the relationship. The reification of a relationship consists in viewing it as an entity. Like any other, this entity must be an instance of an entity type. In the present example, the entity type has been named Membership. For each instance of IsMemberOf, there is one and only one instance of Membership, and vice versa. Now it becomes possible to add more information to the original relationship, for example, we can express the fact that "person p1 was nominated to be the member of committee c1 by person p2". Reified relationship Membership can be used as the source of a new relationship IsNominatedBy(Membership, Person).

For related usages see Reification (knowledge representation).

[edit] Reification in Unified Modeling Language (UML)

UML provides an association class construct for defining reified relationship types. The association class is a single model element that is both a kind of association and a kind of a class[5]. The association and the entity type that reifies it are both the same model element. Note that attributes cannot be reified. The figure below shows the UML class diagram for the Membership example.

[edit] Reification on Semantic Web

[edit] RDF and OWL

In Semantic Web languages, such as Resource Description Framework (RDF) and Web Ontology Language (OWL), a statement is a binary relation: it is used to link two individuals or an individual and a value. Applications sometimes need to describe other RDF statements using RDF, for instance, to record information about when statements were made, who made them, or other similar information (this is sometimes referred to as "provenance" information). For example, we may want to represent properties of a relation, such as our certainty about it, severity or strength of a relation, relevance of a relation, and so on.

The example from the conceptual modeling section describes a particular person with URIref person:p1, who is a member of the committee:c1. The RDF triple from that description is:

 person:p1   committee:isMemberOf   committee:c1 .

and it might be useful to record who nominated this particular person to this committee.

RDF provides a built-in vocabulary intended for describing RDF statements. A description of a statement using this vocabulary is called a reification of the statement. The RDF reification vocabulary consists of the type rdf:Statement, and the properties rdf:subject, rdf:predicate, and rdf:object [6].

Using the reification vocabulary, a reification of the statement about the person's membership would be given by assigning the statement a URIref such as committee:membership12345 (so statements can be written describing it), and then describing the statement using the statements:

committee:membership12345   rdf:type        rdf:Statement .
committee:membership12345   rdf:subject     person:p1 .
committee:membership12345   rdf:predicate   committee:isMemberOf . 
committee:membership12345   rdf:object      committee:c1 .

These statements say that the resource identified by the URIref committee:membership12345 is an RDF statement, that the subject of the statement refers to the resource identified by person:p1, the predicate of the statement refers to the resource identified by committee:isMemberOf, and the object of the statement refers to the resource committee:c1. Assuming that the original statement is actually identified by committee:membership12345, it should be clear by comparing the original statement with the reification that the reification actually does describe it. The conventional use of the RDF reification vocabulary always involves describing a statement using four statements in this pattern; the four statements are sometimes referred to as a "reification quad" for this reason [6].

Using reification according to this convention, we could record the fact that person:p2 made the nomination described by the original statement by adding statement:

 person:p2 committee:nominated committee:membership12345

It is important to note that in the conventional use of reification, the subject of the reification triples is assumed to identify a particular instance of a triple in a particular RDF document, rather than some arbitrary triple having the same subject, predicate, and object. This particular convention is used because reification is intended for expressing properties such as dates of composition and source information, as in the examples given already, and these properties need to be applied to specific instances of triples.

The power of the reification vocabulary in RDF is restricted by the lack of a built-in means for assigning URIrefs to statements, so in order to express "provenance" information of this kind in RDF, one has to use some mechanism (outside of RDF) to assign URIs to individual RDF statements, then make further statements about those individual statements, using their URIs to identify them [6].

[edit] Reification in Topic Maps

Of all the constructs in a XML Topic Maps (XTM) only the topic is allowed to have names and occurrences and to play roles in associations. In other words, one can only make assertions about a subject which is represented by a topic. Those assertions themselves are not topics and so we cannot make assertions about assertions. Reification is the process by which a topic may be constructed to represent the assertion made by some other construct in the topic map. This process enables a name to be given to a particular occurrence of a topic, or documentation of an association to be "attached" to the association itself. Thus when an association is reified - a new topic is created that can be used in higher level associations. An RDF statement carries the same type of semantic information than a XTM association does [7].

[edit] Reification and N-ary relations

In Semantic Web languages, such as RDF and OWL, a property is a binary relation: it is used to link two individuals or an individual and a value. However, in some cases, the natural and convenient way to represent certain concepts is to use relations to link an individual to more than just one individual or value. These relations are called N-ary relations. For example is representing relations among multiple individuals, such as a committee, a person who is a committee member and another person who has nominated the first person to become the committee member. For example, a buyer, a seller, and an object that was bought when describing a purchase of a book.

A more general approach to reification is to create an explicit new class and n new properties to represent an N-ary relation. An instance of the relation linking the n individuals is then an instance of this class. This approach can be also used to represented provenance information and other properties for an individual relation instance.[8]

:p1
     a       :Person ;
     :has_membership _:Membership_12345 .
:_Membership_12345
     a       :Membership ;
     :committee :C1;
     :nominated_by :p2 .

[edit] Reification vs Quotation

It is also important to note that the interpretation of reification described here is not the same as "quotation", as found in some languages. Instead, the reification describes the relationship between a particular instance of a triple and the resources the triple refers to. The reification can be read intuitively as saying "this RDF triple talks about these things", rather than (as in quotation) "this RDF triple has this form." For instance, in the reification example used in this section, the triple:

 committee:membership12345   rdf:subject   person:p1 .

describing the rdf:subject of the original statement says that the subject of the statement is the resource (the person) identified by the URIref person:p1. It does not say that the subject of the statement is the URIref itself (i.e., a string beginning with certain characters), as quotation would do.

[edit] References

  1. ^ J. Malenfant, M. Jacques and F.-N. Demers, A Tutorial on Behavioral Reflection and its Implementation
  2. ^ The Java Language Specification, section 4.7, Third Edition
  3. ^ Formal Methods Europe, Frequently Asked Questions, part 13
  4. ^ Antoni Olivé, Conceptual Modeling of Information Systems, Springer Verlag, 2007
  5. ^ Unified Modeling Language, UML superstructure, Object Management Group, 07-11-02
  6. ^ a b c RDF Primer
  7. ^ Practical Introduction into Topic Maps
  8. ^ W3C Defining N-ary relations on Semantic Web

[edit] See also

Personal tools
Languages