首页> 外文OA文献 >Generating safe boundary APIs between typed EDSLs and their environments
【2h】

Generating safe boundary APIs between typed EDSLs and their environments

机译:在类型化的EDSL及其环境之间生成安全边界API

代理获取
本网站仅为用户提供外文OA文献查询和代理获取服务,本网站没有原文。下单后我们将采用程序或人工为您竭诚获取高质量的原文,但由于OA文献来源多样且变更频繁,仍可能出现获取不到、文献不完整或与标题不符等情况,如果获取不到我们将提供退款服务。请知悉。

摘要

Embedded domain specific languages (EDSLs) are used to representspecial-purpose code in a general-purpose language and they are used forapplications like vector calculations and run-time code generation. Often,code in an EDSL is compiled to a target (e.g. GPU languages, JVM bytecode,assembly, JavaScript) and needs to interface with other code that is availableat that level but uses other data representations or calling conventions.We present an approach for safely making available such APIs in atyped EDSL, guaranteeing correct conversions between datarepresentations and the respect for calling conventions. When the codebeing interfaced with is the result of static compilation of hostlanguage code, we propose a way to auto-generate the neededboilerplate using meta-programming. We instantiate our technique withJavaScript as the target language, JS-Scala as the EDSL, Scala.js asthe static compiler and Scala macros to generate theboilerplate, but our design is more generally applicable. We provideevidence of usefulness of our approach through a prototypeimplementation that we have applied in a non-trivial code base.
机译:嵌入式领域特定语言(EDSL)用于以通用语言表示特殊用途的代码,并且它们用于矢量计算和运行时代码生成等应用。通常,EDSL中的代码会编译为目标(例如,GPU语言,JVM字节码,汇编语言,JavaScript),并且需要与该级别上可用但使用其他数据表示形式或调用约定的其他代码进行接口。我们提出了一种安全的方法在有类型的EDSL中提供此类API,以确保在数据表示形式和对调用约定的尊重之间进行正确的转换。当与之交互的代码是静态编译宿主语言代码的结果时,我们提出了一种使用元编程自动生成所需样板的方法。我们以JavaScript作为目标语言,以JS-Scala作为EDSL,以Scala.js作为静态编译器和Scala宏实例化技术来生成样板,但是我们的设计更适用。我们通过在非平凡的代码库中应用的原型实现,提供了该方法有用的证据。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
代理获取

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号