Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

Subscriptions #59

Open
timvieira opened this issue Jul 22, 2013 · 0 comments
Open

Subscriptions #59

timvieira opened this issue Jul 22, 2013 · 0 comments

Comments

@timvieira
Copy link
Collaborator

@jeisner writes on Issue #1:

@timvieira: We should probably scrap dumping then entire charts all together. Eventually (when we have backward chaining) many items won't be eagerly derived.

Yes, that's what I was saying above. We don't want to dump everything by default, and we probably don't want a special "chart" or "sol" command to do it either. I think the way to request a dump should just be "query X" or "query _". And whether this query is supported depends on mode analysis of the program.

@timvieira: Users probably want something more like subscriptions to certain queries.

Yes, now you're talking about dumping all changes that result from a given update. I agree that we should replace this practice too. Your idea of doing continuous queries is the right alternative. But I am not sure why you are assigning to a variable in your example. We already have query, vquery, and trace commands for ad hoc queries. Shouldn't you just be able to mark any one of those as continuous, perhaps with a "subscribe" command? So, something like this:

:- subscribe query bar.
:- subscribe query foo(_,Y)
    foo(...,"this") := 3.
    foo(...,"that) := 4.
:- bar += 1.
    updates to query bar
    ----------
    bar := 124.   % formerly 123
    ========== 
    updates to query foo(_,Y)
    ----------
    foo(...,"that") := null.   % formerly 4
    foo(...,"the other") := 7.  % formerly null
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant