Refactoring pattern matching

書誌事項

公開日
2013-11
資源種別
journal article
権利情報
  • https://www.elsevier.com/tdm/userlicense/1.0/
  • https://www.elsevier.com/open-access/userlicense/1.0/
DOI
  • 10.1016/j.scico.2012.07.014
公開者
Elsevier BV

この論文をさがす

説明

Defining functions by pattern matching over the arguments is advantageous for understanding and reasoning, but it tends to expose the 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 program refactoring based on a right-invertible 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, while maintaining simple and sound reasoning.

収録刊行物

被引用文献 (7)*注記

もっと見る

参考文献 (56)*注記

もっと見る

関連プロジェクト

もっと見る

問題の指摘

ページトップへ