In February 2022 I gave a PLInG talk about some work I have done investigating the application of quantitative type-systems to reasoning about wiring in netlists.
I am rehashing this talk for an internal seminar.
Quantitative types allow us to reason more precisely about term
usage in our programming languages. There are, however, other styles
of language in which quantitative typing is beneficial: Hardware
Description Languages (HDLs) for one. When wiring the components
together it is important to ensure that there are no unused ports or
dangling wires. Here the notion of usage is different to that found
in general purpose languages. Although many linearity checks are
detectable using static analysis tools such as Verilator, it is
really interesting to investigate how we can use /fancy types/
(specifically quantitative-type-theory & dependent types) to make
wire usage an intrinsic check within the type-system itself. With
these /fancy types/ we can provide compile-time checks that all
wires and ports have been used.
As part of my PhD I was interested in: Types as (Abstract) Interpreters.
This approach embeds an interpretation of your model directly in the type of your terms.
A previous post details it.
As port of my current work I have been investigating the construction of Hardware Description Languages (HDLs) and reasoning about their structure using denotational semantics.
Currently my soundness checks are extrinsic to the intrinsically typed term language I have developed.
It only recently occured to me that we can make these soundness checks intrinsic using the Types as (Abstract) Interpreters approach.
This is not the first time that I have given a talk at Kent.
Years a go I spoke at a CryptoForma workshop hosted there.
The topic was on linking dependent types, session types, and protocol implementation validation.
A topic that I should revisit once my restraints are released, and I am unshackled!
Idris’ Effects library demonstrates how to embed resource
dependent algebraic effect handlers into a dependently typed host
language, providing run-time and compile-time based reasoning on
type-level resources. Building upon this work, RESOURCES is a
framework for realising Embedded Domain Specific Languages (EDSLs)
with type systems that contain domain specific substructural
properties. Differing from Effects, RESOURCES allows a
language’s substructural properties to be encoded within type-level
resources that are associated with language variables. Such an
association allows for multiple effect instances to be reasoned
about autonomically and without explicit type-level declaration.
Type-level predicates are used as proof that the language’s
substructural properties hold. Several exemplar EDSLs are presented
that illustrates our framework’s operation and how dependent types
provide correctness-by-construction guarantees that substructural
properties of written programs hold.
Today, I gave an extended talk about Resource Dependent EDSLs in a Dependently Typed
Language at the MSP101 Seminar Series of the MSP Group at the University of Strathclyde.
This was joint work with Wim Vanderbauwhede, and Edwin Brady.
While many people use dependent types for theorem proving some of us like to use dependent types for building, and running, safer programs.
Idris’ Effects library demonstrates how to embed resource dependent algebraic effect handlers into a dependently typed host language, providing run-time and compile-time based reasoning on type-level resources. Building upon this work, Resources is a framework for realising EDSLs with type systems that contain domain specific substructural properties. Differing from Effects, Resources allows a language’s substructural properties to be encoded within type-level resources that are associated with language variables. Such an association allows for multiple effect instances to be reasoned about autonomically and without explicit type-level declaration. We use type-level predicates as proof that a language’s substructural properties hold.
I am very pleased to announce that my paper describing a framework
for constructing Resource Dependent EDSLs in a Dependently Typed
Language was accepted to ECOOP
2020.
Many of you may have seen this from the conference website itself, and I was waiting until the camera ready copy was produced to properly publicly announce.
This was joint
work with Wim Vanderbauwhede, and Edwin Brady.
Idris’ Effects library demonstrates how to embed resource
dependent algebraic effect handlers into a dependently typed host
language, providing run-time and compile-time based reasoning on
type-level resources. Building upon this work, RESOURCES is a
framework for realising Embedded Domain Specific Languages (EDSLs)
with type systems that contain domain specific substructural
properties. Differing from Effects, RESOURCES allows a
language’s substructural properties to be encoded within type-level
resources that are associated with language variables. Such an
association allows for multiple effect instances to be reasoned
about autonomically and without explicit type-level declaration.
Type-level predicates are used as proof that the language’s
substructural properties hold. Several exemplar EDSLs are presented
that illustrates our framework’s operation and how dependent types
provide correctness-by-construction guarantees that substructural
properties of written programs hold.
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.