Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2429069.2429082acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Abstraction and invariance for algebraically indexed types

Published: 23 January 2013 Publication History

Abstract

Reynolds' relational parametricity provides a powerful way to reason about programs in terms of invariance under changes of data representation. A dazzling array of applications of Reynolds' theory exists, exploiting invariance to yield "free theorems", non-inhabitation results, and encodings of algebraic datatypes. Outside computer science, invariance is a common theme running through many areas of mathematics and physics. For example, the area of a triangle is unaltered by rotation or flipping. If we scale a triangle, then we scale its area, maintaining an invariant relationship between the two. The transformations under which properties are invariant are often organised into groups, with the algebraic structure reflecting the composability and invertibility of transformations.
In this paper, we investigate programming languages whose types are indexed by algebraic structures such as groups of geometric transformations. Other examples include types indexed by principals--for information flow security--and types indexed by distances--for analysis of analytic uniform continuity properties. Following Reynolds, we prove a general Abstraction Theorem that covers all these instances. Consequences of our Abstraction Theorem include free theorems expressing invariance properties of programs, type isomorphisms based on invariance properties, and non-definability results indicating when certain algebraically indexed types are uninhabited or only inhabited by trivial programs. We have fully formalised our framework and most examples in Coq.

Supplementary Material

JPG File (r1d1_talk8.jpg)
MP4 File (r1d1_talk8.mp4)

References

[1]
M. Abadi, A. Banerjee, N. Heintze, and J. G. Riecke. A Core Calculusof Dependency. Proceedings, POPL, pp.147--160, 1999.
[2]
R. Atkey. Syntax for Free: Representing Syntax with Binding UsingParametricity. Proceedings, TLCA,pp. 35--49, 2009.
[3]
N. Benton, C.-K. Hur, A. J. Kennedy, C. McBride.Strongly Typed Term Representations in Coq. Journal of Automated Reasoning 49(2), pp. 141--159, 2012.
[4]
N. Benton, A. Kennedy, M. Hofmann, L. Beringer.Reading, Writing and Relations.Proceedings, APLAS,pp. 114--130, 2006.
[5]
J.-P. Bernardy, P. Jansson, R. Paterson.Proofs for Free: Parametricity for Dependent Types. Journal of Functional Programming 22(2), pp. 107--152, 2012.
[6]
L. Cardelli, P. Gardner.Processes in Space. Programs, Proofs, Processes: Proceedings, CiE, pp. 78--87, %LNCS vol. 6158, 2010.
[7]
Computational Geometry Algorithms Library (CGAL): User and ReferenceManual. Available at http://www.cgal.org.
[8]
S. Chaudhuri, S. Gulwani, and R. Lublinerman. Continuity Analysis ofPrograms. Proceedings, POPL, pp. 57--70, 2010.
[9]
J. Gallier. Geometric Methods and Applications For ComputerScience and Engineering. Springer, 2011.
[10]
J. Harrison.Without Loss of Generality.Proceedings, TPHOLs,pp. 43--59, 2009.
[11]
M. Hofmann. Correctness of Effect-based ProgramTransformations. Formal Logical Methods for System Security andCorrectness, pp. 149--173, 2008.
[12]
M. P. Jones. Functional Programming with Overloading and Higher-OrderPolymorphism. Proceedings, AFP,pp. 97--136, 1995.
[13]
A. J. Kennedy. Relational Parametricity and Units of Measure.Proceedings, POPL, pp. 442--455, 1997.
[14]
A. J. Kennedy. Types for Units-of-Measure: Theory and Practice.Central European Functional Programming school (CEFP), pp. 268--305, LNCS vol. 6299, 2010.
[15]
S. Mann, N. Litke, T. DeRose. A Coordinate Free Geometry ADT.Technical Report CS-97--15, University of Waterloo, 1997.
[16]
A. M. Pitts. Parametric Polymorphism and Operational Equivalence. Mathematical Structures in Computer Science 10(3), pp. 321--359,2000.
[17]
J. Reed and B. C. Pierce. Distance Makes the Types Grow Stronger.Proceedings, ICFP, pp. 157--169, 2010.
[18]
J. C. Reynolds. Types, Abstraction and Parametric Polymorphism. Information Processing 83, pp. 513--523, 1983.
[19]
A. Sabelfeld and D. Sands. A PER Model of Secure Information Flow inSequential Programs. Higher-Order and Symbolic Computation 14(1), pp. 59--91, 2001.
[20]
N. Shikuma and A.Igarahsi. Proving Noninterference by a FullyComplete Translation to the Simply Typed lambda-calculus. Logical Methods in Computer Science 4(3), 2008.
[21]
S. Tse and S. Zdancewic. Translating Dependency into Parametricity.Proceedings, ICFP, pp.115--125, 2004.
[22]
P. Wadler. Theorems for Free!. Proceedings, FPCA,pp. 347--359, 1989.

