Automated Refactoring of Nested-IF Formulae in Spreadsheets

12/28/2017
by   Jie Zhang, et al.
0

Spreadsheets are the most popular end-user programming software, where formulae act like programs and also have smells. One well recognized common smell of spreadsheet formulae is nest-IF expressions, which have low readability and high cognitive cost for users, and are error-prone during reuse or maintenance. However, end users usually lack essential programming language knowledge and skills to tackle or even realize the problem. The previous research work has made very initial attempts in this aspect, while no effective and automated approach is currently available. This paper firstly proposes an AST-based automated approach to systematically refactoring nest-IF formulae. The general idea is two-fold. First, we detect and remove logic redundancy on the AST. Second, we identify higher-level semantics that have been fragmented and scattered, and reassemble the syntax using concise built-in functions. A comprehensive evaluation has been conducted against a real-world spreadsheet corpus, which is collected in a leading IT company for research purpose. The results with over 68,000 spreadsheets with 27 million nest-IF formulae reveal that our approach is able to relieve the smell of over 99% of nest-IF formulae. Over 50 nesting levels of the nest-IFs by more than a half. In addition, a survey involving 49 participants indicates that for most cases the participants prefer the refactored formulae, and agree on that such automated refactoring approach is necessary and helpful.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/05/2018

What Stays in Mind? - Retention Rates in Programming MOOCs

This work presents insights about the long-term effects and retention ra...
research
03/27/2018

Lolisa: Formal Syntax and Semantics for a Subset of the Solidity Programming Language

This article presents the formal syntax and semantics for a large subset...
research
11/02/2018

Probabilistic Programming with Densities in SlicStan: Efficient, Flexible and Deterministic

Stan is a probabilistic programming language that has been increasingly ...
research
06/29/2012

Software Verification and Graph Similarity for Automated Evaluation of Students' Assignments

In this paper we promote introducing software verification and control f...
research
08/24/2020

Multi-Modal End-User Programming of Web-Based Virtual Assistant Skills

While Alexa can perform over 100,000 skills on paper, its capability cov...
research
12/12/2017

A Practical Approach for Detecting Logical Error in Object Oriented Environment

A programming language is a formally constructed language designed to co...
research
07/16/2023

Deduplicating and Ranking Solution Programs for Suggesting Reference Solutions

Referring to solution programs written by other users is helpful for lea...

Please sign up or login with your details

Forgot password? Click here to reset