{"title":"Precise String Domain for Analyzing JavaScript Arrays and Objects","authors":"Nabil Almashfi, Lunjin Lu","doi":"10.1109/ICICT50521.2020.00011","DOIUrl":null,"url":null,"abstract":"JavaScript is a scripting language that is used for creating web pages. It is widely used and a top contender in realworld usage. JavaScript has many dynamic features that makes it challenging to static analysis. Arrays and objects are one aspect that needs more attention. Array elements are inherently sparse where elements can be added at noncontiguous locations. Object properties can be dynamically accessed and they can also store values of different types. Existing JavaScript static analyzers use constant propagation domains that lose huge amount of precision when analyzing arrays and objects. In this paper, we propose a string abstract domain that is capable of capturing precise information about arrays and objects. The domain we propose provides useful information for the detection of some errors such as the attempt to access a nonexistent element or property. We also define the abstract semantics of some crucial operations over this domain.","PeriodicalId":445000,"journal":{"name":"2020 3rd International Conference on Information and Computer Technologies (ICICT)","volume":"349 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 3rd International Conference on Information and Computer Technologies (ICICT)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICICT50521.2020.00011","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
JavaScript is a scripting language that is used for creating web pages. It is widely used and a top contender in realworld usage. JavaScript has many dynamic features that makes it challenging to static analysis. Arrays and objects are one aspect that needs more attention. Array elements are inherently sparse where elements can be added at noncontiguous locations. Object properties can be dynamically accessed and they can also store values of different types. Existing JavaScript static analyzers use constant propagation domains that lose huge amount of precision when analyzing arrays and objects. In this paper, we propose a string abstract domain that is capable of capturing precise information about arrays and objects. The domain we propose provides useful information for the detection of some errors such as the attempt to access a nonexistent element or property. We also define the abstract semantics of some crucial operations over this domain.