首页 > 最新文献

Proceedings of the 2023 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation最新文献

英文 中文
Towards a Reflection for Effect Handlers 面向效果处理程序的反射
Youyou Cong, K. Asai
A reflection is a relationship between compiling and decompiling functions. This concept has been studied as a means to ensure correctness of compilers, in particular, those for languages featuring control effects. We aim to develop a reflection for algebraic effects and handlers. As a first step towards this goal, we investigate what we obtain by following the existing recipe for control operators. We show that, if we use the simplest CPS translation as the compiling function, we can prove most but not all theorems required of a reflection. From this result, we identify two conditions of the CPS translation that would lead to a reflection for effect handlers.
反射是编译函数和反编译函数之间的关系。这个概念已经被研究作为一种手段,以确保编译器的正确性,特别是那些具有控制效果的语言。我们的目标是为代数效应和处理程序开发一个反射。作为实现这一目标的第一步,我们研究通过遵循现有的控制操作符配方可以得到什么。我们证明,如果我们使用最简单的CPS翻译作为编译函数,我们可以证明反射所需的大部分定理,但不是所有定理。根据这个结果,我们确定了CPS转换的两个条件,这两个条件将导致对效果处理程序的反射。
{"title":"Towards a Reflection for Effect Handlers","authors":"Youyou Cong, K. Asai","doi":"10.1145/3571786.3573015","DOIUrl":"https://doi.org/10.1145/3571786.3573015","url":null,"abstract":"A reflection is a relationship between compiling and decompiling functions. This concept has been studied as a means to ensure correctness of compilers, in particular, those for languages featuring control effects. We aim to develop a reflection for algebraic effects and handlers. As a first step towards this goal, we investigate what we obtain by following the existing recipe for control operators. We show that, if we use the simplest CPS translation as the compiling function, we can prove most but not all theorems required of a reflection. From this result, we identify two conditions of the CPS translation that would lead to a reflection for effect handlers.","PeriodicalId":318756,"journal":{"name":"Proceedings of the 2023 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation","volume":"50 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-01-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131500700","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Efficient Embedding of Strategic Attribute Grammars via Memoization 基于记忆的策略属性语法高效嵌入
José Nuno Macedo, Emanuel Rodrigues, Marcos Viera, João Saraiva
Strategic term re-writing and attribute grammars are two powerful programming techniques widely used in language engineering. The former relies on strategies to apply term re-write rules in defining large-scale language transformations, while the latter is suitable to express context-dependent language processing algorithms. These two techniques can be expressed and combined via a powerful navigation abstraction: generic zippers. This results in a concise zipper-based embedding offering the expressiveness of both techniques. Such elegant embedding has a severe limitation since it recomputes attribute values. This paper presents a proper and efficient embedding of both techniques. First, attribute values are memoized in the zipper data structure, thus avoiding their re-computation. Moreover, strategic zipper based functions are adapted to access such memoized values. We have implemented our memoized embedding as the Ztrategic library and we benchmarked it against the state-of-the-art Strafunski and Kiama libraries. Our first results show that we are competitive against those two well established libraries.
策略术语重写和属性语法是在语言工程中广泛应用的两种强大的编程技术。前者依赖于在定义大规模语言转换时应用术语重写规则的策略,而后者适合于表达上下文相关的语言处理算法。这两种技术可以通过一个强大的导航抽象来表达和组合:通用拉链。这导致了一个简洁的基于拉链的嵌入,提供了这两种技术的表达性。这种优雅的嵌入有严重的局限性,因为它需要重新计算属性值。本文提出了两种技术的有效嵌入方法。首先,属性值被记在zippers数据结构中,从而避免了它们的重新计算。此外,基于策略拉链的函数被用于访问这些记忆值。我们已经将我们的记忆嵌入实现为zstrategic库,并将其与最先进的Strafunski和Kiama库进行了基准测试。我们的第一个结果表明,我们与这两个成熟的库相比是有竞争力的。
{"title":"Efficient Embedding of Strategic Attribute Grammars via Memoization","authors":"José Nuno Macedo, Emanuel Rodrigues, Marcos Viera, João Saraiva","doi":"10.1145/3571786.3573019","DOIUrl":"https://doi.org/10.1145/3571786.3573019","url":null,"abstract":"Strategic term re-writing and attribute grammars are two powerful programming techniques widely used in language engineering. The former relies on strategies to apply term re-write rules in defining large-scale language transformations, while the latter is suitable to express context-dependent language processing algorithms. These two techniques can be expressed and combined via a powerful navigation abstraction: generic zippers. This results in a concise zipper-based embedding offering the expressiveness of both techniques. Such elegant embedding has a severe limitation since it recomputes attribute values. This paper presents a proper and efficient embedding of both techniques. First, attribute values are memoized in the zipper data structure, thus avoiding their re-computation. Moreover, strategic zipper based functions are adapted to access such memoized values. We have implemented our memoized embedding as the Ztrategic library and we benchmarked it against the state-of-the-art Strafunski and Kiama libraries. Our first results show that we are competitive against those two well established libraries.","PeriodicalId":318756,"journal":{"name":"Proceedings of the 2023 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation","volume":"62 22","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-01-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"113977258","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Symbolic Execution of Hadamard-Toffoli Quantum Circuits Hadamard-Toffoli量子电路的符号执行
J. Carette, G. Ortiz, A. Sabry
The simulation of quantum programs by classical computers is a critical endeavor for several reasons: it provides proof-of-concept validation of quantum algorithms; it provides opportunities to experiment with new programming abstractions suitable for the quantum domain; and most significantly it is a way to explore the elusive boundary at which a quantum advantage may materialize. Here, we show that traditional techniques of symbolic evaluation and partial evaluation yield surprisingly efficient classical simulations for some instances of textbook quantum algorithms that include the Deutsch, Deutsch-Jozsa, Bernstein-Vazirani, Simon, Grover, and Shor's algorithms. The success of traditional partial evaluation techniques in this domain is due to one simple insight: the quantum bits used in these algorithms can be modeled by a symbolic boolean variable while still keeping track of the correlations due to superposition and entanglement. More precisely, the system of constraints generated over the symbolic variables contains all the necessary quantum correlations and hence the answer to the quantum algorithms. With a few programming tricks explained in the paper, quantum circuits with millions of gates can be symbolically executed in seconds. Paradoxically, other circuits with as few as a dozen gates take exponential time. We reflect on the significance of these results in the conclusion.
经典计算机对量子程序的模拟是一项关键的努力,原因如下:它提供了量子算法的概念验证;它为实验适合量子领域的新编程抽象提供了机会;最重要的是,它是探索量子优势可能实现的难以捉摸的边界的一种方式。在这里,我们展示了符号评估和部分评估的传统技术对教科书量子算法的一些实例产生了惊人的高效经典模拟,包括Deutsch, Deutsch- jozsa, Bernstein-Vazirani, Simon, Grover和Shor的算法。传统的部分评估技术在这个领域的成功是由于一个简单的见解:这些算法中使用的量子比特可以由一个符号布尔变量来建模,同时仍然保持由于叠加和纠缠而产生的相关性。更准确地说,在符号变量上生成的约束系统包含所有必要的量子相关性,因此是量子算法的答案。通过在论文中解释的一些编程技巧,具有数百万门的量子电路可以在几秒钟内象征性地执行。矛盾的是,其他只有十几个门的电路需要指数级的时间。我们在结论部分反思了这些结果的意义。
{"title":"Symbolic Execution of Hadamard-Toffoli Quantum Circuits","authors":"J. Carette, G. Ortiz, A. Sabry","doi":"10.1145/3571786.3573018","DOIUrl":"https://doi.org/10.1145/3571786.3573018","url":null,"abstract":"The simulation of quantum programs by classical computers is a critical endeavor for several reasons: it provides proof-of-concept validation of quantum algorithms; it provides opportunities to experiment with new programming abstractions suitable for the quantum domain; and most significantly it is a way to explore the elusive boundary at which a quantum advantage may materialize. Here, we show that traditional techniques of symbolic evaluation and partial evaluation yield surprisingly efficient classical simulations for some instances of textbook quantum algorithms that include the Deutsch, Deutsch-Jozsa, Bernstein-Vazirani, Simon, Grover, and Shor's algorithms. The success of traditional partial evaluation techniques in this domain is due to one simple insight: the quantum bits used in these algorithms can be modeled by a symbolic boolean variable while still keeping track of the correlations due to superposition and entanglement. More precisely, the system of constraints generated over the symbolic variables contains all the necessary quantum correlations and hence the answer to the quantum algorithms. With a few programming tricks explained in the paper, quantum circuits with millions of gates can be symbolically executed in seconds. Paradoxically, other circuits with as few as a dozen gates take exponential time. We reflect on the significance of these results in the conclusion.","PeriodicalId":318756,"journal":{"name":"Proceedings of the 2023 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation","volume":"118 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-01-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"134101529","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 2
Semantic Transformation Framework for Rewriting Rules 改写规则的语义转换框架
Jihee Park, Jaemin Hong, Sukyoung Ryu
Semantics-preserving source-to-source program transformations, such as optimization and refactoring, are essential for software development. Such transformations are often defined by rewriting rules describing which part of a program must be replaced with which subprogram. The main obstacle to designing a transformation is to prove its semantics preservation. Rewriting-rule-based frameworks alleviate this difficulty by giving proof guidelines or automating the proofs. Unfortunately, each framework is applicable to a restricted set of transformations due to a fixed definition of semantics preservation. Cousot and Cousot’s semantic transformation framework resolves this problem by leaving a space for its users to define a proper semantics preservation property. However, the framework does not exploit the characteristic of rewriting rules and fails to ease the proofs. In this work, we define a semantic transformation framework tailored to rewriting rules by refining Cousot and Cousot’s framework. Our framework facilitates modular proofs by providing syntax-directed guidelines and theorems that simplify proofs. We show the versatility of our framework by proving the semantics preservation of six well-known transformations.
保持语义的源到源程序转换,例如优化和重构,对于软件开发是必不可少的。这种转换通常是通过重写规则来定义的,这些规则描述了程序的哪个部分必须用哪个子程序替换。设计转换的主要障碍是证明其语义保持性。重写基于规则的框架通过提供证明指南或自动化证明来缓解这一困难。不幸的是,由于语义保存的固定定义,每个框架都适用于一组有限的转换。Cousot和Cousot的语义转换框架解决了这个问题,它为用户留下了一个空间来定义适当的语义保存属性。然而,该框架没有充分利用规则可重写的特性,无法简化证明过程。在这项工作中,我们定义了一个语义转换框架,通过改进Cousot和Cousot的框架来改写规则。我们的框架通过提供语法导向的指导方针和简化证明的定理来促进模块化证明。我们通过证明六个众所周知的转换的语义保持来展示我们框架的多功能性。
{"title":"Semantic Transformation Framework for Rewriting Rules","authors":"Jihee Park, Jaemin Hong, Sukyoung Ryu","doi":"10.1145/3571786.3573016","DOIUrl":"https://doi.org/10.1145/3571786.3573016","url":null,"abstract":"Semantics-preserving source-to-source program transformations, such as optimization and refactoring, are essential for software development. Such transformations are often defined by rewriting rules describing which part of a program must be replaced with which subprogram. The main obstacle to designing a transformation is to prove its semantics preservation. Rewriting-rule-based frameworks alleviate this difficulty by giving proof guidelines or automating the proofs. Unfortunately, each framework is applicable to a restricted set of transformations due to a fixed definition of semantics preservation. Cousot and Cousot’s semantic transformation framework resolves this problem by leaving a space for its users to define a proper semantics preservation property. However, the framework does not exploit the characteristic of rewriting rules and fails to ease the proofs. In this work, we define a semantic transformation framework tailored to rewriting rules by refining Cousot and Cousot’s framework. Our framework facilitates modular proofs by providing syntax-directed guidelines and theorems that simplify proofs. We show the versatility of our framework by proving the semantics preservation of six well-known transformations.","PeriodicalId":318756,"journal":{"name":"Proceedings of the 2023 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation","volume":"12 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-01-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125807802","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Generating Programs for Polynomial Multiplication with Correctness Assurance 具有正确性保证的多项式乘法生成程序
Ryohei Tokuda, Yukiyoshi Kameyama
Program-generation techniques prevail in domains that need high performance, such as linear algebra, image processing, and database. Yet, it is hard to generate high-performance programs with correctness assurance, and cryptography needs both. Masuda and Kameyama proposed a DSL-based framework for implementing a program generator, an analyzer, and a formula generator, and obtained an efficient and correct implementation of Number-Theoretic Transform (NTT) that is necessary for many cryptographic algorithms. This paper advances their study in two ways. First, we develop a generation-and-analysis framework so that program generation is driven by program analysis. As a concrete result, we have found an optimization missed in previous studies. Second, we investigate whether the framework can be applied to other algorithms, including inverse NTT. By combining generated programs, we have obtained an efficient and correct implementation of polynomial multiplication, the key for several post-quantum cryptographic algorithms.
程序生成技术主要应用于需要高性能的领域,如线性代数、图像处理和数据库。然而,很难生成具有正确性保证的高性能程序,而密码学需要这两者。Masuda和Kameyama提出了一个基于dsl的框架来实现程序生成器、分析器和公式生成器,并获得了许多加密算法所必需的数字理论变换(NTT)的有效和正确的实现。本文从两个方面推进了他们的研究。首先,我们开发一个生成和分析框架,这样程序生成就由程序分析驱动。作为具体的结果,我们发现了一个在以往的研究中遗漏的优化。其次,我们研究了该框架是否可以应用于其他算法,包括逆NTT。通过结合生成的程序,我们获得了多项式乘法的有效和正确的实现,这是几个后量子密码算法的关键。
{"title":"Generating Programs for Polynomial Multiplication with Correctness Assurance","authors":"Ryohei Tokuda, Yukiyoshi Kameyama","doi":"10.1145/3571786.3573017","DOIUrl":"https://doi.org/10.1145/3571786.3573017","url":null,"abstract":"Program-generation techniques prevail in domains that need high performance, such as linear algebra, image processing, and database. Yet, it is hard to generate high-performance programs with correctness assurance, and cryptography needs both. Masuda and Kameyama proposed a DSL-based framework for implementing a program generator, an analyzer, and a formula generator, and obtained an efficient and correct implementation of Number-Theoretic Transform (NTT) that is necessary for many cryptographic algorithms. This paper advances their study in two ways. First, we develop a generation-and-analysis framework so that program generation is driven by program analysis. As a concrete result, we have found an optimization missed in previous studies. Second, we investigate whether the framework can be applied to other algorithms, including inverse NTT. By combining generated programs, we have obtained an efficient and correct implementation of polynomial multiplication, the key for several post-quantum cryptographic algorithms.","PeriodicalId":318756,"journal":{"name":"Proceedings of the 2023 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation","volume":"72 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-01-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132448467","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 1
Proceedings of the 2023 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation 2023年ACM SIGPLAN部分求值和程序操纵国际研讨会论文集
{"title":"Proceedings of the 2023 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation","authors":"","doi":"10.1145/3571786","DOIUrl":"https://doi.org/10.1145/3571786","url":null,"abstract":"","PeriodicalId":318756,"journal":{"name":"Proceedings of the 2023 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129864858","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
期刊
Proceedings of the 2023 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation
全部 Acc. Chem. Res. ACS Applied Bio Materials ACS Appl. Electron. Mater. ACS Appl. Energy Mater. ACS Appl. Mater. Interfaces ACS Appl. Nano Mater. ACS Appl. Polym. Mater. ACS BIOMATER-SCI ENG ACS Catal. ACS Cent. Sci. ACS Chem. Biol. ACS Chemical Health & Safety ACS Chem. Neurosci. ACS Comb. Sci. ACS Earth Space Chem. ACS Energy Lett. ACS Infect. Dis. ACS Macro Lett. ACS Mater. Lett. ACS Med. Chem. Lett. ACS Nano ACS Omega ACS Photonics ACS Sens. ACS Sustainable Chem. Eng. ACS Synth. Biol. Anal. Chem. BIOCHEMISTRY-US Bioconjugate Chem. BIOMACROMOLECULES Chem. Res. Toxicol. Chem. Rev. Chem. Mater. CRYST GROWTH DES ENERG FUEL Environ. Sci. Technol. Environ. Sci. Technol. Lett. Eur. J. Inorg. Chem. IND ENG CHEM RES Inorg. Chem. J. Agric. Food. Chem. J. Chem. Eng. Data J. Chem. Educ. J. Chem. Inf. Model. J. Chem. Theory Comput. J. Med. Chem. J. Nat. Prod. J PROTEOME RES J. Am. Chem. Soc. LANGMUIR MACROMOLECULES Mol. Pharmaceutics Nano Lett. Org. Lett. ORG PROCESS RES DEV ORGANOMETALLICS J. Org. Chem. J. Phys. Chem. J. Phys. Chem. A J. Phys. Chem. B J. Phys. Chem. C J. Phys. Chem. Lett. Analyst Anal. Methods Biomater. Sci. Catal. Sci. Technol. Chem. Commun. Chem. Soc. Rev. CHEM EDUC RES PRACT CRYSTENGCOMM Dalton Trans. Energy Environ. Sci. ENVIRON SCI-NANO ENVIRON SCI-PROC IMP ENVIRON SCI-WAT RES Faraday Discuss. Food Funct. Green Chem. Inorg. Chem. Front. Integr. Biol. J. Anal. At. Spectrom. J. Mater. Chem. A J. Mater. Chem. B J. Mater. Chem. C Lab Chip Mater. Chem. Front. Mater. Horiz. MEDCHEMCOMM Metallomics Mol. Biosyst. Mol. Syst. Des. Eng. Nanoscale Nanoscale Horiz. Nat. Prod. Rep. New J. Chem. Org. Biomol. Chem. Org. Chem. Front. PHOTOCH PHOTOBIO SCI PCCP Polym. Chem.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1