Refactoring Scala Programs to Promote Functional Design Patterns
Thu 15 Jul 2021 11:10 - 11:40 at Posters - Posters (time band 3)
A large software system should not only be functional, but in order to give continuous value over time, the source code needs to be readable, maintainable, have expressive architecture and have low complexity. For a given programming language these goals can be achieved by programming idiomatically. Idiomatic programming means writing code in a more succinct way by using the complete expressive power of the language through language-specific features or paradigms or recurring constructs. Developers also prefer these methods for the simple reason that they are less work to implement, less error-prone, concise, and easier to understand. Many functional language features and techniques of Scala have a similar effect on coding projects.
Scala is a well-known functional language, and the problem addressed in this work is refactoring Scala source code in a way such that the transformed program is more idiomatic and conforms better to a functional way of writing programs. So far, the refactoring tool has been able to successfully identify and replace various types of control-flow constructs such as loops with up to 20 higher-order functions and common sequence methods available in Scala. It can also identify and replace various types of conditional expressions with pattern-match expressions, another well-known and efficient idiomatic feature of Scala.
At 1300+ lines of code, the tool is composed of Scala packages - each takes care of a kind of refactoring and can be directly imported into other Scala projects. It is IDE-independent, extendable, and makes adding new refactorings easy.
Conference_Poster (poster.pdf) | 953KiB |
Wed 14 JulDisplayed time zone: Brussels, Copenhagen, Madrid, Paris change
Thu 15 JulDisplayed time zone: Brussels, Copenhagen, Madrid, Paris change
11:10 - 11:40 | |||
11:10 30mPoster | Exposing Previously Undetectable Faults in Deep Neural Networks Posters Isaac Dunn University of Oxford, Hadrien Pouget University of Oxford, Daniel Kroening Amazon, Tom Melham University of Oxford | ||
11:10 30mPoster | KLEEMA: A DSE based Mutation Analyser Posters Sangharatna Godboley National Institute of Technology Warangal, Golla Monika Rani National Institute of Technology, Warangal, Arpita Dutta National University of Singapore | ||
11:10 30mPoster | Target Code-coverage in APP Automatic Compatibility Testing Posters Sen Yang Army Engineering University of PLA, Song Huang Army Engineering University of PLA, Changyou Zheng Army Engineering University of PLA | ||
11:10 30mPoster | Native Implementation of Mutable Value Semantics Posters Dimi Racordon University of Geneva, Switzerland, Denys Shabalin EPFL, Switzerland, Dan Zheng Purdue University, Google Brain, Dave Abrahams Google, Brennan Saeta Google | ||
11:10 30mPoster | Toward Optimal MC/DC Test Case Generation Posters Sangharatna Godboley National Institute of Technology Warangal, Joxan Jaffar National University of Singapore, Rasool Maghareh Huawei, Arpita Dutta National University of Singapore | ||
11:10 30mPoster | Refactoring Scala Programs to Promote Functional Design Patterns Posters Namrata Malkani Indian Institute of Technology Mandi, Manas Thakur Indian Institute of Technology Mandi File Attached | ||
11:10 30mPoster | Can we run in parallel? Automating Loop Parallelization for TornadoVM Posters Shreyansh Kulshreshtha Indian Institute of Technology Mandi, Rishi Sharma Indian Institute of Technology Mandi, Manas Thakur Indian Institute of Technology Mandi |