16 research outputs found

    A framework for semiring-annotated type systems

    Get PDF
    The use of proof assistants as a tool for programming language theorists is becoming ever more practical and widespread. There is a range of satisfactory implementations of simply typed calculi in proof assistants based on dependent type theory. In this thesis, I extend an account of Simply Typed λ-calculus so as to be able to represent and reason about calculi whose variables have restricted usage patterns. Examples of such calculi include a logic with an S4 □-modality, in which certain variables cannot be used “inside” a box (□); and Linear Logic, in which linear variables have to be used exactly once. While there are existing implementations of some of these calculi in proof assistants, many of these implementations share little with the best presentations of simply typed calculi without variable usage restrictions, and thus end up being poorly understood or suboptimal in facilitating mechanised reasoning. Concretely, the main result of this thesis is a framework for representing and reasoning about a wide range of calculi with restricted variable usage. All of these calculi support novel simultaneous renaming and substitution operations. Furthermore, I provide several other examples of generic and specific programs facilitated by the framework. All of this work is implemented in the proof assistant Agda.The use of proof assistants as a tool for programming language theorists is becoming ever more practical and widespread. There is a range of satisfactory implementations of simply typed calculi in proof assistants based on dependent type theory. In this thesis, I extend an account of Simply Typed λ-calculus so as to be able to represent and reason about calculi whose variables have restricted usage patterns. Examples of such calculi include a logic with an S4 □-modality, in which certain variables cannot be used “inside” a box (□); and Linear Logic, in which linear variables have to be used exactly once. While there are existing implementations of some of these calculi in proof assistants, many of these implementations share little with the best presentations of simply typed calculi without variable usage restrictions, and thus end up being poorly understood or suboptimal in facilitating mechanised reasoning. Concretely, the main result of this thesis is a framework for representing and reasoning about a wide range of calculi with restricted variable usage. All of these calculi support novel simultaneous renaming and substitution operations. Furthermore, I provide several other examples of generic and specific programs facilitated by the framework. All of this work is implemented in the proof assistant Agda

    A type- and scope-safe universe of syntaxes with binding: their semantics and proofs

    Get PDF
    Almost every programming language's syntax includes a notion of binder and corresponding bound occurrences, along with the accompanying notions of alpha-equivalence, capture-avoiding substitution, typing contexts, runtime environments, and so on. In the past, implementing and reasoning about programming languages required careful handling to maintain the correct behaviour of bound variables. Modern programming languages include features that enable constraints like scope safety to be expressed in types. Nevertheless, the programmer is still forced to write the same boilerplate over again for each new implementation of a scope safe operation (e.g., renaming, substitution, desugaring, printing, etc.), and then again for correctness proofs. We present an expressive universe of syntaxes with binding and demonstrate how to (1) implement scope safe traversals once and for all by generic programming; and (2) how to derive properties of these traversals by generic proving. Our universe description, generic traversals and proofs, and our examples have all been formalised in Agda and are available in the accompanying material available online at https://github.com/gallais/generic-syntax

    Programming Languages and Systems

    Get PDF
    This open access book constitutes the proceedings of the 31st European Symposium on Programming, ESOP 2022, which was held during April 5-7, 2022, in Munich, Germany, as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022. The 21 regular papers presented in this volume were carefully reviewed and selected from 64 submissions. They deal with fundamental issues in the specification, design, analysis, and implementation of programming languages and systems

    Logical Aspects of Logical Frameworks

    Get PDF

    Logical Aspects of Logical Frameworks

    Get PDF

    Programming Languages and Systems

    Get PDF
    This open access book constitutes the proceedings of the 31st European Symposium on Programming, ESOP 2022, which was held during April 5-7, 2022, in Munich, Germany, as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022. The 21 regular papers presented in this volume were carefully reviewed and selected from 64 submissions. They deal with fundamental issues in the specification, design, analysis, and implementation of programming languages and systems

    Substructural Simple Type Theories for Separation and In-place Update

    Get PDF
    This thesis studies two substructural simple type theories, extending the "separation" and "number-of-uses" readings of the basic substructural simply typed lambda-calculus with exchange. The first calculus, lambda_sep, extends the alpha lambda-calculus of O'Hearn and Pym by directly considering the representation of separation in a type system. We define type contexts with separation relations and introduce new type constructors of separated products and separated functions. We describe the basic metatheory of the calculus, including a sound and complete type-checking algorithm. We then give new categorical structure for interpreting the type judgements, and prove that it coherently, soundly and completely interprets the type theory. To show how the structure models separation we extend Day's construction of closed symmetric monoidal structure on functor categories to our categorical structure, and describe two instances dealing with the global and local separation. The second system, lambda_inplc, is a re-presentation of substructural calculus for in-place update with linear and non-linear values, based on Wadler's Linear typed system with non-linear types and Hofmann's LFPL. We identify some problems with the metatheory of the calculus, in particular the failure of the substitution rule to hold due to the call-by-value interpretation inherent in the type rules. To resolve this issue, we turn to categorical models of call-by-value computation, namely Moggi's Computational Monads and Power and Robinson's Freyd-Categories. We extend both of these to include additional information about the current state of the computation, defining Parameterised Freyd-categories and Parameterised Strong Monads. These definitions are equivalent in the closed case. We prove that by adding a commutativity condition they are a sound class of models for lambda_inplc. To obtain a complete class of models for lambda_inplc we refine the structure to better match the syntax. We also give a direct syntactic presentation of Parameterised Freyd-categories and prove that it is soundly and completely modelled by the syntax. We give a concrete model based on Day's construction, demonstrating how the categorical structure can be used to model call-by-value computation with in-place update and bounded heaps

    Verovatnosno zaključivanje u izračunavanju i teoriji funkcionalnih tipova

    Get PDF
    This thesis investigates two different approaches for probabilistic reasoning in models of computation. The most usual approach is to extend the language of untyped lambda calculus with probabilistic choice operator which results in probabilistic computation. This approach has shown to be very useful and applicable in various fields, e.g. robotics, natural language processing, and machine learning. Another approach is to extend the language of a typed lambda calculus with probability operators and to obtain a framework for probabilistic reasoning about the typed calculus in the style of probability logic. First, we study the lazy call-by-name probabilistic lambda calculus extended with let-in operator, and program equivalence in the calculus. Since the proof of context equivalence is quite challenging, we investigate some effective methods for proving the program equivalence. Probabilistic applicative bisimilarity has proved to be a suitable tool for proving the context equivalence in probabilistic setting. We prove that the probabilistic applicative bisimilarity is fully abstract with respect to the context equivalence in the probabilistic lambda calculus with let-in operator. Next, we introduce Kripke-style semantics for the full simply typed combinatory logic, that is, the simply typed combinatory logic extended with product types, sum types, empty type and unit type. The Kripke-style semantics is defined as a Kripke applicative structure, which is extensional and has special elements corresponding to basic combinators, provided with the valuation of term variables. We prove that the full simply typed combinatory logic is sound and complete with respect to the proposed semantics. We introduce the logic of combinatory logic, that is, a propositional extension of the simply typed combinatory logic. We prove that the axiomatization of the logic of combinatory logic is sound and strongly complete with respect to the proposed semantics. In addition, we prove that the proposed semantics is the new semantics for the simply typed combinatory logic containing the typing rule that ensures that equal terms inhabit the same type. Finally, we introduce the probabilistic extension of the logic of combinatory logic. We extend the logic of combinatory logic with probability operators and obtain a framework for probabilistic reasoning about typed combinatory terms. We prove that the given axiomatization of the logic is sound and strongly complete with respect to the proposed semantics.Теза истражује два различита приступа за вероватносно закључивање у моделима израчунавања. Најчешћи приступ се састоји у проширењу ламбда рачуна вероватносним оператором избора што резултира вероватносним израчунавањем. То се показало веома корисним и примењивим у разним областима, на пример у роботици, обради природног језика и машинском учењу. Други приступ јесте да проширимо језик рачуна вероватносним операторима и добијемо модел за вероватносно закључивање о типизираном рачуну у стилу вероватносне логике. Најпре проучавамо вероватносни ламбда рачун проширен лет-ин оператором где је примењена лења позив-по-имену стратегија евалуације, и изучавамо проблем еквиваленције програма у овом окружењу. Како је проблем доказивања контекстне еквиваленције доста изазован, истраживали смо ефикасне методе за доказивање еквиваленције програма. Вероватносна апликативна бисимулација се показала као одговарајући алат за доказивање еквиваленције програма у вероватносном окружењу. Доказујемо да је вероватносна апликативна бисимулација потпуно апстрактна у односу на контекстну еквиваленцију у вероватносном ламбда рачуну са лет-ин оператором. Затим уводимо Крипкеову семантику за целу комбинаторну логику са функционалним типовима, односно комбинаторну логику са функционалним типовима проширену типовима производа, типовима суме, празним типом и јединичним типом. Крипкеову семантику дефинишемо као Крипкеову апликативну структуру, која је екстензионална и има елементе који одговарају основним комбинаторима, и којој је придружена валуација променљивих. Доказујемо да је цела комбинаторна логика са функционалним типовима сагласна и потпуна у односу на уведене семантике. Уводимо логику комбинаторне логике, то јест исказно проширење комбинаторне логике са функционалним типовима. Доказујемо да је аксиоматизација логике комбинаторне логике сагласна и потпуна у односу на предложену семантику. Даље, показујемо да је уведена семантика нова семантика за комбинаторну логику са функционалним типовима проширену правилом типизирања које осигурава да једнаки терми имају исти тип. На крају, уводимо вероватносно проширење логике комбинаторне логике. Логику комбинаторне логике смо проширили са вероватносним операторима и добили модел за вероватносно закључивање о типизираним комбинаторним термима. Показујемо да је аксиоматизација логике сагласна и јако потпуна у односу на предложену семантику.Teza istražuje dva različita pristupa za verovatnosno zaključivanje u modelima izračunavanja. Najčešći pristup se sastoji u proširenju lambda računa verovatnosnim operatorom izbora što rezultira verovatnosnim izračunavanjem. To se pokazalo veoma korisnim i primenjivim u raznim oblastima, na primer u robotici, obradi prirodnog jezika i mašinskom učenju. Drugi pristup jeste da proširimo jezik računa verovatnosnim operatorima i dobijemo model za verovatnosno zaključivanje o tipiziranom računu u stilu verovatnosne logike. Najpre proučavamo verovatnosni lambda račun proširen let-in operatorom gde je primenjena lenja poziv-po-imenu strategija evaluacije, i izučavamo problem ekvivalencije programa u ovom okruženju. Kako je problem dokazivanja kontekstne ekvivalencije dosta izazovan, istraživali smo efikasne metode za dokazivanje ekvivalencije programa. Verovatnosna aplikativna bisimulacija se pokazala kao odgovarajući alat za dokazivanje ekvivalencije programa u verovatnosnom okruženju. Dokazujemo da je verovatnosna aplikativna bisimulacija potpuno apstraktna u odnosu na kontekstnu ekvivalenciju u verovatnosnom lambda računu sa let-in operatorom. Zatim uvodimo Kripkeovu semantiku za celu kombinatornu logiku sa funkcionalnim tipovima, odnosno kombinatornu logiku sa funkcionalnim tipovima proširenu tipovima proizvoda, tipovima sume, praznim tipom i jediničnim tipom. Kripkeovu semantiku definišemo kao Kripkeovu aplikativnu strukturu, koja je ekstenzionalna i ima elemente koji odgovaraju osnovnim kombinatorima, i kojoj je pridružena valuacija promenljivih. Dokazujemo da je cela kombinatorna logika sa funkcionalnim tipovima saglasna i potpuna u odnosu na uvedene semantike. Uvodimo logiku kombinatorne logike, to jest iskazno proširenje kombinatorne logike sa funkcionalnim tipovima. Dokazujemo da je aksiomatizacija logike kombinatorne logike saglasna i potpuna u odnosu na predloženu semantiku. Dalje, pokazujemo da je uvedena semantika nova semantika za kombinatornu logiku sa funkcionalnim tipovima proširenu pravilom tipiziranja koje osigurava da jednaki termi imaju isti tip. Na kraju, uvodimo verovatnosno proširenje logike kombinatorne logike. Logiku kombinatorne logike smo proširili sa verovatnosnim operatorima i dobili model za verovatnosno zaključivanje o tipiziranim kombinatornim termima. Pokazujemo da je aksiomatizacija logike saglasna i jako potpuna u odnosu na predloženu semantiku

    Foundations of Software Science and Computation Structures

    Get PDF
    This open access book constitutes the proceedings of the 23rd International Conference on Foundations of Software Science and Computational Structures, FOSSACS 2020, which took place in Dublin, Ireland, in April 2020, and was held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020. The 31 regular papers presented in this volume were carefully reviewed and selected from 98 submissions. The papers cover topics such as categorical models and logics; language theory, automata, and games; modal, spatial, and temporal logics; type theory and proof theory; concurrency theory and process calculi; rewriting theory; semantics of programming languages; program analysis, correctness, transformation, and verification; logics of programming; software specification and refinement; models of concurrent, reactive, stochastic, distributed, hybrid, and mobile systems; emerging models of computation; logical aspects of computational complexity; models of software security; and logical foundations of data bases.

    Foundations of Software Science and Computation Structures

    Get PDF
    This open access book constitutes the proceedings of the 23rd International Conference on Foundations of Software Science and Computational Structures, FOSSACS 2020, which took place in Dublin, Ireland, in April 2020, and was held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020. The 31 regular papers presented in this volume were carefully reviewed and selected from 98 submissions. The papers cover topics such as categorical models and logics; language theory, automata, and games; modal, spatial, and temporal logics; type theory and proof theory; concurrency theory and process calculi; rewriting theory; semantics of programming languages; program analysis, correctness, transformation, and verification; logics of programming; software specification and refinement; models of concurrent, reactive, stochastic, distributed, hybrid, and mobile systems; emerging models of computation; logical aspects of computational complexity; models of software security; and logical foundations of data bases.
    corecore