🤖 AI Summary
Weak temporal awareness and poor scalability in graph transformation for temporal graph databases motivate this work. We propose the first declarative framework that deeply integrates Logica logic programming into large-scale graph transformation. Our framework automatically compiles, optimizes, and parallelly executes dynamic graph queries and updates on distributed SQL engines—including DuckDB and BigQuery—without requiring manual implementation of low-level data migration or scheduling logic. Innovatively, we embed temporal semantics directly into logical rules, enabling fully declarative, time-aware graph operations; we further design declarative pathfinding and incremental inference mechanisms tailored to temporal graphs. Evaluated on Win-Move game solving, dynamic path planning, and full-scale Wikidata category relationship analysis, our approach significantly outperforms conventional graph processing systems, achieving real-time inference over million-fact datasets.
📝 Abstract
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.