Deriving Dependently-Typed OOP from First Principles -- Extended Version with Additional Appendices

Guardado en:
Detalles Bibliográficos
Publicado en:arXiv.org (Mar 11, 2024), p. n/a
Autor principal: Binder, David
Otros Autores: Skupin, Ingo, Süberkrüb, Tim, Ostermann, Klaus
Publicado:
Cornell University Library, arXiv.org
Materias:
Acceso en línea:Citation/Abstract
Full text outside of ProQuest
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!

MARC

LEADER 00000nab a2200000uu 4500
001 2955956674
003 UK-CbPIL
022 |a 2331-8422 
024 7 |a 10.1145/3649846  |2 doi 
035 |a 2955956674 
045 0 |b d20240311 
100 1 |a Binder, David 
245 1 |a Deriving Dependently-Typed OOP from First Principles -- Extended Version with Additional Appendices 
260 |b Cornell University Library, arXiv.org  |c Mar 11, 2024 
513 |a Working Paper 
520 3 |a The expression problem describes how most types can easily be extended with new ways to produce the type or new ways to consume the type, but not both. When abstract syntax trees are defined as an algebraic data type, for example, they can easily be extended with new consumers, such as print or eval, but adding a new constructor requires the modification of all existing pattern matches. The expression problem is one way to elucidate the difference between functional or data-oriented programs (easily extendable by new consumers) and object-oriented programs (easily extendable by new producers). This difference between programs which are extensible by new producers or new consumers also exists for dependently typed programming, but with one core difference: Dependently-typed programming almost exclusively follows the functional programming model and not the object-oriented model, which leaves an interesting space in the programming language landscape unexplored. In this paper, we explore the field of dependently-typed object-oriented programming by deriving it from first principles using the principle of duality. That is, we do not extend an existing object-oriented formalism with dependent types in an ad-hoc fashion, but instead start from a familiar data-oriented language and derive its dual fragment by the systematic use of defunctionalization and refunctionalization. Our central contribution is a dependently typed calculus which contains two dual language fragments. We provide type- and semantics-preserving transformations between these two language fragments: defunctionalization and refunctionalization. We have implemented this language and these transformations and use this implementation to explain the various ways in which constructions in dependently typed programming can be explained as special instances of the phenomenon of duality. 
653 |a Language 
653 |a First principles 
653 |a Consumers 
653 |a Semantics 
653 |a Fragments 
653 |a Functional programming 
653 |a Programming languages 
653 |a Object oriented programming 
653 |a Extensibility 
700 1 |a Skupin, Ingo 
700 1 |a Süberkrüb, Tim 
700 1 |a Ostermann, Klaus 
773 0 |t arXiv.org  |g (Mar 11, 2024), p. n/a 
786 0 |d ProQuest  |t Engineering Database 
856 4 1 |3 Citation/Abstract  |u https://www.proquest.com/docview/2955956674/abstract/embedded/7BTGNMKEMPT1V9Z2?source=fedsrch 
856 4 0 |3 Full text outside of ProQuest  |u http://arxiv.org/abs/2403.06707