A Formal Comparison of Approaches to Datatype-Generic Programming

Computer Science – Programming Languages

Scientific paper

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

In Proceedings MSFP 2012, arXiv:1202.2407

Scientific paper

10.4204/EPTCS.76.6

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.

No associations

LandOfFree

Say what you really think

Search LandOfFree.com for scientists and scientific papers. Rate them and share your experience with other people.

Rating

A Formal Comparison of Approaches to Datatype-Generic Programming does not yet have a rating. At this time, there are no reviews or comments for this scientific paper.

If you have personal experience with A Formal Comparison of Approaches to Datatype-Generic Programming, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and A Formal Comparison of Approaches to Datatype-Generic Programming will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFWR-SCP-O-88575

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.