Language, logic and data structures

With reference to systems

Copyright 2016 Graham Berrisford. One of about 300 papers at Last updated 11/02/2018 11:53


This paper is about languages actors use to communicate information.

The preceding paper is about how actors exchange meaningful information (descriptions, directions, decisions and requests for them).

The next paper looks at the fuzziness of descriptive types and instantiation of them.



Natural verbal language. 1

Domain-specific ontologies. 5

The use of language in systems. 10

Data structures. 13

In conclusion.. 15

Footnote: on ambiguities. 15


Natural verbal language

This paper starts by discussing natural language, before looking at how languages are formalised in system description and operation.

Key terms in this paper are:

·         A language is composed a vocabulary and a grammar.

·         A vocabulary is composed of words (nouns, verbs etc.) whose meanings are shared in a domain of knowledge (bounded context).

·         A word is an elementary unit of speech, used to form terms and sentences.

·         A term is word or group of words that function in a sentence as a subject, verb phrase or object.

·         A sentence is a set of words that is complete in itself, typically containing a subject and verb phrase, conveying a statement, question, exclamation, or command

·         A statement is a sentence that defines a subject term by a verb phrase, usually related to an object term.

·         A grammar is a set of rules for combining words and terms to form sentences.

Verbal language as an evolved form of description

Eventually, biological evolution led to humans with huge vocabularies and the ability to describe complex things using terms.

But a Darwinian explanation of description cannot start from verbal language, it has to start earlier.

The paper on description presented a seven-step story.


1.      Recognition

2.      Memory

3.      Learning

4.      Communication

5.      Verbalization of communications

6.      Mathematics and computing

7.      Artificial intelligence (AI)


The need to externalise descriptions emerged eons before humans and their languages.

Animals translate internal/organic mental models into and out of external/inorganic symbols.

They symbolise their thoughts include facial expressions, sounds (calls, barks, whistles), smells, movements, gestures and manipulated materials (e.g. nests).

And by doing this, even primitive animals share knowledge about food, friends and enemies, and signal mating intentions.


Having said that, humans share knowledge far beyond other animals, using verbal languages.

First, oral languages vastly increased the ability of human actors to immediately share their internal mental models.

Later, humans learnt to record those descriptions, for later inspection, in writing.


We are creatures of language, and language influences how we perceive and conceive things.

It isn't just that "the structure of a language affects its speakers' world view or cognition” <>

Human thinking, speaking and writing have co-evolved – mutually reinforcing each other.

I write what I think, I read it back and see it is wrong; it is like being able to listen to oneself talking.

Like a face-to-face discussion, writing helps us to consider, correct and refine what is said, and so hone in on a better description of reality.

Defining particular things using general types

Notice that to use a descriptive term is to go beyond the immediate thing and typify it.

“In describing a situation, one is not merely registering a [perception], one is classifying it in some way, and this means going beyond what is immediately given.”

Chapter 5 of “Language, truth and logic” A J Ayer.


We say that particular things instantiate (manifest, embody, exhibit, exemplify, or give values to) general concepts or qualities.



is to say the particular

exemplifies the general type

“The sky is blue”

sky overhead now



current situation



That’s how language works; we identify particular things and describe them with reference to general types.

We name things and describe them using type names such as “planet”, “dangerous”, “tall”, “blue” and “beautiful”.


Words come so naturally to us, we can’t get them out of our minds.

We communicate our thoughts orally, we record our thoughts in written records, digital messages and memories.

Moreover, we play with words; we use words to create new terms.

Abstraction from reality to verbal language

People often say: "The map of a territory is not the territory itself."

However, we can find a remote destination provided there are way markers or signposts along the way.

The signposts serve to embed a map of the territory in the territory itself.


Similarly, we can work in a domain of knowledge before learning the language used in that domain.

Provided that is, there are colleagues to explain each term as it arises.

The colleagues embed a description of the domain in the activities of that domain.


We use words to describe particular things in a territory; the words are encodings of ideas – they are idealizations.

