Traversal Query Language For Scala.Meta

نویسندگان

  • Eric Béguet
  • Eugene Burmako
چکیده

With the rise of metaprogramming in Scala, manipulating ASTs has become a daily job. Yet the standard API provides only low-level mechanisms to transform or to collect information on those data structures. Moreover, those mechanisms often force the programmer to manipulate state in order to retrieve information on these ASTs. In this report we try to solve those problems by introducing TQL, a high-level combinator Scala library to transform and query data structures in a purely functional way. Parser combinators allow to combine several small parsers to build a bigger one in an expressive way. In this report, we argue that we can apply the same concept to data structure manipulation and construct complicated traversers on top of smaller ones. Yet combinators may feel unnatural or too complicated for certain usage. We therefore built a library on top of TQL to manipulate data structures as a collection. We then put TQL in practice to scala.meta ASTs, and describe the challenges we face when traversing a real-word data structure, especially performance-wise.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Killing Two Birds with One Stone - Querying Property Graphs using SPARQL via GREMLINATOR

Knowledge graphs have become popular over the past decade and frequently rely on the Resource Description Framework (RDF) or Property Graph (PG) databases as data models. However, the query languages for these two data models – SPARQL for RDF and the PG traversal language Gremlin – are lacking interoperability. We present Gremlinator, the rst translator from SPARQL – the W3C standardised langua...

متن کامل

انتخاب مناسب‌ترین زبان پرس‌وجو برای استفاده از فرا‌‌پیوندها جهت استخراج داده‌ها در حالت دیتالوگ در سامانه پایگاه داده استنتاجی DES

Deductive Database systems are designed based on a logical data model. Data (as opposed to Relational Databases Management System (RDBMS) in which data stored in tables) are saved as facts in a Deductive Database system. Datalog Educational System (DES) is a Deductive Database system that Datalog mode is the default mode in this system. It can extract data to use outer joins with three query la...

متن کامل

A Join Operator for Property Graphs

In the graph database literature the term “join” does not refer to an operator combining two graphs, but involves path traversal queries over a single graph. Current languages express binary joins through the combination of path traversal queries with graph creation operations. Such solution proves to be not efficient. In this paper we introduce a binary graph join operator and a corresponding ...

متن کامل

Cost-Controlled OFL Rewriting Rules for Multiple Collection Traversals

The integration of path expression evaluations in an object-oriented cost-driven query optimizer is the subject of this paper. We present rewriting rules that transform path expressions into different object target programs (i.e., query execution plans). An analytical cost model is presented and used to compare the quality of various programs. We have used the OFL (Object Functional Language) t...

متن کامل

A Graph Traversal Based Approach to Answer Non-Aggregation Questions over DBpedia

We present a question answering system over DBpedia, filling the gap between user information needs expressed in natural language and a structured query interface expressed in SPARQL over the underlying knowledge base (KB). Given the KB, our goal is to comprehend a natural language query and provide corresponding accurate answers. Focusing on solving the non-aggregation questions, in this paper...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015