Linear type systems have a long and storied history, but not a clear path forward to integrate with existing languages such as OCaml or Haskell. In this paper, we study a linear type system designed with two crucial properties in mind: backwards-compatibility and code reuse across linear and non-linear users of a library. Only then can the benefits of linear types permeate conventional functional programming. Rather than bifurcate types into linear and non-linear counterparts, we instead attach linearity to function arrows. Linear functions can receive inputs from linearly-bound values, but can also operate over unrestricted, regular values.To demonstrate the efficacy of our linear type system -both how easy it can be integrated in an existing language implementation and how streamlined it makes it to write programs with linear types -we implemented our type system in ghc, the leading Haskell compiler, and demonstrate two kinds of applications of linear types: mutable data with pure interfaces; and enforcing protocols in I/O-performing functions. This version includes an Appendix that gives an operational semantics for the core language, and proofs of the metatheoretical results stated in the paper.
Ulrich Berger presented a powerful proof of strong normalisation using
domains, in particular it simplifies significantly Tait's proof of strong
normalisation of Spector's bar recursion. The main contribution of this paper
is to show that, using ideas from intersection types and Martin-Lof's domain
interpretation of type theory one can in turn simplify further U. Berger's
argument. We build a domain model for an untyped programming language where U.
Berger has an interpretation only for typed terms or alternatively has an
interpretation for untyped terms but need an extra condition to deduce strong
normalisation. As a main application, we show that Martin-L\"{o}f dependent
type theory extended with a program for Spector double negation shift.Comment: 16 page
International audienceIn the context of Featherweight Java by Igarashi, Pierce, and Wadler, and its recent extension FeatherTrait Java (FTJ) by the authors, we investigate classes that can be extended with trait composition. A trait is a collection of methods, i.e. behaviors without state; it can be viewed as an "incomplete stateless class" ie, an interface with some already written behavior. Traits can be composed in any order, but only make sense when "imported" by a class that provides state variables and additional methods to disambiguate conflicting names arising between the imported traits. We introduce FeatherTrait Java with interfaces (iFTJ), where traits need to be typechecked only once, which is necessary for compiling them in isolation, and considering them as regular types, like Java-interfaces with a behavioral content
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.