This section is quite technical and explains how the memorization of paths is implemented.
It might seem simple, but since replacements can occur almost anywhere, careful thought is required.
Only what matters for our purpose is detailed here. For example, there are also fields for evaluation, date, and reports.
Improvementshas a reference to the best bubble and a depth rank.
We need to establish a graph of the "is an improvement of" relationship between texts.
Starting from the chosen text, we can trace the entire history of improvements.
A new table with 3 fields is used:
With the constraint that the pair of references is unique (see Study on an isolated bubbling).
This system requires chronology, provided by the record ID (which is saved in backups). It is also necessary to create a record for the initial bubble.
When attempting to save a pair that already exists, it indicates a loop. To remove the loop, all records from the same bubbling that follow the attempted deletion are erased.
This solution is economical and reliable. Economical because no additional information is added to existing elements, fields that would often remain empty. Reliable because all improvements are recorded (except loops, but they indicate circular movement, so they were unnecessary).
It might seem the solution is to add a "is an improvement of" reference in texts. However, a text can be an improvement in its own bubbling as well as in its parent bubbling, so a single reference is insufficient Double reference.
Thus, one bubble = one text. As long as there is no cycle, having a "is an improvement of" reference in a bubble (or a text, as they are the same here) poses no problem.
But loops can occur: for example, A improves B, which improves A (people can change their minds). In this case, information would need to be overwritten. However, overwriting information results in the loss of links to the original text. For example, (→ = "is an improvement of"): B → C → B → A
Here, if we overwrite as we go, B → C replaces B → A, leaving only B → C → B in the end. To avoid this problem, we refuse to overwrite a relation, effectively forgetting the loop, which is acceptable as it indicates circular movement.
General case. We’ve seen that the relationship cannot be stored in the text. Let’s try storing it in the bubble. But if we only store this relationship, as texts within bubbles can change, information is lost
The reference of X’s text at the time of improvement. Starting from the chosen "top" bubble A, its text is the chosen text. If A → B, then B is the former best bubble of the bubbling.
The text of B is not necessarily the text in B when A dethroned B, as B might have undergone improvements in the meantime, but there is a reference to B’s text at the time of the replacement.
However, loops of bubbles, which are not necessarily loops from the texts’ perspective since bubbles can be improved, are eliminated