Coinductive subtyping for abstract compilation of object-oriented languages into Horn formulas

In recent work we have shown how it is possible to define very precise type systems for object-oriented languages by abstractly compiling a program into a Horn formula f. Then type inference amounts to resolving a certain goal w.r.t. the coinductive (that is, the greatest) Herbrand model of f. Type...

Full description

Bibliographic Details
Main Authors: Davide Ancona, Giovanni Lagorio
Format: Article
Language:English
Published: Open Publishing Association 2010-06-01
Series:Electronic Proceedings in Theoretical Computer Science
Online Access:http://arxiv.org/pdf/1006.1413v1
id doaj-6ea97cc8aac642e0b60b7f9469f99d12
record_format Article
spelling doaj-6ea97cc8aac642e0b60b7f9469f99d122020-11-24T23:39:54ZengOpen Publishing AssociationElectronic Proceedings in Theoretical Computer Science2075-21802010-06-0125Proc. GANDALF 201021423010.4204/EPTCS.25.20Coinductive subtyping for abstract compilation of object-oriented languages into Horn formulasDavide AnconaGiovanni LagorioIn recent work we have shown how it is possible to define very precise type systems for object-oriented languages by abstractly compiling a program into a Horn formula f. Then type inference amounts to resolving a certain goal w.r.t. the coinductive (that is, the greatest) Herbrand model of f. Type systems defined in this way are idealized, since in the most interesting instantiations both the terms of the coinductive Herbrand universe and goal derivations cannot be finitely represented. However, sound and quite expressive approximations can be implemented by considering only regular terms and derivations. In doing so, it is essential to introduce a proper subtyping relation formalizing the notion of approximation between types. In this paper we study a subtyping relation on coinductive terms built on union and object type constructors. We define an interpretation of types as set of values induced by a quite intuitive relation of membership of values to types, and prove that the definition of subtyping is sound w.r.t. subset inclusion between type interpretations. The proof of soundness has allowed us to simplify the notion of contractive derivation and to discover that the previously given definition of subtyping did not cover all possible representations of the empty type. http://arxiv.org/pdf/1006.1413v1
collection DOAJ
language English
format Article
sources DOAJ
author Davide Ancona
Giovanni Lagorio
spellingShingle Davide Ancona
Giovanni Lagorio
Coinductive subtyping for abstract compilation of object-oriented languages into Horn formulas
Electronic Proceedings in Theoretical Computer Science
author_facet Davide Ancona
Giovanni Lagorio
author_sort Davide Ancona
title Coinductive subtyping for abstract compilation of object-oriented languages into Horn formulas
title_short Coinductive subtyping for abstract compilation of object-oriented languages into Horn formulas
title_full Coinductive subtyping for abstract compilation of object-oriented languages into Horn formulas
title_fullStr Coinductive subtyping for abstract compilation of object-oriented languages into Horn formulas
title_full_unstemmed Coinductive subtyping for abstract compilation of object-oriented languages into Horn formulas
title_sort coinductive subtyping for abstract compilation of object-oriented languages into horn formulas
publisher Open Publishing Association
series Electronic Proceedings in Theoretical Computer Science
issn 2075-2180
publishDate 2010-06-01
description In recent work we have shown how it is possible to define very precise type systems for object-oriented languages by abstractly compiling a program into a Horn formula f. Then type inference amounts to resolving a certain goal w.r.t. the coinductive (that is, the greatest) Herbrand model of f. Type systems defined in this way are idealized, since in the most interesting instantiations both the terms of the coinductive Herbrand universe and goal derivations cannot be finitely represented. However, sound and quite expressive approximations can be implemented by considering only regular terms and derivations. In doing so, it is essential to introduce a proper subtyping relation formalizing the notion of approximation between types. In this paper we study a subtyping relation on coinductive terms built on union and object type constructors. We define an interpretation of types as set of values induced by a quite intuitive relation of membership of values to types, and prove that the definition of subtyping is sound w.r.t. subset inclusion between type interpretations. The proof of soundness has allowed us to simplify the notion of contractive derivation and to discover that the previously given definition of subtyping did not cover all possible representations of the empty type.
url http://arxiv.org/pdf/1006.1413v1
work_keys_str_mv AT davideancona coinductivesubtypingforabstractcompilationofobjectorientedlanguagesintohornformulas
AT giovannilagorio coinductivesubtypingforabstractcompilationofobjectorientedlanguagesintohornformulas
_version_ 1725511836736946176