You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this feature in PR #291,
it can be seen by changing the config of ONA with #define CONCEPTS_MAX 3 on this NAL inputs:
a. :|:
b. :|:
c. :|:
*occurrence_time_index
Before Changing: #define CONCEPTS_MAX 16384
After Changing: #define CONCEPTS_MAX 3
Possible Cause
This may be because concepts are actually stored in PriorityQueue, and the occurrence time index simply stores Pointers to the corresponding address.
If a Concept is forgotten in the priority queue, ONA's mechanism is to "ignore the address of the forgotten concept", i.e. make this part of the "forgotten concept" invalid (not to use);
But in the function Memory_Conceptualize, concepts are forgotten and the corresponding HT_concepts and InvertedAtomIndex (essentially a HashTable<Key=Term, Value=LinkedList<Concept>>) are cleared, but OccurrenceTimeIndex is not processed. Therefore, it will store forgotten concepts (actually invalid) in OccurrenceTimeIndex.
Perhaps it is a question of how to manage the value lifetime of *Concepts, where they are used and where they are removed.
Potential Problem
The technical aspect of this problem is that forgotten concepts may appear at OccurrenceTimeIndex,
and when forgotten, the OccurrenceTimeIndex may stores outdated concepts (or, dangling Pointers).
If a new Concept is added to PriorityQueue, and PriorityQueue reuses memory space (in my opinion, this is enough for the entire ONA reasoner to be stored on the stack),
the concepts pointed to by the "pointers of outdated concepts" in OccurrenceTimeIndex will be overwritten.
Thus, the direct manifestation of the problem is: The "historical events (concepts)" stored at OccurrenceTimeIndex may undergo unexpected changes when forgetting concepts, causing its own "index of historical events" to become chaotic - a forgotten "archaic concept" suddenly becoming a more recent one. This will be directly reflected through OccurrenceTimeIndex_GetKthNewestElement;
This logic may continue to affect ONA's reasoning at the NAL-7 level during subsequent traverses of OccurrenceTimeIndex, which may produce unexpected reasoning results.
The text was updated successfully, but these errors were encountered:
Using this feature in PR #291,
it can be seen by changing the config of ONA with
#define CONCEPTS_MAX 3
on this NAL inputs:Before Changing:
#define CONCEPTS_MAX 16384
After Changing:
#define CONCEPTS_MAX 3
Possible Cause
This may be because concepts are actually stored in
PriorityQueue
, and the occurrence time index simply stores Pointers to the corresponding address.If a
Concept
is forgotten in the priority queue, ONA's mechanism is to "ignore the address of the forgotten concept", i.e. make this part of the "forgotten concept" invalid (not to use);But in the function
Memory_Conceptualize
, concepts are forgotten and the correspondingHT_concepts
andInvertedAtomIndex
(essentially aHashTable<Key=Term, Value=LinkedList<Concept>>
) are cleared, butOccurrenceTimeIndex
is not processed. Therefore, it will store forgotten concepts (actually invalid) inOccurrenceTimeIndex
.Perhaps it is a question of how to manage the value lifetime of
*Concept
s, where they are used and where they are removed.Potential Problem
The technical aspect of this problem is that forgotten concepts may appear at
OccurrenceTimeIndex
,and when forgotten, the
OccurrenceTimeIndex
may stores outdated concepts (or, dangling Pointers).If a new
Concept
is added toPriorityQueue
, andPriorityQueue
reuses memory space (in my opinion, this is enough for the entire ONA reasoner to be stored on the stack),the concepts pointed to by the "pointers of outdated concepts" in
OccurrenceTimeIndex
will be overwritten.Thus, the direct manifestation of the problem is: The "historical events (concepts)" stored at
OccurrenceTimeIndex
may undergo unexpected changes when forgetting concepts, causing its own "index of historical events" to become chaotic - a forgotten "archaic concept" suddenly becoming a more recent one. This will be directly reflected throughOccurrenceTimeIndex_GetKthNewestElement
;This logic may continue to affect ONA's reasoning at the NAL-7 level during subsequent traverses of
OccurrenceTimeIndex
, which may produce unexpected reasoning results.The text was updated successfully, but these errors were encountered: