Translucent Abstraction: Safe Views through Invertible Programming

Meng Wang,Jeremy Gibbons,Kazutaka Matsuda,Zhenjiang Hu
2009-01-01
Abstract:Despite the distinctive advantages of pattern matching in program understanding and reasoning, the tight coupling of interface and implementation has hampered its wider acceptance. Since the first proposal of views two decades ago, significant effort has been invested in tackling this non-modularity; the obvious target has been to decouple datatype implementations from separate inter- faces used for pattern matching. However, having this decoupling to coexist with soundness of reasoning has been a challenge. In- spired by the development of invertible (bidirectional) program- ming, we propose a design of views based on a right-invertible language. The language is sufficiently expressive to program many of the existing and some novel view applications, with simple and sound reasoning properties: views can be manipulated as if they were datatypes and equivalent programs with respect to reasoning are guaranteed to exhibit identical operational behaviours.
What problem does this paper attempt to address?