首页> 外文会议>International Conference on Object Databases >Compiler Plugins Can Handle Nested Languages: AST-Level Expansion of LINQ Queries for Java
【24h】

Compiler Plugins Can Handle Nested Languages: AST-Level Expansion of LINQ Queries for Java

机译:编译器插件可以处理嵌套语言:java的LINQ查询的AST-Level扩展

获取原文

摘要

The integration of database and programming languages is made difficult by the different data models and type systems prevalent in each field. Functional-object query languages contribute to bridge this gap by letting software developers write declarative queries without imposing any specific execution strategy. Although some query optimizers support this paradigm, Java provides no means to embed queries in a seamless and typesafe manner. Interestingly, the benefits of such grammar extension (compile-time type inference and checking, user-friendly syntax) can alternatively be achieved with a compiler plugin as discussed in this paper for the LINQ query language and two Java compilers (from Sun and Eclipse). A prototype confirms the benefits of the approach by automating at compile-time (a) the parsing of LINQ queries nested in Java, (b) their analysis for well-formedness, and (c) their rewriting into statements to build Abstract Syntax Trees (ASTs). The technique is also applicable to other languages (JPQL, XQuery) which are handled nowadays by a Java compiler as uninterpreted strings, being thus prone to runtime exceptions due to breaches of static semantics.
机译:数据库和编程语言的集成是难以通过每个字段中普遍的不同数据模型和类型系统难以实现的。功能 - 对象查询语言通过让软件开发人员在不强加任何特定执行策略的情况下写入声明查询来桥接此间隙。虽然某些查询优化程序支持此范例,但Java不提供以无缝和类型的方式嵌入查询的方法。有趣的是,可以使用本文为LINQ查询语言和两个Java编译器(来自Sun和Eclipse)中讨论的编译器插件来实现此类语法扩展(编译时类型推断和检查,用户友好的语法)的益处。 。原型通过在编译时(a)在Java中嵌套的LINQ查询的解析来确认方法的好处,(b)他们对良好成本的分析,(c)重写为构建抽象语法树( ASTS)。该技术也适用于其他语言(JPQL,XQuery),其由Java编译器作为未解释的字符串处理的其他语言(JPQL,XQuery),因此由于泄露静态语义而易于运行时异常。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号