We generalise from narrow categories to broader categories – which is called generalization.

This table illustrates generalization and idealization.


Generalization of description



Idealization into description




“Description of behavior

“Body in space”

“Rectangular room”

“Documentation of behavior


“Square living room”

“Symphony score”

A concrete reality identified as


My living room

A symphony performance


The first abstraction step from reality to description, may be called idealization.

Further abstraction steps, from more specific description to more generic description, may be called generalization.

However, the table is a simplification, because the two kinds of abstraction are entangled.

Idealization from a concrete thing to a name for it (e.g. Venus) is merely to label it.

Idealization from a concrete thing to a description of it (e.g. planet) is to generalise at the same time.

Natural language vocabulary

Since we use words loosely, we have devised dictionaries to help us.

In a dictionary:

·         A word is an elementary unit of speech, used to form terms and sentences.

·         A definition treats the word as a type name, and defines the meaning of a thing that instantiates that type.

·         A genus is a more general form of the thing defined.

·         A differentiator is a special feature that differentiates the thing defined from a more general form.


We use words to label family resemblances, and fix their meaning in the form of definitions.

This table contains examples of the dictionary definition convention called “genus plus difference”.



Dictionary definition (generic type + differentiators)


An animal that has feathers, has a beak and can fly.


A plane shape that has a boundary equidistant at every point from a fixed central point.


A bush that is woody, has thorns and has flowers.


A male that is mature and is unmarried.


A body in space that is large, is incandescent and is remote from other stars.


A body in space that is large and orbits a nearby star.


Dictionaries are designed for ease of use, meaning each entry should be understandable on its own.

They must continually be updated and modified to reflect changes in how terms are used.


It is in the nature of human discourse to use language in circular, fuzzy and fluid ways.

Surely, our brains connect ideas in a similarly circular, fuzzy and fluid ways.


Note that a vocabulary is defined using statements.

It is a stepping stone to the formation of more elaborate statements.

The grammar of natural language

It is possible to find logical grammatical structures in natural language statements.

In the example below, look at how the three adverbs are phrases that describe the when (time), where (space) and why (purpose or aim) of the verb.




The cat

Noun phrase (subject)

sat on

Verb phrase

the mat

Noun phrase (object)

last night

Adverb phrase

in the living room

Adverb phrase

for a rest.

Adverb phrase


Natural languages are biological rather than logical.

They give most of us enough communication capability to get by.

But a term can have several different meanings (e.g. “bird” can mean serving time in prison, and “flagging” can mean tiring, highlighting or bringing to a halt.)

The grammar we use is also loose.

We are far from Vulcans (like Spock) who think purely logically.

Experiments have shown people do not instinctively or readily understand formal logic.

So, our natural language expressions can be unclear or ambiguous.


Perhaps ambiguities in verbal communication are essential to life, since they lead to innovation.

“Evolution is the accumulation of small errors that turn out to be advantageous” (Steve Jones?)

However, natural language is not precise and rigorous enough to support all our endeavours, especially in business.

Domain-specific ontologies

Communication errors can severely hamper us in some situations.

Business systems, which standardise communications, perhaps with millions of customers, must minimise errors.


The term ontology has been used to label various ways of analysing and formalising language.

Here, an ontology relates to the subject matter in a domain of knowledge or bounded context.

And it is composed of two elements

·         Domain vocabulary – this fixes the meanings of terms in the domain of knowledge – defining terms in relation to each other term.

·         Domain statements – these are formed from terms in the vocabulary – they can describe both types and things in the domain of knowledge.


Note that the domain vocabulary is defined using domain statements.

It is a stepping stone to the formation of more elaborate domain statements.

Domain (bounded context) vocabularies

In formal documents, especially legal ones, it is important that terms are used in a precise, unambiguous, consistent and coherent way.

To this end, terms are defined in some kind of preface or glossary.

Enterprise data/information managers build business vocabularies, glossaries and data dictionaries with the same aim.


Strictly hierarchical vocabularies

