Skip to content
This repository has been archived by the owner on Aug 10, 2019. It is now read-only.

Unify lattices in C++ under a single template #120

Open
jhellerstein opened this issue Jun 11, 2019 · 1 comment
Open

Unify lattices in C++ under a single template #120

jhellerstein opened this issue Jun 11, 2019 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jhellerstein
Copy link
Contributor

This has proven difficult/impossible. As a result, adding Anna lattice types requires recompilation, and potentially code changes.

@vsreekanti vsreekanti added enhancement New feature or request help wanted Extra attention is needed labels Jun 12, 2019
@vsreekanti
Copy link
Member

The gist of the problem is that our KVS has an abstract superclass, Lattice<T>. There are many subclasses of Lattice, such as BoolLattice, SetLattice<S>, etc. (which are Lattice<bool>, Lattice<std::unordered_set<S>>, and so on). To write a KVS get method that returns a Lattice*, it seems like you can't have a return type without the type template uninstantiated, which functionally means that you need to have a separate type signature for get for every lattice type, which is potentially large because we want to take advantage of lattice composition.

The only solution I can come up with for this is removing the type template and simply relying on class hierarchies for type checking, but we lose typechecking of compositions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants