# Domain-Specific Languages for Algorithmic Graph Processing: A Systematic Literature Review
## 3 Results
### Result Synthesis
#### 3.2.5 RQ5  
Integration into Larger Toolkits for Graph Analytics  
When used industrially, DSLs for algorithmic graph processing--such as Green-Marl, PGX Algorithm, or Gremlin--are integrated into larger software for graph analytics as part of a client-server architecture. Users can express their graph analytics logic in a dedicated DSL through interactions with a client, while the actual graph data is processed on a server. This has implications on security: the DSL compiler running on the server constitutes a potential target for attacks (e.g., denial-of-service), especially if it introduces vulnerabilities through transitive dependencies [81; 82]. The academic DSLs we review are generally standalone, though this is a recognized limitation [30]. Integration into Larger Data Processing Pipelines  
Graph analytics application scenarios typically combine graph querying and algorithmic graph processing. Generally, the different graph data processing operations can be categorized according to the pipeline shown in Figure 3. The first step is OLTP (online transactional processing), which refers to the real-time processing of graph data using a graph query DSL (such as PGQL or Cypher). After OLTP, data can undergo more complex analyses through OLAP (Online Analytical Processing) operations. This is the step where DSLs for algorithmic graph processing can be utilized either to implement graph algorithms available to users off-the-shelf or to allow users to express their own custom graph algorithm logic. Finally, graph data feed into various applications, including RAG (retrieval-augmented generation) for large language models (LLMs), or ML-based tasks, for example, to train or further tune a model. Such a model can then be used to provide more sophisticated insights or predictions on analyzed data [83]. Several graph analytics solutions that use a DSL approach provide utilities for both OLTP and OLAP and, therefore, integrate graph query DSLs, as well as DSLs for algorithmic graph processing. Oracle's PGX integrates PGQL, PGX Algorithm, and Green-Marl. Neo4j allows querying graph data using Cypher, and it provides a library of prebuilt graph algorithms that can be invoked via Cypher statements. Integration into General-Purpose Languages  
As explained in Section 3.2.3 (RQ3), some DSLs for algorithmic graph processing are syntactically a subset of a general-purpose language and/or are implemented in a general-purpose language. This serves two purposes. First, users are exposed to a general-purpose syntax they are familiar with (though some DSL developers prefer to design their own domain-specific abstractions). Second, DSLs embedded in a general-purpose language may reuse the tooling provided for this language, which aids both the DSL developer and the DSL users. PGX Algorithm is a subset of Java: a PGX Algorithm program is a syntactically valid Java program. Fregel is a subset of Haskell, and both the Haskell interpreter and compiler are implemented in Haskell. PyGB uses Python syntax and is itself implemented in the Python language. Graphlt opts against an embedded DSL approach, citing as motivations a customized domain-specific syntax and optimizations involving global transformations across different data structures and functions [30]. However, the author recognizes that DSLs for algorithmic graph processing are only part of larger data analytics and ML pipelines and lists the embedding of Graphlt into Python or C++ as future work that can ease this integration. DSL Interoperability and Reuse  
All DSLs we review map to a general-purpose language compiler at one level or another of the compilation process. DSL compilers are typically high-level source-to-source compilers: i.e., they generate code in a high-level general-purpose language, which is then further compiled. Some DSLs map to another DSL to partially or globally reuse its compiler or to provide users with a more accessible syntax than the DSL it maps to.