Some strive to formalise their vocabulary in an inheritance tree.

At the top are a few axiomatic terms/types.

Second level terms are defined as subtypes that inherit from the axiomatic terms

And so on, the end product being a top-down hierarchical vocabulary of this kind.


An inheritance tree

Thing: a describable element of the universe.

Event: a thing that is a transient behavior, occurs in time.

Entity: a thing that is a persistent structure, locatable in space.

Organism: an entity that is an individual life form.

Plant: an organism that consumes carbon dioxide, produces oxygen.

Rose: a plant that is flowering, woody, thorny.


Strictly hierarchical vocabularies are of limited use, because it often turns out that:

·         a type inherits only some properties from a super type (in which case the super type is called polythetic).

·         a type inherits properties from several super types (this is called multiple inheritance).

·         the inheritance tree is fragile, it changes over time (an issue in naïve OO program design).


Sometimes even the top level classifying types are called into question.

E.g. entities and events may appear to be mutually exclusive, yet sometimes an event (cash withdrawal) is seen as an entity, or vice-versa.


Outside of mathematics and the like, language is often too fuzzy and fluid for a deep classification hierarchy.

And it is difficult to impose one hierarchical structure across several domains of knowledge (bounded contexts).


Semi-formal vocabularies

In business, terms like “Customer”, “Account” and “Policy” can mean surprisingly different things to different people.

Given that natural language is ambiguous and strict hierarchies are of limited use, how to build a semi-formal dictionary of terms?

One approach might be summarised along these lines:


1.      Form a panel of business people.

2.      Define some categories - some axiomatic/base/root terms - say Party, Person, Process, Product, Place, Point in time and Purpose.

3.      Introduce a term (say Customer) and perhaps give it a draft definition.

4.      Ask the panel to vote on the heading that best fits the new term.

5.      Place the term under the category the majority agree it fits best (though it may inherit also from other base terms).


At step 4 (if only intuitively) people look for properties of the new term that overlap with properties of the base terms.

Taking Customer as an example: perhaps a minority vote to classify it under Person and the majority vote for Party.


The result is semi-formal dictionary organised under a shallow and informal ontology.

The meaning of a term does not require exploration of a deep hierarchical ontology.

The term’s definition should be understandable on its own, supplemented by reference to its base term heading.


Enterprise-wide vocabularies

The difficulty for an enterprise-wide vocabulary is that different business domains have developed their own domain-specific languages.

Any two domains may use homonyms (one term with two meanings) and synonyms (two terms with the same meaning).


The enterprise-wide concern is:

·         data exchanged between business domains

·         data collated or aggregated from different business domains for management information.


To define that data, some kind of cross-domain dictionary is needed.

Consideration must then be given to how “name spaces” are distinguished and compound terms are used.


Naming terms

Data managers usually develop a naming standard for terms

It likely dictates how compound terms are formed using separators etc. E.g. Supplier-Purchase-Order-Number.


Defining the meanings of terms

There may be standard to ensure definitions are precise, unambiguous, consistent and coherent.

A definition may be supplemented and formalised by reference to the place of that term in an EAR model (see below).


Creating new terms

Business people may work with and around the synonyms and ambiguities of natural language.

But when digitising a business system, to disambiguate business language, new terms are sometimes needed.


Data management

Data stewards may be appointed not only to maintain the definitions of terms within designated knowledge domains.

But also to manage the confidentiality, integrity and availability of data values held by the organization.  

The grammar of domain statements

Statements are sentences that meaningfully define a subject to every actor who understands the language used.

Predicate logic gives us a simple grammar for forming such statements.

This table extends the one earlier, relating it to predicate logic.


Statement example


Predicate logic

The cat

Noun phrase


sat on

Verb phrase


the mat

Noun phrase


last night

Adverb phrase


in the living room

Adverb phrase


for a rest.

Adverb phrase



A predicate is a statement that may be true or false depending on the values of its variables.

In mathematics, the predicate on X may be expressed as P: X→ {true, false}.

