Skip to content

Commit

Permalink
Merge pull request #421 from vilterp/more-multi-support
Browse files Browse the repository at this point in the history
add an edge from the other side
  • Loading branch information
vilterp authored Sep 30, 2023
2 parents 4a9c528 + e80990d commit 0452e61
Showing 1 changed file with 70 additions and 1 deletion.
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

0 comments on commit 0452e61

Please sign in to comment.