International Journal of Computer Theory and Engineering

Frequency: Quarterly
ISSN: 1793-8201 (Print), 2972-4511 (Online)
Publisher:IACSIT Press

OPEN ACCESS
4.0
CiteScore

IJCTE 2017 Vol.9(5): 346-350
doi: 10.7763/IJCTE.2017.V9.1164

Static Checking of Range Assertions in JavaScript Programs

Astrid Younang , Lunjin Lu

  • Computer Science and Engineering department at Oakland University in Michigan, USA.

Abstract

Because of the dynamic nature of JavaScript, an array access operation with a property (index) that is out of its range will not throw an arrayIndexoutOfBound exception, but will silently return the value undefined. This can cause programs to crash or malfunction. This work extends the JavaScript language with range assertions and allows developers to insert them at any program point. Range assertions could help detect such silent arrayIndexoutOfBound exceptions and can be useful for program understanding and debugging. We propose an assertion language that can be used in any JavaScript static analyzer. Assertions are statically checked and possible violations are reported. The experiments on a set of benchmark programs reported a violation that would have been previously unnoticed.

Keywords

  • Abstract interpretation
  • interval domain
  • JavaScript
  • range assertions
1164-T021

How to Cite

Copied

Astrid Younang and Lunjin Lu, "Static Checking of Range Assertions in JavaScript Programs," International Journal of Computer Theory and Engineering, vol. 9, no. 5, pp. 346-350, 2017. https://doi.org/10.7763/IJCTE.2017.V9.1164

Copyright & License

Copyright © 2017 by the authors. This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited (CC BY 4.0).

Article Metrics in Dimensions

Menu