In more natural language, a predicate is a verbal phrase, with or without an object, which states something about a subject.

The statement may be expressed in the form of a proposition or definition called a triple.

·         Subject: the particular thing or general type that is described.

·         Predicate: a verb or verbal phrase that either stands alone or relates the subject to the object.

·         Object: a particular thing or general type that is related to the subject, by the predicate.


Predicate statements may explain the domain of knowledge at a conceptual level.


Domain definition

Semantics: Types to types

Examples: Types to things

 “Subject” <predicate> “object”.

“Subject” <predicate> object.

“Person” <is also an> “Actor”.

“Blue” <is exemplified by> the sky on a cloudless day.

 “Rectangle” <is also a> “Quadrilateral”.

“Planet” <is embodied by> Venus.

“Square” <is also a> “Rectangle”.

“Beauty” <is exhibited by> my favourite film actresses.

“Mother” <is a co-parent with> “Father”.

“Class” <is instantiated by> an object.

“Customer” <may place an> “Order”.

“Circle” <is manifested in> a circus ring.


In the statements above and below, quotation marks are used to distinguish general types from particular things.

Wherever you read “name”, you may find it easier read that as “an instance of the type called “name”.

In spoken language, the type/instance distinction rarely troubles us; and in written language the quotation marks can be distracting.

So these papers italicise type names only where it seems helpful.


Predicate statements can also contain data, that is to say, contain assertions about concrete things in the domain of knowledge.


Domain data / assertions

Things to types

Things to things

Subject <predicate> “object”.

Subject <predicate> object

The man on the moped <is a> “thief”.

Mary Jones <was driving>.

This rectangle <is> “square”.

Mary Jones <was driving> the car.

This actress <is> “beautiful”.

He <stole> the phone Mary bought last week.

My mother <is a> “divorcee”.

My mother <is divorced from> my father.

Mary Jones <is a> “customer”.

Mary Jones <has placed> Order 99999


From ontology to epistemology

We obtain knowledge of reality through our perceptions of it and descriptions of it.

The aim of ontology is to define the scope of a domain of knowledge; its terms, concepts and categories, their properties and the relations between them.

Epistemology is the theory of knowledge, especially with regard to its scope and validity, and the distinction between opinion and justified belief.

So, how to test the validity of statements made using a particular ontology?


To decide whether a statement about a subject is true or false, you may choose from the following options:

·         test that the subject relates as described to the object by logical analysis (as in mathematics)

·         test that the subject relates as described to the object by physical measurement

·         devise experiments or test cases, run tests, and compare results with predictions

·         ask a judge or jury to examine the subject, and give a verdict.


Aside on formal ontology languages

This paper is wider and less formal than a formal ontology language.

The W3C Web Ontology Language (OWL) is a Semantic Web language designed to represent knowledge about things, groups of things, and relations between things.

If you want to see example of a formal ontology, you can find on in the document <>.

The use of language in systems description

The table below extends the one shown earlier, relating it to analysis structures used in enterprise architecture.


Statement example


Predicate logic

Systems analysis

System theory

The cat

Noun phrase



Active structure

sat on

Verb phrase



Process or behavior

the mat

Noun phrase



Passive structure

last night

Adverb phrase



Position in time

in the living room

Adverb phrase



Position in space

for a rest.

Adverb phrase



Purpose or aim


This paper discusses the use of terms in two system contexts.


Using terms in the design-time definition of a system.

System architects describe systems using verbal languages and quasi-verbal diagrams.

First, they must be able to conceptualise and record a system description on their own.

Then, they must be able to discuss system descriptions, since their job involves creating a shared understanding.


Using terms in the run-time communication acts of a system

Human social systems depend on human actors using terms to communicate

Business systems have evolved over millennia by formalising social systems.

Formalization involves standardising the meanings of terms in communications.

This table illustrates the formalization of business vocabulary.


Business system




These terms are type names - roles instantiated by many different actors

Place Order

Send Invoice

These are also type names - communication acts instantiated countless times.

Send Payment

