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

Add support for time dimensions #131

Open
bvssvni opened this issue Oct 29, 2020 · 2 comments
Open

Add support for time dimensions #131

bvssvni opened this issue Oct 29, 2020 · 2 comments

Comments

@bvssvni
Copy link
Contributor

bvssvni commented Oct 29, 2020

A time dimension is a special optimization knowledge in the accelerator that increases monotonically. This knowledge can be referred to, but not accessed by value at the language level.

Time dimensions are used in rules to control combinatorics.

For example:

(A, B)[t] :- (B, A)[t++].

Only patterns of (B, A) added after fact index t is matched against. When (B, A) is matched against, the fact index is used to update the time dimension t.

One can think about time as a resource, which is consumed step by step.

Time dimensions introduces unsoundness, because when shared, it introduces concurrency.

@bvssvni
Copy link
Contributor Author

bvssvni commented Oct 29, 2020

The motivation for time dimensions is to be able to "collect" stuff from facts and put them into lists.

For example:

// Collect all agents.
(collect, agents(X))[j=0] :- (X, agent)[i=0].
(collect, agents(X, Y))[j] :- (collect, agents(..X))[j++], (Y, agent)[i++].

Without the time dimensions, any possible list will be constructed, which is not what I want.

@bvssvni
Copy link
Contributor Author

bvssvni commented Oct 29, 2020

I believe it is possible to infer termination of rules based on time dimensions.

This assigns a termination state to a pattern, given by the left-side expression.
When this state is true, no further facts will be generated of this form.

Later, this might be used to create closed-world assumptions.

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

No branches or pull requests

1 participant