Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Homotopical patch theory

Published: 19 August 2014 Publication History

Abstract

Homotopy type theory is an extension of Martin-Löf type theory, based on a correspondence with homotopy theory and higher category theory. In homotopy type theory, the propositional equality type becomes proof-relevant, and corresponds to paths in a space. This allows for a new class of datatypes, called higher inductive types, which are specified by constructors not only for points but also for paths. In this paper, we consider a programming application of higher inductive types. Version control systems such as Darcs are based on the notion of patches - syntactic representations of edits to a repository. We show how patch theory can be developed in homotopy type theory. Our formulation separates formal theories of patches from their interpretation as edits to repositories. A patch theory is presented as a higher inductive type. Models of a patch theory are given by maps out of that type, which, being functors, automatically preserve the structure of patches. Several standard tools of homotopy theory come into play, demonstrating the use of these methods in a practical programming context.

References

[1]
M. Abbott, T. Altenkirch, and N. Ghani. Containers: constructing strictly positive types. Theoretic Computer Science, 342(1):3--27, 2005.
[2]
T. Altenkirch. Containers in homotopy type theory. Talk at Mathematical Structures of Computation, Lyon, 2014.
[3]
T. Altenkirch, C. McBride, and W. Swierstra. Observational equality, now. In Programming Languages meets Program Verification Workshop, 2007.
[4]
S. Awodey and M. Warren. Homotopy theoretic models of identity types. Mathematical Proceedings of the Cambridge Philosophical Society, 2009.
[5]
B. Barras, T. Coquand, and S. Huber. A generalization of Takeuti-Gandy interpretation. To appear in Mathematical Structures in Computer Science, 2013.
[6]
M. Bezem, T. Coquand, and S. Huber. A model of type theory in cubical sets. Preprint, September 2013.
[7]
Camp Project. http://projects.haskell.org/camp/, 2010.
[8]
R. L. Constable, S. F. Allen, H. M. Bromley, W. R. Cleaveland, J. F. Cremer, R. W. Harper, D. J. Howe, T. B. Knoblock, N. P. Mendler, P. Panangaden, J. T. Sasaki, and S. F. Smith. Implementing Mathematics with the NuPRL Proof Development System. Prentice Hall, 1986.
[9]
Coq Development Team. The Coq Proof Assistant Reference Manual, version 8.2. INRIA, 2009. Available from http://coq.inria.fr/.
[10]
J. Dagit. Type-correct changes - a safe approach to version control implementation. MS Thesis, 2009.
[11]
N. Gambino and R. Garner. The identity type weak factorisation system. Theoretical Computer Science, 409(3):94--109, 2008.
[12]
Ganesh Sittampalam et al. Some properties of darcs patch theory. Available from http://urchin.earth.li/darcs/ganesh/darcs-patch-theory/theory/formal.pdf, 2005.
[13]
R. Garner. Two-dimensional models of type theory. Mathematical. Structures in Computer Science, 19(4):687--736, 2009.
[14]
M. Hofmann and T. Streicher. The groupoid interpretation of type theory. In Twenty-five years of constructive type theory. Oxford University Press, 1998.
[15]
R. Houston. On editing text. http://bosker.wordpress.com/2012/05/10/on-editing-text/, 2012.
[16]
J. Jacobson. A formalization of darcs patch theory using inverse semigroups. Available from ftp://ftp.math.ucla.edu/pub/camreport/cam09-83.pdf, 2009.
[17]
C. Kapulkin, P. L. Lumsdaine, and V. Voevodsky. The simplicial model of univalent foundations. arXiv:1211.2851, 2012.
[18]
F. W. Lawvere. Functorial Semantics of Algebraic Theories and Some Algebraic Problems in the context of Functorial Semantics of Algebraic Theories. PhD thesis, Columbia University, 1963.
[19]
D. R. Licata and G. Brunerie. πn(Sn) in homotopy type theory. In Certified Programs and Proofs, 2013.
[20]
D. R. Licata and E. Finster. Eilenberg-MacLane spaces in homotopy type theory. Draft available from http://dlicata.web.wesleyan.edu/pubs.html, 2014.
[21]
D. R. Licata and R. Harper. 2-dimensional directed type theory. In Mathematical Foundations of Programming Semantics (MFPS), 2011.
[22]
D. R. Licata and R. Harper. Canonicity for 2-dimensional type theory. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2012.
[23]
D. R. Licata and M. Shulman. Calculating the fundamental group of the circle in homotopy type theory. In IEEE Symposium on Logic in Computer Science, 2013.
[24]
P. L. Lumsdaine. Weak ω-categories from intensional type theory. In International Conference on Typed Lambda Calculi and Applications, 2009.
[25]
P. L. Lumsdaine. Higher inductive types: a tour of the menagerie. http://homotopytypetheory.org/2011/04/24/higher-inductive-types-a-tour-of-the-menagerie/, April 2011.
[26]
P. L. Lumsdaine and M. Shulman. Higher inductive types. In preparation, 2013.
[27]
C. McBride. Dependently Typed Functional Programs and Their Proofs. PhD thesis, University of Edinburgh, 2000.
[28]
S. Mimram and C. Di Giusto. A categorical theory of patches. Electronic Notes in Theoretic Computer Science, 298:283--307, 2013.
[29]
U. Norell. Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers University of Technology, 2007.
[30]
J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In IEEE Symposium on Logic in Computer Science, 2002.
[31]
D. Roundy. Darcs: Distributed version management in haskell. In ACM SIGPLAN Workshop on Haskell. ACM, 2005.
[32]
M. Shulman. Homotopy type theory VI: higher inductive types. http://golem.ph.utexas.edu/category/2011/04/homotopy_type_theory_vi.html, April 2011.
[33]
M. Shulman. Univalence for inverse diagrams, oplax limits, and gluing, and homotopy canonicity. arXiv:1203.3253, 2013.
[34]
W. Swierstra and A. Löh. The semantics of version control. Available from http://www.staff.science.uu.nl/~swier004/, 2014.
[35]
The Univalent Foundations Program, Institute for Advanced Study. Homotopy Type Theory: Univalent Foundations Of Mathematics. Available from homotopytypetheory.org/book, 2013.
[36]
B. van den Berg and R. Garner. Types are weak ω-groupoids. Proceedings of the London Mathematical Society, 102(2):370--394, 2011.
[37]
V. Voevodsky. Univalent foundations of mathematics. Invited talk at WoLLIC 2011 18th Workshop on Logic, Language, Information and Computation, 2011.
[38]
M. A.Warren. Homotopy theoretic aspects of constructive type theory. PhD thesis, Carnegie Mellon University, 2008.

