Open Calvin-L opened 7 years ago
can I work on this issue?
If you know what to do, then certainly. Please open a pull request with the fix. Thanks!
@Calvin-L I will help working out sort
method for List
type. I guess I need to:
@Calvin-L Does "devise a good state maintenance sketch" mean that one exists that is not good, or that none exists? (Also, in what file would that go? In state_maintenance.py
? I didn't see anything about lists in there now.)
Currently none exists. As a result, Cozy falls back to the default maintenance sketch, which is to recompute from scratch.
Right now specifications can have bags (i.e. multisets) and sets. Cozy can use lists in output implementations, but having lists in specifications would also be useful: often the order of insertion is important. This comes up especially in caches that employ least-recently-used eviction.
Wishlist:
List<_>
typexs[i]
plus the usual operators (min
,empty
, ...)xs[start:end]
sort xs
to sort by natural order andsort {\x -> f(x)} xs
to sort by another propertyadd_front
,add_back
,remove_front
, andremove_back
update operations (we may also wantremove
to remove an instance of a given element from the list)