Back to Search Start Over

Gradual Refinement: Blending Pattern Matching with Data Abstraction

Authors :
Meng Wang
Jeremy Gibbons
Kazutaka Matsuda
Zhenjiang Hu
Jules Desharnais
Desharnais, J
Source :
Lecture Notes in Computer Science ISBN: 9783642133206
Publication Year :
2016

Abstract

Pattern matching is advantageous for understanding and reasoning about function definitions, but it tends to tightly couple the interface and implementation of a datatype. Significant effort has been invested in tackling this loss of modularity; however, decoupling patterns from concrete representations while maintaining soundness of reasoning has been a challenge. Inspired by the development of invertible programming, we propose an approach to abstract datatypes based on a rightinvertible language rinv-every function has a right (or pre-) inverse.We show how this new design is able to permit a smooth incremental transition from programs with algebraic datatypes and pattern matching, to ones with proper encapsulation (implemented as abstract datatypes), while maintaining simple and sound reasoning. © 2010 Springer-Verlag Berlin Heidelberg.

Details

ISBN :
978-3-642-13320-6
ISBNs :
9783642133206
Database :
OpenAIRE
Journal :
Lecture Notes in Computer Science ISBN: 9783642133206
Accession number :
edsair.doi.dedup.....e60fb2ad3a1c34c6ef3c035cb7f3239c