SlideShare a Scribd company logo
Astrid Younang & Lunjin Lu & Nabil Almashfi
March 3,2017
Outline
1. Motivation
2. Related Work
3. Conventionality Analysis
4. Conclusion and Future Work
Motivation
 JavaScript objects have dynamic set of fields
(properties)
 Arrays are just like regular objects with the property
(field) length that is automatically updated;
 Arrays can have fields whose names are not indices;
 Are they used like regular objects?
 Are they used in a conventional way like in Java ?
Motivation
 A conventional array is an array that does not have
any properties other than indices and length.
 Conventionality analysis
• provides valuable information for program
comprehension
• provides valuable information for performance
optimization
• Feature to add to JavaScript development tool
var A = [ ] ; / New empty array /
var i ;
function populate_array (x,y,A) {
for (i=x ; i<=y ; i++) {
A[i]= 2*i +10;
}
return A;
}
A = populate_array (0, 3, A) ;
A = populate_array (6, 10, A) ;
A.prop1 = “foo” ;
i= -3.5; A[i] = true;
[0, 3]  [10,16], [6,10] [22,30], // A has indexes 0—3, 6—10
// A is not dense
“prop1”  “foo”,
SNum true // A is not conventional
“length”  11
Information tracked by
conventional analysis
 String information: what strings a variable can take as
value?
 Number information: what numbers a variable can
take as a value?
 Type information: is a number definitely integer or
possibly a floating point number?
Related Work
 Existing abstract string domains
 Constant propagation domain for strings
(TAJS, SAFE, JSAI)
 Character inclusion, prefix domain, suffix
domain, bricks and string graphs
 Automata-based string domains
Related Work
Existing abstract string domains
 do not track range of indexes (which are
strings) precisely
 do not supports conventionality analysis
Abstract string domain

Abstract string domain- Operations
n – a non-index numeric string
r – a non-numeric string
Abstract numeric domain
 Range -- Interval domain
intv(3,5) – all numbers between 3 and 5
norm(3,5) – all numbers between 3 and d plus NaN
Type -- <int, any>
Evaluation
 Studied 98 benchmark programs
 70 out of them had less than 2 arrays
(were omitted)
Evaluation
Evaluation
Only conventional arrays were found on
GitHub
o Programmers most likely use arrays in a
conventional way and flagging possible
non-conventional arrays provides useful
information during program
development.
Evaluation
 Arrays are used in a conventional way
in 95% of the benchmark programs.
Storage of single/mixed types
o 377 arrays analyzed
o 11.93% - string values
o 33% - integer values
Conclusion & Future work
 Conventionality analysis can be
integrated in static analyzers
 Future work will investigate the use the
use of array information for
performance optimization

More Related Content

PPT
Modern Compiler Design
PPT
Templates
PPTX
Lecture 1 Introduction C++
PDF
TMPA-2017: Modeling of PLC-programs by High-level Coloured Petri Nets
PDF
Gnu octave
PDF
Sperasoft‬ talks j point 2015
PPT
PPTX
Templates in c++
Modern Compiler Design
Templates
Lecture 1 Introduction C++
TMPA-2017: Modeling of PLC-programs by High-level Coloured Petri Nets
Gnu octave
Sperasoft‬ talks j point 2015
Templates in c++

What's hot (9)

PDF
Hidden Truths in Dead Software Paths
PPT
12. Stack
PPT
PDF
Safety Beyond Types
PDF
PPTX
Transfer learning, active learning using tensorflow object detection api
PPTX
PPTX
Advanced Functional Programming in Scala
PDF
Generics past, present and future
Hidden Truths in Dead Software Paths
12. Stack
Safety Beyond Types
Transfer learning, active learning using tensorflow object detection api
Advanced Functional Programming in Scala
Generics past, present and future
Ad

Viewers also liked (20)

