In this post we will consider the interplay between dependently typed data structures and interfaces.
This post is a literate Idris file so there will be some cruft related to Idris that will remain until I get round to 1 improving Idris’ literate mode support.
module Main
First we need to hide a few things from the default…
%hide List
%default total
Consider the following interface that defines equality for a provided type:
On Tuesday 05 November 2019, I gave a talk at my alma matter on some recent results.
The abstract is:
Two important aspects in hardware design are the safe routing of
signals between modules, and ensuring that ports are correctly
connected. Well-known hardware description languages such as
SystemVerilog, provide nominal checking over these aspects. Thus,
leaving correctness checks over module orchestration to be performed
post-design-time using static analyses, testing, and during
synthesis.
On Wednesday 17 July, 2019 I will be at ECOOP 2019 presenting my work on constructing a type-system for hardware interfaces.
This was joint work with Wim Vanderbauwhede as part of the Border Patrol project.
To promote good academic practise (and inspired my Matthew Green’s blogging), I will describe the work here.
Think of this post, and my talk on Wednesday, as an extended abstract.
If you are interested then you should read the paper, it has all the gory details.
I am very pleased to announce that my paper describing a type-system for hardware interfaces was accepted to ECOOP 2019.
This was joint work with Wim Vanderbauwhede as part of the Border Patrol project.
Modern Systems-on-a-Chip (SoC) are constructed by composition of IP
(Intellectual Property) cores. There are well described interaction
protocols for communication between IP Cores. However, there is a
disconnect between the machine readable specification of these
protocols and the verification of their implementation in known
hardware description languages. Although tools can be written to
address such a separation of concerns, such tooling is often hand
written and used to check hardware designs a posteriori. We have
developed a dependent type-system and proof-of-concept modelling
language to reason about the physical structure of hardware
interfaces respective to user provided descriptions. Our type-system
provides correct-by-construction guarantees that the interfaces on
an IP Core will be well-typed if they adhere to a specified
standard.
I am very pleased to announce that my paper on designing a global session description language within Idris was accepted to PLACES 2019.
This was based on ideas that myself and Edwin Brady had as part of the TDVCS project, that were then matured in the Border Patrol project with Wim Vanderbauwhede.
Session Types offer a typing discipline that allows protocol
specifications to be used during type-checking, ensuring that
implementations adhere to a given specification. When looking to
realise global session types in a dependently typed language care
must be taken that values introduced in the description are used by
roles that know about the value.
Within dependently typed languages such as Idris types:
are first-class
can depend on values; and
can be computed.
With this last point we see that the Idris language doesn’t have special constructs to specify type synonyms: We write functions to compute the type.
Similarly, we can compute type signatures from programs.
A common example seen is the type-safe printf function in which an EDSL describes the format string and is then computed to construct a type signature.
I was chatting with someone about Interfaces/Type-classes and how in their language of choice you do not get default functions.
It reminded me of a little implementation trick I used in my thesis to hot swap model implementations in an evaluator I wrote.
I will show this trick using the dependently typed language Idris but make not that I don’t see any real reason why this cannot be achieved in a language that supports polymorphism and indexed data types.
I am giving a talk today about implementing global session types as an EDSL within Idris.
The abstract is:
Communication protocols are a cornerstone of modern system design.
However, there is a disconnect between the tooling used to design, implement and reason about these protocols and their implementations.
Session Types offer a typing discipline that helps resolve this difference by allowing protocol specifications to be used during type-checking, ensuring that implementations adhere to a given specification.
Session Type implementations are, however, limited in their expressiveness in protocol design and implementation.
I am giving a talk today about some work on reasoning about program side effects in Idris.
The abstract is:
Dependent types provide an expressive environment in which one can
specify, and reason about, the properties of our software programs.
In this talk I will introduce dependent types and examine how we can
reason about program behaviour using finite state machines and
type-level modelling.
I am giving a talk about my work on the Border
Patrol Project at the local Systems Seminar.
This talk is a repeat of my SPLS talk from earlier this year.
The protocols that describe the interactions between IP Cores on
System-on-a-Chip (SoC) architectures are well-documented, describing
not only the structural properties of the physical interfaces but
also the behaviour of the emanating signals. However, there is a
disconnect between the design of SoC architectures, their formal
description, and the verification of their implementation in known
hardware description languages.