Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define semantics of bindings used in consecutive accumulators #218

Open
rbrush opened this issue Aug 19, 2016 · 2 comments
Open

Define semantics of bindings used in consecutive accumulators #218

rbrush opened this issue Aug 19, 2016 · 2 comments
Labels

Comments

@rbrush
Copy link
Contributor

rbrush commented Aug 19, 2016

An ugly edge case came up here that we should work out:

#102 (comment)

I copied Will's comment here for convenience:

Using the existing topological sort to create the bindings without relying on the ordering seems reasonable. The part that still seems ambiguous to me with that behavior is what happens when you have something like

(defquery two-temp-conditions
       []
       [?t1 <- (acc/all) :from [Temperature (< temperature 20) (= ?location location)]
      [?t2 <- (acc/all) :from [Temperature (even? temperature) (= ?location location)])

Which accumulator should be required to create a ?location binding? This sort of case is something I'd like to mull on some tonight.

@WilliamParker
Copy link
Collaborator

A possible solution to this is discussed at [1]. I haven't done any work on it though apart from thinking about it enough to convince myself that the proposed solution would probably work. I think this will probably be simpler if we can keep it in the compiler (leaving the engine as is) and this approach would allow that.

  1. Accumulators with initial value may fire with unbound internal values. #102 (comment)

@mrrodriguez
Copy link
Collaborator

Yeah, this one is still interesting. However, I think it is less pressing than some of the other changes we have made to accumulators already. We have more than enough to release already I think. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants