Dimensionally correct by construction: Type systems for programs respecting dimensions.
- Conor McBride
- Fredrik Nordvall Forsberg
17:15 - Networking
18:00 - Speakers’ presentation
19:00 - Questions and discussion
19:15 - Networking
20:00 - Webinar ends
Physical dimensions such as length, mass and time can be used to ensure that equations are physically meaningful - it makes no sense to add 7 metres to 12 seconds. From a computer science perspective, there is a strong similarity between physical dimensions and types in programming languages, and indeed, Andrew Kennedy explored this connection in the 1990s. Modern type systems not only tell you off when you get things wrong, but also help you to get things right, e.g. by using types for code generation, or to guide the search for the correct program.
We show that they are also expressive enough to not only encode the physical dimensions of single scalars, but also of vectors and matrices, and to type basic linear algebra operations such as matrix multiplication and Gaussian elimination. Convincing our type checker that the pieces fit together properly required us to increase significantly the amount of algebra it is willing to do for itself, and in the process, we learned a lot.
About the speakers
Our events are for adults aged 16 years and over.
This event is brought to you by: BCS FACS SG - Formal Aspects of Computing