## Rank 2 Types for Term Graph Rewriting (Extended Abstract)

### Cached

### Download Links

Citations: | 3 - 3 self |

### BibTeX

@MISC{Bakel_rank2,

author = {Steffen van Bakel},

title = {Rank 2 Types for Term Graph Rewriting (Extended Abstract)},

year = {}

}

### OpenURL

### Abstract

We define a notion of type assignment with polymorphic intersection types of rank 2 fora term graph rewriting language that expresses sharing and cycles. We show that type assignment is decidable through defining, using the extended notion of unification from [5],a notion of principal pair which generalizes ml's principal type property.

### Citations

1115 |
The Lambda Calculus: Its Syntax and Semantics
- Barendregt
- 1981
(Show Context)
Citation Context ...uably important that type assignment is formally defined as close to the actual language as possible. Furthermore, many aspects of those languages are not easily dealt with in the Lambda Calculus ( ) =-=[8]-=-, or not expressible at all, like patterns, sharing, and cyclic structures. This motivated the investigation of type assignment for Term Rewriting Systems ( ) [30] and Term Graph Rewriting Systems ( )... |

943 |
A machine-oriented logic based on the resolution principle
- Robinson
- 1965
(Show Context)
Citation Context ...s of Rank 2, but only an algorithm that finds the most general unifying chain for demanded and provided type. It is defined as a natural extension of Robinson’s well-known unification algorithm unify =-=[35]-=-, and can be seen as an extension of the notion of unification as presented in [4], in that it deals with quantification as well. Definition 5.1 [Unification] Unification of Curry types (extended with... |

936 | A theory of type polymorphism in progra.mming
- Milner
- 1978
(Show Context)
Citation Context ... are added to the system. In the past, many notions of type assignment have been studied for (functional) programming languages, all based on (extensions of) the Hindley-Milner type assignment system =-=[22,32]-=-. Moreover, almost all notions of type assignment as proposed for use in functional programming, in reality are developed on (enriched) lambda calculi, and little work is available that discusses and ... |

751 | Rewrite systems
- Dershowitz, Jouannaud
- 1992
(Show Context)
Citation Context ...cts those definitions and extends those result to a calculus with sharing and cycles, by defining a notion of Rank 2 type assignment on @ , inspired by the system that was studied in [5]. We refer to =-=[30,19]-=- for rewrite systems, and to [12,10,11,25,33,37] for definitions of . The system defined here is aimed to be similar to those, although their relation is not studied here. 30 Y C G_(1 "! # # # !3( % ... |

565 | Term Rewriting Systems
- Klop
- 1992
(Show Context)
Citation Context ...dealt with in the Lambda Calculus ( ) [8], or not expressible at all, like patterns, sharing, and cyclic structures. This motivated the investigation of type assignment for Term Rewriting Systems ( ) =-=[30]-=- and Term Graph Rewriting Systems ( ) [10] presented in various papers [7,6,4,13,5], and the system presented in this paper. As an example, take the problem of I/O in the context of functional program... |

364 |
Towards a theory of type structure
- Reynolds
- 1974
(Show Context)
Citation Context ...ment for was presented that uses intersection types of rank 2. Another direction in the area of types is that of quantified or polymorphic types. This field originated in the context of with System F =-=[21,34]-=-, which provides a general notion of polymorphism, but lacks principal typings. Moreover, type inference in System F is undecidable in general [38], although it is decidable for some sub-systems, in p... |

216 |
A filter lambda model and the completeness of type assignment. J.Symbolic Logic, 48:931--940
- Barendregt, Coppo, et al.
- 1983
(Show Context)
Citation Context ...cussion of uniqueness types; note that we do not consider a notion of uniquess typing here). The main point of focus for [6,5] was normalisation, which motivated the choice to use intersections types =-=[9]-=-. This implied, however, that type assignment for those systems is undecidable. It is by now well-known that there are decidable restrictions of the intersection type assignment system [17,29,23,4,24,... |

154 | The Lambda Calculus: its Syntax and Semantics. NorthHolland, revised edition - Barendregt - 1984 |

141 |
The system F of variable types, fifteen years later. Theoretical Computer Science 45
- Girard
- 1986
(Show Context)
Citation Context ...ment for was presented that uses intersection types of rank 2. Another direction in the area of types is that of quantified or polymorphic types. This field originated in the context of with System F =-=[21,34]-=-, which provides a general notion of polymorphism, but lacks principal typings. Moreover, type inference in System F is undecidable in general [38], although it is decidable for some sub-systems, in p... |

108 |
The principal type scheme of an object in combinatory logic
- Hindley
- 1969
(Show Context)
Citation Context ... are added to the system. In the past, many notions of type assignment have been studied for (functional) programming languages, all based on (extensions of) the Hindley-Milner type assignment system =-=[22,32]-=-. Moreover, almost all notions of type assignment as proposed for use in functional programming, in reality are developed on (enriched) lambda calculi, and little work is available that discusses and ... |

106 |
graph rewriting
- Barendregt
- 1987
(Show Context)
Citation Context ... or not expressible at all, like patterns, sharing, and cyclic structures. This motivated the investigation of type assignment for Term Rewriting Systems ( ) [30] and Term Graph Rewriting Systems ( ) =-=[10]-=- presented in various papers [7,6,4,13,5], and the system presented in this paper. As an example, take the problem of I/O in the context of functional programming: only when representing terms as grap... |

106 | Lazy functional state threads
- Launchbury, Jones
- 1994
(Show Context)
Citation Context ...eralizes also Jim’s system [24], which is a combination of -types and Rank 2 intersection types. Having Rank 2 quantified types in the system allows us to type for instance the constant runST used in =-=[31]-=-, which cannot be typed in . Our system also generalises the system of [16] that combines rank 2 intersection types and shallow polymorphism, so does not have polymorphic types of rank 2. 1 Applicativ... |

103 | Complete restrictions of the Intersection Type Discipline
- Bakel
- 1992
(Show Context)
Citation Context ...hains the operation of concatenation is ö denoted by 67õw K! # # #~!Aõ\* < < , and: % 0 # * < ö Expansion The variant of expansion used in the Rank 2 system is quite different from that normally used =-=[2,3,36]-=-. The reason for this is that expansion, normally, increases the rank of a type a feature that is of course not allowed within a system that limits the rank of types. Since here expansion is only used... |

94 |
Type Assignment in Programming Languages
- Damas
- 1984
(Show Context)
Citation Context ...ipal typings. Moreover, type inference in System F is undecidable in general [38], although it is decidable for some sub-systems, in particular if we consider types of rank 2 [28]. The type system of =-=[15]-=- uses (shallow) polymorphic types and has principal types. Since its polymorphism is limited, some programs that arise naturally cannot be typed, and it does not have principal typings [24], a propert... |

93 | What are principal typings and what are they good for
- Jim
- 1996
(Show Context)
Citation Context ...tions types [9]. This implied, however, that type assignment for those systems is undecidable. It is by now well-known that there are decidable restrictions of the intersection type assignment system =-=[17,29,23,4,24,18,16,26,27]-=-, making the definition of notions of type assignment using those types feasible. In particular, in [4] a notion of type assignment for was presented that uses intersection types of rank 2. Another di... |

78 | A direct algorithm for type inference in the rank-2 fragment of the second-order λ-calculus
- Kfoury, Wells
- 1994
(Show Context)
Citation Context ...tions types [9]. This implied, however, that type assignment for those systems is undecidable. It is by now well-known that there are decidable restrictions of the intersection type assignment system =-=[17,29,23,4,24,18,16,26,27]-=-, making the definition of notions of type assignment using those types feasible. In particular, in [4] a notion of type assignment for was presented that uses intersection types of rank 2. Another di... |

71 | An introduction to term graph rewriting
- KENNAWAY, KLOP, et al.
- 1993
(Show Context)
Citation Context ...in that, as far as assignable types are concerned, the systems are incompatible. We will now formally introduce term graphs, as done in [10]. Following [13], graphs are written in an equational style =-=[10,1]-=-, rather than using drawings or 4tuples (as in [10]). ^MZM[+ G letrec (L+ and stands for the root of the graph, b and is a set of equations of the ‘(S+ shape G)Dc!3E H @ ’ ‘(S+ or F’, that describe th... |

69 | Conventional and Uniqueness Typing in Graph Rewrite Systems
- Barendsen, Smetsers
- 1996
(Show Context)
Citation Context ...patterns, sharing, and cyclic structures. This motivated the investigation of type assignment for Term Rewriting Systems ( ) [30] and Term Graph Rewriting Systems ( ) [10] presented in various papers =-=[7,6,4,13,5]-=-, and the system presented in this paper. As an example, take the problem of I/O in the context of functional programming: only when representing terms as graphs to express the sharing that is heavily... |

61 | Intersection Type Assignment Systems
- Bakel
- 1995
(Show Context)
Citation Context ...hains the operation of concatenation is ö denoted by 67õw K! # # #~!Aõ\* < < , and: % 0 # * < ö Expansion The variant of expansion used in the Rank 2 system is quite different from that normally used =-=[2,3,36]-=-. The reason for this is that expansion, normally, increases the rank of a type a feature that is of course not allowed within a system that limits the rank of types. Since here expansion is only used... |

60 | Concurrent Clean
- Nöcker, Smetsers, et al.
- 1991
(Show Context)
Citation Context ...ose result to a calculus with sharing and cycles, by defining a notion of Rank 2 type assignment on @ , inspired by the system that was studied in [5]. We refer to [30,19] for rewrite systems, and to =-=[12,10,11,25,33,37]-=- for definitions of . The system defined here is aimed to be similar to those, although their relation is not studied here. 30 Y C G_(1 "! # # # !3( % H 0 =< 67( * 89;: * , 6>(1 ?8 and for Definition... |

58 |
Principal type schemes for an extended type theory
- Rocca, S, et al.
- 1984
(Show Context)
Citation Context ...hains the operation of concatenation is ö denoted by 67õw K! # # #~!Aõ\* < < , and: % 0 # * < ö Expansion The variant of expansion used in the Rank 2 system is quite different from that normally used =-=[2,3,36]-=-. The reason for this is that expansion, normally, increases the rank of a type a feature that is of course not allowed within a system that limits the rank of types. Since here expansion is only used... |

51 | Principality and decidable type inference for finite-rank intersection types
- Kfoury, Wells
- 1999
(Show Context)
Citation Context ...tions types [9]. This implied, however, that type assignment for those systems is undecidable. It is by now well-known that there are decidable restrictions of the intersection type assignment system =-=[17,29,23,4,24,18,16,26,27]-=-, making the definition of notions of type assignment using those types feasible. In particular, in [4] a notion of type assignment for was presented that uses intersection types of rank 2. Another di... |

26 |
Towards an intermediate language based on graph rewriting
- Barendregt, Eekelen, et al.
- 1987
(Show Context)
Citation Context ...ose result to a calculus with sharing and cycles, by defining a notion of Rank 2 type assignment on @ , inspired by the system that was studied in [5]. We refer to [30,19] for rewrite systems, and to =-=[12,10,11,25,33,37]-=- for definitions of . The system defined here is aimed to be similar to those, although their relation is not studied here. 30 Y C G_(1 "! # # # !3( % H 0 =< 67( * 89;: * , 6>(1 ?8 and for Definition... |

26 | Rank 2 type systems and recursive definitions
- Jim
- 1993
(Show Context)
Citation Context |

23 | Normalisation Results for Typeable Rewrite Systems
- Bakel, Fernández
- 1997
(Show Context)
Citation Context ...and there is a chain Ch such that Ch(〈P,π〉) = 〈B,σ〉. This property, together with the result that all operations are sound, is used to prove the subject reduction result. (The same method was used in =-=[7,6,5]-=-.) Definition 4.3 (i) We say that left → right ∈ R with defined symbol F is typeable with respect to E, if there are P, and π ∈ T2 such that: (a) 〈P,π〉 is a principal pair (Def. 6.1) for left with res... |

22 | Rank 2 Intersection Type Assignment in Term Rewriting Systems
- Bakel
- 1996
(Show Context)
Citation Context ...patterns, sharing, and cyclic structures. This motivated the investigation of type assignment for Term Rewriting Systems ( ) [30] and Term Graph Rewriting Systems ( ) [10] presented in various papers =-=[7,6,4,13,5]-=-, and the system presented in this paper. As an example, take the problem of I/O in the context of functional programming: only when representing terms as graphs to express the sharing that is heavily... |

21 | Relating Typability and Expressibility in Finite-Rank Intersection Type Systems
- Kfoury, Mairson, et al.
- 1999
(Show Context)
Citation Context |

15 |
de Vries. The adequacy of term graph rewriting for simulating term rewriting
- Kennaway, Klop, et al.
- 1993
(Show Context)
Citation Context ...ose result to a calculus with sharing and cycles, by defining a notion of Rank 2 type assignment on @ , inspired by the system that was studied in [5]. We refer to [30,19] for rewrite systems, and to =-=[12,10,11,25,33,37]-=- for definitions of . The system defined here is aimed to be similar to those, although their relation is not studied here. 30 Y C G_(1 "! # # # !3( % H 0 =< 67( * 89;: * , 6>(1 ?8 and for Definition... |

13 |
A Decidable Intersection Type System based on Relevance
- Damiani, Giannini
- 1994
(Show Context)
Citation Context |

12 |
Type reconstruction in finite-rank fragments of the second-order λcalculus
- Kfoury, Tiuryn
- 1992
(Show Context)
Citation Context ...morphism, but lacks principal typings. Moreover, type inference in System F is undecidable in general [38], although it is decidable for some sub-systems, in particular if we consider types of rank 2 =-=[28]-=-. The type system of [15] uses (shallow) polymorphic types and has principal types. Since its polymorphism is limited, some programs that arise naturally cannot be typed, and it does not have principa... |

11 | Partial Type Assignment in Left Linear Applicative Term Rewriting Systems
- Bakel, Smetsers, et al.
- 1992
(Show Context)
Citation Context ...patterns, sharing, and cyclic structures. This motivated the investigation of type assignment for Term Rewriting Systems ( ) [30] and Term Graph Rewriting Systems ( ) [10] presented in various papers =-=[7,6,4,13,5]-=-, and the system presented in this paper. As an example, take the problem of I/O in the context of functional programming: only when representing terms as graphs to express the sharing that is heavily... |

9 |
Detecting and Removing Dead-Code using Rank 2 Intersection
- Damiani, Prost
- 1998
(Show Context)
Citation Context |

9 |
Typeability and type checking in Second W order -calculus are equal and undecidable
- Wells
- 1994
(Show Context)
Citation Context ... field originated in the context of with System F [21,34], which provides a general notion of polymorphism, but lacks principal typings. Moreover, type inference in System F is undecidable in general =-=[38]-=-, although it is decidable for some sub-systems, in particular if we consider types of rank 2 [28]. The type system of [15] uses (shallow) polymorphic types and has principal types. Since its polymorp... |

8 |
Typing local definitions and conditional expressions with rank 2 intersection
- Damiani
- 2000
(Show Context)
Citation Context |

8 | J.W.: Equational term graph rewriting. Fundamentae Informaticae 26 - Ariola, Klop - 1996 |

7 | Some computational properties of intersection types - Bucciarelli, Lorenzis, et al. - 1996 |

5 | Graph Rewriting Semantics for Functional Programming Languages
- Eekelen, Smetsers
- 1996
(Show Context)
Citation Context ...definitions of . The system defined here is aimed to be similar to those, although their relation is not studied here. 30 Y C G_(1 "! # # # !3( % H 0 =< 67( * 89;: * , 6>(1 ?8 and for Definition 1.2 =-=[13,20]-=- A graph (over F ) is a pair `+a'I:]R@b Y Y Y in Y "HUR H 0 , where : is a variable 0 0 stands for ')(1 2+.-3 < , etc. We will use a vector notation as an abbreviation for "! # # # !$&% , so ')( *,+.-... |

4 | Polymorphic Intersection Type Assignment for Rewrite Systems with Abstraction and β-rule
- Bakel, Barbanera, et al.
- 2000
(Show Context)
Citation Context ...ause of the distinction between free and bound type µ variables, not every syntactic ÀtÏ sub-type of R is necessarily a type in µ R, but ignoring this below will not affect any result. Definition 2.3 =-=[5]-=- On µ R, the pre-order (i.e. reflexive and transitive relation) ‘ ˆ ’ 7< Ò Ò < µ CH µ < 2H # ØxN+ÛnX(†M7ÁSRX(†MÜÁ€Ï Øw ÝÞ( Â Ï ØxKpsr]nX(†M7ÁSRX(†MÜÁ€Ï ØxzÝÞ( Â Øw Ò < < is defined by: À1 $Ã1„ „ „P... |

3 | Extending Graph Rewriting with Copying
- Barendsen, Smetsers
- 1993
(Show Context)
Citation Context |

2 |
Embedding a Second-Order Type System into an Intersection Type System
- Yokohuchi
- 1995
(Show Context)
Citation Context ...n of and Cu , by adding ‘ ’ as an extra type-constructor (i.e. explicit polymorphism). Although the Rank 2 intersection system and the Rank 2 polymorphic system for type exactly the same set of terms =-=[39]-=-, their combination results in a system with more expressive power: the set of assignable types increases, and types can better express the behaviour of terms [14]. Also, polymorphism can be expressed... |

1 | Some computationalproperties of intersection types - Bucciarelli, Lorenzis, et al. - 1996 |

1 | Relating Typability andExpressibility in Finite-Rank Intersection Type Systems - Kfoury, Mairson, et al. - 1999 |