An Algorithm for Partial Elimination of Jumps in an Object-Oriented Dataflow Language
Open Access
- 8 December 2023
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 152-164
Abstract
Despite enduring criticisms spanning several decades, jump statements such as goto, break, continue, and return remain prevalent in imperative programming languages, including but not limited to C++, Java, and Python. The academic community has yet to reach a consensus regarding whether the refactoring of source code in these languages to eliminate such statements can indeed enhance code readability. Nevertheless, it is evident that automated program analysis would derive substantial benefits from this refactoring, given that structured code analysis is more straightforward than analyzing code that exhibits capricious alterations in its control flow. While algorithms tailored for this refactoring process have been proposed for certain imperative languages, we introduce a congruent algorithm, specifically designed for a dataflow programming language. It’s important to note that although dataflow languages lack jump statements, they might incorporate jump-objects (in object-oriented contexts) or jump-functions (within functional paradigms). Our algorithm has been instantiated as a command-line tool tailored for refactoring EO, an object-oriented dataflow language. Preliminary tests with several EO programs have validated the tool’s efficacy. Leveraging φ -calculas, we provide a formal proof underscoring the validity of every transformation encompassed within our algorithm.Keywords
This publication has 38 references indexed in Scilit:
- A Toolkit for the Development of Data-Driven Functional Parallel Programmes2018
- Integrating Lucid’s Declarative Dataflow Paradigm into Object-OrientationMathematics in Computer Science, 2008
- A survey of stream processingActa Informatica, 1997
- GOTO Removal Based on Regular ExpressionsJournal of Software Maintenance: Research and Practice, 1997
- A history of data-flow languagesIEEE Annals of the History of Computing, 1994
- Executing a program on the MIT tagged-token dataflow architectureIEEE Transactions on Computers, 1990
- SIGNAL: A declarative language for synchronous programming of real-time systems1987
- PROGRAPH: A preliminary reportComputer Languages, 1985
- First version of a data flow procedure language1974
- Notes on avoiding “go to” statementsInformation Processing Letters, 1971