- Integration of CiNii Books functions for fiscal year 2025 has completed
- Trial version of CiNii Research Knowledge Graph Search feature is available on CiNii Labs
- 【Updated on November 26, 2025】Regarding the recording of “Research Data” and “Evidence Data”
- Start the collection of all publicly IRDB content
- Incorporate Research Data from KAKEN
Refactoring pattern matching
Bibliographic Information
- Published
- 2013-11
- Resource Type
- journal article
- Rights Information
-
- 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
- Publisher
- Elsevier BV
Search this article
Description
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.
Journal
-
- Science of Computer Programming
-
Science of Computer Programming 78 (11), 2216-2242, 2013-11
Elsevier BV
- Tweet
Keywords
Details 詳細情報について
-
- CRID
- 1360848657423144192
-
- ISSN
- 01676423
-
- Article Type
- journal article
-
- Data Source
-
- Crossref
- KAKEN
- OpenAIRE

