Open Charles-Johnson opened 3 years ago
After further thought I've come up with some rules for modules that will prevent modules contradicting each other.
A module has a set of concepts that is mutually exclusive to any other module's set
A module can only define the composition of a concept in their set of concepts
A module can only define reductions for concepts that are composed of at least one concept from their set of concepts
A module's set of concepts contains those referenced by module's reductions that aren't concepts of other modules and all possible compositions of the concepts in the set.
Concept labels are namespaced by module
The
Context
type represents a collection of concepts that can depends arbitrarily on one another. This design becomes a problem as the context grows because the whole cache would have to be invalidated for any modify command and part of the context cannot be reused for another application.If the
Context
type could include dependencies which are alsoContext
types but read-only, the cache could be split by context with concepts able to depend on concepts in context dependencies