Behavioural Types for Heterogeneous Systems (Position Paper)

Simon Fowler,Philipp Haller,Roland Kuhn,Sam Lindley,Alceste Scalas,Vasco T. Vasconcelos
DOI: https://doi.org/10.4204/EPTCS.401.4
2024-04-08
Abstract:Behavioural types provide a promising way to achieve lightweight, language-integrated verification for communication-centric software. However, a large barrier to the adoption of behavioural types is that the current state of the art expects software to be written using the same tools and typing discipline throughout a system, and has little support for components over which a developer has no control.
Programming Languages
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is the widespread application barriers of behavior types (especially session types) in heterogeneous systems. Specifically, current behavior - type methods require that the software of the entire system must be written using the same tools and type rules, and there is insufficient support for components that developers cannot control. These problems impede the widespread adoption of behavior - type techniques in the industry. ### Main Problems 1. **Compatibility of Heterogeneous Systems**: Existing behavior - type methods have difficulty dealing with systems composed of components written in different languages. 2. **Cross - Language Interoperability**: A mechanism is needed to ensure that components written in different programming languages can interact safely and reliably. 3. **Combination of Static and Dynamic Verification**: Some components may only be able to be verified at runtime, while others can be statically verified. How to combine these two is a challenge. 4. **Protocol Consistency and Flexibility**: How to maintain protocol consistency while allowing components to adjust their behavior as needed. ### Solution Overview To solve the above problems, the paper proposes a new methodology aimed at integrating multiple behavior - typed components that can be written in different languages. Specific measures include: - **Extensible Protocol Description Language**: Design a language - independent protocol description language that supports modular expansion (such as adding time constraints or data refinement types). - **Session Intermediate Representation (Session IR)**: Used to describe necessary dynamic checks such as data conversion and boundary monitoring. - **Session Proxies**: Serve as adapters to help communication between different programs and ensure that they follow the defined protocol. - **Session Middleware**: Assist in the establishment of sessions to ensure that all components can join and participate in communication smoothly. Through these means, the paper hopes to promote the application of behavior - type techniques in a wider range of real - world systems, especially in heterogeneous environments.