Characterizations of Partial Well-Behaved Lenses
Foster et al. proposed a linguistic approach to the bidirectional transformation, with lens. A lens is a pair of two functions, one is a forward transformation called get which produces a target view from an original source, and the other is a backward transformation called put which updates the original source to a new one with an updated view. The get and put functions depend on each other to be consistent. A lens is called well-behaved if it satisfies two lens laws, GetPut and PutGet. Every put function uniquely determines a get function if it exists, as far as the get and put functions form a well-behaved lens. Fischer et al. found the conditions of a put function under which the corresponding get function exists, where both get and put functions are supposed to be total. In this paper, we consider the case where get and put functions are possibly partial. We show that almost the same conditions as the ones given by Fischer et al. work well when only a put function is possibly partial, while they do not work when a get function is also possibly partial. In order to have similar results, we propose a new lens law for the case where both get and put functions are possibly partial.
Authors
- Kazuyuki Asada (ORCID: https://orcid.org/0000-0001-8782-2119)
- Keisuke Nakano (ORCID: https://orcid.org/0000-0003-1955-4225)
- Kentaro Kikuchi
- Keishi Hashiba (ORCID: https://orcid.org/0009-0004-3923-3001)
Institutions
- Tohoku University (JP)
- The University of Osaka (JP)
Publication Details
- Published
- 2025-01-10
- DOI
- https://doi.org/10.1145/3704253.3706139
- Primary Topic
- Logic, programming, and type systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Japan Society for the Promotion of Science