Identity-sensitive Points-to Analysis for the Dynamic Behavior of JavaScript Objects
نویسندگان
چکیده
JavaScript object behavior is dynamic and adheres to prototypebased inheritance. The behavior of a JavaScript object can be changed by adding and removing properties at runtime. Points-to analysis calculates the set of values a reference property or variable may have during execution. We present a novel, partially flow-sensitive, context-sensitive points-to algorithm that accurately models dynamic changes in object behavior. The algorithm represents objects by their creation sites and local property names; it tracks property updates via a new control-flow graph representation. The calling context is comprised of the receiver object, its local properties and prototype chain. We compare the new points-to algorithm with an existing JavaScript points-to algorithm in terms of their respective performance and accuracy on a client application. The experimental results on real JavaScript websites show that the new points-to analysis significantly improves precision, uniquely resolving on average 11% more property lookup statements.
منابع مشابه
Empirical study of the dynamic behavior of JavaScript objects
Despite the popularity of JavaScript for client-side web applications, there is a lack of effective software tools supporting JavaScript development and testing. The dynamic characteristics of JavaScript pose software engineering challenges such as program understanding and security. One important feature of JavaScript is that its objects support flexible mechanisms such as property changes at ...
متن کاملData-flow Analysis of Programs with Associative Arrays
Dynamic programming languages, such as PHP, JavaScript, and Python, provide built-in data structures including associative arrays and objects with similar semantics—object properties can be created at run-time and accessed via arbitrary expressions. While a high level of security and safety of applications written in these languages can be of a particular importance (consider a web application ...
متن کاملEffects of the asymmetric behavior of the shape memory alloy on nonlinear dynamic responses of thick sandwich plates with embedded SMA wires
In the present article, the dynamic behavior of sandwich plates with embedded shape memory alloy (SMA) wires is evaluated for two cases wherein (i) the stress-strain curve of the superelastic behavior of the SMA wires is symmetric and (ii) the mentioned curve is non-symmetric. A modified version of Brinson’s constitutive model is proposed and used. The high non-linearity in the behavior stems f...
متن کاملA Practical Blended Analysis for Dynamic Features in JavaScript
JavaScript is widely used in Web applications; however, its dynamism renders static analysis ineffective. Our JavaScript Blended Analysis Framework is designed to handle JavaScript dynamic features. It performs a flexible combined static/dynamic analysis. The blended analysis focuses static analysis on a dynamic calling structure collected at runtime in a lightweight manner, and refines the sta...
متن کاملIntegrated Characterization and a Tuning Strategy for the PVT Analysis of Representative Fluids in a Gas Condensate Reservoir
Gas condensate reservoirs are characterized by a distinctive retrograde behavior and potential for condensate drop out during production and sampling. Efficient modeling of gas condensate reservoir requires careful phase behavior studies of samples collected prior to and during the production life of reservoir. In this work, an integrated characterization and tuning algorithm is proposed to ana...
متن کامل