Formal Parametric Polymorphism
Martn Abadi Luca, Luca Cardelli, Pierre-louis Curien · 1993
Cited by 0
Read the abstract, see who wrote it and who cites it, and get the citation in APA, MLA, Chicago or Harvard.
About 751 papers for “parametric polymorphism”
Martn Abadi Luca, Luca Cardelli, Pierre-louis Curien · 1993
Cited by 0
M. Abadi, Luca Cardelli, Pierre-Louis Curien · Theoretical Computer Science · 1993
Cited by 42
Haruo Hosoya, Alain Frisch, Giuseppe Castagna · ACM Transactions on Programming Languages and Systems · 2009
Despite the extensiveness of recent investigations on static typing for XML, parametric polymorphism has rarely been treated. This well-established typing discipline can also be useful in XML processing in particular for programs involving “parametric schemas,” that is, schemas parameterized over other schemas (e.g., SOAP). The difficulty in treating polymorphism for XML lies in how to extend the “semantic” approach used in the mainstream (monomorphic) XML type systems. A naive extension would be “semantic” quantification over all substitutions for type variables. However, this approach reduces to an NEXPTIME-complete problem for which no practical algorithm is known and induces a subtyping relation that may not always match the programmer's intuition. In this article, we propose a different method that smoothly extends the semantic approach yet is algorithmically easier. The key idea here is to devise a novel and simple marking technique, where we interpret a polymorphic type as a set of values with annotations of which subparts are parameterized. We exploit this interpretation in every ingredient of our polymorphic type system such as subtyping, inference of type arguments, etc. As a result, we achieve a sensible system that directly represents a usual expected behavior of polymorphic type systems—“values of abstract types are never reconstructed”—in a reminiscence of Reynold's parametricity theory. Also, we obtain a set of practical algorithms for typechecking by local modifications to existing ones for a monomorphic system.
Cited by 16Open access
Jose H. Solorzano, Suad Alagić · 1998
A number of inadequacies of existing implementation techniques for extending Java™ with parametric polymorphism are revealed. Homogeneous translations are the most space-efficient but they are not compatible with reflection, some models of persistence, and multiple dispatch. Heterogeneous translations, on the other hand, can potentially produce large amounts of redundant information. Implementation techniques that address these concerns are developed. In languages that support run-time reflection, an adequate implementation of parametric, bounded and F-bounded polymorphism is shown to require (reflective) run-time support. In Java, extensions to the core classes are needed. This is in spite of the fact that parametric polymorphism is intended to be managed statically.
Cited by 28Open access
Haruo Hosoya, Alain Frisch, École Normale et al. · 2004
Although several type systems have been investigated for XML, parametric polymorphism is rarely treated. This well-established typing discipline can also be useful in XML processing in particular for programs involving "parametric schemas," i.e., schemas parameterized over other schemas (e.g., SOAP). The
Cited by 1
Haruo Hosoya, Alain Frisch, Giuseppe Castagna · ACM SIGPLAN Notices · 2005
Despite the extensiveness of recent investigations on static typing for XML, parametric polymorphism has rarely been treated. This well-established typing discipline can also be useful in XML processing in particular for programs involving "parametric schemas," i.e., schemas parameterized over other schemas (e.g., SOAP). The difficulty in treating polymorphism for XML lies in how to extend the "semantic" approach used in the mainstream (monomorphic) XML type systems. A naive extension would be "semantic" quantification over all substitutions for type variables. However, this approach reduces to an NEXPTIME-complete problem for which no practical algorithm is known. In this paper, we propose a different method that smoothly extends the semantic approach yet is algorithmically easier. In this, we devise a novel and simple marking technique, where we interpret a polymorphic type as a set of values with annotations of which subparts are parameterized. We exploit this interpretation in every ingredient of our polymorphic type system such as subtyping, inference of type arguments, and so on. As a result, we achieve a sensible system that directly represents a usual expected behavior of polymorphic type systems---"values of variable types are never reconstructed"---in a reminiscence of Reynold's parametricity theory. Also, we obtain a set of practical algorithms for typechecking by local modifications to existing ones for a monomorphic system.
Cited by 4
Jose H. Solorzano, Suad Alagić · ACM SIGPLAN Notices · 1998
A number of inadequacies of existing implementation techniques for extending Java™ with parametric polymorphism are revealed. Homogeneous translations are the most space-efficient but they are not compatible with reflection, some models of persistence, and multiple dispatch. Heterogeneous translations, on the other hand, can potentially produce large amounts of redundant information. Implementation techniques that address these concerns are developed. In languages that support run-time reflection, an adequate implementation of parametric, bounded and F-bounded polymorphism is shown to require (reflective) run-time support. In Java, extensions to the core classes are needed. This is in spite of the fact that parametric polymorphism is intended to be managed statically .
Cited by 4
2013
Cited by 0
Mirko Viroli, Antônio José Natali · ACM SIGPLAN Notices · 2000
The introduction of parametric polymorphism in Java with translation approaches has been shown to be of considerable interest, allowing the definition of extensions of Java on top of the existing Virtual Machines. Homogeneous translations furthermore, seem to be more useful than heterogeneous, avoiding the continuous increase of library code with redundant information. At this time however, homogeneous approaches aren't as flexible as heterogeneous, with extensions failing to integrate well with base language typing. In this paper, using some of the features of the Core Reflection of Java, we introduce a homogeneous translation in which run-time information about instantiation of type-parameters is carried, allowing full integration of parame-terized types with Java typing. Performance overhead is greatly decreased using a brand new translation technique based on the deferring of the management of type information at load-time. The same power and flexibility of previous heterogeneous approaches is obtained while maintaining homogeneous translation advantages.
Cited by 10Open access
Henry DeYoung, Andreia Mordido, Frank Pfenning et al. · Zenodo (CERN European Organization for Nuclear Research) · 2023
<strong># POPL 2024 Artifact Evaluation</strong> <strong>## Paper Abstract</strong> We study the interaction of structural subtyping with parametric polymorphism and recursively defined type constructors. Although structural subtyping is undecidable in this setting, we describe a notion of parametricity for type constructors and then exploit it to define parametric subtyping, a conceptually simple, decidable, and expressive fragment of structural subtyping that strictly generalizes nominal subtyping. We present and prove correct an effective saturation-based decision procedure for parametric subtyping, demonstrating its applicability using a variety of examples. An implementation of this decision procedure is available in the supplementary materials. <strong># Artifact Evaluation</strong> We would like to thank the reviewers for reviewing the artifact for the POPL 2024 submission 714 titled "Parametric Subtyping for Structural Parametric Polymorphism". <strong>## VM Link</strong> You can download the VM image from [here](https://zenodo.org/record/8417982/files/ubuntu-popl24-aec-submission-714.ova?download=1). <strong>### VM Login</strong> VM Username: popl24-aec VM Password: submission-714 <strong>## VM Instructions</strong> The VM contains an image of Ubuntu 22.04.1 LTS with the implementation and dependencies already downloaded, installed, and compiled. The implementation is called `polyte` and exists in the home directory of the VM. The standard way of using this image is by downloading and installing VirtualBox and loading this image in VirtualBox. Open a terminal and navigate to the `polyte` implementation and compile (if files have changed). ``` $ cd polyte/src $ git pull $ make all $ ./polyte-test ../*/*.poly (regression testing) $ ./polyte ../examples/paper.poly (viewing output) $ make install (copy to bin/) $ make clean (remove binaries and possible .cm/ dir) $ make test (run polyte-test on tests/examples, returning exit code) ```
Cited by 0Open access
DeYoung, Henry, Mordido, Andreia, Pfenning, Frank et al. · Zenodo (CERN European Organization for Nuclear Research) · 2023
# POPL 2024 Artifact Evaluation ## Paper Abstract We study the interaction of structural subtyping with parametric polymorphism and recursively defined type constructors. Although structural subtyping is undecidable in this setting, we describe a notion of parametricity for type constructors and then exploit it to define parametric subtyping, a conceptually simple, decidable, and expressive fragment of structural subtyping that strictly generalizes nominal subtyping. We present and prove correct an effective saturation-based decision procedure for parametric subtyping, demonstrating its applicability using a variety of examples. An implementation of this decision procedure is available in the supplementary materials. # Artifact Evaluation We would like to thank the reviewers for reviewing the artifact for the POPL 2024 submission 714 titled "Parametric Subtyping for Structural Parametric Polymorphism". ## VM Link You can download the VM image from [here](https://zenodo.org/records/8423335/files/ubuntu-popl24-aec-submission-714.ova?download=1). You can find current source code at the [online repository](https://bitbucket.org/structural-types/polyte/). ### VM Login VM Username: popl24-aec VM Password: submission-714 ## VM Instructions The VM contains an image of Ubuntu 22.04.1 LTS with the implementation and dependencies already downloaded, installed, and compiled. The implementation is called `polyte` and exists in the home directory of the VM. The standard way of using this image is by downloading and installing VirtualBox and loading this image in VirtualBox. Open a terminal and navigate to the `polyte` implementation. ``` $ cd ~/polyte $ ./bin/polyte-test ./examples/*.poly (run polyte-test on tests/examples, returning exit code) $ ./bin/polyte ./examples/paper.poly (viewing output) ``` If you would like to build the binaries again: ``` $ cd ~/polyte $ make all $ make install $ make clean ``` At this point, you can return to the instructions before this to run regression testing or run `polyte` on individual files. The VM image also has emacs already installed with syntax highlighting enabled, therefore you can open `.poly` files using emacs to edit those files with the benefit of syntax highlighting. You can find more details in the [README file](https://bitbucket.org/structural-types/polyte/src/popl24-artifact/README.md) that also exists at ~/polyte/README.md of the VM image.
Cited by 0Open access
Subtype Polymorphism (oo-style · 2013
Cited by 0
Martín Abadi, Luca Cardelli, Pierre-louis Curien · 1993
Cited by 0
Pluemicke, M., Tuebingen Univ. (Germany). Wilhelm-Schickard-Inst. fuer Informatik · OpenGrey (Institut de l'Information Scientifique et Technique) · 1997
This paper describes the modular polymorphic functional programming language OBJ-P. OBJ-P is an extension of OBJ-3 as OBJ-P allows parametric polymorphism for first-order types in the sense of the Hindley-Milner type system. In this paper we give an overview of the language and present in two program examples the polynomial ring operands sum and product. These examples show the special features of OBJ-P and how to use the features overloading, subtyping (wrt. set inclusion), and parametric polymorphism at the same time. (orig.)
Cited by 0
Giuseppe Castagna · HAL (Le Centre pour la Communication Scientifique Directe) · 2010
International audience
Cited by 0
Andrew M. Pitts · CL Technical Reports · 2021
Studies of the mathematical properties of impredicative polymorphic types have for the most part focused on the polymorphic lambda calculus of Girard-Reynolds, which is a calculus of total polymorphic functions. This paper considers polymorphic types from a functional programming perspective, where the partialness arising from the presence of fixpoint recursion complicates the nature of potentially infinite (‘lazy’) datatypes. An approach to Reynolds’ notion of relational parametricity is developed that works directly on the syntax of a programming language, using a novel closure operator to relate operational behaviour to parametricity properties of types. Working with an extension of Plotkin’s PCF with ∀-types, lazy lists and existential types, we show by example how the resulting logical relation can be used to prove properties of polymorphic types up to operational equivalence.
Cited by 0Open access
Martin Plümicke · 1997
This paper describes the modular polymorphic functional programming language OBJ--P. OBJ--P is an extension of OBJ--3 as OBJ--P allows parametric polymorphism for first-order types in the sense of the Hindley--Milner type system. In this paper we give an overview of the language and present in two program examples the polynomial ring operands sum and product. These examples show the special features of OBJ--P and how to use the features overloading, subtyping (wrt. set inclusion), and parametric polymorphism at the same time. 3 Wilhelm-Schickard-Institut-97-2 1 Introduction OBJ--3 [GWM + 93] is a functional programming language with first-order function types. OBJ--3 differs from other programming languages by two special features: overloading 1 of function symbols and the possibility to order the sorts (subtyping). This ordering is induced by set inclusion on the carrier sets. The algebraic semantics of OBJ--3 is based on the theory of order-sorted algebras [GM89]. Furthermor...
Cited by 0
Robert Harper, Greg Morrisett · 1994
Abstract : There is a middle ground between parametric and ad-hoc polymorphism in which a computation can depend upon a type parameter but is restricted to being defined at all types in an inductive fashion. We call such polymorphism non-parametric. We show how non-parametric polymorphism can be used to implement a variety of useful language mechanisms including overloading, unboxed data representations in the presence of ML-style polymorphism, and canonical representations of equivalent types. We show that, by using a second-order, explicitly typed language extended with non-parametric operations, these mechanisms can be implemented without having to tag data with type information at runime. Furthermore, this approach retains a 'phase distinction' and permits static type checking and separate compilation. Our aim is to provide a unifying language, translation, and proof framework in which a variety of non-parametric mechanisms can be expressed and verified. (AN)
Cited by 3
Radha Jagadeesan, Alan Jeffrey, James Riely · Science of Computer Programming · 2006
Cited by 38
E. Powell Robinson, Giuseppe Rosolini · 2002
The pioneering work on relational parametricity for the second order lambda calculus was done by Reynolds (1983) under the assumption of the existence of set-based models, and subsequently reformulated by him, in conjunction with his student Ma, using the technology of PL-categories. The aim of this paper is to use the different technology of internal category theory to re-examine Ma and Reynolds' definitions. Apart from clarifying some of their constructions, this view enables us to prove that if we start with a non-parametric model which is left exact and which satisfies a completeness condition corresponding to Ma and Reynolds "suitability for polymorphism", then we can recover a parametric model with the same category of closed types. This implies, for example, that any suitably complete model (such as the PER model) has a parametric counterpart.< <ETX xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">></ETX>
Cited by 46