Added concept 'isa' other_concept functionality

This commit is contained in:
2019-12-21 22:02:07 +01:00
parent 2474b08150
commit a683d4cd42
13 changed files with 489 additions and 61 deletions
+59 -3
View File
@@ -81,8 +81,8 @@ So, you could call the concept by
They will produce the strings "hello kodjo" or "hello my friend"
About versioning
""""""""""""""""
About versionning of the information
"""""""""""""""""""""""""""""""""""""
As I said previously, I mimic how git_ versions its objects.
::
@@ -597,4 +597,60 @@ Like in regular expressions, you will also find
For those who doesn't know that BNF stands for, please have a look at the bnf_
wikipedia page.
I guess that I will need a complete chapter to explain how you retrieve what was parsed
I guess that I will need a complete chapter to explain how you retrieve what was parsed
2019-12-21
**********
Implementing Inheritance
""""""""""""""""""""""""
Except that it is not inheritance, at least the way it is seen in modern programing languages.
I think that I should first express what I am trying to do. I guess that it will help me
have a better understanding myself.
::
def concept one as 1
def concept two as 2
one is a number
two is a number
When I enter :code:`one`, the result should be :code:`1`
But I should be able to express other concepts by using
::
def concept a plus b where a is a number and b is a number as a + b
Just by reading what I have just written, we can see that 'is a' has two separate meanings.
In the first usage, it's an affirmation, in the latter one, it's a question.
Should we consider them as the same concept, with two usages, or as two separate concepts,
which are somehow linked ?
As of now, there is only one usage to all concepts, which is the property 'BODY', but I have
prepared the property 'PRE' which can be used for that.
I am a little bit making a digression. The original subject was on how I can express that a
concept is an element of another concept. We may focus on the implementation later.
So saying that 'one' is a 'number' means that there is a set called 'number'
in which 'one' belong.
The simple implementation will be to create an entry 'all_number' in sdp and to add 'one' in it.
The two issue that I foresee are:
* What about infinite sets ? (my set 'number' can never be completed if I put the item one by one)
* What if the same name refers to different set (I don't have any example in mind, but I guess that synonyms of sets do exist)
For the two questions, I will first try the simple implementations and see there I go from there. ie :
* on the top of the entry all_numbers which lists the known numbers, you can define concepts :code:`is a number`
that can be also used to detect the the concept is part of the set
* the entry in sdp will not be all_number, but all_id_of_number. I will use the concept id instead of its name