|
ABSTRACT
This paper argues that for many algorithms, and static analysis algorithms in particular, bottom-up logic program presentations are clearer and simpler to analyze, for both correctness and complexity, than classical pseudo-code presentations. The main technical contribution consists of two theorems which allow, in many cases, the asymptotic running time of a bottom-up logic program to be determined by inspection. It is well known that a datalog program runs in O(nk) time where k is the largest number of free variables in any single rule. The theorems given here are significantly more refined. A variety of algorithms are presented and analyzed as examples.
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
|
Alfred V. Aho , Ravi Sethi , Jeffrey D. Ullman, Compilers: principles, techniques, and tools, Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 1986
|
 |
3
|
Alexander Aiken , Edward L. Wimmers , T. K. Lakshman, Soft typing with conditional types, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.163-173, January 16-19, 1994, Portland, Oregon, United States
[doi> 10.1145/174675.177847]
|
| |
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
|
Bondorf, A., and Jorgensen, A. 1993. Efficient analysis for realistic off-line partial evaluation. J. Funct. Program. 3, 3, 315--346.
|
 |
7
|
|
 |
8
|
|
| |
9
|
Dijkstra, E. W. 1959. A note on two problems in connection with graphs. Numer. Math. 1, Oct., 269--271.
|
| |
10
|
Downing, W., and Gallier, J. W. 1984. Linear time algorithms for testing the satisfiability of propositional horn formulae. J. Logic Program. 1, 3, 267--284.
|
| |
11
|
|
 |
12
|
Manuel Fähndrich , Jeffrey S. Foster , Zhendong Su , Alexander Aiken, Partial online cycle elimination in inclusion constraint graphs, Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, p.85-96, June 17-19, 1998, Montreal, Quebec, Canada
|
 |
13
|
|
| |
14
|
Heintze, N., and Jaffar, J. 1990a. A decision procedure for a class of set constraints. In Proceedings, Fifth Annual IEEE Symposium on Logic in Computer Science. IEEE Computer Society Press, Los Alamitos, Calif., pp. 42--51.
|
 |
15
|
|
 |
16
|
|
| |
17
|
|
| |
18
|
|
| |
19
|
|
| |
20
|
Lari, K., and Young, S. J. 1990. The estimation of stochastic context-free grammars using the inside-outside algorithm. Comput. Speech Lang. 4, 1, 35--56.
|
 |
21
|
|
| |
22
|
McAllester, D. 1996. Inferring recursive types. Available online at http://www.research.mit.edu/∼dmac.
|
 |
23
|
|
| |
24
|
Milner, R. 1978. A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17, 3, 348--375.
|
| |
25
|
Naughton, J., and Ramakrishnan, R. 1991. Bottom-up evaluation of logic programs. In Computational Logic, J.-L. Lassez and G. Plotkin, Eds. MIT Press, Cambridge, Mass.
|
| |
26
|
|
 |
27
|
|
| |
28
|
Paterson, M. S., and Wegman, M. N. 1978. Linear unification. J. Comput. Syst. Sci. 16, 2 (April), 158--167.
|
| |
29
|
|
| |
30
|
Reps, T. 1994. Demand Interprocedural Program Analysis Using Logic Databases. Kluwer Academic Publishers, Norwell, Mass., pp. 163--196.
|
| |
31
|
Rocio, V., and Lopes, J. G. 1998. Partial parsing, deduction and tabling. In Proceedings of Tabulation in Parsing and Deduction (TAPD'98) (Paris, France, April 1998), pp. 52--61.
|
| |
32
|
|
 |
33
|
Konstantinos Sagonas , Terrance Swift , David S. Warren, XSB as an efficient deductive database engine, Proceedings of the 1994 ACM SIGMOD international conference on Management of data, p.442-453, May 24-27, 1994, Minneapolis, Minnesota, United States
|
| |
34
|
Shivers, O. 1991. Data flow analysis and type recovery in scheme. In Topics in Advanced Language Implementation, P. Lee, Ed. MIT Press, Cambridge, Mass.
|
 |
35
|
|
| |
36
|
Shieber, S. M., Schabes, Y., and Pereira, F. 1995. Principles and implementation of deductive parsing. J. Logic Program. 24, 1-2 (July/Aug.), 3--36.
|
| |
37
|
|
 |
38
|
|
| |
39
|
Ullman, J., and Ramakrishnan, R. 1995. A survey of research in deductive database systems. J. Logic Program. 23, 2, 125--150.
|
 |
40
|
|
CITED BY 5
|
|
|
|
|
|
|
|
Pablo López , Frank Pfenning , Jeff Polakow , Kevin Watkins, Monadic concurrent linear logic programming, Proceedings of the 7th ACM SIGPLAN international conference on Principles and practice of declarative programming, p.35-46, July 11-13, 2005, Lisbon, Portugal
|
|
|
|
|
|
|
|