PDF
TMPA-2017: Compositional Process Model Synthesis based on Interface Patterns
PDF
TMPA-2017: Distributed Analysis of the BMC Kind: Making It Fit the Tornado Su...
PDF
TMPA-2017: Conference Opening
PDF
TMPA-2017: Vellvm - Verifying the LLVM
PDF
TMPA-2017: Unity Application Testing Automation with Appium and Image Recogni...
PDF
TMPA-2017: Live testing distributed system fault tolerance with fault injecti...
PDF
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
PDF
TMPA-2017: Generating Cost Aware Covering Arrays For Free
PDF
TMPA-2017: Defect Report Classification in Accordance with Areas of Testing
PDF
TMPA-2017: Technology and Tools for Developing Industrial Software Test Suite...
PDF
TMPA-2017: Using Functional Directives to Analyze Code Complexity and Communi...
PDF
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
PDF
TMPA-2017: Functional Parser of Markdown Language Based on Monad Combining an...
PDF
TMPA-2017: Stemming Architectural Decay in Software Systems
PDF
TMPA-2017: The Quest for Average Response Time
PDF
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
PDF
TMPA-2017: A Survey of High-Performance Computing for Software Verification
PDF
TMPA-2017: Layered Layouts for Software Systems Visualization
PDF
TMPA-2017: Predicate Abstraction Based Configurable Method for Data Race Dete...
PDF
TMPA-2017: Dl-Check: Dynamic Potential Deadlock Detection Tool for Java Programs
TMPA-2017: Compositional Process Model Synthesis based on Interface Patterns
TMPA-2017: Distributed Analysis of the BMC Kind: Making It Fit the Tornado Su...
TMPA-2017: Conference Opening
TMPA-2017: Vellvm - Verifying the LLVM
TMPA-2017: Unity Application Testing Automation with Appium and Image Recogni...
TMPA-2017: Live testing distributed system fault tolerance with fault injecti...
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
TMPA-2017: Generating Cost Aware Covering Arrays For Free
TMPA-2017: Defect Report Classification in Accordance with Areas of Testing
TMPA-2017: Technology and Tools for Developing Industrial Software Test Suite...
TMPA-2017: Using Functional Directives to Analyze Code Complexity and Communi...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Functional Parser of Markdown Language Based on Monad Combining an...
TMPA-2017: Stemming Architectural Decay in Software Systems
TMPA-2017: The Quest for Average Response Time
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
TMPA-2017: A Survey of High-Performance Computing for Software Verification
TMPA-2017: Layered Layouts for Software Systems Visualization
TMPA-2017: Predicate Abstraction Based Configurable Method for Data Race Dete...
TMPA-2017: Dl-Check: Dynamic Potential Deadlock Detection Tool for Java Programs
Ad

Similar to TMPA-2017: Static Checking of Array Objects in JavaScript (20)

PPTX
ADVANCED DATA STRUCTURES AND ALGORITHMS.pptx
PDF
12000121037.pdf
PPTX
U2.pptx Advanced Data Structures and Algorithms
PPTX
F# array searching
PPTX
2301107005 - ADNAN PP.pptx array of objects
PPTX
Data Structures - Array presentation .pptx
PPT
Arrays and vectors in Data Structure.ppt
PPT
Data Structures: A Foundation for Efficient Programming
PPTX
Understanding of Arrays and its types along with implementation
PDF
Datatype
PDF
(2) collections algorithms
PDF
DSA-Lecture-05
PPT
Theory of programming language chapter 6
PPTX
Plc (1)
PDF
M v bramhananda reddy dsa complete notes
PPT
pl12ch6.ppt
PPTX
DSA Unit II array.pptx
PPTX
Array,data type
PPT
Arrays Basicfundamentaldatastructure.ppt
PPT
Js objects
ADVANCED DATA STRUCTURES AND ALGORITHMS.pptx
12000121037.pdf
U2.pptx Advanced Data Structures and Algorithms
F# array searching
2301107005 - ADNAN PP.pptx array of objects
Data Structures - Array presentation .pptx
Arrays and vectors in Data Structure.ppt
Data Structures: A Foundation for Efficient Programming
Understanding of Arrays and its types along with implementation
Datatype
(2) collections algorithms
DSA-Lecture-05
Theory of programming language chapter 6
Plc (1)
M v bramhananda reddy dsa complete notes
pl12ch6.ppt
DSA Unit II array.pptx
Array,data type
Arrays Basicfundamentaldatastructure.ppt
Js objects

More from Iosif Itkin (20)

