Graph transformations are a powerful computational model for manipulating complex networks, but handling temporal aspects and scalability remain significant challenges. We present a novel approach to implementing these transformations using Logica, an open-source logic programming language and system that operates on parallel databases like DuckDB and BigQuery. Leveraging the parallelism of these engines, our method enhances performance and accessibility, while also offering a practical way to handle time-varying graphs. We illustrate Logica's graph querying and transformation capabilities with several examples, including the computation of the well-founded solution to the classic "Win-Move" game, a declarative program for pathfinding in a dynamic graph, and the application of Logica to the collection of all current facts of Wikidata for taxonomic relations analysis. We argue that clear declarative syntax, built-in visualization and powerful supported engines make Logica a convenient tool for graph transformations.
翻译:图变换是处理复杂网络的强大计算模型,但时序处理与可扩展性仍是重要挑战。本文提出一种基于Logica实现此类变换的新方法。Logica是一种开源逻辑编程语言与系统,可运行于DuckDB和BigQuery等并行数据库之上。通过利用这些引擎的并行处理能力,我们的方法在提升性能与可访问性的同时,为处理时变图提供了实用途径。我们通过多个案例展示了Logica的图查询与变换能力,包括经典"Win-Move"博弈良基解的计算、动态图路径搜索的声明式程序,以及将Logica应用于维基数据全量实时事实以进行分类关系分析。我们认为,清晰的声明式语法、内置可视化功能及强大的底层引擎使Logica成为图变换的高效工具。