CAP_project
CAP_project copied to clipboard
Remodel derivation mechanism
Since several issued with the derivation mechanism popped up recently, there should be a complete remodeling of the derivation mechanism. The following topics should be adressed:
-
Derivations should only happen when the category is finalized, not on the fly. A category is not guaranteed to function if not finalized anyway, so this is not a breaking change in any sense. Nevertheless, it is a change in the behaviour of categories and might need to different derivations triggered then now.
-
The previous point can lead us to getting rid of the final derivations all together. Each derivation should now possibly contain a set of exclusions, in addition to a set of requirements. This leads to the fact that all derivations will be like the current final derivations.
-
Derivations should be able to dependend on specific other derivations, not only on primitives. Some derivations make assumptions about how other primitives are derived. Those have to be installed in a group. It might not be flexible enough to actually group them, since some derivations in a group might work without the others in the group, and others wont.
To adress those changes, the following changes in the CAP kernel are necessary:
- [ ] Change the API for the derivations to be compatible with the one for final derivations, and remove final derivations.
- [ ] Change the method derivation graph to be able to work with the new requirements
- [ ] Change the algorithm that computes the derivations to compute a maximal tree in the derivation graph, where the term maximal might be still need discussion.
This issue is meant to track progress on this topic, and will be updated in the next few days, while I am working on implementing this feature.