Example Program: Shortest path distance(Start, Y) min= distance(Start, X) + edge(X, Y). distance(Start, Start) min= 0. Variables not present in the head of an expression are aggregated over like with the dot product example. 6
Example Program: Shortest path distance(Start, Y) min= distance(Start, X) + edge(X, Y). distance(Start, Start) min= 0. Here the “ min=“ aggregator only keeps the minimal value that we have computed 6
Example Program: Shortest path distance(Start, Y) min= distance(Start, X) + edge(X, Y). distance(Start, Start) min= 0. edge("a", "b") = 10. edge("b", "c") = 2. edge("c", "d") = 7. 6
Example Program: Shortest path Dyna programs are equivalent to the set of values they distance(Start, Y) min= distance(Start, X) + edge(X, Y). define distance(Start, Start) min= 0. Start Y distance(Start, Y) edge("a", "b") = 10. "a" "a" 0 edge("b", "c") = 2. "a" "b" 10 edge("c", "d") = 7. "a" "c" 12 "a" "d" 19 "b" "b" 0 "b" "c" 2 "b" "d" 9 "c" "c" 0 "c" "d" 7 6 "d" "d" 0
Example Program: Shortest path distance(Start, Y) min= distance(Start, X) + edge(X, Y). distance(Start, Start) min= 0. Defined for all cases where both Start Y distance(Start, Y) edge("a", "b") = 10. arguments are "a" "a" 0 edge("b", "c") = 2. "a" "b" 10 equal edge("c", "d") = 7. "a" "c" 12 "a" "d" 19 "b" "b" 0 "b" "c" 2 Start distance(Start, Y) Y "b" "d" 9 "foo" "foo" 0 "c" "c" 0 7 7 0 "c" "d" 7 3.1415 3.1415 0 6 "d" "d" 0
Shortest Path (cont.) distance(S, S) = 0. 7
Shortest Path (cont.) distance(S, S) = 0. S Y distance(S, Y) "foo" "foo" 0 7 7 0 3.1415 3.1415 0 7
Shortest Path (cont.) distance(S, S) = 0. S Y distance(S, Y) ሼ 𝐵𝑠 1 , 𝐵𝑠 2 , 𝑆𝑓𝑡𝑣𝑚𝑢 : 𝐵𝑠 1 = 𝐵𝑠 2 𝐁𝐎𝐄 𝑆𝑓𝑡𝑣𝑚𝑢 = 0ሽ "foo" "foo" 0 7 7 0 3.1415 3.1415 0 7
Shortest Path (cont.) distance(S, S) = 0. S Y distance(S, Y) ሼ 𝐵𝑠 1 , 𝐵𝑠 2 , 𝑆𝑓𝑡𝑣𝑚𝑢 : 𝐵𝑠 1 = 𝐵𝑠 2 𝐁𝐎𝐄 𝑆𝑓𝑡𝑣𝑚𝑢 = 0ሽ "foo" "foo" 0 7 7 0 3.1415 3.1415 0 7
Shortest Path (cont.) distance(S, S) = 0. S Y distance(S, Y) ሼ 𝐵𝑠 1 , 𝐵𝑠 2 , 𝑆𝑓𝑡𝑣𝑚𝑢 : 𝐵𝑠 1 = 𝐵𝑠 2 𝐁𝐎𝐄 𝑆𝑓𝑡𝑣𝑚𝑢 = 0ሽ "foo" "foo" 0 7 7 0 3.1415 3.1415 0 Tuple of Named Variables 7
Shortest Path (cont.) distance(S, S) = 0. S Y distance(S, Y) ሼ 𝐵𝑠 1 , 𝐵𝑠 2 , 𝑆𝑓𝑡𝑣𝑚𝑢 : 𝐵𝑠 1 = 𝐵𝑠 2 𝐁𝐎𝐄 𝑆𝑓𝑡𝑣𝑚𝑢 = 0ሽ "foo" "foo" 0 7 7 0 3.1415 3.1415 0 Executable Code Defines the Rule Tuple of Named Variables 7
Shortest Path (cont.) distance(S, S) = 0. S Y distance(S, Y) ሼ 𝐵𝑠 1 , 𝐵𝑠 2 , 𝑆𝑓𝑡𝑣𝑚𝑢 : 𝐵𝑠 1 = 𝐵𝑠 2 𝐁𝐎𝐄 𝑆𝑓𝑡𝑣𝑚𝑢 = 0ሽ "foo" "foo" 0 7 7 0 3.1415 3.1415 0 Executable Code Defines the Rule Tuple of Named Variables distance(S, Y) = distance(S, X) + edge(X, Y). 7
Shortest Path (cont.) distance(S, S) = 0. S Y distance(S, Y) ሼ 𝐵𝑠 1 , 𝐵𝑠 2 , 𝑆𝑓𝑡𝑣𝑚𝑢 : 𝐵𝑠 1 = 𝐵𝑠 2 𝐁𝐎𝐄 𝑆𝑓𝑡𝑣𝑚𝑢 = 0ሽ "foo" "foo" 0 7 7 0 3.1415 3.1415 0 Executable Code Defines the Rule Tuple of Named Variables distance(S, Y) = distance(S, X) + edge(X, Y). Because of recursion, it can not be expressed using the set builder notation 7
distance(Start, Y) = edge(X, Y) + distance(Start, X). 8
distance(Start, Y) = edge(X, Y) + distance(Start, X). Normalize with standard names for all arguments Result is distance(Arg1, Arg2) :- Result = edge(Arg2, X) + distance(Arg1, X). 8
distance(Start, Y) = edge(X, Y) + distance(Start, X). Result is distance(Arg1, Arg2) :- Result = edge(Arg2, X) + distance(Arg1, X). R-expr to Call (E is edge(Arg2, X)) function by name 8
distance(Start, Y) = edge(X, Y) + distance(Start, X). Intermediate results are mapped to Result is distance(Arg1, Arg2) :- variables Result = edge(Arg2, X) + distance(Arg1, X). R-expr to Call (E is edge(Arg2, X)) function by name 8
distance(Start, Y) = edge(X, Y) + distance(Start, X). Result is distance(Arg1, Arg2) :- Result = edge(Arg2, X) + distance(Arg1, X). (E is edge(Arg2, X)) Recursive (D is distance(Arg1, X)) call to distance 8
distance(Start, Y) = edge(X, Y) + distance(Start, X). Result is distance(Arg1, Arg2) :- Result = edge(Arg2, X) + distance(Arg1, X). (E is edge(Arg2, X)) (D is distance(Arg1, X)) builtin_plus(Result, E, D) Built-in represented in the R-expr 8
distance(Start, Y) = edge(X, Y) + distance(Start, X). Result is distance(Arg1, Arg2) :- Result = edge(Arg2, X) + distance(Arg1, X). Intersect the bag by multiplying the (E is edge(Arg2, X)) ∩ multiplicities and * joining these (D is distance(Arg1, X)) ∩ * expressions using builtin_plus(Result, E, D) the same variable names 8
distance(Start, Y) = edge(X, Y) + distance(Start, X). Result is distance(Arg1, Arg2) :- Result = edge(Arg2, X) + distance(Arg1, X). (E is edge(Arg2, X)) ∩ * (D is distance(Arg1, X)) ∩ * builtin_plus(Result, E, D) Over the tuple ⟨Arg1, Arg2, Result, E, D, X⟩ 8
distance(Start, Y) = edge(X, Y) + distance(Start, X). Result is distance(Arg1, Arg2) :- Result = edge(Arg2, X) + distance(Arg1, X). (E is edge(Arg2, X)) ∩ * (D is distance(Arg1, X)) ∩ * builtin_plus(Result, E, D) proj(E, proj(D, proj(X, ))) Project out all local variables Now Over the tuple ⟨Arg1, Arg2, Result⟩ 8
What about Aggregation? distance(S, X) min= edge(X, Y) + distance(S, Y). • Any semi-group: min, max, sum, product, logical OR, logical AND 9
What about Aggregation? distance(S, X) min= edge(X, Y) + distance(S, Y). • Any semi-group: min, max, sum, product, logical OR, logical AND (Result=min(MinInputVariable, R)) 9
What about Aggregation? distance(S, X) min= edge(X, Y) + distance(S, Y). • Any semi-group: min, max, sum, product, logical OR, logical AND (Result=min(MinInputVariable, R)) R-expr composed on previous slide 9
What about Aggregation? distance(S, X) min= edge(X, Y) + distance(S, Y). • Any semi-group: min, max, sum, product, logical OR, logical AND (Result=min(MinInputVariable, R)) New R-expr intermediate composed on variable previous slide introduced (Like project) 9
What about Aggregation? distance(S, X) min= edge(X, Y) + distance(S, Y). • Any semi-group: min, max, sum, product, logical OR, logical AND (Result=min(MinInputVariable, R)) New Resulting R-expr intermediate value from composed on variable aggregation previous slide introduced (Like project) 9
Shortest Path All Together Now distance(S, S) min= 0. distance(S, X) min= edge(X, Y) + distance(S, Y). 10
Shortest Path All Together Now distance(S, S) min= 0. distance(S, X) min= edge(X, Y) + distance(S, Y). Result is distance(Arg1, Arg2) min= Arg1=Arg2, Result=0. Result is distance(Arg1, Arg2) min= Result=edge(Arg2, Y) + distance(Arg1, Y). 10
Shortest Path All Together Now distance(S, S) min= 0. distance(S, X) min= edge(X, Y) + distance(S, Y). Result is distance(Arg1, Arg2) min= Arg1=Arg2, Result=0. Result is distance(Arg1, Arg2) min= Result=edge(Arg2, Y) + distance(Arg1, Y). ∩ (Arg1=Arg2) * (MinInput=0) 10
Shortest Path All Together Now distance(S, S) min= 0. distance(S, X) min= edge(X, Y) + distance(S, Y). Result is distance(Arg1, Arg2) min= Arg1=Arg2, Result=0. Result is distance(Arg1, Arg2) min= Result=edge(Arg2, Y) + distance(Arg1, Y). ∩ (Arg1=Arg2) * (MinInput=0) proj(E, proj(D, proj(Y, ∩ ∩ (E is edge(Arg2, Y)) * (D is distance(Arg1, Y)) * builtin_plus(MinInput, E, D) ))) 10
Shortest Path All Together Now distance(S, S) min= 0. distance(S, X) min= edge(X, Y) + distance(S, Y). Result is distance(Arg1, Arg2) min= Arg1=Arg2, Result=0. Result is distance(Arg1, Arg2) min= Result=edge(Arg2, Y) + distance(Arg1, Y). ∩ ( ) (Arg1=Arg2) * (MinInput=0) ∪ + ( ) proj(E, proj(D, proj(Y, ∩ ∩ (E is edge(Arg2, Y)) * (D is distance(Arg1, Y)) * builtin_plus(MinInput, E, D) ))) 10
Shortest Path All Together Now distance(S, S) min= 0. distance(S, X) min= edge(X, Y) + distance(S, Y). Result is distance(Arg1, Arg2) min= Arg1=Arg2, Result=0. Result is distance(Arg1, Arg2) min= Result=edge(Arg2, Y) + distance(Arg1, Y). The complete distance ( Result=min ( MinInput, rule as a R-expr ∩ ( ) (Arg1=Arg2) * (MinInput=0) ∪ + ( ) proj(E, proj(D, proj(Y, ∩ ∩ (E is edge(Arg2, Y)) * (D is distance(Arg1, Y)) * builtin_plus(MinInput, E, D) ))) )) 10
Manipulating R-exprs via Rewrites 11
Manipulating R-exprs via Rewrites • A series of semantic preserving rewrites which attempt to simplify the expression • Look for a sub-R-expr which can be rewritten to be simpler, do so! 11
Manipulating R-exprs via Rewrites • A series of semantic preserving rewrites which attempt to simplify the expression • Look for a sub-R-expr which can be rewritten to be simpler, do so! • Non-deterministic: Any order of rewrites is acceptable • Requires searching through the entire R-expr to identify what can be rewritten/run 11
Manipulating R-exprs via Rewrites • A series of semantic preserving rewrites which attempt to simplify the expression • Look for a sub-R-expr which can be rewritten to be simpler, do so! • Non-deterministic: Any order of rewrites is acceptable • Requires searching through the entire R-expr to identify what can be rewritten/run • Fair rewrites: non-normal form sub-expression are eventually rewritten • Important in the case of recursive programs 11
Manipulating R-exprs via Rewrites • A series of semantic preserving rewrites which attempt to simplify the expression • Look for a sub-R-expr which can be rewritten to be simpler, do so! • Non-deterministic: Any order of rewrites is acceptable • Requires searching through the entire R-expr to identify what can be rewritten/run • Fair rewrites: non-normal form sub-expression are eventually rewritten • Important in the case of recursive programs • Core rewrites are presented in the paper 11
R-expr Rewrites — Built-ins 12
R-expr Rewrites — Built-ins builtin_plus(X,Y,Z) ≡ ሼ 𝑌, 𝑍, 𝑎 : 𝑌 + 𝑍 = 𝑎ሽ 12
R-expr Rewrites — Built-ins builtin_plus(X,Y,Z) ≡ ሼ 𝑌, 𝑍, 𝑎 : 𝑌 + 𝑍 = 𝑎ሽ builtin_plus(1,2,Z) → (Z=3) builtin_plus runs and its result is assigned Z 12
R-expr Rewrites — Built-ins builtin_plus(X,Y,Z) ≡ ሼ 𝑌, 𝑍, 𝑎 : 𝑌 + 𝑍 = 𝑎ሽ builtin_plus(1,2,Z) → (Z=3) No rewrites available for: builtin_plus(1,Y,Z) 1+Y=Z Y=1, Z=2 Y=2, Z=3 Y=3, Z=4 …. 12
R-expr Rewrites — Built-ins Propagate the builtin_plus(X,Y,Z) ≡ ሼ 𝑌, 𝑍, 𝑎 : 𝑌 + 𝑍 = 𝑎ሽ assignment to Z builtin_plus(1,2,Z) → (Z=3) builtin_plus(1,Y,Z) (Z=3)*builtin_plus(1,Y,Z) → (Z=3)*builtin_plus(1,Y,3) 12
R-expr Rewrites — Built-ins Propagate the builtin_plus(X,Y,Z) ≡ ሼ 𝑌, 𝑍, 𝑎 : 𝑌 + 𝑍 = 𝑎ሽ assignment to Z builtin_plus(1,2,Z) → (Z=3) builtin_plus(1,Y,Z) (Z=3)*builtin_plus(1,Y,Z) → (Z=3)*builtin_plus(1,Y,3) (Z=3)*builtin_plus(1,Y,3) → (Z=3)*(Y=2) Built-ins support multiple modes for computation 12
R-expr Rewrites — Built-ins * and + are over the builtin_plus(X,Y,Z) ≡ ሼ 𝑌, 𝑍, 𝑎 : 𝑌 + 𝑍 = 𝑎ሽ bag’s multiplicity builtin_plus(1,2,Z) → (Z=3) Maps to the builtin_plus(1,Y,Z) multiplicity of being contained in (Z=3)*builtin_plus(1,Y,Z) → (Z=3)*builtin_plus(1,Y,3) the bag (Z=3)*builtin_plus(1,Y,3) → (Z=3)*(Y=2) builtin_plus(1,2,3) → 1 Check builtin_plus(1,2,4) → 0 assignment is consistent 12
Rewriting Example: Shortest Path Distance is distance("a", "c") 13
Rewriting Example: Shortest Path Distance is distance("a", "c") Program (Result=min(MinInput, (Arg1=Arg2)*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge(Arg2, X))*(D is distance(Argr1,X)*bultin_plus(E,D,MinInput)))) 13
Rewriting Example: Shortest Path Distance is distance("a", "c") Program (Result=min(MinInput, (Arg1=Arg2)*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge(Arg2, X))*(D is distance(Argr1,X)*bultin_plus(E,D,MinInput)))) (Distance=min(MinInput, ("a"="c")*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) 13
Rewriting Example: Shortest Path Distance is distance("a", "c") Program (Result=min(MinInput, (Arg1=Arg2)*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge(Arg2, X))*(D is distance(Argr1,X)*bultin_plus(E,D,MinInput)))) (Distance=min(MinInput, ("a"="c")*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Rewrites Rules 0 Variables not equal ("a"="c") → 0 Variables not equal 13
Rewriting Example: Shortest Path Distance is distance("a", "c") Program (Result=min(MinInput, (Arg1=Arg2)*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge(Arg2, X))*(D is distance(Argr1,X)*bultin_plus(E,D,MinInput)))) (Distance=min(MinInput, ("a"="c")*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Rewrites Rules 0 Multiplicative annihilation 0 Variables not equal 0 * R → 0 Multiplicative annihilation 13
Rewriting Example: Shortest Path Distance is distance("a", "c") Program (Result=min(MinInput, (Arg1=Arg2)*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge(Arg2, X))*(D is distance(Argr1,X)*bultin_plus(E,D,MinInput)))) (Distance=min(MinInput, ("a"="c")*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Rewrites Rules R Additive identity 0 Multiplicative annihilation 0 Variables not equal 0 + R → R Additive identity 13
Rewriting Example: Shortest Path Distance is distance("a", "c") Program (Result=min(MinInput, (Arg1=Arg2)*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge(Arg2, X))*(D is distance(Argr1,X)*bultin_plus(E,D,MinInput)))) (Distance=min(MinInput, ("a"="c")*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Rewrites Rules R Additive identity R Additive identity 0 Multiplicative annihilation 0 + R → R Additive identity 0 + R → R Additive identity 13
Rewriting Example: Shortest Path Distance is distance("a", "c") Program (Result=min(MinInput, (Arg1=Arg2)*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge(Arg2, X))*(D is distance(Argr1,X)*bultin_plus(E,D,MinInput)))) (Distance=min(MinInput, ("a"="c")*(MinInput=0) + proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Rewrites Rules R Additive identity R Additive identity 0 Multiplicative annihilation 0 + R → R Additive identity (Distance=min(MinInput, proj(E, proj(D, proj(X, 0 + R → R (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Additive identity 13
(Distance=min(MinInput, proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) 14
(Distance=min(MinInput, proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Program (Result is edge(Arg1, Arg2)) :- (Arg1="a")*(Arg2="b")*(Result=10) + (Arg1="b")*(Arg2="c")*(Result=2) + (Arg1="c")*(Arg2="d")*(Result=7) 14
(Distance=min(MinInput, proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Program (Result is edge(Arg1, Arg2)) :- (Arg1="a")*(Arg2="b")*(Result=10) + (Arg1="b")*(Arg2="c")*(Result=2) + (Arg1="c")*(Arg2="d")*(Result=7) (Distance=min(MinInput, proj(E, proj(D, proj(X, (("c"="a")*(X="b")*(E=10)+ ("c"="b")*(X="c")*(E=2)+ ("c"="c")*(X="d")*(E=7)) *(D is distance("a",X)*bultin_plus(E,D,MinInput)))) 14
(Distance=min(MinInput, proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Program (Result is edge(Arg1, Arg2)) :- (Arg1="a")*(Arg2="b")*(Result=10) + (Arg1="b")*(Arg2="c")*(Result=2) + (Arg1="c")*(Arg2="d")*(Result=7) (Distance=min(MinInput, proj(E, proj(D, proj(X, (("c"="a")*(X="b")*(E=10)+ ("c"="b")*(X="c")*(E=2)+ ("c"="c")*(X="d")*(E=7)) *(D is distance("a",X)*bultin_plus(E,D,MinInput)))) 1 0 0 Equality checks ("c"="c") → 1 14
(Distance=min(MinInput, proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Program (Result is edge(Arg1, Arg2)) :- (Arg1="a")*(Arg2="b")*(Result=10) + (Arg1="b")*(Arg2="c")*(Result=2) + (Arg1="c")*(Arg2="d")*(Result=7) (Distance=min(MinInput, proj(E, proj(D, proj(X, (("c"="a")*(X="b")*(E=10)+ ("c"="b")*(X="c")*(E=2)+ ("c"="c")*(X="d")*(E=7)) *(D is distance("a",X)*bultin_plus(E,D,MinInput)))) R Multiplicative identity 1 0 0 Equality checks 1 * R → R Multiplicative identity 14
(Distance=min(MinInput, proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Program (Result is edge(Arg1, Arg2)) :- (Arg1="a")*(Arg2="b")*(Result=10) + (Arg1="b")*(Arg2="c")*(Result=2) + (Arg1="c")*(Arg2="d")*(Result=7) (Distance=min(MinInput, proj(E, proj(D, proj(X, (("c"="a")*(X="b")*(E=10)+ ("c"="b")*(X="c")*(E=2)+ ("c"="c")*(X="d")*(E=7)) *(D is distance("a",X)*bultin_plus(E,D,MinInput)))) R Multiplicative identity R Multiplicative identity 1 0 1 * R → R Multiplicative identity 1 * R → R Multiplicative identity 14
(Distance=min(MinInput, proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Program (Result is edge(Arg1, Arg2)) :- (Arg1="a")*(Arg2="b")*(Result=10) + (Arg1="b")*(Arg2="c")*(Result=2) + (Arg1="c")*(Arg2="d")*(Result=7) (Distance=min(MinInput, proj(E, proj(D, proj(X, (("c"="a")*(X="b")*(E=10)+ ("c"="b")*(X="c")*(E=2)+ ("c"="c")*(X="d")*(E=7)) *(D is distance("a",X)*bultin_plus(E,D,MinInput)))) R Multiplicative identity R Multiplicative identity 1 0 1 * R → R Multiplicative identity (Distance=min(MinInput, proj(E, proj(D, proj(X, 1 * R → R Multiplicative identity ((X="d")*(E=7)) *(D is distance("a",X)*bultin_plus(E,D,MinInput)))) 14
(Distance=min(MinInput, proj(E, proj(D, proj(X, (E is edge("c", X))*(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Program (Result is edge(Arg1, Arg2)) :- (Arg1="a")*(Arg2="b")*(Result=10) + (Arg1="b")*(Arg2="c")*(Result=2) + (Arg1="c")*(Arg2="d")*(Result=7) (Distance=min(MinInput, proj(E, proj(D, proj(X, (("c"="a")*(X="b")*(E=10)+ ("c"="b")*(X="c")*(E=2)+ ("c"="c")*(X="d")*(E=7)) *(D is distance("a",X)*bultin_plus(E,D,MinInput)))) R Multiplicative identity R Multiplicative identity 1 0 1 * R → R Multiplicative identity (Distance=min(MinInput, proj(E, proj(D, proj(X, 1 * R → R Multiplicative identity ((X="d")*(E=7)) *(D is distance("a",X)*bultin_plus(E,D,MinInput)))) Propagate values (Distance=min(MinInput, proj(D, (D is distance("a","d")*bultin_plus(7,D,MinInput)))) 14
Rewrites for Aggregators 15
Rewrites for Aggregators (Result=min(MinInput, (MinInput=789))) → (Result=789) A final value has been determined. Assign it to the Result Variable 15
Rewrites for Aggregators (Result=min(MinInput, (MinInput=789))) → (Result=789) (Result=min(MinInput, R+S)) → builtin_min(MR, MS, Result)* (MR=min(MinInput, R))*(MS=min(MinInput, S)) Two disjunctive R-exprs can be split and processed individually 15
Recommend
More recommend