24 research outputs found
Session Types in a Linearly Typed Multi-Threaded Lambda-Calculus
We present a formalization of session types in a multi-threaded
lambda-calculus (MTLC) equipped with a linear type system, establishing for the
MTLC both type preservation and global progress. The latter (global progress)
implies that the evaluation of a well-typed program in the MTLC can never reach
a deadlock. As this formulated MTLC can be readily embedded into ATS, a
full-fledged language with a functional programming core that supports both
dependent types (of DML-style) and linear types, we obtain a direct
implementation of session types in ATS. In addition, we gain immediate support
for a form of dependent session types based on this embedding into ATS.
Compared to various existing formalizations of session types, we see the one
given in this paper is unique in its closeness to concrete implementation. In
particular, we report such an implementation ready for practical use that
generates Erlang code from well-typed ATS source (making use of session types),
thus taking great advantage of the infrastructural support for distributed
computing in Erlang.Comment: This is the original version of the paper on supporting programming
with dyadic session types in AT
Linearly Typed Dyadic Group Sessions for Building Multiparty Sessions
Traditionally, each party in a (dyadic or multiparty) session implements
exactly one role specified in the type of the session. We refer to this kind of
session as an individual session (i-session). As a generalization of i-session,
a group session (g-session) is one in which each party may implement a group of
roles based on one channel. In particular, each of the two parties involved in
a dyadic g-session implements either a group of roles or its complement. In
this paper, we present a formalization of g-sessions in a multi-threaded
lambda-calculus (MTLC) equipped with a linear type system, establishing for the
MTLC both type preservation and global progress. As this formulated MTLC can be
readily embedded into ATS, a full-fledged language with a functional
programming core that supports both dependent types (of DML-style) and linear
types, we obtain a direct implementation of linearly typed g-sessions in ATS.
The primary contribution of the paper lies in both of the identification of
g-sessions as a fundamental building block for multiparty sessions and the
theoretical development in support of this identification.Comment: This paper can be seen as the pre-sequel to classical linear
multirole logic (CLML). arXiv admin note: substantial text overlap with
arXiv:1603.0372
Session Types for the Transport Layer: Towards an Implementation of TCP
Session types are a typing discipline used to formally describe communication-driven applications with the aim of fewer errors and easier debugging later into the life cycle of the software. Protocols at the transport layer such as TCP, UDP, and QUIC underpin most of the communication on the modern Internet and affect billions of end-users. The transport layer has different requirements and constraints compared to the application layer resulting in different requirements for verification. Despite this, to our best knowledge, no work shows the application of session types at the transport layer. In this work, we discuss how multiparty session types (MPST) can be applied to implement the TCP protocol. We develop an MPST-based implementation of a subset of a TCP server in Rust and test its interoperability against the Linux TCP stack. Our results highlight the differences in assumptions between session type theory and the way transport layer protocols are usually implemented. This work is the first step towards bringing session types into the transport layer
Session types in a linearly typed multi-threaded lambda-calculus
We present a formalization of session types in a multi-threaded lambda-calculus (MTLC) equipped with a linear type system, establishing for the MTLC both type preservation and global progress. The latter (global progress) implies that the evaluation of a well-typed program in the MTLC can never reach a deadlock. As this formulated MTLC can be readily embedded into ATS, a full-fledged language with a functional programming core that supports both dependent types (of DML-style) and linear types, we obtain a direct implementation of session types in ATS. In addition, we gain immediate support for a form of dependent session types based on this embedding into ATS. Compared to various existing formalizations of session types, we see the one given in this paper is unique in its closeness to concrete implementation. In particular, we report such an implementation ready for practical use that generates Erlang code from well-typed ATS source (making use of session types), thus taking great advantage of the infrastructural support for distributed computing in Erlang.First author draf
Linearly typed dyadic group sessions for building multiparty sessions
Traditionally, each party in a (dyadic or multiparty) session implements exactly one role specified in the type of the session. We refer to this kind of session as an individual session (i-session). As a generalization of i-session, a group session (g-session) is one in which each party may implement a group of roles based on one channel. In particular, each of the two parties involved in a dyadic g-session implements either a group of roles or its complement. In this paper, we present a formalization of g-sessions in a multi-threaded lambda-calculus (MTLC) equipped with a linear type system, establishing for the MTLC both type preservation and global progress. As this formulated MTLC can be readily embedded into ATS, a full-fledged language with a functional programming core that supports both dependent types (of DML-style) and linear types, we obtain a direct implementation of linearly typed g-sessions in ATS. The primary contribution of the paper lies in both of the identification of g-sessions as a fundamental building block for multiparty sessions and the theoretical development in support of this identification.First author draf
Morehead State University 1994 Alumni Directory
1994 Alumni Directory of Morehead State University.https://scholarworks.moreheadstate.edu/college_histories/1186/thumbnail.jp
Morehead State University Directory 1997
The 1997 Directory of Morehead State University.https://scholarworks.moreheadstate.edu/college_histories/1187/thumbnail.jp
Making Session Types Go
The ubiquitous nature of today’s multi-core processors means concurrency is ever more
important to effectively use available computing resources. By its very nature however,
concurrent programming is complex and error-prone - accounting for random process
interleavings and managing shared resource control is difficult and can lead to instances
of incorrect behavior or deadlocks in concurrent programs. As such, ensuring the cor-
rectness of concurrent programs is of the utmost importance. Session types are a typing
discipline for message-passing concurrency that is able to ensure strong compile-time
correctness guarantees for concurrent programs by providing a protocols-as-types view
of communication. In particular, we make use of the interpretation of intuitionistic linear
logic formulas as session types, which serves as the basis for logical session types. These
logical session types offer stronger guarantees at compile-time than simple session types.
In this work we implement a (logically) session-typed functional language, along with
its associated type checker, and develop a compiler for said language targeting the Go
language. Our work features standard functional programming features combined with
channel-based, session-typed, concurrency primitives and thread spawning. Concurrency
and pure functional values are separated via a monad-like interface, in the style of Haskell.
Our compilation pipeline takes a program, type checks it to ensure the absence of dead-
locks and communication errors, and then translates it to valid Go code, leveraging Go’s
channel and lightweight thread infrastructure. The translation requires compensating
the mismatch between Go’s channel types and session types, which we achieve via a
state machine view of session types. We showcase the expressiveness of our language via
a series of examples, encoding concurrency idioms in the style of map-reduce, among
others. We also perform a performance evaluation of our implementation, experimenting
with different settings and testing it against a native Go implementation. We follow with a
discussion of the experimental results. Finally, we end by discussing possible approaches
to future work, namely in terms of compiler optimizations and increase in language
expressiveness.Atualmente, a natureza ubíqua de processadores multi-core faz da concorrência algo cada
vez mais importante para utilização eficaz dos recursos. Mas a programação concorrente é
complexa e dada a erros – antecipar a execução intercalada de processos e gerir o controlo
de recursos partilhados é difícil; pode levar a comportamento incorreto, ou deadlocks em
programas concorrentes. Assim, assegurar a correção de programas concorrentes é da
maior importância. Tipos de sessão são uma disciplina de tipos para concorrência baseada
na troca de mensagens que é capaz de dar fortes garantias de correção em tempo de com-
pilação para programas concorrentes, oferecendo uma visão da comunicação em termos
de protocolos-como-tipos. Utilizamos a interpretação de fórmulas da lógica linear intuici-
onista como tipos de sessão, que serve de base para tipos de sessão lógicos que oferecem
garantias mais fortes do que tipos de sessão simples. Neste trabalho implementamos uma
linguagem funcional, com tipos de sessão (lógicos), juntamente com o seu type checker, e
desenvolvemos um compilador para a dita linguagem que tem por alvo a linguagem Go. A
linguagem apresenta as funcionalidades standard da programação funcional, combinadas
com thread spawning e primitivas de concorrência baseadas em canais e tipificadas com
tipos de sessão. A concorrência e valores funcionais são separados por uma interface tipo
monad, ao estilo de Haskell. O processo de compilação recebe um programa, verifica o seu
tipo para assegurar a ausência de deadlocks e erros de comunicação, e tradu-lo para código
Go, utilizando a infraestrutura de canais e lightweight threads de Go. A tradução implica
uma compensação da diferença entre os tipos de canais em Go e os tipos de sessão, que
alcançamos através duma visão de tipos de sessão como máquinas de estados. Demons-
tramos a expressividade da linguagem através duma série de exemplos, implementando
idiomas de concorrência como map-reduce, entre outros. Realizamos uma avaliação de
desempenho da implementação, experimentado definições diferentes e testando-a contra
uma implementação nativa em Go, discutindo depois os resultados experimentais. Por
fim, propomos várias abordagens para trabalho futuro, em termos de optimização do
compilador e aumento da expressividade da linguagem
Foundations of Information-Flow Control and Effects
In programming language research, information-flow control (IFC) is a technique for enforcing a variety of security aspects, such as confidentiality of data,on programs. This Licenciate thesis makes novel contributions to the theory and foundations of IFC in the following ways: Chapter A presents a new proof method for showing the usual desired property of noninterference; Chapter B shows how to securely extend the concurrent IFC language MAC with asynchronous exceptions; and, Chapter C presents a new and simpler language for IFC with effects based on an explicit separation of pure and effectful computations
Faculty Publications and Creative Works 2005
Faculty Publications & Creative Works is an annual compendium of scholarly and creative activities of University of New Mexico faculty during the noted calendar year. Published by the Office of the Vice President for Research and Economic Development, it serves to illustrate the robust and active intellectual pursuits conducted by the faculty in support of teaching and research at UNM. In 2005, UNM faculty produced over 1,887 works, including 1,887 scholarly papers and articles, 57 books, 127 book chapters, 58 reviews, 68 creative works and 4 patented works. We are proud of the accomplishments of our faculty which are in part reflected in this book, which illustrates the diversity of intellectual pursuits in support of research and education at the University of New Mexico