Cited By

View all
  • (2023)Homotopy Type Theory for Sewn QuiltsProceedings of the 11th ACM SIGPLAN International Workshop on Functional Art, Music, Modelling, and Design10.1145/3609023.3609803(32-43)Online publication date: 30-Aug-2023
  • (2019)Mutants as Patches: Towards a formal approach to Mutation TestingFoundations of Computing and Decision Sciences10.2478/fcds-2019-001944:4(379-405)Online publication date: 25-Nov-2019
  • (2017)Computational higher-dimensional type theoryACM SIGPLAN Notices10.1145/3093333.300986152:1(680-693)Online publication date: 1-Jan-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 49, Issue 9
ICFP '14
September 2014
361 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2692915
Issue’s Table of Contents
  • cover image ACM Conferences
    ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programming
    August 2014
    390 pages
    ISBN:9781450328739
    DOI:10.1145/2628136
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 the author(s) 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].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 August 2014
Published in SIGPLAN Volume 49, Issue 9

Check for updates

Author Tags

  1. languages
  2. theory

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)17
  • Downloads (Last 6 weeks)2
Reflects downloads up to 23 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Homotopy Type Theory for Sewn QuiltsProceedings of the 11th ACM SIGPLAN International Workshop on Functional Art, Music, Modelling, and Design10.1145/3609023.3609803(32-43)Online publication date: 30-Aug-2023
  • (2019)Mutants as Patches: Towards a formal approach to Mutation TestingFoundations of Computing and Decision Sciences10.2478/fcds-2019-001944:4(379-405)Online publication date: 25-Nov-2019
  • (2017)Computational higher-dimensional type theoryACM SIGPLAN Notices10.1145/3093333.300986152:1(680-693)Online publication date: 1-Jan-2017
  • (2017)Computational higher-dimensional type theoryProceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages10.1145/3009837.3009861(680-693)Online publication date: 1-Jan-2017
  • (2024)An electrical engineering perspective on naturality in computational physicsAdvances in Computational Mathematics10.1007/s10444-024-10197-650:5Online publication date: 1-Oct-2024
  • (2021)Concise, type-safe, and efficient structural diffingProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454052(406-419)Online publication date: 19-Jun-2021
  • (2020)Incremental Map-Reduce on Repository History2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER48275.2020.9054811(320-331)Online publication date: Feb-2020
  • (2019)Lambda: the ultimate sublanguage (experience report)Proceedings of the ACM on Programming Languages10.1145/33427133:ICFP(1-17)Online publication date: 26-Jul-2019
  • (2019)Teaching the art of functional programming using automated grading (experience report)Proceedings of the ACM on Programming Languages10.1145/33417193:ICFP(1-15)Online publication date: 26-Jul-2019
  • (2019)Call-by-need is clairvoyant call-by-valueProceedings of the ACM on Programming Languages10.1145/33417183:ICFP(1-23)Online publication date: 26-Jul-2019
  • Show More Cited By

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