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 an edge from the other side #421

Merged
merged 1 commit into from
Sep 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 70 additions & 1 deletion core/incremental/testdata/transitiveClosureMultiSupport.dd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,41 @@ entry{mult: 2, term: reach{from: "a", to: "b"}}.
entry{mult: 2, term: reach{from: "b", to: "c"}}.
entry{mult: 2, term: reach{from: "c", to: "b"}}.

edge{from: "d", to: "c"}.
----
incremental-datalog/trace
edge: [edge{from: "d", to: "c"}+1]
1: [{A: "d", C: "c"}+1]
2: [{A: "d", B: "c"}+1]
0: [{A: "d", C: "c"}+1]
4: [{A: "d", B: "c", C: "b"}+2, {A: "d", B: "c", C: "c"}+1]
5: [{A: "d", C: "c"}+1]
0: [{A: "d", B: "c", C: "b"}+2]
0: [{A: "d", B: "c", C: "c"}+1]
reach: [reach{from: "d", to: "c"}+1]
5: [{A: "d", B: "c", C: "b"}+1]
5: [{A: "d", B: "c", C: "c"}+1]
3: [{B: "d", C: "c"}+1]
reach: [reach{from: "d", to: "b"}+1]
reach: [reach{from: "d", to: "c"}+1]
4: []
3: [{B: "d", C: "b"}+1]
3: [{B: "d", C: "c"}+1]
4: []
4: []

.multiplicities reach
----
application/datalog
entry{mult: 1, term: reach{from: "a", to: "c"}}.
entry{mult: 1, term: reach{from: "b", to: "b"}}.
entry{mult: 1, term: reach{from: "c", to: "c"}}.
entry{mult: 1, term: reach{from: "d", to: "b"}}.
entry{mult: 2, term: reach{from: "a", to: "b"}}.
entry{mult: 2, term: reach{from: "b", to: "c"}}.
entry{mult: 2, term: reach{from: "c", to: "b"}}.
entry{mult: 2, term: reach{from: "d", to: "c"}}.

-edge{from: "a", to: "b"}.
----
incremental-datalog/trace
Expand Down Expand Up @@ -159,8 +194,10 @@ reach: [reach{from: "a", to: "b"}-1]
application/datalog
entry{mult: 1, term: reach{from: "b", to: "b"}}.
entry{mult: 1, term: reach{from: "c", to: "c"}}.
entry{mult: 1, term: reach{from: "d", to: "b"}}.
entry{mult: 2, term: reach{from: "b", to: "c"}}.
entry{mult: 2, term: reach{from: "c", to: "b"}}.
entry{mult: 2, term: reach{from: "d", to: "c"}}.

-edge{from: "b", to: "c"}.
----
Expand Down Expand Up @@ -194,13 +231,22 @@ reach: [reach{from: "c", to: "b"}-1]
reach: [reach{from: "c", to: "c"}-1]
3: [{B: "c", C: "b"}-1]
3: [{B: "c", C: "c"}-1]
4: []
4: [{A: "d", B: "c", C: "b"}-1]
4: [{A: "d", B: "c", C: "c"}-1]
0: [{A: "d", B: "c", C: "b"}-1]
0: [{A: "d", B: "c", C: "c"}-1]
5: []
5: [{A: "d", B: "c", C: "c"}-1]
reach: [reach{from: "d", to: "c"}-1]
3: [{B: "d", C: "c"}-1]
4: []

reach{}?
----
application/datalog
reach{from: "c", to: "b"}.
reach{from: "d", to: "b"}.
reach{from: "d", to: "c"}.

-edge{from: "c", to: "b"}.
----
Expand All @@ -213,6 +259,29 @@ edge: [edge{from: "c", to: "b"}-1]
5: [{A: "c", C: "b"}-1]
reach: [reach{from: "c", to: "b"}-1]
3: [{B: "c", C: "b"}-1]
4: [{A: "d", B: "c", C: "b"}-1]
0: [{A: "d", B: "c", C: "b"}-1]
5: [{A: "d", B: "c", C: "b"}-1]
reach: [reach{from: "d", to: "b"}-1]
3: [{B: "d", C: "b"}-1]
4: []

reach{}?
----
application/datalog
reach{from: "d", to: "c"}.

-edge{from: "d", to: "c"}.
----
incremental-datalog/trace
edge: [edge{from: "d", to: "c"}-1]
1: [{A: "d", C: "c"}-1]
2: [{A: "d", B: "c"}-1]
0: [{A: "d", C: "c"}-1]
4: []
5: [{A: "d", C: "c"}-1]
reach: [reach{from: "d", to: "c"}-1]
3: [{B: "d", C: "c"}-1]
4: []

reach{}?
Expand Down
Loading