Skip to content

Clash of terms

GCHQDeveloper42 edited this page May 18, 2021 · 1 revision

A Terminological Minefield

This page is a short diversion to illustrate how just three terms that are key to the fields of maths, metaphysics, software development... and other fields, can be easily used in misleading contexts. Even when each word can be used correctly in a particular context problems can arise if the context is ambitious or, when carried over to a different context, is used inconsistently with the former context. These are provided for illustration only, it isn't an exhaustive list and is by no means a thorough treatment of the topic. Hopefully it shows how challenging it is to rely on terms and their definitions, particularly when their uses can appear to be dependent on each other (or at least ambiguously dependent):

  1. Class

    The term class is familiar to users' of object oriented programming languages; "my example data object is an instance of a Java (or Python) class.". However, even within the realm of programming the use of the term "Class" isn't equivalent in different contexts. Is a UML Class generally equivalent to a Python class? Hmm, in some circumstances it can be and in others not.

    "Class" also has pedigree in philosophy and the creation of classification systems, such as the Linean system of classifying the kingdoms of nature. Aristotle is credited with doing formative work on the Categories of things (e.g. beings) and aspects of them (e.g. particulars and universals, both accidental and non-accidental). The resulting systems for classifying things draws upon the notions of classes, and sets, that relate to the characteristics of their members.

    In Set Theory the term Class has special significance too. However, even there, in many contexts it has a 'special' significance that depends on the formalisms relating to different theories. In summary, "class" is easily confused with "set", often being referred to as a collection of sets, but the detail is dependent on the theoretic foundations in play (see next term). What is without doubt is that this mathematical field is independent of the programming world - until they get employed together, as in Magma Core's TLO.

    Magma Core

    Magma Core is strictly based on HQDM. "Class" is an Entity Type, a sub-type of Abstract object, itself a sub-type of Thing. All HQDM class Entities and their instances are representation of a set and are themselves a sub-set of at least one other set. These sets are extensional and are determined by their members. However, there is scope for term mis-match because there are many Entities in the HQDM data model that are not of the type class or inherited from it. This illustrates that there is not a 1:1 mapping between a HQDM Java Class and a HQDM Class. In addition, in the extension of the HQDM Java Classes representing HQDM Class and its sub-types, an instance of class represents that HQDM Class or a subclass of it. Members of that class will be constructed through relations that bind their membership to one, or more, specific instances of HQDM class.

    This is very different from the approach taken in modelling languages such as UML.

  2. Set

    As mentioned in the previous section, "Set" has a significance to the use of the term "Class". However, the term "Set" has a number of uses in relevant fields that reveal challenges with its use too. While a set can be described, as in Naive Set Theory, as a collection of distinct objects. This can be problematic if we want to employ a constructed set theory within a top level model (e.g. hqdm:Class and its subsets, and perhaps powerset) there is a challenge. There are collections of distinct objects (in the Total Realm of Interest) that are set-like and require representation in data but are not solely organised by membership of hqdm:Class.

    A more practical challenge when adopting available specifications for the implementation of a TLO in Magma Core is that the terms "Set" and "Class" have established uses in standards that don't quite match what the model requires. One example is the W3C specifications for Linked Data. The Resource Description Framework Schema (RDFS) defines rdfs:class as "This is the class of resources that are RDF classes. rdfs:Class is an instance of rdfs:Class.". The Resource Description Framework can be used to assign non-rdfs:class entities to be members (by the rdf:type assignment) of these classes, allowing entailment of inheritance to be computed. However, to represent HQDM for Magma Core using the Linked Data specifications this results in rdfs:class not being equivalent to any of the previous uses of the term "Class" or "Set" on this page. Further illustration of the similarities, and strict inconsistency, between RDF and set theory can be found here.

    Magma Core

    The W3C specifications of RDF, RDFS and OWL expand on the construction of their formal semantics along the lines in these linked specifications, adding a lot more detail that can reveal further challenges in mapping to an extensional data model like HQDM. Magma Core adopts these specifications but defers to HQDM where there is a mis-match between it and the W3C specifications. While an OWL2 version of HQDM (hqdm.owl) is provided there are significant differences between HQDM as documented and its representation using OWL. Some comments have been provided in the OWL to illustrate the challenges.

  3. Type

    HQDM is documented using the Entity-Relationship EXPRESS data modelling language. Every HQDM Java Class maps to a HQDM EXPRESS Data Type. Every data object in an application using Magma Core is currently an instance of one HQDM Entity Type and in instance of the equivalent HQDM Java Class. Doing this was a practical policy decision. Future features of Magma Core may extend beyond this (see Issues List) but it illustrates the focus on ensuring that there is close to a 1:1 mapping between the HQDM Java Objects and the HQDM EXPRESS Data Types. Of course, there are many other uses of the term "Type" from its use in type theory for formal systems (providing a source of overlap with the other terms too), to the use of data types in programming languages and the W3C Linked Data Specifications. A familiar story continues to emerge; none of these uses of the term "type" is exactly equivalent and can be significantly different.

    Magma Core

    Care has been taken in Magma Core to ensure that HQDM Java Classes are consistent with the HQDM EXPRESS Entity types. Any other use of the term "type" may not match this. Take care! One benefit is that the goal of consistency is preserved, In addition, the hqdm:Thing, corresponding to the HQDM Thing Entity type is equivalent to owl:Thing. However, this equivalence requires careful treatment due to the aforementioned inconsistencies between the W3C Linked Data Specifications based on Description Logics and the structural commitments of HQDM based on its TLO and use of EXPRESS.