...
首页> 外文期刊>OASIcs : OpenAccess Series in Informatics >Towards Run-time Checks Simplification via Term Hiding
【24h】

Towards Run-time Checks Simplification via Term Hiding

机译:通过术语隐藏实现运行时检查简化

获取原文

摘要

One of the most attractive features of untyped languages for programmers is the flexibility in term creation and manipulation. However, with such power comes the responsibility of ensuring correctness of operations. A solution is adding run-time checks to the program via assertions, but this can introduce overheads that are in many cases impractical. While such overheads can be greatly reduced with static analysis, the gains depend strongly on the quality of the information inferred. Reusable libraries, i.e., library modules that are pre-compiled independently of the client, pose special challenges in this context. We propose a relaxed form of atom-based module system (which hides only a selected set of functor symbols but still provides a strict mechanism to prevent breaking visibility rules across modules) that can enrich significantly the shape information that can be inferred in reusable modular programs. We also propose an improved run-time checking approach that takes advantage of the proposed mechanisms to achieve large reductions in overhead, closer to those of static languages even in the reusable-library context. While the approach is general and system-independent, we present it for concreteness in the context of the Ciao assertion language and combined static/dynamic checking framework. Our method maintains full expressiveness of the checks in this context. Contrary to other approaches it does not introduce the need to switch the language to (static) type systems, which is known to change the semantics in languages like Prolog. We also study the approach experimentally and evaluate the overhead reduction achieved in the run-time checks.
机译:对于程序员而言,无类型语言最吸引人的功能之一是术语创建和操作的灵活性。但是,这种权力带来了确保操作正确性的责任。一种解决方案是通过断言将运行时检查添加到程序中,但这可能会带来在许多情况下不切实际的开销。尽管可以通过静态分析大大减少此类开销,但收益很大程度上取决于推断出的信息的质量。在这种情况下,可重用的库,即独立于客户端进行预编译的库模块,会带来特殊的挑战。我们提出了一种宽松的基于原子的模块系统形式(它仅隐藏一组选定的函子符号,但仍提供严格的机制来防止打破模块间的可见性规则),可以显着丰富可重复使用的模块化程序中推断出的形状信息。我们还提出了一种改进的运行时检查方法,该方法利用所提出的机制来实现开销的大幅减少,即使在可重用的库环境中,也更接近于静态语言的开销。虽然该方法是通用的且与系统无关,但是我们在Ciao断言语言和静态/动态检查框架组合的背景下具体介绍了该方法。在这种情况下,我们的方法可以保持支票的全部表现力。与其他方法相反,它没有引入将语言切换为(静态)类型系统的需要,众所周知,这种系统会更改Prolog等语言的语义。我们还通过实验研究了该方法,并评估了在运行时检查中实现的开销减少。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号