|
ABSTRACT
Certain variants of object-oriented Datalog can be compiled to Datalog with negation. We seek to apply optimisations akin to virtual method resolution (a well-known technique in compiling Java and other OO languages) to improve efficiency of the resulting Datalog programs. The effectiveness of such optimisations strongly depends on the precision of the underlying type inference algorithm. Previous work on type inference for Datalog has focussed on Cartesian abstractions, where the type of each field is computed separately. Such Cartesian type inference is inherently imprecise in the presence of field equalities. We propose a type system where equalities are tracked, and present a type inference algorithm. The algorithm is proved sound. We also prove that it is optimal for Datalog without negation, in the sense that the inferred type is as tight as possible. Extensive experiments with our type-based optimisations, in a commercial implementation of object-oriented Datalog, confirm the benefits of this non-Cartesian type inference algorithm.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
|
 |
3
|
Serge Abiteboul , Georg Lausen , Heinz Uphoff , Emmanuel Waller, Methods and rules, Proceedings of the 1993 ACM SIGMOD international conference on Management of data, p.32-41, May 25-28, 1993, Washington, D.C., United States
|
| |
4
|
|
 |
5
|
Francois Bancilhon , David Maier , Yehoshua Sagiv , Jeffrey D Ullman, Magic sets and other strange ways to implement logic programs (extended abstract), Proceedings of the fifth ACM SIGACT-SIGMOD symposium on Principles of database systems, p.1-15, March 24-26, 1986, Cambridge, Massachusetts, United States
[doi> 10.1145/6012.15399]
|
| |
6
|
Sacha Berger, Emmanuel Coquery, Wlodzimierz Drabent, and Artur Wilk. Descriptive typing rules for Xcerpt and their soundness. In François Fages and Sylvain Soliman, editors, Principles and Practice of Semantic Web Reasoning, volume 3703 of LNCS, pages 85--100. Springer, 2005.
|
 |
7
|
|
| |
8
|
Maurice Bruynooghe, John P. Gallagher, and Wouter van Humbeeck. Inference of well-typings for logic programs with application to termination analysis. In Chris Hankin and Igor Siveroni, editors, Static Analysis Symposium (SAS '05), volume 3672 of Lecture Notes in Computer Science, pages 35--51. Springer, 2005.
|
| |
9
|
|
 |
10
|
|
 |
11
|
|
 |
12
|
|
| |
13
|
Horatiu Cirstea and Claude Kirchner. Types for web rule languages: a preliminary study. Technical Report IST5067779/Nancy/I3-D2/D/PU/a1, Rewerse: reasoning on the web, 2004.
|
 |
14
|
Stavros Cosmadakis , Haim Gaifman , Paris Kanellakis , Moshe Vardi, Decidable optimization problems for database logic programs, Proceedings of the twentieth annual ACM symposium on Theory of computing, p.477-490, May 02-04, 1988, Chicago, Illinois, United States
[doi> 10.1145/62212.62259]
|
 |
15
|
|
 |
16
|
|
| |
17
|
|
| |
18
|
Anuj Dawar. Types and indiscernibles in finite models. In J. A. Makowsky, editor, Logic Colloquium '95, Lecture Notes in Logic, pages 51--65. Springer, 1995.
|
| |
19
|
Oege de Moor, Damien Sereni, Mathieu Verbaere, Elnar Hajiyev, Pavel Avgustinov, Torbjörn Ekman, Neil Ongkingco, and Julian Tibble. .QL: Object-oriented queries made easy. In Ralf Lämmel, João Saraiva, and Joost Visser, editors, Generative and Transformational Techniques in Software Engineering, LNCS. Springer, 2007.
|
| |
20
|
Oege de Moor , Mathieu Verbaere , Elnar Hajiyev , Pavel Avgustinov , Torbjorn Ekman , Neil Ongkingco , Damien Sereni , Julian Tibble, Keynote Address: .QL for Source Code Analysis, Proceedings of the Seventh IEEE International Working Conference on Source Code Analysis and Manipulation, p.3-16, September 30-October 01, 2007
[doi> 10.1109/SCAM.2007.13]
|
| |
21
|
|
| |
22
|
Thom W. Frühwirth, Ehud Y. Shapiro, Moshe Y. Vardi, and Eyal Yardeni. Logic programs as types for logic programs. In Logic in Computer Science (LICS), pages 300--309. IEEE Computer Society, 1991.
|
| |
23
|
John P. Gallagher and Kim S. Henriksen. Type analysis and transformation tool. http://wagner.ruc.dk/Tattoo/, 2007.
|
| |
24
|
John P. Gallagher, Kim S. Henriksen, and Gourinath Banda. Techniques for scaling up analyses based on pre-interpretations. In M. Gabbrielli and G. Gupta, editors, International Conference on Logic Programming (ICLP '05), volume 3668 of LNCS, pages 280--296. Springer, 2005.
|
| |
25
|
|
 |
26
|
|
| |
27
|
Jakob Henriksson and Jan Maluszyński. Static type-checking of datalog with ontologies. In Hans Jürgen Ohlbach and Sebastian Schaffert, editors, Principles and Practice of Web Reasoning, volume 3208 of LNCS, pages 76--89. Springer, 2004.
|
| |
28
|
|
| |
29
|
|
 |
30
|
Benjamin S. Lerner , Matthew Flower , Dan Grossman , Craig Chambers, Searching for type-error messages, Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, June 10-13, 2007, San Diego, California, USA
|
 |
31
|
|
| |
32
|
|
 |
33
|
|
 |
34
|
|
 |
35
|
|
| |
36
|
|
| |
37
|
Semmle Ltd. Company website with free downloads, documentation, and discussion forums. http://semmle.com, 2007.
|
| |
38
|
|
 |
39
|
Vijay Sundaresan , Laurie Hendren , Chrislain Razafimahefa , Raja Vallée-Rai , Patrick Lam , Etienne Gagnon , Charles Godin, Practical virtual method call resolution for Java, ACM SIGPLAN Notices, v.35 n.10, p.264-280, Oct. 2000
|
| |
40
|
Jeffrey D. Ullman. A comparison between deductive and object-oriented database systems. In 2nd International Conference on Deductive and Object-Oriented Databases, LNCS, pages 263--277, 1991.
|
 |
41
|
|
|