Sciweavers

SCAM
2015
IEEE

Detecting function purity in JavaScript

8 years 5 months ago
Detecting function purity in JavaScript
—We present an approach to detect function purity in JavaScript. A function is pure if none of its applications cause observable side-effects. The approach is based on a pushdown flow analysis that besides traditional control and value flow also keeps track of write effects. To increase the precision of our purity analysis, we combine it with an intraprocedural analysis to determine freshness of variables and object references. We formalize the core aspects of our analysis, and discuss our implementation used to analyze several common JavaScript benchmarks. Experiments show that our technique is capable of detecting function purity, even in the presence of higherorder functions, dynamic property expressions, and prototypal inheritance.
Jens Nicolay, Carlos Noguera, Coen De Roover, Wolf
Added 17 Apr 2016
Updated 17 Apr 2016
Type Journal
Year 2015
Where SCAM
Authors Jens Nicolay, Carlos Noguera, Coen De Roover, Wolfgang De Meuter
Comments (0)