IA Scholar Query: Effectful Applicative Similarity for Call-by-Name Lambda Calculi.
https://scholar.archive.org/
Internet Archive Scholar query results feedeninfo@archive.orgFri, 05 Aug 2022 00:00:00 GMTfatcat-scholarhttps://scholar.archive.org/help1440Compositional theories for host-core languages
https://scholar.archive.org/work/r5n2mjui2jdivg3hav4xnzodye
Linear type theories, of various types and kinds, are of fundamental importance in most programming language research nowadays. In this paper we describe an extension of Benton's Linear-Non-Linear type theory and model for which we can prove some extra properties that make the system better behaved as far as its theory is concerned. We call this system the host-core type theory. The syntax of a host-core language is split into two parts, representing respectively a host language H and a core language C, embedded in H. This idea, derived from Benton's Linear-Non-Linear formulation of Linear Logic, allows a flexible management of data linearity, which is particularly useful in non-classical computational paradigms. The host-core style can be viewed as a simplified notion of multi-language programming, the process of software development in a heterogeneous programming language. In this paper, we present the typed calculus HC, a minimal and flexible host-core system that captures and standardizes common properties of an ideal class of host-core languages. We provide a denotational model in terms of enriched categories and we state a strong correspondence between syntax and semantics through the notion of internal language. The latter result provides some useful characterizations of host-core style, otherwise difficult to obtain. We also discuss some concrete instances, extensions and specializations of the system HC.Davide Trotta, Margherita Zorziwork_r5n2mjui2jdivg3hav4xnzodyeFri, 05 Aug 2022 00:00:00 GMTLIPIcs, Volume 239, TYPES 2021, Complete Volume
https://scholar.archive.org/work/uxb5tcwg6bflpdk4rslta5pn6a
LIPIcs, Volume 239, TYPES 2021, Complete VolumeHenning Basold, Jesper Cockx, Silvia Ghilezanwork_uxb5tcwg6bflpdk4rslta5pn6aThu, 04 Aug 2022 00:00:00 GMTPolymorphic Lambda Calculus with Context-Free Session Types
https://scholar.archive.org/work/m763hnpcfjfwxiarwhq6wnmnta
Context-free session types provide a typing discipline for recursive structured communication protocols on bidirectional channels. They overcome the restriction of regular session type systems to tail recursive protocols. This extension enables us to implement serialisation and deserialisation of tree structures in a fully type-safe manner. We present the theory underlying the language FreeST 2, which features context-free session types in an extension of System F with linear types and a kind system to distinguish message types and channel types. The system presents some metatheoretical challenges, which we address, contractivity in the presence of polymorphism, a non-trivial equational theory on types, and decidability of type equivalence. We also establish standard results on type preservation, progress, and a characterisation of erroneous processes.Bernardo Almeida, Andreia Mordido, Peter Thiemann, Vasco T. Vasconceloswork_m763hnpcfjfwxiarwhq6wnmntaTue, 02 Aug 2022 00:00:00 GMTCurry and Howard Meet Borel
https://scholar.archive.org/work/4phmcjuulzhtdfz5bjhavvgwiq
We show that an intuitionistic version of counting propositional logic corresponds, in the sense of Curry and Howard, to an expressive type system for the probabilistic event λ-calculus, a vehicle calculus in which both call-by-name and call-by-value evaluation of discrete randomized functional programs can be simulated. In this context, proofs (respectively, types) do not guarantee that validity (respectively, termination) holds, but reveal the underlying probability. We finally show how to obtain a system precisely capturing the probabilistic behavior of λ-terms, by endowing the type system with an intersection operator.Melissa Antonelli, Ugo Dal Lago, Paolo Pistonework_4phmcjuulzhtdfz5bjhavvgwiqTue, 02 Aug 2022 00:00:00 GMTA strong call-by-need calculus
https://scholar.archive.org/work/3cbecf3jrraffmhhxzhagvwonm
We present a call-by-need λ-calculus that enables strong reduction (that is, reduction inside the body of abstractions) and guarantees that arguments are only evaluated if needed and at most once. This calculus uses explicit substitutions and subsumes the existing strong-call-by-need strategy, but allows for more reduction sequences, and often shorter ones, while preserving the neededness. The calculus is shown to be normalizing in a strong sense: Whenever a λ-term t admits a normal form n in the λ-calculus, then any reduction sequence from t in the calculus eventually reaches a representative of the normal form n. We also exhibit a restriction of this calculus that has the diamond property and that only performs reduction sequences of minimal length, which makes it systematically better than the existing strategy. We have used the Abella proof assistant to formalize part of this calculus, and discuss how this experiment affected its design. In particular, it led us to derive a new description of call-by-need reduction based on inductive rules.Thibaut Balabonskiwork_3cbecf3jrraffmhhxzhagvwonmTue, 02 Aug 2022 00:00:00 GMTRelating Functional and Imperative Session Types
https://scholar.archive.org/work/z6op7upzzravpczmf5iifupyea
Imperative session types provide an imperative interface to session-typed communication. In such an interface, channel references are first-class objects with operations that change the typestate of the channel. Compared to functional session type APIs, the program structure is simpler at the surface, but typestate is required to model the current state of communication throughout. Following an early work that explored the imperative approach, a significant body of work on session types has neglected the imperative approach and opts for a functional approach that uses linear types to manage channel references soundly. We demonstrate that the functional approach subsumes the early work on imperative session types by exhibiting a typing and semantics preserving translation into a system of linear functional session types. We further show that the untyped backwards translation from the functional to the imperative calculus is semantics preserving. We restrict the type system of the functional calculus such that the backwards translation becomes type preserving. Thus, we precisely capture the difference in expressiveness of the two calculi and conclude that the lack of expressiveness in the imperative calculus is largely due to restrictions imposed by its type system.Hannes Saffrich, Peter Thiemannwork_z6op7upzzravpczmf5iifupyeaThu, 28 Jul 2022 00:00:00 GMTNormalization for Fitch-Style Modal Calculi
https://scholar.archive.org/work/qqan4xsiyfawxgr6ejnw7dovkm
Fitch-style modal lambda calculi enable programming with necessity modalities in a typed lambda calculus by extending the typing context with a delimiting operator that is denoted by a lock. The addition of locks simplifies the formulation of typing rules for calculi that incorporate different modal axioms, but each variant demands different, tedious and seemingly ad hoc syntactic lemmas to prove normalization. In this work, we take a semantic approach to normalization, called normalization by evaluation (NbE), by leveraging the possible-world semantics of Fitch-style calculi to yield a more modular approach to normalization. We show that NbE models can be constructed for calculi that incorporate the K, T and 4 axioms of modal logic, as suitable instantiations of the possible-world semantics. In addition to existing results that handle beta-equivalence, our normalization result also considers eta-equivalence for these calculi. Our key results have been mechanized in the proof assistant Agda. Finally, we showcase several consequences of normalization for proving meta-theoretic properties of Fitch-style calculi as well as programming-language applications based on different interpretations of the necessity modality.Nachiappan Valliappan, Fabian Ruch, Carlos Tomé Cortiñaswork_qqan4xsiyfawxgr6ejnw7dovkmTue, 26 Jul 2022 00:00:00 GMTQunity: A Unified Language for Quantum and Classical Computing (Extended Version)
https://scholar.archive.org/work/7kumckl6sra7lon4ccsuudmgem
We introduce Qunity, a new quantum programming language designed to treat quantum computing as a natural generalization of classical computing. Qunity presents a unified syntax where familiar programming constructs can have both quantum and classical effects. For example, one can use sum types to implement the direct sum of linear operators, exception handling syntax to implement projective measurements, and aliasing to induce entanglement. Further, Qunity takes advantage of the overlooked BQP subroutine theorem, allowing one to construct reversible subroutines from irreversible quantum algorithms through the uncomputation of "garbage" outputs. Unlike existing languages that enable quantum aspects with separate add-ons (like a classical language with quantum gates bolted on), Qunity provides a unified syntax along with a novel denotational semantics that guarantees that programs are quantum mechanically valid. We present Qunity's syntax, type system, and denotational semantics, showing how it can cleanly express several quantum algorithms. We also detail how Qunity can be compiled to a low-level qubit circuit language like OpenQASM, proving the realizability of our design.Finn Voichick, Liyi Li, Robert Rand, Michael Hickswork_7kumckl6sra7lon4ccsuudmgemWed, 20 Jul 2022 00:00:00 GMTCentral Submonads and Notions of Computation
https://scholar.archive.org/work/g5njwrxa6ba4lappyanhdfrtbi
The notion of "centre" has been introduced for many algebraic structures in mathematics. A notable example is the centre of a monoid which always determines a commutative submonoid. Monads in category theory are important algebraic structures that may be used to model computational effects in programming languages and in this paper we show how the notion of centre may be extended to strong monads acting on symmetric monoidal categories. We show that the centre of a strong monad 𝒯, if it exists, determines a commutative submonad 𝒵 of 𝒯, such that the Kleisli category of 𝒵 is isomorphic to the premonoidal centre (in the sense of Power and Robinson) of the Kleisli category of 𝒯. We provide three equivalent conditions which characterise the existence of the centre of 𝒯 and we show that every strong monad on many well-known naturally occurring categories does admit a centre, thereby showing that this new notion is ubiquitous. We also provide a computational interpretation of our ideas which consists in giving a refinement of Moggi's monadic metalanguage. The added benefit is that this allows us to immediately establish a large class of contextually equivalent programs for computational effects that are described via monads that admit a non-trivial centre by simply considering the richer syntactic structure provided by the refinement.TItouan Carette, Louis Lemonnier, Vladimir Zamdzhievwork_g5njwrxa6ba4lappyanhdfrtbiTue, 19 Jul 2022 00:00:00 GMTQuantum Software Components and Platforms: Overview and Quality Assessment
https://scholar.archive.org/work/ogsuysgsrze6xfy5ilt2zrmsma
Quantum computing is the latest revolution in computing and will probably come to be seen an advance as important as the steam engine or the information society. In the last few decades, our understanding of quantum computers has expanded and multiple efforts have been made to create languages, libraries, tools, and environments to facilitate their programming. Nonetheless, quantum computers are complex systems at the bottom of a stack of layers that programmers need to understand. Hence, efforts towards creating quantum programming languages and computing environments that can abstract low-level technology details have become crucial steps to achieve a useful quantum computing technology. However, most of these environments still lack many of the features that would be desirable, such as those outlined in The Talavera Manifesto for Quantum Software Engineering and Programming. For advancing quantum computing, we will need to develop quantum software engineering techniques and tools to ensure the feasibility of this new type of quantum software. To contribute to this goal, this paper provides a review of the main quantum software components and platforms. We also propose a set of quality requirements for the development of quantum software platforms and the conduct of their quality assessment.Manuel A. Serrano, José A. Cruz-Lemus, Ricardo Pérez-Castillo, Mario Piattiniwork_ogsuysgsrze6xfy5ilt2zrmsmaMon, 18 Jul 2022 00:00:00 GMTMonadic and Higher-Order Structure
https://scholar.archive.org/work/qj4y3poak5e6fj27rtwvxalelq
Simple type theories, ubiquitous in the study of programming language theory, augment algebraic theories with higher-order, variable-binding structure. This motivates the definition of higher-order algebraic theories to capture this structure, permitting the study of simple type theories in a categorical setting analogous to that of algebraic theories. The theory of higher-order algebraic theories is in one sense much richer than that of algebraic theories, as we may stratify the former according to their order: for instance, the first-order algebraic theories are precisely the classical algebraic theories, the second-order algebraic theories permit operators to abstract over operators, the third-order algebraic theories permit operators to abstract over operators that themselves abstract over operators, and so on. We study the structure of the category of (n + 1)th-order algebraic theories, demonstrating that it may be viewed as a construction on the category of nth-order algebraic theories, facilitating an inductive construction of the category of higher-order algebraic theories. In turn, this description leads naturally to a monad–theory correspondence for higher-order algebraic theories, subsuming the classical monad–theory correspondence, and providing a new, monadic understanding of higher-order structure. In proving the monad–theory correspondence for higher-order algebraic theories, we are led to reconsider the traditional perspective on the classical monad–theory correspondence. In doing so, we reveal a new understanding of the relationship between algebraic theories and monads that clarifies the nature of the correspondence. The crucial insight follows from the consideration of relative monads, which are shown to act as an intermediary in the correspondence. To support our proposal that this be viewed as the correct perspective of the monad–theory correspondence, we show how the same proof may be carried out in a formal 2-categorical setting. The classical monad–theory correspondence, as well as those i [...]Nathanael Arkor, Apollo-University Of Cambridge Repository, Marcelo Fiorework_qj4y3poak5e6fj27rtwvxalelqFri, 08 Jul 2022 00:00:00 GMTObject-Oriented Choreographic Programming
https://scholar.archive.org/work/6y5vvri6xbd3pjtuyfvnbnfxsa
We present Choral, the first language for programming choreographies (multiparty protocols) that builds on top of mainstream programming abstractions: in Choral, choreographies are objects. Given a choreography that defines interactions among some roles (Alice, Bob, etc.), an implementation for each role in the choreography is automatically generated by a compiler. These implementations are libraries in pure Java, which developers can modularly compose in their own programs to participate correctly in choreographies.Saverio Giallorenzo, Fabrizio Montesi, Marco Peressottiwork_6y5vvri6xbd3pjtuyfvnbnfxsaSun, 03 Jul 2022 00:00:00 GMTProgramming Languages and Law: A Research Agenda
https://scholar.archive.org/work/ythffetu3fgnjcaeav52yumcn4
If code is law, then the language of law is a programming language. Lawyers and legal scholars can learn about law by studying programming-language theory, and programming-language tools can be usefully applied to legal problems. This article surveys the history of research on programming languages and law and presents ten promising avenues for future efforts. Its goals are to explain how the combination of programming languages and law is distinctive within the broader field of computer science and law, and to demonstrate with concrete examples the remarkable power of programming-language concepts in this new domain.James Grimmelmannwork_ythffetu3fgnjcaeav52yumcn4Wed, 29 Jun 2022 00:00:00 GMTStrategies for Asymptotic Normalization
https://scholar.archive.org/work/wr6dl6ahpfgwjkn3rfglllsavy
We present an abstract technique to study normalizing strategies when termination is asymptotic, that is, it appears as a limit. Asymptotic termination occurs in several settings, such as effectful, and in particular probabilistic computation - where the limits are distributions over the possible outputs - or infinitary lambda-calculi - where the limits are infinitary terms such as Böhm trees. As a concrete application, we obtain a result which is of independent interest: a normalization theorem for Call-by-Value (and - in a uniform way - for Call-by-Name) probabilistic lambda-calculus.Claudia Faggian, Giulio Guerrieri, Amy P. Feltywork_wr6dl6ahpfgwjkn3rfglllsavyTue, 28 Jun 2022 00:00:00 GMTProceedings of the SNS Logic Colloquium March 1990
https://scholar.archive.org/work/myebfuw7yfaw7a6vspe24lhx4u
Republication of the proceedings of the Informal Logic Colloquium held in March 1990 at the Seminar für natürlichsprachliche Systeme (SNS) of the University of Tübingen.Peter Schroeder-Heister, Universitaet Tuebingenwork_myebfuw7yfaw7a6vspe24lhx4uMon, 27 Jun 2022 00:00:00 GMTWhat If We Don't Pop the Stack? The Return of 2nd-Class Values
https://scholar.archive.org/work/5jou75azejdwrcndg27zcetjda
Using a stack for managing the local state of procedures as popularized by Algol is a simple but effective way to achieve a primitive form of automatic memory management. Hence, the call stack remains the backbone of most programming language runtimes to the present day. However, the appealing simplicity of the call stack model comes at the price of strictly enforced limitations: since every function return pops the stack, it is difficult to return stack-allocated data from a callee upwards to its caller - especially variable-size data such as closures. This paper proposes a solution by introducing a small tweak to the usual stack semantics. We design a type system that tracks the underlying storage mode of values, and when a function returns a stack-allocated value, we just don't pop the stack! Instead, the stack frame is de-allocated together with a parent the next time a heap-allocated value or primitive is returned. We identify a range of use cases where this delayed-popping strategy is beneficial, ranging from closures to trait objects to other types of variable-size data. Our evaluation shows that this execution model reduces heap and GC pressure and recovers spatial locality of programs improving execution time between 10% and 25% with respect to standard execution.Anxhelo Xhebraj, Oliver Bračevac, Guannan Wei, Tiark Rompf, Karim Ali, Jan Vitekwork_5jou75azejdwrcndg27zcetjdaThu, 23 Jun 2022 00:00:00 GMTFunctional Programming for Distributed Systems with XC
https://scholar.archive.org/work/pn5sd66xirfv7ayb4m2dv5gw2a
Programming distributed systems is notoriously hard due to - among the others - concurrency, asynchronous execution, message loss, and device failures. Homogeneous distributed systems consist of similar devices that communicate to neighbours and execute the same program: they include wireless sensor networks, network hardware, and robot swarms. For the homogeneous case, we investigate an experimental language design that aims to push the abstraction boundaries farther, compared to existing approaches. In this paper, we introduce the design of XC, a programming language to develop homogeneous distributed systems. In XC, developers define the single program that every device executes and the overall behaviour is achieved collectively, in an emergent way. The programming framework abstracts over concurrency, asynchronous execution, message loss, and device failures. We propose a minimalistic design, which features a single declarative primitive for communication, state management, and connection management. A mechanism called alignment enables developers to abstract over asynchronous execution while still retaining composability. We define syntax and operational semantics of a core calculus, and briefly discuss its main properties. XC comes with two DSL implementations: a DSL in Scala and one in C++. An evaluation based on smart-city monitoring demonstrates XC in a realistic application.Giorgio Audrito, Roberto Casadei, Ferruccio Damiani, Guido Salvaneschi, Mirko Viroli, Karim Ali, Jan Vitekwork_pn5sd66xirfv7ayb4m2dv5gw2aThu, 23 Jun 2022 00:00:00 GMTA categorical framework for congruence of applicative bisimilarity in higher-order languages
https://scholar.archive.org/work/ucnkh74hybc67hla5zop3w2zd4
Applicative bisimilarity is a coinductive characterisation of observational equivalence in call-by-name lambda-calculus, introduced by Abramsky (1990). Howe (1996) gave a direct proof that it is a congruence, and generalised the result to all languages complying with a suitable format. We propose a categorical framework for specifying operational semantics, in which we prove that (an abstract analogue of) applicative bisimilarity is automatically a congruence. Example instances include standard applicative bisimilarity in call-by-name, call-by-value, and call-by-name non-deterministic λ-calculus, and more generally all languages complying with a variant of Howe's format.Tom Hirschowitzwork_ucnkh74hybc67hla5zop3w2zd4Tue, 21 Jun 2022 00:00:00 GMTProgramming with union, intersection, and negation types
https://scholar.archive.org/work/43sehqqgzfbalcbiprick7r37m
In this essay, I present the advantages and, I dare say, the beauty of programming in a language with set-theoretic types, that is, types that include union, intersection, and negation type connectives. I show by several examples how set-theoretic types are necessary to type some common programming patterns, but also how they play a key role in typing several language constructs-from branching and pattern matching to function overloading and type-cases-very precisely. I start by presenting the theory of types known as semantic subtyping and extend it to include polymorphic types. Next, I discuss the design of languages that use these types. I start by defining a theoretical framework that covers all the examples given in the first part of the presentation. Since the system of the framework cannot be effectively implemented, I then describe three effective restrictions of this system: (i) a polymorphic language with explicitly-typed functions, (ii) an implicitly-typed polymorphic language \'a la Hindley-Milner, and (iii) a monomorphic language that, by implementing classic union-elimination, precisely reconstructs intersection types for functions and implements a very general form of occurrence typing. I conclude the presentation with a short overview of other aspects of these languages, such as pattern matching, gradual typing, and denotational semantics.Giuseppe Castagnawork_43sehqqgzfbalcbiprick7r37mMon, 13 Jun 2022 00:00:00 GMTActris 2.0: Asynchronous Session-Type Based Reasoning in Separation Logic
https://scholar.archive.org/work/xznj5p3r5zc4lbc76uemi5xfaq
Message passing is a useful abstraction for implementing concurrent programs. For real-world systems, however, it is often combined with other programming and concurrency paradigms, such as higher-order functions, mutable state, shared-memory concurrency, and locks. We present Actris: a logic for proving functional correctness of programs that use a combination of the aforementioned features. Actris combines the power of modern concurrent separation logics with a first-class protocol mechanism -- based on session types -- for reasoning about message passing in the presence of other concurrency paradigms. We show that Actris provides a suitable level of abstraction by proving functional correctness of a variety of examples, including a channel-based merge sort, a channel-based load-balancing mapper, and a variant of the map-reduce model, using concise specifications. While Actris was already presented in a conference paper (POPL'20), this paper expands the prior presentation significantly. Moreover, it extends Actris to Actris 2.0 with a notion of subprotocols -- based on session-type subtyping -- that permits additional flexibility when composing channel endpoints, and that takes full advantage of the asynchronous semantics of message passing in Actris. Soundness of Actris 2.0 is proven using a model of its protocol mechanism in the Iris framework. We have mechanised the theory of Actris, together with custom tactics, as well as all examples in the paper, in the Coq proof assistant.Jonas Kastberg Hinrichsen, Jesper Bengtson, Robbert Krebberswork_xznj5p3r5zc4lbc76uemi5xfaqFri, 10 Jun 2022 00:00:00 GMT