Drasil icon indicating copy to clipboard operation
Drasil copied to clipboard

Examining Chunks for Future Refactoring

Open balacij opened this issue 9 months ago • 1 comments

Problem

Working with our existing chunk organization is difficult to work for a number of reasons, but the major issue is the design. Currently, the design is inconsistent, the organization is confused, they confuse different kinds of knowledge necessary for Drasil's various facilities. Additionally, the design has not kept up with what we think about Drasil and how knowledge should be gathered and organized. Overall, the chunks need to be redesigned.

Objective

To redesign and rationalize Drasil's chunks.

Plan

The plan is fairly obvious, at the least for the start:

  1. Diagram them. Diagramming them will let us take ignore the code and focus on the greater organization. A tool like Mermaid UML class diagrams should be helpful for this. The diagram should contain information about:
    1. The typeclasses we form and which chunks satisfy which typeclasses.
    2. Which chunks are "standalone" vs "nested"/Which chunks are allowed to inherit a UID from another.
    3. Which chunks deeply embed other chunks (a bad thing! they should exclusively carry references).
  2. Analyze them and plan refactoring. TODO.
  3. Refactor them. TODO.
  4. Document them. TODO.

Tracking Status

1. Diagramming

  • [ ] drasil-lang:
    • [ ] IdeaDict -- #4030
    • [ ] ConceptChunk, ConceptInstance -- #4031
    • [ ] ?
  • [ ] ?

2. Analyzing

TODO.

3. Refactoring

TODO.

Note

This ticket is probably related to a ton of other issues in our issue tracker. Being mindful of them is probably good, but only after we've examined the existing structures.

balacij avatar Mar 26 '25 19:03 balacij

Since this kind of work is very time-consuming, @JacquesCarette @smiths, I'm going to wait until you've both reviewed #4030 and #4031 to make sure what I'm doing is good + should be continued. For drasil-lang, the goal will be that I, in tandem:

  1. Move things from Language.Drasil namespace to Drasil.$X$ namespace, where $X$ is something more appropriate than whatever it is currently under.
  2. Document the related chunks and typeclasses in a Mermaid UML diagram.

This scheme will be followed for all packages.

balacij avatar Mar 26 '25 19:03 balacij