ABSTRACT
Recursive data structures are abstractions of simple records and pointers. They impose a shape invariant, which is verified at compile-time and exploited to automatically generate code for building, copying, comparing, and traversing values without loss of efficiency. However, such values are always tree shaped, which is a major obstacle to practical use.
We propose a notion of graph types, which allow common shapes, such as doubly-linked lists or threaded trees, to be expressed concisely and efficiently. We define regular languages of routing expressions to specify relative addresses of extra pointers in a canonical spanning tree. An efficient algorithm for computing such addresses is developed. We employ a second-order monadic logic to decide well-formedness of graph type specifications. This logic can also be used for automated reasoning about pointer structures.
- 1.H. Ait-Kaci and R. Nasr. Logic and inheritance. In Proc. 13th A CM Syrup. on Princ. of Program. ruing Languages, pages 219-228, 1986. Google ScholarDigital Library
- 2.H. Ait-Kaci and R. Nasr. Login: A logic programming language with built-in inheritance. Journal of Logic Programming, 3:185-215, 1986. Journal version of {1}. Google ScholarDigital Library
- 3.H. Ai't-Kaci and A. Podelski. Towards a meaning of life. In Jan Maluszyfiski and Martin Wirsing, editors, Proceedings of the 3rd International Symposium on Programming Language Implementation and Logic Programming (Passau, Germany), pages 255-274. Springer-Verlag, LNCS 528, August 1991.Google ScholarCross Ref
- 4.B. Courcelle. The monadic second-order logic of graphs I. Recognizable sets of finite graphs. Information and computation, 85:12-75, 1990. Google ScholarDigital Library
- 5.J. DSrre and W.C Rounds. On subsumption and semiunification in feature algebras. In Proc. IEEE Symp. on Logics in Computer Science, pages 300-310, 1990.Google Scholar
- 6.L. Hendren, J. Hummel, and A. Nicolau. Abstractions for recursive pointer data structures: Improving the analysis and transformation of imperative programs. In Proc. SIGPLAN'g2 Conference on Programming Language Design and Implementation, pages 249-260. ACM, 1992. Google ScholarDigital Library
- 7.C.A.R. Hoare. Reeursive data structures. In~ernational Journal of Computer and Information Sciences, 4:2:105-132, 1975.Google ScholarCross Ref
- 8.Robin Milner, Mads Torte, and Robert Harper. The Definition of Standard ML. MIT Press, 1990. Google ScholarDigital Library
- 9.T. Reps. Incremental evaluation for attribute grammars with unrestricted movement between tree modifications. Acta Informa~ica, 25, 1986. Google ScholarDigital Library
- 10.D.A. Turner. Miranda: A non-strict functional language with polymorphie types. In Proc. Conference on Functional Programming Languages and Computer Architecture, pages 1-16. Springer- Verlag (LNCS 201), 1985. Google ScholarDigital Library
Index Terms
- Graph types
Recommendations
Propositions as [Types]
Image factorizations in regular categories are stable under pullbacks, so they model a natural modal operator in dependent type theory. This unary type constructor [A] has turned up previously in a syntactic form as a way of erasing computational ...
Judgmental subtyping systems with intersection types and modal types
We study how to extend modal type systems based on intuitionistic modal logic S4 or S5 with a subtyping system based on intersection types. In the presence of four type constructors $${\!}\!\rightarrow \!{\!},\,{\!}\wedge {\!},\,\square {}$$ , , , and $$\Diamond {}$$ , the traditional approach using a binary subtyping relation does ...
Type checking and inference for polymorphic and existential types
CATS '09: Proceedings of the Fifteenth Australasian Symposium on Computing: The Australasian Theory - Volume 94This paper proves undecidability of type checking and type inference problems in some variants of typed lambda calculi with polymorphic and existential types. First, type inference in the domain-free polymorphic lambda calculus is proved to be ...
Comments