|
ABSTRACT
This paper describes a method for transforming any given set of Datalog rules into an efficient specialized implementation with guaranteed worst-case time and space complexities, and for computing the complexities from the rules. The running time is optimal in the sense that only useful combinations of facts that lead to all hypotheses of a rule being simultaneously true are considered, and each such combination is considered exactly once. The associated space usage is optimal in that it is the minimum space needed for such consideration modulo scheduling optimizations that may eliminate some summands in the space usage formula. The transformation is based on a general method for algorithm design that exploits fixed-point computation, incremental maintenance of invariants, and combinations of indexed and linked data structures. We apply the method to a number of analysis problems, some with improved algorithm complexities and all with greatly improved algorithm understanding and greatly simplified complexity analysis.
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
|
|
| |
4
|
Alfred V. Aho , John E. Hopcroft , Jeffrey Ullman , J. D. Ullman , J. E. Hopcroft, Data Structures and Algorithms, Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 1983
|
| |
5
|
|
 |
6
|
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]
|
| |
7
|
J. Cai, P. Facon, F. Henglein, R. Paige, and E. Schonberg. Type analysis and data structure selection. In B. Moller, editor, Constructing Programs from Specifications, pages 126--164. North-Holland, Amsterdam, 1991.
|
| |
8
|
|
| |
9
|
|
| |
10
|
|
 |
11
|
|
| |
12
|
|
 |
13
|
|
| |
14
|
|
| |
15
|
|
| |
16
|
|
| |
17
|
|
| |
18
|
|
| |
19
|
|
 |
20
|
|
| |
21
|
|
 |
22
|
|
| |
23
|
|
| |
24
|
|
| |
25
|
|
| |
26
|
J. F. Naughton and R. Ramakrishnan. Bottom-up evaluation of logic programs. In J.-L. Lassez and G. Plotkin, editors, Computational Logic: Essays in Honor of Alan Robinson, pages 640--700. The MIT Press, Cambridge, Mass., 1991.
|
| |
27
|
|
| |
28
|
R. Paige. Formal Differentiation: A Program Synthesis Technique, volume~6 of Computer Science and Artificial Intelligence. UMI Research Press, Ann Arbor, Michigan, 1981. Revision of Ph.D. dissertation, New York University, 1979.
|
| |
29
|
R. Paige. Programming with invariants. IEEE Software, 3(1):56--69, Jan. 1986.
|
| |
30
|
R. Paige. Real-time simulation of a set machine on a RAM. In Computing and Information, Vol. II, pages 69--73. Canadian Scholars Press, 1989. Proceedings of ICCI '89: The International Conference on Computing and Information, Toronto, Canada, May 23-27, 1989.
|
 |
31
|
|
| |
32
|
|
| |
33
|
T. Reps. Program analysis via graph reachability. Information and Software Technology, 40(11-12):701--726, Nov. 1998. Special issue on program slicing.
|
| |
34
|
|
| |
35
|
W. K. Snyder. The SETL2 Programming Language. Technical report 490, Courant Institute of Mathematical Sciences, New York University, Sept. 1990.
|
| |
36
|
|
CITED BY 8
|
|
|
|
|
Monica S. Lam , John Whaley , V. Benjamin Livshits , Michael C. Martin , Dzintars Avots , Michael Carbin , Christopher Unkel, Context-sensitive program analysis as database queries, Proceedings of the twenty-fourth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, June 13-15, 2005, Baltimore, Maryland
|
|
|
|
|
|
Katia Hristova , Tom Rothamel , Yanhong A. Liu , Scott D. Stoller, Efficient type inference for secure information flow, Proceedings of the 2006 workshop on Programming languages and analysis for security, June 10-10, 2006, Ottawa, Ontario, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
INDEX TERMS
Primary Classification:
D.
Software
D.3
PROGRAMMING LANGUAGES
D.3.2
Language Classifications
Subjects:
Constraint and logic languages
Additional Classification:
D.
Software
D.3
PROGRAMMING LANGUAGES
D.3.4
Processors
Subjects:
Code generation;
Optimization
E.
Data
E.1
DATA STRUCTURES
Subjects:
Lists, stacks, and queues;
Arrays;
Records
E.2
DATA STORAGE REPRESENTATIONS
Subjects:
Linked representations
F.
Theory of Computation
F.2
ANALYSIS OF ALGORITHMS AND PROBLEM COMPLEXITY
F.2.2
Nonnumerical Algorithms and Problems
Subjects:
Computations on discrete structures
H.
Information Systems
H.2
DATABASE MANAGEMENT
H.2.3
Languages
Subjects:
Query languages
H.2.4
Systems
Subjects:
Rule-based databases;
Query processing
I.
Computing Methodologies
I.2
ARTIFICIAL INTELLIGENCE
I.2.2
Automatic Programming
Subjects:
Program transformation
General Terms:
Algorithms,
Languages,
Performance
Keywords:
complexity analysis,
data structure design,
datalog,
incremental computation,
indexed representations,
indexing,
linked representations,
optimization,
program transformation,
recursion,
tabling
REVIEW
"Jerzy W. Jaromczyk : Reviewer"
Database queries, model checking, and graph problems can be succinctly specified with relational rules, and then expressed with a rule-based language such as Datalog. This paper develops a method for automatic generation of efficient programs from
more...
|