skip to main content
10.1145/1836089.1836093acmotherconferencesArticle/Chapter ViewAbstractPublication PagesppdpConference Proceedingsconference-collections
research-article

Graph queries through datalog optimizations

Published: 26 July 2010 Publication History

Abstract

This paper describes the use of a powerful graph query language for querying programs, and a novel combination of transformations for generating efficient implementations of the queries. The language supports graph path expressions that allow convenient use of both vertices and edges of arbitrary kinds as well as additional global and local parameters in graph paths. Our implementation method combines transformation to Datalog, recursion conversion, demand transformation, and specialization, and finally generates efficient analysis programs with precise complexity guarantees. This combination improves an O(VE) time complexity factor using previous methods to O(E), where V and E are the numbers of graph vertices and edges, respectively. We also describe implementations and experiments that confirm the analyzed complexities.

References

[1]
S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison-Wesley, 1995.
[2]
K. Ashcraft and D. R. Engler. Using programmer-written compiler extensions to catch security holes. In Proc. of the 2002 IEEE Symp. on Security and Privacy, pages 143--159, 2002.
[3]
T. Ball, M. Naik, and S. K. Rajamani. From symptom to cause: localizing errors in counterexample traces. In Proc. of the 30th annual ACM SIGPLAN - SIGACT Symp. on Principles of Programming Languages, pages 97--105, 2003.
[4]
C. Beeri and R. Ramakrishnan. On the power of magic. Journal of Logic Programming, 10(1/2/3&4):255--299, 1991.
[5]
D. Beyer, A. J. Chlipala, T. A. Henzinger, R. Jhala, and R. Majumdar. The Blast query language for software verification. In Proc. of the 11th Intl. Static Analysis Symp., pages 2--18, 2004.
[6]
E. Bodden, L. J. Hendren, and O. Lhotíak. A staged static program analysis to improve the performance of runtime monitoring. In Proc. of the 21st European Conf. on Object-Oriented Programming, pages 525--549, 2007.
[7]
H. Chen, D. Dean, and D. Wagner. Model checking one million lines of C code. In Proc. of the 11th Annual Network and Distributed System Security Symp., pages 171--185, 2004.
[8]
M. Christodorescu and S. Jha. Static analysis of executables to detect malicious patterns. In Proc. of 12th USENIX Security Symp., pages 12--12, 2003.
[9]
R. F. Crew. ASTLOG: A language for examining abstract syntax trees. In Proc. of the Conf. on Domain-Specific Languages, page 18, 1997.
[10]
O. de Moor, D. Lacey, and E. V. Wyk. Universal regular path queries. Higher-Order and Symbolic Computation, 16(1-2):15--35, 2003.
[11]
E. Hajiyev, M. Verbaere, and O. deMoor. CodeQuest: scalable source code queries with Datalog. In Proc. of the 20th European Conf. on Object-Oriented Programming, pages 2--27, 2006.
[12]
D. Hovemeyer and W. Pugh. Finding bugs is easy. SIGPLAN Notices, 39(12):92--106, 2004.
[13]
K. Hristova. From Rules to Efficient Algorithms for Cyber Trust Applications. PhD thesis, Computer Science Department, SUNY Stony Brook, Dec 2007.
[14]
M. S. Lam, M. Martin, V. B. Livshits, and J. Whaley. Securing web applications with static and dynamic information flow tracking. In Proc. of the 2008 ACM SIGPLAN Symp. on Partial Evaluation and Semantics-based Program Manipulation, pages 3--12, 2008.
[15]
M. S. Lam, J. Whaley, V. B. Livshits, M. C. Martin, D. Avots, M. Carbin, and C. Unkel. Context-sensitive program analysis as database queries. In Proc. of the 24th ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems, pages 1--12, 2005.
[16]
M. Leuschel. Logic program specialisation. In Partial Evaluation, pages 155--188, 1998.
[17]
M. A. Linton. Queries and Views of Programs Using a Relational Database System. PhD thesis, EECS Department, University of California, Berkeley, Dec 1983.
[18]
Y. A. Liu, T. Rothamel, F. Yu, S. D. Stoller, and N. Hu. Parametric regular path queries. In Proc. of the ACM SIGPLAN 2004 Conf. on Programming Language Design and Implementation, pages 219--230, 2004.
[19]
Y. A. Liu and S. D. Stoller. Querying complex graphs. In Proc. of the 7th Intl. Symp. on Practical Aspects of Declarative Languages, pages 199--214, 2006.
[20]
Y. A. Liu and S. D. Stoller. From Datalog rules to efficient programs with time and space guarantees. ACM Transactions on Programming Languages and Systems, 29(1), 2009.
[21]
M. Meskes and J. Noack. The generalized supplementary magic-sets transformation for stratified Datalog. Information Processing Letters, 47(1):31--41, 1993.
[22]
A. Pettorossi and M. Proietti. Program specialization via algorithmic unfold/fold transformations. ACM Computing Surveys, 30(3es):6, 1998.
[23]
T. Rothamel and Y. A. Liu. Efficient implementation of tuple pattern based retrieval. In Proc. of the 2007 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-based Program Manipulation, pages 81--90, 2007.
[24]
K. F. Sagonas, T. Swift, and D. S. Warren. XSB as a deductive database. In Proc. of the 1994 ACM SIGMOD Intl. Conf. on Management of Data, page 512, 1994.
[25]
B. Schwarz, H. Chen, D. Wagner, J. Lin, W. Tu, G. Morrison, and J. West. Model checking an entire Linux distribution for security violations. In Proc. of the 21st Annual Computer Security Applications Conf., pages 13--22, 2005.
[26]
K. T. Tekle, K. Hristova, and Y. A. Liu. Generating specialized rules and programs for demand-driven analysis. In Proc. of the 12th Intl. Conf. on Algebraic Methodology and Software Technology, pages 346--361, 2008.
[27]
M. Verbaere, R. Ettinger, and O. deMoor. JunGL: a scripting language for refactoring. In Proc. of the 28th Intl. Conf. on Software Engineering, pages 172--181, 2006.
[28]
E.-N. Volanschi. A portable compiler-integrated approach to permanent checking. Automated Software Engineering, 15(1):3--33, 2008.
[29]
K. D. Volder. JQuery: A generic code browser with a declarative configuration language. In Proc. of the 8th Intl. Symp. on Practical Aspects of Declarative Languages, pages 88--102, 2006.
[30]
D. S. Warren. Personal communication, 2009.