PDF
Foundations of Software Testing Lecture 4
PPTX
QA Financial Forum London 2021 - Automation in Software Testing. Humans and C...
PDF
Exactpro FinTech Webinar - Global Exchanges Test Oracles
PDF
Exactpro FinTech Webinar - Global Exchanges FIX Protocol
PDF
Operational Resilience in Financial Market Infrastructures
PDF
20 Simple Questions from Exactpro for Your Enjoyment This Holiday Season
PDF
Testing the Intelligence of your AI
PDF
EXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
PDF
ClearTH Test Automation Framework: Case Study in IRS & CDS Swaps Lifecycle Mo...
PPTX
EXTENT Talks 2019 Tbilisi: Failover and Recovery Test Automation - Ivan Shamrai
PDF
EXTENT Talks QA Community Tbilisi 20 April 2019 - Conference Open
PDF
User-Assisted Log Analysis for Quality Control of Distributed Fintech Applica...
PPTX
QAFF Chicago 2019 - Complex Post-Trade Systems, Requirements Traceability and...
PDF
QA Community Saratov: Past, Present, Future (2019-02-08)
PDF
Machine Learning and RoboCop Testing
PDF
Behaviour Driven Development: Oltre i limiti del possibile
PDF
2018 - Exactpro Year in Review
PPTX
Exactpro Discussion about Joy and Strategy
PPTX
FIX EMEA Conference 2018 - Post Trade Software Testing Challenges
PDF
BDD. The Outer Limits. Iosif Itkin at Youcon (in Russian)
Foundations of Software Testing Lecture 4
QA Financial Forum London 2021 - Automation in Software Testing. Humans and C...
Exactpro FinTech Webinar - Global Exchanges Test Oracles
Exactpro FinTech Webinar - Global Exchanges FIX Protocol
Operational Resilience in Financial Market Infrastructures
20 Simple Questions from Exactpro for Your Enjoyment This Holiday Season
Testing the Intelligence of your AI
EXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
ClearTH Test Automation Framework: Case Study in IRS & CDS Swaps Lifecycle Mo...
EXTENT Talks 2019 Tbilisi: Failover and Recovery Test Automation - Ivan Shamrai
EXTENT Talks QA Community Tbilisi 20 April 2019 - Conference Open
User-Assisted Log Analysis for Quality Control of Distributed Fintech Applica...
QAFF Chicago 2019 - Complex Post-Trade Systems, Requirements Traceability and...
QA Community Saratov: Past, Present, Future (2019-02-08)
Machine Learning and RoboCop Testing
Behaviour Driven Development: Oltre i limiti del possibile
2018 - Exactpro Year in Review
Exactpro Discussion about Joy and Strategy
FIX EMEA Conference 2018 - Post Trade Software Testing Challenges
BDD. The Outer Limits. Iosif Itkin at Youcon (in Russian)

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation theory and applications.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Electronic commerce courselecture one. Pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Approach and Philosophy of On baking technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Machine Learning_overview_presentation.pptx
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Programs and apps: productivity, graphics, security and other tools
Mobile App Security Testing_ A Comprehensive Guide.pdf
cuic standard and advanced reporting.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Empathic Computing: Creating Shared Understanding
Encapsulation theory and applications.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Electronic commerce courselecture one. Pdf
Review of recent advances in non-invasive hemoglobin estimation
Big Data Technologies - Introduction.pptx
Encapsulation_ Review paper, used for researhc scholars
Approach and Philosophy of On baking technology
Machine learning based COVID-19 study performance prediction
Advanced methodologies resolving dimensionality complications for autism neur...
20250228 LYD VKU AI Blended-Learning.pptx
Machine Learning_overview_presentation.pptx

TMPA-2017: Static Checking of Array Objects in JavaScript

  • 1. Astrid Younang & Lunjin Lu & Nabil Almashfi March 3,2017
  • 2. Outline 1. Motivation 2. Related Work 3. Conventionality Analysis 4. Conclusion and Future Work
  • 3. Motivation  JavaScript objects have dynamic set of fields (properties)  Arrays are just like regular objects with the property (field) length that is automatically updated;  Arrays can have fields whose names are not indices;  Are they used like regular objects?  Are they used in a conventional way like in Java ?
  • 4. Motivation  A conventional array is an array that does not have any properties other than indices and length.  Conventionality analysis • provides valuable information for program comprehension • provides valuable information for performance optimization • Feature to add to JavaScript development tool
  • 5. var A = [ ] ; / New empty array / var i ; function populate_array (x,y,A) { for (i=x ; i<=y ; i++) { A[i]= 2*i +10; } return A; } A = populate_array (0, 3, A) ; A = populate_array (6, 10, A) ; A.prop1 = “foo” ; i= -3.5; A[i] = true; [0, 3]  [10,16], [6,10] [22,30], // A has indexes 0—3, 6—10 // A is not dense “prop1”  “foo”, SNum true // A is not conventional “length”  11
  • 6. Information tracked by conventional analysis  String information: what strings a variable can take as value?  Number information: what numbers a variable can take as a value?  Type information: is a number definitely integer or possibly a floating point number?
  • 7. Related Work  Existing abstract string domains  Constant propagation domain for strings (TAJS, SAFE, JSAI)  Character inclusion, prefix domain, suffix domain, bricks and string graphs  Automata-based string domains
  • 8. Related Work Existing abstract string domains  do not track range of indexes (which are strings) precisely  do not supports conventionality analysis
  • 10. Abstract string domain- Operations n – a non-index numeric string r – a non-numeric string
  • 11. Abstract numeric domain  Range -- Interval domain intv(3,5) – all numbers between 3 and 5 norm(3,5) – all numbers between 3 and d plus NaN Type -- <int, any>
  • 12. Evaluation  Studied 98 benchmark programs  70 out of them had less than 2 arrays (were omitted)
  • 14. Evaluation Only conventional arrays were found on GitHub o Programmers most likely use arrays in a conventional way and flagging possible non-conventional arrays provides useful information during program development.
  • 15. Evaluation  Arrays are used in a conventional way in 95% of the benchmark programs. Storage of single/mixed types o 377 arrays analyzed o 11.93% - string values o 33% - integer values
  • 16. Conclusion & Future work  Conventionality analysis can be integrated in static analyzers  Future work will investigate the use the use of array information for performance optimization