Abstract
We consider the problem of efficient representation of dependently typed data. In particular, we consider a language TT based on Dybjer’s notion of inductive families [10] and reanalyse their general form with a view to optimising the storage associated with their use. We introduce an execution language, ExTT, which allows the commenting out of computationally irrelevant subterms and show how to use properties of elimination rules to elide constructor arguments and tags in ExTT. We further show how some types can be collapsed entirely at run-time. Several examples are given, including a representation of the simply typed λ-calculus for which our analysis yields an 80% reduction in run-time storage requirements.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Altenkirch, T., Hofmann, M., Streicher, T.: Categorical reconstruction of a reduction free normalization proof (1996)
Augustsson, L.: Compiling pattern matching. In: Jouannaud, J.-P. (ed.) Functional Programming Languages and Computer Architecture, September 1985, pp. 368–381. Springer, Heidelberg (1985)
Augustsson, L., Carlsson, M.: An exercise in dependent types: A well-typed interpreter (1999), http://www.cs.chalmers.se/~augustss/cayenne/
Berardi, S.: Pruning simply typed lambda terms. Journal of Logic and Computation 6(5), 663–681 (1996)
Berger, U., Schwichtenberg, H.: An inverse of the evaluation functional for typed λ-calculus. In: Vemuri, R. (ed.) Proceedings of the Sixth Annual IEEE Symposium on Logic in Computer Science, pp. 203–211. IEEE Computer Society Press, Los Alamitos (1991)
Bove, A., Capretta, V.: Modelling general recursion in type theory (September 2002)
Callaghan, P., Luo, Z.: Implementation techniques for inductive types in plastic. In: Coquand, T., Nordström, B., Dybjer, P., Smith, J. (eds.) TYPES 1999. LNCS, vol. 1956, pp. 94–113. Springer, Heidelberg (2000)
Coq Development Team. The Coq proof assistant — reference manual (2001)
André Lu´ıs de Medeiros Santos. Compilation By Transformatio. In: Non-Strict Functional Languages. PhD thesis, University of Glasgow (1995)
Dybjer, P.: Inductive families. Formal Aspects Of Computing 6, 440–465 (1994)
Harper, R., Pollack, R.: Type checking with universes. Theoretical Computer Science 89(1), 107–136 (1991)
Johnsson, T.: Efficient compilation of lazy evaluation (1984)
Letouzey, P.: A new extraction for Coq. In: Geuvers, H., Wiedijk, F. (eds.) TYPES 2002. LNCS, vol. 2646, pp. 200–219. Springer, Heidelberg (2003)
Luo, Z.: Computation and Reasoning – A Type Theory for Computer Science. International Series of Monographs on Computer Science. OUP (1994)
Luo, Z., Pollack, R.: Lego proof development system: User’s manual. Technical report, LFCS, University of Edinburgh (1992)
Magaud, N., Bertot, Y.: Changing data structures in type theory: A study of natural numbers. In: Callaghan, P., Luo, Z., McKinna, J., Pollack, R. (eds.) TYPES 2000. LNCS, vol. 2277, pp. 181–196. Springer, Heidelberg (2002)
Magnusson, L.: The implementation of ALF – A Proof Editor based on Martin- Löf’s Monomorphic Type Theory with Explicit Substitutions. PhD thesis, Chalmers University of Technology, Göteborg (1994)
McBride, C.: Dependently Typed Functional Programs and their proofs. PhD thesis, University of Edinburgh (May 2000)
McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1) (2004)
McBride, F.: Computer Aided Manipulation of Symbols. PhD thesis, Queen’s University of Belfast (1970)
Paulin-Mohring, C.: Extraction de programmes dans le Calcul des Constructions. PhD thesis, Paris 7 (1989)
Jones, S.L.P., Santos, A.L.M.: A transformation-based optimiser for Haskell. Science of Computer Programming 32, 3–47 (1998)
Pollack, R.: Implicit syntax. Technical report, LFCS, University of Edinburgh (1992)
Sansom, P.M., Jones, S.L.P.: Time and space profiling for non-strict, higher order functional languages (1995)
Xi, H.: Dependent Types in Practical Programming. PhD thesis, Department of Mathematical Sciences, Carnegie Mellon University (December 1998)
Xi, H.: Dead code elimination through dependent types (1999)
Xi, H., Pfenning, F.: Eliminating array bound checking through dependent types (1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Brady, E., McBride, C., McKinna, J. (2004). Inductive Families Need Not Store Their Indices. In: Berardi, S., Coppo, M., Damiani, F. (eds) Types for Proofs and Programs. TYPES 2003. Lecture Notes in Computer Science, vol 3085. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24849-1_8
Download citation
DOI: https://doi.org/10.1007/978-3-540-24849-1_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-22164-7
Online ISBN: 978-3-540-24849-1
eBook Packages: Springer Book Archive