Cited By

View all
  • (2018)Logic programming applicationsDeclarative Logic Programming10.1145/3191315.3191326(519-548)Online publication date: 1-Sep-2018
  • (2018)Declarative Logic ProgrammingundefinedOnline publication date: 1-Sep-2018
  • (2016)DatalogRAProceedings of the Fourth International Workshop on Graph Data Management Experiences and Systems10.1145/2960414.2960417(1-6)Online publication date: 24-Jun-2016
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
PPDP '10: Proceedings of the 12th international ACM SIGPLAN symposium on Principles and practice of declarative programming
July 2010
266 pages
ISBN:9781450301329
DOI:10.1145/1836089
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 26 July 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. complexity analysis
  2. datalog
  3. demand-driven evaluation
  4. graph query languages
  5. optimization
  6. program analysis
  7. program transformation

Qualifiers

  • Research-article

Conference

PPDP '10

Acceptance Rates

PPDP '10 Paper Acceptance Rate 21 of 57 submissions, 37%;
Overall Acceptance Rate 230 of 486 submissions, 47%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)0
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2018)Logic programming applicationsDeclarative Logic Programming10.1145/3191315.3191326(519-548)Online publication date: 1-Sep-2018
  • (2018)Declarative Logic ProgrammingundefinedOnline publication date: 1-Sep-2018
  • (2016)DatalogRAProceedings of the Fourth International Workshop on Graph Data Management Experiences and Systems10.1145/2960414.2960417(1-6)Online publication date: 24-Jun-2016
  • (2015)Provenance-Driven Data Curation Workflow AnalysisProceedings of the 2015 ACM SIGMOD on PhD Symposium10.1145/2744680.2744691(45-50)Online publication date: 31-May-2015
  • (2014)CARLOGProceedings of the 12th ACM Conference on Embedded Network Sensor Systems10.1145/2668332.2668350(221-235)Online publication date: 3-Nov-2014
  • (2011)More efficient datalog queriesProceedings of the 2011 ACM SIGMOD International Conference on Management of data10.1145/1989323.1989393(661-672)Online publication date: 12-Jun-2011

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media