【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.
机译:成对的连接结构之间的镜头双向转换已被广泛研究,并开始在工业实践中找到方法。但是,其基础的某些方面仍然知之甚少。特别是,大多数以前的工作都集中在非对称透镜的特殊情况下,其中一种结构被视为主要结构,另一种结构被视为投影或视图。一些研究已经考虑了对称变体,其中每个结构都包含彼此不存在的信息,但是这些都缺乏组成的基本操作。而且,尽管已经设计了许多基于镜头的领域特定语言,但是还没有从代数的角度彻底探索镜头。我们对镜片理论有两个贡献。首先,我们基于补码提出了一种新的对称公式,这是数据库文献中的一个旧思想。这种表述概括了不对称镜片的熟悉结构,并承认了良好的构图概念。其次,我们探索对称透镜空间的代数结构。我们介绍了不对称透镜上许多已知结构的一般化,并解决了有关其特性的一些长期问题-特别是,我们证明了(对称单曲面)张量积和和的存在以及完全分类积或和的nwi-存在性在对称镜片的类别中。然后,我们展示了如何将通用代数的方法应用于构建用于结构化数据(例如列表和树)的迭代器镜头,以及如何为诸如映射,过滤和第一原理的级联操作生成镜头。最后,我们根据容器理论研究了一种更通用的构造映射组合器的技术。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号