Cited By

View all
  • (2024)Sensitivity by ParametricityProceedings of the ACM on Programming Languages10.1145/36897268:OOPSLA2(415-441)Online publication date: 8-Oct-2024
  • (2018)Can an A.I. win a medal in the mathematical olympiad? – Benchmarking mechanized mathematics on pre-university problems1AI Communications10.3233/AIC-18076231:3(251-266)Online publication date: 17-May-2018
  • (2015)A typechecker plugin for units of measure: domain-specific constraint solving in GHC HaskellACM SIGPLAN Notices10.1145/2887747.280430550:12(11-22)Online publication date: 30-Aug-2015
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '13: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2013
586 pages
ISBN:9781450318327
DOI:10.1145/2429069
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 48, Issue 1
    POPL '13
    January 2013
    561 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2480359
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 23 January 2013

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. computational geometry
  2. dimensional analysis
  3. information flow
  4. invariance
  5. metric types
  6. parametricity
  7. uniform continuity
  8. units of measure

Qualifiers

  • Research-article

Conference

POPL '13
Sponsor:

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)9
  • Downloads (Last 6 weeks)0
Reflects downloads up to 04 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Sensitivity by ParametricityProceedings of the ACM on Programming Languages10.1145/36897268:OOPSLA2(415-441)Online publication date: 8-Oct-2024
  • (2018)Can an A.I. win a medal in the mathematical olympiad? – Benchmarking mechanized mathematics on pre-university problems1AI Communications10.3233/AIC-18076231:3(251-266)Online publication date: 17-May-2018
  • (2015)A typechecker plugin for units of measure: domain-specific constraint solving in GHC HaskellACM SIGPLAN Notices10.1145/2887747.280430550:12(11-22)Online publication date: 30-Aug-2015
  • (2015)A typechecker plugin for units of measure: domain-specific constraint solving in GHC HaskellProceedings of the 2015 ACM SIGPLAN Symposium on Haskell10.1145/2804302.2804305(11-22)Online publication date: 30-Aug-2015
  • (2014)From parametricity to conservation laws, via Noether's theoremACM SIGPLAN Notices10.1145/2578855.253586749:1(491-502)Online publication date: 8-Jan-2014
  • (2014)A relationally parametric model of dependent type theoryACM SIGPLAN Notices10.1145/2578855.253585249:1(503-515)Online publication date: 8-Jan-2014
  • (2014)From parametricity to conservation laws, via Noether's theoremProceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2535838.2535867(491-502)Online publication date: 11-Jan-2014
  • (2014)A relationally parametric model of dependent type theoryProceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2535838.2535852(503-515)Online publication date: 11-Jan-2014
  • (2014)A Core Quantitative Coeffect CalculusProceedings of the 23rd European Symposium on Programming Languages and Systems - Volume 841010.1007/978-3-642-54833-8_19(351-370)Online publication date: 5-Apr-2014
  • (2022)Formula Simplification via Invariance Detection by Algebraically Indexed TypesAutomated Reasoning10.1007/978-3-031-10769-6_24(388-406)Online publication date: 1-Aug-2022

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media