Title
Automated refactoring of nested-IF formulae in spreadsheets
Abstract
Spreadsheets are the most popular end-user programming software, where formulae act like programs and also have smells. One well recognized smell is the use of nested-IF expressions, which have low readability and high cognitive cost for users, and are error-prone during reuse or maintenance. End users usually lack essential programming language knowledge to tackle or even realize this problem, yet no automatic approaches are currently available. This paper proposes the first exploration of the nest-if usage status against two large-scale spreadsheet corpora containing over 80,000 industry-level spreadsheets. It turns out the use of nested-IF expressions are surprisingly common among end users. We then present an approach to tackling this problem through automatic formula refactoring. The general idea of the automatic approach is two-fold. First, we detect and remove logic redundancy based on the AST of a formula. Second, we identify higher-level semantics that have been represented with fragmented and scattered syntax, and reassemble the syntax using concise built-in functions. A comprehensive evaluation with over 28 million nested-IF formulae reveals that the approach is able to relieve the smell of over 90% of nested-IF formulae.
Year
DOI
Venue
2017
10.1145/3236024.3275532
foundations of software engineering
Keywords
Field
DocType
end user programming,spreadsheet,nested if,formula refactor
Programming language,End user,Expression (mathematics),Computer science,Theoretical computer science,Readability,Software,Code refactoring,Syntax,Semantics,Logic redundancy
Journal
Volume
ISBN
Citations 
abs/1712.09797
978-1-4503-5573-5
2
PageRank 
References 
Authors
0.36
19
5
Name
Order
Citations
PageRank
Jie Jennifer Zhang120.36
Shi Han229615.22
Dan Hao386341.59
Lingming Zhang42726154.39
Dongmei Zhang51439132.94