Open
Description
Currently, the probabilities of types for variables are based purely on the source code.
However, if we pick a certain type for one of the arguments the probabilities of the types of all other variables could change because of conditional probabilities. These should thus be included in the calculation (although this might slow the entire process down).
Example:
function x (a, b) {
return a + b
}
By default a and b could both be strings and numbers in javascript we simply don't know.
Given a is numeric we know that b is more likely to also be numeric.
Conversely, if a is a string we know that b is more likely to also be a string.