Hostname: page-component-84b7d79bbc-g7rbq Total loading time: 0 Render date: 2024-07-29T15:17:02.778Z Has data issue: false hasContentIssue false

Uniqueness typing for functional languages with graph rewriting semantics

Published online by Cambridge University Press:  19 April 2018

Erik Barendsen
Affiliation:
Computing Science Institute, University of Nijmegen, Toernooiveld 1, 6525 ED Nijmegen, The Netherlands, Email erikb@cs.kun.nl, sjakie@cs.kun.nl
Sjaak Smetsers
Affiliation:
Computing Science Institute, University of Nijmegen, Toernooiveld 1, 6525 ED Nijmegen, The Netherlands, Email erikb@cs.kun.nl, sjakie@cs.kun.nl

Abstract

We present two type systems for term graph rewriting: conventional typing and (polymorphic) uniqueness typing. The latter is introduced as a natural extension of simple algebraic and higher-order uniqueness typing. The systems are given in natural deduction style using an inductive syntax of graph denotations with familiar constructs such as let and case.

The conventional system resembles traditional Curry-style typing systems in functional programming languages. Uniqueness typing extends this with reference count information. In both type systems, typing is preserved during evaluation, and types can be determined effectively. Moreover, with respect to a graph rewriting semantics, both type systems turn out to be sound.

Type
Research Article
Copyright
Copyright © Cambridge University Press 1996

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Ariola, Z. M. and Klop, J. W. (1995) Equational term graph rewriting, Technical Report CS-R9552, Centrum voor Wiskunde en Informatica (CWI), Computer Science/Department of Software Technology.Google Scholar
van Bakel, S. J., Smetsers, J. E. W. and Brock, S. (1992). Partial type assignment in left-linear term rewriting systems. In: Raoult, J. C. (ed.) Proceedings of the 17th Colloqium on Trees and Algebra in Programming (CAAP'92), Rennes, France. Springer-Verlag Lecture Notes in Computer Science 581 300322.Google Scholar
Barendregt, H. P. (1992). Lambda calculi with types. In: Abramsky, S., Gabbay, D. M. and Maibaum, T. S. E. (eds.) Handbook of Logic in Computer Science, Vol. II, Oxford University Press.Google Scholar
Barendregt, H. P., van Eekelen, M. C. J. D., Glauert, J. R. W., Kennaway, J. R., Plasmeijer, M. J. and Sleep, M. R. (1987) Term graph reduction. In: de Bakker, J. W., Nijman, A. J. and Treleaven, P. C. (eds.) Proceedings of the Conference on Parallel Architectures and Languages Europe (PARLE) II, Eindhoven, The Netherlands. Springer-Verlag Lecture Notes in Computer Science 259 141158.CrossRefGoogle Scholar
Barendsen, E. (1995) Types and Computations in Lambda Calculi and Graph Rewrite Systems, Dissertation, University of Nijmegen.Google Scholar
Barendsen, E. and Smetsers, J. E. W. (1993) Conventional and uniqueness typing in graph rewrite systems (extended abstract). In: Shyamasundar, R. K. (ed.) Proceedings of the 13th Conference on Foundations of Software Technology and Theoretical Computer Science, Bombay, India. Springer-Verlag Lecture Notes in Computer Science 761 4151. (Full paper: see Technical Report CSI-R9328, University of Nijmegen, and Barendsen (1995).)CrossRefGoogle Scholar
Barendsen, E. and Smetsers, J. E. W. (1994) Extending graph rewriting with copying. In: Schneider, H. J. and Ehrig, H. (eds.) Graph Transformations in Computer Science, International Workshop, Dagstuhl Castle, Germany. Springer-Verlag Lecture Notes in Computer Science 776 5170.CrossRefGoogle Scholar
Barendsen, E. and Smetsers, J. E. W. (1995a) A derivation system for uniqueness typing. In: Corradini, A. and Montanari, U. (eds.) SEGRAGRA'95: Joint Compugraph/Semagraph Workshop on Graph Rewriting and Computation, Volterra (Pisa), Italy, Electronic Notes in Theoretical Computer Science, Elsevier Science 151158.Google Scholar
Barendsen, E. and Smetsers, J. E. W. (1995b) Uniqueness type inference. In: Hermenegildo, M. and Swierstra, S. D. (eds.) Programming Languages: Implementations, Logics and Programs (PLILP'95), Utrecht, The Netherlands. Springer-Verlag Lecture Notes in Computer Science 982 189206.Google Scholar
Barendsen, E. and Smetsers, J. E. W. (1995c) Uniqueness typing in natural deduction style (extended abstract), 1995 Glasgow Workshop on Functional Programming, pp. XVI 1-XVI 10. (To appear in formal proceedings.)CrossRefGoogle Scholar
Benton, P. N. (1994) A mixed linear and non-linear logic: Proofs, terms and models. In: Pacholski, L. and Tiuryn, J. (eds.) Computer Science Logic, 8th Workshop, Kazimierz, Poland. Springer-Verlag Lecture Notes in Computer Science 933 121135.Google Scholar
Blass, A. (1992) A game semantics for linear logic. Annals of Pure and Applied Logic 56 183220.CrossRefGoogle Scholar
Guzman, J. C. and Hudak, P. (1990) Single-threaded polymorphic lambda calculus. Proceedings of the 5th Annual Symposium on Logic in Computer Science, Philadelphia, IEEE Computer Society Press 333343.Google Scholar
Hankin, C. and le Métayer, D. (1994) Deriving algorithms from type inference systems: Applicaton to strictness analysis. POPL'94: 21st ACM SIGPLAN-SIGACT Symposium of Principles of Programming Languages, Portland, Oregon, ACM Press 202213.Google Scholar
Mitchell, J.C. (1991) Type inference with simple subtypes. Journal of Functional Programming 1 245285.CrossRefGoogle Scholar
Plasmeijer, M. J. and van Eekelen, M. C. J. D. (1995) Concurrent Clean (available via http://www.cs.kun.nl/~clean/.)Google Scholar
Reynolds, J. C. (1995) Passivity and linear types. Talk given at the conference on Types for Proofs and Programs, Turin, Italy, June 1995.Google Scholar
Robinson, J. A. (1965) A machine-oriented logic based on the resolution principle. Journal of the Association for Computing Machinery 12 2341.Google Scholar
Turner, D. N., Wadler, P. and Mossin, C. (1995) Once upon a type. Proceedings of the Conference on Functional Languages and Computer Architectures (FPCA), La Jolla, California, ACM Press 111.Google Scholar
Wadler, P. (1990) Linear types can change the world! Proceedings of the Working Conference on Programming Concepts and Methods, Israel, North-Holland 385-407.Google Scholar
Wadsworth, C .P. (1971) Semantics and Pragmatics of the Lambda Calculus, Dissertation, Oxford University.Google Scholar
Wand, M. (1987) A simple algorithm and proof for type inference. Fundamenta Informaticae X 115122.Google Scholar