bloom-lang/bud — Issue #255: dependency analysis rejects stratified notin
Author: jhellerstein
Created: 2011-10-25 06:37:42+00:00
State: open

Consider the following rules:

```ruby
path_buf <= link
path_buf <= (path*link).pairs(:to=>:from) {|p,l| [p.from, l.to]}
path <= path_buf.notin(:avoid)
```
Dependency analysis treats all the tables involved in notin as non-monotonic contributors to the head. So it marks the link between path_buf and path as non-monotonic, and the program is rejected as unstratifiable.

Thing is, the only negative dependency should be from "avoid" to "path". path_buf contributes positively to the path head.

This is a priority fix

Workaround is to avoid notin and use Ruby constructs like BudCollection#include?