000204789 001__ 204789
000204789 005__ 20190317000102.0
000204789 037__ $$aREP_WORK
000204789 245__ $$aTraversal Query Language For Scala.Meta
000204789 269__ $$a2015
000204789 260__ $$c2015
000204789 300__ $$a15
000204789 336__ $$aReports
000204789 520__ $$aWith 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.
000204789 6531_ $$acombinators
000204789 6531_ $$amacros
000204789 6531_ $$ascala
000204789 6531_ $$atraversal
000204789 6531_ $$atransformation
000204789 6531_ $$aoptimization
000204789 700__ $$0(EPFLAUTH)204103$$aBeguet, Eric$$g204103
000204789 700__ $$0246182$$aBurmako, Eugene$$g214505
000204789 8564_ $$uhttps://github.com/begeric/TQL-scalameta$$zURL
000204789 8564_ $$s248842$$uhttps://infoscience.epfl.ch/record/204789/files/TraversableQueryLanguage.pdf$$yn/a$$zn/a
000204789 909C0 $$0252187$$pLAMP$$xU10409
000204789 909CO $$ooai:infoscience.tind.io:204789$$pIC$$preport$$qGLOBAL_SET
000204789 917Z8 $$x214505
000204789 917Z8 $$x214505
000204789 937__ $$aEPFL-REPORT-204789
000204789 973__ $$aEPFL
000204789 980__ $$aREPORT