A Formal Comparison of Approaches to Datatype-Generic Programming

Datatype-generic programming increases program abstraction and reuse by making functions operate uniformly across different types. Many approaches to generic programming have been proposed over the years, most of them for Haskell, but recently also for dependently typed languages such as Agda. Diffe...

Celý popis

Uložené v:
Podrobná bibliografia
Vydané v:arXiv.org
Hlavní autori: José Pedro Magalhães, Löh, Andres
Médium: Paper
Jazyk:English
Vydavateľské údaje: Ithaca Cornell University Library, arXiv.org 14.02.2012
Predmet:
ISSN:2331-8422
On-line prístup:Získať plný text
Tagy: Pridať tag
Žiadne tagy, Buďte prvý, kto otaguje tento záznam!
Abstract Datatype-generic programming increases program abstraction and reuse by making functions operate uniformly across different types. Many approaches to generic programming have been proposed over the years, most of them for Haskell, but recently also for dependently typed languages such as Agda. Different approaches vary in expressiveness, ease of use, and implementation techniques. Some work has been done in comparing the different approaches informally. However, to our knowledge there have been no attempts to formally prove relations between different approaches. We thus present a formal comparison of generic programming libraries. We show how to formalise different approaches in Agda, including a coinductive representation, and then establish theorems that relate the approaches to each other. We provide constructive proofs of inclusion of one approach in another that can be used to convert between approaches, helping to reduce code duplication across different libraries. Our formalisation also helps in providing a clear picture of the potential of each approach, especially in relating different generic views and their expressiveness.
AbstractList Datatype-generic programming increases program abstraction and reuse by making functions operate uniformly across different types. Many approaches to generic programming have been proposed over the years, most of them for Haskell, but recently also for dependently typed languages such as Agda. Different approaches vary in expressiveness, ease of use, and implementation techniques. Some work has been done in comparing the different approaches informally. However, to our knowledge there have been no attempts to formally prove relations between different approaches. We thus present a formal comparison of generic programming libraries. We show how to formalise different approaches in Agda, including a coinductive representation, and then establish theorems that relate the approaches to each other. We provide constructive proofs of inclusion of one approach in another that can be used to convert between approaches, helping to reduce code duplication across different libraries. Our formalisation also helps in providing a clear picture of the potential of each approach, especially in relating different generic views and their expressiveness.
Author José Pedro Magalhães
Löh, Andres
Author_xml – sequence: 1
  fullname: José Pedro Magalhães
– sequence: 2
  givenname: Andres
  surname: Löh
  fullname: Löh, Andres
BookMark eNotjrFOwzAUAC0EEqV0Z7TEnPL8bMfJGAVakCrB0L16ceySqomDnSL4eyqV6ba7u2PXQxgcYw8ClqrQGp4o_nTfS4GASywRrtgMpRRZoRBv2SKlAwBgblBrOWNVxVch9nTkdehHil0KAw-eV-MYA9lPl_gU-DNNNP2OLlu7wcXO8o8Y9pH6vhv29-zG0zG5xT_nbLt62dav2eZ9_VZXm4y0UJlpc914S7n1qpCyKchbK5F0WTrjGutbJwk8lG1pXIsCS1KtQQUGBRgt5Jw9XrTnr6-TS9PuEE5xOBd3CIUucgOo5B9FP0yv
ContentType Paper
Copyright 2012. This work is published under http://arxiv.org/licenses/nonexclusive-distrib/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Copyright_xml – notice: 2012. This work is published under http://arxiv.org/licenses/nonexclusive-distrib/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
DBID 8FE
8FG
ABJCF
ABUWG
AFKRA
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
HCIFZ
L6V
M7S
PHGZM
PHGZT
PIMPY
PKEHL
PQEST
PQGLB
PQQKQ
PQUKI
PRINS
PTHSS
DOI 10.48550/arxiv.1202.2920
DatabaseName ProQuest SciTech Collection
ProQuest Technology Collection
ProQuest Materials Science & Engineering
ProQuest Central (Alumni)
ProQuest Central UK/Ireland
ProQuest Central Essentials
ProQuest Central
Technology collection
ProQuest One
ProQuest Central
SciTech Premium Collection
ProQuest Engineering Collection
Engineering Database
ProQuest Central Premium
ProQuest One Academic
Publicly Available Content Database
ProQuest One Academic Middle East (New)
ProQuest One Academic Eastern Edition (DO NOT USE)
ProQuest One Applied & Life Sciences
ProQuest One Academic (retired)
ProQuest One Academic UKI Edition
ProQuest Central China
Engineering collection
DatabaseTitle Publicly Available Content Database
Engineering Database
Technology Collection
ProQuest One Academic Middle East (New)
ProQuest Central Essentials
ProQuest One Academic Eastern Edition
ProQuest Central (Alumni Edition)
SciTech Premium Collection
ProQuest One Community College
ProQuest Technology Collection
ProQuest SciTech Collection
ProQuest Central China
ProQuest Central
ProQuest One Applied & Life Sciences
ProQuest Engineering Collection
ProQuest One Academic UKI Edition
ProQuest Central Korea
Materials Science & Engineering Collection
ProQuest Central (New)
ProQuest One Academic
ProQuest One Academic (New)
Engineering Collection
DatabaseTitleList Publicly Available Content Database
Database_xml – sequence: 1
  dbid: PIMPY
  name: Publicly Available Content Database
  url: http://search.proquest.com/publiccontent
  sourceTypes: Aggregation Database
