Treffer: Taming the Merge Operator.
Weitere Informationen
Calculi with disjoint intersection types support a symmetric merge operator with subtyping. The merge operator generalizes record concatenation to any type, enabling expressive forms of object composition, and simple solutions to hard modularity problems. Unfortunately, recent calculi with disjoint intersection types and the merge operator lack a (direct) operational semantics with expected properties such as determinism and subject reduction, and only account for terminating programs. This paper proposes a type-directed operational semantics (TDOS) for calculi with intersection types and a merge operator. We study two variants of calculi in the literature. The first calculus, called λ<subscript>i</subscript>, is a variant of a calculus presented by Oliveira et al. (2016) and closely related to another calculus by Dunfield (2014). Although Dunfield proposes a direct small-step semantics for her calculus, her semantics lacks both determinism and subject reduction. Using our TDOS, we obtain a direct semantics for λ<subscript>i</subscript> that has both properties. The second calculus, called λ<subscript>i</subscript><sup>+</sup>, employs the well-known subtyping relation of Barendregt, Coppo and Dezani-Ciancaglini (BCD). Therefore, λ<subscript>i</subscript><sup>+</sup> extends the more basic subtyping relation of λ<subscript>i</subscript>, and also adds support for record types and nested composition (which enables recursive composition of merged components). To fully obtain determinism, both λ<subscript>i</subscript> and λ<subscript>i</subscript><sup>+</sup> employ a disjointness restriction proposed in the original λ<subscript>i</subscript> calculus. As an added benefit the TDOS approach deals with recursion in a straightforward way, unlike previous calculi with disjoint intersection types where recursion is problematic. We relate the static and dynamic semantics of λ<subscript>i</subscript> to the original version of the calculus and the calculus by Dunfield. Furthermore, for λ<subscript>i</subscript><sup>+</sup>, we show a novel formulation of BCD subtyping, which is algorithmic, has a very simple proof of transitivity and allows for the modular addition of distributivity rules (i.e. without affecting other rules of subtyping). All results have been fully formalized in the Coq theorem prover. [ABSTRACT FROM AUTHOR]
Copyright of Journal of Functional Programming is the property of Cambridge University Press and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)