-
Schema-Based Query Optimisation for Graph Databases
Authors:
Chandan Sharma,
Pierre Genevès,
Nils Gesbert,
Nabil Layaïda
Abstract:
Recursive graph queries are increasingly popular for extracting information from interconnected data found in various domains such as social networks, life sciences, and business analytics. Graph data often come with schema information that describe how nodes and edges are organized. We propose a type inference mechanism that enriches recursive graph queries with relevant structural information co…
▽ More
Recursive graph queries are increasingly popular for extracting information from interconnected data found in various domains such as social networks, life sciences, and business analytics. Graph data often come with schema information that describe how nodes and edges are organized. We propose a type inference mechanism that enriches recursive graph queries with relevant structural information contained in a graph schema. We show that this schema information can be useful in order to improve the performance when evaluating acylic recursive graph queries. Furthermore, we prove that the proposed method is sound and complete, ensuring that the semantics of the query is preserved during the schema-enrichment process.
△ Less
Submitted 12 February, 2025; v1 submitted 4 March, 2024;
originally announced March 2024.
-
Efficient Iterative Programs with Distributed Data Collections
Authors:
Sarah Chlyah,
Nils Gesbert,
Pierre Geneves,
Nabil Layaida
Abstract:
Big data programming frameworks have become increasingly important
for the development of applications for which performance and
scalability are critical. In those complex frameworks, optimizing
code by hand is hard and time-consuming, making automated
optimization particularly necessary. In order to automate
optimization, a prerequisite is to find suitable abstractions to
represent pr…
▽ More
Big data programming frameworks have become increasingly important
for the development of applications for which performance and
scalability are critical. In those complex frameworks, optimizing
code by hand is hard and time-consuming, making automated
optimization particularly necessary. In order to automate
optimization, a prerequisite is to find suitable abstractions to
represent programs; for instance, algebras based on monads or
monoids to represent distributed data collections. Currently,
however, such algebras do not represent recursive programs in a way
which allows for analyzing or rewriting them. In this paper, we extend a
monoid algebra with a fixpoint operator for representing recursion
as a first class citizen and show how it enables new optimizations.
Experiments with the Spark platform illustrate performance gains
brought by these systematic optimizations.
△ Less
Submitted 13 June, 2023;
originally announced June 2023.
-
Session Types as Generic Process Types
Authors:
Simon J. Gay,
Nils Gesbert,
António Ravara
Abstract:
Behavioural type systems ensure more than the usual safety guarantees of static analysis. They are based on the idea of "types-as-processes", providing dedicated type algebras for particular properties, ranging from protocol compatibility to race-freedom, lock-freedom, or even responsiveness. Two successful, although rather different, approaches, are session types and process types. The former all…
▽ More
Behavioural type systems ensure more than the usual safety guarantees of static analysis. They are based on the idea of "types-as-processes", providing dedicated type algebras for particular properties, ranging from protocol compatibility to race-freedom, lock-freedom, or even responsiveness. Two successful, although rather different, approaches, are session types and process types. The former allows to specify and verify (distributed) communication protocols using specific type (proof) systems; the latter allows to infer from a system specification a process abstraction on which it is simpler to verify properties, using a generic type (proof) system. What is the relationship between these approaches? Can the generic one subsume the specific one? At what price? And can the former be used as a compiler for the latter? The work presented herein is a step towards answers to such questions. Concretely, we define a stepwise encoding of a pi-calculus with sessions and session types (the system of Gay and Hole) into a pi-calculus with process types (the Generic Type System of Igarashi and Kobayashi). We encode session type environments, polarities (which distinguish session channels end-points), and labelled sums. We show forward and reverse operational correspondences for the encodings, as well as typing correspondences. To faithfully encode session subtyping in process types subtyping, one needs to add to the target language record constructors and new subtyping rules. In conclusion, the programming convenience of session types as protocol abstractions can be combined with the simplicity and power of the pi-calculus, taking advantage in particular of the framework provided by the Generic Type System.
△ Less
Submitted 6 August, 2014;
originally announced August 2014.
-
Modular session types for objects
Authors:
Simon J. Gay,
Nils Gesbert,
António Ravara,
Vasco T. Vasconcelos
Abstract:
Session types allow communication protocols to be specified type-theoretically so that protocol implementations can be verified by static type checking. We extend previous work on session types for distributed object-oriented languages in three ways. (1) We attach a session type to a class definition, to specify the possible sequences of method calls. (2) We allow a session type (protocol) impleme…
▽ More
Session types allow communication protocols to be specified type-theoretically so that protocol implementations can be verified by static type checking. We extend previous work on session types for distributed object-oriented languages in three ways. (1) We attach a session type to a class definition, to specify the possible sequences of method calls. (2) We allow a session type (protocol) implementation to be modularized, i.e. partitioned into separately-callable methods. (3) We treat session-typed communication channels as objects, integrating their session types with the session types of classes. The result is an elegant unification of communication channels and their session types, distributed object-oriented programming, and a form of typestate supporting non-uniform objects, i.e. objects that dynamically change the set of available methods. We define syntax, operational se-mantics, a sound type system, and a sound and complete type checking algorithm for a small distributed class-based object-oriented language with structural subtyping. Static typing guarantees that both sequences of messages on channels, and sequences of method calls on objects, conform to type-theoretic specifications, thus ensuring type-safety. The language includes expected features of session types, such as delegation, and expected features of object-oriented programming, such as encapsulation of local state.
△ Less
Submitted 23 December, 2015; v1 submitted 24 May, 2012;
originally announced May 2012.