首页> 外国专利> Methods of Graph-Type Specialization and Optimization in Graph Algorithm DSL Compilation

Methods of Graph-Type Specialization and Optimization in Graph Algorithm DSL Compilation

机译:图算法DSL编译中图类型专业化和优化的方法

摘要

Techniques herein generate, such as during compilation, polymorphic dispatch logic (PDL) to switch between specialized implementations of a polymorphic graph algorithm. In an embodiment, a computer detects, within source logic of a graph algorithm, that the algorithm processes an instance of a generic graph type. The computer generates several alternative implementations of the algorithm. Each implementation is specialized to process the graph instance as an instance of a respective graph subtype. The computer generates PDL that performs dynamic dispatch as follows. At runtime, the PDL receives a graph instance of the generic graph type. The PDL detects which particular graph subtype is the graph instance. The PDL then invokes whichever alternative implementation that is specialized to process the graph instance as an instance of the detected particular graph subtype. In embodiments, the source logic is expressed in a domain specific language (DSL), e.g. for analysis, traversal, or querying of graphs.
机译:本文的技术例如在编译期间产生多态调度逻辑(PDL),以在多态图算法的专用实现之间切换。在一个实施例中,计算机在图算法的源逻辑内检测到该算法处理通用图类型的实例。计算机生成该算法的几种替代实现。每个实现都专门将图实例作为相应图子类型的实例进行处理。计算机生成的PDL执行以下动态分配。在运行时,PDL会接收通用图类型的图实例。 PDL检测哪个特定的图形子类型是图形实例。然后,PDL调用专门用于将图形实例处理为检测到的特定图形子类型的实例的任何替代实现。在实施例中,源逻辑以域专用语言(DSL)来表达,例如。用于图形的分析,遍历或查询。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号