J-Logic: a Logic for Querying JSON

06/07/2020
by   Jan Hidders, et al.
0

We propose a logical framework, based on Datalog, to study the foundations of querying JSON data. The main feature of our approach, which we call J-Logic, is the emphasis on paths. Paths are sequences of keys and are used to access the tree structure of nested JSON objects. J-Logic also features “packing” as a means to generate a new key from a path or subpath. J-Logic with recursion is computationally complete, but many queries can be expressed without recursion, such as deep equality. We give a necessary condition for queries to be expressible without recursion. Most of our results focus on the deterministic nature of JSON objects as partial functions from keys to values. Predicates defined by J-Logic programs may not properly describe objects, however. Nevertheless we show that every object-to-object transformation in J-Logic can be defined using only objects in intermediate results. Moreover we show that it is decidable whether a positive, nonrecursive J-Logic program always returns an object when given objects as inputs. Regarding packing, we show that packing is unnecessary if the output does not require new keys. Finally, we show the decidability of query containment for positive, nonrecursive J-Logic programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/05/2019

Packing Trees into 1-planar Graphs

We introduce and study the 1-planar packing problem: Given k graphs with...
research
05/15/2014

Application of Methods for Syntax Analysis of Context-Free Languages to Query Evaluation of Logic Programs

My research goal is to employ a parser generation algorithm based on the...
research
06/14/2022

Expressiveness within Sequence Datalog

Motivated by old and new applications, we investigate Datalog as a langu...
research
07/19/2002

A Polynomial Translation of Logic Programs with Nested Expressions into Disjunctive Logic Programs: Preliminary Report

Nested logic programs have recently been introduced in order to allow fo...
research
09/04/2020

Access-Adaptive Priority Search Tree

In this paper we show that the priority search tree of McCreight, which ...
research
06/21/2000

Verifying Termination of General Logic Programs with Concrete Queries

We introduce a method of verifying termination of logic programs with re...
research
08/20/2020

Towards Inferring Queries from Simple and Partial Provenance Examples

The field of query-by-example aims at inferring queries from output exam...

Please sign up or login with your details

Forgot password? Click here to reset