Flovver: A graphical functional language with a compiler focused on recursion optimization

Software of Computer, Telecommunications and Control Systems

Visual languages reflect many parts of textual programming languages, however, the existing visual programming solutions lack higher-order functions and recursion concepts. The article introduces the design of a visual language Flovver, which implements the concepts of graphical functional programming. We propose a programming language that supports higher-order and recursive computations. The language accepts programs in a specially designed notation with semantics which we explain in this paper using the lambda calculus. The syntactic unit of such a program is a function that can be combined in a specific way with other functions. We present a fixpoint combinator that helps to specify a recursive behavior in the graphical functional language. To obtain calculate-effective programs, we design and implement a compiler for it, which is capable to optimize recursive programs. We also discuss code generation to JavaScript using the static single assignment (SSA) form. Finally, we propose a sketch of graphical integrated environment to design programs in Flovver using pre-defined blocks, and we present the generated SSA-like code in the paper. The approach is demonstrated on well-known Factorial and Fibonacci recursive programs.