No Cover Image

Conference Paper/Proceeding/Abstract 1129 views

Copatterns: programming infinite structures by observations

Andreas Abel, Brigitte Pientka, David Thibodeau, Anton Setzer Orcid Logo

Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, Volume: 48, Issue: 1, Pages: 27 - 38

Swansea University Author: Anton Setzer Orcid Logo

Full text not available from this repository: check for access using links below.

Abstract

This article which will appear in the proceedings of POPL 2013 in January 2013, introduces the dual of pattern matching, as it is used in functional programming for defining functions, by copatterns. Whereas data types are eliminated by pattern matching, i.e. by giving giving a choice for each const...

Full description

Published in: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
ISSN: 0362-1340
Published: ACM, New York, NY, USA 2013
Online Access: Check full text

URI: https://cronfa.swan.ac.uk/Record/cronfa13696
Tags: Add Tag
No Tags, Be the first to tag this record!
Abstract: This article which will appear in the proceedings of POPL 2013 in January 2013, introduces the dual of pattern matching, as it is used in functional programming for defining functions, by copatterns. Whereas data types are eliminated by pattern matching, i.e. by giving giving a choice for each constructor, coalgebras are introduced by copatterns, namely by giving the result of each eliminator. Patterns and copatterns are entirely symmetrical. This article introduces a language which allows to define data types, coalgebras, and functions by nested pattern and copattern matching. An operational semantics is introduced, and type soundness and subject reduction is shown.
Keywords: Coinduction, functional programming, introduction vs elimination, message passing, pattern matching
College: Faculty of Science and Engineering
Issue: 1
Start Page: 27
End Page: 38