Send Receipt


Disambiguating, standardising and formalising the use of language is important to business system success.

This paper discusses the definition of terms used in communications, and in data structures contained in messages and memory spaces.

Abstraction of a general system description from particular behaviors

Consider the peculiarly human situation that is the telling of a particular joke.


A particular/real joke



Knock knock

Who’s there?


Ivan who?

No, Ivanhoe



You surely recognise this as a knock knock joke, and would describe it as one.

That is to go beyond what is immediately given, and classify the joke.

Thus, you abstract from the particular thing to a general type.

This table documents that abstraction, putting the variable names in italics.


The general/universal joke

Actor in initiator role

Actor in responder role

Knock knock

Who’s there?


Name who?

Name elaboration



In short, realities do not have descriptions, awaiting discovery.

Rather, describers create descriptions to help them understand and predict realities.

They abstract a general or universal type from properties shared by similar things.


(Some may call the philosophy in these papers “critical realism”; others may call it “idealism”.

It doesn’t matter which label you attach it.)

General types used in system description

Our ability to communicate verbally hugely amplifies the intelligence nature gave us.

It enables us to collaborate with others in complex projects to do complex things and create complex objects.

However, to specify complex systems we need more formal domain-specific languages.

And this table shows some general concepts that appear in all kinds of system.



Generic type + differentiators


A describable element of the space-time continuum


A thing that happens in time


A thing that exists in space

Active structure

A structure that can act; can perform a behavior

Passive structure

A structure that is acted upon by a behavior


This table defines element types generally used to define systems (cf. the ArchiMate standard).


Academic definition

Practical system architecture definition


Active structure

A structure that can act; can perform a behavior.

An actor (a person, organization or component) that can take a role, respond to events and perform behaviors.

It has a current state and relationships to other system elements.



A thing that happens in time

A process that changes or inspects the state of one or more structures.

It runs from start to end according to some rules (of logic or law).


Passive structure

A structure that is acted upon by a behavior

An object that is acted on; it may be created, moved, changed or destroyed

It has a current state and relationships to other system elements.


Position in time

When in time a behaviour happens

A date, time or event that triggers an actor to perform a behaviour.


Position in space

Where in space a structure exists

A place where a structure is found or a behaviour occurs.


Purpose or aim

A motivation for one or more behaviors.

A motivation for one or more behaviors.

Idealization of system description types from particular things

Every abstract system description features general types of things.

Every concrete incarnation of a system features particular things.

It possible to use different terms for the types and the things, as in this table (cf. the UML standard).



General type in an

abstract system description

Particular thing in a

concrete system realization

which each



Active structure type, or role

An actor, component or node

take a role, respond to events and perform behaviors

Passive structure type

An object that is acted on

may be created, moved, changed or destroyed.




An occurrence

triggers an actor to perform a behaviour.


A performance

inspects or changes the state of one or more structures


This is rather a theoretical exercise, since people commonly use same term for type and thing.

E.g. people use the term actor when they mean role.

Data structures

Suppose you build a domain-specific vocabulary for a business.

And that business needs data to help it monitor and direct things describable using the terms in that vocabulary.

Then, your domain-specific language can be further formalised in the definition of data structures.


There are two kinds of data structure:

·         The data structure of a shared memory space can be defined in an entity-attribute-relationship (EAR) model.

·         The data structure of a message can be defined using a regular expression.

The grammar for a data structure in a shared memory space

A shared memory space can contain a data structure that can be read from any starting point, in any direction.

You can use predicate logic to define the logical data structure in a shared memory space of that kind.


Entity-attribute-relationship models (aka EAR models, logical data models, class diagrams)

(It is a pity people have taken to using the term “class diagram” here.

The concern of ontology is the types in a domain-specific language, rather than classes in the object-oriented software sense.

Unfortunately, people draw EAR models using UML tools designed for modelling classes of an object-oriented program.)


An EAR model describes a stored data structure using the conventions of predicate logic.

The model is nothing more or less than a collection of predicate statements about general types.

