【24h】

MetaFJig A Meta-Circular Composition Language for Java-like Classes

机译:MetaFJig一种用于类似Java的类的元循环组合语言

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

摘要

We propose a Java-like language where class definitions are first class values and new classes can be derived from existing ones by exploiting the full power of the language itself, used on top of a small set of primitive composition operators, instead of using a fixed mechanism like inheritance. Hence, compilation requires to perform (meta-)reduction steps, by a process that we call compile-time execution. This approach differs from meta-programming techniques available in mainstream languages since it is meta-circular, hence programmers are not required to learn new syntax and idioms. Compile-time execution is guaranteed to be sound (not to get stuck) by a lightweight technique, where class composition errors are detected dynamically, and conventional typing errors are detected by interleaving typechecking with meta-reduction steps. This allows for a modular approach, that is, compile-time execution is defined, and can be implemented, on top of typechecking and execution of the underlying language. Moreover, programmers can handle errors due to composition operators. Besides soundness, our technique ensures an additional important property called meta-level soundness, that is, typing errors never originate from (meta-)code in already compiled programs.
机译:我们提出了一种类似于Java的语言,其中类定义是第一类值,并且可以通过利用语言本身的全部功能来从现有的类中派生新的类,将其用于一小组原始组合运算符之上,而不是使用固定的继承的机制。因此,编译需要通过我们称为编译时执行的过程执行(元)缩减步骤。这种方法不同于主流语言中可用的元编程技术,因为它是元循环的,因此不需要程序员学习新的语法和习语。轻量级的技术可确保编译时执行的声音是合理的(不会卡住),该技术可以动态检测类组合错误,并通过将类型检查与元归约步骤进行交错来检测常规的类型错误。这允许采用模块化方法,即在类型检查和基础语言执行的基础上定义并可以实现编译时执行。而且,程序员可以处理由于组合运算符引起的错误。除了稳健性之外,我们的技术还确保了一个称为元级稳健性的附加重要属性,也就是说,键入错误绝不会源自已编译程序中的(元)代码。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号