Project Details
Theoretical foundations and practical applications of Go with generics
Subject Area
Software Engineering and Programming Languages
Term
since 2025
Project identifier
Deutsche Forschungsgemeinschaft (DFG) - Project number 550537604
Expressive programming languages are important to deliver high-quality software in adequate time. An important feature of highly expressive languages are generics. This feature enables programmers to use the same code at different types and guarantees at compile time that the concrete types being used meet all requirements of the code. This project considers the addition of generics to the programming language Go. Go is widely used in industry but until recently lacked generics. The addition of generics to Go is challenging because of its interaction with existing Go features such as method overloading, interface types, and structural subtyping. All existing proposals and the latest Go 1.20 version that support generics have several limitations preventing satisfactory solutions to important software design and architecture problems. Our project goal is a refined and extended design, a complete formalization, and an implementation of a compiler for generics in Go. This new version of generics for Go will have a solid theoretical foundation; it will allow for intuitive and type-safe solutions to important software design and architecture problems that do not have satisfactory solutions in the current version of generics in Go; and it will offer performance comparable to that of Go 1.20. We will rely on established methods such as the dictionary-passing translation to resolve method overloading and make use of step-indexed logical relations to verify correctness of the translation. The technical challenge will be to adapt these methods to the Go setting where we encounter structural subtyping and interfaces with recursive dependencies.
DFG Programme
Research Grants
