#DBToaster's Aggregate Calculus has a feature that I never paid much attention to before: It has well-defined evaluation logic for not only classical bottom-up ('compute a relation from the inputs') query evaluation, but also a more provenance-y top-down ('compute the value of a specific tuple') semantics. The latter is faster, as it avoids collection operations... but requires first computing the query's support. However, in some cases, the support is bounded and known at compile time...