Tdvcs

Wiring Circuits is as easy as 0-1-Omega, or is it...

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.

Types as Interpreters for HDLs to Graphs.

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.

A Framework for Resource Dependent EDSLs in a Dependently Typed Language

My ECOOP2020 video & paper detailing how one can create Resource-Dependent EDSLs in Idris are out!

They can be found online on the conference website. Apologies in advance for the quiet audio!

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.

Building Resource-Dependent EDSLs in a Dependently-Typed Language

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.

A Framework for Resource Dependent EDSLs in a Dependently Typed Language

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.

Value-Dependent Session Design in a Dependently-Typed Language.

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.

TyDe Denied

I submitted a paper entitled Fake it until they make it: Implementing Substructural Type-Systems for EDSLs using Dependent Types to Type-Driven Development ‘18

I have decided to uploaded the abstract here so that my attempt is a least indexable by the great machine spirit in the web—Hallowed be thy API. Given time I will also upload a copy of the paper to ArXiV.

The paper’s abstract was:

Many substructural type-systems are presented for general purpose languages, reasoning about structural rules referencing memory access, and variable usage. When looking to design Embedded Domain Specific Languages (EDSLs) we utilise the host language’s functionality to reason about, and provide, domain specific properties. If the host language does support substructural typing, the substructural rules are specific to the general purpose host language. We build upon existing work that utilises parameterised monads and dependent types when implementing substructural type-systems for EDSLs where the host language does not support omain specific, nor customisation of, substructural type-systems. We extend this work to use De Bruijn indices as proofs of existence that a language’s substructural properties hold. Further, we present two exemplar languages that illustrate the technique’s core principles and how dependent types provide correctness guarantees that our EDSL programs are well-typed.

Type-Driven Development of Communicating Systems using Idris

This week, I gave a talk about my work with Edwin Brady at University of St Andrews, whilst visiting Imperial College London for the Border Patrol Project. The talk was an extended version of my FP-Dag Talk, which was a revamp of my SPLS talk.

There is a disconnect between the tooling used to design, implement and reason about communication protocols and their implementations. Session Types are a typing discipline that help resolve this difference by allowing protocol specifications to be used during type-checking to ensure that implementations adhere to a given specification.

ICFP Rejection

I submitted a paper entitled Type-Driven Development of Communicating Systems to ICFP ‘17.

I have decided to uploaded the abstract here so that my attempt is a least indexable by the great machine spirit in the web—Hallowed be thy API. Given time I will also upload a copy of the paper to ArXiV.

The paper’s abstract was:

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 limited in their expressiveness in protocol design and implementation.

FP Dag 17-Type-Driven Design of Communicating Systems using Idris

Last week, I gave a talk about my work at FP Dag ‘17 https://msp-strath.github.io/spls-16/) at the annual meeting of functional programmers in the Netherlands. This year the meeting was in Nijmegen at the RU, where I did my Masters. Although I am not resident anymore in the Netherlands, I used the oppurtunity to talk about my work to an international audience, and to see old friends. The talk is a slight revamp of my SPLS talk.

1 2 Next →