{"title":"Refinement Types: A Tutorial","authors":"Ranjit Jhala, Niki Vazou","doi":"10.1561/9781680838855","DOIUrl":"https://doi.org/10.1561/9781680838855","url":null,"abstract":"Refinement types enrich a language's type system with logical predicates that circumscribe the set of values described by the type, thereby providing software developers a tunable knob with which to inform the type system about what invariants and correctness properties should be checked on their code. In this article, we distill the ideas developed in the substantial literature on refinement types into a unified tutorial that explains the key ingredients of modern refinement type systems. In particular, we show how to implement a refinement type checker via a progression of languages that incrementally add features to the language or type system.","PeriodicalId":376429,"journal":{"name":"Found. Trends Program. Lang.","volume":"7 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2020-10-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130091834","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Tutorial on Static Inference of Numeric Invariants by Abstract Interpretation","authors":"A. Miné","doi":"10.1561/2500000034","DOIUrl":"https://doi.org/10.1561/2500000034","url":null,"abstract":"Born in the late 70s, Abstract Interpretation has proven an effective method to construct static analyzers. It has led to successful program analysis tools routinely used in avionic, automotive, and space industries to help ensuring the correctness of missioncritical software. This tutorial presents Abstract Interpretation and its use to create static analyzers that infer numeric invariants on programs. We first present the theoretical bases of Abstract Interpretation: how to assign a well-defined formal semantics to programs, construct computable approximations to derive effective analyzers, and ensure soundness, i.e., any property derived by the analyzer is true of all actual executions — although some properties may be missed due to approximations, a necessary compromise to keep the analysis automatic, sound, and terminating when inferring uncomputable properties. We describe the classic numeric abstractions readily available to an analysis designer: intervals, polyhedra, congruences, octagons, etc., as well as domain combiners: the reduced product and various disjunctive completions. This tutorial focuses not only on the semantic aspect, but also on the algorithmic one, providing a description of the data-structures and algorithms necessary to effectively implement all our abstractions. We will encounter many trade-offs between cost on the one hand, and precision and expressiveness on the other hand. Invariant inference is formalized on an idealized, toy-language, manipulating perfect numbers, but the principles and algorithms we present are effectively used in analyzers for real industrial programs, although this is out of the scope of this tutorial. This tutorial is intended as an entry course in Abstract Interpretation, after which the reader should be ready to read the research literature on current advances in Abstract Interpretation and on the design of static analyzers for real languages.","PeriodicalId":376429,"journal":{"name":"Found. Trends Program. Lang.","volume":"4 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2018-02-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126585242","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Computer-Assisted Query Formulation","authors":"Alvin Cheung, Armando Solar-Lezama","doi":"10.1561/2500000018","DOIUrl":"https://doi.org/10.1561/2500000018","url":null,"abstract":"Database management systems DBMS typically provide an applicationprogramming interface for users to issue queries using querylanguages such as SQL. Many such languages were originally designedfor business data processing applications. While these applications arestill relevant, two other classes of applications have become importantusers of data management systems: a web applications that issuequeries programmatically to the DBMS, and b data analytics involvingcomplex queries that allow data scientists to better understand theirdatasets. Unfortunately, existing query languages provided by databasemanagement systems are often far from ideal for these application domains.In this tutorial, we describe a set of technologies that assist users inspecifying database queries for different application domains. The goalof such systems is to bridge the gap between current query interfacesprovided by database management systems and the needs of differentusage scenarios that are not well served by existing query languages.We discuss the different interaction modes that such systems provideand the algorithms used to infer user queries. In particular, we focuson a new class of systems built using program synthesis techniques,and furthermore discuss opportunities in combining synthesis and othermethods used in prior systems to infer user queries.","PeriodicalId":376429,"journal":{"name":"Found. Trends Program. Lang.","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-05-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122370267","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
D. Ancona, V. Bono, M. Bravetti, Joana Campos, Giuseppe Castagna, Pierre-Malo Deniélou, S. Gay, N. Gesbert, Elena Giachino, Raymond Hu, E. Johnsen, F. Martins, V. Mascardi, F. Montesi, R. Neykova, Nicholas Ng, L. Padovani, V. Vasconcelos, N. Yoshida
{"title":"Behavioral Types in Programming Languages","authors":"D. Ancona, V. Bono, M. Bravetti, Joana Campos, Giuseppe Castagna, Pierre-Malo Deniélou, S. Gay, N. Gesbert, Elena Giachino, Raymond Hu, E. Johnsen, F. Martins, V. Mascardi, F. Montesi, R. Neykova, Nicholas Ng, L. Padovani, V. Vasconcelos, N. Yoshida","doi":"10.1561/2500000031","DOIUrl":"https://doi.org/10.1561/2500000031","url":null,"abstract":"A recent trend in programming language research is to use behavioral type theory to ensure various correctness properties of large-scale, communication-intensive systems. Behavioral types encompass concepts such as interfaces, communication protocols, contracts, and choreography. The successful application of behavioral types requires a solid understanding of several practical aspects, from their representation in a concrete programming language, to their integration with other programming constructs such as methods and functions, to design and monitoring methodologies that take behaviors into account. Behavioral Types in Programming Languages provides the reader with the first comprehensive overview of the state of the art of these practical aspects, which are summarized as the pragmatics of behavioral types. Each section covers a particular programming paradigm or methodology, providing an ideal reference for programming languages researchers interested the topic, and in identifying the areas as yet unexplored.","PeriodicalId":376429,"journal":{"name":"Found. Trends Program. Lang.","volume":"3 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-05-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129663571","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Nominal Game Semantics","authors":"A. Murawski, N. Tzevelekos","doi":"10.1561/2500000017","DOIUrl":"https://doi.org/10.1561/2500000017","url":null,"abstract":"These tutorial notes present nominal game semantics, a denotational technique for modelling higher-order programs.","PeriodicalId":376429,"journal":{"name":"Found. Trends Program. Lang.","volume":"54 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131504681","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Pointer Analysis","authors":"Y. Smaragdakis, G. Balatsouras","doi":"10.1561/2500000014","DOIUrl":"https://doi.org/10.1561/2500000014","url":null,"abstract":"Pointer analysis is a fundamental static program analysis, with a rich literature and wide applications. The goal of pointer analysis is to compute an approximation of the set of program objects that a pointer variable or expression can refer to. We present an introduction and survey of pointer analysis techniques, with an emphasis on distilling the essence of common analysis algorithms. To this end, we focus on a declarative presentation of a common core of pointer analyses: algorithms are modeled as configurable, yet easy-to-follow, logical specifications. The specifications serve as a starting point for a broader discussion of the literature, as independent threads spun from the declarative model.","PeriodicalId":376429,"journal":{"name":"Found. Trends Program. Lang.","volume":"121 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-04-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"114377697","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Formal Models and Techniques for Analyzing Security Protocols: A Tutorial","authors":"V. Cortier, S. Kremer","doi":"10.1561/2500000001","DOIUrl":"https://doi.org/10.1561/2500000001","url":null,"abstract":"Security protocols are the small distributed programs which are omnipresent in our daily lives in areas such as online banking and commerce and mobile phones. Their purpose is to keep our transactions and personal data secure. Because these protocols are generally implemented on potentially insecure networks like the internet, they are notoriously difficult to devise. The field of symbolic analysis of security protocols has seen significant advances during the last few years. There is now a better understanding of decidability and complexity questions and successful automated tools for the provision of security and prevention of attack have been applied to numerous protocols, including industrial protocols. Models have been extended with algebraic properties to weaken the perfect cryptography assumption and even computational soundness results towards cryptographic models have been achieved. What was still missing, however, was a book which summarized the state-of-the-art of these advances. Whilst this book does not pretend to give a complete overview of the field - something which would be impossible in a single volume - it does, nevertheless, cover a representative sample of the ongoing work in this field, which is still very active. The book contains an introduction and ten tutorial-like chapters on selected topics, each written by a leading expert, and will be of interest to all those involved in the formal analysis of security protocols.","PeriodicalId":376429,"journal":{"name":"Found. Trends Program. Lang.","volume":"29 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2014-11-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115197019","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Principles of Eventual Consistency","authors":"S. Burckhardt","doi":"10.1561/2500000011","DOIUrl":"https://doi.org/10.1561/2500000011","url":null,"abstract":"In globally distributed systems, shared state is never perfect. When communication is neither fast nor reliable, we cannot achieve strong consistency, low latency, and availability at the same time. Unfortunately, abandoning strong consistency has wide ramifications. Eventual consistency, though attractive from a performance viewpoint, is challenging to understand and reason about, both for system architects and programmers. To provide robust abstractions, we need not just systems, but also principles: we need the ability to articulate what a consistency protocol is supposed to guarantee, and the ability to prove or refute such claims.In this tutorial, we carefully examine both the what and the how of consistency in distributed systems. First, we deconstruct consistency into individual guarantees relating the data type, the conflict resolution, and the ordering, and then reassemble them into a hierarchy of consistency models that starts with linearizability and gradually descends into sequential, causal, eventual, and quiescent consistency. Second, we present a collection of consistency protocols that illustrate common techniques, and include templates for implementations of arbitrary replicated data types that are fully available under partitions. Third, we demonstrate that our formalizations serve their purpose of enabling proofs and refutations, by proving both positive results (the correctness of the protocols) and a negative result (a version of the CAP theorem for sequential consistency).","PeriodicalId":376429,"journal":{"name":"Found. Trends Program. Lang.","volume":"3 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2014-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123956470","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}