Bernardo Toninho

dblp:46/9220 · DBLP profile ↗
← Back
28ranked-venue papers
8as first author
10since 2021 · last 2026
0000-0002-0746-7514ORCID · verified

Domains — the database's venue-derived domains; a paper can count in several

Software engineering, systems software and programming languages · 24 · 8 first-author · 10 since 2021Theory of computation · 10 · 4 first-author · 2 since 2021
YearPublicationVenuePosition
2026 In Perfect Harmony: Orchestrating Causality in Actor-Based Systems
Vladyslav Mikytiv, Bernardo Toninho, Carla Ferreira 0001
ICST2
2026 Welterweight Go: Boxing, Structural Subtyping, and Generics
abstract
Go’s unique combination of structural subtyping between generics and types with non-uniform runtime representations presents significant challenges for formalising the language. We introduce WG (Welterweight Go), a core model of Go that captures key features excluded by prior work, including underlying types, type unions and type sets, and proposed new features, such as generic methods. We also develop LWG, a lower-level language that models Go’s runtime mechanisms, notably the distinction between raw struct values and interface values that carry runtime type information (RTTI). We give a type-directed compilation from WG to LWG that demonstrates how the proposed features can be implemented while observing important design and implementation goals for Go: compatibility with separate compilation, and no runtime code generation. Unlike existing approaches based on static monomorphisation, our compilation strategy uses runtime type conversions and adaptor methods to handle the complex interactions between structural subtyping, generics, and Go’s runtime infrastructure.
Raymond Hu, Julien Lange, Bernardo Toninho, Philip Wadler, Robert Griesemer, Keith Randall
Proc. ACM Program. Lang.3
2026 Lazy Linearity for a Core Functional Language
abstract
Traditionally, in linearly typed languages, consuming a linear resource is synonymous with its syntactic occurrence in the program. However, under the lens of non-strict evaluation, linearity can be further understood semantically, where a syntactic occurrence of a resource does not necessarily entail using that resource when the program is executed. While this distinction has been largely unexplored, it turns out to be inescapable in Haskell’s optimising compiler, which heavily rewrites the source program in ways that break syntactic linearity but preserve the program’s semantics. We introduce Linear Core, a novel system which accepts the lazy semantics of linearity statically and is suitable for lazy languages such as the Core intermediate language of the Glasgow Haskell Compiler. We prove that Linear Core is sound, guaranteeing linear resource usage, and that multiple optimising transformations preserve linearity in Linear Core while failing to do so in Core. We have implemented Linear Core as a compiler plugin to validate the system against linearity-heavy libraries, including linear-base .
Rodrigo Mesquita, Bernardo Toninho
Proc. ACM Program. Lang.2
2025 Fusing Session-Typed Concurrent Programming into Functional Programming
abstract
We introduce FuSes , a Fu nctional programming language that integrates Ses sion-typed concurrent process calculus code. A functional layer sits on top of a session-typed process layer. To generate and reason about open session-typed processes, the functional layer uses the contextual box modality extended with linear channel contexts. Due to the fundamental differences between the operational semantics of the functional layer and the concurrent semantics of processes, we bridge the two layers using a set of primitives to run and observe the behavior of closed processes within the functional layer. In addition, FuSes supports code analysis and manipulation of open session-typed process code. To showcase its benefit to programmers, we implement well-known optimizations, such as batch optimizations, as type-safe metaprograms over concurrent processes. Our technical contributions include a type system for FuSes , an operational semantics, a proof of its type safety, and an implementation.
Chuta Sano, Deepak Garg 0001, Ryan Kavanagh, Brigitte Pientka, Bernardo Toninho
Proc. ACM Program. Lang.5
2024 The Session Abstract Machine
abstract
Abstract We build on a fine-grained analysis of session-based interaction as provided by the linear logic typing disciplines to introduce the SAM, an abstract machine for mechanically executing session-typed processes. A remarkable feature of the SAM’s design is its ability to naturally segregate and coordinate sequential with concurrent session behaviours. In particular, implicitly sequential parts of session programs may be efficiently executed by deterministic sequential application of SAM transitions, amenable to compilation, and without concurrent synchronisation mechanisms. We provide an intuitive discussion of the SAM structure and its underlying design, and state and prove its correctness for executing programs in a session calculus corresponding to full classical linear logic $$\textsf{CLL}$$ CLL . We also discuss extensions and applications of the SAM to the execution of linear and session-based programming languages.
Luís Caires, Bernardo Toninho
ESOP (1)2
2023 Intuitionistic Metric Temporal Logic
abstract
We develop Intuitionistic Metric Temporal Logic (IMTL) that extends prior work on intuitionistic temporal logics in two ways: (1) it generalizes discrete time to dense time with intervals so it can, for example, express the duration of signals, and (2) every proof corresponds to a temporal computation.
Luiz De Sá, Bernardo Toninho, Frank Pfenning
PPDP2
2022 Ferrite: A Judgmental Embedding of Session Types in Rust
abstract
Funding Information: Funding Stephanie Balzer: National Science Foundation Award No. CCF-1718267. Bernardo Toninho: FCT/MCTES grant NOVALINCS/BASE UIDB/04516/2020. Publisher Copyright: © Ruo Fei Chen, Stephanie Balzer, and Bernardo Toninho; licensed under Creative Commons License CC-BY 4.0
Ruofei Chen, Stephanie Balzer, Bernardo Toninho
ECOOP3
2022 Derivations with Holes for Concept-Based Program Synthesis
abstract
Program synthesis has the potential to democratize programming by enabling non-programmers to write software. But conventional approaches to synthesis may fail if given insufficient information - a common occurrence when asking non-experts to describe the application they want to write. This paper introduces a new concept-based program synthesis mechanism that can cope with incomplete knowledge, targeting low-code model-driven languages. Concepts are modelled in an ontology that represents user intent including basic actions (e.g. show, filter, and create) along with their associated data as well as basic user interface structures like screens or pages. Our synthesis framework consists of a system of derivation rules that supports deferred premises, which need not be immediately satisfied during synthesis. A derivation in which some deferred premises are missing will thus contain holes; semantically, it represents a proof that is conditional on the developer filling the holes with additional facts from the ontology. We translate derivations with holes to standard first-order logic derivations, where the holes are transformed into assumptions. We illustrate the feasibility and effectiveness of our framework with a proof-of-concept implementation and a set of illustrative examples.
João Costa Seco, Jonathan Aldrich, Bernardo Toninho, Carla Ferreira 0001
Onward!4
2021 A Decade of Dependent Session Types
abstract
invited-talk Share on A Decade of Dependent Session Types Authors: Bernardo Toninho NOVA School of Science and Technology and NOVA-LINCS, Portugal NOVA School of Science and Technology and NOVA-LINCS, PortugalView Profile , Luís Caires NOVA School of Science and Technology and NOVA-LINCS, Portugal NOVA School of Science and Technology and NOVA-LINCS, PortugalView Profile , Frank Pfenning Carnegie Mellon University, USA Carnegie Mellon University, USAView Profile Authors Info & Claims PPDP 2021: 23rd International Symposium on Principles and Practice of Declarative ProgrammingSeptember 2021 Article No.: 3Pages 1–3https://doi.org/10.1145/3479394.3479398Online:07 October 2021Publication History 0citation24DownloadsMetricsTotal Citations0Total Downloads24Last 12 Months24Last 6 weeks8 Get Citation AlertsNew Citation Alert added!This alert has been successfully added and will be sent to:You will be notified whenever a record that you have chosen has been cited.To manage your alert preferences, click on the button below.Manage my AlertsNew Citation Alert!Please log in to your account Save to BinderSave to BinderCreate a New BinderNameCancelCreateExport CitationPublisher SiteGet Access
Bernardo Toninho, Luís Caires, Frank Pfenning
PPDP1
2021 On Polymorphic Sessions and Functions: A Tale of Two (Fully Abstract) Encodings
abstract
This work exploits the logical foundation of session types to determine what kind of type discipline for the Λ-calculus can exactly capture, and is captured by, Λ-calculus behaviours. Leveraging the proof theoretic content of the soundness and completeness of sequent calculus and natural deduction presentations of linear logic, we develop the first mutually inverse and fully abstract processes-as-functions and functions-as-processes encodings between a polymorphic session π-calculus and a linear formulation of System F. We are then able to derive results of the session calculus from the theory of the Λ-calculus: (1) we obtain a characterisation of inductive and coinductive session types via their algebraic representations in System F; and (2) we extend our results to account for value and process passing, entailing strong normalisation.
Bernardo Toninho, Nobuko Yoshida
ACM Trans. Program. Lang. Syst.1
2020 Featherweight go
abstract
We describe a design for generics in Go inspired by previous work on Featherweight Java by Igarashi, Pierce, and Wadler. Whereas subtyping in Java is nominal, in Go it is structural, and whereas generics in Java are defined via erasure, in Go we use monomorphisation. Although monomorphisation is widely used, we are one of the first to formalise it. Our design also supports a solution to The Expression Problem.
Robert Griesemer, Raymond Hu, Wen Kokke, Julien Lange, Ian Lance Taylor, Bernardo Toninho, Philip Wadler, Nobuko Yoshida
Proc. ACM Program. Lang.6
2019 Domain-Aware Session Types
abstract
We develop a generalization of existing Curry-Howard interpretations of (binary) session types by relying on an extension of linear logic with features from hybrid logic, in particular modal worlds that indicate domains. These worlds govern domain migration, subject to a parametric accessibility relation familiar from the Kripke semantics of modal logic. The result is an expressive new typed process framework for domain-aware, message-passing concurrency. Its logical foundations ensure that well-typed processes enjoy session fidelity, global progress, and termination. Typing also ensures that processes only communicate with accessible domains and so respect the accessibility relation. Remarkably, our domain-aware framework can specify scenarios in which domain information is available only at runtime; flexible accessibility relations can be cleanly defined and statically enforced. As a specific application, we introduce domain-aware multiparty session types, in which global protocols can express arbitrarily nested sub-protocols via domain migration. We develop a precise analysis of these multiparty protocols by reduction to our binary domain-aware framework: complex domain-aware protocols can be reasoned about at the right level of abstraction, ensuring also the principled transfer of key correctness properties from the binary to the multiparty setting.
Luís Caires, Jorge A. Pérez 0001, Frank Pfenning, Bernardo Toninho
CONCUR4
2019 Manifest Deadlock-Freedom for Shared Session Types
abstract
Shared session types generalize the Curry-Howard correspondence between intuitionistic linear logic and the session-typed $$\pi $$ -calculus with adjoint modalities that mediate between linear and shared session types, giving rise to a programming model where shared channels must be used according to a locking discipline of acquire-release. While this generalization greatly increases the range of programs that can be written, the gain in expressiveness comes at the cost of deadlock-freedom, a property which holds for many linear session type systems. In this paper, we develop a type system for logically-shared sessions in which types capture not only the interactive behavior of processes but also constrain the order of resources (i.e., shared processes) they may acquire. This type-level information is then used to rule out cyclic dependencies among acquires and synchronization points, resulting in a system that ensures deadlock-free communication for well-typed processes in the presence of shared sessions, higher-order channel passing, and recursive processes. We illustrate our approach on a series of examples, showing that it rules out deadlocks in circular networks of both shared and linear recursive processes, while still being permissive enough to type concurrent implementations of shared imperative data structures as processes.
Stephanie Balzer, Bernardo Toninho, Frank Pfenning
ESOP2
2019 Refinement kinds: type-safe programming with practical type-level computation
abstract
This work introduces the novel concept of kind refinement , which we develop in the context of an explicitly polymorphic ML-like language with type-level computation. Just as type refinements embed rich specifications by means of comprehension principles expressed by predicates over values in the type domain, kind refinements provide rich kind specifications by means of predicates over types in the kind domain. By leveraging our powerful refinement kind discipline, types in our language are not just used to statically classify program expressions and values, but also conveniently manipulated as tree-like data structures, with their kinds refined by logical constraints on such structures. Remarkably, the resulting typing and kinding disciplines allow for powerful forms of type reflection, ad-hoc polymorphism and type-directed meta-programming, which are often found in modern software development, but not typically expressible in a type-safe manner in general purpose languages. We validate our approach both formally and pragmatically by establishing the standard meta-theoretical results of type safety and via a prototype implementation of a kind checker, type checker and interpreter for our language.
Luís Caires, Bernardo Toninho
Proc. ACM Program. Lang.2
2018 A Universal Session Type for Untyped Asynchronous Communication
abstract
In the simply-typed lambda-calculus we can recover the full range of expressiveness of the untyped lambda-calculus solely by adding a single recursive type U = U -> U. In contrast, in the session-typed pi-calculus, recursion alone is insufficient to recover the untyped pi-calculus, primarily due to linearity: each channel just has two unique endpoints. In this paper, we show that shared channels with a corresponding sharing semantics (based on the language SILL_S developed in prior work) are enough to embed the untyped asynchronous pi-calculus via a universal shared session type U_S. We show that our encoding of the asynchronous pi-calculus satisfies operational correspondence and preserves observable actions (i.e., processes are weakly bisimilar to their encoding). Moreover, we clarify the expressiveness of SILL_S by developing an operationally correct encoding of SILL_S in the asynchronous pi-calculus.
Stephanie Balzer, Frank Pfenning, Bernardo Toninho
CONCUR3
2018 On Polymorphic Sessions and Functions - A Tale of Two (Fully Abstract) Encodings
abstract
This work exploits the logical foundation of session types to determine what kind of type discipline for the $$\pi $$ -calculus can exactly capture, and is captured by, $$\lambda $$ -calculus behaviours. Leveraging the proof theoretic content of the soundness and completeness of sequent calculus and natural deduction presentations of linear logic, we develop the first mutually inverse and fully abstract processes-as-functions and functions-as-processes encodings between a polymorphic session $$\pi $$ -calculus and a linear formulation of System F. We are then able to derive results of the session calculus from the theory of the $$\lambda $$ -calculus: (1) we obtain a characterisation of inductive and coinductive session types via their algebraic representations in System F; and (2) we extend our results to account for value and process passing, entailing strong normalisation.
Bernardo Toninho, Nobuko Yoshida
ESOP1
2018 Depending on Session-Typed Processes
abstract
This work proposes a dependent type theory that combines functions and session-typed processes (with value dependencies) through a contextual monad, internalising typed processes in a dependently-typed $$\lambda $$ -calculus. The proposed framework, by allowing session processes to depend on functions and vice-versa, enables us to specify and statically verify protocols where the choice of the next communication action can depend on specific values of received data. Moreover, the type theoretic nature of the framework endows us with the ability to internally describe and prove predicates on process behaviours. Our main results are type soundness of the framework, and a faithful embedding of the functional layer of the calculus within the session-typed layer, showcasing the expressiveness of dependent session types.
Bernardo Toninho, Nobuko Yoshida
FoSSaCS1
2018 A static verification framework for message passing in Go using behavioural types
abstract
The Go programming language has been heavily adopted in industry as a language that efficiently combines systems programming with concurrency. Go's concurrency primitives, inspired by process calculi such as CCS and CSP, feature channel-based communication and lightweight threads, providing a distinct means of structuring concurrent software. Despite its popularity, the Go programming ecosystem offers little to no support for guaranteeing the correctness of message-passing concurrent programs.
Julien Lange, Nicholas Ng, Bernardo Toninho, Nobuko Yoshida
ICSE3
2018 Interconnectability of Session-Based Logical Processes
abstract
In multiparty session types, interconnection networks identify which roles in a session engage in communication (i.e., two roles are connected if they exchange a message). In session-based interpretations of linear logic the analogue notion corresponds to determining which processes are composed, or cut, using compatible channels typed by linear propositions. In this work, we show that well-formed interactions represented in a session-based interpretation of classical linear logic (CLL) form strictly less-expressive interconnection networks than those of a multiparty session calculus. To achieve this result, we introduce a new compositional synthesis property dubbed partial multiparty compatibility (PMC), enabling us to build a global type denoting the interactions obtained by iterated composition of well-typed CLL threads. We then show that CLL composition induces PMC global types without circular interconnections between three (or more) participants. PMC is then used to define a new CLL composition rule that can form circular interconnections but preserves the deadlock-freedom of CLL.
Bernardo Toninho, Nobuko Yoshida
ACM Trans. Program. Lang. Syst.1
2017 Fencing off go: liveness and safety for channel-based programming
abstract
Go is a production-level statically typed programming language whose design features explicit message-passing primitives and lightweight threads, enabling (and encouraging) programmers to develop concurrent systems where components interact through communication more so than by lock-based shared memory concurrency. Go can only detect global deadlocks at runtime, but provides no compile-time protection against all too common communication mismatches or partial deadlocks.
Julien Lange, Nicholas Ng, Bernardo Toninho, Nobuko Yoshida
POPL3
2016 Linear logic propositions as session types
abstract
Throughout the years, several typing disciplines for the π-calculus have been proposed. Arguably, the most widespread of these typing disciplines consists of session types. Session types describe the input/output behaviour of processes and traditionally provide strong guarantees about this behaviour (i.e. deadlock-freedom and fidelity). While these systems exploit a fundamental notion of linearity, the precise connection between linear logic and session types has not been well understood. This paper proposes a type system for the π-calculus that corresponds to a standard sequent calculus presentation of intuitionistic linear logic, interpreting linear propositions as session types and thus providing a purely logical account of all key features and properties of session types. We show the deep correspondence between linear logic and session types by exhibiting a tight operational correspondence between cut-elimination steps and process reductions. We also discuss an alternative presentation of linear session types based on classical linear logic, and compare our development with other more traditional session type systems.
Luís Caires, Frank Pfenning, Bernardo Toninho
Math. Struct. Comput. Sci.3
2014 Linear logical relations and observational equivalences for session-based concurrency
Jorge A. Pérez 0001, Luís Caires, Frank Pfenning, Bernardo Toninho
Inf. Comput.4
2013 Behavioral Polymorphism and Parametricity in Session-Based Communication
Luís Caires, Jorge A. Pérez 0001, Frank Pfenning, Bernardo Toninho
ESOP4
2013 Higher-Order Processes, Functions, and Sessions: A Monadic Integration
Bernardo Toninho, Luís Caires, Frank Pfenning
ESOP1
2012 Linear Logical Relations for Session-Based Concurrency
Jorge A. Pérez 0001, Luís Caires, Frank Pfenning, Bernardo Toninho
ESOP4
2012 Functions as Session-Typed Processes
Bernardo Toninho, Luís Caires, Frank Pfenning
FoSSaCS1
2011 Proof-Carrying Code in a Session-Typed Process Calculus
Frank Pfenning, Luís Caires, Bernardo Toninho
CPP3
2011 Dependent session types via intuitionistic linear type theory
abstract
We develop an interpretation of linear type theory as dependent session types for a term passing extension of the pi-calculus. The type system allows us to express rich constraints on sessions, such as interface contracts and proof-carrying certification, which go beyond existing session type systems, and are here justified on purely logical grounds. We can further refine our interpretation using proof irrelevance to eliminate communication overhead for proofs between trusted parties. Our technical results include type preservation and global progress, which in our setting naturally imply compliance to all properties declared in interface contracts expressed by dependent types.
Bernardo Toninho, Luís Caires, Frank Pfenning
PPDP1