【24h】

Symmetric Lenses

机译:对称镜头

获取原文

摘要

Lenses-bidirectional transformations between pairs of connected structures-have been extensively studied and are beginning to find their way into industrial practice. However, some aspects of their foundations remain poorly understood. In particular, most previous work has focused on the special case of asymmetric lenses, where one of the structures is taken as primary and the other is thought of as a projection, or view. A few studies have considered symmetric variants, where each structure contains information not present in the other, but these all lack the basic operation of composition. Moreover, while many domain-specific languages based on lenses have been designed, lenses have not been thoroughly explored from an algebraic perspective. We offer two contributions to the theory of lenses. First, we present a new symmetric formulation, based on complements, an old idea from the database literature. This formulation generalizes the familiar structure of asymmetric lenses, and it admits a good notion of composition. Second, we explore the algebraic structure of the space of symmetric lenses. We present generalizations of a number of known constructions on asymmetric lenses and settle some longstanding questions about their properties---in particular, we prove the existence of (symmetric monoidal) tensor products and sums and the nwi-existence of full categorical products or sums in the category of symmetric lenses. We then show how the methods of universal algebra can be applied to build iterator lenses for structured data such as lists and trees, yielding lenses for operations like mapping, filtering, and concatenation from first principles. Finally, we investigate an even more general technique for constructing mapping combinators, based on the theory of containers.
机译:在连接结构对之间的镜头 - 双向变换 - 已被广泛研究,并开始找到它们的工业实践。然而,他们的基础的某些方面仍然明白。特别地,最先前的工作集中在非对称透镜的特殊情况上,其中一个结构被用作初级,另一个结构被认为是投影或视图。一些研究考虑了对称变体,其中每个结构包含不存在的信息,但这些都缺乏组合物的基本操作。此外,虽然设计了基于镜头的许多具体的域特异性语言,但从代数的角度来看,镜头尚未彻底探索。我们为镜片理论提供两项贡献。首先,我们提出了一种新的对称制定,基于补语,从数据库文献中的一个古老的想法。该制剂概括了不对称镜片的熟悉结构,并且承认构图的良好概念。其次,我们探索了对称镜片空间的代数结构。我们在非对称镜片上呈现了许多已知结构的概括,并特别地解决了一些关于它们的性质的问题 - 特别是,我们证明了(对称的大陆)张量产品和总和和全部分类产品或总和存在的存在在对称镜片类别中。然后,我们展示了如何应用通用代数的方法来构建迭代镜头,用于构建诸如列表和树的结构化数据,从第一个原理中产生类似映射,过滤和连接等操作的镜头。最后,我们研究了基于容器理论构建映射组合器的更通用技术。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号