Added some TODOs to Expr.

Right now, there is not a nice way to check that two expressions are
equal. It would be fun to implement this, though it may not be super
fast.
This commit is contained in:
Michael Whittaker 2021-01-31 17:47:35 -08:00
parent 32f5bb2125
commit 42e4296b04

View file

@ -55,6 +55,12 @@ class Expr(Generic[T]):
def quorums(self) -> Iterator[Set[T]]: def quorums(self) -> Iterator[Set[T]]:
raise NotImplementedError raise NotImplementedError
# TODO(mwhittaker): Add a function to return minimal quorums.
# TODO(mwhittaker): Add a function to check whether two expressions are
# equal. One simple way to do this is compare the set of minimal quorums.
# There might be more efficient ways to check if two expressions are equal.
def is_quorum(self, xs: Set[T]) -> bool: def is_quorum(self, xs: Set[T]) -> bool:
raise NotImplementedError raise NotImplementedError