Parameters whose corresponding arguments are known to always alias a particular value. These are the only parameters that may, during Inline_and_simplify, have non-unknown approximations.
An argument may only be specialised to a variable in the scope of the corresponding set of closures declaration. Usually, that variable itself also appears in the position of the specialised argument at all call sites of the function. However it may also be the case (for example in code generated as a result of Augment_specialised_args) that the various call sites of such a function have differing variables in the position of the specialised argument. This is permissible *so long as it is certain they all alias the same value*. Great care must be taken in transformations that result in this situation since there are no invariant checks for correctness.
As an example, supposing all call sites of f are represented here: let x = ... in let f a b c = ... in let y = ... in f x y 1; f x y 1 the specialised arguments of f can (but does not necessarily) contain the association a -> x, but cannot contain b -> y because f is not in the scope of y. If f were the recursive function let rec f a b c = f a 1 2 in, a -> x would still be a valid specialised argument because all recursive calls maintain the invariant.
This information is used for optimization purposes, if such a binding is known, it is possible to specialise the body of the function according to its parameter. This is usually introduced when specialising a recursive function, for instance. let rec map f = function | [] -> [] | h :: t -> f h :: map f t let map_succ l = let succ x = x + 1 in map succ l map can be duplicated in map_succ to be specialised for the argument f. This will result in let map_succ l = let succ x = x + 1 in let rec map f = function | [] -> [] | h :: t -> f h :: map f t in map succ l with map having f -> succ in its specialised_args field.
Specialised argument information for arguments that are used must never be erased. This ensures that specialised arguments whose approximations describe closures maintain those approximations, which is essential to transport the closure freshening information to the point of use (e.g. a Project_var from such an argument).