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.

This publication has 38 references indexed in Scilit: