-
I could use some help understanding some behavior I'm seeing. Given the facts and rule in the snippet below, I would expect to see an output where any value of Concretely, given the data below, I am expecting not to see any Any explanation on why I'm seeing what I'm seeing would be very helpful! .output Test
.decl Test(v: number, x: number, y: number, z: number)
Test2(v, x, y, z) :-
G(x, v, z),
// expected results to this point: v=2,6; x=1,5; y=; z=4,8;
D(_, y),
// expected results to this point: v=2,6; x=1,5; y=2,3,4; z=4,8;
!E(x, y, v).
// expected results to this point: v=2; x=5; y=3,4; z=4,8;
.decl D(var: number, var2: number)
D(1, 2).
D(2, 3).
D(3, 4).
.decl E(var: number, var2: number, var3: number)
E(1, 2, 3).
E(4, 5, 6).
.decl G(var: number, var2: number, var3: number)
G(1, 2, 4).
G(5, 6, 8). The output from
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, your comment is a bit misleading here, suggesting that any combination is possible:
The variable assignments can't be considered independently of each others.
I invite you to continue the reasoning in terms of tuples and you will eventually find that there is not tuple in |
Beta Was this translation helpful? Give feedback.
Hi, your comment is a bit misleading here, suggesting that any combination is possible:
The variable assignments can't be considered independently of each others.
Instead you have to think in tuples:
I invite you to continue the reasoning in terms of tuples and you will eventually find that there is not tuple in
E
that contradicts theTest
output.