Eval begone!: semi-automated removal of eval from javascript programs - Archive ouverte HAL Accéder directement au contenu
Communication Dans Un Congrès Année : 2012

Eval begone!: semi-automated removal of eval from javascript programs

Résumé

Eval endows JavaScript developers with great power. It allows developers and end-users, by turning text into executable code, to seamlessly extend and customize the behavior of deployed applications as they are running. With great power comes great responsibility, though not in our experience. In previous work we demonstrated through a large corpus study that programmers wield that power in rather irresponsible and arbitrary ways. We showed that most calls to eval fall into a small number of very predictable patterns. We argued that those patterns could easily be recognized by an automated algorithm and that they could almost always be replaced with safer JavaScript idioms. In this paper we set out to validate our claim by designing and implementing a tool, which we call Evalorizer, that can assist programmers in getting rid of their unneeded evals. We use the tool to remove eval from a real-world website and validated our approach over logs taken from the top 100 websites with a success rate over 97% under an open world assumption.
Fichier non déposé

Dates et versions

hal-01009557 , version 1 (18-06-2014)

Identifiants

Citer

Fadi Meawad, Gregor Richards, Floréal Morandat, Vitek Jan. Eval begone!: semi-automated removal of eval from javascript programs. OOPSLA, Oct 2012, Tucson, United States. pp.607-620, ⟨10.1145/2384616.2384660⟩. ⟨hal-01009557⟩

Collections

CNRS
80 Consultations
0 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More