DeliveryMethod fulltext_linktorsrc
Discipline Physics
EISSN 2331-8422
Genre Working Paper/Pre-Print
GroupedDBID 8FE
8FG
ABJCF
ABUWG
AFKRA
ALMA_UNASSIGNED_HOLDINGS
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
FRJ
HCIFZ
L6V
M7S
M~E
PHGZM
PHGZT
PIMPY
PKEHL
PQEST
PQGLB
PQQKQ
PQUKI
PRINS
PTHSS
ID FETCH-LOGICAL-a514-7d65bfca6cf4833b8afcc32a599e7ebcfde3a0f09d97ed2129a4d724072107513
IEDL.DBID M7S
IngestDate Mon Jun 30 09:32:08 EDT 2025
IsDoiOpenAccess true
IsOpenAccess true
IsPeerReviewed false
IsScholarly false
Language English
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-a514-7d65bfca6cf4833b8afcc32a599e7ebcfde3a0f09d97ed2129a4d724072107513
Notes SourceType-Working Papers-1
ObjectType-Working Paper/Pre-Print-1
content type line 50
OpenAccessLink https://www.proquest.com/docview/2085867024?pq-origsite=%requestingapplication%
PQID 2085867024
PQPubID 2050157
ParticipantIDs proquest_journals_2085867024
PublicationCentury 2000
PublicationDate 20120214
PublicationDateYYYYMMDD 2012-02-14
PublicationDate_xml – month: 02
  year: 2012
  text: 20120214
  day: 14
PublicationDecade 2010
PublicationPlace Ithaca
PublicationPlace_xml – name: Ithaca
PublicationTitle arXiv.org
PublicationYear 2012
Publisher Cornell University Library, arXiv.org
Publisher_xml – name: Cornell University Library, arXiv.org
SSID ssj0002672553
Score 1.4778196
SecondaryResourceType preprint
Snippet Datatype-generic programming increases program abstraction and reuse by making functions operate uniformly across different types. Many approaches to generic...
SourceID proquest
SourceType Aggregation Database
SubjectTerms Programming
Title A Formal Comparison of Approaches to Datatype-Generic Programming
URI https://www.proquest.com/docview/2085867024
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwpV09T8MwED1BCxIT3-KjVB5YTRM7seMJldIKBqoIOpSpcvwhVYK2JKXi52MnaRmQWBitSJZ1ju5e7l7eA7gOQuWN290N0EjjSBGKhbUKB8wSGRPOsrgym-DDYTIei7RuuBU1rXKdE8tErefK98g73ksyYdyVlNvFB_auUX66WltobEPTqySEJXXvZdNjIYw7xEyr6WQp3dWR-dd0dRMS_xOWIMGvDFyWlcH-fw90AM1ULkx-CFtmdgS7JZ1TFcfQ7aKBB6NvqLfxGURzi7q1grgp0HKO7qVDmu47FJfa01OF0oqs9e7K2QmMBv1R7wHXZglYOsyDuWZxZpVkykYJpVkirVLUhVsIw02mrDZUBjYQWnCjXb0SMtK8kkdzqCGkp9CYzWfmDJDbI5Mkllw7uBIZLVimA2KlCSwTmY3OobUOyKR-4YvJTzQu_n58CXsOcxBPfA6jFjSW-ae5gh21Wk6LvA3Nu_4wfW6X9-hW6eNT-voNoDKoxw
linkProvider ProQuest
linkToHtml http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMw1V1LTwIxEJ4gaPTkOz5Qe9Djym532dKDMQQkEJCQyIEb6faRkCiLLKL-KP-j013Ag4k3Dp6bNG2nnfnafjMfwLXrSSvcjhbwA-UEkvoON0Y6bmioKFMWRuVMbIJ1u5XBgPdy8LXMhbG0yqVPTB21iqV9Iy9ZLclKyDCk3E9eHasaZX9XlxIa2bZo6893vLIld6062veG0sZDv9Z0FqoCjkBw4DAVliMjRShNUPH9qCKMlD6Oi3PNdCSN0r5wjcsVZ1qhY-ciUCyrI4bh1fOx2w0oIIqgPGUKPq2edGjIEKD72WdoWimsJKYfo_mtR23OF6fuL4efRrHG7j-b_x4UemKip_uQ0-MD2ErJqjI5hGqVNCzUfia1lYoiiQ2pLuqj64TMYlIXiKPxlu2klbVHkvQyKtoLBusj6K9j0MeQH8djfQIE-4gELQumEIwFWvEwUi41Qrsm5JEJTqG4XP_h4jgnw5_FP_u7-Qq2m_3HzrDT6rbPYQfRFbUUby8oQn42fdMXsCnns1EyvUy3DoHhmk31DT4wAng
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=A+Formal+Comparison+of+Approaches+to+Datatype-Generic+Programming&rft.jtitle=arXiv.org&rft.au=Jos%C3%A9+Pedro+Magalh%C3%A3es&rft.au=L%C3%B6h%2C+Andres&rft.date=2012-02-14&rft.pub=Cornell+University+Library%2C+arXiv.org&rft.eissn=2331-8422&rft_id=info:doi/10.48550%2Farxiv.1202.2920