Detecting sharing of partial applications in functional programs

A method is presented for detecting sharing of partial function applications in higher order functional programs. Such sharing occurs when there are several references to variables that are bound to a particular function application. In order to provide an interprocedural analysis, a non-standard semantics is defined for a lazy, higher-order functional language such that the meaning of a program is information about the sharing that occurred during its execution. An abstraction of this non-standard semantics is presented so that useful, although less complete, sharing information can be provided at compile-time.