Open Calvin-L opened 6 years ago
i am also thinking about a proposal in which we can have a clean & well-defined interface between the core synthesis engine and plug-in-types.
A starting point you might consider: The _register
procedure already allows you to extend Cozy with additional types. The heaps code is connected to the rest of Cozy using that mechanism.
What we are missing is a clean interface; one quick way to make progress would be to create an abstract class with all the methods of the Heaps
object and have Heaps
and other subclasses extend it.
The code for heaps is more or less entirely contained in
heaps.py
. I like how this design worked out, and I think it would be worth moving the code related to maps (er, hash maps, not map-function-over-collection) to a similarmaps.py
file.