首页> 外文会议>Proceedings of the 2009 ACM SIGPLAN workshop on Partial evaluation and program manipulation >A flexible framework for programming with non-deterministicfunctions
【24h】

A flexible framework for programming with non-deterministicfunctions

机译:具有不确定功能的灵活编程框架

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

摘要

The possibility of non-deterministic reductions is a distinctive feature of some declarative languages. Two semantics commonly adopted for non-determinism are call-time choice-- a notion that at the operational level is related to the sharing mechanism of lazy evaluation in functional languages-- and run-time choice, which corresponds closely to ordinary term rewriting. But there are practical situations where neither semantics is appropriate, if used in isolation. In this paper we propose to annotate functions in a program with the semantics most adequate to its intended use. Annotated programs are then mapped into a unified core language (but still high level), designed to achieve a careful but neat combination of ordinary rewriting --to cope with run-time choice-- with local bindings via a let-construct devised to express call-time choice. The result is a flexible framework into which existing languages using pure run-time or call-time choice can be embedded, either directly --in the case of run-time choice-- or by means of a simple program transformation introducing lets in function definitions --for the case of call-time choice--. We prove the adequacy of the embedding, as well as other relevant properties of the framework.
机译:非确定性归约的可能性是某些声明性语言的显着特征。非确定性通常采用的两种语义是调用时选择(运行时与功能语言中的惰性求值共享机制有关的概念)和运行时选择,后者与普通术语重写非常相似。但是在实际情况下,如果单独使用,两种语义都不适合。在本文中,我们建议使用最适合其预期用途的语义来注释程序中的功能。然后将带注释的程序映射到统一的核心语言(但仍是高级语言),旨在通过设计用来表达的let结构来实现普通重写(应对运行时选择)与本地绑定的谨慎而巧妙的结合通话时间选择。结果是一个灵活的框架,可以将使用纯运行时或调用时选择的现有语言直接嵌入其中(在运行时选择的情况下),也可以通过简单的程序转换将其引入函数中定义-对于通话时间选择-我们证明了嵌入的适当性以及框架的其他相关属性。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号