Effective Flow Analysis for Avoiding Run-Time Checks
نویسندگان
چکیده
This paper describes a general purpose program analysis that computes global control-ow and data-ow information for higher-order, call-by-value programs. This information can be used to drive global program optimizations such as inlining and run-time check elimination, as well as optimizations like constant folding and loop invariant code motion that are typically based on special-purpose local analyses. The analysis employs a novel approximation technique called poly-morphic splitting that uses let-expressions as syntactic clues to gain precision. Polymorphic splitting borrows ideas from Hindley-Milner poly-morphic type inference systems to create an analog to polymorphism for ow analysis. Experimental results derived from an implementation of the analysis for Scheme indicate that the analysis is extremely precise and has reasonable cost. In particular, it eliminates signiicantly more run-time checks than simple ow analyses (i.e. 0CFA) or analyses based on type inference.
منابع مشابه
Eeective Flow Analysis for Avoiding Run-time Checks
This paper describes a general purpose program analysis that computes global control-ow and data-ow information for higher-order, call-by-value programs. This information can be used to drive global program optimizations such as inlining and run-time check elimination, as well as optimizations like constant folding and loop invariant code motion that are typically based on special-purpose local...
متن کاملChaos for a Fast, Secure, and Predictable Future
Violating a program’s semantics for fun and profit is a time honored hacker tradition. Compilers defend against such fiends by inserting run-time checks to enforce semantic safety properties. Safe language compilers insert type checks for down-casts, information flow compilers [11] add run-time checks to prevent information leakage, and tools like SAFECode [8], WIT [1], and DFI [6] insert run-t...
متن کاملExperiences with the Design of a Run-Time Check
Run-time checks are often assumed to be a cost-effective way of improving the dependability of software components, by checking required properties of their outputs and flagging an output as incorrect if it fails the check. Run-time checks’ main point of attractiveness is that they are supposed to be easy to implement. Also, they are implicitly assumed to be effective in detecting incorrect out...
متن کاملSimple and Effective Type Check Removal through Lazy Basic Block Versioning
Dynamically typed programming languages such as JavaScript and Python defer type checking to run time. In order to maximize performance, dynamic language VM implementations must attempt to eliminate redundant dynamic type checks. However, type inference analyses are often costly and involve tradeoffs between compilation time and resulting precision. This has lead to the creation of increasingly...
متن کاملFlow-Sensitive Sub-Zero Control-Flow Analysis in Linear-Log Time
Traditional control-flow analysis (CFA) for higher-order languages is too expensive to be used as an every-day analysis in an otherwise fast compiler that is often called upon to compile large programs. It is even more expensive when flow sensitivity is added to handle optimizations like type recovery. In particular, the fastest known algorithms for 0CFA, the least expensive of the popular kCFA...
متن کامل