@article{Nagy_Oláh_Porkoláb_2020, title={Type Inference of Simple Recursive Functions in Scala}, volume={25}, url={https://cyber.bibl.u-szeged.hu/index.php/actcybern/article/view/4098}, DOI={10.14232/actacyb.282762}, abstractNote={<p>Scala is a well-established multi-paradigm programming language known for its terseness that includes advanced type inference features. Unfortunately this type inferring algorithm does not support typing of recursive functions. This is both against the original design philosophies of Scala and puts an unnecessary burden on the programmer. In this paper we propose a method to compute the return types for simple recursive functions in Scala. We make a heuristic assumption on the return type based on the non-recursive execution branches and provide a proof of this method’s correctness. The algorithm does not have a significant effect on the compilation speed. We implemented our method as an extension prototype in the Scala compiler and used it to successfully test our method on various examples. The compiler extension prototype is available for further tests.</p&gt;}, number={4}, journal={Acta Cybernetica}, author={Nagy, Gergely and OláhGábor and PorkolábZoltán}, year={2020}, month={Oct.}, pages={797-815} }