Visible to the public Indexed Codata Types

TitleIndexed Codata Types
Publication TypeConference Paper
Year of Publication2016
AuthorsThibodeau, David, Cave, Andrew, Pientka, Brigitte
Conference NameProceedings of the 21st ACM SIGPLAN International Conference on Functional Programming
PublisherACM
Conference LocationNew York, NY, USA
ISBN Number978-1-4503-4219-3
KeywordsCoinduction, Dependent types, Functional programming, Logical frameworks, pubcrawl170201
Abstract

Indexed data types allow us to specify and verify many interesting invariants about finite data in a general purpose programming language. In this paper we investigate the dual idea: indexed codata types, which allow us to describe data-dependencies about infinite data structures. Unlike finite data which is defined by constructors, we define infinite data by observations. Dual to pattern matching on indexed data which may refine the type indices, we define copattern matching on indexed codata where type indices guard observations we can make. Our key technical contributions are three-fold: first, we extend Levy's call-by-push value language with support for indexed (co)data and deep (co)pattern matching; second, we provide a clean foundation for dependent (co)pattern matching using equality constraints; third, we describe a small-step semantics using a continuation-based abstract machine, define coverage for indexed (co)patterns, and prove type safety. This is an important step towards building a foundation where (co)data type definitions and dependent types can coexist.

URLhttp://doi.acm.org/10.1145/2951913.2951929
DOI10.1145/2951913.2951929
Citation Keythibodeau_indexed_2016