It includes important information about the cardinality (one or manyness) of things at ether end of an association relationship.


An entity type <has or relates to> an attribute type or entity type.

·         “Customer” <has> the attribute type “Address”.

·         “Customer” <is also a> “Business party”.

·         One “Customer” <may place> many “Orders”.

·         One “Order” <is placed by> one and only one “Customer”.


It should be possible to build a separate EAR model for each coherent business domain or bounded context.

But it is usually impossible to build an enterprise-wide EAR model.

(Unless one retreats from business-specific language to the level of generalizations not used in practice.)



A relational database is nothing more or less than a set of assertions about particular things in a domain or bounded context.


An entity instance <has or relates to> an attribute type or entity type.

·         The customer 999 <has> the attributes “name” and “address”.

·         The customer 999 <pays> “invoices”.


An entity instance <has or relates to> an attribute value or entity instance.

·         The customer 999 <has> the address 30 High Street.

·         The customer 999 <is due to pay> invoice 9999.


Aside on the semantic web

The semantic web is based on using predicate logic to relate web resources.

The idea is that the subject, the predicate (and perhaps the object also) are identified using domain names or URIs.

However, the vision of a world-wide semantic web (implying a stable global domain-specific vocabulary) seems incredible.

“The reality isn't a linked data web of interconnected resources.

More real is a set of linkable data - marked up or stored in some queryable format, selectively findable and accessible via tools”

The grammar for a data structure in a message

A message is a serialised data stream, a sequence of elements, which can be pushed down a communication channel.

You can use the grammar of a “regular expression” to define the logical data structure in a message.

The logic can be limited to three simple constructs – sequence, selection and iteration.



A simple notation

Meaning that


Element X [Element A > Element B > Element C]

Element X contains three elements in that order.


Element X [Element A OR Element B OR Element C]

Element X contains one of three optional elements


Element X*

Element X is repeated zero, one or more times


The following example illustrates the definition of a message with all three constructs:

·         Message [Single Name OR Long Name [Forename > Middle Name* > Surname]].

In conclusion

Disambiguating, standardising and formalising the use of language is important to business system success.

This paper has discussed the definition of terms used in communications, and data structures contained in messages and memory spaces.

It started at the beginning, with how natural language works.

Footnote: on ambiguities

Remember the convention used in this paper.

Where the subject/object name = name, that is the name of a particular thing.

Where the subject/object name = “name” = that is the name of a type called “name”.


The “is a” relationship

The ambiguity of the <is a> relationship is notorious, since it appears in two kinds of proposition.

·         A thing <is an> instance of a type.

·         A type <is a> subtype of another type.


Consider: This particular rectangle <is a> “square”. Here, <is a> means <is an instance of> or <embodies> or <gives values to the properties of> the type named “square”.

Consider: “Square” <is a> “rectangle”. Here, <is a> means <is a kind of> or <is a subtype of> or <shares or extends the properties of> the type named “rectangle”.


The “is” relationship

The <is> relationship is also ambiguous since it appears in two kinds of proposition.

·         A Thing <is> Value (meaning – the thing has an attribute with that value, instantiates an attribute type with that value).

·         A Thing <is> Type (meaning – the thing embodies that type).


Consider: The sky <is> blue. Here, <is> means the sky has a colour attribute with the value blue.

Consider: This rectangle <is> “square”. Here, <is> means this rectangle instantiates the type named “square”.


On states of a finite state automata as types

Consider a natural thing you know that has four states typified as: egg, caterpillar, pupae and butterfly.

This is a Finite State Automaton (FSA); meaning it is has one state at a time, but two or more states over time.

We can define this as one type with four different states.

Or else define it as four different types (so one thing changes from one type to the next).

And if we design an FSA, then modify it during the life of a thing that instantiates it, then that thing must adopt the behavior of the second, different, type.



All free-to-read materials on the Avancier web site are paid for out of income from Avancier’s training courses and methods licences.

If you find them helpful, please spread the term and link to the site in whichever social media you use.