首页> 外文学位 >Linear/Non-linear Types for Embedded Domain-specific Languages
【24h】

Linear/Non-linear Types for Embedded Domain-specific Languages

机译:嵌入式领域特定语言的线性/非线性类型

获取原文
获取原文并翻译 | 示例

摘要

Domain-specific languages are often embedded inside of general-purpose host languages so that the embedded language can take advantage of host-language data structures, libraries, and tools. However, when the domain-specific language uses linear types, existing techniques for embedded languages fall short. Linear type systems, which have applications in a wide variety of programming domains including mutable state, I/O, concurrency, and quantum computing, can manipulate embedded non-linear data via the linear type !alpha. However, prior work has not been able to produce linear embedded languages that have full and easy access to host-language data, libraries, and tools.;This dissertation proposes a new perspective on linear, embedded, domain-specific languages derived from the linear/non-linear (LNL) interpretation of linear logic. The LNL model consists of two distinct fragments---one with linear types and another with non-linear types---and provides a simple categorical interface between the two. This dissertation identifies the linear fragment with the linear embedded language and the non-linear fragment with the general-purpose host language.;The effectiveness of this framework is illustrated via a number of examples, implemented in a variety of host languages. In Haskell, linear domain-specific languages using mutable state and concurrency can take advantage of the monad that arises from the LNL model. In Coq, the QWIRE quantum circuit language uses linearity to enforce the no-cloning axiom of quantum mechanics. In homotopy type theory, quantum transformations can be encoded as higher inductive types to simplify the presentation of a quantum equational theory. These examples serve as case studies that prove linear/non-linear type theory is a natural and expressive interface in which to embed linear domain-specific languages.
机译:特定于域的语言通常嵌入在通用宿主语言中,以便嵌入式语言可以利用宿主语言的数据结构,库和工具。但是,当特定于领域的语言使用线性类型时,嵌入式语言的现有技术不足。线性类型系统在可变状态,I / O,并发性和量子计算等广泛的编程领域中都有应用,可以通过线性类型α操纵嵌入式非线性数据。但是,先前的工作无法产生能够轻松访问主机语言数据,库和工具的线性嵌入式语言。本论文提出了从线性派生的线性,嵌入式,领域特定语言的新观点。 /非线性(LNL)解释线性逻辑。 LNL模型由两个不同的片段组成-一个具有线性类型,另一个具有非线性类型-并在两者之间提供了简单的分类接口。本文通过线性嵌入语言识别了线性片段,并用通用宿主语言识别了非线性片段。该框架的有效性通过许多示例说明,并以多种宿主语言实现。在Haskell中,使用可变状态和并发性的线性域特定语言可以利用LNL模型产生的monad。在Coq中,QWIRE量子电路语言使用线性来强制执行量子力学的无克隆公理。在同伦类型理论中,可以将量子变换编码为更高的归纳类型,以简化量子方程理论的表示。这些示例用作案例研究,证明线性/非线性类型理论是嵌入线性域特定语言的自然而富有表现力的接口。

著录项

  • 作者

    Paykin, Jennifer.;

  • 作者单位

    University of Pennsylvania.;

  • 授予单位 University of Pennsylvania.;
  • 学科 Computer science.
  • 学位 Ph.D.
  • 年度 2018
  • 页码 208 p.
  • 总页数 208
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号