1 Communication | 2 Elements | 3 Engine | 4 Small application | 5 Heavy application | 6 Download | 7 Notes |
7 Notes
7.1 Introduction
This notes section contains some detailed information about
- the semantic network CHI2 (7.2);
- the language Fonal (7.3)
- the user interface (7.4)
- client-server architecture (7.5).
7.2 Detailed example of the semantic network CHI2
The semantic network contains 3 binary relations:
Added to these three relations is a characteristic function which deals with production . It signals whether or not rhe right member of the ordered pair has been created as a result of the relation.
As in double bookkeeping, every relation is stored two sided. Starting with an arbitrary symbol, this double bookkeeping makes it possible, to reach any other stored symbol in at most 4 steps. By this feature the database can be used as a (associative) semantic network.
Instead of showing the formulas, an example is given. Figure 7.1 sketches a situation where a family doctor has referred a patient to a specialist for treatment. The (partial) image of the situation is stored in three tables each containing the relevant ordered pairs. The symbol numbers are choosen arbitrairy.
|
Figure 7.1: Basic tables |
C-table: Classifies
The first row contains the pair #01 #01. This may be read as #01 classifies
#01. This means that there is "something", namely symbol #01, that
classifies itself. This symbol is the class of classes. The word "class"
can be exchanged for its linguistic synonym "subject". Symbol #01 then
comes to represent the subject: subject.
Next, other subjects are classified:
the subject: names (#01 #02), the subject: persons (#01 #03),
etc. Then come actual instances of names, persons, patients, etc. The row #04 #20 may be read as
symbol #04 classifies symbol #20.
When one knows that #04 is the class of patients this row can also
be read as: Patient #20.
H-table: Has
The first line #14 #08 is read as symbol #14 has symbol #08. When one refers to the C-table this can be read as
person #14 has name #08.
After substituting the characters from #08 ('P1') this results in the statement
person
#14 has name 'P1'. If one agrees on the rule that an unquoted name
refers to the symbol with that name one can directly recognize symbol #14 by the
statement person: P1.
I-table: Is
This
table may also be termed the specialization/generalization table. The first row
in the I-table contains the pair #20 #14 which can be read as patient
#20 is person #14. You are probably thinking, if one symbol
is the same as the other then why must they be defined separately? The
answer is that what applies to the one does not necessarily have to apply
to the other. Take, for example, the statement Peter is a quick walker but
a slow student. "Quick" and "slow" are opposites and using them together
creates an antithesis. The person: Peter cannot be both quick and slow. If
"quick" is used in terms of his capacity as a walker (a separate symbol)
and "slow" in terms of his capacity as a student (another separate symbol)
then the antithesis ceases to exist. As a consequence any symbol in the image is
classified by one and only one subject.
Walks
It is quite possible
to make a walk through the tables. Figure 7.1 illustrates a walk through the
H-table (follow the red arrows). Note that the walk enters the table both at the
left and the right side. For each of the relations there are two words
that determine the direction of the walk. Moreover, every walk can start
from two sides. The next table lists the twelve possibilities in which In
is the set of symbols to start with and Out is the resulting set. The
last two walks are combinations. All walks are incorporated in the language by
means of prepositional phrases.
Relation |
Type |
Walk description |
Example |
Result |
Classify |
1 |
In Classifying Out |
Subject: Patient Classifying Symbols |
{#20, #21} |
2 |
Out Classifying In |
Subject Classifying Symbol #20 |
{#04} |
|
3 |
In Classified_by Out |
Symbol #20 Classified_by Subject |
{#04} |
|
4 |
Out Classified_by In |
Symbols Classified_by Subject: Patient |
{#20,#21} |
|
Has |
5 |
In With Out |
Patient #20 With FamilyDoctor |
{#22} |
6 |
Out With In |
Patients With FamilyDoctor #22 |
{#20,#21} |
|
7 |
In Of Out |
FamilyDoctor #22 Of Patients |
{#20,#21} |
|
8 |
Out Of In |
FamilyDoctor Of Patient #20 |
{#22} |
|
Is |
9 |
In ThereforeBeing Out |
Patient #20 ThereforeBeing Person |
{#14} |
10 |
Out ThereforeBeing In |
Patient TherforeBeing Person #14 |
{#20} |
|
11 |
In AlsoBeing Out |
Person #14 AlsoBeing Patient |
{#20} |
|
12 |
Out AlsoBeing In |
Person AlsoBeing Patient #20 |
{#14} |
|
|
In Being Out (9+11) |
Person #14 Being Patient |
{#20} |
|
|
Out Being In (10+12) |
Person Being Patient #20 |
{#14} |
|
Table 7.1: Typology of walks |
Statistics (21-5-2004)
The semantic network that comes with the software contains among other
things the book about the language, the book about the user interface and the
interface itself. With about 150 thousand symbols and 630 thousand ordered pairs
the image was shaped. On an average each symbol is connected to a 4.1 other
symbols. 681 subjects were used, each classifying about 221 symbols
(average).
Relation |
Ordered pairs |
Number of different symbols |
|
Left |
Right |
||
C-table |
150716 |
681 |
150716 |
H-table |
469557 |
144286 |
142229 |
I-table |
7693 |
7083 |
7217 |
Table 7.2 Statistics of the basic image that comes with the software |
These numbers may look impressive but compared to the human brain it is not. In the brain one finds billions of neurons (say symbols) and billions and billions of axons that connect the neurons. In this respect CHI2 has a modest size.
Scalability
The number of rows in each table does
not have a theoretical minimum or maximum. However practically there is a limit
to the size of the symbol domain. On a 32 bit computer the size of the domain is
230.symbols (a
bit more than a billion). The two missing bits are reserved for signalling the
position in a connection (left or right member) and the production of the
connection.
With respect to the image of the world, the purpose of
language is three fold
To prescribe the contents of the image
To express how one should navigate through the image
To express how one should execute orderly activities on the
image (procedures).
In this paragraph we will first discuss some functional elements of the communication cycle (parsing, recognizing, naming, phrasing). Second, a description is given of the language, its constituent parts and its ability to define itself. It should be noted that functionality and constituent parts are closely knit. For example, in order to parse, ex ante sentences have to exist; in order for sentences to exist one has to parse. For that reason the order in which the subjects are discussed is quite arbitrary.
7.3.1 Functional parts
Sentences
(ex ante) and parsing
A sentence is an utterance that prescribes which ordered pairs of symbols
must be part of the image. If certain pairs are missing the state of the image
is false. Take for example the following sentence and three instances of a
patient:
A Patient Always Is A Person
C(Patient, #20) C(Person, #14) I (#20,#14)
C(Patient, #21) C(Person, #15) I
(#21,#15)
C(Patient, #50)
For patients #20 and #21 the sentence is true.
For both symbols we find in the image an ordered pair in which the appropriate
connection between a patient symbol and a person symbol is made (the data come
from figure 7.1). For patient #50 such a connection lacks. Therefore the logical
state of the image is false. Parsing can be considered as a process in which
connections are added / deleted without violating the truth of the image as
defined by the sentences.
Sentences with the same main subject are grouped by a grammar. The parser will
apply the sentences in the order in which they are grouped. If a sentence is productive (see below) the parser recursively
continues with applying the sentences of the grammar of the right subject.
Sentences and naming / recognizing
How things are named is governed by naming rules. If one says Hello John
one does not greet the name 'John' but one greets the person that listens to
that name. In CommunSENS naming rules are associated with ex ante
sentences. By
specifying that a certain subject acts as a name giver, this information is used
whenever a symbol needs a name. To one type of symbol, more than one name giver
can be assigned. Moreover name giving can be recursive. The subjects name, text
and number are name givers by default. Encountering one of these subjects will
stop the recursion. Their default use is overruled if other name giving sentences
have been specified. The next four sentences give an example.
A Person Always Has A FirstName;
FirstNamegiver.
A Person Always Has A FamilyName; SecondNamegiver.
A FirstName Always Is A Name.
A FamilyName Always Is A Name.
The process of naming a symbol boils down to the assembly of strings that are
retrieved from the database in an order that is dictated by the relevant (nested)
sentences.
The process of recognizing works the other way around. Starting from symbols representing known strings the sentences are used from right to left (e.g. from name to first name; from first name to person). If there is more than one name giver, the resulting sets are intersected. If the final set is a singleton then there is unique recognition. If the final set contains more than one symbol then there is homonym recognition.
If a string of characters is offered to the parser, first a lexical analyses is performed to determine which names, texts or numbers the string contains. The actual recognition of the symbols that are referenced by the string is done during parsing. After all, it is only during the parse process that it is possible to retrieve the appropriate name giving sentences.
Sentences and identification
Suppose there are 100 different persons in the database with the name 'John'.
Still there is only one symbol that can represents that name. The question is:
how can one decide whether or not different symbols represent different
things? The answer can be found in two principles proposed by the German
philosopher Leibniz:
- the principle of equality of what can not be distinguished;
- the principle of not to distinguish of what is equal.
Loosely translated one can say that if symbol X has the same attributes as
symbol Y, both symbols represent the same.
Therefore one of them can be omitted. These principles are automatically applied
in CommunSENS to minimize redundancy.
However they also raise a problem when a symbol is updated. Because the updated
version is not the same as the original one the update action results in two
symbols. The problem is solved by specifying whether or not certain attributes
identify a symbol. Such a specification can be incorporated in the sentence that
prescribes the attribute.
A Person Always Has A FirstName; FirstNamegiver Identifier.
A Person Always Has A FamilyName; SecondNamegiver Identifier.
A Person Always Has A Salary.
In this example only the first name and the family name identify the person. Updating the salary attribute will not result in a different person. Symbols that are created by identifying sentences are called start symbols. Symbols that are created by non-identifying sentences follow the standard equality principles.
Sentences and
production
In creating an ordered pair the question arises: does the right member of
the connection have to exist or may it be created during the creation of the
connection. Whether or not a production is allowed can be expressed by the
sentence that prescribes the connection. In particular the determiner phrase (DP)
at the right side of the verb determines the production behaviour of the
sentence. If the DP contains the word 'of' the resulting pair contains an
existing right member; if it is omitted the right member is created. Two
examples:
No
production: A Child Always Has 1 Of The Mothers.
Production: A
Person Always Has 1 FirstName.
In most
cases, practical considerations determine whether or not to formulate a sentence
as productive or non-productive .
If the right member of a connection must exist it is called a terminal symbol.
If the right member may be created it is called a non-terminal symbol.
Sentences and phrasing
Phrasing is the process of putting symbolic information into words. It is
the reverse of parsing. Starting with a symbol, all
ex ante
sentences of the grammar of
the subject that classifies the symbol are retrieved. In the database, the
connected symbols are fetched. If the connection is productive, phrasing
continues recursively. If the connection is non-productive the name of the
symbol is retrieved and added to the output string.
7.3.2 Constituent parts and self definition
Fonal has been defined, loosely based on the language universals proposed by the linguist N. Chomsky (for an introduction see: Fromkin Victoria, Robert Rodman, An Introduction to Language. New York 1986). The definition files that accompany the software show a complete overview of the language. Therefore, at this place a summary is presented in which the main structure is sketched (see table 7.3) . Italic text indicates that the category is directly recursive (e.g. InstructionList Has InstructionList). All other phrases and the expression are indirectly recursive (e.g. NP of PP of NP). Syntactic categories in bold, can use the elements of the last row. An underscored category indicates a terminal symbol.
Grammar |
Procedures |
||||||||||
Sentence (S) |
Instruction lists (IL) |
||||||||||
Noun phrase (NP) |
Verb phrase(VP) |
Expression | Expression phrase (EP) | ||||||||
Adjective phrase (AP) | Default phrase (DEFP) | Determiner phrase (DP) | Prepositional phrase (PP) | Subject (noun) | Proper name phrase (PNP) | Verb quantor | Verb | NP | NP | ||
Adjective | Quantor phrase (QP) | Preposition | NP | ||||||||
Numbers, variables, operators, expressions, expression phrases, etc. | |||||||||||
Table 7.3: Language universals
|
The language universals make it possible to define Fonal by itself. Table 7.4 gives a mini language that contains all elements for self definition. If the verb is bold the sentence prescribes a non terminal connection otherwise a terminal connection.
Utterance |
Start subject |
Description |
1 |
SENTENCE |
Sentence Has NounPhrase |
2 |
SENTENCE |
Sentence Has VerbPhrase |
3 |
SENTENCE |
NounPhrase Has Subject |
4 |
SENTENCE |
VerbPhrase Has Verb |
5 |
SENTENCE |
VerbPhrase Has NounPhrase |
6 |
SENTENCE |
Subject Has Name |
7 |
SENTENCE |
Verb Has Name. |
8 |
SUBJECT |
'Subject'. |
9 |
SUBJECT |
'Sentence'. |
10 |
SUBJECT |
'NounPhrase'. |
11 |
SUBJECT |
'VerbPhrase'. |
12 |
SUBJECT |
'Verb'. |
13 |
SUBJECT |
'Name'. |
14 |
SUBJECT |
'VerbPhrase'. |
15 |
VERB |
'Has'. |
Table 7.4 Mini language |
Figure 7.2 shows the parse tree that is
created while parsing the first utterance of the mini language. The numbers in
the balloons indicate the utterance that is applied in order to create the
connection. The process starts with the parse string. This string begins with
the subject "SENTENCE". After the start subject is recognized, all
relevant sentences are retrieved from the database to be applied to the string.
In this case there are two relevant sentences that define a sentence: sentence
1 and 2. Note that sentence 1 is the very same utterance that is parsed. This
is meant by "self definition of the language".
The basic image of
the language is holistic.
One can not remove parts of it without destroying the image. If one removes
sentence 1 from the database there is no way to get it back because during the
parse process it will need itself.
|
Figure 7.2: Holistic parse tree |
Why does one need self definition? The
answer is: if language L has a set of syntactic rules R with a subset of meta
rules M, one only has to formulate the logic for parsing, phrasing, etc. for M
in order to apply them to R. If M is not a subset of R, there are 2 levels for
which to formulate the logic. Moreover we should additionally define a set of
meta meta rules to define the meta rules. This process will never stop unless
there is a set of (meta .... meta) rules that defines itself.
An other advantage of self definition is that the storage structure remains the
same. The following two sentences will both add similar ordered pairs to the
H-table of the database
A Sentence Always Has A
NounPhrase
A Child Always Has A Mother
The fact that the first pair expresses the relation between syntactic categories whilst the second expresses the relation between two human beings does not matter.
7.3.3 Symbols with predefined behaviour
Subject | Remarks |
Determiners | A, The, This |
Draw function | 1 of the. Governs production. |
Flow words | If, Then, Else, While, .... |
Instruction types | Nested, Successive |
Interpunction types | Opening, Closing |
Operator priority | P1, P2, ... P8 |
Operator reach | Unary, Binary |
Operator types | Numerical, Logical, Relational, ... |
Operators | +, -, *, ... Overloading possible |
Prepositions | With, Of, .. Determine walks through tables |
Quantor phrase types | Individual, Collective |
System parameters | Identifier, Default, .. |
Tree position | Left, Right |
Verb quantor | Always, Sometimes |
Verbs | Is, Has. Determine number of tables. |
Walk types | Evaluating, Collecting. |
Table 7.5
Symbols with predefined
behaviour
|
CommunSENS contains a complete, logical definition of the user interface in Fonal. This definition stands apart from the actual implementation of the interface on an computer or operating system. The visual structure of the user interface is based on the taxonomy of Borland's Visual Component Library which in turn rests on MS Windows. Two kinds of properties are distinguished. The first category deals with properties that determine the visual aspects of components as seen by the user. The second category is specifically designed for use with Fonal. These properties, called set events, deal with the way sets are retrieved, updated, changed etc. The next table shows the most important events that can be used to conduct the behaviour of components.
Set events | Generated at | Description |
OnGetSet | Server | Executes a noun phrase that retrieves the symbol set. F.e. 'All patients' |
OnGetChildren | Server | Executes a noun phrase that retrieves the node children for tree-like components |
OnGetParents | Server | Executes a noun phrase that retrieves the node parents for tree-like components |
OnSetChanged | Server | Executes a free expression when the set changes (symbols added or deleted) |
OnSelChange | Client | Executes a free expression when the selection changes. Moreover, it automatically updates the symbol stream for context sensitive components |
OnGetName | Server | Executes a procedure to get the name of a symbol |
OnGetColumnName | Server | Executes a procedure to get column information |
OnGetState | Server | Executes a free expression to get the perfect / imperfect state of a symbol |
OnSelUpdate | Server | Executes a free expression when a selected symbol has been updated |
OnCommit | Server | Executes 1 or more noun phrases to collect symbols that are affected by a committed information change |
OnClick | Client | Executes a free expression |
OnDblClick | Client | Executes a free expression |
Table 7.6 Most important events |
Table 7.7 shows which symbols of CommunSENS are specifically addressed in the DLL.
Subjects: Components |
||
CsTCheckListBox | CsTComboBox | CsTControlBar |
CsTForm | CsTImageList | CsTListView |
CsTMenuItem | CsTStatusBar | CsTStringGrid |
CsTTabSheet | CsTToolBar | CsTTreeView |
TComponent | TControl | TStatusBar |
TWinControl | ||
Subjects: Non Components |
||
TBrush | TCollectionItem | TControlScrollBar |
TFont | TIconOptions | TListColumn |
TMonthCalColors | TPen | TSizeConstraints |
TStatusPanel | ||
Subjects: Properties |
||
_ActiveControl | _ActivePage | _Align |
_AllocBy | _BorderStyle | _Caption |
_Chart | _ChildIndex | _Color |
_Columns | _CommonAVI | _ConstantName |
_ConstantSet | _ContextChild | _Date |
_DateTime | _Empty | _Enabled |
_Font | _Height | _Hint |
_Image | _Left | _NSeries |
_OleProps | _PageIndex | _Panels |
_Position | _SaveUserSelection | _ShadowImage |
_Text | _TextHeight | _Time |
_Top | _ViewStyle | _Visible |
_Width | ||
Subjects: Events |
||
OnActivePage | OnCheckChange | |
OnClickSS | OnCommit | OnCreateSS |
OnDblClickSS | OnDestroySS | OnDragDropSS |
OnExecuted | OnGetChildren | OnGetColumnName |
OnGetName | OnGetParents | OnGetSet |
OnGetState | OnSelChange | OnSelChanged |
OnSelDefault | OnSelUpdated | OnSetChanged |
OnTextChange | OnTextChanged | OnTextSelChanged |
OnTimerEvent | ||
Subjects Other |
||
AbstractConnection | ComponentMethod | ContextParent |
DesignParent | Enumeration | FileImageIndex |
HeightValue | Image | ImageLink |
LeftValue | NTList | TList |
TopValue | UserSelection | UserSetting |
WidthValue | ImageListIndex | OverlayImageIndex |
Subjects: Enumerations |
||
Category | Component, NonComponents | |
ImageLinkType | Selected, UnSelected | |
TColor | clRed, clBlack, clGreen, clBlue | |
TFontStyle | fsBold, fsItalic, fsUnderline | |
TFormBorderStyle | bsSizeToolWin, bsSizeable | |
Specific Forms |
||
FBuilder | FDefault | FDesign |
FForm | FImageList | FParser |
FProject | ||
Specific Components |
||
Images16 FImageList | ListView1 FSetting | ListView2 FDesign |
ListView2 FSetting | ListView3 FSetting | ListView4 FSetting |
Memo1 FMessages |