Type Inference in Mixed Compiled / Scripting Environments
Andrew Weinrich, Ben Libit · 2008
Programs written in statically-typed languages are commonly extended with scripting engines that manipulate objects in the compiled layer. These scripting environments enhance the capabilities of the program, at the cost of additional errors that would be caught by compile-time type checking. This paper describes a system for using type information from the compiled, statically-typed layer to perform type inference and checking on scripting code. To improve the quality of analysis, idiomatic rules based on common programming patterns are used to supplement the type-inference process. A proof-of-concept of this system is shown in flint, a type-checking tool for the language F-Script.