Autor: |
Maciej Piróg, Jeremy Gibbons |
Jazyk: |
angličtina |
Rok vydání: |
2016 |
Předmět: |
|
Zdroj: |
Electronic Proceedings in Theoretical Computer Science, Vol 212, Iss Proc. WoC 2015, Pp 53-62 (2016) |
Druh dokumentu: |
article |
ISSN: |
2075-2180 |
DOI: |
10.4204/EPTCS.212.4 |
Popis: |
Push/enter and eval/apply are two calling conventions used in implementations of functional languages. In this paper, we explore the following observation: when considering functions with multiple arguments, the stack under the push/enter and eval/apply conventions behaves similarly to two particular implementations of the list datatype: the regular cons-list and a form of lists with lazy concatenation respectively. Along the lines of Danvy et al.'s functional correspondence between definitional interpreters and abstract machines, we use this observation to transform an abstract machine that implements push/enter into an abstract machine that implements eval/apply. We show that our method is flexible enough to transform the push/enter Spineless Tagless G-machine (which is the semantic core of the GHC Haskell compiler) into its eval/apply variant. |
Databáze: |
Directory of Open Access Journals |
Externí odkaz: |
|