Nagy Gergely; Oláh Gábor; Porkoláb Zoltán: Type inference of simple recursive functions in Scala. In: Acta cybernetica, (25) 4. pp. 797-815. (2022)
Előnézet |
Cikk, tanulmány, mű
cybernetica_025_numb_004_797-815.pdf Letöltés (533kB) | Előnézet |
Absztrakt (kivonat)
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.
| Mű típusa: | Cikk, tanulmány, mű |
|---|---|
| Befoglaló folyóirat/kiadvány címe: | Acta cybernetica |
| Dátum: | 2022 |
| Kötet: | 25 |
| Szám: | 4 |
| ISSN: | 2676-993X |
| Oldalak: | pp. 797-815 |
| Nyelv: | angol |
| Kiadó: | University of Szeged, Institute of Informatics |
| Kiadás helye: | Szeged |
| Befoglaló mű URL: | https://acta.bibl.u-szeged.hu/86901/ |
| DOI: | 10.14232/actacyb.282762 |
| Kulcsszavak: | Programozási nyelv - Scala, Programozás |
| Megjegyzések: | Bibliogr.: p. 814-815. ; összefoglalás angol nyelven |
| Szakterület: | 01. Természettudományok 01. Természettudományok > 01.02. Számítás- és információtudomány |
| Feltöltés dátuma: | 2025. ápr. 15. 11:27 |
| Utolsó módosítás: | 2025. ápr. 15. 11:27 |
| URI: | http://acta.bibl.u-szeged.hu/id/eprint/86955 |
![]() |
Tétel nézet |

