Starting with the original expression, we evaluate it with (10, 20, 30) and obtain 70. Since (10, 20, 30) -> 70 is not in our database, we continue with the next subexpression, (x ^ y) + (2 * (x & y)). This time, it evaluates to 30, giving us (10, 20, 30) -> 30. This entry maps to x + y. Therefore, we replace the subexpression in the complex expression with x + y, which leads us to:
Why is there a concrete evaluation here? The expression might have 1000 side effects and special cases, the result x + y could be pure luck. Instead it seems the database-lookup might just as well be done on the unevaluated expression...or not?