Find the word definition

Wiktionary
metaclass

n. (context computing object-oriented programming English) A class that serves as a template for other classes rather than objects.

Wikipedia
Metaclass

In object-oriented programming, a metaclass is a class whose instances are classes. Just as an ordinary class defines the behavior of certain objects, a metaclass defines the behavior of certain classes and their instances. Not all object-oriented programming languages support metaclasses. Among those that do, the extent to which metaclasses can override any given aspect of class behavior varies. Metaclasses can be implemented by having classes be first-class citizen, in which case a metaclass is simply an object that constructs classes. Each language has its own metaobject protocol, a set of rules that govern how objects, classes, and metaclasses interact.

Metaclass (Semantic Web)

In the Semantic Web, a metaclass is a class whose instances are classes. Metaclasses are supported in the ontology language OWL and the data-modeling vocabulary RDFS. Similar to their role in programming languages, metaclasses in Semantic Web languages can have properties otherwise applicable only to individuals, while retaining the same class's ability to be classified in a concept hierarchy. This enables knowledge about instances of those metaclasses to be inferred by semantic reasoners using statements made in the metaclass. Metaclasses thus enhance the expressivity of knowledge representations in a way that can be intuitive for users. While classes are suitable to represent a population of individuals, metaclasses can, as one of their feature, be used to represent the conceptual dimension of an ontology.

Metaclasses are often modeled by setting them as the object of claims involving rdf:type and rdfs:subClassOf—built-in properties commonly referred to as instance of and subclass of. Instance of entails that the subject of the claim is an instance, i.e. an individual that is a member of a class. Subclass of entails that the subject is a class. In the context of instance of and subclass of, ordinary can be are the object of instance of claims used on a class, but ordinary classes are not. (where in a claim Bob ''instance of'' Human, Bob is the subject, and Human the object).

OWL 2 DL supports metaclasses by a feature called punning, in which one entity is interpreted as two different types of thing—a class and an individual—depending on its syntactic context. For example, through punning, an ontology could have a concept hierarchy such as Harry the eagle ''instance of'' [[golden eagle]], golden eagle ''subclass of'' [[bird]], and golden eagle ''instance of'' [[species]]. In this case, the punned entity would be golden eagle, because it is represented as a class (second claim) and an instance (third claim); whereas the metaclass would be species, as it has an instance that is a class. Punning also enables other properties that would otherwise be applicable only to ordinary instances to be used directly on classes, for example "golden eagle conservation status least concern."

Having arisen from the fields of knowledge representation, description logic and formal ontology, Semantic Web languages have a closer relationship to philosophical ontology than do conventional programming languages such as Java or Python. Accordingly, the nature of metaclasses is informed by philosophical notions such as abstract objects, the abstract and concrete, and type-token distinction. Metaclasses permit concepts to be construed as tokens of other concepts while retaining their ontological status as types. This enables types to be enumerated over, while preserving the ability to inherit from types. For example, metaclasses could allow a machine reasoner to infer from a human-friendly ontology how many elements are in the periodic table, or, given that number of protons is a property of chemical element and isotopes are a subclass of elements, how many protons exist in the isotope hydrogen-2.

Metaclasses are sometime organized by levels, in a similar way to the simple Theory of types where classes that are not metaclasses are assigned the first level, classes of classes in the first level are in the second level, classes of classes in the second level on the next and so on.

Metaclass (disambiguation)

metaclass is, in general, a class of classes.

More specifically, this term is encountered in:

  • metaclass, in programming languages, a class whose creates a class when instantiated
  • metaclass (semantic web), in semantic web and in knowledge representation, a class whoses instances are other classes instead of individuals.